Csound Csound-dev Csound-tekno Search About

[Csnd] define marcos with multiple arguments

Date2018-05-20 19:29
Fromfauveboy
Subject[Csnd] define marcos with multiple arguments
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
Csound@listserv.heanet.ie
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

Date2018-05-20 20:08
Fromjpff
SubjectRe: [Csnd] define marcos with multiple arguments
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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2018-05-20 20:13
Fromjpff
SubjectRe: [Csnd] define marcos with multiple arguments
Sorry I think the call should have ' not ,

Csound mailing list
Csound@listserv.heanet.ie
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

Date2018-05-20 20:19
Fromfauveboy
SubjectRe: [Csnd] define marcos with multiple arguments
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
Csound@listserv.heanet.ie
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