Csound Csound-dev Csound-tekno Search About

Re: [Csnd] macro with optional args?

Date2013-03-15 12:58
Fromjohn ffitch
SubjectRe: [Csnd] macro with optional args?
>>>>> "Stefan" == Stefan Thomas  writes:

 Stefan> [1:text/plain Hide]

 Stefan> Dear community,
 Stefan> I would like to define a macro with optional arguments.

As far as i am aware that is not in the design.  
 Stefan> In  my special case, I would like to  change the amplitude of some events,
 Stefan> but only sometimes.
 Stefan> Is it possible to do this within csound?

Not sure I understand; perhaps have two macros?

 Stefan> Here is my simple macro:

 Stefan> #define pattern(BEGIN'PITCHA'PITCHB'AMP)
 Stefan> #
 Stefan> i1 $BEGIN 0.5     $PITCHA $AMP
 Stefan> i1 +         .    $PITCHB $AMP
 Stefan> i1 ^+1      .    $PITCHB $AMP
 Stefan> i1 +  .     $PITCHA $AMP
 Stefan> #

==John ffitch

Date2013-03-15 13:34
FromStefan Thomas
SubjectRe: [Csnd] macro with optional args?
Dear John,
thanks for Your reply.
I would like to do something like this with the macro:
i1 0  0.5 8.00 0.05
i. 0+ 0.5 8.02
i. ^+1 0.5 8.02
i. +    0.5 8.00 ; all pitches with the same dynamic
i.  3 0.5 8.00 0.05
i. 0+ 0.5 8.02
i. ^+1 0.5 8.02 0.1
i. +    0.5 8.00 0.05 ; just pitch is louder


2013/3/15 john ffitch <jpff@codemist.co.uk>
>>>>> "Stefan" == Stefan Thomas <kontrapunktstefan@gmail.com> writes:

 Stefan> [1:text/plain Hide]

 Stefan> Dear community,
 Stefan> I would like to define a macro with optional arguments.

As far as i am aware that is not in the design.
 Stefan> In  my special case, I would like to  change the amplitude of some events,
 Stefan> but only sometimes.
 Stefan> Is it possible to do this within csound?

Not sure I understand; perhaps have two macros?

 Stefan> Here is my simple macro:

 Stefan> #define pattern(BEGIN'PITCHA'PITCHB'AMP)
 Stefan> #
 Stefan> i1 $BEGIN 0.5     $PITCHA $AMP
 Stefan> i1 +         .    $PITCHB $AMP
 Stefan> i1 ^+1      .    $PITCHB $AMP
 Stefan> i1 +  .     $PITCHA $AMP
 Stefan> #

==John ffitch


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"