| Some time ago, I wrote an example of how to do this, which can be found in "examples/trapped.py". I just now tried it, and it still works fine.
Regards,
Mike
-----Original Message-----
>From: Tim Mortimer
>Sent: Oct 27, 2007 10:38 PM
>To: csound@lists.bath.ac.uk
>Subject: Re: [Csnd] batch processing / rendering CSDs using anything
>
>
>Thanks for your advice Oeyvind.
>
>i've tried various twists & slight variations on the code as i have seen in
>the various examples. none of them run sucessfully (if they do, they crash
>before exiting) & none produce any audio (either to .wav or realtime out)
>
>i have sucessfully run csound in python with separate orc & sco files
>however. (as per the koch example)
>
>i could redesign my program slightly & work from separate orc & sco files.
>in some ways that makes sense in terms of archiving work (just save
>generated sco's with one generic set of orc's per composition)
>
>but the idea of having a bunch of csd's that can be run individually, &
>batch processed at will is still i think a desirable outcome
>
>simply getting any embedded csd to run however is the first challenge.
>
>apologies for being a bit scatty with this. it's not getting a major amount
>of attention from me, as usual, i'm tackling several different issues at
>once (depending on what i feel like tackling on any given day)
>
>but if I have your attention oeyvind, then you have mine also.
>
>see if you can make this work below then (preferably outputting to .wav
>file)
>
>import csnd
>
>csound = csnd.CppSound()
>csound.setPythonMessageCallback()
>
>csound.setCSD('''
>
>
>
>
> ./temp.orc ./temp.sco
>
>
>
>
>sr = 48000
>ksmps = 64
>nchnls = 2
>
>0dbfs = 1
>
>gisine ftgen 100, 0, 16384, 10, 1
>
>instr 01
>
> asig oscili .5, p4, 100, 1
>
> outs asig asig
>
>endin
>
>
>
>
>
>
>
>
>i 1 0 4 440
>i 1 5 4 880
>
>e
>
>
>
>
>
>''')
>
>
>csound.exportForPerformance()
>csound.compile()
>while True:
> csound.performKsmps(True)
>csound.cleanup()
>
>
>--
>View this message in context: http://www.nabble.com/batch-processing---rendering-CSDs-using-Python-tf4675931.html#a13449563
>Sent from the Csound - General mailing list archive at Nabble.com.
>
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
|