[Cs-dev] Csound score ending problem
Date | 2014-01-25 16:08 |
From | Michael Gogins |
Subject | [Cs-dev] Csound score ending problem |
Attachments | None None |
I generate my pieces within a Csound performance using the Lua opcodes, specifically, lua_exec which obtains the Csound instance, generates score events, and sends them to Csound using the API. This all works great and keeps all parts of each piece in one csd file. I work this way so that I can do algorithmic composition in CsoundQt and be able to fine-tune my orchestra using GUI widgets.
Please note, part of the picture here is that the orchestra contains alwayson instruments. If I send a bunch of notes to Csound using csoundScoreEvent, without any 'f 0', 's', or 'e' events, then they all get played, but Csound never stops. f I send an 'e' or 's' score event after all the other events with no matter what duration, performance ends instantly and none of the other scheduled events including all the notes that were supposed to be played are played. Csound just quits.
If I send an 'f 0 999' event with no matter what duration before any of the notes, then performance never ends. What should I do? Or is there a bug here? Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com |
Date | 2014-02-04 14:33 |
From | Steven Yi |
Subject | Re: [Cs-dev] Csound score ending problem |
Hi Michael, I think this depends on how you are running things. Are you compiling the orchestra, then running, then sending score, or compiling both orc and score then starting the run? I think the Csound 6 behavior is that if it is started without any pre-defined score, it will set to run indefinitely until explicitly turned off. Any score events after that goes through the same mechanism as line events; it'd make sense then that 'e' at any time after that would immediately end the score, as it's been that way with line events for a long time. Also, I think there is a difference if it is compiling a score for the first time and any time after. If you're generating a score and want to send it to Csound before rendering, I think it's best to collect it all together into a single string and send it in one go. AFAIK, any score after the first one given is treated like a realtime score. Hope that makes sense; someone else please correct me if incorrect. Thanks, steven On Sat, Jan 25, 2014 at 11:08 AM, Michael Gogins |
Date | 2014-02-04 14:56 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Csound score ending problem |
Attachments | None None |
I am compiling the orchestra, then running, then sending the score. I will try sending one string. For now, I am putting one f 0 statement into the score with the correct duration, then sending the rest of the score from Lua code in the orchestra header. This works but I would prefer not to have to keep an eye on that f 0 statement.
We also could introduce a new score opcode for this use case, but I am probably the only person who does things this way.
The reason I work this is way is that want to use a higher-level language (specifically, LuaJIT) for score generation, but I also want to use CsoundQt because it greatly simplifies creating a GUI for orchestra control. I increasingly find such a GUI to be an essential part of composing.
Thanks, Mike
----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Feb 4, 2014 at 9:33 AM, Steven Yi <stevenyi@gmail.com> wrote: Hi Michael, |
Date | 2014-02-05 02:29 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Csound score ending problem |
Attachments | None None |
I tried sending the score all in one string. It played fine, but did not end, not even with an e statement at the end of the score. I'm not going to mess with this any more. I can just put in the f statement and be done with it.
Thanks, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Feb 4, 2014 at 9:56 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2014-02-05 02:52 |
From | Steven Yi |
Subject | Re: [Cs-dev] Csound score ending problem |
I just tried the Lua example3.lua from the Csound API Examples project. It uses a ReadScore, does not use 'e', and ends correctly. https://github.com/kunstmusik/csoundAPI_examples/blob/master/lua/example3.lua Maybe there is some other issue. Do you have code that shows the problem? steven On Tue, Feb 4, 2014 at 9:29 PM, Michael Gogins |
Date | 2014-02-05 03:17 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Csound score ending problem |
Attachments | None None |
I looked at the example. My case is different, I am using lua code that runs inside the Csound Orchestra. I.e the example runs csound from lua, my code runs lua from csound. I will send you the code later. Best, On Feb 4, 2014 9:53 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
I just tried the Lua example3.lua from the Csound API Examples |