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
|
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf230
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fnil\fcharset77 Monaco;
}
{\colortbl;\red255\green255\blue255;\red191\green0\blue0;\red0\green0\blue191;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs36 \cf0 FreqScope frequency analyzer\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\fs24 \cf0 FreqScope.new(width, height, busNum, scopeColor, bgColor)\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\b0 \cf0 \
FreqScope shows the frequency spectrum of the specified audio bus. The scope will\
remain active after a command-period. To turn it off you must either click off the 'Power'\
button or close the window.\
\
Panel commands:\
Power - Turns the scope on and off. This is useful for freezing the signal on the display \
or for saving CPU.\
BusIn - The audio bus to be analyzed.\
FrqScl - Determines the mapping of frequencies on the x-axis. Can be linear (lin) or\
logarithmic (log). Logarithmic is equal spacing per musical octave.\
dbCut - Determines the lowest decibel shown on the y-axis.\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f2\fs18 \cf2 // must use internal server\cf0 \
s = \cf3 Server\cf0 .internal.boot;\
\
\cf2 // create a new analyzer\cf0 \
\cf3 FreqScope\cf0 .new(400, 200, 0);\
\
\cf2 // basic sine\cf0 \
\{ \cf3 SinOsc\cf0 .ar(2000, 0, 0.25) \}.play(s);\
\
\cf2 // random saw\cf0 \
\{ \cf3 RLPF\cf0 .ar(\cf3 Saw\cf0 .ar(110, 0.2), \cf3 LFNoise2\cf0 .kr(1,1e4,1e4), \cf3 LFNoise2\cf0 .kr(1, 0.2, 0.22)) \}.play(s);\
\
\cf2 // modulate phase\cf0 \
\{ \cf3 SinOsc\cf0 .ar(800, \cf3 SinOsc\cf0 .ar(\cf3 XLine\cf0 .kr(20,8000,10),0,2pi), 0.25) \}.play(s); \
\
\cf2 // all harmonics\cf0 \
\{ \cf3 Blip\cf0 .ar(200,\cf3 Line\cf0 .kr(1,100,10),0.2) \}.play(s);\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\fs24 \cf0 \
}
|