[CM] snd-rt <slider> naming problem

Kjetil S. Matheussen k.s.matheussen at notam02.no
Wed Apr 2 18:02:21 PDT 2008



On Thu, 3 Apr 2008, Kjetil S. Matheussen wrote:

>
>
> On Thu, 3 Apr 2008, Kjetil S. Matheussen wrote:
>>
>>  The bigger problem, though, is that after doing this
>>  replacement, only two sliders  are shown, and not
>>  six. And I don't know how to fix that.
>>  I have to think about this. Hopefully its possible to fix
>>  without having to expand macros before caching the function.
>
> No, I'm pretty sure its not possible. Unless you're using the ,`(+ ,@(map 
> etc.)) I showed, you have to create the sliders before creating the
> rt objects. Take a look at the "make-osc-gui" example in rt-example.scm
> on how you do that.
>

Sorry, I'm getting tired. Its of course enough just clearing
the cache between compiling each instrument:

(definstrument (oscillatorbank oscillators)
   (define-multi-instrument-rt-dialog)
   (define* (oscillator-rec oscillators)
     (if (null? oscillators)
 	#t
 	(let*
 	    ((oscillator1 (car oscillators))
 	     (freq (car oscillator1))
 	     (amp (car (cdr oscillator1)))
 	     (freqname (car (cdr (cdr oscillator1))))
 	     (ampname (car (cdr (cdr (cdr oscillator1))))))
 	  (rt-clear-cache!)
 	  (begin (<rt-out> (* (oscil* (<slider> freqname
 						(- freq 1) freq (+ freq 1)))
 			      (<slider> ampname
 					0.0001 amp 2 :log #t)
 			      ))
 		 (oscillator-rec (cdr oscillators))))))
   (oscillator-rec oscillators))


After replacing your old rt-compiler.scm with 
http://www.notam02.no/~kjetism/rt-compiler.scm [1], the above
instrument should work.


[1] Unless you have a special setup, this should work:

cd /usr/local/snd-ls/snd-9/
mv rt-compiler.scm rt-compiler_old.scm
wget http://www.notam02.no/~kjetism/rt-compiler.scm




More information about the Cmdist mailing list