diff options
| author | Richard Knight <q@1bpm.net> | 2020-08-25 16:14:43 +0100 | 
|---|---|---|
| committer | Richard Knight <q@1bpm.net> | 2020-08-25 16:14:43 +0100 | 
| commit | cdc5d643bb3256c50dd9787873b314c80e8f407e (patch) | |
| tree | 4a2e532a69b71c0136ef54caa69a6df927857aa6 /examples | |
| download | csound-sdl-cdc5d643bb3256c50dd9787873b314c80e8f407e.tar.gz csound-sdl-cdc5d643bb3256c50dd9787873b314c80e8f407e.tar.bz2 csound-sdl-cdc5d643bb3256c50dd9787873b314c80e8f407e.zip  | |
initial
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/test.csd | 57 | 
1 files changed, 57 insertions, 0 deletions
diff --git a/examples/test.csd b/examples/test.csd new file mode 100644 index 0000000..3e528cf --- /dev/null +++ b/examples/test.csd @@ -0,0 +1,57 @@ +<CsoundSynthesizer> +<CsOptions> +-odac +--opcode-lib=/home/bargepole/bpcheckout/csound-dev/sdltest/sdllib.so +</CsOptions> +<CsInstruments> +sr = 44100 +kr = 4410 +nchnls = 2 +0dbfs = 1 +seed 0 + +gisdl init -1 +gicol init -1 + +instr 1 +	gisdl, ktrig, kx, ky sdlinit "A SDL Window", 1000, 1000, 60 +	kvibe oscil 2, 0.1 +	kvibe2 oscil 0.2, 0.5 +	kcol oscil 250, 0.3 +	gicol sdlcolour abs(kcol), 50, 50, 0 + +	schedkwhen ktrig, 0.05, 0, 2, 0, 1, kx, ky + + +	kl1 line 1, p3, 0 +	sdlrect gisdl, gicol, kl1, 0.5, 0.2, abs(kvibe)*0.2 +	ao oscil 1, 440*abs(kvibe) +	outs ao*0.01, ao*0.01 +endin + +instr 2 +	krest line 0, p3, 255 +	icol sdlcolour 255, krest, krest, 0 +	kx init p4 +	ky init p5 +	sdlrect gisdl, icol, kx, ky, 0.1, 0.1 +	 +	iamp = 0.3 + (p5*0.7) +	kamp line iamp, p3, 0 +	ipitch = 100 + (p4*400) +	a1 oscil kamp, ipitch +	outs a1*0.01, a1*0.01 +endin + +instr 3 +	icol sdlcolour 0, 0, 0, 0 +	kx line 0, p3, 1 +	sdlline gisdl, icol, kx, 0, kx, 1 +endin + +</CsInstruments> +<CsScore> +i1 0 60 +i3 0 10 +</CsScore> +</CsoundSynthesizer>  |