csound / csound

Main repository for Csound
https://csound.com
GNU Lesser General Public License v2.1
1.24k stars 192 forks source link

Compiling orchestra only and using `scoreline_i` produces incorrect error about p-fields #1604

Closed nwhetsell closed 2 years ago

nwhetsell commented 2 years ago

In Csound 6.17 (f5b4258794a82c99f7d85f1807c6638f2e80ccac), running:

cat <<EOS > test.orc
instr 1
  out vco2(linseg(0.1 * 0dbfs, 0.5, 0), cpspch(p4), 2, 0.5)
endin
scoreline_i {{
i 1 0 0.07  9.11
i . + 0.5  10.04
e
}}
EOS
csound --orc --output=dac test.orc

prints this as part of the output:

--Csound version 6.17 (double samples) Apr  1 2022
[commit: f5b4258794a82c99f7d85f1807c6638f2e80ccac]
libsndfile-1.1.0
⋮
SECTION 1:
too many pfieldsnew alloc for instr 1:
new alloc for instr 1:
WARNING: instr 1 uses 4 p-fields but is given 1998
⋮

Instrument 1 is in fact given 4 p-fields, not 1,998. No sound is produced.

Running—

cat <<EOS > test.csd
<CsoundSynthesizer>
<CsInstruments>
instr 1
    out vco2(linseg(0.1 * 0dbfs, 0.5, 0), cpspch(p4), 2, 0.5)
endin
</CsInstruments>
<CsScore>
i 1 0 0.07  9.11
i . + 0.5  10.04
e
</CsScore>
</CsoundSynthesizer>
EOS
csound --output=dac test.csd

—which uses the exact same orchestra and score, just in a CSD file—produces the expected output.

vlazzarini commented 2 years ago

scoreline_i cannot do any score preprocessing, only RT events with literals. You need to use readscore to do some (but not all) score preprocessing (and remove 'e').