[Impromptu] Error with loading samples in sampler
Andreas Körner
andi at jaak.de
Mon Sep 21 15:39:56 GMT 2009
Ah! wonderfull...
Did work! I had the fear that this are too much samples for the
sampler... but I'm happy that this isn't so!
thank you
Am 21.09.2009 um 06:24 schrieb Andrew Sorensen:
> Hi Andreas,
>
> It appears that I've made it impossible to load audiodata before the
> au is connected to the graph - oops. This is a bug and I'll fix it
> for the next release. But in the meantime you just need to ensure
> that the au is connected up BEFORE you load it with any audio data.
> The code below works fine for me:
>
> (define au (au:make-node "aumu" "play" "MOSO"))
> (au:connect-node au 0 *au:output-node* 0)
> (au:update-graph)
>
> (define klau:instr:gbpiano:sampleslist
> (list (cons 024 "/tmp/t1.wav")
> (cons 025 "/tmp/t2.wav")
> ))
>
> ;create list with loaded samples
> (define klau:instr:gbpiano:sampledata
> (map (lambda (e)
> (cons (car e) (au:load-audio-data (cdr e))))
> klau:instr:gbpiano:sampleslist))
>
> ;;loads the node passed in as an argument with nice piano samples ;)
> (define (klau:instr:gbpiano au)
> (for-each (lambda (e)
> (au:play:set-sample-data au (car e) (cdr e)))
> klau:instr:gbpiano:sampledata))
>
> (klau:instr:gbpiano au)
>
> (play-note (now) au 24 80 20000)
> (play-note (now) au 25 80 20000)
>
> Just FYI I don't think the sampler handles mono files at the moment
> so you might need to be careful there also.
>
> Cheers,
> Andrew.
> _______________________________________________
> Impromptu mailing list
> Impromptu at lists.moso.com.au
> http://lists.moso.com.au/mailman/listinfo/impromptu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.moso.com.au/pipermail/impromptu/attachments/20090921/8526650b/attachment.htm
More information about the Impromptu
mailing list