Re: [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

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

I think we might have fixed this now. I ran your test (but removed the -m0 so we can read msgs). The
test gave me these printouts on a sequence of runs of your code, always allocating the instrument numbers
correctly. This fix is now on git develop branch.

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
instr inst9B589C8D uses instrument number 1
instr inst0A7FFD81 uses instrument number 2
instr inst0941D201 uses instrument number 3
  rtevent: T 18.771 TT 18.771 M: 0.00000 0.00000
new alloc for instr inst9B589C8D:
instr 1: p1 = 1.000
  rtevent: T 19.771 TT 19.771 M: 0.00000 0.00000
new alloc for instr inst0A7FFD81:
instr 2: p1 = 2.000
  rtevent: T 20.771 TT 20.771 M: 0.00000 0.00000
new alloc for instr inst0941D201:
instr 3: p1 = 3.000
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
instr inst9B589C8D uses instrument number 1
instr inst0A7FFD81 uses instrument number 2
instr inst0941D201 uses instrument number 3
  rtevent: T 28.713 TT 28.713 M: 0.00000 0.00000
new alloc for instr inst9B589C8D:
instr 1: p1 = 1.000
  rtevent: T 29.713 TT 29.713 M: 0.00000 0.00000
new alloc for instr inst0A7FFD81:
instr 2: p1 = 2.000
  rtevent: T 30.713 TT 30.713 M: 0.00000 0.00000
new alloc for instr inst0941D201:
instr 3: p1 = 3.000
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
instr inst9B589C8D uses instrument number 1
instr inst0A7FFD81 uses instrument number 2
instr inst0941D201 uses instrument number 3
  rtevent: T 38.739 TT 38.739 M: 0.00000 0.00000
new alloc for instr inst9B589C8D:
instr 1: p1 = 1.000
  rtevent: T 39.739 TT 39.739 M: 0.00000 0.00000
new alloc for instr inst0A7FFD81:
instr 2: p1 = 2.000
  rtevent: T 40.739 TT 40.739 M: 0.00000 0.00000
new alloc for instr inst0941D201:
instr 3: p1 = 3.000
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
instr inst9B589C8D uses instrument number 1
instr inst0A7FFD81 uses instrument number 2
instr inst0941D201 uses instrument number 3
  rtevent: T 63.081 TT 63.081 M: 0.00000 0.00000
new alloc for instr inst9B589C8D:
instr 1: p1 = 1.000
  rtevent: T 64.081 TT 64.081 M: 0.00000 0.00000
new alloc for instr inst0A7FFD81:
instr 2: p1 = 2.000
  rtevent: T 65.081 TT 65.081 M: 0.00000 0.00000
new alloc for instr inst0941D201:
instr 3: p1 = 3.000