[Csnd-dev] negative p1 with named instrument

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

Re: [Csnd-dev] negative p1 with named instrument

jpff
Harder but possible.  Too late to start that today I think, but modifying
named_inst_find to do that and then finding the use points.....  maybe
tomorrow.

On Thu, 30 Mar 2017, Steven Yi wrote:

> I suppose this feature would also touch upon the issue of fractional
> named instruments too...   perhaps a i "-sound.1" would be next
> logical thing?
>
> On Thu, Mar 30, 2017 at 7:55 AM, jpff <[hidden email]> wrote:
>> i "-sound" 1 0
>>
>>
>>
>> On Thu, 30 Mar 2017, Tarmo Johannes wrote:
>>
>>> Hi,
>>>
>>> Thanks!
>>>
>>> I guess you did not push yet?
>>> I tried
>>>
>>> i -"sound" 1 0
>>>
>>> but no effect yet.
>>>
>>>
>>> tarmo
>>>
>>>
>>> 2017-03-30 12:59 GMT+03:00 John ff <[hidden email]>:
>>>       Oh well; the i "-foo" syntax is working now.  Will look at a d
>>>       opcode.
>>>
>>> Sent from TypeApp
>>> On 30 Mar 2017, at 08:06, Tarmo Johannes <[hidden email]> wrote:
>>>       Hi,
>>> I personally like the d (denote) syntax idea - much clearer for
>>> the user than
>>> i -instrumentname
>>> provided, it will work scoreline, event, inputaMessage etc.
>>>
>>> Tarmo
>>>
>>> 30.03.2017 8:30 kirjutas kuupäeval "Victor Lazzarini" <
>>> [hidden email]>:
>>>       Just as before. For numbered instruments, it's
>>>       syntatic sugar, for named instruments, it addresses a
>>>       shortcoming.
>>>
>>>       Victor Lazzarini
>>>       Dean of Arts, Celtic Studies, and Philosophy
>>>       Maynooth University
>>>       Ireland
>>>
>>>      > On 30 Mar 2017, at 00:03, Steven Yi <
>>>       [hidden email]> wrote:
>>>      >
>>>      > My gut instinct is that I'd rather see the i opcode
>>>       enhanced rather
>>>      > than introduce a new d score opcode introduced.
>>>       Also, how would this
>>>      > interact with schedule and event orc opcodes?
>>>      >
>>>      >> On Wed, Mar 29, 2017 at 6:37 PM, John ff <
>>>       [hidden email]> wrote:
>>>      >> Without double quotes there are no real problems.
>>>       A d opcode is possible.
>>>      >>
>>>      >> Sent from TypeApp
>>>      >>> On 29 Mar 2017, at 21:33, Victor Lazzarini <
>>>       [hidden email]> wrote:
>>>      >>>
>>>      >>> could we make double quotes in p1 optional? I mean
>>>      >>>
>>>      >>> i piano1 0 10
>>>      >>>
>>>      >>> or even in this case, make the i opcode optional?
>>>      >>>
>>>      >>> piano1  0 10
>>>      >>>
>>>      >>> same as
>>>      >>>
>>>      >>> "piano1" 0 10
>>>      >>>
>>>      >>> or
>>>      >>>
>>>      >>> i "piano1"  0 10
>>>      >>>
>>>      >>> the semantics do not look ambiguous to me.
>>>      >>>
>>>      >>> Victor Lazzarini
>>>      >>> Dean of Arts, Celtic Studies, and Philosophy
>>>      >>> Maynooth University
>>>      >>> Ireland
>>>      >>>
>>>      >>> On 29 Mar 2017, at 21:17, John ff <
>>>       [hidden email]> wrote:
>>>      >>>
>>>      >>> Partially working, but domestic duties mean it
>>>       will have to wait a while.
>>>      >>>
>>>      >>> Sent from TypeApp
>>>      >>>> On 29 Mar 2017, at 14:09, Tarmo Johannes <
>>>       [hidden email]> wrote:
>>>      >>>>
>>>      >>>> John,
>>>      >>>> What do you think, is it easy to implement?
>>>      >>>> Of course this is not q high priority thing...
>>>      >>>> Tarmo
>>>      >>>>
>>>      >>>> 29.03.2017 13:04 kirjutas kuupäeval "Victor
>>>       Lazzarini" <
>>>      >>>> [hidden email]>:
>>>      >>>>>
>>>      >>>>> At the moment no, you can’t do that, as far as I
>>>       know.
>>>      >>>>> ========================
>>>      >>>>> Prof. Victor Lazzarini
>>>      >>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>      >>>>> Maynooth University,
>>>      >>>>> Maynooth, Co Kildare, Ireland
>>>      >>>>> Tel: 00 353 7086936
>>>      >>>>> Fax: 00 353 1 7086952
>>>      >>>>>
>>>      >>>>>> On 29 Mar 2017, at 09:41, Tarmo Johannes <
>>>       [hidden email]> wrote:
>>>      >>>>>>
>>>      >>>>>> Hi,
>>>      >>>>>>
>>>      >>>>>> Would it be possible to have in the score
>>>       syntax where you can stop an
>>>      >>>>>> indefinte named instrument by adding '-' before
>>>       the instrument name?
>>>      >>>>>>
>>>      >>>>>> Like
>>>      >>>>>>
>>>      >>>>>> i "sound" 0 -1
>>>      >>>>>> i  -"sound" 1 0
>>>      >>>>>>
>>>      >>>>>> Does not work like that right now,
>>>      >>>>>>
>>>      >>>>>> i -1 1 0 works as expected.
>>>      >>>>>>
>>>      >>>>>> The full testing csd:
>>>      >>>>>>
>>>      >>>>>> ---
>>>      >>>>>> <CsoundSynthesizer>
>>>      >>>>>> <CsOptions>
>>>      >>>>>> -odac -d
>>>      >>>>>> </CsOptions>
>>>      >>>>>> <CsInstruments>
>>>      >>>>>>
>>>      >>>>>> sr = 44100
>>>      >>>>>> ksmps = 32
>>>      >>>>>> nchnls = 2
>>>      >>>>>> 0dbfs = 1
>>>      >>>>>>
>>>      >>>>>> instr sound
>>>      >>>>>>      out poscil(0.1,500)
>>>      >>>>>>      ksec init 0
>>>      >>>>>>      if (metro(1)==1) then
>>>      >>>>>>              printk2 ksec
>>>      >>>>>>              ksec += 1
>>>      >>>>>>      endif
>>>      >>>>>> endin
>>>      >>>>>>
>>>      >>>>>> </CsInstruments>
>>>      >>>>>> <CsScore>
>>>      >>>>>> f 0 5
>>>      >>>>>> i "sound" 0 -1
>>>      >>>>>> i -"sound" 1 0 ; does not work
>>>      >>>>>> i -1 4 0 ; works
>>>      >>>>>>
>>>      >>>>>> </CsScore>
>>>      >>>>>> </CsoundSynthesizer>
>>>      >>>>>>
>>>      >>>>>> ---
>>>      >>>>>>
>>>      >>>>>> Should I file an issue?
>>>      >>>>>>
>>>      >>>>>> Thanks!
>>>      >>>>>> tarmo
>>>      >>>>>
>>>      >>
>>>
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Tarmo Johannes-3
In reply to this post by jpff
Perfect!
Thanks a lot! this way I can solve one small problem in CsoundQt (using named instruments onder on/off event buttons)

tarmo

2017-03-30 14:55 GMT+03:00 jpff <[hidden email]>:
i "-sound" 1 0



On Thu, 30 Mar 2017, Tarmo Johannes wrote:

Hi,

Thanks!

I guess you did not push yet?
I tried

i -"sound" 1 0

but no effect yet.


tarmo


2017-03-30 12:59 GMT+03:00 John ff <[hidden email]>:
      Oh well; the i "-foo" syntax is working now.  Will look at a d
      opcode.

Sent from TypeApp
On 30 Mar 2017, at 08:06, Tarmo Johannes <[hidden email]> wrote:
      Hi,
I personally like the d (denote) syntax idea - much clearer for
the user than
i -instrumentname
provided, it will work scoreline, event, inputaMessage etc.

Tarmo

30.03.2017 8:30 kirjutas kuupäeval "Victor Lazzarini" <
[hidden email]>:
      Just as before. For numbered instruments, it's
      syntatic sugar, for named instruments, it addresses a
      shortcoming.

      Victor Lazzarini
      Dean of Arts, Celtic Studies, and Philosophy
      Maynooth University
      Ireland

      > On 30 Mar 2017, at 00:03, Steven Yi <
      [hidden email]> wrote:
      >
      > My gut instinct is that I'd rather see the i opcode
      enhanced rather
      > than introduce a new d score opcode introduced.
      Also, how would this
      > interact with schedule and event orc opcodes?
      >
      >> On Wed, Mar 29, 2017 at 6:37 PM, John ff <
      [hidden email]> wrote:
      >> Without double quotes there are no real problems. 
      A d opcode is possible.
      >>
      >> Sent from TypeApp
      >>> On 29 Mar 2017, at 21:33, Victor Lazzarini <
      [hidden email]> wrote:
      >>>
      >>> could we make double quotes in p1 optional? I mean
      >>>
      >>> i piano1 0 10
      >>>
      >>> or even in this case, make the i opcode optional?
      >>>
      >>> piano1  0 10
      >>>
      >>> same as
      >>>
      >>> "piano1" 0 10
      >>>
      >>> or
      >>>
      >>> i "piano1"  0 10
      >>>
      >>> the semantics do not look ambiguous to me.
      >>>
      >>> Victor Lazzarini
      >>> Dean of Arts, Celtic Studies, and Philosophy
      >>> Maynooth University
      >>> Ireland
      >>>
      >>> On 29 Mar 2017, at 21:17, John ff <
      [hidden email]> wrote:
      >>>
      >>> Partially working, but domestic duties mean it
      will have to wait a while.
      >>>
      >>> Sent from TypeApp
      >>>> On 29 Mar 2017, at 14:09, Tarmo Johannes <
      [hidden email]> wrote:
      >>>>
      >>>> John,
      >>>> What do you think, is it easy to implement?
      >>>> Of course this is not q high priority thing...
      >>>> Tarmo
      >>>>
      >>>> 29.03.2017 13:04 kirjutas kuupäeval "Victor
      Lazzarini" <
      >>>> [hidden email]>:
      >>>>>
      >>>>> At the moment no, you can’t do that, as far as I
      know.
      >>>>> ========================
      >>>>> Prof. Victor Lazzarini
      >>>>> Dean of Arts, Celtic Studies, and Philosophy,
      >>>>> Maynooth University,
      >>>>> Maynooth, Co Kildare, Ireland
      >>>>> Tel: 00 353 7086936
      >>>>> Fax: 00 353 1 7086952
      >>>>>
      >>>>>> On 29 Mar 2017, at 09:41, Tarmo Johannes <
      [hidden email]> wrote:
      >>>>>>
      >>>>>> Hi,
      >>>>>>
      >>>>>> Would it be possible to have in the score
      syntax where you can stop an
      >>>>>> indefinte named instrument by adding '-' before
      the instrument name?
      >>>>>>
      >>>>>> Like
      >>>>>>
      >>>>>> i "sound" 0 -1
      >>>>>> i  -"sound" 1 0
      >>>>>>
      >>>>>> Does not work like that right now,
      >>>>>>
      >>>>>> i -1 1 0 works as expected.
      >>>>>>
      >>>>>> The full testing csd:
      >>>>>>
      >>>>>> ---
      >>>>>> <CsoundSynthesizer>
      >>>>>> <CsOptions>
      >>>>>> -odac -d
      >>>>>> </CsOptions>
      >>>>>> <CsInstruments>
      >>>>>>
      >>>>>> sr = 44100
      >>>>>> ksmps = 32
      >>>>>> nchnls = 2
      >>>>>> 0dbfs = 1
      >>>>>>
      >>>>>> instr sound
      >>>>>>      out poscil(0.1,500)
      >>>>>>      ksec init 0
      >>>>>>      if (metro(1)==1) then
      >>>>>>              printk2 ksec
      >>>>>>              ksec += 1
      >>>>>>      endif
      >>>>>> endin
      >>>>>>
      >>>>>> </CsInstruments>
      >>>>>> <CsScore>
      >>>>>> f 0 5
      >>>>>> i "sound" 0 -1
      >>>>>> i -"sound" 1 0 ; does not work
      >>>>>> i -1 4 0 ; works
      >>>>>>
      >>>>>> </CsScore>
      >>>>>> </CsoundSynthesizer>
      >>>>>>
      >>>>>> ---
      >>>>>>
      >>>>>> Should I file an issue?
      >>>>>>
      >>>>>> Thanks!
      >>>>>> tarmo
      >>>>>
      >>




Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Tarmo Johannes-3
Hi,

I did some testing how it works in the context of orchestra and found out that it works withe event and schedule opcode, but not with scoreline and readscore. Also it fails with csoundInputEvent API call. A testikng csd is below.

I hope it is easy to fix!

tarmo
----

<CsoundSynthesizer>

<CsOptions>

-odac -d

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 32

nchnls = 2

0dbfs = 1


schedule "sound",0,-1


instr sound

out poscil(0.1,500)

ksec init 0

if (metro(1)==1) then

printk2 ksec

ksec += 1

endif

endin


; these fail:

ires readscore {{ i "-sound" 1 0 }}

scoreline_i {{ i "-sound" 2 0 }}


; these work:

schedule "-sound",3,0

schedule "sound",4,-1 ; restart sound

event_i "i", "-sound",5,0


</CsInstruments>

<CsScore>

f 0 7

</CsScore>

</CsoundSynthesizer>

-----













2017-03-30 21:28 GMT+03:00 Tarmo Johannes <[hidden email]>:
Perfect!
Thanks a lot! this way I can solve one small problem in CsoundQt (using named instruments onder on/off event buttons)

tarmo

2017-03-30 14:55 GMT+03:00 jpff <[hidden email]>:
i "-sound" 1 0



On Thu, 30 Mar 2017, Tarmo Johannes wrote:

Hi,

Thanks!

I guess you did not push yet?
I tried

i -"sound" 1 0

but no effect yet.


tarmo


2017-03-30 12:59 GMT+03:00 John ff <[hidden email]>:
      Oh well; the i "-foo" syntax is working now.  Will look at a d
      opcode.

Sent from TypeApp
On 30 Mar 2017, at 08:06, Tarmo Johannes <[hidden email]> wrote:
      Hi,
I personally like the d (denote) syntax idea - much clearer for
the user than
i -instrumentname
provided, it will work scoreline, event, inputaMessage etc.

Tarmo

30.03.2017 8:30 kirjutas kuupäeval "Victor Lazzarini" <
[hidden email]>:
      Just as before. For numbered instruments, it's
      syntatic sugar, for named instruments, it addresses a
      shortcoming.

      Victor Lazzarini
      Dean of Arts, Celtic Studies, and Philosophy
      Maynooth University
      Ireland

      > On 30 Mar 2017, at 00:03, Steven Yi <
      [hidden email]> wrote:
      >
      > My gut instinct is that I'd rather see the i opcode
      enhanced rather
      > than introduce a new d score opcode introduced.
      Also, how would this
      > interact with schedule and event orc opcodes?
      >
      >> On Wed, Mar 29, 2017 at 6:37 PM, John ff <
      [hidden email]> wrote:
      >> Without double quotes there are no real problems. 
      A d opcode is possible.
      >>
      >> Sent from TypeApp
      >>> On 29 Mar 2017, at 21:33, Victor Lazzarini <
      [hidden email]> wrote:
      >>>
      >>> could we make double quotes in p1 optional? I mean
      >>>
      >>> i piano1 0 10
      >>>
      >>> or even in this case, make the i opcode optional?
      >>>
      >>> piano1  0 10
      >>>
      >>> same as
      >>>
      >>> "piano1" 0 10
      >>>
      >>> or
      >>>
      >>> i "piano1"  0 10
      >>>
      >>> the semantics do not look ambiguous to me.
      >>>
      >>> Victor Lazzarini
      >>> Dean of Arts, Celtic Studies, and Philosophy
      >>> Maynooth University
      >>> Ireland
      >>>
      >>> On 29 Mar 2017, at 21:17, John ff <
      [hidden email]> wrote:
      >>>
      >>> Partially working, but domestic duties mean it
      will have to wait a while.
      >>>
      >>> Sent from TypeApp
      >>>> On 29 Mar 2017, at 14:09, Tarmo Johannes <
      [hidden email]> wrote:
      >>>>
      >>>> John,
      >>>> What do you think, is it easy to implement?
      >>>> Of course this is not q high priority thing...
      >>>> Tarmo
      >>>>
      >>>> 29.03.2017 13:04 kirjutas kuupäeval "Victor
      Lazzarini" <
      >>>> [hidden email]>:
      >>>>>
      >>>>> At the moment no, you can’t do that, as far as I
      know.
      >>>>> ========================
      >>>>> Prof. Victor Lazzarini
      >>>>> Dean of Arts, Celtic Studies, and Philosophy,
      >>>>> Maynooth University,
      >>>>> Maynooth, Co Kildare, Ireland
      >>>>> Tel: 00 353 7086936
      >>>>> Fax: 00 353 1 7086952
      >>>>>
      >>>>>> On 29 Mar 2017, at 09:41, Tarmo Johannes <
      [hidden email]> wrote:
      >>>>>>
      >>>>>> Hi,
      >>>>>>
      >>>>>> Would it be possible to have in the score
      syntax where you can stop an
      >>>>>> indefinte named instrument by adding '-' before
      the instrument name?
      >>>>>>
      >>>>>> Like
      >>>>>>
      >>>>>> i "sound" 0 -1
      >>>>>> i  -"sound" 1 0
      >>>>>>
      >>>>>> Does not work like that right now,
      >>>>>>
      >>>>>> i -1 1 0 works as expected.
      >>>>>>
      >>>>>> The full testing csd:
      >>>>>>
      >>>>>> ---
      >>>>>> <CsoundSynthesizer>
      >>>>>> <CsOptions>
      >>>>>> -odac -d
      >>>>>> </CsOptions>
      >>>>>> <CsInstruments>
      >>>>>>
      >>>>>> sr = 44100
      >>>>>> ksmps = 32
      >>>>>> nchnls = 2
      >>>>>> 0dbfs = 1
      >>>>>>
      >>>>>> instr sound
      >>>>>>      out poscil(0.1,500)
      >>>>>>      ksec init 0
      >>>>>>      if (metro(1)==1) then
      >>>>>>              printk2 ksec
      >>>>>>              ksec += 1
      >>>>>>      endif
      >>>>>> endin
      >>>>>>
      >>>>>> </CsInstruments>
      >>>>>> <CsScore>
      >>>>>> f 0 5
      >>>>>> i "sound" 0 -1
      >>>>>> i -"sound" 1 0 ; does not work
      >>>>>> i -1 4 0 ; works
      >>>>>>
      >>>>>> </CsScore>
      >>>>>> </CsoundSynthesizer>
      >>>>>>
      >>>>>> ---
      >>>>>>
      >>>>>> Should I file an issue?
      >>>>>>
      >>>>>> Thanks!
      >>>>>> tarmo
      >>>>>
      >>





Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Victor Lazzarini
scoreline and readscore use csoundInputEvent, so the issue is the same.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 31 Mar 2017, at 21:36, Tarmo Johannes <[hidden email]> wrote:

Hi,

I did some testing how it works in the context of orchestra and found out that it works withe event and schedule opcode, but not with scoreline and readscore. Also it fails with csoundInputEvent API call. A testikng csd is below.

I hope it is easy to fix!

tarmo
----

<CsoundSynthesizer>

<CsOptions>

-odac -d

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 32

nchnls = 2

0dbfs = 1


schedule "sound",0,-1


instr sound

out poscil(0.1,500)

ksec init 0

if (metro(1)==1) then

printk2 ksec

ksec += 1

endif

endin


; these fail:

ires readscore {{ i "-sound" 1 0 }}

scoreline_i {{ i "-sound" 2 0 }}


; these work:

schedule "-sound",3,0

schedule "sound",4,-1 ; restart sound

event_i "i", "-sound",5,0


</CsInstruments>

<CsScore>

f 0 7

</CsScore>

</CsoundSynthesizer>

-----













2017-03-30 21:28 GMT+03:00 Tarmo Johannes <[hidden email]>:
Perfect!
Thanks a lot! this way I can solve one small problem in CsoundQt (using named instruments onder on/off event buttons)

tarmo

2017-03-30 14:55 GMT+03:00 jpff <[hidden email]>:
i "-sound" 1 0



On Thu, 30 Mar 2017, Tarmo Johannes wrote:

Hi,

Thanks!

I guess you did not push yet?
I tried

i -"sound" 1 0

but no effect yet.


tarmo


2017-03-30 12:59 GMT+03:00 John ff <[hidden email]>:
      Oh well; the i "-foo" syntax is working now.  Will look at a d
      opcode.

Sent from TypeApp
On 30 Mar 2017, at 08:06, Tarmo Johannes <[hidden email]> wrote:
      Hi,
I personally like the d (denote) syntax idea - much clearer for
the user than
i -instrumentname
provided, it will work scoreline, event, inputaMessage etc.

Tarmo

30.03.2017 8:30 kirjutas kuupäeval "Victor Lazzarini" <
[hidden email]>:
      Just as before. For numbered instruments, it's
      syntatic sugar, for named instruments, it addresses a
      shortcoming.

      Victor Lazzarini
      Dean of Arts, Celtic Studies, and Philosophy
      Maynooth University
      Ireland

      > On 30 Mar 2017, at 00:03, Steven Yi <
      [hidden email]> wrote:
      >
      > My gut instinct is that I'd rather see the i opcode
      enhanced rather
      > than introduce a new d score opcode introduced.
      Also, how would this
      > interact with schedule and event orc opcodes?
      >
      >> On Wed, Mar 29, 2017 at 6:37 PM, John ff <
      [hidden email]> wrote:
      >> Without double quotes there are no real problems. 
      A d opcode is possible.
      >>
      >> Sent from TypeApp
      >>> On 29 Mar 2017, at 21:33, Victor Lazzarini <
      [hidden email]> wrote:
      >>>
      >>> could we make double quotes in p1 optional? I mean
      >>>
      >>> i piano1 0 10
      >>>
      >>> or even in this case, make the i opcode optional?
      >>>
      >>> piano1  0 10
      >>>
      >>> same as
      >>>
      >>> "piano1" 0 10
      >>>
      >>> or
      >>>
      >>> i "piano1"  0 10
      >>>
      >>> the semantics do not look ambiguous to me.
      >>>
      >>> Victor Lazzarini
      >>> Dean of Arts, Celtic Studies, and Philosophy
      >>> Maynooth University
      >>> Ireland
      >>>
      >>> On 29 Mar 2017, at 21:17, John ff <
      [hidden email]> wrote:
      >>>
      >>> Partially working, but domestic duties mean it
      will have to wait a while.
      >>>
      >>> Sent from TypeApp
      >>>> On 29 Mar 2017, at 14:09, Tarmo Johannes <
      [hidden email]> wrote:
      >>>>
      >>>> John,
      >>>> What do you think, is it easy to implement?
      >>>> Of course this is not q high priority thing...
      >>>> Tarmo
      >>>>
      >>>> 29.03.2017 13:04 kirjutas kuupäeval "Victor
      Lazzarini" <
      >>>> [hidden email]>:
      >>>>>
      >>>>> At the moment no, you can’t do that, as far as I
      know.
      >>>>> ========================
      >>>>> Prof. Victor Lazzarini
      >>>>> Dean of Arts, Celtic Studies, and Philosophy,
      >>>>> Maynooth University,
      >>>>> Maynooth, Co Kildare, Ireland
      >>>>> Tel: 00 353 7086936
      >>>>> Fax: 00 353 1 7086952
      >>>>>
      >>>>>> On 29 Mar 2017, at 09:41, Tarmo Johannes <
      [hidden email]> wrote:
      >>>>>>
      >>>>>> Hi,
      >>>>>>
      >>>>>> Would it be possible to have in the score
      syntax where you can stop an
      >>>>>> indefinte named instrument by adding '-' before
      the instrument name?
      >>>>>>
      >>>>>> Like
      >>>>>>
      >>>>>> i "sound" 0 -1
      >>>>>> i  -"sound" 1 0
      >>>>>>
      >>>>>> Does not work like that right now,
      >>>>>>
      >>>>>> i -1 1 0 works as expected.
      >>>>>>
      >>>>>> The full testing csd:
      >>>>>>
      >>>>>> ---
      >>>>>> <CsoundSynthesizer>
      >>>>>> <CsOptions>
      >>>>>> -odac -d
      >>>>>> </CsOptions>
      >>>>>> <CsInstruments>
      >>>>>>
      >>>>>> sr = 44100
      >>>>>> ksmps = 32
      >>>>>> nchnls = 2
      >>>>>> 0dbfs = 1
      >>>>>>
      >>>>>> instr sound
      >>>>>>      out poscil(0.1,500)
      >>>>>>      ksec init 0
      >>>>>>      if (metro(1)==1) then
      >>>>>>              printk2 ksec
      >>>>>>              ksec += 1
      >>>>>>      endif
      >>>>>> endin
      >>>>>>
      >>>>>> </CsInstruments>
      >>>>>> <CsScore>
      >>>>>> f 0 5
      >>>>>> i "sound" 0 -1
      >>>>>> i -"sound" 1 0 ; does not work
      >>>>>> i -1 4 0 ; works
      >>>>>>
      >>>>>> </CsScore>
      >>>>>> </CsoundSynthesizer>
      >>>>>>
      >>>>>> ---
      >>>>>>
      >>>>>> Should I file an issue?
      >>>>>>
      >>>>>> Thanks!
      >>>>>> tarmo
      >>>>>
      >>





Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

jpff
In reply to this post by Tarmo Johannes-3
Can you try again?  And also try the d opcode -- in git now

On Fri, 31 Mar 2017, Tarmo Johannes wrote:

> Hi,
>
> I did some testing how it works in the context of orchestra and found out that
> it works withe event and schedule opcode, but not with scoreline and
> readscore. Also it fails with csoundInputEvent API call. A testikng csd is
> below.
>
> I hope it is easy to fix!
>
> tarmo
> ----
>
> <CsoundSynthesizer>
>
> <CsOptions>
>
> -odac -d
>
> </CsOptions>
>
> <CsInstruments>
>
>
> sr = 44100
>
> ksmps = 32
>
> nchnls = 2
>
> 0dbfs = 1
>
>
> schedule "sound",0,-1
>
>
> instr sound
>
> out poscil(0.1,500)
>
> ksec init 0
>
> if (metro(1)==1) then
>
> printk2 ksec
>
> ksec += 1
>
> endif
>
> endin
>
>
> ; these fail:
>
> ires readscore {{ i "-sound" 1 0 }}
>
> scoreline_i {{ i "-sound" 2 0 }}
>
>
> ; these work:
>
> schedule "-sound",3,0
>
> schedule "sound",4,-1 ; restart sound
>
> event_i "i", "-sound",5,0
>
>
> </CsInstruments>
>
> <CsScore>
>
> f 0 7
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> -----
>
>
>
>
>
>
>
>
>
>
>
>
>
> 2017-03-30 21:28 GMT+03:00 Tarmo Johannes <[hidden email]>:
>       Perfect!
> Thanks a lot! this way I can solve one small problem in CsoundQt (using
> named instruments onder on/off event buttons)
>
> tarmo
>
> 2017-03-30 14:55 GMT+03:00 jpff <[hidden email]>:
>       i "-sound" 1 0
>
>
>       On Thu, 30 Mar 2017, Tarmo Johannes wrote:
>
>             Hi,
>
>             Thanks!
>
>             I guess you did not push yet?
>             I tried
>
>             i -"sound" 1 0
>
>             but no effect yet.
>
>
>             tarmo
>
>
>             2017-03-30 12:59 GMT+03:00 John ff
>             <[hidden email]>:
>                   Oh well; the i "-foo" syntax is working
>             now.  Will look at a d
>                   opcode.
>
>             Sent from TypeApp
>             On 30 Mar 2017, at 08:06, Tarmo Johannes
>             <[hidden email]> wrote:
>                   Hi,
>             I personally like the d (denote) syntax idea -
>             much clearer for
>             the user than
>             i -instrumentname
>             provided, it will work scoreline, event,
>             inputaMessage etc.
>
>             Tarmo
>
>             30.03.2017 8:30 kirjutas kuupäeval "Victor
>             Lazzarini" <
>             [hidden email]>:
>                   Just as before. For numbered instruments,
>             it's
>                   syntatic sugar, for named instruments, it
>             addresses a
>                   shortcoming.
>
>                   Victor Lazzarini
>                   Dean of Arts, Celtic Studies, and
>             Philosophy
>                   Maynooth University
>                   Ireland
>
>                   > On 30 Mar 2017, at 00:03, Steven Yi <
>                   [hidden email]> wrote:
>                   >
>                   > My gut instinct is that I'd rather see
>             the i opcode
>                   enhanced rather
>                   > than introduce a new d score opcode
>             introduced.
>                   Also, how would this
>                   > interact with schedule and event orc
>             opcodes?
>                   >
>                   >> On Wed, Mar 29, 2017 at 6:37 PM, John
>             ff <
>                   [hidden email]> wrote:
>                   >> Without double quotes there are no real
>             problems. 
>                   A d opcode is possible.
>                   >>
>                   >> Sent from TypeApp
>                   >>> On 29 Mar 2017, at 21:33, Victor
>             Lazzarini <
>                   [hidden email]> wrote:
>                   >>>
>                   >>> could we make double quotes in p1
>             optional? I mean
>                   >>>
>                   >>> i piano1 0 10
>                   >>>
>                   >>> or even in this case, make the i
>             opcode optional?
>                   >>>
>                   >>> piano1  0 10
>                   >>>
>                   >>> same as
>                   >>>
>                   >>> "piano1" 0 10
>                   >>>
>                   >>> or
>                   >>>
>                   >>> i "piano1"  0 10
>                   >>>
>                   >>> the semantics do not look ambiguous to
>             me.
>                   >>>
>                   >>> Victor Lazzarini
>                   >>> Dean of Arts, Celtic Studies, and
>             Philosophy
>                   >>> Maynooth University
>                   >>> Ireland
>                   >>>
>                   >>> On 29 Mar 2017, at 21:17, John ff <
>                   [hidden email]> wrote:
>                   >>>
>                   >>> Partially working, but domestic duties
>             mean it
>                   will have to wait a while.
>                   >>>
>                   >>> Sent from TypeApp
>                   >>>> On 29 Mar 2017, at 14:09, Tarmo
>             Johannes <
>                   [hidden email]> wrote:
>                   >>>>
>                   >>>> John,
>                   >>>> What do you think, is it easy to
>             implement?
>                   >>>> Of course this is not q high priority
>             thing...
>                   >>>> Tarmo
>                   >>>>
>                   >>>> 29.03.2017 13:04 kirjutas kuupäeval
>             "Victor
>                   Lazzarini" <
>                   >>>> [hidden email]>:
>                   >>>>>
>                   >>>>> At the moment no, you can’t do that,
>             as far as I
>                   know.
>                   >>>>> ========================
>                   >>>>> Prof. Victor Lazzarini
>                   >>>>> Dean of Arts, Celtic Studies, and
>             Philosophy,
>                   >>>>> Maynooth University,
>                   >>>>> Maynooth, Co Kildare, Ireland
>                   >>>>> Tel: 00 353 7086936
>                   >>>>> Fax: 00 353 1 7086952
>                   >>>>>
>                   >>>>>> On 29 Mar 2017, at 09:41, Tarmo
>             Johannes <
>                   [hidden email]> wrote:
>                   >>>>>>
>                   >>>>>> Hi,
>                   >>>>>>
>                   >>>>>> Would it be possible to have in the
>             score
>                   syntax where you can stop an
>                   >>>>>> indefinte named instrument by
>             adding '-' before
>                   the instrument name?
>                   >>>>>>
>                   >>>>>> Like
>                   >>>>>>
>                   >>>>>> i "sound" 0 -1
>                   >>>>>> i  -"sound" 1 0
>                   >>>>>>
>                   >>>>>> Does not work like that right now,
>                   >>>>>>
>                   >>>>>> i -1 1 0 works as expected.
>                   >>>>>>
>                   >>>>>> The full testing csd:
>                   >>>>>>
>                   >>>>>> ---
>                   >>>>>> <CsoundSynthesizer>
>                   >>>>>> <CsOptions>
>                   >>>>>> -odac -d
>                   >>>>>> </CsOptions>
>                   >>>>>> <CsInstruments>
>                   >>>>>>
>                   >>>>>> sr = 44100
>                   >>>>>> ksmps = 32
>                   >>>>>> nchnls = 2
>                   >>>>>> 0dbfs = 1
>                   >>>>>>
>                   >>>>>> instr sound
>                   >>>>>>      out poscil(0.1,500)
>                   >>>>>>      ksec init 0
>                   >>>>>>      if (metro(1)==1) then
>                   >>>>>>              printk2 ksec
>                   >>>>>>              ksec += 1
>                   >>>>>>      endif
>                   >>>>>> endin
>                   >>>>>>
>                   >>>>>> </CsInstruments>
>                   >>>>>> <CsScore>
>                   >>>>>> f 0 5
>                   >>>>>> i "sound" 0 -1
>                   >>>>>> i -"sound" 1 0 ; does not work
>                   >>>>>> i -1 4 0 ; works
>                   >>>>>>
>                   >>>>>> </CsScore>
>                   >>>>>> </CsoundSynthesizer>
>                   >>>>>>
>                   >>>>>> ---
>                   >>>>>>
>                   >>>>>> Should I file an issue?
>                   >>>>>>
>                   >>>>>> Thanks!
>                   >>>>>> tarmo
>                   >>>>>
>                   >>
>
>
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Tarmo Johannes-3
Thank you, John!

ires readscore {{ i "-sound" 1 0 }}

scoreline_i {{ i "-sound" 0 0 }}


work both perfectly in the orchestra but it seems to me that InputMessage API call does not work at all any more -  it does not even start an instrument, nor numbered, nor named.

Another interesting thing I noticed:
In the score, if to use negative  instrument number and also negative instrument duration, it gets stopped as expected
i -1 1 -1 ; stops at 1st second

but in case of named instrument, it is restarted again
i "-sound" 2 -1


Thanks!
tar,p



2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
Can you try again?  And also try the d opcode -- in git now


On Fri, 31 Mar 2017, Tarmo Johannes wrote:

Hi,

I did some testing how it works in the context of orchestra and found out that
it works withe event and schedule opcode, but not with scoreline and
readscore. Also it fails with csoundInputEvent API call. A testikng csd is
below.

I hope it is easy to fix!

tarmo
----

<CsoundSynthesizer>

<CsOptions>

-odac -d

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 32

nchnls = 2

0dbfs = 1


schedule "sound",0,-1


instr sound

out poscil(0.1,500)

ksec init 0

if (metro(1)==1) then

printk2 ksec

ksec += 1

endif

endin


; these fail:

ires readscore {{ i "-sound" 1 0 }}

scoreline_i {{ i "-sound" 2 0 }}


; these work:

schedule "-sound",3,0

schedule "sound",4,-1 ; restart sound

event_i "i", "-sound",5,0


</CsInstruments>

<CsScore>

f 0 7

</CsScore>

</CsoundSynthesizer>

-----













2017-03-30 21:28 GMT+03:00 Tarmo Johannes <[hidden email]>:
      Perfect!
Thanks a lot! this way I can solve one small problem in CsoundQt (using
named instruments onder on/off event buttons)

tarmo

2017-03-30 14:55 GMT+03:00 jpff <[hidden email]>:
      i "-sound" 1 0


      On Thu, 30 Mar 2017, Tarmo Johannes wrote:

            Hi,

            Thanks!

            I guess you did not push yet?
            I tried

            i -"sound" 1 0

            but no effect yet.


            tarmo


            2017-03-30 12:59 GMT+03:00 John ff
            <[hidden email]>:
                  Oh well; the i "-foo" syntax is working
            now.  Will look at a d
                  opcode.

            Sent from TypeApp
            On 30 Mar 2017, at 08:06, Tarmo Johannes
            <[hidden email]> wrote:
                  Hi,
            I personally like the d (denote) syntax idea -
            much clearer for
            the user than
            i -instrumentname
            provided, it will work scoreline, event,
            inputaMessage etc.

            Tarmo

            30.03.2017 8:30 kirjutas kuupäeval "Victor
            Lazzarini" <
            [hidden email]>:
                  Just as before. For numbered instruments,
            it's
                  syntatic sugar, for named instruments, it
            addresses a
                  shortcoming.

                  Victor Lazzarini
                  Dean of Arts, Celtic Studies, and
            Philosophy
                  Maynooth University
                  Ireland

                  > On 30 Mar 2017, at 00:03, Steven Yi <
                  [hidden email]> wrote:
                  >
                  > My gut instinct is that I'd rather see
            the i opcode
                  enhanced rather
                  > than introduce a new d score opcode
            introduced.
                  Also, how would this
                  > interact with schedule and event orc
            opcodes?
                  >
                  >> On Wed, Mar 29, 2017 at 6:37 PM, John
            ff <
                  [hidden email]> wrote:
                  >> Without double quotes there are no real
            problems. 
                  A d opcode is possible.
                  >>
                  >> Sent from TypeApp
                  >>> On 29 Mar 2017, at 21:33, Victor
            Lazzarini <
                  [hidden email]> wrote:
                  >>>
                  >>> could we make double quotes in p1
            optional? I mean
                  >>>
                  >>> i piano1 0 10
                  >>>
                  >>> or even in this case, make the i
            opcode optional?
                  >>>
                  >>> piano1  0 10
                  >>>
                  >>> same as
                  >>>
                  >>> "piano1" 0 10
                  >>>
                  >>> or
                  >>>
                  >>> i "piano1"  0 10
                  >>>
                  >>> the semantics do not look ambiguous to
            me.
                  >>>
                  >>> Victor Lazzarini
                  >>> Dean of Arts, Celtic Studies, and
            Philosophy
                  >>> Maynooth University
                  >>> Ireland
                  >>>
                  >>> On 29 Mar 2017, at 21:17, John ff <
                  [hidden email]> wrote:
                  >>>
                  >>> Partially working, but domestic duties
            mean it
                  will have to wait a while.
                  >>>
                  >>> Sent from TypeApp
                  >>>> On 29 Mar 2017, at 14:09, Tarmo
            Johannes <
                  [hidden email]> wrote:
                  >>>>
                  >>>> John,
                  >>>> What do you think, is it easy to
            implement?
                  >>>> Of course this is not q high priority
            thing...
                  >>>> Tarmo
                  >>>>
                  >>>> 29.03.2017 13:04 kirjutas kuupäeval
            "Victor
                  Lazzarini" <
                  >>>> [hidden email]>:
                  >>>>>
                  >>>>> At the moment no, you can’t do that,
            as far as I
                  know.
                  >>>>> ========================
                  >>>>> Prof. Victor Lazzarini
                  >>>>> Dean of Arts, Celtic Studies, and
            Philosophy,
                  >>>>> Maynooth University,
                  >>>>> Maynooth, Co Kildare, Ireland
                  >>>>> Tel: 00 353 7086936
                  >>>>> Fax: 00 353 1 7086952
                  >>>>>
                  >>>>>> On 29 Mar 2017, at 09:41, Tarmo
            Johannes <
                  [hidden email]> wrote:
                  >>>>>>
                  >>>>>> Hi,
                  >>>>>>
                  >>>>>> Would it be possible to have in the
            score
                  syntax where you can stop an
                  >>>>>> indefinte named instrument by
            adding '-' before
                  the instrument name?
                  >>>>>>
                  >>>>>> Like
                  >>>>>>
                  >>>>>> i "sound" 0 -1
                  >>>>>> i  -"sound" 1 0
                  >>>>>>
                  >>>>>> Does not work like that right now,
                  >>>>>>
                  >>>>>> i -1 1 0 works as expected.
                  >>>>>>
                  >>>>>> The full testing csd:
                  >>>>>>
                  >>>>>> ---
                  >>>>>> <CsoundSynthesizer>
                  >>>>>> <CsOptions>
                  >>>>>> -odac -d
                  >>>>>> </CsOptions>
                  >>>>>> <CsInstruments>
                  >>>>>>
                  >>>>>> sr = 44100
                  >>>>>> ksmps = 32
                  >>>>>> nchnls = 2
                  >>>>>> 0dbfs = 1
                  >>>>>>
                  >>>>>> instr sound
                  >>>>>>      out poscil(0.1,500)
                  >>>>>>      ksec init 0
                  >>>>>>      if (metro(1)==1) then
                  >>>>>>              printk2 ksec
                  >>>>>>              ksec += 1
                  >>>>>>      endif
                  >>>>>> endin
                  >>>>>>
                  >>>>>> </CsInstruments>
                  >>>>>> <CsScore>
                  >>>>>> f 0 5
                  >>>>>> i "sound" 0 -1
                  >>>>>> i -"sound" 1 0 ; does not work
                  >>>>>> i -1 4 0 ; works
                  >>>>>>
                  >>>>>> </CsScore>
                  >>>>>> </CsoundSynthesizer>
                  >>>>>>
                  >>>>>> ---
                  >>>>>>
                  >>>>>> Should I file an issue?
                  >>>>>>
                  >>>>>> Thanks!
                  >>>>>> tarmo
                  >>>>>
                  >>







Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Tarmo Johannes-3
Hi John,

Have you had chance to look at csoundInputMessaage function (or maybe somewhere else) - after recent changes no events are produced when host application is  calling csoundInputMessage...

Thanks!
Tarmo

02.04.2017 0:37 kirjutas kuupäeval "Tarmo Johannes" <[hidden email]>:
Thank you, John!

ires readscore {{ i "-sound" 1 0 }}

scoreline_i {{ i "-sound" 0 0 }}


work both perfectly in the orchestra but it seems to me that InputMessage API call does not work at all any more -  it does not even start an instrument, nor numbered, nor named.

Another interesting thing I noticed:
In the score, if to use negative  instrument number and also negative instrument duration, it gets stopped as expected
i -1 1 -1 ; stops at 1st second

but in case of named instrument, it is restarted again
i "-sound" 2 -1


Thanks!
tar,p



2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
Can you try again?  And also try the d opcode -- in git now


On Fri, 31 Mar 2017, Tarmo Johannes wrote:

Hi,

I did some testing how it works in the context of orchestra and found out that
it works withe event and schedule opcode, but not with scoreline and
readscore. Also it fails with csoundInputEvent API call. A testikng csd is
below.

I hope it is easy to fix!

tarmo
----

<CsoundSynthesizer>

<CsOptions>

-odac -d

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 32

nchnls = 2

0dbfs = 1


schedule "sound",0,-1


instr sound

out poscil(0.1,500)

ksec init 0

if (metro(1)==1) then

printk2 ksec

ksec += 1

endif

endin


; these fail:

ires readscore {{ i "-sound" 1 0 }}

scoreline_i {{ i "-sound" 2 0 }}


; these work:

schedule "-sound",3,0

schedule "sound",4,-1 ; restart sound

event_i "i", "-sound",5,0


</CsInstruments>

<CsScore>

f 0 7

</CsScore>

</CsoundSynthesizer>

-----













2017-03-30 21:28 GMT+03:00 Tarmo Johannes <[hidden email]>:
      Perfect!
Thanks a lot! this way I can solve one small problem in CsoundQt (using
named instruments onder on/off event buttons)

tarmo

2017-03-30 14:55 GMT+03:00 jpff <[hidden email]>:
      i "-sound" 1 0


      On Thu, 30 Mar 2017, Tarmo Johannes wrote:

            Hi,

            Thanks!

            I guess you did not push yet?
            I tried

            i -"sound" 1 0

            but no effect yet.


            tarmo


            2017-03-30 12:59 GMT+03:00 John ff
            <[hidden email]>:
                  Oh well; the i "-foo" syntax is working
            now.  Will look at a d
                  opcode.

            Sent from TypeApp
            On 30 Mar 2017, at 08:06, Tarmo Johannes
            <[hidden email]> wrote:
                  Hi,
            I personally like the d (denote) syntax idea -
            much clearer for
            the user than
            i -instrumentname
            provided, it will work scoreline, event,
            inputaMessage etc.

            Tarmo

            30.03.2017 8:30 kirjutas kuupäeval "Victor
            Lazzarini" <
            [hidden email]>:
                  Just as before. For numbered instruments,
            it's
                  syntatic sugar, for named instruments, it
            addresses a
                  shortcoming.

                  Victor Lazzarini
                  Dean of Arts, Celtic Studies, and
            Philosophy
                  Maynooth University
                  Ireland

                  > On 30 Mar 2017, at 00:03, Steven Yi <
                  [hidden email]> wrote:
                  >
                  > My gut instinct is that I'd rather see
            the i opcode
                  enhanced rather
                  > than introduce a new d score opcode
            introduced.
                  Also, how would this
                  > interact with schedule and event orc
            opcodes?
                  >
                  >> On Wed, Mar 29, 2017 at 6:37 PM, John
            ff <
                  [hidden email]> wrote:
                  >> Without double quotes there are no real
            problems. 
                  A d opcode is possible.
                  >>
                  >> Sent from TypeApp
                  >>> On 29 Mar 2017, at 21:33, Victor
            Lazzarini <
                  [hidden email]> wrote:
                  >>>
                  >>> could we make double quotes in p1
            optional? I mean
                  >>>
                  >>> i piano1 0 10
                  >>>
                  >>> or even in this case, make the i
            opcode optional?
                  >>>
                  >>> piano1  0 10
                  >>>
                  >>> same as
                  >>>
                  >>> "piano1" 0 10
                  >>>
                  >>> or
                  >>>
                  >>> i "piano1"  0 10
                  >>>
                  >>> the semantics do not look ambiguous to
            me.
                  >>>
                  >>> Victor Lazzarini
                  >>> Dean of Arts, Celtic Studies, and
            Philosophy
                  >>> Maynooth University
                  >>> Ireland
                  >>>
                  >>> On 29 Mar 2017, at 21:17, John ff <
                  [hidden email]> wrote:
                  >>>
                  >>> Partially working, but domestic duties
            mean it
                  will have to wait a while.
                  >>>
                  >>> Sent from TypeApp
                  >>>> On 29 Mar 2017, at 14:09, Tarmo
            Johannes <
                  [hidden email]> wrote:
                  >>>>
                  >>>> John,
                  >>>> What do you think, is it easy to
            implement?
                  >>>> Of course this is not q high priority
            thing...
                  >>>> Tarmo
                  >>>>
                  >>>> 29.03.2017 13:04 kirjutas kuupäeval
            "Victor
                  Lazzarini" <
                  >>>> [hidden email]>:
                  >>>>>
                  >>>>> At the moment no, you can’t do that,
            as far as I
                  know.
                  >>>>> ========================
                  >>>>> Prof. Victor Lazzarini
                  >>>>> Dean of Arts, Celtic Studies, and
            Philosophy,
                  >>>>> Maynooth University,
                  >>>>> Maynooth, Co Kildare, Ireland
                  >>>>> Tel: 00 353 7086936
                  >>>>> Fax: 00 353 1 7086952
                  >>>>>
                  >>>>>> On 29 Mar 2017, at 09:41, Tarmo
            Johannes <
                  [hidden email]> wrote:
                  >>>>>>
                  >>>>>> Hi,
                  >>>>>>
                  >>>>>> Would it be possible to have in the
            score
                  syntax where you can stop an
                  >>>>>> indefinte named instrument by
            adding '-' before
                  the instrument name?
                  >>>>>>
                  >>>>>> Like
                  >>>>>>
                  >>>>>> i "sound" 0 -1
                  >>>>>> i  -"sound" 1 0
                  >>>>>>
                  >>>>>> Does not work like that right now,
                  >>>>>>
                  >>>>>> i -1 1 0 works as expected.
                  >>>>>>
                  >>>>>> The full testing csd:
                  >>>>>>
                  >>>>>> ---
                  >>>>>> <CsoundSynthesizer>
                  >>>>>> <CsOptions>
                  >>>>>> -odac -d
                  >>>>>> </CsOptions>
                  >>>>>> <CsInstruments>
                  >>>>>>
                  >>>>>> sr = 44100
                  >>>>>> ksmps = 32
                  >>>>>> nchnls = 2
                  >>>>>> 0dbfs = 1
                  >>>>>>
                  >>>>>> instr sound
                  >>>>>>      out poscil(0.1,500)
                  >>>>>>      ksec init 0
                  >>>>>>      if (metro(1)==1) then
                  >>>>>>              printk2 ksec
                  >>>>>>              ksec += 1
                  >>>>>>      endif
                  >>>>>> endin
                  >>>>>>
                  >>>>>> </CsInstruments>
                  >>>>>> <CsScore>
                  >>>>>> f 0 5
                  >>>>>> i "sound" 0 -1
                  >>>>>> i -"sound" 1 0 ; does not work
                  >>>>>> i -1 4 0 ; works
                  >>>>>>
                  >>>>>> </CsScore>
                  >>>>>> </CsoundSynthesizer>
                  >>>>>>
                  >>>>>> ---
                  >>>>>>
                  >>>>>> Should I file an issue?
                  >>>>>>
                  >>>>>> Thanks!
                  >>>>>> tarmo
                  >>>>>
                  >>







Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

jpff
Any chance of a program that fauls/  I never use the API so have noting
trustworty to use as a test.

re egaive p3 tee is a differece as to when te p1 is egated whih migt
eplain it -- but again I never use eative pi, p2 or p3, or amed
instruents.



On Tue, 4 Apr 2017, Tarmo Johannes wrote:

> Hi John,
> Have you had chance to look at csoundInputMessaage function (or maybe
> somewhere else) - after recent changes no events are produced when host
> application is  calling csoundInputMessage...
>
> Thanks!
> Tarmo
>
> 02.04.2017 0:37 kirjutas kuupäeval "Tarmo Johannes" <[hidden email]>:
>       Thank you, John!
>
>       ires readscore {{ i "-sound" 1 0 }}
>
>       scoreline_i {{ i "-sound" 0 0 }}
>
>
> work both perfectly in the orchestra but it seems to me that
> InputMessage API call does not work at all any more -  it does not even
> start an instrument, nor numbered, nor named.
>
> Another interesting thing I noticed:
> In the score, if to use negative  instrument number and also negative
> instrument duration, it gets stopped as expected
> i -1 1 -1 ; stops at 1st second
>
> but in case of named instrument, it is restarted again
> i "-sound" 2 -1
>
>
> Thanks!
> tar,p
>
>
>
> 2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
>       Can you try again?  And also try the d opcode -- in git now
>
>       On Fri, 31 Mar 2017, Tarmo Johannes wrote:
>
>             Hi,
>
>             I did some testing how it works in the context
>             of orchestra and found out that
>             it works withe event and schedule opcode, but
>             not with scoreline and
>             readscore. Also it fails with csoundInputEvent
>             API call. A testikng csd is
>             below.
>
>             I hope it is easy to fix!
>
>             tarmo
>             ----
>
>             <CsoundSynthesizer>
>
>             <CsOptions>
>
>             -odac -d
>
>             </CsOptions>
>
>             <CsInstruments>
>
>
>             sr = 44100
>
>             ksmps = 32
>
>             nchnls = 2
>
>             0dbfs = 1
>
>
>             schedule "sound",0,-1
>
>
>             instr sound
>
>             out poscil(0.1,500)
>
>             ksec init 0
>
>             if (metro(1)==1) then
>
>             printk2 ksec
>
>             ksec += 1
>
>             endif
>
>             endin
>
>
>             ; these fail:
>
>             ires readscore {{ i "-sound" 1 0 }}
>
>             scoreline_i {{ i "-sound" 2 0 }}
>
>
>             ; these work:
>
>             schedule "-sound",3,0
>
>             schedule "sound",4,-1 ; restart sound
>
>             event_i "i", "-sound",5,0
>
>
>             </CsInstruments>
>
>             <CsScore>
>
>             f 0 7
>
>             </CsScore>
>
>             </CsoundSynthesizer>
>
>             -----
>
>
>
>
>
>
>
>
>
>
>
>
>
>             2017-03-30 21:28 GMT+03:00 Tarmo Johannes
>             <[hidden email]>:
>                   Perfect!
>             Thanks a lot! this way I can solve one small
>             problem in CsoundQt (using
>             named instruments onder on/off event buttons)
>
>             tarmo
>
>             2017-03-30 14:55 GMT+03:00 jpff
>             <[hidden email]>:
>                   i "-sound" 1 0
>
>
>                   On Thu, 30 Mar 2017, Tarmo Johannes wrote:
>
>                         Hi,
>
>                         Thanks!
>
>                         I guess you did not push yet?
>                         I tried
>
>                         i -"sound" 1 0
>
>                         but no effect yet.
>
>
>                         tarmo
>
>
>                         2017-03-30 12:59 GMT+03:00 John ff
>                         <[hidden email]>:
>                               Oh well; the i "-foo" syntax
>             is working
>                         now.  Will look at a d
>                               opcode.
>
>                         Sent from TypeApp
>                         On 30 Mar 2017, at 08:06, Tarmo
>             Johannes
>                         <[hidden email]> wrote:
>                               Hi,
>                         I personally like the d (denote)
>             syntax idea -
>                         much clearer for
>                         the user than
>                         i -instrumentname
>                         provided, it will work scoreline,
>             event,
>                         inputaMessage etc.
>
>                         Tarmo
>
>                         30.03.2017 8:30 kirjutas kuupäeval
>             "Victor
>                         Lazzarini" <
>                         [hidden email]>:
>                               Just as before. For numbered
>             instruments,
>                         it's
>                               syntatic sugar, for named
>             instruments, it
>                         addresses a
>                               shortcoming.
>
>                               Victor Lazzarini
>                               Dean of Arts, Celtic Studies,
>             and
>                         Philosophy
>                               Maynooth University
>                               Ireland
>
>                               > On 30 Mar 2017, at 00:03,
>             Steven Yi <
>                               [hidden email]> wrote:
>                               >
>                               > My gut instinct is that I'd
>             rather see
>                         the i opcode
>                               enhanced rather
>                               > than introduce a new d score
>             opcode
>                         introduced.
>                               Also, how would this
>                               > interact with schedule and
>             event orc
>                         opcodes?
>                               >
>                               >> On Wed, Mar 29, 2017 at
>             6:37 PM, John
>                         ff <
>                               [hidden email]> wrote:
>                               >> Without double quotes there
>             are no real
>                         problems. 
>                               A d opcode is possible.
>                               >>
>                               >> Sent from TypeApp
>                               >>> On 29 Mar 2017, at 21:33,
>             Victor
>                         Lazzarini <
>                               [hidden email]>
>             wrote:
>                               >>>
>                               >>> could we make double
>             quotes in p1
>                         optional? I mean
>                               >>>
>                               >>> i piano1 0 10
>                               >>>
>                               >>> or even in this case, make
>             the i
>                         opcode optional?
>                               >>>
>                               >>> piano1  0 10
>                               >>>
>                               >>> same as
>                               >>>
>                               >>> "piano1" 0 10
>                               >>>
>                               >>> or
>                               >>>
>                               >>> i "piano1"  0 10
>                               >>>
>                               >>> the semantics do not look
>             ambiguous to
>                         me.
>                               >>>
>                               >>> Victor Lazzarini
>                               >>> Dean of Arts, Celtic
>             Studies, and
>                         Philosophy
>                               >>> Maynooth University
>                               >>> Ireland
>                               >>>
>                               >>> On 29 Mar 2017, at 21:17,
>             John ff <
>                               [hidden email]> wrote:
>                               >>>
>                               >>> Partially working, but
>             domestic duties
>                         mean it
>                               will have to wait a while.
>                               >>>
>                               >>> Sent from TypeApp
>                               >>>> On 29 Mar 2017, at 14:09,
>             Tarmo
>                         Johannes <
>                               [hidden email]> wrote:
>                               >>>>
>                               >>>> John,
>                               >>>> What do you think, is it
>             easy to
>                         implement?
>                               >>>> Of course this is not q
>             high priority
>                         thing...
>                               >>>> Tarmo
>                               >>>>
>                               >>>> 29.03.2017 13:04 kirjutas
>             kuupäeval
>                         "Victor
>                               Lazzarini" <
>                               >>>>
>             [hidden email]>:
>                               >>>>>
>                               >>>>> At the moment no, you
>             can’t do that,
>                         as far as I
>                               know.
>                               >>>>> ========================
>                               >>>>> Prof. Victor Lazzarini
>                               >>>>> Dean of Arts, Celtic
>             Studies, and
>                         Philosophy,
>                               >>>>> Maynooth University,
>                               >>>>> Maynooth, Co Kildare,
>             Ireland
>                               >>>>> Tel: 00 353 7086936
>                               >>>>> Fax: 00 353 1 7086952
>                               >>>>>
>                               >>>>>> On 29 Mar 2017, at
>             09:41, Tarmo
>                         Johannes <
>                               [hidden email]> wrote:
>                               >>>>>>
>                               >>>>>> Hi,
>                               >>>>>>
>                               >>>>>> Would it be possible to
>             have in the
>                         score
>                               syntax where you can stop an
>                               >>>>>> indefinte named
>             instrument by
>                         adding '-' before
>                               the instrument name?
>                               >>>>>>
>                               >>>>>> Like
>                               >>>>>>
>                               >>>>>> i "sound" 0 -1
>                               >>>>>> i  -"sound" 1 0
>                               >>>>>>
>                               >>>>>> Does not work like that
>             right now,
>                               >>>>>>
>                               >>>>>> i -1 1 0 works as
>             expected.
>                               >>>>>>
>                               >>>>>> The full testing csd:
>                               >>>>>>
>                               >>>>>> ---
>                               >>>>>> <CsoundSynthesizer>
>                               >>>>>> <CsOptions>
>                               >>>>>> -odac -d
>                               >>>>>> </CsOptions>
>                               >>>>>> <CsInstruments>
>                               >>>>>>
>                               >>>>>> sr = 44100
>                               >>>>>> ksmps = 32
>                               >>>>>> nchnls = 2
>                               >>>>>> 0dbfs = 1
>                               >>>>>>
>                               >>>>>> instr sound
>                               >>>>>>      out
>             poscil(0.1,500)
>                               >>>>>>      ksec init 0
>                               >>>>>>      if (metro(1)==1)
>             then
>                               >>>>>>              printk2
>             ksec
>                               >>>>>>              ksec += 1
>                               >>>>>>      endif
>                               >>>>>> endin
>                               >>>>>>
>                               >>>>>> </CsInstruments>
>                               >>>>>> <CsScore>
>                               >>>>>> f 0 5
>                               >>>>>> i "sound" 0 -1
>                               >>>>>> i -"sound" 1 0 ; does
>             not work
>                               >>>>>> i -1 4 0 ; works
>                               >>>>>>
>                               >>>>>> </CsScore>
>                               >>>>>> </CsoundSynthesizer>
>                               >>>>>>
>                               >>>>>> ---
>                               >>>>>>
>                               >>>>>> Should I file an issue?
>                               >>>>>>
>                               >>>>>> Thanks!
>                               >>>>>> tarmo
>                               >>>>>
>                               >>
>
>
>
>
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Tarmo Johannes-3
Oh, John, I am sorry for the noise -

I was preparing an example and it worked as expected -  I just needed to make
clean and rebuild the other program.

Only thing  -  what is the syntax of 'd'  command? I tried

d "sound" 1
d "sound" 1 0
d "-sound" 1

but no effect.

Thanks!
tarmo

On teisipäev, 4. aprill 2017 15:22.34 EEST you wrote:

> Any chance of a program that fauls/  I never use the API so have noting
> trustworty to use as a test.
>
> re egaive p3 tee is a differece as to when te p1 is egated whih migt
> eplain it -- but again I never use eative pi, p2 or p3, or amed
> instruents.
>
> On Tue, 4 Apr 2017, Tarmo Johannes wrote:
> > Hi John,
> > Have you had chance to look at csoundInputMessaage function (or maybe
> > somewhere else) - after recent changes no events are produced when host
> > application is  calling csoundInputMessage...
> >
> > Thanks!
> > Tarmo
> >
> > 02.04.2017 0:37 kirjutas kuupäeval "Tarmo Johannes" <[hidden email]>:
> >       Thank you, John!
> >      
> >       ires readscore {{ i "-sound" 1 0 }}
> >      
> >       scoreline_i {{ i "-sound" 0 0 }}
> >
> > work both perfectly in the orchestra but it seems to me that
> > InputMessage API call does not work at all any more -  it does not even
> > start an instrument, nor numbered, nor named.
> >
> > Another interesting thing I noticed:
> > In the score, if to use negative  instrument number and also negative
> > instrument duration, it gets stopped as expected
> > i -1 1 -1 ; stops at 1st second
> >
> > but in case of named instrument, it is restarted again
> > i "-sound" 2 -1
> >
> >
> > Thanks!
> > tar,p
> >
> > 2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
> >       Can you try again?  And also try the d opcode -- in git now
> >      
> >       On Fri, 31 Mar 2017, Tarmo Johannes wrote:
> >             Hi,
> >            
> >             I did some testing how it works in the context
> >             of orchestra and found out that
> >             it works withe event and schedule opcode, but
> >             not with scoreline and
> >             readscore. Also it fails with csoundInputEvent
> >             API call. A testikng csd is
> >             below.
> >            
> >             I hope it is easy to fix!
> >            
> >             tarmo
> >             ----
> >            
> >             <CsoundSynthesizer>
> >            
> >             <CsOptions>
> >            
> >             -odac -d
> >            
> >             </CsOptions>
> >            
> >             <CsInstruments>
> >            
> >            
> >             sr = 44100
> >            
> >             ksmps = 32
> >            
> >             nchnls = 2
> >            
> >             0dbfs = 1
> >            
> >            
> >             schedule "sound",0,-1
> >            
> >            
> >             instr sound
> >            
> >             out poscil(0.1,500)
> >            
> >             ksec init 0
> >            
> >             if (metro(1)==1) then
> >            
> >             printk2 ksec
> >            
> >             ksec += 1
> >            
> >             endif
> >            
> >             endin
> >            
> >            
> >             ; these fail:
> >            
> >             ires readscore {{ i "-sound" 1 0 }}
> >            
> >             scoreline_i {{ i "-sound" 2 0 }}
> >            
> >            
> >             ; these work:
> >            
> >             schedule "-sound",3,0
> >            
> >             schedule "sound",4,-1 ; restart sound
> >            
> >             event_i "i", "-sound",5,0
> >            
> >            
> >             </CsInstruments>
> >            
> >             <CsScore>
> >            
> >             f 0 7
> >            
> >             </CsScore>
> >            
> >             </CsoundSynthesizer>
> >            
> >             -----
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >            
> >             2017-03-30 21:28 GMT+03:00 Tarmo Johannes
> >             <[hidden email]>:
> >                   Perfect!
> >             Thanks a lot! this way I can solve one small
> >             problem in CsoundQt (using
> >             named instruments onder on/off event buttons)
> >            
> >             tarmo
> >            
> >             2017-03-30 14:55 GMT+03:00 jpff
> >             <[hidden email]>:
> >                   i "-sound" 1 0
> >            
> >            
> >                   On Thu, 30 Mar 2017, Tarmo Johannes wrote:
> >            
> >                         Hi,
> >            
> >                         Thanks!
> >            
> >                         I guess you did not push yet?
> >                         I tried
> >            
> >                         i -"sound" 1 0
> >            
> >                         but no effect yet.
> >            
> >            
> >                         tarmo
> >            
> >            
> >                         2017-03-30 12:59 GMT+03:00 John ff
> >                         <[hidden email]>:
> >                               Oh well; the i "-foo" syntax
> >             is working
> >                         now.  Will look at a d
> >                               opcode.
> >            
> >                         Sent from TypeApp
> >                         On 30 Mar 2017, at 08:06, Tarmo
> >             Johannes
> >                         <[hidden email]> wrote:
> >                               Hi,
> >                         I personally like the d (denote)
> >             syntax idea -
> >                         much clearer for
> >                         the user than
> >                         i -instrumentname
> >                         provided, it will work scoreline,
> >             event,
> >                         inputaMessage etc.
> >            
> >                         Tarmo
> >            
> >                         30.03.2017 8:30 kirjutas kuupäeval
> >             "Victor
> >                         Lazzarini" <
> >                         [hidden email]>:
> >                               Just as before. For numbered
> >             instruments,
> >                         it's
> >                               syntatic sugar, for named
> >             instruments, it
> >                         addresses a
> >                               shortcoming.
> >            
> >                               Victor Lazzarini
> >                               Dean of Arts, Celtic Studies,
> >             and
> >                         Philosophy
> >                               Maynooth University
> >                               Ireland
> >            
> >                               > On 30 Mar 2017, at 00:03,
> >             Steven Yi <
> >                               [hidden email]> wrote:
> >                               >
> >                               > My gut instinct is that I'd
> >             rather see
> >                         the i opcode
> >                               enhanced rather
> >                               > than introduce a new d score
> >             opcode
> >                         introduced.
> >                               Also, how would this
> >                               > interact with schedule and
> >             event orc
> >                         opcodes?
> >                               >
> >                               >> On Wed, Mar 29, 2017 at
> >             6:37 PM, John
> >                         ff <
> >                               [hidden email]> wrote:
> >                               >> Without double quotes there
> >             are no real
> >                         problems.
> >                               A d opcode is possible.
> >                               >>
> >                               >> Sent from TypeApp
> >                               >>> On 29 Mar 2017, at 21:33,
> >             Victor
> >                         Lazzarini <
> >                               [hidden email]>
> >             wrote:
> >                               >>>
> >                               >>> could we make double
> >             quotes in p1
> >                         optional? I mean
> >                               >>>
> >                               >>> i piano1 0 10
> >                               >>>
> >                               >>> or even in this case, make
> >             the i
> >                         opcode optional?
> >                               >>>
> >                               >>> piano1  0 10
> >                               >>>
> >                               >>> same as
> >                               >>>
> >                               >>> "piano1" 0 10
> >                               >>>
> >                               >>> or
> >                               >>>
> >                               >>> i "piano1"  0 10
> >                               >>>
> >                               >>> the semantics do not look
> >             ambiguous to
> >                         me.
> >                               >>>
> >                               >>> Victor Lazzarini
> >                               >>> Dean of Arts, Celtic
> >             Studies, and
> >                         Philosophy
> >                               >>> Maynooth University
> >                               >>> Ireland
> >                               >>>
> >                               >>> On 29 Mar 2017, at 21:17,
> >             John ff <
> >                               [hidden email]> wrote:
> >                               >>>
> >                               >>> Partially working, but
> >             domestic duties
> >                         mean it
> >                               will have to wait a while.
> >                               >>>
> >                               >>> Sent from TypeApp
> >                               >>>> On 29 Mar 2017, at 14:09,
> >             Tarmo
> >                         Johannes <
> >                               [hidden email]> wrote:
> >                               >>>>
> >                               >>>> John,
> >                               >>>> What do you think, is it
> >             easy to
> >                         implement?
> >                               >>>> Of course this is not q
> >             high priority
> >                         thing...
> >                               >>>> Tarmo
> >                               >>>>
> >                               >>>> 29.03.2017 13:04 kirjutas
> >             kuupäeval
> >                         "Victor
> >                               Lazzarini" <
> >                               >>>>
> >             [hidden email]>:
> >                               >>>>>
> >                               >>>>> At the moment no, you
> >             can’t do that,
> >                         as far as I
> >                               know.
> >                               >>>>> ========================
> >                               >>>>> Prof. Victor Lazzarini
> >                               >>>>> Dean of Arts, Celtic
> >             Studies, and
> >                         Philosophy,
> >                               >>>>> Maynooth University,
> >                               >>>>> Maynooth, Co Kildare,
> >             Ireland
> >                               >>>>> Tel: 00 353 7086936
> >                               >>>>> Fax: 00 353 1 7086952
> >                               >>>>>
> >                               >>>>>> On 29 Mar 2017, at
> >             09:41, Tarmo
> >                         Johannes <
> >                               [hidden email]> wrote:
> >                               >>>>>>
> >                               >>>>>> Hi,
> >                               >>>>>>
> >                               >>>>>> Would it be possible to
> >             have in the
> >                         score
> >                               syntax where you can stop an
> >                               >>>>>> indefinte named
> >             instrument by
> >                         adding '-' before
> >                               the instrument name?
> >                               >>>>>>
> >                               >>>>>> Like
> >                               >>>>>>
> >                               >>>>>> i "sound" 0 -1
> >                               >>>>>> i  -"sound" 1 0
> >                               >>>>>>
> >                               >>>>>> Does not work like that
> >             right now,
> >                               >>>>>>
> >                               >>>>>> i -1 1 0 works as
> >             expected.
> >                               >>>>>>
> >                               >>>>>> The full testing csd:
> >                               >>>>>>
> >                               >>>>>> ---
> >                               >>>>>> <CsoundSynthesizer>
> >                               >>>>>> <CsOptions>
> >                               >>>>>> -odac -d
> >                               >>>>>> </CsOptions>
> >                               >>>>>> <CsInstruments>
> >                               >>>>>>
> >                               >>>>>> sr = 44100
> >                               >>>>>> ksmps = 32
> >                               >>>>>> nchnls = 2 0
> >                               >>>>>> 0dbfs = 1
> >                               >>>>>>
> >                               >>>>>> instr sound
> >                               >>>>>>      out
> >             poscil(0.1,500)
> >                               >>>>>>      ksec init 0
> >                               >>>>>>      if (metro(1)==1)
> >             then
> >                               >>>>>>              printk2
> >             ksec
> >                               >>>>>>              ksec += 1
> >                               >>>>>>      endif
> >                               >>>>>> endin
> >                               >>>>>>
> >                               >>>>>> </CsInstruments>
> >                               >>>>>> <CsScore>
> >                               >>>>>> f 0 5
> >                               >>>>>> i "sound" 0 -1
> >                               >>>>>> i -"sound" 1 0 ; does
> >             not work
> >                               >>>>>> i -1 4 0 ; works
> >                               >>>>>>
> >                               >>>>>> </CsScore>
> >                               >>>>>> </CsoundSynthesi 0zer>
> >                               >>>>>>
> >                               >>>>>> ---
> >                               >>>>>>
> >                               >>>>>> Should I file an issue?
> >                               >>>>>>
> >                               >>>>>> Thanks!
> >                               >>>>>> tarmo
> >                               >>>>>
> >                               >>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Michael Gogins-2
What is the status of this? Does the "d" opcode now work with csoundReadScore?

Best,
Mike

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


On Wed, Apr 5, 2017 at 4:03 AM, Tarmo Johannes <[hidden email]> wrote:

> Oh, John, I am sorry for the noise -
>
> I was preparing an example and it worked as expected -  I just needed to make
> clean and rebuild the other program.
>
> Only thing  -  what is the syntax of 'd'  command? I tried
>
> d "sound" 1
> d "sound" 1 0
> d "-sound" 1
>
> but no effect.
>
> Thanks!
> tarmo
>
> On teisipäev, 4. aprill 2017 15:22.34 EEST you wrote:
>> Any chance of a program that fauls/  I never use the API so have noting
>> trustworty to use as a test.
>>
>> re egaive p3 tee is a differece as to when te p1 is egated whih migt
>> eplain it -- but again I never use eative pi, p2 or p3, or amed
>> instruents.
>>
>> On Tue, 4 Apr 2017, Tarmo Johannes wrote:
>> > Hi John,
>> > Have you had chance to look at csoundInputMessaage function (or maybe
>> > somewhere else) - after recent changes no events are produced when host
>> > application is  calling csoundInputMessage...
>> >
>> > Thanks!
>> > Tarmo
>> >
>> > 02.04.2017 0:37 kirjutas kuupäeval "Tarmo Johannes" <[hidden email]>:
>> >       Thank you, John!
>> >
>> >       ires readscore {{ i "-sound" 1 0 }}
>> >
>> >       scoreline_i {{ i "-sound" 0 0 }}
>> >
>> > work both perfectly in the orchestra but it seems to me that
>> > InputMessage API call does not work at all any more -  it does not even
>> > start an instrument, nor numbered, nor named.
>> >
>> > Another interesting thing I noticed:
>> > In the score, if to use negative  instrument number and also negative
>> > instrument duration, it gets stopped as expected
>> > i -1 1 -1 ; stops at 1st second
>> >
>> > but in case of named instrument, it is restarted again
>> > i "-sound" 2 -1
>> >
>> >
>> > Thanks!
>> > tar,p
>> >
>> > 2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
>> >       Can you try again?  And also try the d opcode -- in git now
>> >
>> >       On Fri, 31 Mar 2017, Tarmo Johannes wrote:
>> >             Hi,
>> >
>> >             I did some testing how it works in the context
>> >             of orchestra and found out that
>> >             it works withe event and schedule opcode, but
>> >             not with scoreline and
>> >             readscore. Also it fails with csoundInputEvent
>> >             API call. A testikng csd is
>> >             below.
>> >
>> >             I hope it is easy to fix!
>> >
>> >             tarmo
>> >             ----
>> >
>> >             <CsoundSynthesizer>
>> >
>> >             <CsOptions>
>> >
>> >             -odac -d
>> >
>> >             </CsOptions>
>> >
>> >             <CsInstruments>
>> >
>> >
>> >             sr = 44100
>> >
>> >             ksmps = 32
>> >
>> >             nchnls = 2
>> >
>> >             0dbfs = 1
>> >
>> >
>> >             schedule "sound",0,-1
>> >
>> >
>> >             instr sound
>> >
>> >             out poscil(0.1,500)
>> >
>> >             ksec init 0
>> >
>> >             if (metro(1)==1) then
>> >
>> >             printk2 ksec
>> >
>> >             ksec += 1
>> >
>> >             endif
>> >
>> >             endin
>> >
>> >
>> >             ; these fail:
>> >
>> >             ires readscore {{ i "-sound" 1 0 }}
>> >
>> >             scoreline_i {{ i "-sound" 2 0 }}
>> >
>> >
>> >             ; these work:
>> >
>> >             schedule "-sound",3,0
>> >
>> >             schedule "sound",4,-1 ; restart sound
>> >
>> >             event_i "i", "-sound",5,0
>> >
>> >
>> >             </CsInstruments>
>> >
>> >             <CsScore>
>> >
>> >             f 0 7
>> >
>> >             </CsScore>
>> >
>> >             </CsoundSynthesizer>
>> >
>> >             -----
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >             2017-03-30 21:28 GMT+03:00 Tarmo Johannes
>> >             <[hidden email]>:
>> >                   Perfect!
>> >             Thanks a lot! this way I can solve one small
>> >             problem in CsoundQt (using
>> >             named instruments onder on/off event buttons)
>> >
>> >             tarmo
>> >
>> >             2017-03-30 14:55 GMT+03:00 jpff
>> >             <[hidden email]>:
>> >                   i "-sound" 1 0
>> >
>> >
>> >                   On Thu, 30 Mar 2017, Tarmo Johannes wrote:
>> >
>> >                         Hi,
>> >
>> >                         Thanks!
>> >
>> >                         I guess you did not push yet?
>> >                         I tried
>> >
>> >                         i -"sound" 1 0
>> >
>> >                         but no effect yet.
>> >
>> >
>> >                         tarmo
>> >
>> >
>> >                         2017-03-30 12:59 GMT+03:00 John ff
>> >                         <[hidden email]>:
>> >                               Oh well; the i "-foo" syntax
>> >             is working
>> >                         now.  Will look at a d
>> >                               opcode.
>> >
>> >                         Sent from TypeApp
>> >                         On 30 Mar 2017, at 08:06, Tarmo
>> >             Johannes
>> >                         <[hidden email]> wrote:
>> >                               Hi,
>> >                         I personally like the d (denote)
>> >             syntax idea -
>> >                         much clearer for
>> >                         the user than
>> >                         i -instrumentname
>> >                         provided, it will work scoreline,
>> >             event,
>> >                         inputaMessage etc.
>> >
>> >                         Tarmo
>> >
>> >                         30.03.2017 8:30 kirjutas kuupäeval
>> >             "Victor
>> >                         Lazzarini" <
>> >                         [hidden email]>:
>> >                               Just as before. For numbered
>> >             instruments,
>> >                         it's
>> >                               syntatic sugar, for named
>> >             instruments, it
>> >                         addresses a
>> >                               shortcoming.
>> >
>> >                               Victor Lazzarini
>> >                               Dean of Arts, Celtic Studies,
>> >             and
>> >                         Philosophy
>> >                               Maynooth University
>> >                               Ireland
>> >
>> >                               > On 30 Mar 2017, at 00:03,
>> >             Steven Yi <
>> >                               [hidden email]> wrote:
>> >                               >
>> >                               > My gut instinct is that I'd
>> >             rather see
>> >                         the i opcode
>> >                               enhanced rather
>> >                               > than introduce a new d score
>> >             opcode
>> >                         introduced.
>> >                               Also, how would this
>> >                               > interact with schedule and
>> >             event orc
>> >                         opcodes?
>> >                               >
>> >                               >> On Wed, Mar 29, 2017 at
>> >             6:37 PM, John
>> >                         ff <
>> >                               [hidden email]> wrote:
>> >                               >> Without double quotes there
>> >             are no real
>> >                         problems.
>> >                               A d opcode is possible.
>> >                               >>
>> >                               >> Sent from TypeApp
>> >                               >>> On 29 Mar 2017, at 21:33,
>> >             Victor
>> >                         Lazzarini <
>> >                               [hidden email]>
>> >             wrote:
>> >                               >>>
>> >                               >>> could we make double
>> >             quotes in p1
>> >                         optional? I mean
>> >                               >>>
>> >                               >>> i piano1 0 10
>> >                               >>>
>> >                               >>> or even in this case, make
>> >             the i
>> >                         opcode optional?
>> >                               >>>
>> >                               >>> piano1  0 10
>> >                               >>>
>> >                               >>> same as
>> >                               >>>
>> >                               >>> "piano1" 0 10
>> >                               >>>
>> >                               >>> or
>> >                               >>>
>> >                               >>> i "piano1"  0 10
>> >                               >>>
>> >                               >>> the semantics do not look
>> >             ambiguous to
>> >                         me.
>> >                               >>>
>> >                               >>> Victor Lazzarini
>> >                               >>> Dean of Arts, Celtic
>> >             Studies, and
>> >                         Philosophy
>> >                               >>> Maynooth University
>> >                               >>> Ireland
>> >                               >>>
>> >                               >>> On 29 Mar 2017, at 21:17,
>> >             John ff <
>> >                               [hidden email]> wrote:
>> >                               >>>
>> >                               >>> Partially working, but
>> >             domestic duties
>> >                         mean it
>> >                               will have to wait a while.
>> >                               >>>
>> >                               >>> Sent from TypeApp
>> >                               >>>> On 29 Mar 2017, at 14:09,
>> >             Tarmo
>> >                         Johannes <
>> >                               [hidden email]> wrote:
>> >                               >>>>
>> >                               >>>> John,
>> >                               >>>> What do you think, is it
>> >             easy to
>> >                         implement?
>> >                               >>>> Of course this is not q
>> >             high priority
>> >                         thing...
>> >                               >>>> Tarmo
>> >                               >>>>
>> >                               >>>> 29.03.2017 13:04 kirjutas
>> >             kuupäeval
>> >                         "Victor
>> >                               Lazzarini" <
>> >                               >>>>
>> >             [hidden email]>:
>> >                               >>>>>
>> >                               >>>>> At the moment no, you
>> >             can’t do that,
>> >                         as far as I
>> >                               know.
>> >                               >>>>> ========================
>> >                               >>>>> Prof. Victor Lazzarini
>> >                               >>>>> Dean of Arts, Celtic
>> >             Studies, and
>> >                         Philosophy,
>> >                               >>>>> Maynooth University,
>> >                               >>>>> Maynooth, Co Kildare,
>> >             Ireland
>> >                               >>>>> Tel: 00 353 7086936
>> >                               >>>>> Fax: 00 353 1 7086952
>> >                               >>>>>
>> >                               >>>>>> On 29 Mar 2017, at
>> >             09:41, Tarmo
>> >                         Johannes <
>> >                               [hidden email]> wrote:
>> >                               >>>>>>
>> >                               >>>>>> Hi,
>> >                               >>>>>>
>> >                               >>>>>> Would it be possible to
>> >             have in the
>> >                         score
>> >                               syntax where you can stop an
>> >                               >>>>>> indefinte named
>> >             instrument by
>> >                         adding '-' before
>> >                               the instrument name?
>> >                               >>>>>>
>> >                               >>>>>> Like
>> >                               >>>>>>
>> >                               >>>>>> i "sound" 0 -1
>> >                               >>>>>> i  -"sound" 1 0
>> >                               >>>>>>
>> >                               >>>>>> Does not work like that
>> >             right now,
>> >                               >>>>>>
>> >                               >>>>>> i -1 1 0 works as
>> >             expected.
>> >                               >>>>>>
>> >                               >>>>>> The full testing csd:
>> >                               >>>>>>
>> >                               >>>>>> ---
>> >                               >>>>>> <CsoundSynthesizer>
>> >                               >>>>>> <CsOptions>
>> >                               >>>>>> -odac -d
>> >                               >>>>>> </CsOptions>
>> >                               >>>>>> <CsInstruments>
>> >                               >>>>>>
>> >                               >>>>>> sr = 44100
>> >                               >>>>>> ksmps = 32
>> >                               >>>>>> nchnls = 2 0
>> >                               >>>>>> 0dbfs = 1
>> >                               >>>>>>
>> >                               >>>>>> instr sound
>> >                               >>>>>>      out
>> >             poscil(0.1,500)
>> >                               >>>>>>      ksec init 0
>> >                               >>>>>>      if (metro(1)==1)
>> >             then
>> >                               >>>>>>              printk2
>> >             ksec
>> >                               >>>>>>              ksec += 1
>> >                               >>>>>>      endif
>> >                               >>>>>> endin
>> >                               >>>>>>
>> >                               >>>>>> </CsInstruments>
>> >                               >>>>>> <CsScore>
>> >                               >>>>>> f 0 5
>> >                               >>>>>> i "sound" 0 -1
>> >                               >>>>>> i -"sound" 1 0 ; does
>> >             not work
>> >                               >>>>>> i -1 4 0 ; works
>> >                               >>>>>>
>> >                               >>>>>> </CsScore>
>> >                               >>>>>> </CsoundSynthesi 0zer>
>> >                               >>>>>>
>> >                               >>>>>> ---
>> >                               >>>>>>
>> >                               >>>>>> Should I file an issue?
>> >                               >>>>>>
>> >                               >>>>>> Thanks!
>> >                               >>>>>> tarmo
>> >                               >>>>>
>> >                               >>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

jpff
Believed working until someone produces a counter-example

On Mon, 17 Apr 2017, Michael Gogins wrote:

> What is the status of this? Does the "d" opcode now work with csoundReadScore?
>
> Best,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Wed, Apr 5, 2017 at 4:03 AM, Tarmo Johannes <[hidden email]> wrote:
>> Oh, John, I am sorry for the noise -
>>
>> I was preparing an example and it worked as expected -  I just needed to make
>> clean and rebuild the other program.
>>
>> Only thing  -  what is the syntax of 'd'  command? I tried
>>
>> d "sound" 1
>> d "sound" 1 0
>> d "-sound" 1
>>
>> but no effect.
>>
>> Thanks!
>> tarmo
>>
>> On teisipäev, 4. aprill 2017 15:22.34 EEST you wrote:
>>> Any chance of a program that fauls/  I never use the API so have noting
>>> trustworty to use as a test.
>>>
>>> re egaive p3 tee is a differece as to when te p1 is egated whih migt
>>> eplain it -- but again I never use eative pi, p2 or p3, or amed
>>> instruents.
>>>
>>> On Tue, 4 Apr 2017, Tarmo Johannes wrote:
>>>> Hi John,
>>>> Have you had chance to look at csoundInputMessaage function (or maybe
>>>> somewhere else) - after recent changes no events are produced when host
>>>> application is  calling csoundInputMessage...
>>>>
>>>> Thanks!
>>>> Tarmo
>>>>
>>>> 02.04.2017 0:37 kirjutas kuupäeval "Tarmo Johannes" <[hidden email]>:
>>>>       Thank you, John!
>>>>
>>>>       ires readscore {{ i "-sound" 1 0 }}
>>>>
>>>>       scoreline_i {{ i "-sound" 0 0 }}
>>>>
>>>> work both perfectly in the orchestra but it seems to me that
>>>> InputMessage API call does not work at all any more -  it does not even
>>>> start an instrument, nor numbered, nor named.
>>>>
>>>> Another interesting thing I noticed:
>>>> In the score, if to use negative  instrument number and also negative
>>>> instrument duration, it gets stopped as expected
>>>> i -1 1 -1 ; stops at 1st second
>>>>
>>>> but in case of named instrument, it is restarted again
>>>> i "-sound" 2 -1
>>>>
>>>>
>>>> Thanks!
>>>> tar,p
>>>>
>>>> 2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
>>>>       Can you try again?  And also try the d opcode -- in git now
>>>>
>>>>       On Fri, 31 Mar 2017, Tarmo Johannes wrote:
>>>>             Hi,
>>>>
>>>>             I did some testing how it works in the context
>>>>             of orchestra and found out that
>>>>             it works withe event and schedule opcode, but
>>>>             not with scoreline and
>>>>             readscore. Also it fails with csoundInputEvent
>>>>             API call. A testikng csd is
>>>>             below.
>>>>
>>>>             I hope it is easy to fix!
>>>>
>>>>             tarmo
>>>>             ----
>>>>
>>>>             <CsoundSynthesizer>
>>>>
>>>>             <CsOptions>
>>>>
>>>>             -odac -d
>>>>
>>>>             </CsOptions>
>>>>
>>>>             <CsInstruments>
>>>>
>>>>
>>>>             sr = 44100
>>>>
>>>>             ksmps = 32
>>>>
>>>>             nchnls = 2
>>>>
>>>>             0dbfs = 1
>>>>
>>>>
>>>>             schedule "sound",0,-1
>>>>
>>>>
>>>>             instr sound
>>>>
>>>>             out poscil(0.1,500)
>>>>
>>>>             ksec init 0
>>>>
>>>>             if (metro(1)==1) then
>>>>
>>>>             printk2 ksec
>>>>
>>>>             ksec += 1
>>>>
>>>>             endif
>>>>
>>>>             endin
>>>>
>>>>
>>>>             ; these fail:
>>>>
>>>>             ires readscore {{ i "-sound" 1 0 }}
>>>>
>>>>             scoreline_i {{ i "-sound" 2 0 }}
>>>>
>>>>
>>>>             ; these work:
>>>>
>>>>             schedule "-sound",3,0
>>>>
>>>>             schedule "sound",4,-1 ; restart sound
>>>>
>>>>             event_i "i", "-sound",5,0
>>>>
>>>>
>>>>             </CsInstruments>
>>>>
>>>>             <CsScore>
>>>>
>>>>             f 0 7
>>>>
>>>>             </CsScore>
>>>>
>>>>             </CsoundSynthesizer>
>>>>
>>>>             -----
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>             2017-03-30 21:28 GMT+03:00 Tarmo Johannes
>>>>             <[hidden email]>:
>>>>                   Perfect!
>>>>             Thanks a lot! this way I can solve one small
>>>>             problem in CsoundQt (using
>>>>             named instruments onder on/off event buttons)
>>>>
>>>>             tarmo
>>>>
>>>>             2017-03-30 14:55 GMT+03:00 jpff
>>>>             <[hidden email]>:
>>>>                   i "-sound" 1 0
>>>>
>>>>
>>>>                   On Thu, 30 Mar 2017, Tarmo Johannes wrote:
>>>>
>>>>                         Hi,
>>>>
>>>>                         Thanks!
>>>>
>>>>                         I guess you did not push yet?
>>>>                         I tried
>>>>
>>>>                         i -"sound" 1 0
>>>>
>>>>                         but no effect yet.
>>>>
>>>>
>>>>                         tarmo
>>>>
>>>>
>>>>                         2017-03-30 12:59 GMT+03:00 John ff
>>>>                         <[hidden email]>:
>>>>                               Oh well; the i "-foo" syntax
>>>>             is working
>>>>                         now.  Will look at a d
>>>>                               opcode.
>>>>
>>>>                         Sent from TypeApp
>>>>                         On 30 Mar 2017, at 08:06, Tarmo
>>>>             Johannes
>>>>                         <[hidden email]> wrote:
>>>>                               Hi,
>>>>                         I personally like the d (denote)
>>>>             syntax idea -
>>>>                         much clearer for
>>>>                         the user than
>>>>                         i -instrumentname
>>>>                         provided, it will work scoreline,
>>>>             event,
>>>>                         inputaMessage etc.
>>>>
>>>>                         Tarmo
>>>>
>>>>                         30.03.2017 8:30 kirjutas kuupäeval
>>>>             "Victor
>>>>                         Lazzarini" <
>>>>                         [hidden email]>:
>>>>                               Just as before. For numbered
>>>>             instruments,
>>>>                         it's
>>>>                               syntatic sugar, for named
>>>>             instruments, it
>>>>                         addresses a
>>>>                               shortcoming.
>>>>
>>>>                               Victor Lazzarini
>>>>                               Dean of Arts, Celtic Studies,
>>>>             and
>>>>                         Philosophy
>>>>                               Maynooth University
>>>>                               Ireland
>>>>
>>>>                              > On 30 Mar 2017, at 00:03,
>>>>             Steven Yi <
>>>>                               [hidden email]> wrote:
>>>>                              >
>>>>                              > My gut instinct is that I'd
>>>>             rather see
>>>>                         the i opcode
>>>>                               enhanced rather
>>>>                              > than introduce a new d score
>>>>             opcode
>>>>                         introduced.
>>>>                               Also, how would this
>>>>                              > interact with schedule and
>>>>             event orc
>>>>                         opcodes?
>>>>                              >
>>>>                              >> On Wed, Mar 29, 2017 at
>>>>             6:37 PM, John
>>>>                         ff <
>>>>                               [hidden email]> wrote:
>>>>                              >> Without double quotes there
>>>>             are no real
>>>>                         problems.
>>>>                               A d opcode is possible.
>>>>                              >>
>>>>                              >> Sent from TypeApp
>>>>                              >>> On 29 Mar 2017, at 21:33,
>>>>             Victor
>>>>                         Lazzarini <
>>>>                               [hidden email]>
>>>>             wrote:
>>>>                              >>>
>>>>                              >>> could we make double
>>>>             quotes in p1
>>>>                         optional? I mean
>>>>                              >>>
>>>>                              >>> i piano1 0 10
>>>>                              >>>
>>>>                              >>> or even in this case, make
>>>>             the i
>>>>                         opcode optional?
>>>>                              >>>
>>>>                              >>> piano1  0 10
>>>>                              >>>
>>>>                              >>> same as
>>>>                              >>>
>>>>                              >>> "piano1" 0 10
>>>>                              >>>
>>>>                              >>> or
>>>>                              >>>
>>>>                              >>> i "piano1"  0 10
>>>>                              >>>
>>>>                              >>> the semantics do not look
>>>>             ambiguous to
>>>>                         me.
>>>>                              >>>
>>>>                              >>> Victor Lazzarini
>>>>                              >>> Dean of Arts, Celtic
>>>>             Studies, and
>>>>                         Philosophy
>>>>                              >>> Maynooth University
>>>>                              >>> Ireland
>>>>                              >>>
>>>>                              >>> On 29 Mar 2017, at 21:17,
>>>>             John ff <
>>>>                               [hidden email]> wrote:
>>>>                              >>>
>>>>                              >>> Partially working, but
>>>>             domestic duties
>>>>                         mean it
>>>>                               will have to wait a while.
>>>>                              >>>
>>>>                              >>> Sent from TypeApp
>>>>                              >>>> On 29 Mar 2017, at 14:09,
>>>>             Tarmo
>>>>                         Johannes <
>>>>                               [hidden email]> wrote:
>>>>                              >>>>
>>>>                              >>>> John,
>>>>                              >>>> What do you think, is it
>>>>             easy to
>>>>                         implement?
>>>>                              >>>> Of course this is not q
>>>>             high priority
>>>>                         thing...
>>>>                              >>>> Tarmo
>>>>                              >>>>
>>>>                              >>>> 29.03.2017 13:04 kirjutas
>>>>             kuupäeval
>>>>                         "Victor
>>>>                               Lazzarini" <
>>>>                              >>>>
>>>>             [hidden email]>:
>>>>                              >>>>>
>>>>                              >>>>> At the moment no, you
>>>>             can’t do that,
>>>>                         as far as I
>>>>                               know.
>>>>                              >>>>> ========================
>>>>                              >>>>> Prof. Victor Lazzarini
>>>>                              >>>>> Dean of Arts, Celtic
>>>>             Studies, and
>>>>                         Philosophy,
>>>>                              >>>>> Maynooth University,
>>>>                              >>>>> Maynooth, Co Kildare,
>>>>             Ireland
>>>>                              >>>>> Tel: 00 353 7086936
>>>>                              >>>>> Fax: 00 353 1 7086952
>>>>                              >>>>>
>>>>                              >>>>>> On 29 Mar 2017, at
>>>>             09:41, Tarmo
>>>>                         Johannes <
>>>>                               [hidden email]> wrote:
>>>>                              >>>>>>
>>>>                              >>>>>> Hi,
>>>>                              >>>>>>
>>>>                              >>>>>> Would it be possible to
>>>>             have in the
>>>>                         score
>>>>                               syntax where you can stop an
>>>>                              >>>>>> indefinte named
>>>>             instrument by
>>>>                         adding '-' before
>>>>                               the instrument name?
>>>>                              >>>>>>
>>>>                              >>>>>> Like
>>>>                              >>>>>>
>>>>                              >>>>>> i "sound" 0 -1
>>>>                              >>>>>> i  -"sound" 1 0
>>>>                              >>>>>>
>>>>                              >>>>>> Does not work like that
>>>>             right now,
>>>>                              >>>>>>
>>>>                              >>>>>> i -1 1 0 works as
>>>>             expected.
>>>>                              >>>>>>
>>>>                              >>>>>> The full testing csd:
>>>>                              >>>>>>
>>>>                              >>>>>> ---
>>>>                              >>>>>> <CsoundSynthesizer>
>>>>                              >>>>>> <CsOptions>
>>>>                              >>>>>> -odac -d
>>>>                              >>>>>> </CsOptions>
>>>>                              >>>>>> <CsInstruments>
>>>>                              >>>>>>
>>>>                              >>>>>> sr = 44100
>>>>                              >>>>>> ksmps = 32
>>>>                              >>>>>> nchnls = 2 0
>>>>                              >>>>>> 0dbfs = 1
>>>>                              >>>>>>
>>>>                              >>>>>> instr sound
>>>>                              >>>>>>      out
>>>>             poscil(0.1,500)
>>>>                              >>>>>>      ksec init 0
>>>>                              >>>>>>      if (metro(1)==1)
>>>>             then
>>>>                              >>>>>>              printk2
>>>>             ksec
>>>>                              >>>>>>              ksec += 1
>>>>                              >>>>>>      endif
>>>>                              >>>>>> endin
>>>>                              >>>>>>
>>>>                              >>>>>> </CsInstruments>
>>>>                              >>>>>> <CsScore>
>>>>                              >>>>>> f 0 5
>>>>                              >>>>>> i "sound" 0 -1
>>>>                              >>>>>> i -"sound" 1 0 ; does
>>>>             not work
>>>>                              >>>>>> i -1 4 0 ; works
>>>>                              >>>>>>
>>>>                              >>>>>> </CsScore>
>>>>                              >>>>>> </CsoundSynthesi 0zer>
>>>>                              >>>>>>
>>>>                              >>>>>> ---
>>>>                              >>>>>>
>>>>                              >>>>>> Should I file an issue?
>>>>                              >>>>>>
>>>>                              >>>>>> Thanks!
>>>>                              >>>>>> tarmo
>>>>                              >>>>>
>>>>                              >>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] negative p1 with named instrument

Tarmo Johannes-3
Hi,

syntax like

scoreline_i {{ d "sound" 0 0 }}

does not work yet and accordingly aslo csoundReadScore a small testing c-file
below and attached.

tarmo

--------


// compile gcc -DUSE_DOUBLE -o imtest inputMessageTest.c -lcsound64

#include <csound/csound.h>
#include <stdio.h>

const char* orc = "sr=44100\n"
  "ksmps=32\n"
  "nchnls=2\n"
  "0dbfs=1\n\n"
  "instr 1\n"
  "aout vco2 0.5, 440\n"
  "outs aout, aout\n"
  "endin";

const char* sco = "f0 5\ni1 0 -1";

int main(int arg, char** argv) {

  csoundInitialize(CSOUNDINIT_NO_ATEXIT);
  CSOUND* csound = csoundCreate(NULL);
  csoundSetOption(csound, "-odac");
   csoundCompileOrc(csound, orc);  
  csoundReadScore(csound, (char*)sco);
  csoundStart(csound);
  csoundReadScore(csound, "d 1 1 0");

  while (csoundPerformKsmps(csound) == 0) {
    /* pass for now */
  }

    csoundStop(csound);
    return 0;
}



On teisipäev, 18. aprill 2017 10:14.09 EEST you wrote:

> Believed working until someone produces a counter-example
>
> On Mon, 17 Apr 2017, Michael Gogins wrote:
> > What is the status of this? Does the "d" opcode now work with
> > csoundReadScore?
> >
> > Best,
> > Mike
> >
> > -----------------------------------------------------
> > Michael Gogins
> > Irreducible Productions
> > http://michaelgogins.tumblr.com
> > Michael dot Gogins at gmail dot com
> >
> > On Wed, Apr 5, 2017 at 4:03 AM, Tarmo Johannes <[hidden email]> wrote:
> >> Oh, John, I am sorry for the noise -
> >>
> >> I was preparing an example and it worked as expected -  I just needed to
> >> make clean and rebuild the other program.
> >>
> >> Only thing  -  what is the syntax of 'd'  command? I tried
> >>
> >> d "sound" 1
> >> d "sound" 1 0
> >> d "-sound" 1
> >>
> >> but no effect.
> >>
> >> Thanks!
> >> tarmo
> >>
> >> On teisipäev, 4. aprill 2017 15:22.34 EEST you wrote:
> >>> Any chance of a program that fauls/  I never use the API so have noting
> >>> trustworty to use as a test.
> >>>
> >>> re egaive p3 tee is a differece as to when te p1 is egated whih migt
> >>> eplain it -- but again I never use eative pi, p2 or p3, or amed
> >>> instruents.
> >>>
> >>> On Tue, 4 Apr 2017, Tarmo Johannes wrote:
> >>>> Hi John,
> >>>> Have you had chance to look at csoundInputMessaage function (or maybe
> >>>> somewhere else) - after recent changes no events are produced when host
> >>>> application is  calling csoundInputMessage...
> >>>>
> >>>> Thanks!
> >>>> Tarmo
> >>>>
> >>>> 02.04.2017 0:37 kirjutas kuupäeval "Tarmo Johannes"
<[hidden email]>:

> >>>>       Thank you, John!
> >>>>      
> >>>>       ires readscore {{ i "-sound" 1 0 }}
> >>>>      
> >>>>       scoreline_i {{ i "-sound" 0 0 }}
> >>>>
> >>>> work both perfectly in the orchestra but it seems to me that
> >>>> InputMessage API call does not work at all any more -  it does not even
> >>>> start an instrument, nor numbered, nor named.
> >>>>
> >>>> Another interesting thing I noticed:
> >>>> In the score, if to use negative  instrument number and also negative
> >>>> instrument duration, it gets stopped as expected
> >>>> i -1 1 -1 ; stops at 1st second
> >>>>
> >>>> but in case of named instrument, it is restarted again
> >>>> i "-sound" 2 -1
> >>>>
> >>>>
> >>>> Thanks!
> >>>> tar,p
> >>>>
> >>>> 2017-04-01 23:32 GMT+03:00 jpff <[hidden email]>:
> >>>>       Can you try again?  And also try the d opcode -- in git now
> >>>>      
> >>>>       On Fri, 31 Mar 2017, Tarmo Johannes wrote:
> >>>>             Hi,
> >>>>            
> >>>>             I did some testing how it works in the context
> >>>>             of orchestra and found out that
> >>>>             it works withe event and schedule opcode, but
> >>>>             not with scoreline and
> >>>>             readscore. Also it fails with csoundInputEvent
> >>>>             API call. A testikng csd is
> >>>>             below.
> >>>>            
> >>>>             I hope it is easy to fix!
> >>>>            
> >>>>             tarmo
> >>>>             ----
> >>>>            
> >>>>             <CsoundSynthesizer>
> >>>>            
> >>>>             <CsOptions>
> >>>>            
> >>>>             -odac -d
> >>>>            
> >>>>             </CsOptions>
> >>>>            
> >>>>             <CsInstruments>
> >>>>            
> >>>>            
> >>>>             sr = 44100
> >>>>            
> >>>>             ksmps = 32
> >>>>            
> >>>>             nchnls = 2
> >>>>            
> >>>>             0dbfs = 1
> >>>>            
> >>>>            
> >>>>             schedule "sound",0,-1
> >>>>            
> >>>>            
> >>>>             instr sound
> >>>>            
> >>>>             out poscil(0.1,500)
> >>>>            
> >>>>             ksec init 0
> >>>>            
> >>>>             if (metro(1)==1) then
> >>>>            
> >>>>             printk2 ksec
> >>>>            
> >>>>             ksec += 1
> >>>>            
> >>>>             endif
> >>>>            
> >>>>             endin
> >>>>            
> >>>>            
> >>>>             ; these fail:
> >>>>            
> >>>>             ires readscore {{ i "-sound" 1 0 }}
> >>>>            
> >>>>             scoreline_i {{ i "-sound" 2 0 }}
> >>>>            
> >>>>            
> >>>>             ; these work:
> >>>>            
> >>>>             schedule "-sound",3,0
> >>>>            
> >>>>             schedule "sound",4,-1 ; restart sound
> >>>>            
> >>>>             event_i "i", "-sound",5,0
> >>>>            
> >>>>            
> >>>>             </CsInstruments>
> >>>>            
> >>>>             <CsScore>
> >>>>            
> >>>>             f 0 7
> >>>>            
> >>>>             </CsScore>
> >>>>            
> >>>>             </CsoundSynthesizer>
> >>>>            
> >>>>             -----
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>            
> >>>>             2017-03-30 21:28 GMT+03:00 Tarmo Johannes
> >>>>            
> >>>>             <[hidden email]>:
> >>>>                   Perfect!
> >>>>            
> >>>>             Thanks a lot! this way I can solve one small
> >>>>             problem in CsoundQt (using
> >>>>             named instruments onder on/off event buttons)
> >>>>            
> >>>>             tarmo
> >>>>            
> >>>>             2017-03-30 14:55 GMT+03:00 jpff
> >>>>            
> >>>>             <[hidden email]>:
> >>>>                   i "-sound" 1 0
> >>>>                  
> >>>>                   On Thu, 30 Mar 2017, Tarmo Johannes wrote:
> >>>>                         Hi,
> >>>>                        
> >>>>                         Thanks!
> >>>>                        
> >>>>                         I guess you did not push yet?
> >>>>                         I tried
> >>>>                        
> >>>>                         i -"sound" 1 0
> >>>>                        
> >>>>                         but no effect yet.
> >>>>                        
> >>>>                        
> >>>>                         tarmo
> >>>>                        
> >>>>                        
> >>>>                         2017-03-30 12:59 GMT+03:00 John ff
> >>>>                        
> >>>>                         <[hidden email]>:
> >>>>                               Oh well; the i "-foo" syntax
> >>>>            
> >>>>             is working
> >>>>            
> >>>>                         now.  Will look at a d
> >>>>                        
> >>>>                               opcode.
> >>>>                        
> >>>>                         Sent from TypeApp
> >>>>                         On 30 Mar 2017, at 08:06, Tarmo
> >>>>            
> >>>>             Johannes
> >>>>            
> >>>>                         <[hidden email]> wrote:
> >>>>                               Hi,
> >>>>                        
> >>>>                         I personally like the d (denote)
> >>>>            
> >>>>             syntax idea -
> >>>>            
> >>>>                         much clearer for
> >>>>                         the user than
> >>>>                         i -instrumentname
> >>>>                         provided, it will work scoreline,
> >>>>            
> >>>>             event,
> >>>>            
> >>>>                         inputaMessage etc.
> >>>>                        
> >>>>                         Tarmo
> >>>>                        
> >>>>                         30.03.2017 8:30 kirjutas kuupäeval
> >>>>            
> >>>>             "Victor
> >>>>            
> >>>>                         Lazzarini" <
> >>>>                        
> >>>>                         [hidden email]>:
> >>>>                               Just as before. For numbered
> >>>>            
> >>>>             instruments,
> >>>>            
> >>>>                         it's
> >>>>                        
> >>>>                               syntatic sugar, for named
> >>>>            
> >>>>             instruments, it
> >>>>            
> >>>>                         addresses a
> >>>>                        
> >>>>                               shortcoming.
> >>>>                              
> >>>>                               Victor Lazzarini
> >>>>                               Dean of Arts, Celtic Studies,
> >>>>            
> >>>>             and
> >>>>            
> >>>>                         Philosophy
> >>>>                        
> >>>>                               Maynooth University
> >>>>                               Ireland
> >>>>                              
> >>>>                              > On 30 Mar 2017, at 00:03,
> >>>>            
> >>>>             Steven Yi <
> >>>>            
> >>>>                               [hidden email]> wrote:
> >>>>                              > My gut instinct is that I'd
> >>>>            
> >>>>             rather see
> >>>>            
> >>>>                         the i opcode
> >>>>                        
> >>>>                               enhanced rather
> >>>>                              
> >>>>                              > than introduce a new d score
> >>>>            
> >>>>             opcode
> >>>>            
> >>>>                         introduced.
> >>>>                        
> >>>>                               Also, how would this
> >>>>                              
> >>>>                              > interact with schedule and
> >>>>            
> >>>>             event orc
> >>>>            
> >>>>                         opcodes?
> >>>>                        
> >>>>                              >> On Wed, Mar 29, 2017 at
> >>>>            
> >>>>             6:37 PM, John
> >>>>            
> >>>>                         ff <
> >>>>                        
> >>>>                               [hidden email]> wrote:
> >>>>                              >> Without double quotes there
> >>>>            
> >>>>             are no real
> >>>>            
> >>>>                         problems.
> >>>>                        
> >>>>                               A d opcode is possible.
> >>>>                              
> >>>>                              >> Sent from TypeApp
> >>>>                              >>
> >>>>                              >>> On 29 Mar 2017, at 21:33,
> >>>>            
> >>>>             Victor
> >>>>            
> >>>>                         Lazzarini <
> >>>>                        
> >>>>                               [hidden email]>
> >>>>            
> >>>>             wrote:
> >>>>                              >>> could we make double
> >>>>            
> >>>>             quotes in p1
> >>>>            
> >>>>                         optional? I mean
> >>>>                        
> >>>>                              >>> i piano1 0 10
> >>>>                              >>>
> >>>>                              >>> or even in this case, make
> >>>>            
> >>>>             the i
> >>>>            
> >>>>                         opcode optional?
> >>>>                        
> >>>>                              >>> piano1  0 10
> >>>>                              >>>
> >>>>                              >>> same as
> >>>>                              >>>
> >>>>                              >>> "piano1" 0 10
> >>>>                              >>>
> >>>>                              >>> or
> >>>>                              >>>
> >>>>                              >>> i "piano1"  0 10
> >>>>                              >>>
> >>>>                              >>> the semantics do not look
> >>>>            
> >>>>             ambiguous to
> >>>>            
> >>>>                         me.
> >>>>                        
> >>>>                              >>> Victor Lazzarini
> >>>>                              >>> Dean of Arts, Celtic
> >>>>            
> >>>>             Studies, and
> >>>>            
> >>>>                         Philosophy
> >>>>                        
> >>>>                              >>> Maynooth University
> >>>>                              >>> Ireland
> >>>>                              >>>
> >>>>                              >>> On 29 Mar 2017, at 21:17,
> >>>>            
> >>>>             John ff <
> >>>>            
> >>>>                               [hidden email]> wrote:
> >>>>                              >>> Partially working, but
> >>>>            
> >>>>             domestic duties
> >>>>            
> >>>>                         mean it
> >>>>                        
> >>>>                               will have to wait a while.
> >>>>                              
> >>>>                              >>> Sent from TypeApp
> >>>>                              >>>
> >>>>                              >>>> On 29 Mar 2017, at 14:09,
> >>>>            
> >>>>             Tarmo
> >>>>            
> >>>>                         Johannes <
> >>>>                        
> >>>>                               [hidden email]> wrote:
> >>>>                              >>>> John,
> >>>>                              >>>> What do you think, is it
> >>>>            
> >>>>             easy to
> >>>>            
> >>>>                         implement?
> >>>>                        
> >>>>                              >>>> Of course this is not q
> >>>>            
> >>>>             high priority
> >>>>            
> >>>>                         thing...
> >>>>                        
> >>>>                              >>>> Tarmo
> >>>>                              >>>>
> >>>>                              >>>> 29.03.2017 13:04 kirjutas
> >>>>            
> >>>>             kuupäeval
> >>>>            
> >>>>                         "Victor
> >>>>                        
> >>>>                               Lazzarini" <
> >>>>            
> >>>>             [hidden email]>:
> >>>>                              >>>>> At the moment no, you
> >>>>            
> >>>>             can’t do that,
> >>>>            
> >>>>                         as far as I
> >>>>                        
> >>>>                               know.
> >>>>                              
> >>>>                              >>>>> ========================
> >>>>                              >>>>> Prof. Victor Lazzarini
> >>>>                              >>>>> Dean of Arts, Celtic
> >>>>            
> >>>>             Studies, and
> >>>>            
> >>>>                         Philosophy,
> >>>>                        
> >>>>                              >>>>> Maynooth University,
> >>>>                              >>>>> Maynooth, Co Kildare,
> >>>>            
> >>>>             Ireland
> >>>>            
> >>>>                              >>>>> Tel: 00 353 7086936
> >>>>                              >>>>> Fax: 00 353 1 7086952
> >>>>                              >>>>>
> >>>>                              >>>>>> On 29 Mar 2017, at
> >>>>            
> >>>>             09:41, Tarmo
> >>>>            
> >>>>                         Johannes <
> >>>>                        
> >>>>                               [hidden email]> wrote:
> >>>>                              >>>>>> Hi,
> >>>>                              >>>>>>
> >>>>                              >>>>>> Would it be possible to
> >>>>            
> >>>>             have in the
> >>>>            
> >>>>                         score
> >>>>                        
> >>>>                               syntax where you can stop an
> >>>>                              
> >>>>                              >>>>>> indefinte named
> >>>>            
> >>>>             instrument by
> >>>>            
> >>>>                         adding '-' before
> >>>>                        
> >>>>                               the instrument name?
> >>>>                              
> >>>>                              >>>>>> Like
> >>>>                              >>>>>>
> >>>>                              >>>>>> i "sound" 0 -1
> >>>>                              >>>>>> i  -"sound" 1 0
> >>>>                              >>>>>>
> >>>>                              >>>>>> Does not work like that
> >>>>            
> >>>>             right now,
> >>>>            
> >>>>                              >>>>>> i -1 1 0 works as
> >>>>            
> >>>>             expected.
> >>>>            
> >>>>                              >>>>>> The full testing csd:
> >>>>                              >>>>>>
> >>>>                              >>>>>> ---
> >>>>                              >>>>>> <CsoundSynthesizer>
> >>>>                              >>>>>> <CsOptions>
> >>>>                              >>>>>> -odac -d
> >>>>                              >>>>>> </CsOptions>
> >>>>                              >>>>>> <CsInstruments>
> >>>>                              >>>>>>
> >>>>                              >>>>>> sr = 44100
> >>>>                              >>>>>> ksmps = 32
> >>>>                              >>>>>> nchnls = 2 0
> >>>>                              >>>>>> 0dbfs = 1
> >>>>                              >>>>>>
> >>>>                              >>>>>> instr sound
> >>>>                              >>>>>>
> >>>>                              >>>>>>      out
> >>>>            
> >>>>             poscil(0.1,500)
> >>>>            
> >>>>                              >>>>>>      ksec init 0
> >>>>                              >>>>>>      if (metro(1)==1)
> >>>>            
> >>>>             then
> >>>>            
> >>>>                              >>>>>>              printk2
> >>>>            
> >>>>             ksec
> >>>>            
> >>>>                              >>>>>>              ksec += 1
> >>>>                              >>>>>>      
> >>>>                              >>>>>>      endif
> >>>>                              >>>>>>
> >>>>                              >>>>>> endin
> >>>>                              >>>>>>
> >>>>                              >>>>>> </CsInstruments>
> >>>>                              >>>>>> <CsScore>
> >>>>                              >>>>>> f 0 5
> >>>>                              >>>>>> i "sound" 0 -1
> >>>>                              >>>>>> i -"sound" 1 0 ; does
> >>>>            
> >>>>             not work
> >>>>            
> >>>>                              >>>>>> i -1 4 0 ; works
> >>>>                              >>>>>>
> >>>>                              >>>>>> </CsScore>
> >>>>                              >>>>>> </CsoundSynthesi 0zer>
> >>>>                              >>>>>>
> >>>>                              >>>>>> ---
> >>>>                              >>>>>>
> >>>>                              >>>>>> Should I file an issue?
> >>>>                              >>>>>>
> >>>>                              >>>>>> Thanks!
> >>>>                              >>>>>> tarmo


inputMessageTest.c (753 bytes) Download Attachment
12