Csound Csound-dev Csound-tekno Search About

Re: [Csnd] [EXTERNAL] [Csnd] named instruments issue with livecoding

Date2021-08-04 07:47
Fromjacopo greco d'alceo
SubjectRe: [Csnd] [EXTERNAL] [Csnd] named instruments issue with livecoding
Thank you Pete and thank you everyone for your answers.

Let me say I use the Steven Yi's livecoding. I open csound and a server, I charge all my instrument and stuff and than I start livecoding.
Using this method, allows me to control and send message to csound from all kind of platform. In this particular case, I am trying to send from reaper some slice of "livecoding" written in a timeline: I send all the different code, every slice is under a different instrument that it is sent with his "schedule" and his time in the timeline.

Anyway, this kind of problem is there even in a "classical way": I use VIM to send messages to csound.
It is really strange, because now I tried again (on the live.csound site and on my computer) and sometimes I get all my three different numbers and sometimes I get only one (the same number). This is complicated because I cannot anymore addressing to different instrument because the last one is suppressing the others!
As I said, I need to use named instruments when I livecode because csound charge all my orchestra at the beginning, addressing a number to all my named instruments. 

What do you think could be the issue?

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

Date2021-08-04 08:01
FromEduardo Moguillansky
SubjectRe: [Csnd] [EXTERNAL] [Csnd] named instruments issue with livecoding
This seems like a race condition in csound

On 04.08.21 08:47, jacopo greco d'alceo wrote:
> Thank you Pete and thank you everyone for your answers.
>
> Let me say I use the Steven Yi's livecoding. I open csound and a server, I charge all my instrument and stuff and than I start livecoding.
> Using this method, allows me to control and send message to csound from all kind of platform. In this particular case, I am trying to send from reaper some slice of "livecoding" written in a timeline: I send all the different code, every slice is under a different instrument that it is sent with his "schedule" and his time in the timeline.
>
> Anyway, this kind of problem is there even in a "classical way": I use VIM to send messages to csound.
> It is really strange, because now I tried again (on the live.csound site and on my computer) and sometimes I get all my three different numbers and sometimes I get only one (the same number). This is complicated because I cannot anymore addressing to different instrument because the last one is suppressing the others!
> As I said, I need to use named instruments when I livecode because csound charge all my orchestra at the beginning, addressing a number to all my named instruments.
>
> What do you think could be the issue?
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

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

Date2021-08-04 10:53
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] named instruments issue with livecoding
Could be, but off the top of my head, the sequence in a single thread is:

compile all instruments, assigning the names to numbers
run instr0 and the schedule calls

resulting in what Pete Goodeve has reported. There's probably more differences between the two. Maybe we need Steven to look into this as it involves his live coding setup.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On Aug 4, 2021, at 8:01 AM, Eduardo Moguillansky  wrote:
> 
> This seems like a race condition in csound
> 
>> On 04.08.21 08:47, jacopo greco d'alceo wrote:
>> Thank you Pete and thank you everyone for your answers.
>> 
>> Let me say I use the Steven Yi's livecoding. I open csound and a server, I charge all my instrument and stuff and than I start livecoding.
>> Using this method, allows me to control and send message to csound from all kind of platform. In this particular case, I am trying to send from reaper some slice of "livecoding" written in a timeline: I send all the different code, every slice is under a different instrument that it is sent with his "schedule" and his time in the timeline.
>> 
>> Anyway, this kind of problem is there even in a "classical way": I use VIM to send messages to csound.
>> It is really strange, because now I tried again (on the live.csound site and on my computer) and sometimes I get all my three different numbers and sometimes I get only one (the same number). This is complicated because I cannot anymore addressing to different instrument because the last one is suppressing the others!
>> As I said, I need to use named instruments when I livecode because csound charge all my orchestra at the beginning, addressing a number to all my named instruments.
>> 
>> What do you think could be the issue?
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=st3WJQ2vfh0hEyhIsq4SzoLkIansPbTw8xfthSSzoIg%3D&reserved=0
>> Send bugs reports to
>>         https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1SDjjWw92C06%2BnvhlXqdHkF1dSKCZYri7%2FWGZgSfA9Q%3D&reserved=0
>> Discussions of bugs and features can be posted here
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=st3WJQ2vfh0hEyhIsq4SzoLkIansPbTw8xfthSSzoIg%3D&reserved=0
> Send bugs reports to
>       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1SDjjWw92C06%2BnvhlXqdHkF1dSKCZYri7%2FWGZgSfA9Q%3D&reserved=0
> Discussions of bugs and features can be posted here

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

Date2021-08-04 14:56
FromSteven Yi
SubjectRe: [Csnd] [EXTERNAL] [Csnd] named instruments issue with livecoding
Shouldn't be an issue with the csound-live-code, it's just sending messages via UDP.  I would guess that this may be related to csoundCompileOrcAsync (which UDP server uses), and that was mentioned to have an issue by Eduardo on the dev list and that I had replied to:


I'm not sure if that was ever addressed?  Also, I think some part of this was modified during a pull request but I can't recall exactly.  Jacopo: Which version of Csound are you using?


On Wed, Aug 4, 2021 at 5:54 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Could be, but off the top of my head, the sequence in a single thread is:

compile all instruments, assigning the names to numbers
run instr0 and the schedule calls

resulting in what Pete Goodeve has reported. There's probably more differences between the two. Maybe we need Steven to look into this as it involves his live coding setup.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On Aug 4, 2021, at 8:01 AM, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>
> This seems like a race condition in csound
>
>> On 04.08.21 08:47, jacopo greco d'alceo wrote:
>> Thank you Pete and thank you everyone for your answers.
>>
>> Let me say I use the Steven Yi's livecoding. I open csound and a server, I charge all my instrument and stuff and than I start livecoding.
>> Using this method, allows me to control and send message to csound from all kind of platform. In this particular case, I am trying to send from reaper some slice of "livecoding" written in a timeline: I send all the different code, every slice is under a different instrument that it is sent with his "schedule" and his time in the timeline.
>>
>> Anyway, this kind of problem is there even in a "classical way": I use VIM to send messages to csound.
>> It is really strange, because now I tried again (on the live.csound site and on my computer) and sometimes I get all my three different numbers and sometimes I get only one (the same number). This is complicated because I cannot anymore addressing to different instrument because the last one is suppressing the others!
>> As I said, I need to use named instruments when I livecode because csound charge all my orchestra at the beginning, addressing a number to all my named instruments.
>>
>> What do you think could be the issue?
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=st3WJQ2vfh0hEyhIsq4SzoLkIansPbTw8xfthSSzoIg%3D&amp;reserved=0
>> Send bugs reports to
>>         https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1SDjjWw92C06%2BnvhlXqdHkF1dSKCZYri7%2FWGZgSfA9Q%3D&amp;reserved=0
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=st3WJQ2vfh0hEyhIsq4SzoLkIansPbTw8xfthSSzoIg%3D&amp;reserved=0
> Send bugs reports to
>       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1SDjjWw92C06%2BnvhlXqdHkF1dSKCZYri7%2FWGZgSfA9Q%3D&amp;reserved=0
> Discussions of bugs and features can be posted here

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

Date2021-08-04 16:43
Fromjacopo mascheroni
SubjectRe: [Csnd] [EXTERNAL] [Csnd] named instruments issue with livecoding
@johnff: What I mean for livecoding is for exemple: I take this CSD - without including any orchestra or others - and run with terminal:

<CsoundSynthesizer>
<CsOptions>
--port=10000
--format=24bit
-m0
--udp-echo
</CsOptions>
<CsInstruments>

sr      = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

</CsInstruments>
</CsoundSynthesizer>

Then with VIM I send all this code (UDP port 10000), for exemple, as I said in the first message:

instr inst9B589C8D
print p1
endin
schedule "inst9B589C8D", 1.0, 0.5

instr inst0A7FFD81
print p1
endin
schedule "inst0A7FFD81", 2.0, 0.5

instr inst0941D201
print p1
endin
schedule "inst0941D201", 3.0, 0.5

The first time I open, I’ve got:

instr 1:  p1 = 1.000
instr 2:  p1 = 2.000
instr 3:  p1 = 3.000

Then if I close csound and re-open the same file without closing the terminal I’ve got:

instr 1:  p1 = 1.000
instr 2:  p1 = 1.000
instr 3:  p1 = 1.000

Sometimes it changes and sometimes no.

//

@Steven: I’m running:

Csound version 6.16 (double samples) Jul 17 2021
macOS Catalina 10.15.7 - MacBook Pro (15-inch, Mid 2012)

Thank you for your help.

jacopo



On 4 Aug 2021, at 15:56, Steven Yi <stevenyi@GMAIL.COM> wrote:

Shouldn't be an issue with the csound-live-code, it's just sending messages via UDP.  I would guess that this may be related to csoundCompileOrcAsync (which UDP server uses), and that was mentioned to have an issue by Eduardo on the dev list and that I had replied to:


I'm not sure if that was ever addressed?  Also, I think some part of this was modified during a pull request but I can't recall exactly.  Jacopo: Which version of Csound are you using?


On Wed, Aug 4, 2021 at 5:54 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Could be, but off the top of my head, the sequence in a single thread is:

compile all instruments, assigning the names to numbers
run instr0 and the schedule calls

resulting in what Pete Goodeve has reported. There's probably more differences between the two. Maybe we need Steven to look into this as it involves his live coding setup.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On Aug 4, 2021, at 8:01 AM, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>
> This seems like a race condition in csound
>
>> On 04.08.21 08:47, jacopo greco d'alceo wrote:
>> Thank you Pete and thank you everyone for your answers.
>>
>> Let me say I use the Steven Yi's livecoding. I open csound and a server, I charge all my instrument and stuff and than I start livecoding.
>> Using this method, allows me to control and send message to csound from all kind of platform. In this particular case, I am trying to send from reaper some slice of "livecoding" written in a timeline: I send all the different code, every slice is under a different instrument that it is sent with his "schedule" and his time in the timeline.
>>
>> Anyway, this kind of problem is there even in a "classical way": I use VIM to send messages to csound.
>> It is really strange, because now I tried again (on the live.csound site and on my computer) and sometimes I get all my three different numbers and sometimes I get only one (the same number). This is complicated because I cannot anymore addressing to different instrument because the last one is suppressing the others!
>> As I said, I need to use named instruments when I livecode because csound charge all my orchestra at the beginning, addressing a number to all my named instruments.
>>
>> What do you think could be the issue?
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=st3WJQ2vfh0hEyhIsq4SzoLkIansPbTw8xfthSSzoIg%3D&amp;reserved=0
>> Send bugs reports to
>>         https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1SDjjWw92C06%2BnvhlXqdHkF1dSKCZYri7%2FWGZgSfA9Q%3D&amp;reserved=0
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=st3WJQ2vfh0hEyhIsq4SzoLkIansPbTw8xfthSSzoIg%3D&amp;reserved=0
> Send bugs reports to
>       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C45a2a057c751450bb72e08d95715a869%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637636572833295887%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1SDjjWw92C06%2BnvhlXqdHkF1dSKCZYri7%2FWGZgSfA9Q%3D&amp;reserved=0
> Discussions of bugs and features can be posted here

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