rsc3/doc/rsc3-docs/doc-index.html

191 lines
70 KiB
HTML
Raw Normal View History

2022-08-24 13:53:18 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=0.8"/><title>Index</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-racket.css" title="default"/><script type="text/javascript" src="scribble-common.js"></script><script type="text/javascript" src="manual-racket.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> racket/<span class="mywbr"> &nbsp;</span>scheme/<span class="mywbr"> &nbsp;</span>supercollider</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="rsc3__server_commands.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> server commands</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="rsc3__ugens.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> ugens</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="rsc3__tutorials.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> tutorials</a></td></tr><tr><td align="right"></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Index</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><div class="nosearchform"></div>&nbsp;&nbsp;<span class="tocsettoggle">&nbsp;&nbsp;<a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright">&nbsp;&nbsp;<a href="rsc3__tutorials.html" title="backward to &quot;3 rsc3: tutorials&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;rsc3: racket/scheme/supercollider&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<span class="nonavigation">next &rarr;</span></span>&nbsp;</div><h3><a name="(part._doc-index)"></a>Index</h3><table cellspacing="0" cellpadding="0"><tr><td><p><span class="nonavigation">A</span> <span class="nonavigation">B</span> <span class="nonavigation">C</span> <span class="nonavigation">D</span> <span class="nonavigation">E</span> <span class="nonavigation">F</span> <span class="nonavigation">G</span> <span class="nonavigation">H</span> <span class="nonavigation">I</span> <span class="nonavigation">J</span> <span class="nonavigation">K</span> <span class="nonavigation">L</span> <span class="nonavigation">M</span> <a href="#alpha:N">N</a> <span class="nonavigation">O</span> <span class="nonavigation">P</span> <span class="nonavigation">Q</span> <a href="#alpha:R">R</a> <a href="#alpha:S">S</a> <span class="nonavigation">T</span> <span class="nonavigation">U</span> <span class="nonavigation">V</span> <span class="nonavigation">W</span> <span class="nonavigation">X</span> <span class="nonavigation">Y</span> <span class="nonavigation">Z</span> </p></td></tr><tr><td><p>&nbsp;</p></td></tr><tr><td><p><a href="rsc3__ugens.html#%28part.__abs_a_%29" class="indexlink" data-pltdoc="x">(abs a)<br/></a><a href="rsc3__ugens.html#%28part.__abs-dif_a_b_%29" class="indexlink" data-pltdoc="x">(abs-dif a b)<br/></a><a href="rsc3__ugens.html#%28part.__add_a_b_%29" class="indexlink" data-pltdoc="x">(add a b)<br/></a><a href="rsc3__ugens.html#%28part.__allpass-n_in_max.Delay.Time_delay.Time_decay.Time_%29" class="indexlink" data-pltdoc="x">(allpa
#|
Strict convolution with fixed kernel which can be updated using a
trigger signal.
in - processing target
bufnum - buffer index for the fixed kernel, may be modulated in
combination with the trigger
trigger - update the kernel on a change from &lt;=0 to &gt;0
framesize - size of fft frame, must be a power of two. convolution
uses twice this number internally, maximum value you
can give this argument is 2^16=65536. Note that it gets
progressively more expensive to run for higher powers!
512, 1024, 2048, 4096 standard.
|#
(with-sc3
(lambda (fd)
(for-each
(lambda (b)
(async fd (b-alloc b 2048 1)))
(list 10 11 12))
(for-each
(lambda (n)
(send fd (b-set1 10 (+ (* 400 n) 100) 1)))
(enum-from-to 0 2))
(for-each
(lambda (n)
(send fd (b-set1 11 (+ (* 20 n) 10) (random 0 1))))
(enum-from-to 0 49))
(for-each
(lambda (n)
(send fd (b-set1 12 (+ (* 40 n) 20) 1)))
(enum-from-to 0 19))
(send-synth
fd "c"
(letc ((k 0) (t 0))
(let ((i (impulse ar 1 0)))
(out 0 (mul (convolution2 i k t 2048) 0.5)))))))
(define send-to
(lambda (m)
(with-sc3
(lambda (fd)
(send fd m)))))
(define async-to
(lambda (m)
(with-sc3
(lambda (fd)
(async fd m)))))
(send-to (s-new1 "c" 1001 1 1 "k" 10))
(send-to (n-set1 1001 "k" 11))
(send-to (n-set1 1001 "t" 0))
(send-to (n-set1 1001 "t" 1))
(send-to (n-set1 1001 "k" 12))
(send-to (n-set1 1001 "t" 0))
(send-to (n-set1 1001 "t" 1))
(async-to (b-zero 12))
(for-each
(lambda (n)
(send-to (b-set1 12 (+ (* 20 n) 10) 1)))
(enum-from-to 0 39))
(send-to (n-set1 1001 "t" 0))
(send-to (n-set1 1001 "t" 1))<br/></a><a href="rsc3__ugens.html#%28part.__cos_a_%29" class="indexlink" data-pltdoc="x">(cos a)<br/></a><a href="rsc3__ugens.html#%28part.__cos-h_a_%29" class="indexlink" data-pltdoc="x">(cos-h a)<br/></a><a href="rsc3__ugens.html#%28part.__cps-midi_a_%29" class="indexlink" data-pltdoc="x">(cps-midi a)<br/></a><a href="rsc3__ugens.html#%28part.__cps-oct_a_%29" class="indexlink" data-pltdoc="x">(cps-oct a)<br/></a><a href="rsc3__ugens.html#%28part.__crackle_rate_chaos.Param_%29" class="indexlink" data-pltdoc="x">(crackle rate chaosParam)<br/></a><a href="rsc3__ugens.html#%28part.__cubed_a_%29" class="indexlink" data-pltdoc="x">(cubed a)<br/></a><a href="rsc3__ugens.html#%28part.__cusp-n_rate_freq_a_b_xi_%29" class="indexlink" data-pltdoc="x">(cusp-n rate freq a b xi)<br/></a><a href="rsc3__ugens.html#%28part.__db-amp_a_%29" class="indexlink" data-pltdoc="x">(db-amp a)<br/></a><a href="rsc3__ugens.html#%28part.__dbrown__length_lo_hi_step_%29" class="indexlink" data-pltdoc="x">(dbrown length lo hi step)<br/></a><a href="rsc3__ugens.html#%28part.__dbufrd_bufnum_phase_loop_%29" class="indexlink" data-pltdoc="x">(dbufrd bufnum phase loop)<br/></a><a href="rsc3__ugens.html#%28part.__decay_in_decay.Time_%29" class="indexlink" data-pltdoc="x">(decay in decayTime)<br/></a><a href="rsc3__ugens.html#%28part.__decay2_in_attack.Time_decay.Time_%29" class="indexlink" data-pltdoc="x">(decay2 in attackTime decayTime)<br/></a><a href="rsc3__ugens.html#%28part.__decode-b2_num.Channels_w_x_y_orientation_%29" class="indexlink" data-pltdoc="x">(decode-b2 numChannels w x y orientation)<br/></a><a href="rsc3__ugens.html#%28part.__degree-to-key_bufnum_in_octave_%29" class="indexlink" data-pltdoc="x">(degree-to-key bufnum in octave)<br/></a><a href="rsc3__ugens.html#%28part.__delay-n_in_max.Delay.Time_delay.Time_%29" class="indexlink" data-pltdoc="x">(delay-n in maxDelayTime delayTime)<br/></a><a href="rsc3__ugens.html#%28part.__delay1_in_%29" class="indexlink" data-pltdoc="x">(delay1 in)<br/></a><a href="rsc3__ugens.html#%28part.__delay2_in_%29" class="indexlink" data-pltdoc="x">(delay2 in)<br/></a><a href="rsc3__ugens.html#%28part.__demand_trig_reset_ugens_%29" class="indexlink" data-pltdoc="x">(demand trig reset ugens)<br/></a><a href="rsc3__ugens.html#%28part.__demand-env-gen_rate_levels_times_shapes_curves_gate_reset%29" class="indexlink" data-pltdoc="x">(demand-env-gen rate levels times shapes curves gate reset<br/></a><a href="rsc3__ugens.html#%28part.__detect-silence_in_amp_time_done.Action_%29" class="indexlink" data-pltdoc="x">(detect-silence in amp time doneAction)<br/></a><a href="rsc3__ugens.html#%28part.__dgeom_length_start_grow_%29" class="indexlink" data-pltdoc="x">(dgeom length start grow)<br/></a><a href="rsc3__ugens.html#%28part.__dif-sqr_a_b_%29" class="indexlink" data-pltdoc="x">(dif-sqr a b)<br/></a><a href="rsc3__ugens.html#%28part.__disk-in_num-channels_rate_bufnum_%29" class="indexlink" data-pltdoc="x">(disk-in num-channels rate bufnum)<br/></a><a href="rsc3__ugens.html#%28part.__disk-out_bufnum_channels_%29" class="indexlink" data-pltdoc="x">(disk-out bufnum channels)<br/></a><a href="rsc3__ugens.html#%28part.__distort_a_%29" class="indexlink" data-pltdoc="x">(distort a)<br/></a><a href="rsc3__ugens.html#%28part.__done_src_%29" class="indexlink" data-pltdoc="x">(done src)<br/></a><a href="rsc3__ugens.html#%28part.__drand__length_array_%29" class="indexlink" data-pltdoc="x">(drand length array)<br/></a><a href="rsc3__ugens.html#%28part.__dseq_length_array_%29" class="indexlink" data-pltdoc="x">(dseq length array)<br/></a><a href="rsc3__ugens.html#%28part.__dser_length_array_%29" class="indexlink" data-pltdoc="x">(dser length array)<br/></a><a href="rsc3__ugens.html#%28part.__dseries_length_start_step_%29" class="indexlink" data-pltdoc="x">(dseries length start step)<br/></a><a href="rsc3__ugens.html#%28part.__dswitch_index_array_%29" class="indexlink" data-pltdoc="x">(dswitch index array)<br/></a><a href="rsc3__ugens.html#%28part.__dswitch1_index_array_%29" class="indexlink" data-pltdoc="
(audition (out 0 (mul (blip ar 440 200) 0.15)))<br/></a><a href="rsc3__ugens.html#%28part.__import__rsc3_____audition__out_0__mul__impulse_ar_800_0__0_1______let___f__x-line_kr_800_10_5_remove-synth_______audition__out_0__mul__impulse_ar_f_0_0__0_5_______let___f__mouse-y__kr_4_8_0_0_1__________p__mouse-x__kr_0_1_0_0_1_______audition__out_0__mul__impulse_ar_f__mce2_0_p___0_2____%29" class="indexlink" data-pltdoc="x">(import (rsc3))
(audition (out 0 (mul (impulse ar 800 0) 0.1)))
(let ((f (x-line kr 800 10 5 remove-synth)))
(audition (out 0 (mul (impulse ar f 0.0) 0.5))))
(let ((f (mouse-y* kr 4 8 0 0.1))
(p (mouse-x* kr 0 1 0 0.1)))
(audition (out 0 (mul (impulse ar f (mce2 0 p)) 0.2))))<br/></a><a href="rsc3__ugens.html#%28part.__import__rsc3_____with-sc3___lambda__fd______async_fd__b-alloc_10_512_1_______async_fd__b-gen1_10__sine1___list____1_2_4__1_1_2_1_3_1_4_1_5_1_6_1_7_1_8_1_9_1_10________audition__out_0__mul__c-osc_ar_10_200_0_7__0_25______audition__out_0__mul__c-osc_ar_10_200__mouse-x__kr_0_4_0_0_1___0_25___%29" class="indexlink" data-pltdoc="x">(import (rsc3))
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 512 1))
(async fd (b-gen1 10 "sine1" (list (+ 1 2 4) 1 1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/10)))))
(audition (out 0 (mul (c-osc ar 10 200 0.7) 0.25)))
(audition (out 0 (mul (c-osc ar 10 200 (mouse-x* kr 0 4 0 0.1)) 0.25)))<br/></a><a href="rsc3__ugens.html#%28part.__import__sosc___rsc3__%29" class="indexlink" data-pltdoc="x">(import (sosc) (rsc3))<br/></a><a href="rsc3__ugens.html#%28part.__import__sosc___rsc3_____let___a__letc___r_1_______________let____r___mul__buf-rate-scale_kr_0__r______________________p__phasor_ar_0_r__0__buf-frames_kr_0__0______________________f__mul-add__lf-noise1_kr_2__300_400______________________i__mul__sin-osc_ar_f_0__0_1__________________mrg2__buf-wr_0_p_1_i______________________out_0_0_0_____________b__letc___r_1_______________let____r___mul__buf-rate-scale_kr_0__r______________________p__phasor_ar_0_r__0__buf-frames_kr_0__0__________________out_0__buf-rd_1_ar_0_p_1_2__________with-sc3_____lambda__fd________async_fd__b-alloc_0____44100_2__1_________send-synth_fd__a__a________send-synth_fd__b__b________send_fd__s-new0__a__1001_1_0_________send_fd__s-new0__b__1002_1_0________define__do-send_m_____with-sc3__lambda__fd___send_fd_m_______do-send__n-set1_1002__r__5_____do-send__n-set1_1001__r___random_0_2______do-send__n-set1_1002__r__2__%29" class="indexlink" data-pltdoc="x">(import (sosc) (rsc3))
(let ((a (letc ((r 1))
(let* ((r* (mul (buf-rate-scale kr 0) r))
(p (phasor ar 0 r* 0 (buf-frames kr 0) 0))
(f (mul-add (lf-noise1 kr 2) 300 400))
(i (mul (sin-osc ar f 0) 0.1)))
(mrg2 (buf-wr 0 p 1 i)
(out 0 0.0)))))
(b (letc ((r 1))
(let* ((r* (mul (buf-rate-scale kr 0) r))
(p (phasor ar 0 r* 0 (buf-frames kr 0) 0)))
(out 0 (buf-rd 1 ar 0 p 1 2))))))
(with-sc3
(lambda (fd)
(async fd (b-alloc 0 (* 44100 2) 1))
(send-synth fd "a" a)
(send-synth fd "b" b)
(send fd (s-new0 "a" 1001 1 0))
(send fd (s-new0 "b" 1002 1 0)))))
(define (do-send m)
(with-sc3 (lambda (fd) (send fd m))))
(do-send (n-set1 1002 "r" 5))
(do-send (n-set1 1001 "r" (random 0 2)))
(do-send (n-set1 1002 "r" 2))<br/></a><a href="rsc3__ugens.html#%28part.__in_num-channels_rate_bus_%29" class="indexlink" data-pltdoc="x">(in num-channels rate bus)<br/></a><a href="rsc3__ugens.html#%28part.__in-feedback_num-channels_bus_%29" class="indexlink" data-pltdoc="x">(in-feedback num-channels bus)<br/></a><a href="rsc3__ugens.html#%28part.__in-range_in_lo_hi_%29" class="indexlink" data-pltdoc="x">(in-range in lo hi)<br/></a><a href="rsc3__ugens.html#%28part.__in-trig_num-channels_bus_%29" class="indexlink" data-pltdoc="x">(in-trig num-channels bus)<br/></a><a href="rsc3__ugens.html#%28part.__is-negative_a_%29" class="indexlink" data-pltdoc="x">(is-negative a)<br/></a><a href="rsc3__ugens.html#%28part.__is-positive_a_%29" class="indexlink" data-pltdoc="x">(is-positive a)<br/></a><a href="rsc3__ugens.html#%28part.__is-strictly-positive_a_%29" class="indexlink" data-pltdoc="x">(is-strictly-positive a)<br/></a><a href="rsc3__ugens.html#%28part.__k2a_in_%29" class="indexlink" data-pltdoc="x">(k2a in)<br/></a><a href="rsc3__ugens.html#%28part.__key-state_rate_keynum_minval_maxval_lag_%29" class="indexlink" data-pltdoc="x">(key-state rate keynum minval maxval lag)<br/></a><a href="rsc3__ugens.html#%28part.__klang_rate_freq.Scale_freq.Offset_spec_%29" class="indexlink" data-pltdoc="x">(klang rate freqScale freqOffset spec)<br/></a><a href="rsc3__ugens.html#%28part.__klank_in_freq.Scale_freq.Offset_decay.Scale_spec_%29" class="indexlink" data-pltdoc="x">(klank in freqScale freqOffset decayScale spec)<br/></a><a href="rsc3__ugens.html#%28part.__lag_in_lag.Time_%29" class="indexlink" data-pltdoc="x">(lag in lagTime)<br/></a><a href="rsc3__ugens.html#%28part.__lag-in_num-channels_bus_lag_%29" class="indexlink" data-pltdoc="x">(lag-in num-channels bus lag)<br/></a><a href="rsc3__ugens.html#%28part.__lag2_in_lag.Time_%29" class="indexlink" data-pltdoc="x">(lag2 in lagTime)<br/></a><a href="rsc3__ugens.html#%28part.__lag3_in_lag.Time_%29" class="indexlink" data-pltdoc="x">(lag3 in lagTime)<br/></a><a href="rsc3__ugens.html#%28part.__last-value_in_diff_%29" class="indexlink" data-pltdoc="x">(last-value in diff)<br/></a><a href="rsc3__ugens.html#%28part.__latch_in_trig_%29" class="indexlink" data-pltdoc="x">(latch in trig)<br/></a><a href="rsc3__ugens.html#%28part.__latoocarfian-c_rate_freq_a_b_c_d_xi_yi_%29" class="indexlink" data-pltdoc="x">(latoocarfian-c rate freq a b c d xi yi)<br/></a><a href="rsc3__ugens.html#%28part.__le_a_b_%29" class="indexlink" data-pltdoc="x">(le a b)<br/></a><a href="rsc3__ugens.html#%28part.__leak-dc_in_coef_%29" class="indexlink" data-pltdoc="x">(leak-dc in coef)<br/></a><a href="rsc3__ugens.html#%28part.__lf-cub_rate_freq_iphase_%29" class="indexlink" data-pltdoc="x">(lf-cub rate freq iphase)<br/></a><a href="rsc3__ugens.html#%28part.__lf-noise0_rate_freq_%29" class="indexlink" data-pltdoc="x">(lf-noise0 rate freq)<br/></a><a href="rsc3__ugens.html#%28part.__lf-pulse_rate_freq_iphase_width_%29" class="indexlink" data-pltdoc="x">(lf-pulse rate freq iphase width)<br/></a><a href="rsc3__ugens.html#%28part.__lf-saw_rate_freq_iphase_%29" class="indexlink" data-pltdoc="x">(lf-saw rate freq iphase)<br/></a><a href="rsc3__ugens.html#%28part.__lf-tri_rate_freq_iphase_%29" class="indexlink" data-pltdoc="x">(lf-tri rate freq iphase)<br/></a><a href="rsc3__ugens.html#%28part.__lfclip-noise_rate_freq_%29" class="indexlink" data-pltdoc="x">(lfclip-noise rate freq)<br/></a><a href="rsc3__ugens.html#%28part.__lfd-noise0_rate_freq_%29" class="indexlink" data-pltdoc="x">(lfd-noise0 rate freq)<br/></a><a href="rsc3__ugens.html#%28part.__lfdclip-noise_rate_freq_%29" class="indexlink" data-pltdoc="x">(lfdclip-noise rate freq)<br/></a><a href="rsc3__ugens.html#%28part.__limiter_input_level_look.Ahead.Time_%29" class="indexlink" data-pltdoc="x">(limiter input level lookAheadTime)<br/></a><a href="rsc3__ugens.html#%28part.__lin-cong-c_rate_freq_a_c_m_xi_%29" class="indexlink" data-pltdoc="x">(lin-cong-c rate freq a c m xi)<br/></a><a href="rsc3__ugens.html#%28part.__lin-exp_in_srclo_srchi_dstlo_dsthi_%29" class="indexl
(let ((n 6)
(o (lambda (_) (mul (f-sin-osc ar (rand 200 700) 0) 0.1))))
(audition (out 0 (mix-fill n o))))<br/></a><a href="rsc3__ugens.html#%28part.__.Mod_a_b_%29" class="indexlink" data-pltdoc="x">(Mod a b)<br/></a><a href="rsc3__ugens.html#%28part.__moog-ff_in_freq_gain_reset_%29" class="indexlink" data-pltdoc="x">(moog-ff in freq gain reset)<br/></a><a href="rsc3__ugens.html#%28part.__most-change_a_b_%29" class="indexlink" data-pltdoc="x">(most-change a b)<br/></a><a href="rsc3__ugens.html#%28part.__mouse-button_rate_minval_maxval_lag_%29" class="indexlink" data-pltdoc="x">(mouse-button rate minval maxval lag)<br/></a><a href="rsc3__ugens.html#%28part.__mouse-x_rate_minval_maxval_warp_lag_%29" class="indexlink" data-pltdoc="x">(mouse-x rate minval maxval warp lag)<br/></a><a href="rsc3__ugens.html#%28part.__mouse-y_rate_minval_maxval_warp_lag_%29" class="indexlink" data-pltdoc="x">(mouse-y rate minval maxval warp lag)<br/></a><a href="rsc3__ugens.html#%28part.__mrg2_left_right_%29" class="indexlink" data-pltdoc="x">(mrg2 left right)<br/></a><a href="rsc3__ugens.html#%28part.__mul_a_b_%29" class="indexlink" data-pltdoc="x">(mul a b)<br/></a><a href="rsc3__ugens.html#%28part.__mul-add_a_b_c_%29" class="indexlink" data-pltdoc="x">(mul-add a b c)<br/></a><a href="rsc3__ugens.html#%28part.__n-rand_lo_hi_n_%29" class="indexlink" data-pltdoc="x">(n-rand lo hi n)<br/></a><a href="rsc3__ugens.html#%28part.__neg_a_%29" class="indexlink" data-pltdoc="x">(neg a)<br/></a><a href="rsc3__ugens.html#%28part.__normalizer_in_level_dur_%29" class="indexlink" data-pltdoc="x">(normalizer in level dur)<br/></a><a href="rsc3__ugens.html#%28part.__oct-cps_a_%29" class="indexlink" data-pltdoc="x">(oct-cps a)<br/></a><a href="rsc3__ugens.html#%28part.__offset-out_bufferindex_inputs_%29" class="indexlink" data-pltdoc="x">(offset-out bufferindex inputs)<br/></a><a href="rsc3__ugens.html#%28part.__one-pole_in_coef_%29" class="indexlink" data-pltdoc="x">(one-pole in coef)<br/></a><a href="rsc3__ugens.html#%28part.__one-zero_in_coef_%29" class="indexlink" data-pltdoc="x">(one-zero in coef)<br/></a><a href="rsc3__ugens.html#%28part.__osc_rate_bufnum_freq_phase_%29" class="indexlink" data-pltdoc="x">(osc rate bufnum freq phase)<br/></a><a href="rsc3__ugens.html#%28part.__osc-n_rate_bufnum_freq_phase_%29" class="indexlink" data-pltdoc="x">(osc-n rate bufnum freq phase)<br/></a><a href="rsc3__ugens.html#%28part.__out_bufferindex_inputs_%29" class="indexlink" data-pltdoc="x">(out bufferindex inputs)<br/></a><a href="rsc3__ugens.html#%28part.__.Packfft_chain_bufsize_frombin_tobin_zeroothers_magsphases_%29" class="indexlink" data-pltdoc="x">(Packfft chain bufsize frombin tobin zeroothers magsphases)<br/></a><a href="rsc3__ugens.html#%28part.__pan-b2_in_azimuth_gain_%29" class="indexlink" data-pltdoc="x">(pan-b2 in azimuth gain)<br/></a><a href="rsc3__ugens.html#%28part.__pan2_in_pos_level_%29" class="indexlink" data-pltdoc="x">(pan2 in pos level)<br/></a><a href="rsc3__ugens.html#%28part.__pause_gate_node.I.D_%29" class="indexlink" data-pltdoc="x">(pause gate nodeID)<br/></a><a href="rsc3__ugens.html#%28part.__pause-self_src_%29" class="indexlink" data-pltdoc="x">(pause-self src)<br/></a><a href="rsc3__ugens.html#%28part.__pause-self-when-done_src_%29" class="indexlink" data-pltdoc="x">(pause-self-when-done src)<br/></a><a href="rsc3__ugens.html#%28part.__peak_trig_reset_%29" class="indexlink" data-pltdoc="x">(peak trig reset)<br/></a><a href="rsc3__ugens.html#%28part.__peak-follower_in_decay_%29" class="indexlink" data-pltdoc="x">(peak-follower in decay)<br/></a><a href="rsc3__ugens.html#%28part.__phasor_trig_rate_start_end_resetpos_%29" class="indexlink" data-pltdoc="x">(phasor trig rate start end resetpos)<br/></a><a href="rsc3__ugens.html#%28part.__pink-noise_rate_%29" class="indexlink" data-pltdoc="x">(pink-noise rate)<br/></a><a href="rsc3__ugens.html#%28part.__pitch_in_init.Freq_min.Freq_max.Freq_exec.Freq_max.Bins.Per.Octave%29" class="indexlink" data-pltdoc="x">(pitch in initFreq minFreq maxFreq execFreq maxBinsPerOctave<br/></a><a href="rsc3__ugens.html#%28part.__pitch-shift_in_win.Size_pch.Ratio_pch.Dispersion_
#|
fft feature detector for onset detection based on work described in
Jensen,K. &amp; Andersen, T. H. (2003). Real-time Beat Estimation Using
Feature Extraction. in Proceedings of the Computer Music Modeling and
Retrieval Symposium, Lecture Notes in Computer Science. springer
Verlag.
First order derivatives of the features are taken. Threshold may
need to be set low to pick up on changes.
buffer - fft buffer to read from.
propsc - Proportion of spectral centroid feature.
prophfe - Proportion of high frequency energy feature.
prophfc - Proportion of high frequency content feature.
propsf - Proportion of spectral flux feature.
threshold - Threshold level for allowing a detection
waittime - If triggered, minimum wait until a further frame can
cause another spot (useful to stop multiple detects on
heavy signals)
Default values in sclang are: propsc=0.25, prophfe=0.25,
prophfc=0.25, propsf=0.25, threshold=1.0, waittime=0.04.
|#
(with-sc3
(lambda (fd)
(async fd (b-alloc 0 2048 1))))
(let* ((source (sound-in 0))
(detect (pv-jensen-andersen (fft* 0 source)
0.25 0.25 0.25 0.25
(mouse-x kr 0.01 1.0 1 0.1)
0.04)))
(audition
(out 0 (mul (sin-osc ar (mce2 440 445) 0)
(decay (mul 0.1 detect) 0.1)))))<br/></a><a href="rsc3__ugens.html#%28part.__pv-local-max_buffer_threshold_%29" class="indexlink" data-pltdoc="x">(pv-local-max buffer threshold)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-above_buffer_threshold_%29" class="indexlink" data-pltdoc="x">(pv-mag-above buffer threshold)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-below_buffer_threshold_%29" class="indexlink" data-pltdoc="x">(pv-mag-below buffer threshold)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-mul_buffer.A_buffer.B_%29" class="indexlink" data-pltdoc="x">(pv-mag-mul bufferA bufferB)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-noise_buffer_%29" class="indexlink" data-pltdoc="x">(pv-mag-noise buffer)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-shift_buffer_stretch_shift_%29" class="indexlink" data-pltdoc="x">(pv-mag-shift buffer stretch shift)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-smear_buffer_bins_%29" class="indexlink" data-pltdoc="x">(pv-mag-smear buffer bins)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mag-squared_buffer_%29" class="indexlink" data-pltdoc="x">(pv-mag-squared buffer)<br/></a><a href="rsc3__ugens.html#%28part.__pv-max_buffer.A_buffer.B_%29" class="indexlink" data-pltdoc="x">(pv-max bufferA bufferB)<br/></a><a href="rsc3__ugens.html#%28part.__pv-min_buffer.A_buffer.B_%29" class="indexlink" data-pltdoc="x">(pv-min bufferA bufferB)<br/></a><a href="rsc3__ugens.html#%28part.__pv-mul_buffer.A_buffer.B_%29" class="indexlink" data-pltdoc="x">(pv-mul bufferA bufferB)<br/></a><a href="rsc3__ugens.html#%28part.__pv-phase-shift_buffer_shift_%29" class="indexlink" data-pltdoc="x">(pv-phase-shift buffer shift)<br/></a><a href="rsc3__ugens.html#%28part.__pv-phase-shift270_buffer_%29" class="indexlink" data-pltdoc="x">(pv-phase-shift270 buffer)<br/></a><a href="rsc3__ugens.html#%28part.__pv-phase-shift90_buffer_%29" class="indexlink" data-pltdoc="x">(pv-phase-shift90 buffer)<br/></a><a href="rsc3__ugens.html#%28part.__pv-rand-comb_buffer_wipe_trig_%29" class="indexlink" data-pltdoc="x">(pv-rand-comb buffer wipe trig)<br/></a><a href="rsc3__ugens.html#%28part.__pv-rand-wipe_buffer.A_buffer.B_wipe_trig_%29" class="indexlink" data-pltdoc="x">(pv-rand-wipe bufferA bufferB wipe trig)<br/></a><a href="rsc3__ugens.html#%28part.__pv-rect-comb_buffer_num.Teeth_phase_width____with-sc3___lambda__fd______async_fd__b-alloc_10_2048_1_______let____dup__lambda__a___mce2_a_a____________x__mouse-x_kr_0_0_5_0_0_1___________y__mouse-y_kr_0_0_5_0_0_1___________n__dup__mul__white-noise_ar__0_3____________c__pv-rect-comb__fft__10_n__8_x_y_______audition__out_0__ifft__c_______let____dup__lambda__a___mce2_a_a____________p__mul-add__lf-tri_kr_0_097_0__0_4_0_5___________w__mul-add__lf-tri_kr_0_24_0__-0_5_0_5___________n__dup__mul__white-noise_ar__0_3____________c__pv-rect-comb__fft__10_n__8_p_w_______audition__out_0__ifft__c____%29" class="indexlink" data-pltdoc="x">(pv-rect-comb buffer numTeeth phase width)
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 2048 1))))
(let* ((dup (lambda (a) (mce2 a a)))
(x (mouse-x kr 0 0.5 0 0.1))
(y (mouse-y kr 0 0.5 0 0.1))
(n (dup (mul (white-noise ar) 0.3)))
(c (pv-rect-comb (fft* 10 n) 8 x y)))
(audition (out 0 (ifft* c))))
(let* ((dup (lambda (a) (mce2 a a)))
(p (mul-add (lf-tri kr 0.097 0) 0.4 0.5))
(w (mul-add (lf-tri kr 0.24 0) -0.5 0.5))
(n (dup (mul (white-noise ar) 0.3)))
(c (pv-rect-comb (fft* 10 n) 8 p w)))
(audition (out 0 (ifft* c))))<br/></a><a href="rsc3__ugens.html#%28part.__pv-rect-comb2_buffer.A_buffer.B_num.Teeth_phase_width_%29" class="indexlink" data-pltdoc="x">(pv-rect-comb2 bufferA bufferB numTeeth phase width)<br/></a><a href="rsc3__ugens.html#%28part.__.P.V_.Magclip_buffer_threshold_%29" class="indexlink" data-pltdoc="x">(PV_Magclip buffer threshold)<br/></a><a href="rsc3__ugens.html#%28part.__.P.V_.Magfreeze_buffer_freeze_%29" class="indexlink" data-pltdoc="x">(PV_Magfreeze buffer freeze)<br/></a><a href="rsc3__ugens.html#%28part.__pvcollect_chain_numframes_func_frombin_tobin_zeroothers_%29" class="indexlink" data-pltdoc="x">(pvcollect chain numframes func frombin tobin zeroothers)<br/></a><a href="rsc3__ugens.html#%28part.__quad-n_rate_freq_a_b_c_xi_%29" class="indexlink" data-pltdoc="x">(quad-n rate freq a b c xi)<br/></a><a href="rsc3__ugens.html#%28part.__rand_lo_hi_%29" class="indexlink" data-pltdoc="x">(rand lo hi)<br/></a><a href="rsc3__ugens.html#%28part.__rand-id_rate_id_%29" class="indexlink" data-pltdoc="x">(rand-id rate id)<br/></a><a href="rsc3__ugens.html#%28part.__rand-seed_rate_trig_seed_%29" class="indexlink" data-pltdoc="x">(rand-seed rate trig seed)<br/></a><a href="rsc3__ugens.html#%28part.__record-buf_bufnum_offset_reclevel_prelevel_run_loop_trigger_inputs_%29" class="indexlink" data-pltdoc="x">(record-buf bufnum offset reclevel prelevel run loop trigger inputs)<br/></a><a href="rsc3__ugens.html#%28part.__replace-out_bufferindex_inputs_%29" class="indexlink" data-pltdoc="x">(replace-out bufferindex inputs)<br/></a><a href="rsc3__ugens.html#%28part.__resonz_in_freq_bwr_%29" class="indexlink" data-pltdoc="x">(resonz in freq bwr)<br/></a><a href="rsc3__ugens.html#%28part.__.Rhpf_in_freq_rq_%29" class="indexlink" data-pltdoc="x">(Rhpf in freq rq)<br/></a><a href="rsc3__ugens.html#%28part.__ring1_a_b_%29" class="indexlink" data-pltdoc="x">(ring1 a b)<br/></a><a href="rsc3__ugens.html#%28part.__ring2_a_b_%29" class="indexlink" data-pltdoc="x">(ring2 a b)<br/></a><a href="rsc3__ugens.html#%28part.__ring3_a_b_%29" class="indexlink" data-pltdoc="x">(ring3 a b)<br/></a><a href="rsc3__ugens.html#%28part.__ring4_a_b_%29" class="indexlink" data-pltdoc="x">(ring4 a b)<br/></a><a href="rsc3__ugens.html#%28part.__ringz_in_freq_decay.Time_%29" class="indexlink" data-pltdoc="x">(ringz in freq decayTime)<br/></a><a href="rsc3__ugens.html#%28part.__.Rlpf_in_freq_rq_%29" class="indexlink" data-pltdoc="x">(Rlpf in freq rq)<br/></a><a href="rsc3__ugens.html#%28part.__rossler_rate_chaos.Param_dt_%29" class="indexlink" data-pltdoc="x">(rossler rate chaosParam dt)<br/></a><a href="rsc3__ugens.html#%28part.__rotate2_x_y_pos_%29" class="indexlink" data-pltdoc="x">(rotate2 x y pos)<br/></a><a href="rsc3__ugens.html#%28part.__round_a_b_%29" class="indexlink" data-pltdoc="x">(round a b)<br/></a><a href="rsc3__ugens.html#%28part.__round-up_a_b_%29" class="indexlink" data-pltdoc="x">(round-up a b)<br/></a><a href="rsc3__ugens.html#%28part.__running-max_in_trig_%29" class="indexlink" data-pltdoc="x">(running-max in trig)<br/></a><a href="rsc3__ugens.html#%28part.__running-min_in_trig_%29" class="indexlink" data-pltdoc="x">(running-min in trig)<br/></a><a href="rsc3__ugens.html#%28part.__running-sum_in_numsamp_%29" class="indexlink" data-pltdoc="x">(running-sum in numsamp)<br/></a><a href="rsc3__ugens.html#%28part.__saw_rate_freq_%29" class="indexlink" data-pltdoc="x">(saw rate freq)<br/></a><a href="rsc3__ugens.html#%28part.__scale-neg_a_b_%29" class="indexlink" data-pltdoc="x">(scale-neg a b)<br/></a><a href="rsc3__ugens.html#%28part.__schmidt_in_lo_hi_%29" class="indexlink" data-pltdoc="x">(schmidt in lo hi)<br/></a><a href="rsc3__ugens.html#%28part.__select_which_array_%29" class="indexlink" data-pltdoc="x">(select which array)<br/></a><a href="rsc3__ugens.html#%28part.__send-trig_in_id_value_%29" class="indexlink" data-pltdoc="x">(send-trig in id value)<br/></a><a href="rsc3__ugens.html#%28part.__set-reset-ff_trig_reset_%29" class="indexlink" data-pltdoc="x">(set-reset-ff trig reset)<br/></a><a href="rsc3__ugens.ht
(import (rsc3))
(audition (out 0 (mul (f-sin-osc ar (mce2 440 550) 0) 0.05)))
(let ((f (x-line kr 200 4000 1 remove-synth)))
(audition (out 0 (mul (f-sin-osc ar f 0) 0.25))))<br/></a><a href="rsc3__ugens.html#%28part._.See_allpass-n%29" class="indexlink" data-pltdoc="x">See allpass-n<br/></a><a href="rsc3__ugens.html#%28part._.See_buf-comb-c%29" class="indexlink" data-pltdoc="x">See buf-comb-c<br/></a><a href="rsc3__ugens.html#%28part._.See_buf-delay-c%29" class="indexlink" data-pltdoc="x">See buf-delay-c<br/></a><a href="rsc3__ugens.html#%28part._.See_.Bufallpass-c%29" class="indexlink" data-pltdoc="x">See Bufallpass-c<br/></a><a href="rsc3__ugens.html#%28part._.See_comb-n%29" class="indexlink" data-pltdoc="x">See comb-n<br/></a><a href="rsc3__ugens.html#%28part._.See_cusp-n%29" class="indexlink" data-pltdoc="x">See cusp-n<br/></a><a href="rsc3__ugens.html#%28part._.See_dbrown%29" class="indexlink" data-pltdoc="x">See dbrown<br/></a><a href="rsc3__ugens.html#%28part._.See_delay-n%29" class="indexlink" data-pltdoc="x">See delay-n<br/></a><a href="rsc3__ugens.html#%28part._.See_drand%29" class="indexlink" data-pltdoc="x">See drand<br/></a><a href="rsc3__ugens.html#%28part._.See_dwhite%29" class="indexlink" data-pltdoc="x">See dwhite<br/></a><a href="rsc3__ugens.html#%28part._.See_fb-sine-c%29" class="indexlink" data-pltdoc="x">See fb-sine-c<br/></a><a href="rsc3__ugens.html#%28part._.See_free.Verb%29" class="indexlink" data-pltdoc="x">See freeVerb<br/></a><a href="rsc3__server_commands.html#%28part._see_g-new%29" class="indexlink" data-pltdoc="x">see g-new<br/></a><a href="rsc3__ugens.html#%28part._.See_.Gbman.L_%29" class="indexlink" data-pltdoc="x">See GbmanL.<br/></a><a href="rsc3__ugens.html#%28part._.See_gt%29" class="indexlink" data-pltdoc="x">See gt<br/></a><a href="rsc3__ugens.html#%28part._.See_henon-n%29" class="indexlink" data-pltdoc="x">See henon-n<br/></a><a href="rsc3__ugens.html#%28part._.See_latoocarfian-c_%29" class="indexlink" data-pltdoc="x">See latoocarfian-c.<br/></a><a href="rsc3__ugens.html#%28part._.See_lf-cub_%29" class="indexlink" data-pltdoc="x">See lf-cub.<br/></a><a href="rsc3__ugens.html#%28part._.See_lf-noise0%29" class="indexlink" data-pltdoc="x">See lf-noise0<br/></a><a href="rsc3__ugens.html#%28part._.See_lfd-noise0%29" class="indexlink" data-pltdoc="x">See lfd-noise0<br/></a><a href="rsc3__ugens.html#%28part._.See_lin-cong-c_%29" class="indexlink" data-pltdoc="x">See lin-cong-c.<br/></a><a href="rsc3__server_commands.html#%28part._see_n-set%29" class="indexlink" data-pltdoc="x">see n-set<br/></a><a href="rsc3__ugens.html#%28part._.See_quad-n%29" class="indexlink" data-pltdoc="x">See quad-n<br/></a><a href="rsc3__server_commands.html#%28part._see_s-new%29" class="indexlink" data-pltdoc="x">see s-new<br/></a><a href="rsc3__ugens.html#%28part._.See_standard-l_%29" class="indexlink" data-pltdoc="x">See standard-l.<br/></a><a href="rsc3__ugens.html#%28part._subsample-offset%29" class="indexlink" data-pltdoc="x">subsample-offset<br/></a></p></td></tr></table><div class="navsetbottom"><span class="navleft"><div class="nosearchform"></div>&nbsp;&nbsp;<span class="tocsettoggle">&nbsp;&nbsp;<a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright">&nbsp;&nbsp;<a href="rsc3__tutorials.html" title="backward to &quot;3 rsc3: tutorials&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;rsc3: racket/scheme/supercollider&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<span class="nonavigation">next &rarr;</span></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>