[Csnd] CSound API faster than rendering?
Date | 2011-12-23 21:09 |
From | zappfinger |
Subject | [Csnd] CSound API faster than rendering? |
I was wondering: is the Csound API faster than rendering a csd file? Richard -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098074.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:16 |
From | Victor Lazzarini |
Subject | Re: [Csnd] CSound API faster than rendering? |
Not sure I understand the question. On 23 Dec 2011, at 21:09, zappfinger wrote: > I was wondering: is the Csound API faster than rendering a csd file? > > Richard > > -- > View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098074.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:20 |
From | zappfinger |
Subject | [Csnd] Re: CSound API faster than rendering? |
Ok, suppose I want to play a csd file. Now I use the normal command line option to do that. With Python like this: os.system('csound %s' % ('ESMSx.csd')) It takes a while before I hear the result because of the rendering (or compiling) that csound does. If I would use the API, does that speed up the process? -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098095.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:34 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
Well, with the API you can compile beforehand and then when you start rendering, it's immediate. Like this cs = csnd.Csound() cs.Compile( ... ) # csound is now compiled. cs.Perform() # csound will start performing right away. Victor On 23 Dec 2011, at 21:20, zappfinger wrote: > Ok, suppose I want to play a csd file. Now I use the normal command line > option to do that. > With Python like this: > > os.system('csound %s' % ('ESMSx.csd')) > > It takes a while before I hear the result because of the rendering (or > compiling) that csound does. > If I would use the API, does that speed up the process? > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098095.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:34 |
From | zappfinger |
Subject | [Csnd] Re: CSound API faster than rendering? |
Yes! This is very useful....thanks! Richard -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098114.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:38 |
From | Iain Duncan |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
Victor, does csoundCompile do anything with the score? IE in a host environment, does one need to recompile if the sco is changed or only the orc? thanks Iain
On Fri, Dec 23, 2011 at 1:34 PM, zappfinger <zappfinger@gmail.com> wrote: Yes! This is very useful....thanks! |
Date | 2011-12-23 21:43 |
From | Kelly Hirai |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
can you cache the compiled orc and serialize it for later retrieval? k. On 12/23/11 16:34, Victor Lazzarini wrote: > Well, with the API you can compile beforehand and then when you start rendering, it's immediate. Like this > > cs = csnd.Csound() > > cs.Compile( ... ) > > # csound is now compiled. > > cs.Perform() > > # csound will start performing right away. > > Victor > > On 23 Dec 2011, at 21:20, zappfinger wrote: > >> Ok, suppose I want to play a csd file. Now I use the normal command line >> option to do that. >> With Python like this: >> >> os.system('csound %s' % ('ESMSx.csd')) >> >> It takes a while before I hear the result because of the rendering (or >> compiling) that csound does. >> If I would use the API, does that speed up the process? >> >> >> >> -- >> View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098095.html >> Sent from the Csound - General mailing list archive at Nabble.com. >> >> >> Send bugs reports to the Sourceforge bug tracker >> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >> Discussions of bugs and features can be posted here >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >> > Dr Victor Lazzarini > Senior Lecturer > Dept. of Music > NUI Maynooth Ireland > tel.: +353 1 708 3545 > Victor dot Lazzarini AT nuim dot ie > > > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:49 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
Again, it depends on how you go about this. Compilation will do the sort etc operations on the score. However with a compiled orchestra, you can just send score events at any time and Csound will respond to them. So, I guess the answer is no (unless you want Csound to apply sort, carry etc, but these operations can be done by a host if necessary). Victor On 23 Dec 2011, at 21:38, Iain Duncan wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2011-12-23 21:50 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
Not yet, but this kind of thing is in our roadmap. Victor On 23 Dec 2011, at 21:43, Kelly Hirai wrote: > can you cache the compiled orc and serialize it for later retrieval? > k. > > On 12/23/11 16:34, Victor Lazzarini wrote: >> Well, with the API you can compile beforehand and then when you start rendering, it's immediate. Like this >> >> cs = csnd.Csound() >> >> cs.Compile( ... ) >> >> # csound is now compiled. >> >> cs.Perform() >> >> # csound will start performing right away. >> >> Victor >> >> On 23 Dec 2011, at 21:20, zappfinger wrote: >> >>> Ok, suppose I want to play a csd file. Now I use the normal command line >>> option to do that. >>> With Python like this: >>> >>> os.system('csound %s' % ('ESMSx.csd')) >>> >>> It takes a while before I hear the result because of the rendering (or >>> compiling) that csound does. >>> If I would use the API, does that speed up the process? >>> >>> >>> >>> -- >>> View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098095.html >>> Sent from the Csound - General mailing list archive at Nabble.com. >>> >>> >>> Send bugs reports to the Sourceforge bug tracker >>> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >>> Discussions of bugs and features can be posted here >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >>> >> Dr Victor Lazzarini >> Senior Lecturer >> Dept. of Music >> NUI Maynooth Ireland >> tel.: +353 1 708 3545 >> Victor dot Lazzarini AT nuim dot ie >> >> >> >> >> >> Send bugs reports to the Sourceforge bug tracker >> https://sourceforge.net/tracker/?group_id=81968&atid=564599 >> Discussions of bugs and features can be posted here >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >> > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 21:55 |
From | Iain Duncan |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
So do I understand correctly that if score parsing and passing was being handled entirely by the host, one could theoretically recompile csounds in separate threads to allow swapping in new orcs on the fly? I'm intending one csound instance per channel for what I'm doing. It would be awesome if there was away to update one channels orc while playing, even if that instrument dropped out for a note while doing so. thanks Iain On Fri, Dec 23, 2011 at 1:50 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: Not yet, but this kind of thing is in our roadmap. |
Date | 2011-12-23 22:02 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
yes, that should be no problem. Victor On 23 Dec 2011, at 21:55, Iain Duncan wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2011-12-23 22:14 |
From | zappfinger |
Subject | [Csnd] Re: CSound API faster than rendering? |
Where can I find a good overview of the Python Csound API? I have found bits and examples, but no complete manual... -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098179.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 22:29 |
From | Iain Duncan |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
Wicked cool! =)))) iain On Fri, Dec 23, 2011 at 2:02 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2011-12-23 22:37 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
There are some articles in the journal: http://www.csounds.com/journal/articleIndex.html and rory's text: http://www.csounds.com/articles/RoryWalsh_CsoundAPI.pdf On 23 Dec 2011, at 22:14, zappfinger wrote: > Where can I find a good overview of the Python Csound API? > I have found bits and examples, but no complete manual... > > -- > View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098179.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 22:42 |
From | zappfinger |
Subject | [Csnd] Re: CSound API faster than rendering? |
Victor, When I try the example (more or less) from your paper on Scripting Csound 5, like this: cs = csnd.csoundCreate(None); csnd.csoundCompile(cs, 2, ['csound', 'trumpet.csd']) while result == 0: result = csoundPerformKsmps(cs) csnd.csoundReset(cs) I get the following error: csnd.csoundCompile(cs, 2, ['csound', 'trumpet.csd']) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/csnd.py", line 454, in csoundCompile return _csnd.csoundCompile(*args) TypeError: in method 'csoundCompile', argument 3 of type 'char **' logout Any idea? Richard -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098213.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 22:57 |
From | zappfinger |
Subject | [Csnd] Re: CSound API faster than rendering? |
I found the answer in the forum. -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098232.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 23:02 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Re: CSound API faster than rendering? |
yes, this has changed since (I think the article was pre-Csound5 official release). You do this now: ... argvlist = csnd.CsoundArgVList() argvlist.Append('csound') argvlist.Append('trumpet.csd') csnd.csoundCompile(cs, argvlist.argc(), argvlist.argv()) ... Victor On 23 Dec 2011, at 22:42, zappfinger wrote: > Victor, > > When I try the example (more or less) from your paper on Scripting Csound 5, > like this: > > cs = csnd.csoundCreate(None); > csnd.csoundCompile(cs, 2, ['csound', 'trumpet.csd']) > while result == 0: > result = csoundPerformKsmps(cs) > csnd.csoundReset(cs) > > I get the following error: > > > csnd.csoundCompile(cs, 2, ['csound', 'trumpet.csd']) > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/csnd.py", > line 454, in csoundCompile > return _csnd.csoundCompile(*args) > TypeError: in method 'csoundCompile', argument 3 of type 'char **' > logout > > Any idea? > > Richard > > -- > View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098213.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-23 23:22 |
From | zappfinger |
Subject | [Csnd] Re: CSound API faster than rendering? |
Ok, to make it complete, this is what worked for me: cs = csnd.csoundCreate(None); argvlist = csnd.CsoundArgVList() argvlist.Append('csound') argvlist.Append('trumpet.csd') csnd.csoundCompile(cs, argvlist.argc(), argvlist.argv()) csnd.csoundPerform(cs) csnd.csoundReset(cs) Richard -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-API-faster-than-rendering-tp5098074p5098261.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |