aboutsummaryrefslogtreecommitdiff
path: root/site/udo/scss/scss_test.csd
blob: 72a3bd22df19b409c84d1c271d25967b747d6f2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<CsoundSynthesizer>
<CsOptions>
-odac
-m0
-M0
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 64
nchnls = 2
0dbfs = 1
seed 0

#include "wavetables.udo"

#define SCSS_MIDI ##


#define SCSS_BOOT_INSTRUMENT #run_shit#
#include "scss/base.udo"



icategory = scss_registercategory("sine", "play_sine1")

scss_registerinstr(icategory, ({{
	{
		"name": "play_sine1",
		"parameters": [
			{"name": "frequency", "default": 440, "max": 880, "min": 220}
		]
	}
}}))
instr play_sine1
	icategoryid = p4 ; just used by scss_seqparam(iparamnum)
	itimeindex = p5

	kamp line 0.2, p3, 0
	a1 oscil kamp, chnget:i("play_sine1_frequency")
	scss_catout(a1, a1)
endin


scss_registerinstr(icategory, ({{
	{
		"name": "play_sine2",
		"parameters": [
			{"name": "frequency", "default": 4400, "max": 8800, "min": 220}
		]
	}
}}))
instr play_sine2
	kamp line 0, p3, 0.2
	a1 oscil kamp, 880, gifnSquare
	scss_catout(a1, a1)
endin


icategory = scss_registercategory("bass", "play_bass1")


scss_registerinstr(icategory, ({{
	{
		"name": "play_bass1",
		"parameters": [
			{"name": "wobble", "default": 0.5, "max": 1, "min": 0.1}
		]
	}
}}))
instr play_bass1
	kamp line 0.2, p3, 0
	a1 oscil kamp, 220
	scss_catout(a1, a1)
endin


scss_registerinstr(icategory, ({{
	{
		"name": "play_bass2"
	}
}}))
instr play_bass2
	kamp line 0.2, p3, 0
	a1 oscil kamp, 110
	scss_catout(a1, a1)
endin


instr run_shit
	prints "run shit\n"
	index1 = 0
	while (index1 < lenarray(giscss_stfn_trig, 1)) do
		index2 = 0
		while (index2 < lenarray(giscss_stfn_trig, 2)) do
			seq_randtable giscss_stfn_trig[index1][index2]
			seq_randtable giscss_stfn_dur[index1][index2]
			index2 += 1
		od
		index1 += 1
	od
	

	prints "OK then\n\n\n"
endin

instr test_change1
	prints "change 1\n"
	kval line 120, p3, 160
	chnset kval, "scss_bpm"
endin


instr test_change2
	prints "change 2\n"
	kval line 160, p3, 100
	chnset kval, "scss_bpm"
endin



</CsInstruments>
<CsScore>
f0 z
</CsScore>
</CsoundSynthesizer>