Page 1 of 1

Preset populate controls?

Permanent link to this postPosted: Wed Mar 08, 2017 5:00 am
Posted by dmonty
I want to populate a bunch of saves for a generator plugin.

Is there way to populate a bunch of saves for a generator plugin?

Is it possible to have a "choice" control populate other control fields on the Nyquist plugin screen?
Similar to "Manage"=>"Presets" but presets?

Re: Preset populate controls?

Permanent link to this postPosted: Wed Mar 08, 2017 9:03 am
Posted by steve
I'm not sure exactly what you mean, but controls in Nyquist plug-ins are not "interactive" - they can't update on the fly. Choices have to be explicitly written into the code.

Nyquist can read and write files, so perhaps you could achieve what you want by reading/writing a configuration file for your plug-in?

Re: Preset populate controls?

Permanent link to this postPosted: Wed Mar 08, 2017 9:23 pm
Posted by dmonty
Nyquist can read and write files, so perhaps you could achieve what you want by reading/writing a configuration file for your plug-in?


Yes I'd like to know how to read/create configuration presets. I can see settings stored in .audacity-data/pluginsettings.cfg but I'm not sure how to pre-seed it?

End goal is to have a PEMF frequency generator with a pick-list (e.g. below). Pick a set of frequencies then give end users the ability to adjust the frequencies - hence my inquiry for presets. I'd like to generate the Frequencies in Audacity because it is cross platform and allows me to playback a frequency and record the end result from the magnet in the same interface.

==============
Abdominal_inflammation - 2720, 2489, 2170, 2000, 1865, 1800, 1600, 1550, 880, 832, 802, 787, 776, 727, 660, 465, 450, 444, 440, 428, 380, 250, 146, 125, 95, 72, 20, 1.2
Abdominal_pain - 10000, 3000, 95, 3
Abscesses - 2720, 2170, 1865, 1550, 880, 802, 787, 727, 500, 444, 190
Abscesses_1 - 2720, 2170, 1865, 1550, 880, 802, 787, 760, 727, 690, 660, 500, 465, 450, 444, 428, 190
Abscesses_secondary - 1550, 802, 760, 660, 465, 450, 444, 428
Acidosis - 10000, 880, 802, 787, 776, 727, 146, 20
Acne - 2720, 2170, 1800, 1600, 1550, 1552, 1500, 802, 880, 778, 787, 760, 741, 727, 660, 564, 465, 450, 444, 428
Aconite - 3347, 5611, 2791
...
==============
http://www.electroherbalism.com/Bioelec ... s/CAFL.htm

Thanks.

Re: Preset populate controls?

Permanent link to this postPosted: Thu Mar 09, 2017 2:04 pm
Posted by steve
I'm still not clear about what you are trying to do, but Nyquist plug-ins are just text files, which Audacity then interprets to create the plug-in.
If you want specific choices, you just need to add a "choice" widget to the plug-in code with the choices that you want.

Here's an example that can be run in the Nyquist Prompt effect (it could equally be written as a "plug-in" which you could then install, but to keep the example simple I'll just give an example that can run in the Nyquist prompt).

This example generates a tone, for which the frequency may be 2720, 2489, 2170, 2000, 1865, or 1800Hz
(the syntax for a multiple-choice widget is given here: http://wiki.audacityteam.org/wiki/Nyqui ... ice_Widget
Code: Select all
;control hz "Select frequency (Hz)" choice "2720,2489,2170,2000,1865,1800" 0

(case hz
  (0 (hzosc 2720))
  (1 (hzosc 2489))
  (2 (hzosc 2170))
  (3 (hzosc 2000))
  (4 (hzosc 1865))
  (t (hzosc 1800Hz)))

Re: Preset populate controls?

Permanent link to this postPosted: Thu Mar 09, 2017 4:23 pm
Posted by dmonty
I can make "User Presets" that populate the form. How do I create a list of "Factory Presets" other than just "Default"?

Image

Re: Preset populate controls?

Permanent link to this postPosted: Thu Mar 09, 2017 7:51 pm
Posted by steve
dmonty wrote:How do I create a list of "Factory Presets" other than just "Default"?

That feature is not yet supported by Nyquist plug-ins.