[Csnd] Error with UDO
Date | 2011-10-19 04:02 |
From | Forrest Cahoon |
Subject | [Csnd] Error with UDO |
This is the first UDO I've tried to write, and I'm getting an error. I want to translate one number (a note number in my custom scale) to another number (the frequency). Here's a simple version: <CsoundSynthesizer> <CsOptions> </CsOptions> <CsInstruments> opcode getFreq, i, i iNoteNum xin iFreq = 0 if (iNoteNum == 1) then iFreq = 224 elseif (iNoteNum == 2) then iFreq = 256 else iFreq = 16000 ; high freq indicates error xout iFreq endop </CsInstruments> <CsScore> </CsScore> </CsoundSynthesizer> And here's the error I get: orch compiler: opcode getFreq i i error line 5. unknown label: iFreq = 224 1 syntax errors in orchestra. compilation invalid I've tried all sorts of variations on this but can't seem to get it to work. What am I doing wrong? Forrest |
Date | 2011-10-19 04:06 |
From | Adam Puckett |
Subject | Re: [Csnd] Error with UDO |
Try writing "endif" before "xout iFreq." On 10/19/11, Forrest Cahoon |
Date | 2011-10-19 05:29 |
From | Forrest Cahoon |
Subject | Re: [Csnd] Error with UDO |
Dang, I didn't see what I was missing because I was "sure" it was there. Of course that was the problem. Thanks! Forrest On Tue, Oct 18, 2011 at 10:06 PM, Adam Puckett <adotsdothmusic@gmail.com> wrote: Try writing "endif" before "xout iFreq."
|
Date | 2011-10-19 14:11 |
From | Adam Puckett |
Subject | Re: [Csnd] Error with UDO |
I'm glad I could help. On 10/19/11, Forrest Cahoon |