[Csnd] define marcos with multiple arguments

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] define marcos with multiple arguments

fauveboy
I'm not sure what the correct syntax for the Macro Compos0002h. It works with
1 argument "dur" but trying to give it two arguments. Adding "str" doesn't
compile yet?

#define barTotal #65#
#define bar #[(1/$barTotal)]#
#define dur #5#
#define str #[5*$bar]#

; Set Bpm
t 0 40

#define Compos0002h(dur#str) #

; Synth
i1 0 $dur $str 1 2 1
; Kick
i1 0 $dur $str 3 4 3
; Tom
i1 0 $dur $str 5 6 5
; Snare
i1 0 $dur $str 7 8 7
#

$Compos0002h($dur $str)






--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] define marcos with multiple arguments

jpff
On Sun, 20 May 2018, fauveboy wrote:

> I'm not sure what the correct syntax for the Macro Compos0002h. It works with
> 1 argument "dur" but trying to give it two arguments. Adding "str" doesn't
> compile yet?
>
> #define barTotal #65#
> #define bar #[(1/$barTotal)]#
> #define dur #5#
> #define str #[5*$bar]#
>
> ; Set Bpm
> t 0 40
>
> #define Compos0002h(dur#str) #

   #define Compos0002h(dur'str) #

>
> ; Synth
> i1 0 $dur $str 1 2 1
> ; Kick
> i1 0 $dur $str 3 4 3
> ; Tom
> i1 0 $dur $str 5 6 5
> ; Snare
> i1 0 $dur $str 7 8 7
> #
>
> $Compos0002h($dur $str)


$Compos0002h($dur,$str)



>
>
>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] define marcos with multiple arguments

jpff
Sorry I think the call should have ' not ,

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] define marcos with multiple arguments

fauveboy
Thats great thank you, i was struggling to see this syntax used anywhere,
cheers



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here