Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k() in cs7 not working as in cs6 #1697

Open
joachimheintz opened this issue Mar 9, 2023 · 1 comment
Open

k() in cs7 not working as in cs6 #1697

joachimheintz opened this issue Mar 9, 2023 · 1 comment
Labels
Milestone

Comments

@joachimheintz
Copy link
Contributor

for sending a constant value, say 1, to a k-channel in csound 6, i had to use k(1).
this is not any more working in cs7 develop (--Csound version 7.0 (double samples) Mar 9 2023, [commit: 2503fc0]).

the csd below returns this error:

error: error: opcode 'k' for expression with arg types cS not found, line 14
from file test.csd (1)
error: Unable to find opcode entry for 'chnset' with matching argument types:
Found:
(null) chnset @
Candidates:
chnset.i iS
chnset.k kS
chnset.a aS
chnset.S SS

in my opinion, it would be good to have both possibilities as legal, either
chnset 1, "bla"
or
chnset k(1), "bla"

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1

chn_k "bla",2

instr 1
 chnset k(1), "bla"
endin

</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>
@kunstmusik kunstmusik added this to the 7.0.0 milestone Nov 5, 2023
@vlazzarini
Copy link
Member

vlazzarini commented Apr 1, 2024

This seems to be a bug in the parser,

error: error: opcode 'k' for expression with arg types cS not found, line 14

this indicates that the parser is reading both 1 and "bla" as arguments to k.

I tested with a1 oscil k(1), 100 and that did not give trouble.

@vlazzarini vlazzarini added the bug label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

3 participants