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

opcode (udo) entry #115

Open
Oeyvind opened this issue Aug 2, 2017 · 3 comments
Open

opcode (udo) entry #115

Oeyvind opened this issue Aug 2, 2017 · 3 comments

Comments

@Oeyvind
Copy link
Contributor

Oeyvind commented Aug 2, 2017

The entry for opcode (http://www.csounds.com/manual/html/opcode.html) states that strings are allowed as input to opcode, and only at i-rate.
It seems to me that string types does indeed work both as input and output, and that k-rate strings also work. The manual text should be updated to accordingly.

Here's an example:

opcode Kstring, S, Sk
Stest, kx xin
Stest1 sprintfk "%s %i", Stest, kx
xout Stest1
endop

instr 1
Sin = "test"
k1 init 0
k1 += 1
Sout Kstring Sin, k1
puts Sout, k1+1
endin

i1 0 .01 e
@jpffitch
Copy link
Contributor

Sorry but I failed to find that in the source of opcode.xml. Could you check to see if it is still wrong in the words and quote them to me here, or confirm it is OK now

@tgrey1
Copy link
Contributor

tgrey1 commented Aug 19, 2020

Digging up a fossil here...

On opcode.xml/opcode.html the table showing input types and rates says:
S | string variable | i-rate string | i-time

And the output table doesn't mention strings at all.

I suggest both tables say:
S | string variable | k- and i-rate string | i-time and k-rate

tgrey1 added a commit that referenced this issue Sep 6, 2020
Re: #115

adds k-rate strings as input and strings as output.
@tgrey1
Copy link
Contributor

tgrey1 commented Sep 6, 2020

I think this can be closed now, but would love confirmation from someone that knows better than I... Tests seem to indicate UDOs currently work these ways with strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants