Csound Csound-dev Csound-tekno Search About

[Csnd-dev] inconsistency for schedule non-existing instruments

Date2019-04-17 19:56
Fromjoachim heintz
Subject[Csnd-dev] inconsistency for schedule non-existing instruments
for this wrong call (A):
   instr 1
   endin
   schedule(2,0,0)

i get:
   INIT ERROR in instr 0 line 17: event_i: error creating 'i' event
    from file /home/jh/Desktop/test2.csd (1)
	  schedule	2	0	0	
   header init errors
and csound stops.

but for this wrong call (B):
   instr No
   endin
   schedule "Yes", 0, 0

i get nothing, not even a warning.


in my opinion, in both cases a warning (not an error) should be thrown.
i think it should be up to the user to call an instrument which does not 
exist (this can happen in real-time situations / live coding) without 
stopping csound by this.

what do you think?

Date2019-04-18 15:35
Fromjohn
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
The error in case A looks sound to me, but I can see why you might want a 
softer error.  Not sure how to do tat at present.

In case B it looksas if the code is not correct; again not my expertese 
but it seems to confuse the numeric case with the string.  I think this is 
Victor's code?

MMRuning wi -v I get a message
WARNING: instr Yes not found
which seems what you want

I will carry on looking

==John ff

On Wed, 17 Apr 2019, joachim heintz wrote:

> for this wrong call (A):
>  instr 1
>  endin
>  schedule(2,0,0)
>
> i get:
>  INIT ERROR in instr 0 line 17: event_i: error creating 'i' event
>   from file /home/jh/Desktop/test2.csd (1)
> 	  schedule	2	0	0
>  header init errors
> and csound stops.
>
> but for this wrong call (B):
>  instr No
>  endin
>  schedule "Yes", 0, 0
>
> i get nothing, not even a warning.
>
>
> in my opinion, in both cases a warning (not an error) should be thrown.
> i think it should be up to the user to call an instrument which does not 
> exist (this can happen in real-time situations / live coding) without 
> stopping csound by this.
>
> what do you think?
>
> 	joachim

Date2019-04-18 15:56
Fromjohn
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
In case B te only problem is the suppression of the warning message.  I 
have a simple pach to ensure it is printed.

The silnce otherwise is because `witout a score it runs for ever expecting 
something to apen.


case A is harder.  I canot see why the error stops it all.  Back to the 
sources.

==J

On Wed, 17 Apr 2019, joachim heintz wrote:

> for this wrong call (A):
>  instr 1
>  endin
>  schedule(2,0,0)
>
> i get:
>  INIT ERROR in instr 0 line 17: event_i: error creating 'i' event
>   from file /home/jh/Desktop/test2.csd (1)
> 	  schedule	2	0	0
>  header init errors
> and csound stops.
>
> but for this wrong call (B):
>  instr No
>  endin
>  schedule "Yes", 0, 0
>
> i get nothing, not even a warning.
>
>
> in my opinion, in both cases a warning (not an error) should be thrown.
> i think it should be up to the user to call an instrument which does not 
> exist (this can happen in real-time situations / live coding) without 
> stopping csound by this.
>
> what do you think?
>
> 	joachim

Date2019-04-18 16:16
Fromjohn
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
Fix comitted to github.

Date2019-04-18 19:58
Fromjoachim heintz
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
thanks john!  for me it works now as desired.
best -
	joachim



On 18/04/19 17:16, john wrote:
> Fix comitted to github.
> Would be pleased it developers reviewed the code

Date2019-04-22 20:04
Fromjoachim heintz
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
i cannot any more stop instruments with a negative p1:

instr 1
out poscil:a(0dbfs/10,400)
endin
schedule(1,0,-1)
schedule(-1,1,1)

does not stop for me instr 1 after 1 second.
can this be related to your change?

	joachim



On 18/04/19 17:16, john wrote:
> Fix comitted to github.
> Would be pleased it developers reviewed the code

Date2019-04-22 20:50
Fromjohn
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
Quite possibly but I thought the change just ensured that the warning 
message was given.  Naturally will take a look as soon  as I can


On Mon, 22 Apr 2019, joachim heintz wrote:

> i cannot any more stop instruments with a negative p1:
>
> instr 1
> out poscil:a(0dbfs/10,400)
> endin
> schedule(1,0,-1)
> schedule(-1,1,1)
>
> does not stop for me instr 1 after 1 second.
> can this be related to your change?
>
> 	joachim
>
>
>
> On 18/04/19 17:16, john wrote:
>> Fix comitted to github.
>> Would be pleased it developers reviewed the code
>> 

Date2019-04-22 20:54
Fromjohn
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
Did you get the warmnng I get
WARNING: Cannot Find Instrument -1
?

On Mon, 22 Apr 2019, joachim heintz wrote:

> i cannot any more stop instruments with a negative p1:
>
> instr 1
> out poscil:a(0dbfs/10,400)
> endin
> schedule(1,0,-1)
> schedule(-1,1,1)
>
> does not stop for me instr 1 after 1 second.
> can this be related to your change?
>
> 	joachim
>
>
>
> On 18/04/19 17:16, john wrote:
>> Fix comitted to github.
>> Would be pleased it developers reviewed the code
>> 

Date2019-04-22 21:01
Fromjohn
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
Patch committed


On Mon, 22 Apr 2019, joachim heintz wrote:

> i cannot any more stop instruments with a negative p1:
>
> instr 1
> out poscil:a(0dbfs/10,400)
> endin
> schedule(1,0,-1)
> schedule(-1,1,1)
>
> does not stop for me instr 1 after 1 second.
> can this be related to your change?
>
> 	joachim
>
>
>
> On 18/04/19 17:16, john wrote:
>> Fix comitted to github.
>> Would be pleased it developers reviewed the code
>> 

Date2019-04-23 10:29
Fromjoachim heintz
SubjectRe: [Csnd-dev] inconsistency for schedule non-existing instruments
yes works now again.
thanks -
	j



On 22/04/19 22:01, john wrote:
> Patch committed
>
>
> On Mon, 22 Apr 2019, joachim heintz wrote:
>
>> i cannot any more stop instruments with a negative p1:
>>
>> instr 1
>> out poscil:a(0dbfs/10,400)
>> endin
>> schedule(1,0,-1)
>> schedule(-1,1,1)
>>
>> does not stop for me instr 1 after 1 second.
>> can this be related to your change?
>>
>>     joachim
>>
>>
>>
>> On 18/04/19 17:16, john wrote:
>>> Fix comitted to github.
>>> Would be pleased it developers reviewed the code
>>>
>>