hi<br><br><div class="gmail_quote">2009/12/12 Simon Iten <span dir="ltr">&lt;<a href="mailto:itensimon@gmail.com">itensimon@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi list,<br>
<br>
could somebody post the pd help patch for sigmund~ ? i can&#39;t find it on<br>
my system...<br>
</blockquote></div><br>normaly it lies in &quot;extra/sigmund~&quot; (pd vanilla)<br><br>here it is anyway:<br><br>#N canvas 167 -7 580 617 12;<br>#X text 42 4 sigmund~ - sinusoidal analysis and pitch tracking;<br>#N canvas 432 117 573 597 using-with-tables 0;<br>
#X obj 29 368 print peak;<br>#N canvas 0 0 450 300 (subpatch) 0;<br>#X array insignal 1024 float 2;<br>#X coords 0 1 1023 -1 200 140 1;<br>#X restore 83 426 graph;<br>#X obj 314 513 phasor~;<br>#X obj 294 429 loadbang;<br>
#X obj 314 461 440;<br>#X floatatom 313 488 5 0 0 0 - - -;<br>#X obj 305 544 tabwrite~ insignal;<br>#X obj 290 516 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144<br>-1 -1;<br>#X text 114 11 Using sigmund~ on arrays;<br>
#X text 42 33 If invoked with the &quot;-t&quot; flag (as a creation argument)<br>\, sigmund~ analyzes waveforms stored in arrays. Instead of an incoming<br>signal \, feed it &quot;list&quot; messages with the following arguments:;<br>
#X text 37 118 table name (a symbol);<br>#X text 38 137 number of points;<br>#X obj 29 342 sigmund~ -t -npeak 10 -maxfreq 5000 peaks;<br>#X msg 29 316 list insignal 1024 0 44100 0;<br>#X text 37 158 index of first point;<br>
#X text 39 179 sample rate;<br>#X text 38 200 debug flag (print debugging info if nonzero);<br>#X text 23 232 In this mode \, only the &quot;env&quot; \, &quot;pitch&quot; \, and &quot;peaks&quot;<br>outputs are meaningful.;<br>
#X text 31 294 click here to test:;<br>#X connect 2 0 6 0;<br>#X connect 3 0 4 0;<br>#X connect 4 0 5 0;<br>#X connect 5 0 2 0;<br>#X connect 5 0 7 0;<br>#X connect 7 0 6 0;<br>#X connect 12 0 0 0;<br>#X connect 13 0 12 0;<br>
#X restore 330 553 pd using-with-tables;<br>#X obj 40 512 phasor~;<br>#X obj 40 425 loadbang;<br>#X floatatom 40 471 5 0 120 0 - - -;<br>#X floatatom 39 561 5 0 0 0 - - -;<br>#X floatatom 245 563 5 0 0 0 - - -;<br>#X obj 40 490 mtof;<br>
#X obj 40 448 69;<br>#X text 38 579 pitch;<br>#X text 222 582 envelope;<br>#X text 13 28 Sigmund~ analyzes an incoming sound into sinusoidal components<br>\, which may be reported individually or combined to form a pitch estimate.<br>
Possible outputs are specified as creation arguments:;<br>#X text 56 95 pitch - output pitch continuously;<br>#N canvas 518 74 588 728 setting-parameters 0;<br>#X msg 182 66 print;<br>#X floatatom 192 92 5 0 0 0 - - -;<br>
#X msg 192 113 minpower \$1;<br>#X obj 182 139 sigmund~ -minpower 40;<br>#X text 39 14 You can set parameters either by creation arguments \,<br>or else using messages. The &quot;print&quot; message gives you the current values<br>
of all the parameters:;<br>#X text 28 169 npts: number of points used in an analysis. Must be<br>a power of two \, at least 128 The minimum frequency that can be tracked<br>is about 2(sample_rate)/npts.;<br>#X text 26 219 hop: number of points between analyses. Must be a power<br>
of two \, at least the DSP vector size (usually 64). This regulates<br>the number of analyses done per unit of time.;<br>#X text 28 271 npeak: maximum number of sinusoidal peaks to look for.<br>The computation time is quadratic in the number of peaks actually found<br>
(this number only sets an upper limit). Use it to balance CPU time<br>with quality of results.;<br>#X text 30 336 maxfreq: maximum frequency of sinusoidal peaks to look<br>for. This can be useful in situations where background noise creates<br>
high-frequency \, spurious peaks..;<br>#X text 37 388 vibrato: maximum deviation from &quot;pitch&quot; to accept as<br>normal vibrato (affects &quot;notes&quot; output only). If the value is too small.<br>vibratos will appear as trills. If too large \, very small melodic<br>
intervals may not be reported as new notes.;<br>#X text 33 457 stabletime: time period to wait before reporting a note<br>(affects &quot;notes&quot; output only). The &quot;pitch&quot; must be present and must<br>not vary more than &quot;vibrato&quot; for this entire period to report a note.<br>
If too large \, the &quot;notes&quot; will be unnecessarily delayed. If too small<br>\, spurious notes get output.;<br>#X text 31 551 minpower: minimum measured RMS level to report a pitch<br>(affects &quot;pitch&quot; and &quot;notes&quot; output only). Signals quieter than this<br>
will be assumed to be crosstalk and ignored.;<br>#X text 32 602 growth: minimum measured RMS growth to report a new<br>note (affects &quot;notes&quot; output only). The RMS level must rise by this<br>many dB (within a time period given by &quot;stabletime&quot;) to report a repetition<br>
of a note at or near the previously output pitch.;<br>#X connect 0 0 3 0;<br>#X connect 1 0 2 0;<br>#X connect 2 0 3 0;<br>#X restore 330 531 pd setting-parameters;<br>#N canvas 67 29 641 815 sinusoid-tracking 0;<br>#X obj 124 267 sigmund~ -npeak 10 peaks;<br>
#X obj 124 214 phasor~;<br>#X obj 124 144 loadbang;<br>#X floatatom 124 190 5 0 120 0 - - -;<br>#X obj 124 295 route 0 1 2 3 4 5 6 7 8 9;<br>#X obj 82 339 unpack 0 0 0 0;<br>#X floatatom 82 461 5 0 0 0 - - -;<br>#X floatatom 122 431 5 0 0 0 - - -;<br>
#X floatatom 162 406 5 0 0 0 - - -;<br>#X obj 124 167 440;<br>#X floatatom 203 380 5 0 0 0 - - -;<br>#X obj 322 349 unpack 0 0 0 0;<br>#X floatatom 322 471 5 0 0 0 - - -;<br>#X floatatom 362 441 5 0 0 0 - - -;<br>#X floatatom 402 416 5 0 0 0 - - -;<br>
#X floatatom 443 390 5 0 0 0 - - -;<br>#X text 385 475 frequency (Hz.);<br>#X text 419 442 peak amplitude (linear);<br>#X text 464 416 cosine component;<br>#X text 499 390 sine component;<br>#X text 79 505 loudest partial;<br>
#X text 332 508 quietest partial;<br>#X text 36 4 You can ask for sinusoidal peaks in decreasing order of<br>amplitude or arranged into maximally continuous tracks for resynthesis.<br>(Or you can ask for both.) If you ask for peaks \, out come lists of<br>
five numbers \, one for each sinusoid at each analysis period. The<br>first is the index number of the sinusoid (so you can use &quot;route&quot; to<br>claw them apart). The other four are as shown:;<br>#X obj 204 611 osc~ 440;<br>
#X obj 204 635 *~;<br>#X obj 205 689 unpack 0 0 0 0;<br>#X floatatom 205 782 5 0 0 0 - - -;<br>#X floatatom 245 760 5 0 0 0 - - -;<br>#X floatatom 285 737 5 0 0 0 - - -;<br>#X floatatom 326 713 5 0 0 0 - - -;<br>#X obj 246 638 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0<br>
1;<br>#X text 43 535 If you ask for &quot;tracks&quot; \, the output is four numbers:<br>index \, frequency \, and amplitude as before \, and finally a flag<br>which is one for a new track \, zero for a continuation \, minus one<br>
for an empty track.;<br>#X obj 205 662 sigmund~ -npts 16384 -hop 8192 -npeak 1 tracks;<br>#X connect 0 0 4 0;<br>#X connect 1 0 0 0;<br>#X connect 2 0 9 0;<br>#X connect 3 0 1 0;<br>#X connect 4 0 5 0;<br>#X connect 4 9 11 0;<br>
#X connect 5 0 6 0;<br>#X connect 5 1 7 0;<br>#X connect 5 2 8 0;<br>#X connect 5 3 10 0;<br>#X connect 9 0 3 0;<br>#X connect 11 0 12 0;<br>#X connect 11 1 13 0;<br>#X connect 11 2 14 0;<br>#X connect 11 3 15 0;<br>#X connect 23 0 24 0;<br>
#X connect 24 0 32 0;<br>#X connect 25 0 26 0;<br>#X connect 25 1 27 0;<br>#X connect 25 2 28 0;<br>#X connect 25 3 29 0;<br>#X connect 30 0 24 1;<br>#X connect 32 0 25 0;<br>#X restore 330 508 pd sinusoid-tracking;<br>#X text 52 165 tracks - output sinusoidal peaks organized into tracks<br>
;<br>#X text 56 111 notes - output pitch at the beginning of notes;<br>#X text 339 485 more details:;<br>#X text 10 184 Parameters you may set (in creation arguments or messages):<br>;<br>#X text 60 207 npts - number of points in each analysis window (1024)<br>
;<br>#X text 60 225 hop - number of points between each analysis (512);<br>#X text 60 242 npeak - number of sinusoidal peaks (20);<br>#X text 61 279 vibrato - depth of vibrato to expect in 1/2-tones (1)<br>;<br>#X text 60 298 stabletime - time (msec) to wait to report notes (50)<br>
;<br>#X obj 39 535 sigmund~ -hop 4096 pitch env;<br>#X text 62 316 minpower - minimum power (dB) to report a pitch (50)<br>;<br>#X text 62 335 growth - growth (dB) to report a new note (7);<br>#X text 54 147 peaks - output all sinusoidal peaks in order of amplitude<br>
;<br>#X text 11 356 The npts and hop parameters are in samples \, and are<br>powers of two. The example below specifies a huge hop of 4096 (to slow<br>the output down) and to output &quot;pitch&quot; and &quot;env&quot;. (Those are the default<br>
outputs.);<br>#X text 61 260 maxfreq - maximum sinusoid frequency in Hz. (1000000)<br>;<br>#X text 55 128 env - output amplitude continuously;<br>#X text 380 596 updated for Pd v0.41;<br>#X connect 2 0 24 0;<br>#X connect 3 0 8 0;<br>
#X connect 4 0 7 0;<br>#X connect 7 0 2 0;<br>#X connect 8 0 4 0;<br>#X connect 24 0 5 0;<br>#X connect 24 1 6 0;<br><br clear="all"><br>-- <br>ypatios<br>