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
not possible to skip audio output in UDO? #1808
Comments
maybe I am getting some wires crossed but I can't seen in instr 2 any code to skip anything (ie. the UDO is not called?) |
of course your wires are straight and mine were very crossed this
morning ...
(i was at first using diskin and then saw that it is not related to it
but can also demonstrated on a simple oscillator.)
thanks for looking into it; here is the correct code:
opcode Play,a,i
iTimeToSkip xin
kCount init 0
skip:
aOut = poscil:a(0.2,expon:k(400,2,1600))
kCount += 1
if (kCount < iTimeToSkip*kr) kgoto skip
xout(aOut)
endop
instr 1 // works
iTimeToSkip = p4
kCount init 0
skip:
aOut = poscil:a(0.2,expon:k(400,2,1600))
kCount += 1
if (kCount < iTimeToSkip*kr) kgoto skip
outall(aOut)
endin
schedule(1,0,1,0)
schedule(1,2,1,1) ;skips the first second
instr 2 // does not work
iTimeToSkip = p4
aOut = Play(iTimeToSkip)
outall(aOut)
endin
schedule(2,4,1,0)
schedule(2,6,1,1) ;does NOT skip the first second
…On 15/01/2024 16:16, vlazzarini wrote:
maybe I am getting some wires crossed but I can't seen in instr 2 any
code to skip anything (ie. the UDO is not called?)
—
Reply to this email directly, view it on GitHub
<#1808 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQYHKS4HMFPUL4RAJKTD2TYOVB6PAVCNFSM6AAAAABB273NLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGM3DEMJWGU>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There s a problem somewhere and I think I have seen it before. If you make the small change
you get the expected result. If I remember it properly, the problem was that the label was not found inside the UDO and the code jump did not work. Adding another label seems to force it to be found. I thought we had fixed this. @jpffitch do you remember this issue from another time? I can't recall what we did with it, |
when i have a csound instrument, i can skip a certain number of k-cycles by a loop like this:
this works inside an instrument, but not inside a UDO:
is this expected behaviour? or is it a bug?
The text was updated successfully, but these errors were encountered: