Preset populate controls?

Using Nyquist scripts in Audacity.
Post and download new plug-ins.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Preset populate controls?

Permanent link to this post Posted by dmonty » Wed Mar 08, 2017 5:00 am

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?
dmonty
 
Posts: 20
Joined: Sat Feb 25, 2017 9:15 pm
Operating System: Linux *buntu

Re: Preset populate controls?

Permanent link to this post Posted by steve » Wed Mar 08, 2017 9:03 am

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?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45055
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Preset populate controls?

Permanent link to this post Posted by dmonty » Wed Mar 08, 2017 9:23 pm

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.
dmonty
 
Posts: 20
Joined: Sat Feb 25, 2017 9:15 pm
Operating System: Linux *buntu

Re: Preset populate controls?

Permanent link to this post Posted by steve » Thu Mar 09, 2017 2:04 pm

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)))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45055
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Preset populate controls?

Permanent link to this post Posted by dmonty » Thu Mar 09, 2017 4:23 pm

I can make "User Presets" that populate the form. How do I create a list of "Factory Presets" other than just "Default"?

Image
dmonty
 
Posts: 20
Joined: Sat Feb 25, 2017 9:15 pm
Operating System: Linux *buntu

Re: Preset populate controls?

Permanent link to this post Posted by steve » Thu Mar 09, 2017 7:51 pm

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45055
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu


Return to Nyquist



Who is online

Users browsing this forum: No registered users and 3 guests