[Csnd] Score finished in csoundPerformKsmps() with 2.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Score finished in csoundPerformKsmps() with 2.

fauveboy
without changing any code from a previously working program, when compiling again, I'm getting the error: Score finished in csoundPerformKsmps() with 2. when sending an event from pd.
what does this mean?

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Score finished in csoundPerformKsmps() with 2.

hlolli
One of many reasons, you sent e(end) event, you compiled CSD and the score finished. Or csound performance never got started when play/start was called and it ends immeadiately. If you are doing something realtime, make sure you have almost infinitive runtime of csound, (ie. e 0 99999999999)

On 26 January 2018 at 14:00, Joel Ramsbottom <[hidden email]> wrote:
without changing any code from a previously working program, when compiling again, I'm getting the error: Score finished in csoundPerformKsmps() with 2. when sending an event from pd.
what does this mean?

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Score finished in csoundPerformKsmps() with 2.

fauveboy
In reply to this post by fauveboy
the program works when I write the exact same score statement in the score, its only when it comes from pd? I'm sure im not sending an e event. and according to the pd log csound is still runnning as this error occurs?

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Score finished in csoundPerformKsmps() with 2.

Michael Gogins-2
Try f 0 360 immediately, even from the orc header. 

Regards, 
Mike

On Jan 26, 2018 8:25 AM, "Joel Ramsbottom" <[hidden email]> wrote:
the program works when I write the exact same score statement in the score, its only when it comes from pd? I'm sure im not sending an e event. and according to the pd log csound is still runnning as this error occurs?

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Score finished in csoundPerformKsmps() with 2.

fauveboy
In reply to this post by fauveboy
Okay, i've put it in the score and it now seems happy? Why did it work without it for a while then all of a sudden not and whats f0 360 doing now to make the program work?

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Score finished in csoundPerformKsmps() with 2.

Michael Gogins-2
f 0 360 tells Csound to run, no matter what, for 360 beats which by
default is 360 seconds or one hour.

What changed, I am not sure. I suspect it was something to do with
changing the API behavior of csoundCompile, csoundStart,
csoundPerform. I observed the same changing behavior myself. I think I
understand the current behavior pretty well. It is documented in the
comments in csound.h as follows (corrections welcome):

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:
 *
 * \subsection s1 Score Mode
 *
 * \li The <CsOptions> section of the CSD file is processed.
 *
 * \li Either csoundStart must be called after csoundCompileCsd or
csoundReadScore,
 *     or csoundReadScore must be called before csoundCompile.
 *
 * \li The score is pre-processed, and events are dispatched as regular score
 *     events. "f", "s", and "e" events are permitted in the score.
 *
 * \code
 * #include "csound.h"
 *
 * const char *csd_text = "blah blah blah";
 *
 * int main(int argc, char **argv)
 * {
 *   void *csound = csoundCreate(0);
 *   int result = csoundCompileCsdText(csound, csd_text);
 *   result = csoundStart(csound);
 *   while (1) {
 *      result = csoundPerformKsmps(csound);
 *      if (result != 0) {
 *         break;
 *      }
 *   }
 *   result = csoundCleanup(csound);
 *   csoundReset(csound);
 *   csoundDestroy(csound);
 *   return result;
 * }
 * \endcode
 *
 * \subsection s2 Live Mode
 *
 * \li The <CsOptions> section of the CSD file not processed; options must
 *     be set by calling csoundSetOption.
 *
 * \li csoundStart must be called before csoundCompileCsd or csoundReadScore.
 *
 * \li The score is not pre-processed, and events are dispatched as real-time
 *     events. "f", "s", and "e" events are not permitted.
 *
 * \code
 * #include "csound.h"
 *
 * const char *orc_text = "blah blah blah";
 * const char *sco_text = "blah blah blah";
 *
 * int main(int argc, char **argv)
 * {
 *   void *csound = csoundCreate(0);
 *   int result = csoundSetOption(csound, "-d");
 *   result = csoundSetOption(csound, "-odac");
 *   result = csoundStart(csound);
 *   result = csoundCompileOrc(csound, orc_text);
 *   result = csoundReadScore(csound, sco_text);
 *   while (1) {
 *      result = csoundPerformKsmps(csound);
 *      if (result != 0) {
 *         break;
 *      }
 *   }
 *   result = csoundCleanup(csound);
 *   csoundReset(csound);
 *   csoundDestroy(csound);
 *   return result;
 * }
 * \endcode

 *

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jan 26, 2018 at 9:01 AM, Joel Ramsbottom
<[hidden email]> wrote:
> Okay, i've put it in the score and it now seems happy? Why did it work without it for a while then all of a sudden not and whats f0 360 doing now to make the program work?
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here