Re: [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
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

This seems like a race condition in csound

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

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:

https://listserv.heanet.ie/cgi-bin/wa?A2=ind2104&L=CSOUND-DEV&P=57

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?

@johnff: What I mean for livecoding is for exemple: I take this CSD - without including any orchestra or others - and run with terminal:

–port=10000

–format=24bit

-m0

–udp-echo

sr = 48000

ksmps = 32

nchnls = 2

0dbfs = 1

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