File: TermanWang.schelp

package info (click to toggle)
supercollider-sc3-plugins 3.7.1~repack-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,332 kB
  • ctags: 11,704
  • sloc: cpp: 140,180; lisp: 14,746; ansic: 2,133; xml: 86; makefile: 82; haskell: 21; sh: 8
file content (55 lines) | stat: -rw-r--r-- 1,903 bytes parent folder | download | duplicates (4)
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
class:: TermanWang			
summary::Neural Oscillator
related:: Classes/FitzHughNagumo
categories:: UGens>Generators>Chaotic
//SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, http://composerprogrammer.com/index.html
keyword:: SLUGens



Description::
NOTE: experimental, not working well

Naive Euler ODE solver implementation of a neural oscillator model by Terman and Wang (see Brown, G.J., and Wang, D. 2006. "Neural and Perceptual Modeling." In Wang, D., and Brown, G. J., eds. Computational Auditory Scene Analysis: Principles, Algorithms, and Applications. Hoboken, NJ: John Wiley and Sons/IEEE Press, p.355). 

Dx = ratex *  (  3*x - x^3 (+ 2) - y + input ) 

Dy = ratey *  (eta ( alpha* (1 + tanh(x/beta)) - y ))

All parameters can have .kr rate UGens plugged in. The +2 is left out and can be added back in as part of the input. eta can also be left out as part of yrate. 

classmethods::

method::ar

argument::input
audio rate input
argument::reset
restart
argument::ratex
update rate for x
argument::ratey
update rate for y 
argument::alpha
argument::beta
argument::eta
Equation parameters
argument::initx
reset value for u
argument::inity
reset value for w

Examples::

code::
//difficult to find active parameters, forced to try resetting! 

{Out.ar(0,Pan2.ar(0.5*TermanWang.ar(2.0,Impulse.kr(MouseX.kr(1,1000)),0.1,0.01,1.0,1.0,1.0,MouseX.kr(0.4,1.2), MouseY.kr(2.0,4.0)),0.0))}.play;


{Out.ar(0,Pan2.ar(0.5*TermanWang.ar(LFNoise1.ar(LFNoise0.kr(0.5,500,500),1.0,3.0),Impulse.kr(MouseX.kr(1,10000, 'exponential')),0.01,0.01,1.0,1.0,1.0,MouseX.kr(0.4,1.2), MouseY.kr(2.0,4.0)),0.0))}.play;


{Out.ar(0,Pan2.ar(FreeVerb.ar(0.5*TermanWang.ar(2.0+ SinOsc.ar(MouseX.kr(10,10000,'exponential'),0,MouseY.kr(0.1,100.0,'exponential')),Impulse.kr(MouseX.kr(1,10000, 'exponential')),0.01,0.01,1.0,1.0,1.0,MouseX.kr(0.4,1.2), MouseY.kr(2.0,4.0)),0.5)))}.play;

::