[Csnd] Macro confusion
Date | 2010-10-10 22:33 |
From | Christopher Saunders |
Subject | [Csnd] Macro confusion |
Hi, I'm having some confusion over why my macro definitions aren't working. The following .csd returns an error message saying error: Undefined macro: 'OUT' What part of my usage is wrong? <CsoundSynthesizer> <CsOptions> </CsOptions> <CsInstruments> sr=44100 kr=4410 ksmps=10 nchnls=2 0dbfs=32767 instr 1
aout oscil 30000, 440 , 1 #define OUT #out aout# $OUT. ;
endin </CsInstruments> <CsScore> f 1 0 8192 10 1 i 1 0 3 e </CsScore> </CsoundSynthesizer> |
Date | 2010-10-10 23:05 |
From | joachim heintz |
Subject | [Csnd] Re: Macro confusion |
hi christopher - i think the main problem is the indentation. when you start your macro definition at the beginning of the line, it should work. (it's a bit strange actually that csound doesn't accept indentation here, but it seems to be the case.) in general, i think macros should be defined in the orchestra header. the second problem is the use of the "out" opcode though you have declared nchnls=2. this version should work (for better sound quality, i replaced oscil by poscil): |
Date | 2010-10-10 23:18 |
From | Dave Seidel |
Subject | [Csnd] Re: Macro confusion |
Hi Christopher, It seems that the "#define" part needs to start all the way over in the left margin, i.e., it can't be indented at all. I just confirmed that in the CSD I'm working on right now. This is pretty silly, in my opinion, but there it is. :-) - Dave On 10/10/2010 5:33 PM, Christopher Saunders wrote: > Hi, I'm having some confusion over why my macro definitions aren't > working. The following .csd returns an error message saying > > error: Undefined macro: 'OUT' > > > What part of my usage is wrong? > > > > > |