Hello everybody, im using csound with pd using csoundapi, Im not really a csound guy so i been mostly experimenting with csound codes made by other, like granular synthesis codes. If i want to send a parameter from pd to csound i just add this line in csound: gk3 invalue "grain_size"
I was wondering how can a do for loading sounds in csound from pd. i would like to have different options like sound1.wav, sound2.wav , sound3.wav. as pd messages and then just select from pd the sound i want to load into csound. Do anybody know can i do this in csound/pd?
This is my code in csound with the sound i would like to change from pd:
<CsScore> f1 0 0 1 "kukon.aif" 0 0 1 f2 0 1025 20 2 1
i1 0 3600
</CsScore>
thanks in advance
Ronni
see http://www.csounds.com/journal/issue7/commandLineFXProcessing.html
You use the ftgen to dynamically build table in the orchestra section (not the score section), and you can pass a variable field through with --omacro:Filename="/foo/path/file.wav"
gitemp ftgen 1, 0, isize, 1, "$Filename", 0, 0, 1
I didn't try this with [csound~] yet, there may be issues with passing in strings that you need to deal with
a.
On Mon, 13 Sep 2010 12:25:05 -0700 ronni montoya ronni.montoya@gmail.com wrote:
Hello everybody, im using csound with pd using csoundapi, Im not really a csound guy so i been mostly experimenting with csound codes made by other, like granular synthesis codes. If i want to send a parameter from pd to csound i just add this line in csound: gk3 invalue "grain_size"
I was wondering how can a do for loading sounds in csound from pd. i would like to have different options like sound1.wav, sound2.wav , sound3.wav. as pd messages and then just select from pd the sound i want to load into csound. Do anybody know can i do this in csound/pd?
This is my code in csound with the sound i would like to change from pd:
<CsScore> f1 0 0 1 "kukon.aif" 0 0 1 f2 0 1025 20 2 1
i1 0 3600
</CsScore>
thanks in advance
Ronni
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
OK, so you are using a soundfile loaded into a function table in Csound - played back with a granular synthesis unit (e.g. grain).
What you need to do is set up your instrument in the orchestra file, so that the function table is set by a p-field. ...from the csound manual:
ares grain xamp, xpitch, xdens, kampoff, kpitchoff, kgdur, igfn,
iwfn, imgdur [, igrnd]igfn is the function table of your sample so...in
your orchestra file, make it p4 and...
...to load a new soundfile into the csoundapi~ plugin
[f5 (or f6, f7 etc) 0 0 1 "whatever.wav" 0 0 1(
then if p4 is your function table, your event message sent to the csoundapi~ object could be:
p1 p2 p3 p4 i1 0 3600 5 ^ | p4 is your function table!
This means you have to have a new "i1" event every time you want to change the function table. However this should not be a problem.
Please note that this is really a question about csound, not about PD. csoundapi~ IS csound, just running in PD, so the messages you send to csoundapi~ are csound score commands (f - function table, i - instrument event, t - tempo etc etc.)
Metastudio 3 for Pure Data - Free download at: http://sharktracks.co.uk/puredata
----- Original Message ---- From: ronni montoya ronni.montoya@gmail.com To: pd-list@iem.at Sent: Mon, 13 September, 2010 20:25:05 Subject: [PD] loading sound from pd into csoundapi
Hello everybody, im using csound with pd using csoundapi, Im not really a csound guy so i been mostly experimenting with csound codes made by other, like granular synthesis codes. If i want to send a parameter from pd to csound i just add this line in csound: gk3 invalue "grain_size"
I was wondering how can a do for loading sounds in csound from pd. i would like to have different options like sound1.wav, sound2.wav , sound3.wav. as pd messages and then just select from pd the sound i want to load into csound. Do anybody know can i do this in csound/pd?
This is my code in csound with the sound i would like to change from pd:
<CsScore> f1 0 0 1 "kukon.aif" 0 0 1 f2 0 1025 20 2 1
i1 0 3600
</CsScore>
thanks in advance
Ronni
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list