I am working on a project to develop a new technology and it would be great if I could have a tone and beat syncgenerator with amplitude/volume, pitch carrier, time frequency change, sweep frequencies with customized fields.
(setq frequency 440)
(setq amplitude 0.8)
(mult amplitude
(hzosc frequency))
Can you work out what the above code is doing?
Are you able to make it into a plug-in?
Can you add controls to the plug-in so that it can generate a constant tone at a frequency and amplitude set by the user?
See how far you can get. Iāll be back on the forum in a day or two and suggest how you might proceed, based on what you do with the above.
For writing and editing Nyquist scripts, if you use Windows I would highly recommend using Notepad++
Small pieces of code can be conveniently run by copy and pasting them into the āNyquist Promptā effect (in the Audacity Effect menu). You can then make changes to the code to see how it affects the output, for example, try running different versions like these:
(setq frequency 440)
(setq amplitude 0.8)
(mult amplitude
(hzosc frequency))
(setq frequency 440)
(setq amplitude 0.2)
(mult amplitude
(hzosc frequency))
(setq frequency 220)
(setq amplitude 0.8)
(mult amplitude
(hzosc frequency))
(mult 0.5
(hzosc 1000))
Unless you have previous programming experience with C or C++, Iād suggest that you concentrate on the LISP examples.
Nyquist can be written in SAL or in LISP, but most of the people on this forum that use Nyquist (including myself) write in LISP rather than SAL, so we are better able to provide support if you are working in LISP.
Sure, no problem. Thereās no rush.
I think itāll be better if we approach this steadily so that you understand, then you will be able to modify code and tailor the plug-in to suit your needs.
I am back!
The LISP protocol is obviously extensive, so for now I concentrated myself in learning some of the basic functions, behaviors, oscillators, once that my main goal is not make music only generate sounds.
So , I suppose I am ready for the next step!! Letās seeā¦
Please go ahead.
Hi Mary,
Iām not going to be on the forum over the weekend, so Iāll check in on Monday. Between now and then, have a look at the following functions in the Nyquist manual, and try and create a āGeneratorā type plug-in using some or all of these functions. The information necessary to convert a simple code snippet into a plug-in is here: http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
Make a note of any questions that you canāt figure out, and post a couple of plug-ins, whether they work or not.
.NY files can be attached directly to forum posts as described here: https://forum.audacityteam.org/t/how-to-attach-files-to-forum-posts/24026/1
The functions to look at:
hzosc
osc
hz-to-step
pwl
pwlv
No worries Mary, Iām sure it wonāt take long to knock up a working plug-in once you have the time to concentrate on the job. Just post here when youāre ready