[Csnd-dev] invalid schedule turns off an instance

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

[Csnd-dev] invalid schedule turns off an instance

joachim-3
in the follwoing code, the turnoff2 in instrument "Stop" is not
executed, because the
        schedule "Bla", 0, 1
refers to a non existing instrument:

nchnls = 2
0dbfs = 1

instr Sine
  aSin poscil .2, 400
  out aSin, aSin
endin
schedule "Sine", 0, 100

instr Stop
  schedule "Bla", 0, 1
  turnoff2 "Sine", 0, 0 ;not executed
endin
schedule "Stop", 1, 1


i think that csound should throw a waring (as it does currently, too),
but nevertheless execute the rest of the code.

is this an error, or is there a reasoon to remove the instance when an
invalid score event takes place?

        joachim
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] invalid schedule turns off an instance

jpff
Are you asking for a special case in schedule to give a warning ony and
not an error, or are wanting all opcodes to just warn when they fail?

My instinct is to say this is a bad idea


On Mon, 24 Sep 2018, joachim heintz wrote:

> in the follwoing code, the turnoff2 in instrument "Stop" is not executed,
> because the
> schedule "Bla", 0, 1
> refers to a non existing instrument:
>
> nchnls = 2
> 0dbfs = 1
>
> instr Sine
> aSin poscil .2, 400
> out aSin, aSin
> endin
> schedule "Sine", 0, 100
>
> instr Stop
> schedule "Bla", 0, 1
> turnoff2 "Sine", 0, 0 ;not executed
> endin
> schedule "Stop", 1, 1
>
>
> i think that csound should throw a waring (as it does currently, too), but
> nevertheless execute the rest of the code.
>
> is this an error, or is there a reasoon to remove the instance when an
> invalid score event takes place?
>
> joachim
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] invalid schedule turns off an instance

joachim-3
actually csound is not reporting an error in this case.  instead:

        new alloc for instr Stop:
        WARNING: instr Bla not found

so csound here reports a warning but behaves as error.  this looks like
inconsistency.

in my personal opinion, in the case of schedule / event a warning would
be good (= not killing the instrument instance) if the called instrument
is not found, but i don't have the overview about consequences.

        j



On 24/09/18 14:01, jpff wrote:

> Are you asking for a special case in schedule to give a warning ony and
> not an error, or are wanting all opcodes to just warn when they fail?
>
> My instinct is to say this is a bad idea
>
>
> On Mon, 24 Sep 2018, joachim heintz wrote:
>
>> in the follwoing code, the turnoff2 in instrument "Stop" is not
>> executed, because the
>>     schedule "Bla", 0, 1
>> refers to a non existing instrument:
>>
>> nchnls = 2
>> 0dbfs = 1
>>
>> instr Sine
>> aSin poscil .2, 400
>> out aSin, aSin
>> endin
>> schedule "Sine", 0, 100
>>
>> instr Stop
>> schedule "Bla", 0, 1
>> turnoff2 "Sine", 0, 0 ;not executed
>> endin
>> schedule "Stop", 1, 1
>>
>>
>> i think that csound should throw a waring (as it does currently, too),
>> but nevertheless execute the rest of the code.
>>
>> is this an error, or is there a reasoon to remove the instance when an
>> invalid score event takes place?
>>
>>     joachim
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] invalid schedule turns off an instance

jpff
yActually the warning is from schedule but the error in in event.  More
later