-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspectral filter.effect
164 lines (149 loc) · 5.49 KB
/
spectral filter.effect
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<effect>
<name>spectral filter</name>
<enabled>true</enabled>
<numIns>2</numIns>
<numOuts>2</numOuts>
<code>if (<spectralfilterON> == 1) then
itablel ftgentmp 0, 0, 513, -7, <spectralfilter_filter_freqL>
itabler ftgentmp 0, 0, 513, -7, <spectralfilter_filter_freqR>
if (<spectralfilter_swap> == 0) then
itableL = itablel
itableR = itabler
else
itableL = itabler
itableR = itablel
endif
fsig1 pvsanal ain1, 1024, 256, 1024, 1
fsig2 pvsanal ain2, 1024, 256, 1024, 1
ffilt1 pvsmaska fsig1, itableL, 1
ffilt2 pvsmaska fsig2, itableR, 1
aout1 pvsynth ffilt1
aout2 pvsynth ffilt2
else
aout1 = ain1
aout2 = ain2
endif
</code>
<comments>
DESCRIPTION:
Spectral filtering using Victor Lazzarini's pvsmaska, that modifies amplitudes using a function table, with dynamic scaling.
CONTROLLERS:
ON/OFF - bypass
Line Object - Modify amplitudes using a function table by drawing- left the lower Bins, right the higher bins
swap - swap channels
---
version 1.11, May 2020
- added comments on controllers
version 1.1, 2018
- new GUI and small code adaptations by Menno Knevel
version 1.0, 2007
- initial version by Peiman Khosravi
See http://www.csounds.com/journal/issue7/onTheDesignOfSpectralToolsInBlue.html
</comments>
<opcodeList/>
<graphicInterface editEnabled='false'>
<gridSettings>
<width>5</width>
<height>5</height>
<gridStyle>LINE</gridStyle>
<snapGridEnabled>true</snapGridEnabled>
</gridSettings>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>0</x>
<y>0</y>
<groupName>Group</groupName>
<backgroundColor>0x00000033</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>true</titleEnabled>
<width>20</width>
<height>20</height>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>10</x>
<y>10</y>
<groupName>Group</groupName>
<backgroundColor>0x4d8080ff</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>false</titleEnabled>
<width>20</width>
<height>20</height>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>20</x>
<y>5</y>
<label>low bins</label>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>450</x>
<y>5</y>
<label>high bins</label>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>spectralfilter_swap</objectName>
<x>455</x>
<y>247</y>
<automationAllowed>false</automationAllowed>
<label>swap</label>
<selected>false</selected>
<randomizable>true</randomizable>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLineObject'>
<objectName>spectralfilter_filter</objectName>
<x>10</x>
<y>20</y>
<canvasWidth>500</canvasWidth>
<canvasHeight>200</canvasHeight>
<xMax>513.0</xMax>
<relativeXValues>true</relativeXValues>
<separatorType>COMMA</separatorType>
<leadingZero>false</leadingZero>
<locked>false</locked>
<lines>
<line name='freqL' version='2' max='1.0' min='0.0' bdresolution='-1' color='-14623488' rightBound='true' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
<linePoint x='0.045081966' y='1.0'/>
<linePoint x='0.352459' y='0.8244681'/>
<linePoint x='0.48565573' y='0.0'/>
<linePoint x='1.0' y='0.0'/>
</line>
<line name='freqR' version='2' max='1.0' min='0.0' bdresolution='-1' color='-13382401' rightBound='true' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
<linePoint x='0.045081966' y='0.12765956'/>
<linePoint x='0.10655738' y='1.0'/>
<linePoint x='0.814' y='0.22499999999999998'/>
<linePoint x='1.0' y='1.0'/>
</line>
</lines>
</bsbObject>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>spectralfilterON</objectName>
<x>0</x>
<y>0</y>
<automationAllowed>true</automationAllowed>
<label/>
<selected>true</selected>
<randomizable>true</randomizable>
</bsbObject>
</bsbObject>
</graphicInterface>
<parameterList>
<parameter uniqueId='-104104249' name='spectralfilterON' label='' min='0.0' max='1.0' bdresolution='1' automationEnabled='false' value='1.0'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.0'/>
</line>
</parameter>
</parameterList>
</effect>