[Csnd-dev] Confused about 'e' events and csoundReadScore in API
Date | 2017-06-21 23:41 |
From | Ed Costello |
Subject | [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
When I use the csoundReadScore function and input a score such as “i1 0 1 \n e”, no score is read at all and my program exits straight away, are you not allowed use “e” statements with this function? My program is this:
The csd I’m using is this: Thanks Ed |
Date | 2017-06-21 23:45 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
No, e in RT events without any parameters means exit Csound now. In a compiled score, it means that too, but it is in effect at the end of all events.
Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2017-06-21 23:53 |
From | Ed Costello |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
Oh right, that makes sense, is there a way of ending a performance automatically once all the score events have been processed using csoundReadScore and csoundPerform like the way “e” works from a score inside a csd or score file? Ed
|
Date | 2017-06-21 23:59 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
Use
e 0 time
where time is the end time in secs from
now. You can also just send an event
with "e" at the time you want to stop
csound.
Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2017-06-22 00:07 |
From | Ed Costello |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
I tried using csoundReadScore(csound, "i1 0 1\n e 0 10”), and the program just ended without performing any score, is that unexpected? I can’t use the other option of sending the e event when the time has passed because I want to dynamically create a score for writing audio files. Ed
|
Date | 2017-06-22 02:54 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
Create a CSD not an ORC and then you can have a non real-time performance. For a better explanation see the explanation in the Csound API reference (Git head version, not the online version). I excerpt it below. The Csound API defines two modes of operation for hosts. In the first mode, a regular Csound score is performed and then performance automatically ends. This could be called "score mode." In the second mode, Csound continues to perform indefinitely until performance is explicitly ended by calling csoundStop. This could be called "live mode." Which mode is used is determined by when csoundStart is called. In more detail: Score Mode The |
Date | 2017-06-22 17:50 |
From | Ed Costello |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
Oh right, I wasn’t aware that there were two operational modes, Thanks Ed > On 22 Jun 2017, at 02:54, Michael Gogins |
Date | 2017-06-22 18:58 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] Confused about 'e' events and csoundReadScore in API |
If you call readScore before csoundCompileOrc, then the score should be in 'score' mode (ie not RT events) Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 22 Jun 2017, at 17:50, Ed Costello |