
;=====================================================================================
;	Example file for using CMask as a stochastic events generator within GeoMaestro
;		(see function GetStochEv() in lib/cmask_utils)
;=====================================================================================

; a warning message for the beginning of the generated .sco file: 
{
;# WARNING ! this is not a valid Csound score file !

;# ...it is supposed to be processed by GeoMaestro GetStochEv() function 
;#	to generate stochastic event scenes

;# parameters mapping:
;#--------------------
;# p1	ch
;# p2	(ignored) 
;# p3	dur
;# p4	vol
;# p5	pit
;# p6	x	(only if r=0, that is "p8 const 0" or no p8 at all)
;# p7	y	( id. )

;# optional:

;# p8	r
;# p9	theta
;# p10	polar center x
;# p11	polar center y

;# p12	selection flag (0 or 1)
}


f 0 600								; number of events to be generated (see below)

p1 const 10							; GeoMaestro channel numbers

p2 const 1							; ... so that the f statement gives the number of events

p3 rnd exp 1						; durations (in clicks !)
mask 96 192

p4 const 127						; volumes

p5 rnd exp 1						; pitches
mask 40 100
quant 3

p6 osc sin 0.017					; x-positions
mask (0 -2 300 -2 350 0.5 600 0.5) (0 0 300 0 350 2 600 2)
quant (0 0.3 300 0.3 301 0.1 600 0.1) (0 0.7 300 0.7 301 1 600 1) 0 

p7 rnd beta .2 .2					; y-positions
mask -1 1
quant (0 0.1 300 0.1 301 1 600 1) (0 1 300 1 301 0 600 0) 0 