Re: [Audacity-nyquist] How do I create a local instead of a global variable?
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: <edg...@we...> - 2005-04-15 00:55:43
|
aud...@li... schrieb am 03.04.05 03:22:14: > > I want to replace many instances of setting global variables > containing sound (using setq) with let. I have looked at several > examples of code but don't understand how to use let. > > If for example I have > > (setq variable-name expression) > > how would I convert that global variable code into local variable > code using let? > > Thanks very much > > David > Hi David Learning Nyquist myself I found today: Examples from bandfx.lsp (Nyquist 2.30 Multiband-Tutorial) (let (variable-name variable-name2) ; declares one or more local variables (code) ; one or more lines of code variable-name) ; the last line is return-value the variables bound with let are only valid within the code lines between let and the closing paren after the return value if you do not initalize your variables they are initialized with NIL otherwise you have to write (let (variable-name expression variable-name2 expression2) (code) variable-name) ; return-value Because I do not know wether you have the Nyquist 2.30 Tutorials and the examples in there are spread over twenty files (or something) I will send you all Tutorials in one PDF per Mail. I think this is easier to listen to. Roger may please correct this if I have explained it wrong because I'm still learning myself. Thanks to everybody - edgar __________________________________________________________ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201 |