diff options
Diffstat (limited to 'pd/doc')
220 files changed, 17590 insertions, 252 deletions
diff --git a/pd/doc/1.manual/x3.htm b/pd/doc/1.manual/x3.htm index 18d220a6..d34f70e8 100644 --- a/pd/doc/1.manual/x3.htm +++ b/pd/doc/1.manual/x3.htm @@ -13,7 +13,7 @@ Pd Documentation chapter 3: Getting Pd to run <A href=index.htm#s3> back to table of contents </A> <BR><BR> -Pd runs under Irix, Windows, and Linux. +Pd runs under Irix, Microsoft Windows, Linux, and Mac OS 10.2 (Jaguar). How to get Pd up and running depends on your operating system, but the overall strategy is the same. You must first get and install it, and @@ -61,6 +61,11 @@ operating systems it runs on: IRIX, MS Windows, Linux, and Max OSX. <H4> <A name=s1.1> 3.1. IRIX (SGI machines) </A> </H4> +<P> (NOTE: as of release 0.35 I haven't had an IRIX machine to compile +Pd on. Soeren Bovbjerg has kindly compiled 0.35 and 0.36 for IRIX; +you can find these at +<A href=http://www.cvmt.dk/~sb/> http://www.cvmt.dk/~sb/. </A>) + <P> Download Pd, which will be a "tar.Z" file. You can unpack this by typing "zcat [name].tar.Z | tar xf -" to a shell. This creates a directory named "pd". @@ -251,8 +256,9 @@ output in W95; see the command line arguments below. <P> What to do depends on which flavor of Linux you are running (e.g., Debian or Red Hat). The instructions here should work for Pd 0.33 and up regardless of -your situation, but if you have any trouble just mail msp@ucsd.edu and I'll try -to figure out what's wrong and update the instructions accordingly. +your situation. (If not, you can read the Pd mailing list archives for +recent problems; if you have found a new problem you're welcome to post it +to the list.) <P> Before you start, you might want to check that you have the resources Pd needs. The main things you need are the C compiler, X windows (including @@ -316,21 +322,6 @@ to "pd/src" and type <P> Alternatively, as superuser, you can run "make install" after "make depend" and then anyone on your system can just type "pd" to run it. -<H5> TK support trouble </H5> - -Some people have reported a problem with Pd findind the shared libraries, -"libtcl.so" and "libtk.so". I don't know what causes this, but apparently you -can fix it, as root, by linking /usr/lib/libtcl8.3.so to /usr/lib/libtcl.so and -similarly for tk: - -<PRE> - -# cd /usr/lib -# ln -s libtk8.3.so libtk.so -# ln -s libtcl8.3.so libtcl.so - -</PRE> - <H5> Testing audio and MIDI. </H5> <P> @@ -366,12 +357,7 @@ audio latency your audio system can handle. <P> Be forewarned: installing and testing audio and MIDI drivers in Linux can take days or weeks. There apears to be no single place where you can get detailed -information on Linux audio. In addition to the information here, you should -see what's posted on Guenter's page, - - <a href="http://gige.epy.co.at/"> - http://gige.epy.co.at/</A> . - +information on Linux audio. <P> Depending on your hardware and software, you might or might not be able to @@ -473,10 +459,8 @@ Alsa comes in a "finished" version (0.5.x) and a different, redesigned, "beta" version, 0.9. Installing ALSA can be tricky and/or confusing. -<P> As of version 0.33 Pd works with either 0.5.x or 0.9.x versions. -The RPM version of Pd is compiled for 0.9.x. If you're starting from the -".tar.gz" version, you have to "./configure --enable-alsa" to get it; see -the "INSTALL.txt" file in the installation. +<P> As of version 0.37 Pd works only with 0.9.x versions. +The RPM version of Pd is compiled for 0.9.x. <P> By default, Pd uses OSS. If you are running ALSA, Pd will use ALSA's OSS emulation. To make Pd use ALSA "natively", i.e., the way ALSA is designed @@ -492,47 +476,6 @@ one. You can also specify it the ALSA way: "-alsadev hw:3,0". Here's a rundown on my experiences with sound cards so far. See also the Pd mailing list archives. -<H6> opl3sa </H6> - -This is the old ISA "Yamaha" audio system. It comes on many Dell machines and -seems to offer reasonable consumer quality audio, at least under NT. I -believe the current version of OSS can get full duplex operation out of an -OPL3sa audio system. -This is an ISA ("plug and play" device and you have to deal with I/O -addresses and all that. - -<H6> cs4232 </H6> - -The 1999 vintage dual-processor Dell machines have "cs4232" audio, which I -couldn't get working. - -<H6> es1370 (old Creative PCI128s; Ensoniq AudioPCI) </H6> - -<P> -The audio inputs and outputs on my PCI128 aren't clearly labelled and various -documents give them inconsistent names. On my card there are 4 stereo -mini jacks and a joystick port, in this order: - -<PRE> -joystick black green red blue - bidirectional line-out mic-in line-in -</PRE> - -<P> It used to be possilbe to get quadraphonic audio in and out -of this card, but I haven't tried this in years. - -<H6> Creative SBLive </H6> - -This seems to work fine either with ALSA or OSS as of Pd version 0.35; earlier -versions of Pd didn't see MIDI input under OSS (the driver's fault, not Pd's, -but I figured out a workaround.) - -<H6> Sonorus Stud I/O </H6> - -This $1000 card is supposed to do multichannel digital I/O -in Linux, via a beta version of a commercial OSS driver ($40). -I don't know if anyone has used it with Pd. - <H6> RME 9652 (Hammerfall) </H6> <P> This is the best sound card out there; it costs around $500 and has 3 ADAT @@ -549,10 +492,6 @@ RedHat 7.1 and up). You have to download and compile it: <P> You must then run Pd using the "-32bit' flag, because this uses a non-standard extension of OSS to 32 bit samples. -<P> There's an older driver by Winfried Ritsch, invoked using the "-rme" -flag to Pd. This only works on 2.2 kernels, and you probably shouldn't -try it. It will probably be discontinued after Pd version 0.35. - <P> Hammerfalls now have an ALSA driver; from what I hear it won't work yet with Pd. I was unable to install the ALSA driver on the two machines I tried ("no such device"). @@ -574,50 +513,60 @@ In RedHat 7.0, motherboards with native i810 audio systems don't work in full duplex (they crash linux). Either run Pd -noadc or else (better) install ALSA. -<H6> Yamaha YMF724 </H6> - -The OSS driver for this card appears not to support MIDI. I haven't -tried with ALSA. - -<H6> ES1371 </H6> +<H4> <A name=s1.4> 3.4. Macintosh OSX </A> </H4> -In OSS, audio and MIDI seem both to work fine with this chipset. +Pd version 0.35 and up support Macintosh OSX, although there are still some +problems. You can always just download +the sources and compile it yourself, or (easier) +find a MacOSX-style "package". The first package was put together by Adam +Lindsay and can be found on +<A href=http://homepage.mac.com/atl/sw> +http://homepage.mac.com/atl/sw</A>. The package simply installs itself +and you needn't follow the directions below. -<H4> <A name=s1.4> 3.4. Macintosh OSX </A> </H4> +<H5> To install on OSX from source: </H5> -Pd version 0.35 supports Macintosh OSX, although there are still various -problems. You can either download Pd with Mac OSX binaries, or just download -the sources and compile it yourself. -<H5> To install the binary OSX release: </H5> +Whether you've downloaded the source or the "package" you can +always compile Pd for yourself, whether to make your own improvements, or +possibly so that you can get the newest version before it shows up compiled for +Mac OS X. +<P> To be able to compile Pd, you must have installed Tcl/Tk +specifically in +/Applications/Wish Shell.app +and /Library/Frameworks/Tk.framework and /Library/Frameworks/Tcl.framework. <P> First download and install TK for OSX (http://sourceforge.net/projects/tcl/). Get a recent one compiled for -OSX, by chasing through "Mac OS X Tk Snapshots." I got -version 8.4a4-2, in a file named "MacOSXTk8.4a4-2.tar.gz ". Unpacking this -yields three directories: ./Applications/Wish Shell.app, -./Library/Frameworks/Tcl.framework, -and ./Library/Frameworks/Tk.framework. These must be moved, either to: +OSX, by chasing through "latest file releases", and finding a "download" +link for TCL. Then download "TclTkAqua-8.4.1-Jaguar.dmg" (the version +number may change). Click on this file and a "folder" will open. Click +on the "package" icon in that folder and an auto-installer will put Tcl/Tk +on your system. + +<P> For old versions of Tcl/Tk you also had to get the "h" files from XFree86 +and put them in +/usr/X11R6/include. You can download just the H files from: <pre> - ~/Applications/Wish Shell.app - ~/Library/Frameworks/Tcl.framework - ~/Library/Frameworks/Tk.framework + http://www.crca.ucsd.edu/~msp/x.tgz </pre> -or, if you wish to make them available to other users (or make it possible to -recompile Pd), in /Applications and /Library instead. +(the individual files seem to have adequate copyright notices so that +I can just redistribute them.) ((I hope this is no longer necessary but I +notice people keep downloading these files anyway, so I'll leave them there +a while longer until I'm sure they're not needed.)) + +<P> Then, just as for linux, just unload pd-whatever.tar.gz into a directory +such as ~/pd-0.35-test17 , cd to pd-0.36-0/src, type "./configure" +and "make". Then type ~/pd-0.36-0/bin/pd to a shell and enjoy! -<P> Then download and unpack the Pd binary distribution for OS X. This will -create a directory with a name like ~/Desktop/pd-0.35-test22. You can move -this elsewhere if you wish (to ~/pd, for example). To a shell window, type -either "~/Desktop/pd-0.35-test22/bin/pd" or, if you moved it as suggested, -"~/pd/bin/pd" . If you wish you can put the line, +<P> If you wish you can put the line, <pre> alias pd ~/pd/bin/pd </pre> in the file, ~/.tcshrc, so that you can later just type "pd" to a shell. (The -shell only reads the ~/.tcshrc file onstartup, so this won't take effect in +shell only reads the ~/.tcshrc file on startup, so this won't take effect in any existing shells unless you specially type <pre> source ~/.tcshrc @@ -638,47 +587,7 @@ I think you just download the OSX driver and follow directions. pd -midiindev 1 -midioutdev 2 </pre> -to get MIDI working. At the moment, using a midiman Midisport 2x2, I'm getting -several lines of debugging printout for each incoming MIDI message; it seems to -be the driver printing it out. I don't know how to turn this off. - -<P> To get Pd running at high priority, so that you'll get fewer skips in the -audio input and output, you must "renice" it. The easiest way to do this is -to make it SETUID and use the "-rt" flag. To do this, become root (you might -have to add a root account to do this) and type: - -<pre> - chown root ~ferguson/pd/bin/pd - chmod 4755 ~ferguson/pd/bin/pd -</pre> -(assuming your username is "ferguson"). - -<H5> To compile your own Pd in OSX: </H5> - -Whether you've downloaded the source or the OSX binary distribution you can -always Pd for yourself, whether to make your own improvements, or possibly -so that you can get the newest version before it shows up compiled -for Mac OS X. - -<P> To be able to compile Pd, you must have installed Tcl/Tk - specifically in -/Applications/Wish Shell.app -and /Library/Frameworks/Tk.framework and /Library/Frameworks/Tcl.framework. - -You must also get the "h" files from XFree86 and put them in -/usr/X11R6/include. You can download just the H files from: -<pre> - http://www.crca.ucsd.edu/~msp/x.tgz -</pre> -(the individual files seem to have adequate copyright notices so that -I can just redistribute them.) - -Then, just as for linux, just unload pd-whatever.tar.gz into a directory -such as ~/pd-0.35-test17 , cd to pd-0.35-test17/src, type "./configure" -and "make". - -then type ~/pd-0.35-test17/bin/pd to a shell and enjoy! - +to get MIDI working. <H4> <A name=s3> 3.5. graphics rendering using GEM </A> </H4> diff --git a/pd/doc/1.manual/x5.htm b/pd/doc/1.manual/x5.htm index 767ffc3e..0b18cf1a 100644 --- a/pd/doc/1.manual/x5.htm +++ b/pd/doc/1.manual/x5.htm @@ -16,6 +16,55 @@ This section tracks changes in Pd's current implementation. <H4> <A name=s2> 5.1. release notes </A> </H4> +<P> ------------------ 0.37-test 1 -------------------------- + +<P> The MacOSX version now prioritizes itself effectively (thanks to +gert@test.at (v93r)) via Adam Lindsay). Adam has made a proper MacOSX +"package" for Pd; see <A href=http://homepage.mac.com/atl/sw> +http://homepage.mac.com/atl/sw</A>. + +<P> A bug was fixed in readsf~/writesf~ (things were coming out in the wrong +number of channels.) + +<P> A problem compiling Pd with TK8.4 (the latest version) was fixed. + +<P> Large numbers of GUI improvements by Adam Lindsay, especially relevant +to Mac OSX. + +<P> For externs, the binary may now be included in a subdirectory of the +same name (e.g., "choice/choice.pd_linux" and "choice\choice.dll"). So +now you can pack multiple binaries for the same extern, along with the +source, in one convenient place. (Note that +"expr~" is an exception, since it goes by three different names, so this +trick fails for that example.) + +<P> "Help" files renamed "help-xxx.pd", so that help files are now possible +for abstractions. The "help path" feature from CVS (I forgot who contributed +that) is also included but should now not be needed: Pd remembers where it got +externs and abstractions and looks back in the same directory for a help file. +See the way "extras" is organized. + +<P> Pd refuses to connect signal outlets to non-signal inlets. + +<P> When you save any patch, Pd looks for all invocations of that patch +as an abstraction and reloads them. This unfortunately has the side effect of +making all the containing windows visible, but it's better than nothing. + + + +<P> ------------------ 0.36-1 ------------------------------- + +<P> "print" now queries you for a file to save the postscript to. + +<P> "expr" brought up to date (0.4) -- a bug was fixed involving expresions +like "max($f1, 100)" which had erroneously output an integer. + +<P> a bug fix in the 4-point interpolation formula, which affects tabosc4~, +tabread4~, tabread4, and vd~. These should have significantly lower +distortion than before. + +<P> bug fix: vradio, hradio "send symbol" feature didn't work + <P> ------------------ 0.36 ------------------------------- <P> There's now an "undo" for most editing operations. Undoing is only diff --git a/pd/doc/3.audio.examples/00.INTRO.txt b/pd/doc/3.audio.examples/00.INTRO.txt index af9e3c96..8792dc1e 100644 --- a/pd/doc/3.audio.examples/00.INTRO.txt +++ b/pd/doc/3.audio.examples/00.INTRO.txt @@ -10,14 +10,14 @@ Here is an approximate table of contents... frequency and pitch FM -2. wavetable synthesis +2. wavetable synthesis and sampling 3. synthetic waveforms, classic and modern pulses rectangles and sawtooth waves additive synthesis -4. sampling +4. more sampling 5. envelopes two flavors of ADSR envelope diff --git a/pd/doc/3.audio.examples/A01.sinewave.pd b/pd/doc/3.audio.examples/A01.sinewave.pd new file mode 100644 index 00000000..42b8aed0 --- /dev/null +++ b/pd/doc/3.audio.examples/A01.sinewave.pd @@ -0,0 +1,32 @@ +#N canvas 6 2 588 513 12; +#X obj 108 109 osc~ 440; +#X obj 108 168 dac~; +#X text 187 111 <-- 440 Hz. sine wave at full blast; +#X obj 108 138 *~ 0.05; +#X text 202 3 MAKING A SINE WAVE; +#X text 32 195 Audio computation can be turned on and off by sending +messages to the global "pd" object as follows:; +#X msg 98 239 \; pd dsp 1; +#X msg 202 239 \; pd dsp 0; +#X text 113 276 ON; +#X text 222 276 OFF; +#X text 29 297 You should see the Pd window change to reflect whether +audio is on or off. You can also turn audio on and off using the "audio" +menu \, but the buttons are provided as a shortcut.; +#X text 30 368 When DSP is on \, you should hear a tone whose pitch +is A 440 and whose amplitude is 0.05. If instead you are greeted with +silence \, you might want to read the HTML documentation on setting +up audio.; +#X text 28 434 In general when you start a work session with Pd \, +you will want to choose "test audio and MIDI" from the help window +\, which opens a more comprehensive test patch than this one.; +#X text 296 247 <-- click these; +#X text 187 139 <-- reduce amplitude to 0.05; +#X text 160 168 <----- send to the audio output device; +#X text 32 23 Audio computation in Pd is done using "tilde objects" +such as the three below. They use continuous audio streams to intercommunicate +\, as well as communicating with other ("control") Pd objects using +messages.; +#X text 342 490 updated for Pd version 0.36; +#X connect 0 0 3 0; +#X connect 3 0 1 0; diff --git a/pd/doc/3.audio.examples/A02.amplitude.pd b/pd/doc/3.audio.examples/A02.amplitude.pd new file mode 100644 index 00000000..d24be18d --- /dev/null +++ b/pd/doc/3.audio.examples/A02.amplitude.pd @@ -0,0 +1,37 @@ +#N canvas 73 190 702 512 12; +#X obj 64 65 osc~ 440; +#X obj 64 283 dac~; +#X text 145 66 <-- 440 Hz. sine wave at full blast; +#X msg 431 7 \; pd dsp 1; +#X msg 514 7 \; pd dsp 0; +#X text 456 45 ON; +#X text 534 43 OFF; +#X text 164 18 CONTROLLING AMPLITUDE; +#X text 35 327 Amplitudes of audio signals can have any reasonable +range \, but when you output a signal via the dac~ object \, the samples +should range between -1 and +1. Values out of that range will be "clipped." +; +#X obj 64 202 *~ 0; +#X floatatom 107 165 0 0 0 0 - - -; +#X obj 95 132 dbtorms; +#X floatatom 95 100 0 0 80 0 - - -; +#X text 141 100 <-- set amplitude here in dB; +#X text 211 133 <-- this converts dB to linear units; +#X text 210 164 <-- this shows the linear gain; +#X text 116 204 <-- multiply the sine wave by the gain \, reducing +its amplitude. You can also use the "*~" object to multiply two signals. +The "0" argument here instructs it that we'll just send it messages +to set the multiplier.; +#X text 35 396 Here we calculate a gain for the multiplier (*~) using +a "dbtorms" object (acronym for "dB to RMS"). 100 dB is normalized +to one \, and zero dB artificially outputs a true 0; +#X text 34 452 Pd assumes you have a two channel audio system unless +you tell it otherwise.; +#X text 440 486 updated for Pd version 0.33; +#X text 114 282 <-- and out. We're sending to both channels now.; +#X connect 0 0 9 0; +#X connect 9 0 1 0; +#X connect 9 0 1 1; +#X connect 11 0 9 1; +#X connect 11 0 10 0; +#X connect 12 0 11 0; diff --git a/pd/doc/3.audio.examples/A03.line.pd b/pd/doc/3.audio.examples/A03.line.pd new file mode 100644 index 00000000..392df533 --- /dev/null +++ b/pd/doc/3.audio.examples/A03.line.pd @@ -0,0 +1,55 @@ +#N canvas 369 106 647 598 12; +#X obj 56 79 osc~ 440; +#X obj 56 309 dac~; +#X msg 446 79 \; pd dsp 1; +#X msg 538 79 \; pd dsp 0; +#X text 467 112 ON; +#X text 555 112 OFF; +#X obj 56 269 *~; +#X obj 72 243 line~; +#X text 129 243 <--- ramp generator; +#X text 132 78 <-- sine wave; +#X msg 72 103 0.1 2000; +#X msg 72 177 0 2000; +#X msg 72 125 0.1 50; +#X msg 72 199 0 50; +#X msg 72 147 0.1; +#X msg 72 221 0; +#X text 274 124 ON; +#X text 154 105 <-- slow; +#X text 144 126 <-- fast; +#X text 111 146 <-- instantly; +#X text 271 197 OFF; +#X text 136 178 <-- slow; +#X text 129 199 <-- fast; +#X text 109 219 <-- instantly; +#X text 112 161 ----------------------; +#X text 97 308 <-- out; +#X text 103 7 CONTROLLING AMPLITUDE USING LINE~; +#X text 38 342 Line~'s left inlet is a target value \; it reaches that +target in the time specified (in milliseconds) to its right inlet. +; +#X text 34 495 The line~ object (and its control brother \, line) treat +their right inlet specially. The inlets don't retain values the way +other inlets do but revert to zero whenever a target is received.; +#X text 14 27 In this patch \, the multiplier is configured to multiply +two signals. The amplitude is now a signal computed by the line~ object. +; +#X text 37 395 (In this example \, message boxes with two numbers each +are connected to line~'s left inlet. Except in some special cases \, +Pd objects with more than one inlet will automatically distribute lists +of numbers across their inlets. In this case \, "0 50" becomes \, "50 +at right and 0 at left."); +#X text 386 557 updated for Pd version 0.36; +#X text 93 268 <-- multiply the sine wave by the ramp. There's no longer +a "0" argument-- this tells Pd to expect a signal here.; +#X connect 0 0 6 0; +#X connect 6 0 1 0; +#X connect 6 0 1 1; +#X connect 7 0 6 1; +#X connect 10 0 7 0; +#X connect 11 0 7 0; +#X connect 12 0 7 0; +#X connect 13 0 7 0; +#X connect 14 0 7 0; +#X connect 15 0 7 0; diff --git a/pd/doc/3.audio.examples/A04.line2.pd b/pd/doc/3.audio.examples/A04.line2.pd new file mode 100644 index 00000000..c6dd1679 --- /dev/null +++ b/pd/doc/3.audio.examples/A04.line2.pd @@ -0,0 +1,59 @@ +#N canvas 30 68 949 754 12; +#X obj 67 77 osc~ 440; +#X obj 67 329 dac~; +#X obj 67 242 *~; +#X obj 86 180 line~; +#X text 116 330 <-- out; +#X text 124 9 LINES GRAPHED; +#X text 24 33 Here again is a line~ controlling the amplitude of an +osc~ \, but with the outputs graphed:; +#X obj 149 89 r graphit; +#X obj 151 179 r graphit; +#X obj 151 246 r graphit; +#X obj 86 149 r to-line; +#X graph graph1 0 -1.02 44100 1.02 631 480 831 350; +#X array product 44100 float 0; +#X pop; +#X graph graph1 0 -1.02 44100 1.02 631 150 831 20; +#X array osc-output 44100 float 0; +#X pop; +#X graph graph1 0 -1.02 44100 1.02 631 315 831 185; +#X array line-output 44100 float 0; +#X pop; +#X obj 149 119 tabwrite~ osc-output; +#X obj 67 299 *~ 0.1; +#X msg 38 401 \; pd dsp 1 \; to-line 0 \, 1 500 \; graphit bang; +#X msg 210 401 \; pd dsp 1 \; to-line 1 \, 0 500 \; graphit bang; +#X obj 151 209 tabwrite~ line-output; +#X obj 151 276 tabwrite~ product; +#X text 70 379 ramp up; +#X text 235 378 ramp down; +#X text 406 376 to 1/2; +#X msg 375 400 \; pd dsp 1 \; to-line 0.5 1000 \; graphit bang; +#X text 634 491 ------ 1 second ------; +#X text 38 485 Click the message boxes above to try it. Note that in +the first two boxes \, the line~ objects get two messages. The first +one \, with no time value \, causes the line~ to jump immediately to +the value. The third box takes line~'s previous value as a point of +departure. What you see will depend on which box you last clicked and +how long you waited between the two.; +#X text 662 727 updated for Pd version 0.33; +#X text 41 600 On most machines \, you will hear an interruption in +the sound one second after you click on the first or third box. This +is because the graphical updates are likely to eat more CPU time than +your audio buffer has pre-buffered for. You can avoid this if you keep +your graphs in sub-windows and open them only when you need them. In +some future version of Pd this behavior will be improved. Until then +\, you'll have to avoid having arrays getting re-drawn during music +performances.; +#X connect 0 0 2 0; +#X connect 0 0 14 0; +#X connect 2 0 15 0; +#X connect 2 0 19 0; +#X connect 3 0 2 1; +#X connect 3 0 18 0; +#X connect 7 0 14 0; +#X connect 8 0 18 0; +#X connect 9 0 19 0; +#X connect 10 0 3 0; +#X connect 15 0 1 0; diff --git a/pd/doc/3.audio.examples/A05.output.subpatch.pd b/pd/doc/3.audio.examples/A05.output.subpatch.pd new file mode 100644 index 00000000..d24fdba2 --- /dev/null +++ b/pd/doc/3.audio.examples/A05.output.subpatch.pd @@ -0,0 +1,30 @@ +#N canvas 300 159 635 486 12; +#X text 261 20 CONTROLLING OUTPUT AMPLITUDE; +#X obj 32 27 osc~ 440; +#X obj 54 55 osc~ 550; +#X obj 54 116 osc~ 660; +#X obj 32 88 +~; +#X obj 32 142 +~; +#X text 108 177 <-- this is a subwindow--right click on it; +#X text 149 197 and select "open" to see inside.; +#X text 30 401 The output control automatically starts DSP whenever +you touch the level control. Hitting "mute" toggles between the current +level and zero.; +#X obj 32 173 output~; +#X text 383 463 updated for Pd version 0.36; +#X text 143 115 <-- Here we make an A major triad as a test signal. +; +#X text 31 250 In this and subsequent patches \, we'll use a subwindow +\, "output" \, to control overall amplitude. The amplitudes are in +decibels \, with 100 being full blast. In this example \, you can't +actually push the output amplitude past 90 or so without clipping. +You'll know you're clipping if \, instead of an A major chord \, you +hear a single \, distorted tone two octaves down. The clipping happens +at Pd's last stage of audio output. Audio signals internal to Pd have +essentially no level limit.; +#X connect 1 0 4 0; +#X connect 2 0 4 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 9 0; +#X connect 5 0 9 1; diff --git a/pd/doc/3.audio.examples/A06.frequency.pd b/pd/doc/3.audio.examples/A06.frequency.pd new file mode 100644 index 00000000..50cff7c0 --- /dev/null +++ b/pd/doc/3.audio.examples/A06.frequency.pd @@ -0,0 +1,60 @@ +#N canvas 8 17 693 642 12; +#N canvas 0 0 450 300 graph1 0; +#X array osc-output 4410 float 0; +#X coords 0 1.02 4410 -1.02 200 130 1; +#X restore 473 167 graph; +#X obj 98 261 tabwrite~ osc-output; +#X msg 98 232 bang; +#X floatatom 280 66 0 0 0 0 - - -; +#X text 147 231 <-- click to graph; +#X obj 15 206 r frequency; +#X msg 280 37 set \$1; +#X floatatom 6 66 0 0 0 0 - - -; +#X obj 6 8 r frequency; +#X msg 6 37 set \$1; +#X obj 19 90 s frequency; +#X obj 280 8 r pitch; +#X obj 289 90 s pitch; +#X obj 280 116 mtof; +#X obj 280 145 s frequency; +#X obj 6 145 s pitch; +#X obj 6 116 ftom; +#X text 105 66 <-- set frequency; +#X text 372 65 <-- set MIDI pitch; +#X text 15 429 Frequency and pitch are converted using the "ftom" and +"mtof" objects. Frequency refers to the number of cycles per second. +Pitch is "60" for Middle C \, 61 for C sharp \, 72 for the next C up +\, and so on.; +#X text 476 308 ---- 0.1 seconds ----; +#X text 447 6 FREQUENCY AND PITCH; +#X text 16 363 The osc~ object \, if you give it an argument \, expects +floating-point messages to set its frequency. Without arguments \, +its frequency is controlled by connecting an audio signal to its input. +; +#X text 14 496 Mtof and ftom work fine for microtones (non-integral +"MIDI pitch" ) and don't have MIDI's range restriction-- for example +\, MIDI -36 is about 1 Hz.; +#X text 15 553 Note also the "set" messages going to the number boxes +so that they can each update the other without bringing on an infinite +loop. (get help on number boxes for details.); +#X text 87 291 <-- output level; +#X text 51 116 <-- convert frequency; +#X text 106 134 to "MIDI" pitch; +#X text 327 117 <-- convert "MIDI" pitch to frequency; +#X obj 15 273 output~; +#X text 437 619 updated for Pd version 0.36; +#X obj 15 232 osc~; +#X connect 2 0 1 0; +#X connect 3 0 12 0; +#X connect 3 0 13 0; +#X connect 5 0 31 0; +#X connect 6 0 3 0; +#X connect 7 0 10 0; +#X connect 7 0 16 0; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 11 0 6 0; +#X connect 13 0 14 0; +#X connect 16 0 15 0; +#X connect 31 0 1 0; +#X connect 31 0 29 0; diff --git a/pd/doc/3.audio.examples/A07.frequency.mod.pd b/pd/doc/3.audio.examples/A07.frequency.mod.pd new file mode 100644 index 00000000..a7bab032 --- /dev/null +++ b/pd/doc/3.audio.examples/A07.frequency.mod.pd @@ -0,0 +1,105 @@ +#N canvas 52 144 760 640 12; +#X obj 256 180 *~; +#X floatatom 256 95 0 0 0; +#X floatatom 166 130 0 0 0; +#X obj 166 200 +~; +#X graph graph1 0 -1.02 440 1.02 527 170 727 40; +#X array fm-output 441 float 0; +#X pop; +#X floatatom 204 300 0 0 100; +#N canvas 159 26 516 274 output 1; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 396 182 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 391 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 391 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 20 182 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 104 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 90 outlet; +#X msg 214 65 \; pd dsp 1; +#X obj 83 198 line~; +#X obj 20 207 *~; +#X obj 20 232 dac~; +#X obj 83 173 pack 0 50; +#X text 20 159 audio; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 21 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X restore 166 328 pd output; +#X msg 242 301 MUTE; +#X text 283 301 <-- output amplitude; +#X msg 242 248 bang; +#X text 284 248 <-- click to graph; +#X obj 242 272 tabwrite~ fm-output; +#X floatatom 278 150 0 0 0; +#X text 163 87 carrier; +#X text 162 105 frequency; +#X text 241 71 frequency; +#X text 242 54 modulation; +#X text 33 8 FREQUENCY MODULATION ("FM") USING TWO OSCILLATORS; +#X obj 166 252 osc~; +#X text 50 234 "carrier"; +#X text 32 252 oscillator -->; +#X text 40 161 add modulator; +#X text 39 179 to carrier; +#X text 37 198 frequency -->; +#X text 317 162 index; +#X text 319 143 modulation; +#X text 477 601 updated for Pd version 0.34; +#X obj 256 120 osc~; +#X text 52 363 This shows the classical FM synthesis technique developed +by John Chowning. It's nothing but an oscillator with vibrato controlled +by another "modulation" oscillator. First \, to understand the patch +\, set carrier frequency to 400 or so \, modulation frequency between +5 and 10 \, and try modulation index values between 0 and 400 \, say. +You'll hear a sine wave with vibrato.; +#X text 531 172 --- 0.01 seconds ----; +#X text 51 478 To get the FM sound \, set all three of carrier frequency +\, modulation frequency \, and modulation index in the hundreds. Note +that you get a timbral change as you sweep modulation index \, because +this changes the amplitudes of the components of the output sound but +not their frequencies.; +#X text 48 564 The component frequencies are equal to the carrier frequency +\, plus or minus multiples of the modulator frequency.; +#X connect 0 0 3 1; +#X connect 1 0 27 0; +#X connect 2 0 3 0; +#X connect 3 0 18 0; +#X connect 5 0 6 1; +#X connect 6 0 5 0; +#X connect 7 0 6 2; +#X connect 9 0 11 0; +#X connect 12 0 0 1; +#X connect 18 0 11 0; +#X connect 18 0 6 0; +#X connect 27 0 0 0; diff --git a/pd/doc/3.audio.examples/A08.phase.mod.pd b/pd/doc/3.audio.examples/A08.phase.mod.pd new file mode 100644 index 00000000..716ba6ab --- /dev/null +++ b/pd/doc/3.audio.examples/A08.phase.mod.pd @@ -0,0 +1,246 @@ +#N canvas 36 68 722 738 12; +#X obj 216 145 *~; +#X floatatom 216 88 0 0 0; +#X obj 297 125 line~; +#X floatatom 128 108 0 0 0; +#X obj 128 222 cos~; +#X obj 128 178 +~; +#X floatatom 166 299 0 0 100; +#N canvas 159 26 495 270 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 182 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 159 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 128 326 pd output; +#X msg 204 299 MUTE; +#X obj 216 113 osc~ 0; +#X obj 297 99 pack 0 50; +#X floatatom 297 46 0 0 0; +#X obj 297 73 / 100; +#X text 271 8 modulation index; +#X text 271 23 in hundredths; +#X text 125 65 carrier; +#X text 124 83 frequency; +#X text 201 64 frequency; +#X text 202 47 modulation; +#X text 33 119 carrier; +#X text 33 134 phase -->; +#X text 6 162 phase; +#X text 5 177 modulation-->; +#X text 12 204 output; +#X text 11 221 waveform -->; +#X text 527 6 PHASE MODULATION; +#X text 417 703 updated for Pd version 0.34; +#X text 13 377 Most implementations of "FM" actually use phase \, not +frequency \, modulation \, because it extends in a more natural way +to "multi-operator FM" with three or more oscillators.; +#X text 15 437 To do phase modulation \, we split the "carrier oscillator" +into its phase calculation (phasor~) and its waveform lookup (cos~). +These together would be equivalent to an osc~ object \, but the "+~" +between them adds the modulating oscillator's output to the phase. +; +#X text 18 587 The units of the "modulation" index change--it is now +dimensionless and relative to the modulation frequency \, and "good" +values tend to be between 0 and 1 In this patch it's in hundredths. +; +#X text 19 658 We also have to use a line~ to smooth changes in the +modulation index \, which wasn't necessary in the previous patch.; +#X obj 128 135 phasor~; +#X obj 117 557 cos~; +#X obj 117 529 phasor~; +#X text 60 539 this:; +#X text 219 532 is the same; +#X text 220 551 as this:; +#X obj 335 544 osc~; +#X graph graph2 0 -1 440 1 509 330 709 190; +#X array phase-out 441 float 1; +#A 0 0.43245 0.433463 0.434452 0.435418 0.43636 0.43728 0.438178 0.439056 +0.439912 0.440749 0.441567 0.442366 0.443148 0.443912 0.444659 0.445391 +0.446107 0.446809 0.447497 0.448172 0.448834 0.449484 0.450122 0.450751 +0.451369 0.451978 0.452579 0.453172 0.453758 0.454338 0.454911 0.45548 +0.456045 0.456606 0.457164 0.457719 0.458274 0.458827 0.45938 0.459934 +0.460489 0.461046 0.461605 0.462168 0.462735 0.463306 0.463883 0.464466 +0.465056 0.465654 0.466259 0.466873 0.467497 0.468131 0.468776 0.469433 +0.470102 0.470783 0.471479 0.472188 0.472913 0.473653 0.474409 0.475182 +0.475973 0.476782 0.477611 0.478459 0.479327 0.480216 0.481127 0.48206 +0.483015 0.483994 0.484997 0.486024 0.487077 0.488156 0.48926 0.490392 +0.491552 0.49274 0.493957 0.495203 0.496479 0.497785 0.499123 0.500493 +0.501896 0.503332 0.504801 0.506304 0.507842 0.509415 0.511023 0.512667 +0.514348 0.516066 0.517821 0.519615 0.521447 0.523318 0.525228 0.527179 +0.52917 0.531202 0.533275 0.53539 0.537547 0.539747 0.541992 0.54428 +0.546613 0.548989 0.551411 0.553877 0.556389 0.558947 0.561551 0.564202 +0.5669 0.569645 0.572437 0.575278 0.578166 0.581104 0.58409 0.587125 +0.59021 0.593345 0.596529 0.599764 0.603051 0.606389 0.609778 0.613219 +0.61671 0.620254 0.62385 0.627497 0.631197 0.634949 0.638754 0.642612 +0.646522 0.650486 0.654503 0.658573 0.662696 0.666873 0.671104 -0.324611 +-0.320273 -0.315881 -0.311434 -0.306931 -0.302375 -0.297764 -0.2931 +-0.288381 -0.283608 -0.278781 -0.2739 -0.268964 -0.263975 -0.258931 +-0.253833 -0.248682 -0.243476 -0.238217 -0.232904 -0.227537 -0.222116 +-0.216642 -0.211115 -0.205534 -0.1999 -0.194211 -0.18847 -0.182675 +-0.176829 -0.170929 -0.164978 -0.158975 -0.152919 -0.146813 -0.140655 +-0.134446 -0.128186 -0.121875 -0.115514 -0.109103 -0.102642 -0.0961313 +-0.0895714 -0.0829625 -0.0763049 -0.0695988 -0.0628447 -0.056041 -0.0491896 +-0.0422913 -0.0353461 -0.0283546 -0.0213171 -0.0142339 -0.00710538 +6.80089e-05 0.00728586 0.0145478 0.0218535 0.0292025 0.0365944 0.0440286 +0.0515049 0.0590228 0.0665818 0.0741815 0.0818213 0.0895009 0.0972198 +0.104978 0.112776 0.120611 0.128484 0.136393 0.144339 0.15232 0.160337 +0.168388 0.176473 0.184592 0.192744 0.200929 0.209146 0.217393 0.225672 +0.233981 0.24232 0.250688 0.259084 0.267509 0.27596 0.284439 0.292944 +0.301475 0.310031 0.318611 0.327215 0.335842 0.344491 0.353162 0.361854 +0.370566 0.379298 0.38805 0.39682 0.405608 0.414413 0.423234 0.432072 +0.440924 0.449792 0.458673 0.467567 0.476474 0.485394 0.494324 0.503265 +0.512216 0.521176 0.530145 0.539121 0.548104 0.557094 0.566089 0.575089 +0.584094 0.593102 0.602113 0.611126 0.620141 0.629157 0.638173 0.647189 +0.656203 0.665215 0.674225 0.683232 0.692234 0.701231 0.710224 0.71921 +0.728189 0.737161 0.746124 0.755079 0.764024 0.772959 0.781884 0.790796 +0.799697 0.808584 0.817458 0.826318 0.835162 0.843992 0.852804 0.861601 +0.870379 0.879139 0.887879 0.8966 0.905301 0.913981 0.92264 0.931276 +0.93989 0.94848 0.957046 0.965588 0.974105 0.982595 0.99106 0.999497 +1.00791 1.01629 1.02464 1.03296 1.04126 1.04952 1.05775 1.06595 1.07412 +1.08225 1.09035 1.09841 1.10645 1.11444 1.1224 1.13033 1.13822 1.14607 +1.15388 1.16166 1.1694 1.17709 1.18475 1.19237 1.19995 1.20749 1.21498 +1.22244 1.22985 1.23722 1.24454 1.25182 1.25906 1.26625 1.2734 0.280502 +0.287559 0.29457 0.301536 0.308454 0.315325 0.32215 0.328926 0.335655 +0.342335 0.348967 0.35555 0.362084 0.368568 0.375003 0.381388 0.387722 +0.394004 0.400235 0.406415 0.412544 0.418621 0.424647 0.430621 0.436542 +0.442412 0.448228 0.453993 0.459704 0.465363 0.470969 0.476521 0.48202 +0.487466 0.492858 0.498196 0.503481 0.508712 0.513889 0.519011 0.524077 +0.52909 0.534049 0.538953 0.543804 0.5486 0.553342 0.55803 0.562664 +0.567243 0.571769 0.57624 0.580658 0.585021 0.589331 0.593587 0.597789 +0.601938 0.606033 0.610075 0.614064 0.617999 0.621879 0.625706 0.629481 +0.633203 0.636873 0.640491 0.644057 0.647571 0.651033 0.654445 0.657805 +0.661114 0.664372 0.66758 0.670739 0.673847 0.676905 0.679914 0.682875 +; +#X array cos-out 441 float 1; +#A 0 -0.911256 -0.913872 -0.916365 -0.918789 -0.921097 -0.923342 -0.925486 +-0.927564 -0.92956 -0.931483 -0.93335 -0.935129 -0.936867 -0.938528 +-0.940137 -0.941707 -0.943197 -0.944657 -0.946072 -0.947426 -0.948755 +-0.95004 -0.951276 -0.952491 -0.953672 -0.954806 -0.955924 -0.957024 +-0.958071 -0.959106 -0.960132 -0.961119 -0.962086 -0.963047 -0.963993 +-0.964903 -0.965811 -0.966718 -0.967595 -0.968461 -0.969329 -0.970192 +-0.971025 -0.971863 -0.972707 -0.973527 -0.974343 -0.975168 -0.975986 +-0.976786 -0.977597 -0.978414 -0.979202 -0.980003 -0.980816 -0.981596 +-0.982391 -0.983194 -0.983968 -0.984757 -0.985543 -0.98631 -0.987093 +-0.987851 -0.98861 -0.98937 -0.990102 -0.990852 -0.991557 -0.992275 +-0.99296 -0.993642 -0.994295 -0.994935 -0.995544 -0.996137 -0.996687 +-0.997227 -0.997705 -0.998173 -0.998575 -0.998944 -0.999273 -0.999527 +-0.999743 -0.999894 -0.999966 -0.999981 -0.999927 -0.999765 -0.999526 +-0.999202 -0.998785 -0.99824 -0.997586 -0.996816 -0.995923 -0.994897 +-0.99373 -0.992413 -0.990934 -0.989283 -0.987458 -0.985449 -0.983247 +-0.980843 -0.978222 -0.975372 -0.972288 -0.968961 -0.965377 -0.96153 +-0.95741 -0.952995 -0.948265 -0.943231 -0.937881 -0.932182 -0.926128 +-0.919728 -0.912938 -0.905762 -0.898197 -0.890198 -0.881799 -0.87293 +-0.863637 -0.853855 -0.843612 -0.832873 -0.821629 -0.809886 -0.797593 +-0.784764 -0.771394 -0.757466 -0.742953 -0.727864 -0.712189 -0.695918 +-0.679041 -0.661549 -0.643437 -0.624697 -0.605324 -0.585314 -0.564664 +-0.543374 -0.521441 -0.498869 -0.475658 -0.451811 -0.427334 -0.402219 +-0.376482 -0.350131 -0.323174 -0.295626 -0.267508 -0.238824 -0.2096 +-0.179853 -0.149603 -0.118875 -0.0876953 -0.0560885 -0.0240874 0.00827867 +0.040974 0.0739643 0.107208 0.140666 0.174297 0.208056 0.241893 0.275757 +0.309603 0.343385 0.377036 0.410498 0.443712 0.476616 0.509148 0.541242 +0.572835 0.603858 0.634244 0.66391 0.692797 0.720837 0.747961 0.774084 +0.799131 0.823051 0.845758 0.867169 0.887248 0.90588 0.923037 0.938628 +0.952605 0.964885 0.975433 0.984153 0.991037 0.995988 0.998986 0.999997 +0.998938 0.995807 0.990576 0.983211 0.973668 0.961961 0.948075 0.932007 +0.913757 0.893328 0.87073 0.845995 0.81915 0.790227 0.759268 0.726324 +0.691452 0.654714 0.616181 0.57593 0.534037 0.490599 0.445716 0.399491 +0.352033 0.303459 0.253886 0.203441 0.152259 0.100478 0.0482368 -0.00432081 +-0.057045 -0.109786 -0.162386 -0.214696 -0.266564 -0.317814 -0.368301 +-0.417864 -0.466337 -0.513584 -0.559424 -0.603732 -0.646344 -0.687125 +-0.725934 -0.762631 -0.797101 -0.829205 -0.858847 -0.8859 -0.91028 +-0.931885 -0.950636 -0.966466 -0.97929 -0.989092 -0.995773 -0.999358 +-0.999773 -0.997042 -0.991152 -0.982099 -0.969941 -0.954655 -0.936332 +-0.915008 -0.890737 -0.863625 -0.833713 -0.801132 -0.765979 -0.728348 +-0.688394 -0.646219 -0.601975 -0.555817 -0.507869 -0.45832 -0.407319 +-0.355036 -0.301652 -0.247328 -0.192258 -0.136617 -0.0805873 -0.0243537 +0.0319027 0.0879985 0.143752 0.198986 0.253526 0.307194 0.359834 0.411262 +0.461345 0.509907 0.556823 0.601935 0.645131 0.686266 0.725245 0.761935 +0.796272 0.828125 0.857461 0.884158 0.9082 0.929508 0.948044 0.9638 +0.976698 0.986778 0.99402 0.998404 0.999981 0.998763 0.994751 0.988022 +0.978621 0.966582 0.95197 0.93487 0.915357 0.893512 0.869405 0.843139 +0.814817 0.784538 0.752408 0.718535 0.68303 0.646007 0.607581 0.567872 +0.526996 0.485074 0.442227 0.398573 0.354231 0.30932 0.263957 0.218256 +0.172326 0.126282 0.0802317 0.0342922 -0.0114471 -0.0568861 -0.101931 +-0.146492 -0.190474 -0.233802 -0.276394 -0.318171 -0.359072 -0.399015 +-0.437958 -0.475821 -0.512573 -0.548149 -0.582512 -0.615632 -0.647446 +-0.677951 -0.707119 -0.734897 -0.761296 -0.786293 -0.80988 -0.83204 +-0.852773 -0.872085 -0.88998 -0.906462 -0.921542 -0.935229 -0.94754 +-0.95849 -0.968102 -0.976397 -0.9834 -0.989136 -0.993613 -0.996882 +-0.998976 -0.99993 -0.999748 -0.998484 -0.996188 -0.99286 -0.988563 +-0.983336 -0.977186 -0.970195 -0.962347 -0.953732 -0.944344 -0.934249 +-0.923482 -0.912051 -0.900028 -0.887441 -0.874296 -0.860659 -0.846562 +-0.832035 -0.817101 -0.801792 -0.786149 -0.770201 -0.753977 -0.737507 +-0.720826 -0.703952 -0.686912 -0.669731 -0.652436 -0.635043 -0.617572 +-0.600055 -0.582513 -0.564966 -0.547418 -0.529898 -0.512429 -0.495016 +-0.477676 -0.460438 -0.443287 -0.426265 -0.409364; +#X pop; +#X obj 251 241 tabwrite~ phase-out; +#X obj 251 268 tabwrite~ cos-out; +#X msg 251 216 bang; +#X text 298 215 <-- graph them; +#X text 386 99 <-- change smoothly to avoid clicks; +#X connect 0 0 5 1; +#X connect 1 0 9 0; +#X connect 2 0 0 1; +#X connect 3 0 31 0; +#X connect 4 0 7 0; +#X connect 4 0 40 0; +#X connect 5 0 4 0; +#X connect 5 0 39 0; +#X connect 6 0 7 1; +#X connect 7 0 6 0; +#X connect 8 0 7 2; +#X connect 9 0 0 0; +#X connect 10 0 2 0; +#X connect 11 0 12 0; +#X connect 12 0 10 0; +#X connect 31 0 5 0; +#X connect 33 0 32 0; +#X connect 41 0 39 0; +#X connect 41 0 40 0; diff --git a/pd/doc/3.audio.examples/A09.review.pd b/pd/doc/3.audio.examples/A09.review.pd new file mode 100644 index 00000000..9b190a19 --- /dev/null +++ b/pd/doc/3.audio.examples/A09.review.pd @@ -0,0 +1,41 @@ +#N canvas 36 68 701 588 12; +#X text 444 542 updated for Pd version 0.34; +#X text 39 14 PART 1 REVIEW; +#X obj 66 131 tabwrite~; +#X obj 66 105 line~; +#X obj 54 298 +; +#X obj 66 79 +~; +#X obj 66 209 cos~; +#X obj 66 157 osc~; +#X obj 66 183 phasor~; +#X obj 54 324 pack; +#X obj 52 511 r; +#X obj 53 487 s; +#X obj 54 408 inlet; +#X obj 53 462 f; +#X obj 53 436 t; +#X obj 54 378 dbtorms; +#X obj 97 351 mtof; +#X obj 54 350 ftom; +#X obj 105 408 outlet; +#X obj 66 235 dac~; +#X text 26 52 So far we've seen these audio ("tilde") objects:; +#X text 123 104 -- ramp generator; +#X text 157 131 -- sampler (which we've only used for graphing so far) +; +#X text 111 157 -- a cosine wave oscillator; +#X text 139 183 -- phase generator for making your own oscillator; +#X text 112 209 -- cosine waveshape lookup; +#X text 112 236 -- audio output ("digital/analog converter" -- a misnomer) +; +#X text 31 266 ... and these "control" objects:; +#X text 145 349 -- frequency to pitch conversion; +#X text 126 378 -- decibel to amplitude conversion; +#X text 167 409 -- input and output to a subpatch; +#X text 90 437 ("trigger") -- message ordering and conversion; +#X text 93 462 ("float") -- store a (floating point) number; +#X text 90 488 ("send") -- wireless message sending; +#X text 91 513 ("receive") ... and receiving; +#X text 106 78 (etc.) -- arithmetic on audio signals; +#X text 92 296 (etc.) -- arithmetic; +#X text 99 323 -- combine two or more values in a single message; diff --git a/pd/doc/3.audio.examples/B01.wavetables.pd b/pd/doc/3.audio.examples/B01.wavetables.pd new file mode 100644 index 00000000..66549d3e --- /dev/null +++ b/pd/doc/3.audio.examples/B01.wavetables.pd @@ -0,0 +1,50 @@ +#N canvas 19 22 722 608 12; +#X floatatom 164 43 0 0 0 0 - - -; +#N canvas 0 0 450 300 graph1 0; +#X array table10 259 float 1; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.612 0.612 0.612 0.612 0.612 0.627692 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 -0.470769 -0.470769 -0.470769 -0.470769 -0.470769 +-0.470769 -0.470769 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0.627692 0.627692 0.627692 0.643385 0.643385 0.643385 +0.659077 0 -0.502154 -0.502154 -0.502154 -0.486462 -0.486462 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0.580615 0.596308 0.596308 0.596308 0.596308 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; +#X coords 0 1.02 258 -1.02 258 130 1; +#X restore 445 47 graph; +#X text 30 123 oscillator -->; +#X text 456 587 updated for Pd version 0.34; +#X text 33 8 WAVETABLE OSCILLATORS; +#X text 36 106 wavetable; +#X obj 164 70 mtof; +#X floatatom 164 97 0 0 0 0 - - -; +#X obj 164 123 tabosc4~ table10; +#X text 94 42 pitch->; +#X text 35 309 Note that I selected "save contents" in the properties +dialog for table10 (right click on the table to see.) If this isn't +set \, the waveform won't be remembered as part of the patch but will +be reinitialized to zero when the patch is reopened.; +#X msg 35 549 \; table10 cosinesum 256 0.2 -0.2 0.2 -0.2 0.2 -0.2 0.2 +; +#X msg 578 240 \; table10 const 0; +#X text 597 217 CLEAR TABLE; +#X text 35 395 For efficiency's sake tabosc4~ requires that the table +have a power of two plus three points (64+3=67 \, 128+3=131 \, 256+3=259 +\, etc.) If you want wraparound to work smoothly \, you should make +the last three points copies of the first three. This is done because +tabread4~ does 4-point interpolation.; +#X text 38 494 If you want a specific sinusoidal composition \, you +can send table10 a message \, as below (see 11.arrays in the control +examples):; +#X text 36 240 Here \, in place of the "osc~" cosine wave oscillator +\, we introduce the tabosc4~ oscillator which produces an arbitrary +waveform. You can draw in the waveform with the mouse.; +#X obj 164 151 output~; +#X connect 0 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 17 0; +#X connect 8 0 17 1; diff --git a/pd/doc/3.audio.examples/B02.two-wavetables.pd b/pd/doc/3.audio.examples/B02.two-wavetables.pd new file mode 100644 index 00000000..c4cc6d60 --- /dev/null +++ b/pd/doc/3.audio.examples/B02.two-wavetables.pd @@ -0,0 +1,147 @@ +#N canvas 74 98 749 466 12; +#X graph graph1 0 -1.02 258 1.02 475 298 733 168; +#X array waveform11 259 float 1; +#A 0 -0.0896033 0 0.0896033 0.178356 0.265425 0.350007 0.431348 0.508756 +0.58161 0.649372 0.711597 0.767935 0.818137 0.862053 0.89963 0.930912 +0.956028 0.975187 0.988669 0.996811 1 0.998655 0.993223 0.984158 0.971919 +0.956953 0.939691 0.920538 0.899867 0.878018 0.85529 0.831945 0.808204 +0.784252 0.760239 0.736284 0.712477 0.688888 0.665568 0.642553 0.619872 +0.59755 0.575607 0.554066 0.532953 0.512296 0.49213 0.472491 0.453419 +0.434957 0.417147 0.400027 0.383632 0.367992 0.353126 0.339046 0.32575 +0.313227 0.301453 0.290394 0.280002 0.270224 0.260995 0.252248 0.24391 +0.235908 0.22817 0.220628 0.213219 0.205888 0.198586 0.191278 0.183936 +0.176545 0.169098 0.1616 0.154063 0.146505 0.138954 0.131437 0.123987 +0.116636 0.109415 0.102354 0.0954784 0.0888083 0.08236 0.0761442 0.0701659 +0.0644253 0.0589178 0.0536354 0.0485669 0.0436994 0.0390194 0.0345135 +0.0301695 0.0259776 0.0219306 0.0180245 0.0142591 0.0106377 0.00716724 +0.00385775 0.000722025 -0.00222511 -0.0049675 -0.00748845 -0.00977153 +-0.0118014 -0.0135644 -0.0150493 -0.0162479 -0.0171551 -0.0177693 -0.0180928 +-0.0181312 -0.0178936 -0.017392 -0.0166417 -0.0156601 -0.0144666 -0.0130822 +-0.0115294 -0.00983114 -0.0080113 -0.00609396 -0.0041034 -0.00206402 +-2.23572e-07 0.00206358 0.00410297 0.00609353 0.00801089 0.00983075 +0.011529 0.0130819 0.0144663 0.0156599 0.0166416 0.0173919 0.0178935 +0.0181312 0.0180929 0.0177695 0.0171552 0.0162481 0.0150496 0.0135647 +0.0118018 0.009772 0.00748897 0.00496807 0.00222573 -0.000721367 -0.00385706 +-0.00716651 -0.010637 -0.0142583 -0.0180237 -0.0219297 -0.0259767 -0.0301686 +-0.0345125 -0.0390184 -0.0436984 -0.0485658 -0.0536343 -0.0589167 -0.0644241 +-0.0701647 -0.0761429 -0.0823587 -0.0888069 -0.0954769 -0.102353 -0.109414 +-0.116634 -0.123985 -0.131435 -0.138952 -0.146504 -0.154061 -0.161598 +-0.169097 -0.176543 -0.183935 -0.191276 -0.198584 -0.205886 -0.213218 +-0.220627 -0.228169 -0.235906 -0.243908 -0.252246 -0.260993 -0.270222 +-0.28 -0.290392 -0.301451 -0.313224 -0.325747 -0.339043 -0.353123 -0.367989 +-0.383629 -0.400023 -0.417143 -0.434954 -0.453415 -0.472486 -0.492125 +-0.512292 -0.532948 -0.554062 -0.575602 -0.597545 -0.619868 -0.642548 +-0.665563 -0.688883 -0.712472 -0.736279 -0.760234 -0.784247 -0.808199 +-0.83194 -0.855285 -0.878013 -0.899863 -0.920533 -0.939687 -0.956949 +-0.971916 -0.984156 -0.993221 -0.998655 -1 -0.996813 -0.988671 -0.975191 +-0.956033 -0.930918 -0.899638 -0.862061 -0.818147 -0.767947 -0.71161 +-0.649386 -0.581625 -0.508772 -0.431366 -0.350025 -0.265443 -0.178375 +-0.0896226 -1.94061e-05 0.089584; +#X pop; +#X floatatom 202 171 0 0 100; +#N canvas 159 26 532 285 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 426 180 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 20 155 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 105 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 90 outlet; +#X msg 214 65 \; pd dsp 1; +#X obj 83 198 line~; +#X obj 20 207 *~; +#X obj 20 232 dac~; +#X obj 83 173 pack 0 50; +#X text 20 132 audio; +#X text 96 114 show level; +#X obj 426 155 t b; +#X obj 20 181 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 26 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 27 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 5 0; +#X connect 27 0 21 0; +#X restore 164 199 pd output; +#X msg 240 172 MUTE; +#X text 30 123 oscillator -->; +#X text 485 445 updated for Pd version 0.34; +#X text 33 8 WAVETABLE OSCILLATORS; +#X text 36 106 wavetable; +#X text 88 54 pitch->; +#X graph graph2 0 0 258 1000 475 155 734 15; +#X array pitch11 259 float 1; +#A 0 757.143 757.143 735.714 700 671.429 650 621.429 600 571.429 550 +521.429 507.143 485.714 464.286 442.857 428.571 414.286 400 378.571 +364.286 342.857 328.571 928.571 921.429 921.429 914.286 907.143 892.857 +885.714 878.571 864.286 850 828.571 807.143 792.857 785.714 775 764.286 +753.571 742.857 735.714 728.571 721.429 714.286 703.571 692.857 682.143 +671.429 650 628.571 617.857 607.143 596.429 585.714 575 564.286 553.571 +542.857 532.143 521.429 510.714 500 485.714 478.571 464.286 450 435.714 +428.571 400 392.857 385.714 378.571 357.143 350 342.857 335.714 328.571 +314.286 292.857 285.714 271.429 264.286 571.429 571.429 571.429 571.429 +571.429 564.286 564.286 278.571 271.429 271.429 278.571 278.571 278.571 +278.571 571.429 571.429 571.429 575 578.571 578.571 278.571 278.571 +285.714 285.714 278.571 278.571 278.571 878.571 878.571 878.571 878.571 +878.571 321.429 325 328.571 328.571 328.571 328.571 885.714 885.714 +885.714 885.714 207.143 207.143 207.143 200 207.143 207.143 207.143 +214.286 214.286 221.429 228.571 228.571 242.857 250 257.143 264.286 +278.571 292.857 307.143 321.429 335.714 350 371.429 392.857 421.429 +435.714 471.429 500 542.857 571.429 628.571 664.286 700 728.571 757.143 +792.857 828.571 885.714 928.571 978.571 1000 1007.14 1007.14 1000 1000 +992.857 985.714 885.714 914.286 671.429 671.429 671.429 671.429 671.429 +671.429 671.429 671.429 671.429 671.429 678.571 635.714 635.714 678.571 +714.286 714.286 678.571 635.714 635.714 635.714 742.857 742.857 685.714 +685.714 635.714 621.429 685.714 792.857 792.857 678.571 521.429 521.429 +521.429 864.286 857.143 857.143 471.429 471.429 471.429 471.429 921.429 +921.429 385.714 385.714 385.714 964.286 964.286 964.286 328.571 328.571 +328.571 328.571 885.714 885.714 885.714 685.714 214.286 214.286 207.143 +207.143 921.429 921.429 921.429 921.429 207.143 207.143 200 200 957.143 +957.143 950 214.286 214.286 207.143 207.143 957.143 957.143 950 200 +207.143 207.143 942.857 942.857 942.857 950 950; +#X pop; +#X obj 164 87 tabosc4~ pitch11; +#X obj 164 123 tabosc4~ waveform11; +#X obj 164 55 sig~ 0.5; +#X text 13 319 Here's a tabosc4~ controlling the frequency of another +one. If you get properties on the two arrays \, you'll see that the +top graph has a vertical scale from 0 to 1000 \; we're looping through +that at a frequency of 0.5 Hz. and the output is used as the frequency +input of the second tabosc4~. I've detected Klingons \, Captain Kirk... +; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 10 0 11 0; +#X connect 11 0 2 0; +#X connect 12 0 10 0; diff --git a/pd/doc/3.audio.examples/B03.tabread4.pd b/pd/doc/3.audio.examples/B03.tabread4.pd new file mode 100644 index 00000000..15fa6652 --- /dev/null +++ b/pd/doc/3.audio.examples/B03.tabread4.pd @@ -0,0 +1,130 @@ +#N canvas 55 137 820 651 12; +#N canvas 0 0 450 300 graph1 0; +#X array waveform12 131 float 1; +#A 0 -0.172615 -0.172615 -0.172615 -0.172615 -0.172615 -0.141231 -0.109846 +-0.0941538 -0.0627692 -0.0470769 0.0156923 0.0784615 0.125538 0.188308 +0.235385 0.298154 0.360923 0.392308 0.470769 0.533538 0.596308 0.643385 +0.674769 0.721846 0.753231 0.784615 0.816 0.831692 0.847385 0.878769 +0.894462 0.910154 0.910154 0.910154 0.910154 0.910154 0.894462 0.894462 +0.894462 0.894462 0.878769 0.863077 0.816 0.800308 0.768923 0.737538 +0.706154 0.674769 0.643385 0.596308 0.564923 0.533538 0.470769 0.423692 +0.376615 0.313846 0.266769 0.204 0.172615 0.109846 0.0627692 0.0156923 +0 -0.0313846 -0.0627692 -0.0784615 -0.0941538 -0.109846 -0.141231 -0.156923 +-0.172615 -0.204 -0.219692 -0.219692 -0.235385 -0.235385 -0.235385 +-0.219692 -0.219692 -0.219692 -0.204 -0.156923 -0.125538 -0.0784615 +0 0.172615 0.313846 0.470769 0.564923 0.627692 0.690462 0.721846 0.737538 +0.753231 0.768923 0.768923 0.753231 0.737538 0.706154 0.674769 0.612 +0.580615 0.549231 0.517846 0.486462 0.423692 0.392308 0.360923 0.282462 +0.219692 0.109846 -0.0156923 -0.0941538 -0.109846 -0.141231 -0.156923 +-0.172615 -0.188308 -0.204 -0.204 -0.219692 -0.204 -0.204 -0.219692 +-0.219692 -0.204 -0.204 -0.204 -0.204 -0.204 -0.188308; +#X coords 0 1.02 130 -1.02 258 130 1; +#X restore 462 30 graph; +#X floatatom 194 299 0 0 100 0 - - -; +#N canvas 159 26 532 285 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 426 180 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 20 155 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 105 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 90 outlet; +#X msg 214 65 \; pd dsp 1; +#X obj 83 198 line~; +#X obj 20 207 *~; +#X obj 20 232 dac~; +#X obj 83 173 pack 0 50; +#X text 20 132 audio; +#X text 96 114 show level; +#X obj 426 155 t b; +#X obj 20 181 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 26 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 27 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 5 0; +#X connect 27 0 21 0; +#X restore 156 327 pd output; +#X msg 232 300 MUTE; +#X text 33 8 WAVETABLE OSCILLATORS; +#X obj 156 95 phasor~; +#X obj 156 184 tabread4~ waveform12; +#X obj 156 157 +~ 1; +#X floatatom 156 66 4 0 0 0 - - -; +#X floatatom 250 59 4 0 1000 0 - - -; +#X obj 250 80 pack 0 50; +#X obj 250 104 line~; +#X obj 156 131 *~; +#X text 21 81 phase; +#X text 20 96 generation -->; +#X text 25 117 range; +#X text 24 132 adjustment -->; +#X text 250 38 squeeze; +#X text 133 40 frequency; +#N canvas 0 0 450 300 graph3 0; +#X array wave-out12 441 float 0; +#X coords 0 1 440 -1 300 140 1; +#X restore 481 190 graph; +#X obj 177 247 tabwrite~ wave-out12; +#X msg 177 216 bang; +#X text 223 217 <--click to graph; +#X text 25 360 The tabread4~ module is available for situations requiring +more control than tabosc4~ offers. The relationship between the two +is the same as between cos~ and osc~ \, although the units are different +between cos~ and tabread4~. Cos~ assumes input is normalized from 0 +to 1 (and will wrap around as needed.) Tabread4~ takes values from +1 to n-2 where n is the number of points in the table-- for a 259-point +table such as we have here \, it's 1 to 129 (so the "good" segment +is 128 samples long.); +#X text 30 508 You would use tabread4~ (as opposed to tabosc4~) if +you need direct control of the phase \, for instance if you to advance +nonlinearly through the table. In the case shown here \, the "squeeze" +factor makes the phase grow to a value at least \, and possibly much +graeater than \, 129 (to which tabread4~ then limits it). So the resulting +waveform is compressed in time.; +#X obj 250 128 +~ 128; +#X text 554 624 updated for Pd version 0.37; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 12 0; +#X connect 6 0 2 0; +#X connect 6 0 20 0; +#X connect 7 0 6 0; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 25 0; +#X connect 12 0 7 0; +#X connect 21 0 20 0; +#X connect 25 0 12 1; diff --git a/pd/doc/3.audio.examples/B04.tabread4.interpolation.pd b/pd/doc/3.audio.examples/B04.tabread4.interpolation.pd new file mode 100644 index 00000000..18aef089 --- /dev/null +++ b/pd/doc/3.audio.examples/B04.tabread4.interpolation.pd @@ -0,0 +1,44 @@ +#N canvas 137 102 781 520 12; +#X graph graph1 0 -1.02 10 1.02 468 159 648 29; +#X array waveform13 11 float 1; +#A 0 1 1 1 1 1 1 1 -1 -1 -1 -1; +#X pop; +#X text 533 502 updated for Pd version 0.34; +#X obj 156 157 +~ 1; +#X text 21 81 phase; +#X text 20 96 generation -->; +#X text 25 117 range; +#X text 24 132 adjustment -->; +#X graph graph3 0 -1.02 440 1.02 469 362 769 222; +#X array wave-out13 441 float 0; +#X pop; +#X msg 177 216 bang; +#X text 223 217 <--click to graph; +#N canvas 11 418 523 216 other-stuff 0; +#X obj 41 49 loadbang; +#X msg 39 81 \; waveform13 0 1 1 1 1 1 1 1 -1 -1 -1 -1 \; waveform13 +xlabel -1.2 0 1 2 3 4 5 6 7 8 9 10 \; pd dsp 1; +#X connect 0 0 1 0; +#X restore 626 426 pd other-stuff; +#X obj 156 247 tabwrite~ wave-out13; +#X obj 156 184 tabread4~ waveform13; +#X obj 156 131 *~ 8; +#X obj 156 95 phasor~ 220; +#X text 36 22 4-POINT INTERPOLATION IN DETAIL; +#X obj 216 316 sig~ 220; +#X obj 216 346 tabosc4~ waveform13; +#X text 35 293 (this would be; +#X text 36 313 equivalent to the; +#X text 110 333 above) -->; +#X text 18 409 This patch demonstrates 4-point interpolation in tabread4~. +The 11-point table \, waveform13 \, contains a transition from from +1 to -1 \, which is "smoothed" as seen in wave-out13. There's no such +transition at the wraparoind point--the interpolation always happens +between 4 consccutive samples of the table \, disregarding wraparound. +; +#X connect 2 0 12 0; +#X connect 8 0 11 0; +#X connect 12 0 11 0; +#X connect 13 0 2 0; +#X connect 14 0 13 0; +#X connect 16 0 17 0; diff --git a/pd/doc/3.audio.examples/B05.tabread.FM.pd b/pd/doc/3.audio.examples/B05.tabread.FM.pd new file mode 100644 index 00000000..ac2d9507 --- /dev/null +++ b/pd/doc/3.audio.examples/B05.tabread.FM.pd @@ -0,0 +1,107 @@ +#N canvas 55 137 777 467 12; +#N canvas 0 0 450 300 graph1 0; +#X array pitchmod14 131 float 1; +#A 0 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.863077 +0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 +0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 +0.863077 0.863077 0.863077 0.863077 0.863077 0.831692 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +0.847385 0.863077 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +-0.800308 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.800308 -0.800308 +-0.800308 -0.800308 -0.800308 -0.800308 -0.800308; +#X coords 0 1.02 130 -1.02 258 130 1; +#X restore 462 30 graph; +#X floatatom 191 277 0 0 100 0 - - -; +#N canvas 159 26 532 285 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 426 180 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 20 155 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 105 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 90 outlet; +#X msg 214 65 \; pd dsp 1; +#X obj 83 198 line~; +#X obj 20 207 *~; +#X obj 20 232 dac~; +#X obj 83 173 pack 0 50; +#X text 20 132 audio; +#X text 96 114 show level; +#X obj 426 155 t b; +#X obj 20 181 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 26 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 27 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 5 0; +#X connect 27 0 21 0; +#X restore 153 305 pd output; +#X msg 229 278 MUTE; +#X text 521 439 updated for Pd version 0.34; +#X floatatom 153 95 4 0 0 0 - - -; +#X text 153 69 frequency; +#X text 33 8 MORE ON FREQUENCY MODULATION; +#X floatatom 195 206 4 0 0 0 - - -; +#X text 155 50 modulation; +#X obj 152 157 *~; +#X text 255 150 modulation; +#X text 253 169 depth; +#X floatatom 201 157 4 0 0 0 - - -; +#X obj 152 205 +~; +#X text 250 212 frequency; +#X obj 152 237 osc~; +#X obj 153 122 tabosc4~ pitchmod14; +#X text 254 194 carrier; +#X text 47 356 This patch is like the original FM patch except in having +a settable wavetable for the modulation oscillator. Try changing the +waveform as well as the three familiar parameters.; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 17 0; +#X connect 8 0 14 1; +#X connect 10 0 14 0; +#X connect 13 0 10 1; +#X connect 14 0 16 0; +#X connect 16 0 2 0; +#X connect 17 0 10 0; diff --git a/pd/doc/3.audio.examples/B06.table.switching.pd b/pd/doc/3.audio.examples/B06.table.switching.pd new file mode 100644 index 00000000..558f91c4 --- /dev/null +++ b/pd/doc/3.audio.examples/B06.table.switching.pd @@ -0,0 +1,127 @@ +#N canvas 55 137 835 504 12; +#X graph graph1 0 -1.02 130 1.02 565 153 823 23; +#X array waveshape15a 131 float 1; +#A 0 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.863077 +0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 +0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 +0.863077 0.863077 0.863077 0.863077 0.863077 0.831692 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +0.847385 0.863077 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 +-0.800308 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.800308 -0.800308 +-0.800308 -0.800308 -0.800308 -0.800308 -0.800308; +#X pop; +#X floatatom 194 299 0 0 100; +#N canvas 159 26 532 285 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 426 180 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 20 155 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 105 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 90 outlet; +#X msg 214 65 \; pd dsp 1; +#X obj 83 198 line~; +#X obj 20 207 *~; +#X obj 20 232 dac~; +#X obj 83 173 pack 0 50; +#X text 20 132 audio; +#X text 96 114 show level; +#X obj 426 155 t b; +#X obj 20 181 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 26 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 27 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 5 0; +#X connect 27 0 21 0; +#X restore 156 327 pd output; +#X msg 232 300 MUTE; +#X text 581 481 updated for Pd version 0.34; +#X text 33 8 SWITCHING BETWEEN TABLES; +#X graph graph1 0 -1.02 130 1.02 565 308 823 178; +#X array waveshape15b 131 float 1; +#A 0 -0.659077 -0.643385 -0.643385 -0.627692 -0.612 -0.612 -0.596308 +-0.596308 -0.580615 -0.580615 -0.580615 -0.580615 -0.580615 -0.580615 +-0.580615 -0.596308 -0.596308 -0.596308 -0.596308 -0.596308 -0.596308 +-0.596308 -0.596308 -0.580615 -0.580615 -0.580615 -0.580615 -0.580615 +-0.580615 -0.580615 -0.580615 -0.564923 -0.549231 -0.549231 -0.533538 +-0.517846 -0.517846 -0.517846 -0.517846 -0.517846 -0.517846 -0.517846 +-0.517846 -0.533538 -0.549231 -0.580615 -0.580615 0.847385 0.847385 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.863077 +0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.800308 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.768923 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.768923 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 +-0.784615 -0.784615 -0.784615 -0.800308 -0.800308 -0.800308 -0.800308 +-0.800308 -0.800308 -0.800308; +#X pop; +#X obj 156 274 tabosc4~ waveshape15a; +#X obj 156 186 sig~ 110; +#X msg 181 215 set waveshape15a; +#X msg 182 244 set waveshape15b; +#X text 20 51 During a performance you're unlikely to want to draw +or recalculate wavetables on the fly \, because you don't want to give +Pd computationally intensive atomic tasks that could make Pd miss a +DAC deadline. Instead \, use "set" mesages to switch tabosc~ or tabread4~ +between pre-prepared tables. Indeed \, you will eventually want to +save screen space by throwing all your wavetables in a subpatch somewhere. +; +#X obj 161 401 table waveshape15c 131; +#X text 41 362 There's also a "text object" hook so that you can have +arrays with parametrizable names and sizes:; +#X text 31 431 You would use this if you want to include one or more +arrays in an abstraction. In this invocation you can't save the state +of the array--instead \, juts read it in from a file or calculate it +at startup.; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 7 0 2 0; +#X connect 8 0 7 0; +#X connect 9 0 7 0; +#X connect 10 0 7 0; diff --git a/pd/doc/3.audio.examples/B07.sampler.pd b/pd/doc/3.audio.examples/B07.sampler.pd new file mode 100644 index 00000000..632c1d03 --- /dev/null +++ b/pd/doc/3.audio.examples/B07.sampler.pd @@ -0,0 +1,52 @@ +#N canvas 11 3 915 618 12; +#X obj 37 217 hip~ 5; +#X text 96 219 high pass filter to cut DC; +#N canvas 0 0 450 300 graph1 0; +#X array sample-table 44104 float 0; +#X coords 0 1.02 44103 -1.02 200 130 1; +#X restore 585 20 graph; +#X obj 37 185 tabread4~ sample-table; +#X obj 37 150 line~; +#X obj 37 101 * 441; +#X floatatom 37 47 0 0 100 0 - - -; +#X obj 37 125 pack 0 100; +#X text 102 13 SCRATCH MACHINE; +#X text 72 48 <-- read point in 100ths of a second; +#X text 94 101 convert to SAMPLES (441 samples in 0.01 sec); +#X obj 405 235 loadbang; +#X text 246 174 read from the table; +#X text 237 192 (the input is the index in samples); +#X text 16 482 For more on reading and writing soundfiles to tables +\, setting their lengths \, etc \, see "arrays" in the "control examples" +series.; +#X text 14 355 This patch introduces the "tabread4~" object \, which +reads audio samples out of a floating-point array \, often called a +"sample table." The input is the index of the sample to read \, counting +from zero. The output is calculated using 4-point cubic interpolation +\, which is adequate for most purposes. Because of the interpolation +scheme \, tabread4~'s input cannot be less than one or greater than +the table length minus two.; +#X text 17 539 Fanatics take note: if you want really high-fidelity +sampling \, use a high-quality resampling program to up-sample your +soundfile to 88200 to drastically reduce interpolation error.; +#X text 591 173 (one second plus three extra; +#X text 593 192 for 4-point interpolation); +#X text 385 304 message to read a soundfile into the table (automatically +sent when you load this patch by the "loadbang" object.); +#X text 84 150 convert smoothly to audio signal; +#X text 84 62 (range is 0-100.) YOU ONLY HEAR OUTPUT; +#X text 85 78 WHEN THIS IS 0-100 AND ACTIVELY CHANGING.; +#X text 596 589 updated for Pd version 0.33; +#X text 584 151 --- 44103 samples ---; +#X msg 405 259 read ../sound/voice.wav sample-table; +#X obj 405 284 soundfiler; +#X obj 36 249 output~; +#X connect 0 0 27 0; +#X connect 0 0 27 1; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 4 0; +#X connect 11 0 25 0; +#X connect 25 0 26 0; diff --git a/pd/doc/3.audio.examples/B08.sampler.loop.pd b/pd/doc/3.audio.examples/B08.sampler.loop.pd new file mode 100644 index 00000000..db2362e8 --- /dev/null +++ b/pd/doc/3.audio.examples/B08.sampler.loop.pd @@ -0,0 +1,64 @@ +#N canvas 143 17 992 621 12; +#N canvas 0 0 450 300 graph1 0; +#X array tabread4-out 44100 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 632 200 graph; +#N canvas 0 0 450 300 graph1 0; +#X array table17 44103 float 0; +#X coords 0 1.02 44103 -1.02 200 130 1; +#X restore 631 14 graph; +#X obj 568 496 loadbang; +#X obj 65 277 tabwrite~ tabread4-out; +#X obj 34 308 hip~ 5; +#X floatatom 34 54 0 0 0 0 - - -; +#X text 241 215 read from the table; +#X text 49 11 LOOPING SAMPLER; +#X text 83 54 <-- frequency (Hz.); +#X floatatom 65 107 0 0 0 0 - - -; +#X obj 65 133 * 441; +#X obj 34 160 *~ 0; +#X obj 34 187 +~ 1; +#X text 110 248 <-- click to display output; +#X obj 34 80 phasor~ 0; +#X msg 65 245 bang; +#X text 110 108 <-- chunk size (100ths of a second); +#X obj 561 395 adc~ 1; +#X msg 575 422 bang; +#X text 615 423 <-- click here to record your own sample; +#X text 678 501 v-- re-read the original sample; +#X text 14 540 In this patch you will frequently hear discontinuities +at the looping point. If you're working in a studio \, you can sometimes +find "good" loop points for samples. Another approach \, better for +live situations \, is shown in the next patch.; +#X text 80 159 <-- readjust phase for range 0 - (chunk size); +#X text 79 187 <-- add one to avoid beginning of table; +#X obj 568 549 soundfiler; +#X text 629 153 ---- 44103 samples ----; +#X text 643 336 ---- 1 second ------; +#X obj 34 335 output~; +#X text 742 591 updated for Pd version 0.37; +#X obj 34 216 tabread4~ table17; +#X obj 562 455 tabwrite~ table17; +#X msg 568 524 read ../sound/voice.wav table17; +#X text 16 409 This is a looping sampler in which you specify the number +of loops per second (the frequency) and the size of the chunk to loop. +If the frequency is less than about 20 \, you will hear repetition +and the chunk size will sound like transposition. For frequencies above +50 or so \, you hear a tone whose timbre is controlled by the chunk +size (best kept below 10 or so.) Remember you can use the "shift" key +on number boxes to make fine adjustments.; +#X connect 2 0 31 0; +#X connect 4 0 27 0; +#X connect 4 0 27 1; +#X connect 5 0 14 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 12 0; +#X connect 12 0 29 0; +#X connect 14 0 11 0; +#X connect 15 0 3 0; +#X connect 17 0 30 0; +#X connect 18 0 30 0; +#X connect 29 0 4 0; +#X connect 29 0 3 0; +#X connect 31 0 24 0; diff --git a/pd/doc/3.audio.examples/B09.sampler.loop.smooth.pd b/pd/doc/3.audio.examples/B09.sampler.loop.smooth.pd new file mode 100644 index 00000000..818d9206 --- /dev/null +++ b/pd/doc/3.audio.examples/B09.sampler.loop.smooth.pd @@ -0,0 +1,72 @@ +#N canvas 75 15 973 599 12; +#N canvas 0 0 450 300 graph1 0; +#X array cos-output 44100 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 724 191 graph; +#N canvas 0 0 450 300 graph1 0; +#X array table18 44103 float 0; +#X coords 0 1.02 44103 -1.02 200 130 1; +#X restore 721 16 graph; +#X obj 584 491 loadbang; +#X obj 45 249 hip~ 5; +#X floatatom 46 50 0 0 0 0 - - -; +#X text 85 49 <-- frequency (Hz.); +#X floatatom 132 87 0 0 0 0 - - -; +#X obj 132 114 * 441; +#X obj 110 163 +~ 1; +#X text 171 86 <-- chunk size (100ths of a second); +#X obj 584 404 adc~ 1; +#X msg 599 429 bang; +#X text 40 9 ENVELOPING YOUR LOOPING SAMPLER; +#X obj 45 139 -~ 0.5; +#X obj 45 189 cos~; +#X obj 45 222 *~; +#X obj 584 545 soundfiler; +#X text 736 148 -- 44103 samples ---; +#X text 727 322 ----- 1 second ------; +#X obj 46 77 phasor~; +#X obj 45 164 *~ 0.5; +#X obj 44 281 output~; +#X obj 110 138 *~; +#X text 28 362 Here we apply an amplitude envelope to protect against +discontinuities at the loop point. The envelope is just a cosine wave +from -90 degrees to +90 degrees \, (-pi/2 to pi/2 radians) \, i.e. +\, the part that is zero or positive in sign. The "cos~" object's input +is in cycles (units of 2pi radians) so -1/4 to +1/4 addresses the desired +part of the waveform.; +#X obj 167 247 tabwrite~ cos-output; +#X obj 167 223 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 188 220 <-- click to graph envelope; +#X text 28 476 To see the envelope \, put the phasor on 2 Hz or so +\, click the "graph" button \, and look at "cos-output." This is multiplied +by the tabread4~ output so that it doesn't click when the phase wraps +around.; +#X text 26 545 It is possible to get much more control over the shape +of the envelope \, but this will be taken up later.; +#X obj 110 189 tabread4~ table18; +#X obj 584 456 tabwrite~ table18; +#X msg 584 520 read ../sound/voice.wav table18; +#X text 641 430 <-- click here to record to table; +#X text 675 499 v-- re-read the original sound; +#X text 708 565 updated for Pd version 0.37; +#X connect 2 0 31 0; +#X connect 3 0 21 0; +#X connect 3 0 21 1; +#X connect 4 0 19 0; +#X connect 6 0 7 0; +#X connect 7 0 22 1; +#X connect 8 0 29 0; +#X connect 10 0 30 0; +#X connect 11 0 30 0; +#X connect 13 0 20 0; +#X connect 14 0 15 0; +#X connect 14 0 24 0; +#X connect 15 0 3 0; +#X connect 19 0 13 0; +#X connect 19 0 22 0; +#X connect 20 0 14 0; +#X connect 22 0 8 0; +#X connect 25 0 24 0; +#X connect 29 0 15 1; +#X connect 31 0 16 0; diff --git a/pd/doc/3.audio.examples/B10.sampler.scratch.pd b/pd/doc/3.audio.examples/B10.sampler.scratch.pd new file mode 100644 index 00000000..38c67b76 --- /dev/null +++ b/pd/doc/3.audio.examples/B10.sampler.scratch.pd @@ -0,0 +1,83 @@ +#N canvas 53 232 936 654 12; +#N canvas 0 0 450 300 graph1 0; +#X array table19 44103 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 680 8 graph; +#X obj 40 382 hip~ 5; +#X floatatom 99 51 0 0 0 0 - - -; +#X text 146 50 <-- frequency (Hz.); +#X floatatom 129 106 0 0 0 0 - - -; +#X obj 129 135 * 441; +#X obj 100 158 *~ 0; +#X obj 100 181 +~ 1; +#X msg 194 281 bang; +#X text 164 106 <-- chunk size (100ths of a second); +#X obj 591 369 adc~ 1; +#X obj 591 395 hip~ 5; +#X msg 609 423 bang; +#N canvas 0 0 450 300 graph2 0; +#X array graph19 44100 float 0; +#X coords 0 44100 44100 0 200 130 1; +#X restore 681 196 graph; +#X obj 40 356 *~; +#X obj 123 276 line~; +#X obj 123 228 * 441; +#X floatatom 123 205 0 0 0 0 - - -; +#X obj 123 252 pack 0 100; +#X obj 101 310 +~; +#X text 34 474 In this patch we can loop in any "window" of the input +sample. The "read point" (0-100) gives the starting point of the window +and "chunk" is its size (both in 100ths of a second.) Try \, for example +\, frequency 4 \, sharpness 10 \, chunk size 25 \, and vary the read +point from -25 to 100 \, listening to the result.; +#X text 242 281 <-- graph table index; +#X text 684 337 ----- 1 second ------; +#X obj 595 490 loadbang; +#X text 631 514 v-- re-read the original sample; +#X obj 605 559 soundfiler; +#X text 678 147 ---- 44103 samples ---; +#X obj 591 455 tabwrite~ table19; +#X msg 605 535 read ../sound/voice.wav table19; +#X text 688 628 updated for Pd version 0.37; +#X msg 595 585 \; graph19 ylabel 48000 0 44100; +#X obj 39 103 -~ 0.5; +#X obj 99 76 phasor~; +#X obj 39 127 *~ 0.5; +#X obj 39 150 cos~; +#X text 157 206 <-- read point (100ths of a second); +#X obj 41 406 output~; +#X text 651 422 <-- record; +#X text 36 13 ENVELOPING THE LOOPING SAMPLER; +#X text 37 574 You should hear some doppler shift as you change the +read point. To see why \, click on "graph table index" and quickly +start changing the read point--- you should see entertaining pictures +in "table-index". The next patch shows how to prevent this if you wish +to.; +#X obj 100 336 tabread4~ table19; +#X obj 194 307 tabwrite~ graph19; +#X connect 1 0 36 0; +#X connect 2 0 32 0; +#X connect 4 0 5 0; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 7 0 19 0; +#X connect 8 0 41 0; +#X connect 10 0 11 0; +#X connect 11 0 27 0; +#X connect 12 0 27 0; +#X connect 14 0 1 0; +#X connect 15 0 19 1; +#X connect 16 0 18 0; +#X connect 17 0 16 0; +#X connect 18 0 15 0; +#X connect 19 0 40 0; +#X connect 19 0 41 0; +#X connect 23 0 30 0; +#X connect 23 0 28 0; +#X connect 28 0 25 0; +#X connect 31 0 33 0; +#X connect 32 0 6 0; +#X connect 32 0 31 0; +#X connect 33 0 34 0; +#X connect 34 0 14 0; +#X connect 40 0 14 1; diff --git a/pd/doc/3.audio.examples/B11.sampler.nodoppler.pd b/pd/doc/3.audio.examples/B11.sampler.nodoppler.pd new file mode 100644 index 00000000..1ec362ac --- /dev/null +++ b/pd/doc/3.audio.examples/B11.sampler.nodoppler.pd @@ -0,0 +1,85 @@ +#N canvas 177 116 924 622 12; +#N canvas 0 0 450 300 graph1 0; +#X array table20 44103 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 631 10 graph; +#X obj 582 447 loadbang; +#X obj 13 425 hip~ 5; +#X floatatom 87 49 0 0 0 0 - - -; +#X text 126 48 <-- frequency (Hz.); +#X floatatom 150 108 0 0 0 0 - - -; +#X obj 150 133 * 441; +#X obj 50 220 +~ 1; +#X obj 87 73 phasor~ 0; +#X msg 175 273 bang; +#X text 189 107 <-- chunk size (100ths of a second); +#X obj 576 343 adc~ 1; +#X obj 576 367 hip~ 5; +#X msg 591 390 bang; +#X text 630 464 v-- re-read the original sample; +#N canvas 0 0 450 300 graph2 0; +#X array graph20 44100 float 0; +#X coords 0 44100 44100 0 200 130 1; +#X restore 633 179 graph; +#X obj 13 401 *~; +#X obj 72 308 line~; +#X obj 149 242 * 441; +#X floatatom 149 218 0 0 0 0 - - -; +#X obj 72 284 pack 0 100; +#X text 184 217 <-- read point in 100ths of a second; +#X obj 51 356 +~; +#X text 218 272 <-- graph table index; +#X obj 72 332 samphold~; +#X obj 74 170 samphold~; +#X obj 51 196 *~; +#X text 643 315 ----- 1 second ------; +#X text 631 144 ---- 44103 samples ---; +#X obj 591 508 soundfiler; +#X text 21 8 SLIDING STABLE LOOPS WITHOUT DOPPLER SHIFT; +#X msg 582 534 \; graph20 ylabel 48000 0 44100; +#X text 631 390 <-- record; +#X obj 13 451 output~; +#X obj 12 103 -~ 0.5; +#X obj 12 127 *~ 0.5; +#X obj 12 150 cos~; +#X obj 175 353 tabwrite~ graph20; +#X obj 51 381 tabread4~ table20; +#X obj 576 417 tabwrite~ table20; +#X msg 591 484 read ../sound/voice.wav table20; +#X text 11 518 This example differs from the previous one in having +samphold~ objects which allow the chunk size and especially the read +point to change only at points where the phase wraps around. This removes +signal discontinuities (when the chunk size changes) and doppler shift +when the read point is changing.; +#X text 652 592 updated for Pd version 0.37; +#X connect 1 0 31 0; +#X connect 1 0 40 0; +#X connect 2 0 33 0; +#X connect 2 0 33 1; +#X connect 3 0 8 0; +#X connect 5 0 6 0; +#X connect 6 0 25 0; +#X connect 7 0 22 0; +#X connect 8 0 24 1; +#X connect 8 0 25 1; +#X connect 8 0 26 0; +#X connect 8 0 34 0; +#X connect 9 0 37 0; +#X connect 11 0 12 0; +#X connect 12 0 39 0; +#X connect 13 0 39 0; +#X connect 16 0 2 0; +#X connect 17 0 24 0; +#X connect 18 0 20 0; +#X connect 19 0 18 0; +#X connect 20 0 17 0; +#X connect 22 0 37 0; +#X connect 22 0 38 0; +#X connect 24 0 22 1; +#X connect 25 0 26 1; +#X connect 26 0 7 0; +#X connect 34 0 35 0; +#X connect 35 0 36 0; +#X connect 36 0 16 0; +#X connect 38 0 16 1; +#X connect 40 0 29 0; diff --git a/pd/doc/3.audio.examples/B12.sampler.transpose.pd b/pd/doc/3.audio.examples/B12.sampler.transpose.pd new file mode 100644 index 00000000..fc7a7d14 --- /dev/null +++ b/pd/doc/3.audio.examples/B12.sampler.transpose.pd @@ -0,0 +1,109 @@ +#N canvas 107 88 930 596 12; +#N canvas 0 0 450 300 graph1 0; +#X array table21 44103 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 645 291 graph; +#X obj 467 506 loadbang; +#X obj 19 508 hip~ 5; +#X floatatom 10 254 0 0 0 0 - - -; +#X obj 10 279 * 441; +#X obj 10 401 +~ 1; +#X text 47 253 <-- chunk size (100ths of a second); +#X obj 471 402 adc~ 1; +#X obj 471 427 hip~ 5; +#X msg 486 449 bang; +#X obj 44 482 *~; +#X obj 106 404 line~; +#X obj 106 354 * 441; +#X floatatom 106 329 0 0 0 0 - - -; +#X obj 106 379 pack 0 100; +#X text 152 331 <-- read point in 100ths of a second; +#X obj 44 433 +~; +#X obj 106 429 samphold~; +#X obj 10 329 samphold~; +#X obj 10 304 sig~; +#X obj 10 376 *~; +#X text 18 5 CALCULATING LOOP FREQUENCY AS FUNCTION OF TRANSPOSITION +; +#X obj 124 485 r~ phase; +#X obj 10 204 s~ phase; +#X obj 68 304 r~ phase; +#X obj 26 351 r~ phase; +#X obj 164 405 r~ phase; +#X obj 151 299 s chunk-size; +#X floatatom 10 50 0 0 0 0 - - -; +#X text 48 51 <-- transposition (10ths of a halftone); +#X obj 151 274 * 0.01; +#X text 264 287 chunk size; +#X text 264 309 in seconds; +#X obj 21 105 r chunk-size; +#X obj 21 130 t b f; +#X obj 10 154 /; +#X text 80 131 divide speed change by chunk; +#X text 78 152 size to get loop frequency; +#X text 382 75 The transposition is frequency in Hz. divided by chunk +size in seconds. This patch calculates the loop frequency as a function +of desired transposition; +#X text 384 126 Notice now that we get Doppler effects when the chunk +size changes. You can suppress that if you don't want it \, by converting +the chunk size to an audio signal \, sampling and holding it. But then +there would be more work to deal with very low frequencies never triggering +the sample and hold...; +#X obj 467 560 soundfiler; +#X obj 10 27 loadbang; +#X obj 124 509 -~ 0.5; +#X obj 124 533 *~ 0.5; +#X obj 124 556 cos~; +#X obj 19 533 output~; +#X obj 44 458 tabread4~ table21; +#X text 527 449 <-- record; +#X text 560 513 v-- re-read original table; +#X text 682 572 updated for Pd version 0.37; +#X text 647 425 --- 44103 samples ---; +#X obj 10 75 expr pow(2 \, $f1/120); +#X text 199 75 speed change; +#X text 387 208 You might also want to have a way to retrigger the +loop to sync it with some other process. By the time we had all this +built the patch would be fairly involved. For now \, we'll move on +to the next topic...; +#X obj 10 178 phasor~; +#X obj 471 476 tabwrite~ table21; +#X msg 467 533 read ../sound/voice.wav table21; +#X connect 1 0 56 0; +#X connect 2 0 45 0; +#X connect 2 0 45 1; +#X connect 3 0 4 0; +#X connect 3 0 30 0; +#X connect 4 0 19 0; +#X connect 5 0 16 0; +#X connect 7 0 8 0; +#X connect 8 0 55 0; +#X connect 9 0 55 0; +#X connect 10 0 2 0; +#X connect 11 0 17 0; +#X connect 12 0 14 0; +#X connect 13 0 12 0; +#X connect 14 0 11 0; +#X connect 16 0 46 0; +#X connect 17 0 16 1; +#X connect 18 0 20 0; +#X connect 19 0 18 0; +#X connect 20 0 5 0; +#X connect 22 0 42 0; +#X connect 24 0 18 1; +#X connect 25 0 20 1; +#X connect 26 0 17 1; +#X connect 28 0 51 0; +#X connect 30 0 27 0; +#X connect 33 0 34 0; +#X connect 34 0 35 0; +#X connect 34 1 35 1; +#X connect 35 0 54 0; +#X connect 41 0 28 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; +#X connect 44 0 10 1; +#X connect 46 0 10 0; +#X connect 51 0 35 0; +#X connect 54 0 23 0; +#X connect 56 0 40 0; diff --git a/pd/doc/3.audio.examples/B13.sampler.overlap.pd b/pd/doc/3.audio.examples/B13.sampler.overlap.pd new file mode 100644 index 00000000..35acc48b --- /dev/null +++ b/pd/doc/3.audio.examples/B13.sampler.overlap.pd @@ -0,0 +1,158 @@ +#N canvas 28 47 748 713 12; +#X obj 19 511 hip~ 5; +#X floatatom 25 38 0 0 100 0 - - -; +#X obj 25 63 * 441; +#X obj 20 380 +~ 1; +#X text 69 35 <-- chunk size (100ths of a second); +#X obj 20 458 *~; +#X obj 26 211 line~; +#X obj 26 161 * 441; +#X floatatom 26 136 0 0 100 0 - - -; +#X obj 26 186 pack 0 100; +#X text 60 137 <-- read point in 100ths of a second; +#X obj 20 409 +~; +#X obj 76 408 samphold~; +#X obj 20 308 samphold~; +#X obj 20 355 *~; +#X obj 185 369 r~ phase; +#X obj 418 210 s~ phase; +#X obj 108 308 r~ phase; +#X obj 42 332 r~ phase; +#X obj 96 383 r~ phase; +#X obj 77 82 s chunk-size; +#X floatatom 418 56 0 0 0 0 - - -; +#X obj 77 57 * 0.01; +#X text 189 58 chunk size; +#X text 189 80 in seconds; +#X obj 429 111 r chunk-size; +#X obj 429 136 t b f; +#X obj 418 160 /; +#X obj 418 33 loadbang; +#X obj 185 393 -~ 0.5; +#X obj 185 417 *~ 0.5; +#X obj 185 440 cos~; +#X obj 19 536 output~; +#X text 486 684 updated for Pd version 0.37; +#X obj 418 81 expr pow(2 \, $f1/120); +#X text 607 81 speed change; +#X obj 418 184 phasor~; +#X text 18 5 TWO OVERLAPPING SAMPLE READ ELEMENTS; +#N canvas 30 567 660 275 table 0; +#N canvas 0 0 450 300 graph1 0; +#X array table22 44103 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 442 61 graph; +#X text 444 195 --- 44103 samples ---; +#X obj 41 148 loadbang; +#X obj 45 44 adc~ 1; +#X obj 45 69 hip~ 5; +#X msg 60 91 bang; +#X obj 41 202 soundfiler; +#X text 101 91 <-- record; +#X text 134 155 v-- re-read original table; +#X obj 45 118 tabwrite~ table22; +#X msg 41 175 read ../sound/voice.wav table22; +#X connect 2 0 10 0; +#X connect 3 0 4 0; +#X connect 4 0 9 0; +#X connect 5 0 9 0; +#X connect 10 0 6 0; +#X restore 567 327 pd table; +#X obj 25 110 s chunk-size-samples; +#X text 211 112 ... and in samples; +#X obj 26 234 s~ read-pt; +#X obj 77 360 r~ read-pt; +#X obj 505 203 +~ 0.5; +#X obj 506 229 wrap~; +#X obj 506 254 s~ phase2; +#X obj 20 283 r chunk-size-samples; +#X obj 274 391 +~ 1; +#X obj 274 469 *~; +#X obj 274 420 +~; +#X obj 329 419 samphold~; +#X obj 274 319 samphold~; +#X obj 274 366 *~; +#X obj 439 404 -~ 0.5; +#X obj 439 428 *~ 0.5; +#X obj 439 451 cos~; +#X obj 330 371 r~ read-pt; +#X obj 274 294 r chunk-size-samples; +#X obj 363 320 r~ phase2; +#X obj 296 343 r~ phase2; +#X obj 439 380 r~ phase2; +#X obj 339 394 r~ phase2; +#X obj 19 487 +~; +#X text 453 56 <-- transposition \, halftones/10; +#X text 456 159 loop frequency; +#X text 566 190 second phase signal; +#X text 566 210 out of phase from; +#X text 565 231 first one; +#X text 70 265 copy 1; +#X text 327 274 copy 2; +#X text 118 503 Here is the previous patch modified to use two copies +of the sample reader \, 180 degrees out of phase. The second sawtooth +signal is derived from the first one by adding a constant (0.5) and +wrapping the result to fit again between zero and one. The result is +the "phase2" signal.; +#X text 119 584 The computation of "chunk-size-samples" (as a message) +and "read-pt" (an audio signal) is the same for both copies and is +separated out at top left. At top right is the same loop frequency +calculation as before.; +#X text 120 654 Finally \, the two copies' outputs are added and the +result sent to the audio output.; +#X obj 20 434 tabread4~ table22; +#X obj 274 445 tabread4~ table22; +#X connect 0 0 32 0; +#X connect 0 0 32 1; +#X connect 1 0 2 0; +#X connect 1 0 22 0; +#X connect 2 0 39 0; +#X connect 3 0 11 0; +#X connect 5 0 62 0; +#X connect 6 0 41 0; +#X connect 7 0 9 0; +#X connect 8 0 7 0; +#X connect 9 0 6 0; +#X connect 11 0 73 0; +#X connect 12 0 11 1; +#X connect 13 0 14 0; +#X connect 14 0 3 0; +#X connect 15 0 29 0; +#X connect 17 0 13 1; +#X connect 18 0 14 1; +#X connect 19 0 12 1; +#X connect 21 0 34 0; +#X connect 22 0 20 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 26 1 27 1; +#X connect 27 0 36 0; +#X connect 28 0 21 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 5 1; +#X connect 34 0 27 0; +#X connect 36 0 16 0; +#X connect 36 0 43 0; +#X connect 42 0 12 0; +#X connect 43 0 44 0; +#X connect 44 0 45 0; +#X connect 46 0 13 0; +#X connect 47 0 49 0; +#X connect 48 0 62 1; +#X connect 49 0 74 0; +#X connect 50 0 49 1; +#X connect 51 0 52 0; +#X connect 52 0 47 0; +#X connect 53 0 54 0; +#X connect 54 0 55 0; +#X connect 55 0 48 1; +#X connect 56 0 50 0; +#X connect 57 0 51 0; +#X connect 58 0 51 1; +#X connect 59 0 52 1; +#X connect 60 0 53 0; +#X connect 61 0 50 1; +#X connect 62 0 0 0; +#X connect 73 0 5 0; +#X connect 74 0 48 0; diff --git a/pd/doc/3.audio.examples/B14.sampler.rockafella.pd b/pd/doc/3.audio.examples/B14.sampler.rockafella.pd new file mode 100644 index 00000000..20416b6b --- /dev/null +++ b/pd/doc/3.audio.examples/B14.sampler.rockafella.pd @@ -0,0 +1,166 @@ +#N canvas 123 36 683 718 12; +#X obj 6 529 hip~ 5; +#X floatatom 8 47 4 0 100 0 - - -; +#X obj 7 476 *~; +#X floatatom 7 123 0 0 200 0 - - -; +#X obj 7 378 +~; +#X obj 6 330 samphold~; +#X obj 7 354 *~; +#X obj 172 385 r~ phase; +#X obj 357 210 s~ phase; +#X obj 94 331 r~ phase; +#X obj 42 355 r~ phase; +#X obj 8 90 s chunk-size; +#X floatatom 357 42 0 0 0 0 - - -; +#X text 124 82 chunk size; +#X text 121 96 in seconds; +#X obj 369 79 r chunk-size; +#X obj 369 104 t b f; +#X obj 172 409 -~ 0.5; +#X obj 172 433 *~ 0.5; +#X obj 172 456 cos~; +#X obj 7 560 output~; +#X text 417 698 updated for Pd version 0.37; +#X obj 357 184 phasor~; +#N canvas 30 567 660 275 table 0; +#N canvas 0 0 450 300 graph1 0; +#X array table23 44103 float 0; +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 442 61 graph; +#X text 444 195 --- 44103 samples ---; +#X obj 41 148 loadbang; +#X obj 45 44 adc~ 1; +#X obj 45 69 hip~ 5; +#X msg 60 91 bang; +#X obj 41 202 soundfiler; +#X text 101 91 <-- record; +#X text 134 155 v-- re-read original table; +#X obj 45 118 tabwrite~ table23; +#X msg 41 175 read ../sound/voice.wav table23; +#X connect 2 0 10 0; +#X connect 3 0 4 0; +#X connect 4 0 9 0; +#X connect 5 0 9 0; +#X connect 10 0 6 0; +#X restore 558 460 pd table; +#X obj 7 263 s~ read-pt; +#X obj 45 378 r~ read-pt; +#X obj 444 203 +~ 0.5; +#X obj 445 229 wrap~; +#X obj 445 254 s~ phase2; +#X obj 6 505 +~; +#X text 391 43 <-- transposition \, halftones/10; +#X obj 8 67 * 0.001; +#X obj 7 215 phasor~; +#X obj 7 402 *~ 44100; +#X obj 7 452 tabread4~ table23; +#X obj 6 305 r chunk-size; +#X obj 6 428 +~ 1; +#X floatatom 365 161 5 0 0 0 - - -; +#X obj 15 169 s precession; +#X obj 482 103 t b f; +#X obj 482 78 r precession; +#X obj 7 146 * 0.01; +#X obj 258 485 *~; +#X obj 258 387 +~; +#X obj 257 339 samphold~; +#X obj 258 363 *~; +#X obj 423 418 -~ 0.5; +#X obj 423 442 *~ 0.5; +#X obj 423 465 cos~; +#X obj 296 387 r~ read-pt; +#X obj 258 411 *~ 44100; +#X obj 258 461 tabread4~ table23; +#X obj 257 314 r chunk-size; +#X obj 257 437 +~ 1; +#X obj 345 340 r~ phase2; +#X obj 293 364 r~ phase2; +#X obj 423 394 r~ phase2; +#X text 37 123 <-- precession \, percent; +#X obj 8 3 loadbang; +#X text 158 3 TIME COMPRESSION/EXPANSION BY LOOPED SAMPLING; +#X text 111 529 Here \, rather than ask you to push the read pointer +back and forth in the sample \, we use a phasor~. This makes it possible +to avoid the samphold~ on the read pointer (r~ read-pt) \, since \, +knowing the precession \, we can correct for it in computing the frequency +of the original phasor~ at right.; +#X text 111 626 We've changed the control for "chunk size" to milliseconds +for added convenience \, and delayed multiplying sample location by +the sample rate (44100) until the last moment \, so that calculations +using "read-pt" and "chunk size" can be in the same units (seconds.) +; +#X msg 8 25 25; +#X floatatom 139 192 4 0 900 0 - - -; +#X obj 139 212 * 0.001; +#X msg 139 170 900; +#X text 48 47 <-- chunk size (msec); +#X obj 357 136 expr (pow(2 \, $f1/120)-$f3)/$f2; +#X obj 139 237 t b f; +#X obj 139 146 loadbang; +#X text 182 188 <-- loop length; +#X text 223 203 (msec); +#X obj 7 239 *~; +#X obj 7 191 /; +#X connect 0 0 20 0; +#X connect 0 0 20 1; +#X connect 1 0 31 0; +#X connect 2 0 29 0; +#X connect 3 0 41 0; +#X connect 4 0 33 0; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 7 0 17 0; +#X connect 9 0 5 1; +#X connect 10 0 6 1; +#X connect 12 0 67 0; +#X connect 15 0 16 0; +#X connect 16 0 67 0; +#X connect 16 1 67 1; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 2 1; +#X connect 22 0 8 0; +#X connect 22 0 26 0; +#X connect 25 0 4 1; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 29 0 0 0; +#X connect 31 0 11 0; +#X connect 32 0 72 0; +#X connect 33 0 36 0; +#X connect 34 0 2 0; +#X connect 35 0 5 0; +#X connect 36 0 34 0; +#X connect 39 0 67 0; +#X connect 39 1 67 2; +#X connect 40 0 39 0; +#X connect 41 0 38 0; +#X connect 41 0 73 0; +#X connect 42 0 29 1; +#X connect 43 0 50 0; +#X connect 44 0 45 0; +#X connect 45 0 43 0; +#X connect 46 0 47 0; +#X connect 47 0 48 0; +#X connect 48 0 42 1; +#X connect 49 0 43 1; +#X connect 50 0 53 0; +#X connect 51 0 42 0; +#X connect 52 0 44 0; +#X connect 53 0 51 0; +#X connect 54 0 44 1; +#X connect 55 0 45 1; +#X connect 56 0 46 0; +#X connect 58 0 62 0; +#X connect 62 0 1 0; +#X connect 63 0 64 0; +#X connect 64 0 68 0; +#X connect 64 0 72 1; +#X connect 65 0 63 0; +#X connect 67 0 22 0; +#X connect 67 0 37 0; +#X connect 68 0 73 0; +#X connect 68 1 73 1; +#X connect 69 0 65 0; +#X connect 72 0 24 0; +#X connect 73 0 32 0; diff --git a/pd/doc/3.audio.examples/C01.nyquist.pd b/pd/doc/3.audio.examples/C01.nyquist.pd new file mode 100644 index 00000000..256da0e3 --- /dev/null +++ b/pd/doc/3.audio.examples/C01.nyquist.pd @@ -0,0 +1,102 @@ +#N canvas 601 188 580 659 12; +#N canvas 0 0 450 300 graph1 0; +#X array table24 259 float 1; +#A 0 -0.294693 0 0.294693 0.4 0.28948 0.10749 0.022875 0.0789655 0.181673 +0.218249 0.171348 0.115564 0.119192 0.169863 0.201356 0.178657 0.137857 +0.138353 0.188891 0.23571 0.22487 0.164534 0.115848 0.125265 0.176634 +0.214361 0.205655 0.169043 0.14204 0.134157 0.124033 0.0997798 0.0859507 +0.118173 0.195202 0.270956 0.301868 0.293569 0.285908 0.289835 0.256276 +0.128881 -0.0684912 -0.215994 -0.195335 -0.0145421 0.174701 0.203986 +0.0451069 -0.159794 -0.231026 -0.119011 0.0575033 0.135323 0.0628509 +-0.0665307 -0.124779 -0.0776696 0.000279083 0.0247376 -0.00546273 -0.0222151 +0.017933 0.0755681 0.0749102 4.97367e-06 -0.0729564 -0.0490464 0.0834901 +0.232853 0.286943 0.213202 0.0759584 -0.0357248 -0.0863297 -0.101697 +-0.115455 -0.125625 -0.107127 -0.0530433 0.012152 0.0608637 0.0902219 +0.111597 0.119683 0.0910146 0.0236817 -0.0326555 -0.0100379 0.100844 +0.216022 0.223032 0.094995 -0.0649958 -0.110291 0.00678482 0.180334 +0.247439 0.144699 -0.0319975 -0.124321 -0.0648335 0.0680811 0.141409 +0.100343 0.00354248 -0.0636733 -0.0891566 -0.131987 -0.227286 -0.316392 +-0.293048 -0.12222 0.100475 0.222686 0.173879 0.0281889 -0.0714016 +-0.0482686 0.0482418 0.108884 0.0773858 -0.00559103 -0.0590099 -0.0454391 +0.00509731 0.0411467 0.0421476 0.0225557 2.40108e-06 -0.0225508 -0.0421448 +-0.0411506 -0.00510821 0.0454302 0.0590142 0.0056084 -0.0773706 -0.108887 +-0.0482625 0.048252 0.0714103 -0.0281575 -0.173853 -0.222693 -0.100517 +0.122172 0.293026 0.316402 0.22731 0.132002 0.0891614 0.063682 -0.00352253 +-0.100324 -0.141412 -0.0681076 0.0648079 0.124324 0.0320316 -0.144663 +-0.247435 -0.180365 -0.00682225 0.110282 0.0650224 -0.0949583 -0.223017 +-0.216038 -0.100873 0.010022 0.0326611 -0.0236657 -0.0910033 -0.119682 +-0.111601 -0.0902271 -0.0608718 -0.0121649 0.0530291 0.107119 0.125625 +0.115458 0.101699 0.0863353 0.0357423 -0.0759289 -0.213176 -0.28694 +-0.232878 -0.0835252 0.0490278 0.0729642 1.4921e-05 -0.0749008 -0.0755765 +-0.0179463 0.0222127 0.00547055 -0.0247352 -0.000292052 0.0776522 0.12478 +0.0665546 -0.062824 -0.135322 -0.0575355 0.118973 0.23102 0.159828 +-0.0450604 -0.203969 -0.174729 0.014495 0.195309 0.21601 0.0685338 +-0.128843 -0.25626 -0.289835 -0.285909 -0.293565 -0.30187 -0.270969 +-0.195221 -0.118186 -0.0859518 -0.0997742 -0.124029 -0.134156 -0.142036 +-0.169035 -0.205649 -0.214364 -0.176646 -0.125273 -0.115843 -0.16452 +-0.22486 -0.235715 -0.188904 -0.13836 -0.137851 -0.178647 -0.201357 +-0.169874 -0.1192 -0.115557 -0.171333 -0.218246 -0.181691 -0.0789875 +-0.0228734 -0.107456 -0.289441 -0.399997 -0.294741 -7.20325e-05 0.294645 +; +#X coords 0 1.02 258 -1.02 258 130 1; +#X restore 93 408 graph; +#X obj 33 288 line~; +#X msg 33 237 500 \, 1423 4000; +#X floatatom 41 262 5 0 0 0 - - -; +#X text 24 556 Synthesis techniques vary in their tendency to make +foldover. For higher pitched sounds you'll want to try out relatively +folvover-resistant ones.; +#X obj 33 342 output~; +#X obj 201 281 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 0 0 618 384 make-tab 0; +#X obj 13 28 inlet; +#X obj 99 28 inlet; +#X obj 183 28 inlet; +#X obj 255 29 inlet; +#X msg 38 176 \; table24 sinesum 256 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 +1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 \, normalize +0.4; +#X msg 14 277 \; table24 sinesum 256 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 \, normalize +0.2; +#X msg 183 101 \; table24 const 0 \, 0 1 1 1 1 1; +#X msg 255 58 \; table24 const 0; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 2 0 6 0; +#X connect 3 0 7 0; +#X restore 201 355 pd make-tab; +#X obj 232 300 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 263 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 295 334 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 222 276 sine; +#X text 252 297 complex; +#X text 284 314 rectangle; +#X text 313 332 clear; +#X obj 33 315 tabosc4~ table24; +#X text 56 2 THE NYQUIST THEOREM AND FOLDOVER; +#X text 30 33 WARNING: PLAY THIS QUIETLY TO AVOID UNPLEASANTNESS AND +POSSIBLE EAR DAMAGE.; +#X text 29 77 Foldover occurs when you synthesize frequencies greater +than the Nyquist frequency (half the sample rate). In this example +\, the fundamental only reaches 1423 \, but the tables contain high +partials. As the partials sweep upward you hear them reflect off the +Nyquist frequency. Also \, partials can come into contact with each +other causing beating. The value of 1423 was chosen to make the beating +effect especially strong if you're running at a sample rate of 44100 +(the usual one.); +#X text 330 616 updated for Pd version 0.37; +#X text 219 245 waveforms:; +#X connect 1 0 15 0; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 6 0 7 0; +#X connect 8 0 7 1; +#X connect 9 0 7 2; +#X connect 10 0 7 3; +#X connect 15 0 5 0; +#X connect 15 0 5 1; diff --git a/pd/doc/3.audio.examples/C02.sawtooth-foldover.pd b/pd/doc/3.audio.examples/C02.sawtooth-foldover.pd new file mode 100644 index 00000000..f52fc548 --- /dev/null +++ b/pd/doc/3.audio.examples/C02.sawtooth-foldover.pd @@ -0,0 +1,39 @@ +#N canvas 180 71 562 473 12; +#X obj 155 348 output~; +#X text 310 443 updated for Pd version 0.37; +#X text 56 2 FOLDOVER IN SAWTOOTH WAVES; +#X obj 154 320 clip~ 0 1; +#X obj 155 153 mtof; +#X floatatom 155 131 3 0 0 0 - - -; +#X obj 155 269 *~ 20; +#X obj 155 295 -~ 19; +#X obj 155 177 phasor~; +#N canvas 0 0 560 183 /SUBPATCH/ 0; +#X obj 25 74 loadbang; +#X msg 25 99 61; +#X obj 25 124 outlet; +#X text 7 6 This sets the pitch initially to 61 when the patch is first +opened.; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 155 105 pd; +#X text 190 130 <--pitch; +#X obj 164 206 output~; +#X text 237 205 <--sawtooth amplitude; +#X text 233 373 <--pulse train amplitude; +#X text 28 406 We'll explain more about making pulses later on... this +example is mostly intended as ear training.; +#X text 19 23 In more ordinary kinds of waveforms \, foldover comes +across as a "cheap synth" sound. You can hear the foldover clearly +in the pulse train here \, and less clearly (but still audibly) in +the straight sawtooth \, especially at high pitches.; +#X connect 3 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 8 0; +#X connect 5 0 4 0; +#X connect 6 0 7 0; +#X connect 7 0 3 0; +#X connect 8 0 6 0; +#X connect 8 0 11 0; +#X connect 8 0 11 1; +#X connect 9 0 5 0; diff --git a/pd/doc/3.audio.examples/C03.zipper.noise.pd b/pd/doc/3.audio.examples/C03.zipper.noise.pd new file mode 100644 index 00000000..a49f51ad --- /dev/null +++ b/pd/doc/3.audio.examples/C03.zipper.noise.pd @@ -0,0 +1,55 @@ +#N canvas 298 115 555 414 12; +#X obj 42 349 output~; +#X text 302 376 updated for Pd version 0.37; +#X text 56 2 ZIPPER NOISE; +#X obj 43 321 *~; +#X obj 125 350 output~; +#X obj 126 322 *~; +#X obj 65 262 line; +#X obj 149 262 line~; +#N canvas 0 0 450 300 metro 0; +#X obj 88 39 loadbang; +#X msg 87 65 1; +#X obj 87 96 metro 500; +#X obj 87 131 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 87 153 sel 0 1; +#X obj 87 190 outlet; +#X obj 151 192 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 1 6 0; +#X restore 65 170 pd metro; +#X obj 65 198 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 132 199 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 65 219 1 300; +#X msg 132 221 0 300; +#X obj 72 290 osc~ 880; +#X text 30 28 Here is a related issue: if we use a (control) line object +to change an amplitude \, it sends ramping control messages \, once +every 20 msec by default. At left we use this to control the amplitude +of a sinusoid. In effect we're multiplying the sinusoid by a staircase +signal (50 increments per second.) Using the signal version \, line~ +\, fixes the problem. Line~ outputs a ramp that is incremented every +sample.; +#X connect 3 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 4 0; +#X connect 5 0 4 1; +#X connect 6 0 3 1; +#X connect 7 0 5 1; +#X connect 8 0 9 0; +#X connect 8 1 10 0; +#X connect 9 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 6 0; +#X connect 11 0 7 0; +#X connect 12 0 6 0; +#X connect 12 0 7 0; +#X connect 13 0 3 0; +#X connect 13 0 5 0; diff --git a/pd/doc/3.audio.examples/C04.control.to.signal.pd b/pd/doc/3.audio.examples/C04.control.to.signal.pd new file mode 100644 index 00000000..eed326dd --- /dev/null +++ b/pd/doc/3.audio.examples/C04.control.to.signal.pd @@ -0,0 +1,48 @@ +#N canvas 215 77 561 455 12; +#X text 14 7 CONVERTING CONTROL TO SIGNALS; +#X obj 29 350 output~; +#X obj 107 352 output~; +#N canvas 0 0 450 300 metro 0; +#X obj 88 39 loadbang; +#X msg 87 65 1; +#X obj 87 131 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 87 153 sel 0 1; +#X obj 87 190 outlet; +#X obj 151 192 outlet; +#X obj 87 96 metro 2; +#X connect 0 0 1 0; +#X connect 1 0 6 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X connect 6 0 2 0; +#X restore 30 242 pd metro; +#X msg 30 268 1 2; +#X msg 97 270 0 2; +#X obj 30 305 line~; +#X obj 108 306 vline~; +#X text 13 107 Here we try out line~ and vline~ as triangle wave generators. +The subpatch is still sending alternating bangs as in the last patch +\, but now at an audible frequency \, every 2 msec.; +#X text 17 172 The effect of line~ rounding breakpoints to the nearest +block (on the order of a millisecond) is that each 4-millisecond-long +cycle has a different shape. Using vline~ resolves the problem.; +#X text 385 437 Updated for Pd 0.37; +#X text 16 411 Sometimes you will want to use vline~ in place of sig~ +for the same reason.; +#X text 15 27 For controlling amplitudes \, line~ \, with its block-aligned +breakpoints \, is accurate enough for most purposes. But certain usages +\, such as this patch \, demand more accuracy. The vline~ object \, +somewhat more expensive than line~ \, can handle breakpoints to sub-sample +accuracy.; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X connect 4 0 6 0; +#X connect 4 0 7 0; +#X connect 5 0 6 0; +#X connect 5 0 7 0; +#X connect 6 0 1 0; +#X connect 6 0 1 1; +#X connect 7 0 2 0; +#X connect 7 0 2 1; diff --git a/pd/doc/3.audio.examples/C05.sampler.oneshot.pd b/pd/doc/3.audio.examples/C05.sampler.oneshot.pd new file mode 100644 index 00000000..f75d5517 --- /dev/null +++ b/pd/doc/3.audio.examples/C05.sampler.oneshot.pd @@ -0,0 +1,84 @@ +#N canvas 34 0 985 746 12; +#N canvas 0 0 450 300 graph1 0; +#X array tab28 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 740 126 graph; +#X obj 577 486 loadbang; +#X obj 31 340 hip~ 5; +#X obj 587 345 adc~ 1; +#X obj 587 375 hip~ 5; +#X msg 558 306 bang; +#X text 681 492 v-- re-read the original sample; +#X text 20 6 ONE-SHOT SAMPLER USING LINE~ AS PHASE; +#X obj 31 306 *~; +#X obj 71 279 r cutoff; +#X obj 31 194 r phase; +#X msg 24 37 bang; +#X obj 124 92 delay 5; +#X text 77 37 <-- play the sample; +#X msg 24 128 \; cutoff 0 5; +#X text 34 85 cut the; +#X text 34 104 sound off; +#X text 204 77 Wait for the; +#X text 202 97 cutoff to finish; +#X text 349 121 set the upper line~ to start; +#X text 349 140 at the first sample and go; +#X text 348 161 forever (until the next trigger); +#X text 18 486 To start a note \, first we have to mute the output +in case ther's already something playing---otherwise we'll get a click. +The "cutoff" line~ then takes 5 msec to get to zero. After that amount +of delay \, we reset the phase to sample number 1 and set it in motion. +We want the line~ output to increase by 1 each sample of output \, +so we ask for it to do 4.41e+08 samples in 1e+07 milliseconds.; +#X text 18 602 The cutoff mechanism is still safe if we happen to ask +for two notes in under 5 msec. The second request would reset the delay +\, so that there's no way the delay can possibly fire without the cutoff +line~ at zero.; +#X text 596 305 <-- record; +#X obj 622 405 line~; +#X obj 587 410 *~; +#X text 738 267 ------ 4 seconds ------; +#X obj 655 342 del 3990; +#X msg 655 370 0 10; +#X text 706 371 <--stop recording; +#X text 19 672 We avoid clicking at the end of the table by getting +the table's own contents to go smoothly to zero. To do this we added +a level control to the recording patch that cuts off just before the +recording reaches the end of the table.; +#X text 576 599 this is.; +#X text 578 575 My apologies to Jonathan Harvey whose bell; +#X obj 577 545 soundfiler; +#X text 19 443 Here's how to make a sampler with a line~ object \, +instead of a phasor~ \, to generate the read location signal.; +#X obj 71 306 vline~; +#X obj 30 369 output~; +#X obj 31 224 vline~; +#X obj 558 439 tabwrite~ tab28; +#X msg 577 516 read ../sound/bell.aiff tab28; +#X obj 31 254 tabread4~ tab28; +#X msg 124 127 \; phase 1 \, 4.41e+08 1e+07 \; cutoff 1; +#X msg 497 386 0 \, 1 5; +#X text 719 717 updated for Pd version 0.37; +#X connect 1 0 40 0; +#X connect 2 0 37 0; +#X connect 2 0 37 1; +#X connect 3 0 4 0; +#X connect 4 0 26 0; +#X connect 5 0 28 0; +#X connect 5 0 43 0; +#X connect 5 0 39 0; +#X connect 8 0 2 0; +#X connect 9 0 36 0; +#X connect 10 0 38 0; +#X connect 11 0 14 0; +#X connect 11 0 12 0; +#X connect 12 0 42 0; +#X connect 25 0 26 1; +#X connect 26 0 39 0; +#X connect 28 0 29 0; +#X connect 29 0 25 0; +#X connect 36 0 8 1; +#X connect 38 0 41 0; +#X connect 40 0 34 0; +#X connect 41 0 8 0; +#X connect 43 0 25 0; diff --git a/pd/doc/3.audio.examples/C06.signal.to.control.pd b/pd/doc/3.audio.examples/C06.signal.to.control.pd new file mode 100644 index 00000000..1c3e4bf0 --- /dev/null +++ b/pd/doc/3.audio.examples/C06.signal.to.control.pd @@ -0,0 +1,25 @@ +#N canvas 215 77 561 455 12; +#N canvas 0 0 269 179 metro 0; +#X obj 88 39 loadbang; +#X msg 87 65 1; +#X obj 87 128 outlet; +#X obj 87 96 metro 100; +#X msg 178 70 \; pd dsp 1; +#X connect 0 0 1 0; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X restore 41 247 pd metro; +#X text 374 425 Updated for Pd 0.37; +#X obj 41 316 snapshot~; +#X obj 66 286 phasor~ 1; +#X floatatom 41 347 5 0 0 0 - - -; +#X text 14 7 CONVERTING SIGNALS TO CONTROLS; +#X text 15 35 The snapshot~ object allows you to convert from signals +back to control streams (float messages) -- an opposite of signal~. +The value output is always the end of the most recently computed audio +block \, so that even if you bang it metronomically (as here) it need +not give you samples that are exactly evenly spaced.; +#X connect 0 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 2 0; diff --git a/pd/doc/3.audio.examples/C07.envelope.follower.pd b/pd/doc/3.audio.examples/C07.envelope.follower.pd new file mode 100644 index 00000000..51f8f56b --- /dev/null +++ b/pd/doc/3.audio.examples/C07.envelope.follower.pd @@ -0,0 +1,113 @@ +#N canvas 66 7 617 909 12; +#X text 164 5 ENVELOPE FOLLOWERS; +#X text 10 25 The env~ object reports ths RMS signal level over the +last 256 samples (by default) or any other power of 2 that's at least +twice the block size. The analysis is done in an overlapped fashion +so that results appear every N/2 points if N is the analysis window +size. So the larger the window \, the stabler the result and the less +frequently it appears. Computation time doesn't depend heavily on N. +; +#X text 11 135 Envelope followers are frequently used to detect attacks +and periods of silence. (There are fancier attack detectors out there +\, though.) Here is a simple threshold-based attack and rest detector. +; +#X obj 102 297 dbtorms; +#X obj 23 293 osc~ 440; +#X obj 23 339 env~; +#X floatatom 78 329 0 0 0 0 - - -; +#X floatatom 102 274 0 0 0 0 - - -; +#X msg 451 320 \; pd dsp 1; +#X obj 119 380 t b f; +#X floatatom 119 403 0 0 0 0 - - -; +#X obj 126 458 pack; +#X obj 126 481 route 0 1; +#X obj 126 504 > 55; +#X obj 176 504 < 45; +#X obj 126 527 sel 1; +#X obj 176 527 sel 1; +#X msg 90 538 1; +#X msg 90 516 0; +#X obj 126 564 print attack; +#X obj 119 435 != 0; +#X obj 24 612 t b f; +#X floatatom 15 638 0 0 0 0 - - -; +#X obj 27 688 pack; +#X obj 27 711 route 0 1; +#X obj 27 749 sel 1; +#X msg 6 856 1; +#X msg 7 879 0; +#X obj 20 666 != 0; +#X obj 58 639 < 45; +#X obj 31 783 timer; +#X obj 113 712 sel 0; +#X obj 95 832 sel 0; +#X obj 45 832 sel 1; +#X obj 45 873 print rest; +#X obj 31 806 > 1000; +#X text 162 403 state -- 1 if waiting for low threshold \,; +#X text 199 418 0 if we've attained it and now want the; +#X text 202 434 high one.; +#X text 209 480 route the RMS value according to state; +#X text 239 506 if off \, 55 dB means attack. If on \, 45; +#X text 240 527 dB or less means state changes to off.; +#X text 132 359 ATTACK DETECTION; +#X text 40 594 REST DETECTION; +#X text 100 637 Here we always will test RMS against a low value; +#X text 125 654 but as before we route the result according to; +#X text 147 671 our state \, 1 if "resting" \, 0 if not.; +#X text 163 709 regardless of state \, when RMS isn't low; +#X text 185 724 reset the timer; +#X text 202 846 RMS isn't low enough.; +#X text 120 744 If we're not in rest \, and the RMS is low \,; +#X text 143 761 check elapsed time sinse RMS last wasn't low.; +#X text 122 802 If more than 1 second \, report a rest.; +#X text 170 828 If we're at rest \, pop out of it when; +#X text 11 201 Both detectors are state machines with two states \, +on and off. If on \, a test is run to determine whether to turn off +\, and vice versa. The tests are run at each output of the rms~ object. +; +#X text 355 884 updated for Pd version 0.37; +#X text 109 320 note 3.01 dB difference between; +#X text 113 336 peak and RMS amplitudes.; +#X obj 451 297 loadbang; +#X obj 23 316 *~; +#X connect 3 0 59 1; +#X connect 4 0 59 0; +#X connect 5 0 6 0; +#X connect 5 0 9 0; +#X connect 5 0 21 0; +#X connect 7 0 3 0; +#X connect 9 0 10 0; +#X connect 9 1 11 1; +#X connect 10 0 20 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 12 1 14 0; +#X connect 13 0 15 0; +#X connect 14 0 16 0; +#X connect 15 0 17 0; +#X connect 15 0 19 0; +#X connect 16 0 18 0; +#X connect 17 0 10 0; +#X connect 18 0 10 0; +#X connect 20 0 11 0; +#X connect 21 0 22 0; +#X connect 21 1 29 0; +#X connect 22 0 28 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 24 1 32 0; +#X connect 25 0 30 1; +#X connect 26 0 22 0; +#X connect 27 0 22 0; +#X connect 28 0 23 0; +#X connect 29 0 23 1; +#X connect 29 0 31 0; +#X connect 30 0 35 0; +#X connect 31 0 30 0; +#X connect 32 0 27 0; +#X connect 33 0 26 0; +#X connect 33 0 34 0; +#X connect 35 0 33 0; +#X connect 58 0 8 0; +#X connect 59 0 5 0; diff --git a/pd/doc/3.audio.examples/C08.analog.sequencer.pd b/pd/doc/3.audio.examples/C08.analog.sequencer.pd new file mode 100644 index 00000000..9ee9e6de --- /dev/null +++ b/pd/doc/3.audio.examples/C08.analog.sequencer.pd @@ -0,0 +1,156 @@ +#N canvas 46 22 825 554 12; +#N canvas 0 0 450 300 graph1 0; +#X array 29-sequence 9 float 1; +#A 0 55 550 385 495 165 385 495 275 615; +#X coords 0 500 8 0 200 100 1; +#X restore 621 42 graph; +#X obj 27 426 *~; +#X obj 27 454 hip~ 5; +#N canvas 0 0 450 300 graph1 0; +#X array 29-envelope 103 float 1; +#A 0 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1.01111 1 0.988889 0.977778 +0.966667 0.955556 0.944444 0.933333 0.922222 0.911111 0.9 0.888889 +0.797778 0.737777 0.677777 0.647777 0.617777 0.557777 0.487777 0.467777 +0.447776 0.417776 0.397776 0.387776 0.377776 0.367776 0.347776 0.327776 +0.317776 0.297776 0.277776 0.267776 0.257776 0.257776 0.277776 0.297776 +0.327776 0.357776 0.377776 0.397776 0.407776 0.427776 0.437776 0.387776 +0.367776 0.347776 0.337776 0.287776 0.277776 0.277776 0.277776 0.267776 +0.267776 0.267776 0.297776 0.317776 0.347776 0.367776 0.367776 0.357776 +0.347776 0.337776 0.307776 0.287776 0.257776 0.227776 0.197776 0.167776 +0.167776 0.167776 0.167776 0.167776 0.157776 0.157776 0.157776 0.157776 +0.147776 0.147776 0.147776 0.137776 0.137776 0.111111 0.1 0.0888889 +0.0777778 0.0666667 0.0555556 0.0444444 0.0333333 0.0222222 0.0111111 +0 -0.0111111; +#X coords 0 1 102 0 200 100 1; +#X restore 622 146 graph; +#N canvas 0 0 450 300 graph1 0; +#X array 29-sample 259 float 1; +#A 0 0.989177 1 0.989177 0.95694 0.903989 0.83147 0.740952 0.634394 +0.514103 0.382684 0.242981 0.0980184 -0.0490663 -0.195089 -0.336888 +-0.471395 -0.595698 -0.707105 -0.803206 -0.88192 -0.941543 -0.980785 +-0.998795 -0.995185 -0.970032 -0.923881 -0.85773 -0.773013 -0.671561 +-0.555573 -0.427558 -0.290288 -0.146734 -3.98038e-06 0.146726 0.290281 +0.427551 0.555566 0.671556 0.773007 0.857726 0.923878 0.97003 0.995184 +0.998796 0.980786 0.941546 0.881924 0.803211 0.707111 0.595704 0.471402 +0.336896 0.195097 0.0490743 -0.0980105 -0.242974 -0.382677 -0.514097 +-0.634388 -0.740946 -0.831465 -0.903986 -0.956938 -0.989175 -1 -0.989178 +-0.956943 -0.903993 -0.831474 -0.740957 -0.6344 -0.51411 -0.382692 +-0.242989 -0.0980263 0.0490584 0.195081 0.336881 0.471388 0.595691 +0.7071 0.803202 0.881916 0.941541 0.980783 0.998795 0.995186 0.970034 +0.923884 0.857734 0.773018 0.671567 0.55558 0.427566 0.290296 0.146742 +1.19412e-05 -0.146719 -0.290273 -0.427544 -0.55556 -0.67155 -0.773002 +-0.857722 -0.923875 -0.970028 -0.995183 -0.998796 -0.980788 -0.941549 +-0.881928 -0.803216 -0.707117 -0.595711 -0.471409 -0.336903 -0.195104 +-0.0490822 0.0980025 0.242966 0.38267 0.51409 0.634382 0.740941 0.831461 +0.903983 0.956936 0.989174 1 0.989179 0.956945 0.903996 0.831479 0.740962 +0.634406 0.514117 0.382699 0.242997 0.0980342 -0.0490504 -0.195073 +-0.336873 -0.471381 -0.595685 -0.707094 -0.803197 -0.881913 -0.941538 +-0.980782 -0.998795 -0.995187 -0.970036 -0.923887 -0.857738 -0.773023 +-0.671573 -0.555586 -0.427573 -0.290303 -0.14675 -1.99019e-05 0.146711 +0.290265 0.427537 0.555553 0.671544 0.772997 0.857718 0.923872 0.970026 +0.995183 0.998797 0.980789 0.941551 0.881931 0.803221 0.707122 0.595717 +0.471416 0.336911 0.195112 0.0490902 -0.0979946 -0.242958 -0.382662 +-0.514083 -0.634375 -0.740936 -0.831457 -0.903979 -0.956933 -0.989173 +-1 -0.98918 -0.956947 -0.904 -0.831483 -0.740968 -0.634412 -0.514124 +-0.382706 -0.243004 -0.0980421 0.0490425 0.195065 0.336866 0.471374 +0.595679 0.707088 0.803192 0.881909 0.941535 0.98078 0.998794 0.995187 +0.970038 0.92389 0.857742 0.773028 0.671579 0.555593 0.42758 0.290311 +0.146758 2.78627e-05 -0.146703 -0.290258 -0.42753 -0.555547 -0.671538 +-0.772992 -0.857714 -0.923868 -0.970024 -0.995182 -0.998797 -0.980791 +-0.941554 -0.881935 -0.803225 -0.707128 -0.595723 -0.471423 -0.336918 +-0.19512 -0.0490981 0.0979867 0.24295 0.382655 0.514076 0.634369 0.74093 +0.831452 0.903976 0.956931 0.989172 1 0.989181; +#X coords 0 1 258 -1 200 100 1; +#X restore 619 281 graph; +#X text 566 533 updated for Pd version 0.37; +#X obj 26 218 tabread~ 29-sequence; +#X obj 106 241 wrap~; +#X obj 106 265 *~ 100; +#X obj 106 289 +~ 1; +#X obj 26 242 phasor~; +#X obj 26 266 -~ 0.5; +#X obj 27 377 cos~; +#X obj 84 336 *~; +#X obj 28 488 output~; +#X obj 84 408 tabread4~ 29-sample; +#X obj 106 313 tabread4~ 29-envelope; +#X obj 84 360 *~ 128; +#X obj 84 384 +~ 129; +#X obj 27 401 +~ 1; +#X obj 26 194 *~ 9; +#N canvas 328 85 609 424 make-tables 0; +#X msg 109 52 bang; +#X obj 109 77 t b b; +#X obj 152 134 f; +#X obj 190 134 + 1; +#X msg 174 106 0; +#X obj 109 103 until; +#X obj 152 162 t f f; +#X obj 27 190 moses 10; +#X obj 18 272 tabwrite 29-envelope; +#X obj 75 159 sel 102; +#X obj 23 218 expr ($f1-1)/10; +#X obj 35 243 expr (101-$f1)/90; +#X msg 120 380 \; 29-sample cosinesum 256 0 0 0 0 0 0 1; +#X msg 120 338 \; 29-sequence 0 55 550 385 495 165 385 495 275 615 +; +#X text 30 8 bang to recalculate the envelope table (I did this but +then went in and changed it with the mouse afterward.); +#X text 84 299 The sequence is just a list of specified frequencies +\; the wavetable is a cosine.; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 8 1; +#X connect 7 0 10 0; +#X connect 7 1 11 0; +#X connect 9 0 5 1; +#X connect 10 0 8 0; +#X connect 11 0 8 0; +#X restore 689 401 pd make-tables; +#X text 46 1 ANALOG-SYNTH-STYLE SEQUENCER; +#X obj 26 170 phasor~ 0.6; +#X text 27 27 Some control operations can be carried out entirely by +tilde objects passing audio signals around. Here is an imitation of +an analog sequencer and envelope generator. A phasor~ loops through +the "sequence" table at 0.6 Hz \, generating 9 frequencies. Simultaneously +\, by multiplying by 9 and wrapping \, we create a sawtooth at 9*0.6=5.4 +Hz \, which reads a second table for an envelope shape. This becomes +the grain size for a samplerbased on the 18.sampler.looped example +earlier.; +#X text 97 194 main loop: sawtooth of amplitude 9; +#X text 218 219 read frequency sequence; +#X text 162 241 9x original frequency sawtooth; +#X text 173 266 adjust for reading; +#X text 346 266 envelope sample; +#X text 123 336 multiply envelope by audio-frequency sawtooth; +#X text 147 361 adjust amplitude and center for wavetable; +#X text 62 428 multiply by raised-cosine smoothing function; +#X text 478 401 how to make the tables:; +#X connect 1 0 2 0; +#X connect 2 0 14 0; +#X connect 2 0 14 1; +#X connect 6 0 10 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 16 0; +#X connect 10 0 11 0; +#X connect 11 0 13 0; +#X connect 11 0 12 0; +#X connect 12 0 19 0; +#X connect 13 0 17 0; +#X connect 15 0 1 1; +#X connect 16 0 13 1; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 19 0 1 0; +#X connect 20 0 6 0; +#X connect 20 0 7 0; +#X connect 23 0 20 0; diff --git a/pd/doc/3.audio.examples/C09.sample.hold.pd b/pd/doc/3.audio.examples/C09.sample.hold.pd new file mode 100644 index 00000000..dc41aacd --- /dev/null +++ b/pd/doc/3.audio.examples/C09.sample.hold.pd @@ -0,0 +1,104 @@ +#N canvas 120 85 930 452 12; +#N canvas 0 0 450 300 graph1 0; +#X array samphold 44100 float 0; +#X coords 0 1 44100 0 300 200 1; +#X restore 606 36 graph; +#N canvas 0 0 439 429 tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 78 55 graph; +#X text 280 148 0; +#X text 282 48 10; +#X text 97 158 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 85 232 graph; +#X text 95 340 ------ 130 samples ------; +#X text 294 325 0; +#X text 296 225 12000; +#X restore 648 280 pd tables; +#X text 67 8 SAMPLE AND HOLD; +#X obj 141 266 phasor~ 5; +#X obj 44 241 phasor~ 7; +#X obj 44 266 samphold~; +#X floatatom 44 216 0 0 0 0 - - -; +#X floatatom 141 211 0 0 0 0 - - -; +#X obj 216 319 tabwrite~ samphold; +#X msg 216 294 bang; +#X obj 44 341 tabread4~ mtof; +#X obj 44 291 *~ 48; +#X obj 44 316 +~ 36; +#X obj 44 366 osc~; +#X msg 216 236 0; +#X text 259 293 <--graph output; +#X obj 44 191 unpack; +#X text 254 233 <-- reset phase; +#X msg 311 131 32 96.33; +#X msg 124 131 5 7; +#X msg 44 131 1 5; +#X msg 78 131 2 11; +#X msg 161 131 3.7 8.8; +#X msg 235 131 3.4 8.9; +#X text 16 31 Another analog favorite \, the sample and hold unit freezes +an audio signal on command. In the Pd version \, the second input of +samphold~ triggers it \, and the first input becomes the output's new +value whenever the trigger decreases from one sample to the next. This +is ideal for updating values when a phasor wraps around.; +#X text 679 428 updated for Pd version 0.37; +#X obj 44 392 output~; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 11 0; +#X connect 5 0 8 0; +#X connect 6 0 4 0; +#X connect 7 0 3 0; +#X connect 9 0 8 0; +#X connect 10 0 13 0; +#X connect 11 0 12 0; +#X connect 12 0 10 0; +#X connect 13 0 26 0; +#X connect 13 0 26 1; +#X connect 14 0 3 1; +#X connect 14 0 4 1; +#X connect 16 0 6 0; +#X connect 16 1 7 0; +#X connect 18 0 16 0; +#X connect 19 0 16 0; +#X connect 20 0 16 0; +#X connect 21 0 16 0; +#X connect 22 0 16 0; +#X connect 23 0 16 0; diff --git a/pd/doc/3.audio.examples/C10.monophonic.synth.pd b/pd/doc/3.audio.examples/C10.monophonic.synth.pd new file mode 100644 index 00000000..66b14564 --- /dev/null +++ b/pd/doc/3.audio.examples/C10.monophonic.synth.pd @@ -0,0 +1,107 @@ +#N canvas 57 27 578 769 12; +#X obj 13 514 mtof; +#X obj 13 463 stripnote; +#X obj 164 519 select; +#X obj 155 413 float; +#X obj 164 381 t b f; +#X obj 164 487 float; +#X text 217 367 f - store pitch below; +#X text 209 415 velocity stored here; +#X text 128 459 off; +#X text 216 486 recall pitch; +#X text 132 2 MONOPHONIC MIDI SYNTH; +#X obj 13 340 unpack; +#X obj 13 273 notein; +#X obj 13 300 pack; +#X obj 94 570 line~; +#X msg 94 544 \$1 100; +#X msg 164 545 0 1000; +#X text 15 75 First \, at top \, incoming MIDI notes are parsed and +used to set pitch and trigger an ADSR envelope. Second \, the envelope +generator itself has been extended to offer controls over the time +and target values via number boxes.; +#X text 17 21 This patch shows how to make a monophonic synthesizer +that could be controlled from a MIDI or voltage-control keyboard--in +this example we assume MIDI.; +#X msg 152 290 55 64; +#X msg 152 316 55 0; +#X msg 95 291 48 64; +#X msg 95 317 48 0; +#X text 14 142 The note-off testing is complicated by the fact that +we have to test both that the velocity is zero \, and further that +the note-off pitch matches the pitch that is now playing (the most +recent note-on pitch.); +#X text 218 387 b - bang to recall velocity; +#X obj 155 442 sel 0; +#X text 177 463 on; +#X obj 16 712 output~; +#X obj 15 688 hip~ 5; +#X obj 14 642 *~; +#X obj 13 541 phasor~; +#X obj 13 565 -~ 0.5; +#X obj 14 593 cos~; +#X obj 102 617 *~; +#X obj 14 617 +~ 1; +#X text 332 741 updated for Pd version 0.37; +#X obj 102 665 cos~; +#X msg 95 268 48 128; +#X text 18 491 pitch; +#X text 19 443 messages; +#X text 210 441 test for note on or off; +#X text 227 520 test against latest; +#X text 270 535 note-on pitch; +#X text 18 407 filter; +#X text 19 425 note-on; +#X obj 15 664 *~; +#X obj 94 517 / 127; +#X text 14 208 The synthesis technique is the same as in the previous +patch \, done in a simpler (but less general) way with a cos~ object +replacing the wavetable lookup.; +#X text 148 571 envelope generator now controls amplitude; +#X text 317 589 as well as grain size; +#X obj 102 641 *~ 2; +#X obj 123 594 +~ 0.5; +#X text 148 687 The +~ 0.5 and *~ 2 are fudge factors.; +#X text 148 648 This replaces the tabread4~; +#X text 146 668 in the previous patch.; +#X text 211 290 These buttons simulate MIDI input.; +#X connect 0 0 30 0; +#X connect 1 0 2 1; +#X connect 1 0 0 0; +#X connect 2 0 16 0; +#X connect 3 0 25 0; +#X connect 4 0 3 0; +#X connect 4 1 5 1; +#X connect 5 0 2 0; +#X connect 11 0 1 0; +#X connect 11 0 4 0; +#X connect 11 1 1 1; +#X connect 11 1 3 1; +#X connect 12 0 13 0; +#X connect 12 1 13 1; +#X connect 13 0 11 0; +#X connect 14 0 45 1; +#X connect 14 0 51 0; +#X connect 15 0 14 0; +#X connect 16 0 14 0; +#X connect 19 0 11 0; +#X connect 20 0 11 0; +#X connect 21 0 11 0; +#X connect 22 0 11 0; +#X connect 25 0 5 0; +#X connect 25 1 46 0; +#X connect 28 0 27 0; +#X connect 28 0 27 1; +#X connect 29 0 45 0; +#X connect 30 0 31 0; +#X connect 31 0 33 0; +#X connect 31 0 32 0; +#X connect 32 0 34 0; +#X connect 33 0 50 0; +#X connect 34 0 29 0; +#X connect 36 0 29 1; +#X connect 37 0 11 0; +#X connect 45 0 28 0; +#X connect 46 0 15 0; +#X connect 50 0 36 0; +#X connect 51 0 33 1; diff --git a/pd/doc/3.audio.examples/D01.envelope.gen.pd b/pd/doc/3.audio.examples/D01.envelope.gen.pd new file mode 100644 index 00000000..61e7a6d7 --- /dev/null +++ b/pd/doc/3.audio.examples/D01.envelope.gen.pd @@ -0,0 +1,90 @@ +#N canvas 173 105 609 433 12; +#X floatatom 96 358 0 0 100; +#N canvas 448 68 641 420 output 0; +#X obj 430 203 t b; +#X obj 430 143 f; +#X obj 430 83 inlet; +#X obj 430 233 f; +#X msg 541 225 0; +#X msg 430 113 bang; +#X obj 430 173 moses 1; +#X obj 496 151 moses 1; +#X obj 107 174 dbtorms; +#X obj 496 121 r master-lvl; +#X obj 107 56 r master-lvl; +#X obj 430 263 s master-lvl; +#X obj 36 202 inlet~; +#X obj 251 229 inlet; +#X obj 269 257 s master-lvl; +#X msg 119 85 set \$1; +#X obj 119 115 outlet; +#X msg 251 283 \; pd dsp 1; +#X obj 107 236 line~; +#X obj 36 258 *~; +#X obj 36 290 dac~; +#X obj 107 204 pack 0 50; +#X text 23 179 audio in; +#X text 2 313 out both channels; +#X obj 36 231 hip~ 1; +#X obj 541 194 t b; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 2 0 5 0; +#X connect 3 0 11 0; +#X connect 4 0 11 0; +#X connect 5 0 1 0; +#X connect 6 0 0 0; +#X connect 6 1 25 0; +#X connect 7 1 3 1; +#X connect 8 0 21 0; +#X connect 9 0 1 1; +#X connect 9 0 7 0; +#X connect 10 0 8 0; +#X connect 10 0 15 0; +#X connect 12 0 24 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 15 0 16 0; +#X connect 18 0 19 1; +#X connect 19 0 20 0; +#X connect 19 0 20 1; +#X connect 21 0 18 0; +#X connect 24 0 19 0; +#X connect 25 0 4 0; +#X restore 58 391 pd output; +#X msg 134 359 MUTE; +#X msg 247 180 bang; +#X msg 328 180 bang; +#X text 244 152 attack; +#X text 325 150 release; +#X obj 247 281 line~; +#X msg 328 254 0 500; +#X text 134 10 ENVELOPE GENERATORS; +#X obj 58 246 phasor~ 50; +#X obj 58 301 *~; +#X obj 58 328 wrap~; +#X msg 247 248 1 2500; +#X obj 58 275 -~ 0.5; +#X msg 179 247 10 200; +#X obj 247 221 del 200; +#X text 349 405 updated for Pd version 0.34; +#X text 39 35 This patch uses an envelope generator to control a sound. +When you hit "attack" two things happen. First \, the line~ object +rises to 10 in 200 milliseconds. Then after a "delay" of the same 200 +msec \, the second message sends the line~ back down to 1 over another +2500 msec. The "release" just ramps us down to zero at the end.; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 15 0; +#X connect 3 0 16 0; +#X connect 4 0 8 0; +#X connect 7 0 11 1; +#X connect 8 0 7 0; +#X connect 10 0 14 0; +#X connect 11 0 12 0; +#X connect 12 0 1 0; +#X connect 13 0 7 0; +#X connect 14 0 11 0; +#X connect 15 0 7 0; +#X connect 16 0 13 0; diff --git a/pd/doc/3.audio.examples/D02.adsr.pd b/pd/doc/3.audio.examples/D02.adsr.pd new file mode 100644 index 00000000..06fa21b7 --- /dev/null +++ b/pd/doc/3.audio.examples/D02.adsr.pd @@ -0,0 +1,34 @@ +#N canvas 141 83 672 516 12; +#X text 412 489 updated for Pd version 0.26; +#X graph graph1 0 -1.02 44100 1.02 395 235 595 105; +#X array adsr-output 44100 float 0; +#X pop; +#X text 394 244 ------ 1 second ------; +#X obj 32 74 r trigger; +#X obj 32 148 tabwrite~ adsr-output; +#X obj 54 123 r graphit; +#X msg 31 176 bang; +#X text 75 177 <-- attack and delayed release; +#X obj 42 200 del 500; +#X text 146 283 <-- attack only; +#X msg 31 264 \; pd dsp 1 \; trigger 1 \; graphit bang; +#X text 147 360 <-- release only; +#X msg 30 334 \; pd dsp 1 \; trigger 0 \; graphit bang; +#X msg 42 225 \; trigger 0; +#X text 598 221 -1; +#X text 600 96 1; +#X text 35 24 This patch introduces a simple "adsr" abstraction we'll +use frequently. You can click on the "adsr" object to see what's inside. +; +#X text 30 402 The active ingredient of the ADSR envelope generator +is a single line~ which gets passed messages to make the attack and +release behavior. You can retrigger the ADSR envelope generator all +you wish without having to wait for attacks or releases to finish; +#X text 104 5 ENVELOPE GENERATOR ABSTRACTION; +#X obj 32 100 adsr 1 100 200 50 300; +#X connect 3 0 19 0; +#X connect 5 0 4 0; +#X connect 6 0 10 0; +#X connect 6 0 8 0; +#X connect 8 0 13 0; +#X connect 19 0 4 0; diff --git a/pd/doc/3.audio.examples/D03.envelope.dB.pd b/pd/doc/3.audio.examples/D03.envelope.dB.pd new file mode 100644 index 00000000..8ec1d1ae --- /dev/null +++ b/pd/doc/3.audio.examples/D03.envelope.dB.pd @@ -0,0 +1,158 @@ +#N canvas 112 44 674 673 12; +#X obj 32 80 r trigger; +#X text 85 8 USING ADSR'S OUTPUT AS dB; +#X text 34 28 For natural sounding amplitude control \, you will want +to use the ADSR's output as log amplitude. In practice this is best +done using a lookup table:; +#X obj 32 131 tabread4~ dbtorms; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 387 83 graph; +#N canvas 461 495 663 358 make-table 0; +#X obj 97 195 moses 2; +#X msg 81 44 bang; +#X obj 81 73 t b b; +#X obj 152 134 f; +#X obj 190 134 + 1; +#X msg 174 106 0; +#X obj 81 102 until; +#X obj 73 162 sel 122; +#X msg 97 226 0; +#X obj 141 227 dbtorms; +#X obj 152 162 t f f; +#X obj 97 259 tabwrite dbtorms; +#X floatatom 435 103 0 0 0; +#X floatatom 435 186 0 0 0; +#X obj 435 157 tabread4 dbtorms; +#X floatatom 331 183 0 0 0; +#X obj 331 154 dbtorms; +#X text 35 12 bang to recalculate the table; +#X text 268 62 check accuracy of reading table against; +#X text 268 81 the "real" dbtorms object.; +#X connect 0 0 8 0; +#X connect 0 1 9 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 2 1 5 0; +#X connect 3 0 4 0; +#X connect 3 0 7 0; +#X connect 3 0 10 0; +#X connect 4 0 3 1; +#X connect 5 0 3 1; +#X connect 6 0 3 0; +#X connect 7 0 6 1; +#X connect 8 0 11 0; +#X connect 9 0 11 0; +#X connect 10 0 0 0; +#X connect 10 1 11 1; +#X connect 12 0 14 0; +#X connect 12 0 16 0; +#X connect 14 0 13 0; +#X connect 16 0 15 0; +#X restore 288 328 pd make-table; +#X text 258 299 here's the patch I used to make the table:; +#X obj 48 156 osc~ 440; +#X text 589 176 0; +#X text 590 77 10; +#X text 406 186 ------ 123 samples ------; +#X floatatom 61 204 0 0 0; +#N canvas 159 26 532 285 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X obj 425 153 t b; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 26 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 21 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 5 0; +#X restore 32 232 pd output; +#X msg 108 205 MUTE; +#X text 149 204 <-- output amplitude; +#X text 112 276 <-- attack; +#X text 113 333 <-- release; +#X msg 32 319 \; pd dsp 1 \; trigger 0; +#X obj 32 182 *~; +#X msg 31 264 \; pd dsp 1 \; trigger 1; +#X text 29 431 Notice how the attack sounds different when you retrigger +than when you start from zero. This is because if you go from the steady +state you only rise 30 dB instead of 100 \, so it sounds slower.; +#X obj 32 106 adsr 100 100 200 70 300; +#X text 29 381 The table is indexed from 1 to 120 so that 1 gives a +true zero out and 120 gives 10 (a 20 dB boost.) The extra 20 dB are +for headroom.; +#X text 28 498 If this is a problem you have at least 2 ways of dealing +with it. The best might be to adjust the attack time inside the abstraction +using snapshot~ to find out where you're slewing from \, as demonstrated +in the next patch.; +#X text 406 631 updated for Pd version 0.35; +#X text 28 568 There's also a "real" dbtorms~ object... but it's almost +certainly much more compute-intensive than tabread4~ \, since it has +to call a library "exp" function.; +#X connect 0 0 21 0; +#X connect 3 0 18 0; +#X connect 7 0 18 1; +#X connect 11 0 12 1; +#X connect 12 0 11 0; +#X connect 13 0 12 2; +#X connect 18 0 12 0; +#X connect 21 0 3 0; diff --git a/pd/doc/3.audio.examples/D04.envelope.pitch.pd b/pd/doc/3.audio.examples/D04.envelope.pitch.pd new file mode 100644 index 00000000..43fbe5bc --- /dev/null +++ b/pd/doc/3.audio.examples/D04.envelope.pitch.pd @@ -0,0 +1,209 @@ +#N canvas 222 84 686 544 12; +#X obj 48 106 r trigger; +#X obj 48 154 tabread4~ dbtorms; +#X floatatom 86 232 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 48 258 pd output; +#X msg 124 232 MUTE; +#X text 166 231 <-- output amplitude; +#X text 141 298 <-- attack; +#X text 568 305 <-- release; +#X obj 48 208 *~; +#N canvas 151 343 812 522 make-table 0; +#X msg 82 49 bang; +#X obj 82 78 t b b; +#X obj 141 142 f; +#X obj 179 142 + 1; +#X msg 150 112 0; +#X obj 82 107 until; +#X obj 141 176 t f f; +#X floatatom 369 67 0 0 0; +#X floatatom 369 127 0 0 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 538 298 graph; +#X text 740 391 0; +#X text 742 291 10; +#X text 544 403 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 537 130 graph; +#X obj 283 102 mtof; +#X floatatom 282 127 0 0 0; +#X text 541 237 ------ 130 samples ------; +#X text 746 223 0; +#X text 748 123 12000; +#X obj 81 203 mtof; +#X obj 72 167 sel 129; +#X obj 80 229 tabwrite mtof; +#X obj 369 99 tabread4 mtof; +#X obj 71 418 moses 2; +#X msg 55 267 bang; +#X obj 55 296 t b b; +#X obj 126 357 f; +#X obj 164 357 + 1; +#X msg 148 329 0; +#X obj 55 325 until; +#X obj 47 385 sel 122; +#X msg 71 449 0; +#X obj 115 450 dbtorms; +#X obj 126 385 t f f; +#X obj 71 482 tabwrite dbtorms; +#X text 312 40 ... and test accuracy; +#X text 23 15 patch to recalculate the mtof table; +#X text 107 267 bang to recalculate dbtorms table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 20 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 19 0; +#X connect 6 1 21 1; +#X connect 7 0 14 0; +#X connect 7 0 22 0; +#X connect 14 0 15 0; +#X connect 19 0 21 0; +#X connect 20 0 5 1; +#X connect 22 0 8 0; +#X connect 23 0 31 0; +#X connect 23 1 32 0; +#X connect 24 0 25 0; +#X connect 25 0 29 0; +#X connect 25 1 28 0; +#X connect 26 0 27 0; +#X connect 26 0 30 0; +#X connect 26 0 33 0; +#X connect 27 0 26 1; +#X connect 28 0 26 1; +#X connect 29 0 26 0; +#X connect 30 0 29 1; +#X connect 31 0 34 0; +#X connect 32 0 34 0; +#X connect 33 0 23 0; +#X connect 33 1 34 1; +#X restore 451 222 pd make-table; +#X text 35 6 PITCH ENVELOPES; +#X text 125 24 For pitch envelopes \, unlike amplitude envelopes \, +discontinuities are allowed and sometimes you would rather the envelope +generator actually jump to zero when it's triggered. The "adsr" object +does this for you if you send a negative trigger instead of a positive +one:; +#X obj 280 106 r trigger2; +#X obj 280 178 tabread4~ mtof; +#X obj 280 202 osc~; +#X msg 46 288 \; pd dsp 1 \; trigger 1 \; trigger2 1; +#X text 358 297 <-- attack; +#X msg 249 293 \; pd dsp 1 \; trigger 1 \; trigger2 -1; +#X msg 472 293 \; pd dsp 1 \; trigger 0 \; trigger2 0; +#X obj 280 154 +~ 69; +#X text 358 314 restarting; +#X text 363 331 pitch env; +#X text 37 377 We have added a new table \, mtof \, for converting +audio signals from pitch to frequency. Its range is 1-127 \, so you +want to add a base pitch in before you start reading from it.; +#X text 37 443 This is an extreme use of pitch enveloping. In a real +situation you might want an envelope controlling vibrato depth or the +like instead of straight pitch.; +#X obj 48 130 adsr 100 50 200 90 1000; +#X obj 280 130 adsr 20 200 100 100 1000; +#X text 413 497 updated for Pd version 0.37; +#X connect 0 0 24 0; +#X connect 1 0 8 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 8 0 3 0; +#X connect 12 0 25 0; +#X connect 13 0 14 0; +#X connect 14 0 8 1; +#X connect 19 0 13 0; +#X connect 24 0 1 0; +#X connect 25 0 19 0; diff --git a/pd/doc/3.audio.examples/D05.envelope.portamento.pd b/pd/doc/3.audio.examples/D05.envelope.portamento.pd new file mode 100644 index 00000000..6542e8b5 --- /dev/null +++ b/pd/doc/3.audio.examples/D05.envelope.portamento.pd @@ -0,0 +1,148 @@ +#N canvas 222 84 642 346 12; +#X floatatom 75 227 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 46 255 pd output; +#X msg 123 227 MUTE; +#X text 166 225 <-- output amplitude; +#X obj 46 173 tabread4~ mtof; +#X obj 46 197 osc~; +#N canvas 247 30 505 439 tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 129 49 graph; +#X text 331 142 0; +#X text 333 42 10; +#X text 127 157 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 136 226 graph; +#X text 128 336 ------ 130 samples ------; +#X text 340 318 0; +#X text 342 218 12000; +#X restore 490 225 pd tables; +#X text 35 6 PORTAMENTO; +#X obj 46 149 line~; +#X obj 46 101 r pitch; +#X msg 316 101 36; +#X msg 345 101 48; +#X msg 372 101 60; +#X msg 429 101 72; +#X msg 401 101 67; +#X msg 483 101 76; +#X msg 457 101 74; +#X obj 451 165 s pitch; +#X msg 514 101 84; +#X msg 544 101 96; +#X floatatom 143 125 0 0 0; +#X text 173 126 <-- change speed; +#X floatatom 451 139 0 0 0; +#X obj 46 125 pack 0 100; +#X obj 388 192 loadbang; +#X msg 387 214 \; pitch 72; +#X text 40 37 Portamento can be done using just line~ \, but you still +might want to sweep in pitch \, not frequency:; +#X text 363 293 updated for Pd version 0.35; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 8 0 4 0; +#X connect 9 0 23 0; +#X connect 10 0 22 0; +#X connect 11 0 22 0; +#X connect 12 0 22 0; +#X connect 13 0 22 0; +#X connect 14 0 22 0; +#X connect 15 0 22 0; +#X connect 16 0 22 0; +#X connect 18 0 22 0; +#X connect 19 0 22 0; +#X connect 20 0 23 1; +#X connect 22 0 17 0; +#X connect 23 0 8 0; +#X connect 24 0 25 0; diff --git a/pd/doc/3.audio.examples/D06.additive.pd b/pd/doc/3.audio.examples/D06.additive.pd new file mode 100644 index 00000000..5121e62f --- /dev/null +++ b/pd/doc/3.audio.examples/D06.additive.pd @@ -0,0 +1,92 @@ +#N canvas 179 69 696 468 12; +#X floatatom 81 408 0 0 0 0 - - -; +#N canvas 159 26 534 281 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X obj 425 153 t b; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 26 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 21 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 5 0; +#X restore 43 435 pd output; +#X msg 119 408 MUTE; +#X text 153 407 <-- output amplitude; +#X obj 43 377 catch~ sum; +#X obj 381 288 s frequency; +#X floatatom 381 264 0 0 0 0 - - -; +#X floatatom 495 265 0 0 0 0 - - -; +#X obj 495 289 s duration; +#X msg 260 276 \; trigger bang; +#X obj 45 221 partial 0.67 0.56 0 1; +#X obj 45 245 partial 1 0.56 1 0.9; +#X obj 45 269 partial 1 0.92 0 0.65; +#X obj 45 294 partial 1.8 0.94 0 0.55; +#X floatatom 495 217 0 0 0 0 - - -; +#X obj 495 241 * 100; +#X obj 381 240 mtof; +#X floatatom 381 216 0 0 0 0 - - -; +#X text 87 15 ADDITIVE SYNTHESIS; +#X text 32 73 This patch demonstrates using an abstraction \, "partial" +\, to make a simple additive synthesis instrument.; +#X text 28 114 Partial takes as arguments an amplitude \, a relative +frequency \, a detuning frequency \, and a relative duration. You set +absolute duration and pitch using the controls below. Hit hte trigger +to make sound.; +#X text 460 435 updated for Pd version 0.26; +#X text 535 207 duration in tenths; +#X text 535 222 of a second; +#X text 419 215 pitch; +#X text 251 253 click to start; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 1 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 14 0 15 0; +#X connect 15 0 7 0; +#X connect 16 0 6 0; +#X connect 17 0 16 0; diff --git a/pd/doc/3.audio.examples/D07.sampler.notes.pd b/pd/doc/3.audio.examples/D07.sampler.notes.pd new file mode 100644 index 00000000..9b08a10a --- /dev/null +++ b/pd/doc/3.audio.examples/D07.sampler.notes.pd @@ -0,0 +1,321 @@ +#N canvas 12 0 1074 786 12; +#X msg 862 17 \; pd dsp 1; +#X msg 946 17 \; pd dsp 0; +#X text 887 53 ON; +#X text 965 53 OFF; +#X floatatom 64 512 0 0 0; +#N canvas 159 26 495 262 output 0; +#X obj 406 192 t b; +#X obj 406 132 f; +#X obj 406 72 inlet; +#X text 413 35 mute; +#X obj 406 222 f; +#X msg 510 214 0; +#X msg 406 102 bang; +#X obj 406 162 moses 1; +#X obj 510 184 t b f; +#X obj 476 140 moses 1; +#X obj 100 178 dbtorms; +#X obj 476 110 r master-lvl; +#X obj 100 50 r master-lvl; +#X obj 406 252 s master-lvl; +#X obj 26 217 inlet~; +#X obj 239 49 inlet; +#X text 239 22 level; +#X obj 239 120 s master-lvl; +#X msg 115 78 set \$1; +#X obj 115 107 outlet; +#X msg 257 77 \; pd dsp 1; +#X obj 100 233 line~; +#X obj 26 254 *~; +#X obj 26 289 dac~; +#X obj 100 205 pack 0 50; +#X text 24 190 audio; +#X text 112 132 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 29 546 pd output; +#X msg 98 512 MUTE; +#X text 143 511 <-- output amplitude; +#X msg 253 7 bang; +#X obj 253 35 delay 5; +#X text 493 269 end of note; +#X obj 359 35 r note; +#N canvas 459 46 678 451 samples 0; +#X graph graph1 0 -1.02 176403 1.02 262 171 462 41; +#X array sample1 176403 float 0; +#X pop; +#X text 264 376 ------ 4 seconds ------; +#X graph graph1 0 -1.02 176403 1.02 262 356 462 226; +#X array sample2 176403 float 0; +#X pop; +#X restore 29 277 pd samples; +#N canvas 21 287 947 410 recorder 0; +#X obj 318 43 inlet; +#X obj 272 196 adc~ 1; +#X obj 272 224 hip~ 5; +#X obj 341 254 line~; +#X obj 272 253 *~; +#X msg 341 226 1; +#X obj 400 191 del 3990; +#X msg 377 226 0 10; +#X obj 272 304 tabwrite~ sample1; +#X obj 124 110 makefilename sample%1; +#X msg 124 139 set \$1 \, bang; +#X msg 446 162 stop; +#X msg 400 162 bang; +#X obj 557 182 loadbang; +#X obj 660 137 openpanel; +#X msg 660 109 bang; +#X text 702 108 <-- browse for samples; +#X text 628 233 v-- re-read original samples; +#X obj 318 72 route record stop reload browse; +#X obj 557 319 soundfiler; +#X msg 557 261 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav +sample2; +#X msg 660 164 read \$1 sample1; +#X obj 660 191 soundfiler; +#X connect 0 0 18 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 8 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 3 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 11 0 6 0; +#X connect 12 0 6 0; +#X connect 13 0 20 0; +#X connect 14 0 21 0; +#X connect 15 0 14 0; +#X connect 18 0 9 0; +#X connect 18 0 12 0; +#X connect 18 0 5 0; +#X connect 18 1 7 0; +#X connect 18 1 11 0; +#X connect 18 2 20 0; +#X connect 18 3 15 0; +#X connect 20 0 19 0; +#X connect 21 0 22 0; +#X restore 29 443 pd recorder; +#X msg 29 305 record 1; +#X msg 29 360 stop; +#N canvas 700 402 671 621 playback 0; +#X obj 37 79 line~; +#X obj 56 271 line~; +#X obj 37 302 *~; +#X obj 56 242 r cutoff; +#X obj 37 50 r phase; +#X obj 37 626 outlet~; +#X obj 37 598 hip~ 5; +#X obj 49 113 r sample-number; +#X obj 49 142 makefilename sample%d; +#X msg 49 170 set \$1; +#X obj 37 211 tabread4~ sample1; +#X obj 55 338 r envelope; +#X obj 55 396 dbtorms; +#X obj 55 367 unpack; +#X obj 55 425 sqrt; +#X obj 55 454 sqrt; +#X obj 55 482 line~; +#X obj 37 569 *~; +#X obj 55 511 *~; +#X obj 55 540 *~; +#X text 107 51 messages to the phase generating line~; +#X text 188 114 setting the sample number.; +#X text 238 143 compute the name; +#X text 110 171 and send a "set" message to the tabread4~.; +#X text 116 270 line~ for de-clicking; +#X text 156 341 The envelope generator. Rather than sending our message +straight to the line~ we unpack it in order to fool with the amplitude +field.; +#X text 126 397 convert amplitude to linear units.; +#X text 121 426 take the fourth root. This because we want to raies +the line~'s output to the 4th power afterward. This is an inexpensive +way to give the rise and decay a more natural sounding evolution than +just a straight line.; +#X text 94 514 square the output twice to get the fourth power.; +#X connect 0 0 10 0; +#X connect 1 0 2 1; +#X connect 2 0 17 0; +#X connect 3 0 1 0; +#X connect 4 0 0 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 2 0; +#X connect 11 0 13 0; +#X connect 12 0 14 0; +#X connect 13 0 12 0; +#X connect 13 1 16 1; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 18 0; +#X connect 16 0 18 1; +#X connect 17 0 6 0; +#X connect 18 0 19 0; +#X connect 18 0 19 1; +#X connect 19 0 17 1; +#X restore 29 480 pd playback; +#X msg 29 332 record 2; +#X text 641 25 ARGUMENTS FOR NOTES:; +#X text 662 53 pitch in halftones; +#X text 662 77 amplitude (dB); +#X text 662 125 sample number; +#X text 662 101 duration (msec); +#X text 662 149 start location (msec); +#X text 662 173 rise time (msec); +#X text 662 197 decay time (msec); +#X obj 359 62 unpack 0 0 0 0 0 0 0; +#X text 46 6 CHOCOLATE SAMPLER; +#X obj 517 168 f; +#X obj 452 142 f; +#X obj 383 142 f; +#X obj 346 142 f; +#X obj 314 142 f; +#X obj 220 142 f; +#X obj 220 169 mtof; +#X obj 220 197 / 261.62; +#X obj 220 224 * 4.41e+08; +#X obj 220 252 +; +#X obj 485 142 delay; +#X obj 314 312 pack 0 0 0 0 0; +#X obj 253 62 t b b b; +#X text 494 346 This starts the note \, sending to "receives" in the +playback subptach. The new receive "envelope" is an amplitude control +in parallel with the cutoff control. The "sample-number" switches the +tabread4~ between tables.; +#X msg 152 44 \; pd dsp 1 \; cutoff 0 5; +#X obj 383 197 + 1; +#X msg 552 467 60 100 10000 1 0 0 0; +#X obj 552 737 s note; +#X msg 517 196 \; envelope 0 \$1; +#X msg 671 691 62; +#X msg 706 691 64; +#X msg 637 691 60; +#X msg 608 691 55; +#X msg 739 691 72; +#X msg 576 691 48; +#X msg 638 734 60.5; +#X msg 552 494 60 90 10000 1 0 0 0; +#X msg 552 522 60 100 10000 2 0 0 0; +#X msg 552 550 60 100 10000 1 3000 0 0; +#X obj 383 169 * 44.1; +#X msg 552 605 60 100 100 1 0 0 0; +#X msg 552 632 60 100 100 1 0 0 1000; +#X msg 552 577 60 100 10000 1 0 1000 0; +#X msg 314 340 \; envelope 0 \, \$1 \$2 \; phase \$3 \, \$4 1e+07 \; +sample-number \$5 \; cutoff 1 5 \;; +#X text 108 315 <-- record; +#X msg 29 388 reload; +#X msg 29 415 browse; +#X text 6 109 transposition works; +#X text 6 133 by altering the phase; +#X text 6 181 The mtof and / 261; +#X text 6 205 calculate speed change; +#X text 6 229 considering 60 as unity.; +#X text 20 43 as before we; +#X text 11 64 mute and wait; +#X text 6 157 target ($4 below right.); +#X text 446 303 combine amplitude \, rise time \, start phase \, end +phase \, and sample number in one message; +#X text 16 594 This patch take the same principle as the previous one +\, but allows you to parametrize sample playback. Since we must wait +5 msec before starting the playback \, we store all the parameters +in "f" objects \, and recall them to construct the new note. Transposition +is done by altering the amount to play back in the (artificial) ten +thousand seconds (1e+07). The playback segment can be altered to start +in the middle of the sample instead of the beginning \, and you can +change the duration and rise and decay times.; +#X text 744 468 straight playback; +#X text 749 495 change amplitude; +#X text 752 523 change sample number; +#X text 755 550 change start location; +#X text 754 576 change rise time; +#X text 754 609 change duration; +#X text 755 633 ... and decay time; +#X text 688 736 microtones OK too.; +#X text 576 667 If you omit values they stay unchanged; +#X text 799 759 updated for Pd version 0.33; +#X text 548 426 Here are buttons to demonstrate the effect of varying +the parameters one by one.; +#X connect 4 0 5 1; +#X connect 5 0 4 0; +#X connect 6 0 5 2; +#X connect 8 0 9 0; +#X connect 8 0 42 0; +#X connect 9 0 40 0; +#X connect 11 0 26 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 16 0 5 0; +#X connect 17 0 13 0; +#X connect 26 0 33 1; +#X connect 26 0 8 0; +#X connect 26 1 32 1; +#X connect 26 2 38 1; +#X connect 26 3 31 1; +#X connect 26 4 30 1; +#X connect 26 5 29 1; +#X connect 26 6 28 1; +#X connect 28 0 46 0; +#X connect 29 0 39 1; +#X connect 30 0 57 0; +#X connect 31 0 39 4; +#X connect 32 0 39 0; +#X connect 33 0 34 0; +#X connect 34 0 35 0; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 37 0 39 3; +#X connect 38 0 28 0; +#X connect 39 0 61 0; +#X connect 40 0 32 0; +#X connect 40 1 33 0; +#X connect 40 2 29 0; +#X connect 40 2 30 0; +#X connect 40 2 31 0; +#X connect 40 2 38 0; +#X connect 43 0 39 2; +#X connect 43 0 37 1; +#X connect 44 0 45 0; +#X connect 47 0 45 0; +#X connect 48 0 45 0; +#X connect 49 0 45 0; +#X connect 50 0 45 0; +#X connect 51 0 45 0; +#X connect 52 0 45 0; +#X connect 53 0 45 0; +#X connect 54 0 45 0; +#X connect 55 0 45 0; +#X connect 56 0 45 0; +#X connect 57 0 43 0; +#X connect 58 0 45 0; +#X connect 59 0 45 0; +#X connect 60 0 45 0; +#X connect 63 0 13 0; +#X connect 64 0 13 0; diff --git a/pd/doc/3.audio.examples/D08.sampler.poly.pd b/pd/doc/3.audio.examples/D08.sampler.poly.pd new file mode 100644 index 00000000..3e6cdba9 --- /dev/null +++ b/pd/doc/3.audio.examples/D08.sampler.poly.pd @@ -0,0 +1,229 @@ +#N canvas 66 253 1119 674 12; +#X floatatom 582 562 0 0 0 0 - - -; +#N canvas 159 26 495 262 output 0; +#X obj 406 192 t b; +#X obj 406 132 f; +#X obj 406 72 inlet; +#X text 413 35 mute; +#X obj 406 222 f; +#X msg 510 214 0; +#X msg 406 102 bang; +#X obj 406 162 moses 1; +#X obj 510 184 t b f; +#X obj 476 140 moses 1; +#X obj 100 178 dbtorms; +#X obj 476 110 r master-lvl; +#X obj 100 50 r master-lvl; +#X obj 406 252 s master-lvl; +#X obj 26 217 inlet~; +#X obj 239 49 inlet; +#X text 239 22 level; +#X obj 239 120 s master-lvl; +#X msg 115 78 set \$1; +#X obj 115 107 outlet; +#X msg 257 77 \; pd dsp 1; +#X obj 100 233 line~; +#X obj 26 254 *~; +#X obj 26 289 dac~; +#X obj 100 205 pack 0 50; +#X text 24 190 audio; +#X text 112 132 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 547 595 pd output; +#X msg 617 562 MUTE; +#X text 660 561 <-- output amplitude; +#N canvas 0 0 600 392 samples 0; +#N canvas 0 0 450 300 graph1 0; +#X array sample1 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 41 graph; +#X text 282 385 ------ 4 seconds ------; +#N canvas 0 0 450 300 graph1 0; +#X array sample2 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 226 graph; +#X restore 931 97 pd samples; +#N canvas 52 219 967 340 recorder 0; +#X obj 220 21 inlet; +#X obj 174 174 adc~ 1; +#X obj 174 202 hip~ 5; +#X obj 243 232 line~; +#X obj 174 231 *~; +#X msg 243 204 1; +#X obj 302 169 del 3990; +#X msg 279 204 0 10; +#X obj 174 282 tabwrite~ sample1; +#X obj 26 88 makefilename sample%1; +#X msg 26 117 set \$1 \, bang; +#X msg 348 140 stop; +#X msg 302 140 bang; +#X obj 220 50 route record stop reload browse; +#X obj 411 158 loadbang; +#X obj 514 113 openpanel; +#X msg 514 85 bang; +#X text 556 84 <-- browse for samples; +#X text 482 209 v-- re-read original samples; +#X obj 411 295 soundfiler; +#X msg 411 237 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav +sample2; +#X msg 514 140 read \$1 sample1; +#X obj 514 167 soundfiler; +#X connect 0 0 13 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 8 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 3 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 11 0 6 0; +#X connect 12 0 6 0; +#X connect 13 0 9 0; +#X connect 13 0 12 0; +#X connect 13 0 5 0; +#X connect 13 1 7 0; +#X connect 13 1 11 0; +#X connect 13 2 20 0; +#X connect 13 3 16 0; +#X connect 14 0 20 0; +#X connect 15 0 21 0; +#X connect 16 0 15 0; +#X connect 20 0 19 0; +#X connect 21 0 22 0; +#X restore 931 284 pd recorder; +#X msg 931 146 record 1; +#X msg 931 202 stop; +#X msg 931 174 record 2; +#X text 19 49 ARGUMENTS FOR NOTES:; +#X text 19 71 pitch in halftones; +#X text 19 95 amplitude (dB); +#X text 19 143 sample number; +#X text 19 119 duration (msec); +#X text 19 167 start location (msec); +#X text 19 191 rise time (msec); +#X text 19 215 decay time (msec); +#X msg 931 229 reload; +#X msg 931 257 browse; +#X text 47 10 POLYPHONIC SAMPLER; +#X obj 547 522 sampvoice; +#X obj 547 494 sampvoice; +#X obj 547 467 sampvoice; +#X obj 547 439 sampvoice; +#X obj 547 412 sampvoice; +#X obj 547 384 sampvoice; +#X obj 547 356 sampvoice; +#X obj 547 329 sampvoice; +#X obj 631 17 r note; +#X obj 631 44 unpack 0 0 0 0 0 0 0; +#X obj 604 76 t b f; +#X obj 544 109 f; +#X obj 580 109 + 1; +#X obj 552 146 mod 1e+06; +#X obj 544 175 makenote 64; +#X obj 544 203 poly 8 1; +#X obj 544 230 stripnote; +#X obj 617 272 pack 0 0 0 0 0 0 0 0; +#X obj 617 300 route 1 2 3 4 5 6 7 8; +#X text 929 124 record \, etc.; +#X text 206 142 increment mod 1e+06 to make fake pitch; +#X text 326 177 supply note-off message; +#X text 336 207 allocate sampler voice; +#X text 359 232 drop note off again; +#X obj 704 516 qlist; +#X obj 870 520 r comment; +#X text 732 445 sailors to untie him...; +#X text 735 395 Lashed to the mast of his boat \, Ulysses; +#X text 735 420 hears beautiful singing. He begs his; +#X text 19 271 Here we take the previous patch and make it polyphonic +\, with 8 voices. The single voice which we had before has been made +into an abstraction \, "sampvoice.pd" \, which we instantiate in 8 +copies. Earlier we used sends and receives to pass messages to "cutoff" +\, etc \, but here if we did that the copies of sampvoice would be +sending messages to each other \, so we combine the control and the +audio computation in the sampvoice abstraction without using send and +receive. Click on one to see how.; +#X text 20 421 The "poly" object essentially repeats pitch and velocity +pairs to its output \, but also sending a voice number from its left +outlet. To use it \, we unpack the 7 parameters \, calculate the voice +number \, repack the message as 8 parameters with voice number first +\, and use "route" to send it to one of the 8 voices.; +#X text 20 523 There's some bother because poly expects to track note +on and note off messages separately as they would come from a MIDI +keyboard. So we assign each note a unique fake "pitch" \, use makenote +to generate the note-off messages \, and run poly on the resulting +stream. We then discard both pitch and velocity (using the velocity +only to strip note-offs) and rebuild the original message adding the +voice number we just scored.; +#X text 854 639 updated for Pd version 0.33; +#X msg 704 486 read qlist-sampler.txt \, rewind \, tempo 1 \, bang +; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 8 0 5 0; +#X connect 17 0 5 0; +#X connect 18 0 5 0; +#X connect 20 0 1 0; +#X connect 21 0 20 0; +#X connect 22 0 21 0; +#X connect 23 0 22 0; +#X connect 24 0 23 0; +#X connect 25 0 24 0; +#X connect 26 0 25 0; +#X connect 27 0 26 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 29 1 37 2; +#X connect 29 2 34 2; +#X connect 29 2 37 3; +#X connect 29 3 37 4; +#X connect 29 4 37 5; +#X connect 29 5 37 6; +#X connect 29 6 37 7; +#X connect 30 0 31 0; +#X connect 30 1 37 1; +#X connect 31 0 32 0; +#X connect 31 0 34 0; +#X connect 32 0 33 0; +#X connect 33 0 31 1; +#X connect 34 0 35 0; +#X connect 34 1 35 1; +#X connect 35 0 36 0; +#X connect 35 2 36 1; +#X connect 36 0 37 0; +#X connect 37 0 38 0; +#X connect 38 0 27 1; +#X connect 38 1 26 1; +#X connect 38 2 25 1; +#X connect 38 3 24 1; +#X connect 38 4 23 1; +#X connect 38 5 22 1; +#X connect 38 6 21 1; +#X connect 38 7 20 1; +#X connect 53 0 44 0; diff --git a/pd/doc/3.audio.examples/D09.table.spectrum.pd b/pd/doc/3.audio.examples/D09.table.spectrum.pd new file mode 100644 index 00000000..65ccccde --- /dev/null +++ b/pd/doc/3.audio.examples/D09.table.spectrum.pd @@ -0,0 +1,143 @@ +#N canvas 227 120 801 403 12; +#X graph graph3 0 0 126 50 496 276 796 136; +#X array spectrum-tab 127 float 1; +#A 0 42.8571 42.5 43.2143 43.2143 43.2143 43.2143 43.2143 42.8571 42.8571 +42.8571 42.8571 42.8571 42.8571 42.5 42.5 42.5 42.5 42.5 42.5 42.5 +42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 +42.5 42.5 42.1429 42.1429 41.7857 41.0714 40.3571 39.6429 39.2857 38.2143 +37.5 37.1429 36.0714 35.3571 33.9286 33.2143 32.8571 31.4286 31.0714 +30.3571 28.9286 28.2143 27.5 26.4286 25.7143 23.9286 23.2143 21.7857 +21.0714 20.7143 20 19.6429 19.6429 23.2143 28.2143 31.4286 33.5714 +36.4286 37.8571 38.9286 43.9286 45.7143 47.8571 47.8571 47.8571 47.8571 +47.5 47.1429 43.2143 40.3571 36.4286 33.9286 32.1429 29.2857 18.2143 +16.7857 16.7857 17.5 19.6429 22.1429 28.2143 33.9286 33.9286 33.9286 +33.5714 22.5 18.5714 16.7857 4.64286 4.64286 18.2143 17.1429 8.92857 +4.28571 11.4286 10 7.5 6.42857 5.71429 5.35714 5 4.64286 4.28571 3.92857 +3.92857 3.57143 3.57143 2.85714 2.5 2.14286 1.78571 0.714286 0.357143 +; +#X pop; +#X floatatom 57 351 0 0 0; +#N canvas 159 26 526 286 output 0; +#X obj 345 163 t b; +#X obj 345 112 f; +#X obj 345 61 inlet; +#X text 351 30 mute; +#X obj 345 189 f; +#X msg 434 182 0; +#X msg 345 87 bang; +#X obj 345 138 moses 1; +#X obj 405 119 moses 1; +#X obj 85 151 dbtorms; +#X obj 405 94 r master-lvl; +#X obj 85 43 r master-lvl; +#X obj 345 214 s master-lvl; +#X obj 22 185 inlet~; +#X obj 203 42 inlet; +#X text 203 18 level; +#X obj 203 102 s master-lvl; +#X msg 98 67 set \$1; +#X obj 98 91 outlet; +#X msg 218 65 \; pd dsp 1; +#X obj 85 198 line~; +#X obj 22 216 *~; +#X obj 22 246 dac~; +#X obj 85 175 pack 0 50; +#X text 20 162 audio; +#X obj 434 155 t b; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 25 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 21 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 25 0 5 0; +#X restore 19 376 pd output; +#X msg 95 350 MUTE; +#N canvas 98 16 694 474 oscbank 0; +#X obj 36 53 spectrum-partial 1; +#X obj 36 79 spectrum-partial 2; +#X obj 36 105 spectrum-partial 3; +#X obj 36 131 spectrum-partial 4; +#X obj 36 157 spectrum-partial 5; +#X obj 36 183 spectrum-partial 6; +#X obj 36 209 spectrum-partial 7; +#X obj 36 235 spectrum-partial 8; +#X obj 36 261 spectrum-partial 9; +#X obj 36 287 spectrum-partial 10; +#X obj 216 53 spectrum-partial 11; +#X obj 122 382 loadbang; +#X obj 122 407 metro 30; +#X obj 122 433 s poll-table; +#X text 107 21 This is the bank of oscillators--open one to see:; +#X text 72 345 And here we send bangs to "poll-table" needed by the +abstraction.; +#X obj 216 79 spectrum-partial 12; +#X obj 216 105 spectrum-partial 13; +#X obj 216 131 spectrum-partial 14; +#X obj 216 157 spectrum-partial 15; +#X obj 216 183 spectrum-partial 16; +#X obj 216 209 spectrum-partial 17; +#X obj 216 235 spectrum-partial 18; +#X obj 215 261 spectrum-partial 19; +#X obj 215 287 spectrum-partial 20; +#X obj 395 53 spectrum-partial 21; +#X obj 395 78 spectrum-partial 22; +#X obj 395 104 spectrum-partial 23; +#X obj 395 130 spectrum-partial 24; +#X obj 395 156 spectrum-partial 25; +#X obj 395 182 spectrum-partial 26; +#X obj 395 207 spectrum-partial 27; +#X obj 396 234 spectrum-partial 28; +#X obj 395 260 spectrum-partial 29; +#X obj 395 287 spectrum-partial 30; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X restore 17 251 pd oscbank; +#X obj 19 321 catch~ sum-bus; +#X obj 16 153 s pitch; +#X floatatom 16 125 4 0 0; +#X text 43 18 DRAWABLE SPECTRA; +#X floatatom 14 183 4 0 0; +#X obj 14 211 s whammybar; +#N canvas 0 0 650 341 table-setup 0; +#X obj 39 227 loadbang; +#X msg 39 261 \; spectrum-tab xlabel -5 0 12 24 36 48 60 72 84 96 108 +120; +#X text 82 60 comment; +#X connect 0 0 1 0; +#X restore 17 283 pd table-setup; +#X msg 596 65 \; spectrum-tab const 0; +#X text 555 381 Updated for Pd version 0.34; +#X text 26 42 In this array \, you can draw a spectral envelope that +will be synthesized by an oscillator bank. Each oscillator in the bank +computes its own frequency and uses it to look up amplitude from the +array.; +#X text 113 254 <-- the oscillator bank; +#X text 71 128 <-- pitch; +#X text 61 185 <-- left or right shift (normally 0); +#X text 157 318 <-- here we just collect the sum of all the partials +which are computed in "oscbank".; +#X text 662 44 CLEAR; +#X text 148 283 <-- make the number labels; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 2 0; +#X connect 7 0 6 0; +#X connect 9 0 10 0; diff --git a/pd/doc/3.audio.examples/D10.risset.bell.pd b/pd/doc/3.audio.examples/D10.risset.bell.pd new file mode 100644 index 00000000..8e329eaa --- /dev/null +++ b/pd/doc/3.audio.examples/D10.risset.bell.pd @@ -0,0 +1,109 @@ +#N canvas 375 37 484 454 12; +#X floatatom 129 403 0 0 0 0 - - -; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 182 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 159 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 105 428 pd output; +#X msg 154 403 MUTE; +#X text 195 402 <-- output amplitude; +#X obj 97 167 sinevoice 1 0.56 0 1; +#X obj 243 42 unpack 0 0 0; +#X floatatom 242 84 0 0 0 0 - - -; +#X obj 217 62 t b f; +#X floatatom 276 84 0 0 0 0 - - -; +#X floatatom 310 84 0 0 0 0 - - -; +#X obj 217 105 f; +#X msg 170 84 bang; +#X obj 217 127 pack 0 0 0; +#X msg 243 20 80 72 5000; +#X obj 97 189 sinevoice 0.67 0.56 1 0.9; +#X obj 97 211 sinevoice 1 0.92 0 0.65; +#X obj 97 233 sinevoice 1.8 0.92 1.7 0.55; +#X obj 97 255 sinevoice 2.67 1.19 0 0.325; +#X obj 97 277 sinevoice 1.67 1.7 0 0.35; +#X obj 97 299 sinevoice 1.46 2 0 0.25; +#X obj 97 321 sinevoice 1.33 2.74 0 0.2; +#X obj 97 343 sinevoice 1 3 0 0.15; +#X obj 97 365 sinevoice 1.33 4.07 0 0.075; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 14 0; +#X connect 4 1 14 1; +#X connect 5 0 7 0; +#X connect 5 1 8 0; +#X connect 5 2 9 0; +#X connect 6 0 10 1; +#X connect 7 0 10 0; +#X connect 7 1 6 0; +#X connect 8 0 12 1; +#X connect 9 0 12 2; +#X connect 10 0 12 0; +#X connect 11 0 10 0; +#X connect 12 0 4 1; +#X connect 13 0 5 0; +#X connect 14 0 15 0; +#X connect 14 1 15 1; +#X connect 15 0 16 0; +#X connect 15 1 16 1; +#X connect 16 0 17 0; +#X connect 16 1 17 1; +#X connect 17 0 18 0; +#X connect 17 1 18 1; +#X connect 18 0 19 0; +#X connect 18 1 19 1; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 21 0; +#X connect 20 1 21 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 1 0; diff --git a/pd/doc/3.audio.examples/D11.shepard.tone.pd b/pd/doc/3.audio.examples/D11.shepard.tone.pd new file mode 100644 index 00000000..8be283ab --- /dev/null +++ b/pd/doc/3.audio.examples/D11.shepard.tone.pd @@ -0,0 +1,110 @@ +#N canvas 19 0 594 599 12; +#X floatatom 107 202 0 0 0 0 - - -; +#X floatatom 11 202 0 0 0 0 - - -; +#X text 140 17 STOP; +#X text 20 3 START; +#X floatatom 78 358 0 0 0 0 - - -; +#X obj 78 337 r incr; +#X obj 65 310 metro 50; +#X floatatom 64 426 0 0 0 0 - - -; +#X obj 62 494 s phase; +#X obj 62 474 + 10000; +#X obj 64 406 +; +#X obj 11 222 s dropoff+; +#X obj 186 221 s interval+; +#X floatatom 186 201 0 0 0 0 - - -; +#X obj 107 222 s pitch+; +#X obj 11 182 r dropoff; +#X obj 107 182 r pitch; +#X obj 186 181 r interval; +#X floatatom 65 289 0 0 0 0 - - -; +#X obj 65 269 r metro; +#X obj 124 406 f; +#X obj 295 467 *~; +#X obj 295 15 shepvoice 0; +#X obj 315 441 line~; +#X obj 471 408 pack 0 100; +#X floatatom 471 367 0 0 0 0 - - -; +#X obj 471 347 r amp; +#X obj 295 519 dac~; +#X obj 471 387 dbtorms; +#X floatatom 372 464 0 0 0 0 - - -; +#X obj 372 444 r rev; +#X obj 420 440 r revtime; +#X floatatom 420 461 0 0 0 0 - - -; +#X obj 313 497 rev4~; +#X obj 124 426 mod 10000; +#X obj 295 36 shepvoice 500; +#X obj 295 56 shepvoice 1000; +#X obj 295 77 shepvoice 1500; +#X obj 295 97 shepvoice 2000; +#X obj 295 117 shepvoice 2500; +#X obj 295 138 shepvoice 3000; +#X obj 295 158 shepvoice 3500; +#X obj 295 179 shepvoice 4000; +#X obj 295 199 shepvoice 4500; +#X obj 295 219 shepvoice 5000; +#X obj 295 240 shepvoice 5500; +#X obj 295 260 shepvoice 6000; +#X obj 295 281 shepvoice 6500; +#X obj 295 301 shepvoice 7000; +#X obj 295 321 shepvoice 7500; +#X obj 295 342 shepvoice 8000; +#X obj 295 362 shepvoice 8500; +#X obj 295 385 shepvoice 9000; +#X obj 295 405 shepvoice 9500; +#X obj 65 380 f; +#X msg 140 35 \; amp 0 \;; +#X msg 6 18 \; dropoff 10 \; pitch 60 \; interval 120 \; metro 1 \; +rev 74 \; revtime 87 \; incr -2 \; pd dsp 1; +#X connect 0 0 14 0; +#X connect 1 0 11 0; +#X connect 4 0 54 1; +#X connect 5 0 4 0; +#X connect 6 0 54 0; +#X connect 7 0 9 0; +#X connect 9 0 8 0; +#X connect 10 0 20 0; +#X connect 10 0 7 0; +#X connect 13 0 12 0; +#X connect 15 0 1 0; +#X connect 16 0 0 0; +#X connect 17 0 13 0; +#X connect 18 0 6 0; +#X connect 19 0 18 0; +#X connect 20 0 34 0; +#X connect 21 0 27 0; +#X connect 21 0 33 0; +#X connect 22 0 35 0; +#X connect 23 0 21 1; +#X connect 24 0 23 0; +#X connect 25 0 28 0; +#X connect 26 0 25 0; +#X connect 28 0 24 0; +#X connect 29 0 33 1; +#X connect 30 0 29 0; +#X connect 31 0 32 0; +#X connect 32 0 33 2; +#X connect 33 0 27 0; +#X connect 33 1 27 1; +#X connect 34 0 10 1; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 37 0 38 0; +#X connect 38 0 39 0; +#X connect 39 0 40 0; +#X connect 40 0 41 0; +#X connect 41 0 42 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; +#X connect 44 0 45 0; +#X connect 45 0 46 0; +#X connect 46 0 47 0; +#X connect 47 0 48 0; +#X connect 48 0 49 0; +#X connect 49 0 50 0; +#X connect 50 0 51 0; +#X connect 51 0 52 0; +#X connect 52 0 53 0; +#X connect 53 0 21 0; +#X connect 54 0 10 0; diff --git a/pd/doc/3.audio.examples/E01.pulse.pd b/pd/doc/3.audio.examples/E01.pulse.pd new file mode 100644 index 00000000..8efe6390 --- /dev/null +++ b/pd/doc/3.audio.examples/E01.pulse.pd @@ -0,0 +1,126 @@ +#N canvas 15 126 821 582 12; +#X obj 285 163 line~; +#X floatatom 66 64 0 0 0; +#X obj 43 315 cos~; +#X graph graph1 0 -1.02 882 1.02 599 472 799 342; +#X array pulse-output 882 float 0; +#X pop; +#X floatatom 72 407 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 43 435 pd output; +#X msg 111 405 MUTE; +#X text 158 406 <-- output amplitude; +#X obj 66 91 phasor~ 0; +#X obj 285 139 pack 0 50; +#X floatatom 285 54 0 0 0; +#X text 63 43 frequency; +#X obj 66 115 -~ 0.5; +#X obj 66 207 *~; +#X obj 285 78 / 10; +#X obj 43 265 clip~ -0.5 0.5; +#X obj 43 371 hip~ 5; +#X graph graph1 0 -1.02 882 1.02 599 168 799 108; +#X array phase-output 882 float 0; +#X pop; +#X graph graph1 0 -1.02 882 1.02 599 335 799 205; +#X array clip-output 882 float 0; +#X pop; +#X text 280 34 bandwidth; +#X text 130 114 phase -1/2 to 1/2; +#X text 152 91 phase 0 to 1; +#X text 132 5 PULSE GENERATOR; +#X obj 32 234 tabwrite~ phase-output; +#X obj 32 346 tabwrite~ pulse-output; +#X text 116 372 high pass filter to cut DC; +#X msg 32 147 bang; +#X text 332 79 fix range; +#X text 337 100 force; +#X text 337 117 nonnegative; +#X text 339 164 smooth it; +#X text 327 187 add 1; +#X text 78 148 <-- click to graph; +#X text 96 209 increase amplitude; +#X text 177 264 clip back to range -1/2 to 1/2; +#X text 103 316 cosine wave lookup (-1/2 and 1/2 give -1); +#X text 24 470 This patch computes a pulse train \, with a "bandwidth" +control that essentually squeezes the pulses. If "bandwidth" is zero +you get a pure cosine wave \, and for larger values of the bandwidth +\, the cosine wave is squeezed to fill smaller portions of the waveform. +; +#X obj 285 188 +~ 1; +#X obj 32 292 tabwrite~ clip-output; +#X text 601 478 ---- 0.02 seconds ----; +#X obj 285 102 max 0; +#X text 544 551 updated for Pd version 0.34; +#X connect 0 0 37 0; +#X connect 1 0 8 0; +#X connect 2 0 16 0; +#X connect 2 0 24 0; +#X connect 4 0 5 1; +#X connect 5 0 4 0; +#X connect 6 0 5 2; +#X connect 8 0 12 0; +#X connect 9 0 0 0; +#X connect 10 0 14 0; +#X connect 12 0 13 0; +#X connect 13 0 15 0; +#X connect 13 0 23 0; +#X connect 14 0 40 0; +#X connect 15 0 2 0; +#X connect 15 0 38 0; +#X connect 16 0 5 0; +#X connect 26 0 23 0; +#X connect 26 0 24 0; +#X connect 26 0 38 0; +#X connect 37 0 13 1; +#X connect 40 0 9 0; diff --git a/pd/doc/3.audio.examples/E02.just.say.pd b/pd/doc/3.audio.examples/E02.just.say.pd new file mode 100644 index 00000000..b82b4953 --- /dev/null +++ b/pd/doc/3.audio.examples/E02.just.say.pd @@ -0,0 +1,152 @@ +#N canvas 32 67 900 421 12; +#X obj 39 247 cos~; +#X graph graph1 0 -1.02 44100 1.02 452 206 652 76; +#X array env-output 44100 float 0; +#X pop; +#X floatatom 71 305 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 39 333 pd output; +#X msg 115 306 MUTE; +#X msg 162 93 bang; +#X text 203 93 <-- click to graph; +#X obj 39 168 -~ 0.5; +#X obj 39 192 *~; +#X obj 39 219 clip~ -0.5 0.5; +#X obj 39 274 hip~ 5; +#X obj 126 60 *~; +#X floatatom 205 142 0 0 0; +#X floatatom 205 168 0 0 0; +#X obj 126 27 phasor~ -4; +#X obj 126 191 +~ 0.5; +#X obj 162 117 tabwrite~ env-output; +#X text 451 211 --------- 1 second ---------; +#X floatatom 205 194 0 0 0; +#X obj 126 142 lop~ 130; +#N canvas 168 232 351 420 freq 0; +#X obj 180 176 t f f; +#X obj 181 202 *; +#X obj 60 320 line 0 30; +#X obj 90 132 t b b; +#X obj 90 107 metro 100; +#X obj 61 287 pack; +#X obj 60 376 outlet; +#X floatatom 89 82 0 0 0; +#X floatatom 54 243 0 0 0; +#X floatatom 94 248 0 0 0; +#X obj 60 348 pack 0 30; +#X obj 55 202 + 150; +#X obj 88 34 loadbang; +#X msg 89 58 1; +#X obj 56 175 random 300; +#X obj 181 226 + 100; +#X obj 179 152 random 35; +#X connect 0 0 1 0; +#X connect 0 1 1 1; +#X connect 1 0 15 0; +#X connect 2 0 10 0; +#X connect 3 0 14 0; +#X connect 3 1 16 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 7 0 4 0; +#X connect 8 0 5 0; +#X connect 9 0 5 1; +#X connect 10 0 6 0; +#X connect 11 0 8 0; +#X connect 12 0 13 0; +#X connect 13 0 7 0; +#X connect 14 0 11 0; +#X connect 15 0 4 1; +#X connect 15 0 9 0; +#X connect 16 0 0 0; +#X restore 38 94 pd freq; +#X obj 39 119 line~; +#X obj 39 144 phasor~; +#X text 225 19 negative frequency; +#X text 226 35 makes falling sawtooth; +#X text 155 59 square it to make a curve; +#X text 245 152 you can; +#X text 243 170 adjust these; +#X text 247 189 values; +#X text 334 250 We interrupt this series of patches to bring you an +important message from Nancy Reagan. If \, anywhere \, at any time +\, someone offers you an illicit drug \, just say one word in reply... +; +#X text 334 313 Now that I'm sure you've heard this important message +\, we can return to the essentially frivolous occupation of making +turn-of-the-millenium western art music.; +#X obj 126 165 *~ 6; +#X text 561 384 updated for Pd version 0.34; +#X text 156 305 <-- output; +#X connect 0 0 10 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 5 0 16 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 0 0; +#X connect 10 0 3 0; +#X connect 11 0 16 0; +#X connect 11 0 19 0; +#X connect 12 0 19 1; +#X connect 13 0 31 1; +#X connect 14 0 11 0; +#X connect 14 0 11 1; +#X connect 15 0 8 1; +#X connect 18 0 15 1; +#X connect 19 0 31 0; +#X connect 20 0 21 0; +#X connect 21 0 22 0; +#X connect 22 0 7 0; +#X connect 31 0 15 0; diff --git a/pd/doc/3.audio.examples/E03.pulse.spectrum.pd b/pd/doc/3.audio.examples/E03.pulse.spectrum.pd new file mode 100644 index 00000000..49d21cbd --- /dev/null +++ b/pd/doc/3.audio.examples/E03.pulse.spectrum.pd @@ -0,0 +1,136 @@ +#N canvas 15 126 887 588 12; +#X obj 189 166 line~; +#X obj 42 187 cos~; +#X graph graph1 0 -1.02 882 1.02 633 508 833 378; +#X array pulse-output 882 float 0; +#X pop; +#X floatatom 71 317 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 42 345 pd output; +#X msg 118 319 MUTE; +#X obj 189 142 pack 0 50; +#X floatatom 189 41 0 0 0; +#X text 598 545 updated for Pd version 0.26; +#X obj 43 114 -~ 0.5; +#X obj 43 140 *~; +#X obj 189 67 / 10; +#X obj 189 91 moses 0; +#X msg 189 115 0; +#X obj 42 163 clip~ -0.5 0.5; +#X obj 42 289 hip~ 5; +#X graph graph1 0 0 128 500 503 285 759 155; +#X array spectrum 128 float 0; +#X pop; +#X text 184 23 bandwidth; +#X obj 115 267 tabwrite~ pulse-output; +#X msg 105 229 bang; +#X text 143 226 <-- click to graph; +#X obj 189 191 +~ 1; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 53 267 pd fft; +#X obj 43 90 phasor~ 172.266; +#X obj 42 211 +~ 1; +#X text 63 1 PULSE SPECTRUM MEASUREMENT; +#X text 16 377 Here is a measured amplitude spectrum for the pulse +train. Nutice that \, other than a smallish spillover \, the energy +sits in one "lobe" whose changing width justifies our calling the squeeze +factor the "bandwidth."; +#X text 16 442 The spectrum is in units of amplitude. THe sidelobes +\, although they look small \, are actually only about 34 dB down. +You can design more complicated pulse trains \, little Blackman window +functions \, which control the sidelobes much better.; +#X text 17 518 The spectrum measurement is done in the "pd fft" subwindow +\, but see the "FFT examples" for information about that.; +#X text 501 291 0; +#X text 749 288 5512; +#X text 633 511 ---- 0.02 seconds ----; +#X text 160 319 <-- output; +#X connect 0 0 21 0; +#X connect 1 0 24 0; +#X connect 3 0 4 1; +#X connect 4 0 3 0; +#X connect 5 0 4 2; +#X connect 6 0 0 0; +#X connect 7 0 11 0; +#X connect 9 0 10 0; +#X connect 10 0 14 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 12 1 6 0; +#X connect 13 0 6 0; +#X connect 14 0 1 0; +#X connect 15 0 4 0; +#X connect 19 0 18 0; +#X connect 19 0 22 1; +#X connect 21 0 10 1; +#X connect 23 0 9 0; +#X connect 24 0 22 0; +#X connect 24 0 15 0; +#X connect 24 0 18 0; diff --git a/pd/doc/3.audio.examples/E04.more.pulses.pd b/pd/doc/3.audio.examples/E04.more.pulses.pd new file mode 100644 index 00000000..1aa97555 --- /dev/null +++ b/pd/doc/3.audio.examples/E04.more.pulses.pd @@ -0,0 +1,138 @@ +#N canvas 15 126 902 581 12; +#X obj 220 171 line~; +#X msg 350 15 \; pd dsp 1; +#X msg 434 16 \; pd dsp 0; +#X text 371 46 ON; +#X text 451 47 OFF; +#X floatatom 68 303 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 39 331 pd output; +#X msg 106 303 MUTE; +#X text 150 302 <-- output amplitude; +#X obj 220 147 pack 0 50; +#X floatatom 220 46 0 0 0; +#X text 640 544 updated for Pd version 0.26; +#X obj 70 108 *~; +#X obj 220 72 / 10; +#X obj 220 96 moses 0; +#X msg 220 120 0; +#X obj 39 275 hip~ 5; +#X graph graph1 0 0 128 300 620 491 876 361; +#X array spectrum 128 float 0; +#X pop; +#X text 215 28 bandwidth; +#X msg 135 235 bang; +#X text 177 234 <-- click to graph; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 68 237 pd fft; +#X text 618 497 0; +#X text 851 492 5512; +#X obj 78 141 *~; +#X obj 18 141 sig~ 1; +#X obj 39 194 /~; +#X obj 54 168 +~; +#X obj 70 79 osc~ 86.1328; +#X text 103 107 call this X; +#X text 111 141 X^2; +#X text 84 171 1+X^2; +#X text 71 196 1/(1+X^2); +#X text 10 357 This is the form of pulse train used in the Phase Aligned +Formant (PAF) algorithm. It has the neat property that its amplitude +spectrum drops off as a perfectly exponential function of frequency. +This algorithm is protected by French and US patents. contact Vincent +Puig to learn what restrictions may apply.; +#X text 11 457 On the other hand \, there are rumors that exp(-X*X) +actually sounds better than 1/(1+X*X). To compute exp(-X*X) efficiently +you will want to employ tabread4~ with a stored bell curve. I don't +want to know you're doing this. However \, the first Pd user who e-mails +me the correct formula for the output spectrum wins a free CO2 fire +extinguisher.; +#X text 28 4 ANOTHER PULSE WIDTH MOD ALGORITHM; +#X connect 0 0 12 1; +#X connect 5 0 6 1; +#X connect 6 0 5 0; +#X connect 7 0 6 2; +#X connect 9 0 0 0; +#X connect 10 0 13 0; +#X connect 12 0 24 0; +#X connect 12 0 24 1; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 14 1 9 0; +#X connect 15 0 9 0; +#X connect 16 0 6 0; +#X connect 19 0 21 1; +#X connect 24 0 27 1; +#X connect 25 0 26 0; +#X connect 25 0 27 0; +#X connect 26 0 16 0; +#X connect 26 0 21 0; +#X connect 27 0 26 1; +#X connect 28 0 12 0; diff --git a/pd/doc/3.audio.examples/E05.pulse.width.mod.pd b/pd/doc/3.audio.examples/E05.pulse.width.mod.pd new file mode 100644 index 00000000..214d250a --- /dev/null +++ b/pd/doc/3.audio.examples/E05.pulse.width.mod.pd @@ -0,0 +1,98 @@ +#N canvas 27 355 931 532 12; +#X floatatom 86 104 0 0 0; +#X graph graph1 0 -1.02 882 1.02 669 456 869 326; +#X array difference-output 882 float 0; +#X pop; +#X floatatom 123 324 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 86 351 pd output; +#X msg 162 324 MUTE; +#X obj 86 137 phasor~ 0; +#X text 83 86 frequency; +#X graph graph1 0 -1.02 882 1.02 668 179 868 49; +#X array phasor1-output 882 float 0; +#X pop; +#X msg 191 77 bang; +#X text 231 76 <-- click to graph; +#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; +#X obj 102 196 phasor~ 0; +#X obj 102 172 + 0.2; +#X obj 86 246 -~; +#X graph graph1 0 -1.02 882 1.02 668 316 868 186; +#X array phasor2-output 882 float 0; +#X pop; +#X obj 191 164 tabwrite~ phasor1-output; +#X obj 191 222 tabwrite~ phasor2-output; +#X obj 191 276 tabwrite~ difference-output; +#X text 12 386 This patch demonstrates pulse width modulation \, which +is accomplished simply by subtracting two sawtooth waves at a varying +phase difference. Here their frequencies are set to differ by 1/5 Hz. +so that the relative phase wanders continuously.; +#X text 669 459 ---- 0.02 seconds ----; +#X text 665 498 updated for Pd version 0.34; +#X text 203 325 <-- output; +#X connect 0 0 5 0; +#X connect 0 0 12 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 5 0 13 0; +#X connect 5 0 15 0; +#X connect 8 0 15 0; +#X connect 8 0 16 0; +#X connect 8 0 17 0; +#X connect 11 0 13 1; +#X connect 11 0 16 0; +#X connect 12 0 11 0; +#X connect 13 0 17 0; +#X connect 13 0 3 0; diff --git a/pd/doc/3.audio.examples/E06.stereo.pd b/pd/doc/3.audio.examples/E06.stereo.pd new file mode 100644 index 00000000..1c417df5 --- /dev/null +++ b/pd/doc/3.audio.examples/E06.stereo.pd @@ -0,0 +1,87 @@ +#N canvas 27 355 553 341 12; +#X floatatom 59 63; +#X msg 340 12 \; pd dsp 1; +#X msg 407 12 \; pd dsp 0; +#X text 361 45 ON; +#X text 424 43 OFF; +#X floatatom 123 196; +#N canvas 159 26 618 383 output 0; +#X obj 393 156 t b; +#X obj 393 106 f; +#X obj 393 56 inlet; +#X text 399 25 mute; +#X obj 393 181 f; +#X msg 480 174 0; +#X msg 393 81 bang; +#X obj 393 131 moses 1; +#X obj 480 149 t b f; +#X obj 452 113 moses 1; +#X obj 138 144 dbtorms; +#X obj 452 88 r master-lvl; +#X obj 138 38 r master-lvl; +#X obj 393 206 s master-lvl; +#X obj 22 181 inlet~; +#X obj 254 37 inlet; +#X text 254 14 level; +#X obj 254 96 s master-lvl; +#X msg 151 61 set \$1; +#X obj 151 85 outlet; +#X msg 269 60 \; pd dsp 1; +#X obj 138 190 line~; +#X obj 22 212 *~; +#X obj 138 167 pack 0 50; +#X text 34 159 audio; +#X text 148 106 show level; +#X obj 73 182 inlet~; +#X obj 73 213 *~; +#X obj 22 241 dac~ 1; +#X obj 73 241 dac~ 2; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 23 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 21 0 27 1; +#X connect 22 0 28 0; +#X connect 23 0 21 0; +#X connect 26 0 27 0; +#X connect 27 0 29 0; +#X restore 61 224 pd output; +#X msg 152 196 MUTE; +#X text 186 195 <-- output amplitude; +#X obj 59 111 phasor~ 0; +#X text 56 45 frequency; +#X text 331 323 updated for Pd version 0.26; +#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; +#X obj 131 110 phasor~ 0; +#X obj 59 134 -~ 0.5; +#X obj 131 85 + 0.5; +#X obj 131 135 -~ 0.5; +#X obj 131 160 *~ -1; +#X text 34 262 Here's what happens if you take the previous patch but \, instead of subtracting the two sawtooth waves \, we put them in two speakers with opposite phase.; +#X connect 0 0 9 0; +#X connect 0 0 15 0; +#X connect 5 0 6 2; +#X connect 6 0 5 0; +#X connect 7 0 6 3; +#X connect 9 0 14 0; +#X connect 13 0 16 0; +#X connect 14 0 6 0; +#X connect 15 0 13 0; +#X connect 16 0 17 0; +#X connect 17 0 6 1; diff --git a/pd/doc/3.audio.examples/E07.envelope.mod.pd b/pd/doc/3.audio.examples/E07.envelope.mod.pd new file mode 100644 index 00000000..52551163 --- /dev/null +++ b/pd/doc/3.audio.examples/E07.envelope.mod.pd @@ -0,0 +1,148 @@ +#N canvas 75 15 1014 733 12; +#X graph graph1 0 -1.02 44100 1.02 764 446 964 316; +#X array cos-output 44100 float 0; +#X pop; +#X graph graph1 0 -1.02 44103 1.02 761 148 961 18; +#X array sample-table 44103 float 0; +#X pop; +#X obj 593 579 loadbang; +#X floatatom 96 489 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 67 517 pd output; +#X msg 133 490 MUTE; +#X text 176 490 <-- output amplitude; +#X obj 67 460 hip~ 5; +#X obj 47 408 tabread4~ sample-table; +#X floatatom 46 50 0 0 0; +#X text 85 49 <-- frequency (Hz.); +#X floatatom 97 358 0 0 0; +#X obj 97 385 * 441; +#X obj 47 358 *~ 0; +#X obj 47 383 +~ 1; +#X text 271 274 <-- click to display output; +#X msg 229 275 bang; +#X text 136 357 <-- chunk size (100ths of a second); +#X obj 588 471 adc~ 1; +#X obj 588 495 hip~ 5; +#X obj 588 545 tabwrite~ sample-table; +#X msg 603 518 bang; +#X text 635 518 <-- click here to record your own sample; +#X text 704 583 v-- re-read the original sample; +#X text 40 9 ENVELOPING YOUR LOOPING SAMPLER; +#X obj 88 101 -~ 0.5; +#X obj 88 259 clip~ -0.5 0.5; +#X obj 88 237 *~ 1; +#X graph graph1 0 -1.02 44100 1.02 763 311 963 181; +#X array cos-input 44100 float 0; +#X pop; +#X obj 229 303 tabwrite~ cos-input; +#X obj 88 284 cos~; +#X obj 88 126 wrap~; +#X obj 88 155 -~ 0.5; +#X obj 88 332 *~ -0.5; +#X obj 88 307 -~ 1; +#X obj 229 329 tabwrite~ cos-output; +#X floatatom 119 187 0 0 0; +#X obj 67 433 *~; +#X text 157 98 subtracting 0.5 and wrapping produces a sawtooth wave +180 degrees out of phase from the original.; +#X text 153 150 as before we subtract 1/2 again to center the sawtooth +from -1/2 to 1/2.; +#X text 153 188 <-- sharpness (at least 1); +#X msg 593 608 read ../sound/voice.wav sample-table; +#X obj 593 633 soundfiler; +#X text 776 150 -- 44103 samples ---; +#X text 767 447 ----- 1 second ------; +#X obj 119 211 max 1; +#X obj 46 77 phasor~; +#X text 24 560 Here we apply an amplitude envelope to protect against +discontinuities at the loop point. The envelope is based on the pulse +width modulation example \, except that the widening is applied to +the "1" part of the pulse \, not the "0" part.; +#X text 23 647 To see the envelope \, put the phasor on 2 Hz \, select +"sharpness" values between 1 and 3 \, and look at "cos-input" and "cos-output." +You should both see and hear the effect of the "sharpness" parameter. +; +#X text 734 688 updated for Pd version 0.34; +#X connect 2 0 41 0; +#X connect 3 0 4 1; +#X connect 4 0 3 0; +#X connect 5 0 4 2; +#X connect 7 0 4 0; +#X connect 8 0 37 0; +#X connect 9 0 46 0; +#X connect 11 0 12 0; +#X connect 12 0 13 1; +#X connect 13 0 14 0; +#X connect 14 0 8 0; +#X connect 16 0 29 0; +#X connect 16 0 35 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 21 0 20 0; +#X connect 25 0 31 0; +#X connect 26 0 30 0; +#X connect 26 0 29 0; +#X connect 27 0 26 0; +#X connect 30 0 34 0; +#X connect 31 0 32 0; +#X connect 32 0 27 0; +#X connect 33 0 35 0; +#X connect 33 0 37 1; +#X connect 34 0 33 0; +#X connect 36 0 45 0; +#X connect 37 0 7 0; +#X connect 41 0 42 0; +#X connect 45 0 27 1; +#X connect 46 0 13 0; +#X connect 46 0 25 0; diff --git a/pd/doc/3.audio.examples/E08.even.odd.pd b/pd/doc/3.audio.examples/E08.even.odd.pd new file mode 100644 index 00000000..bfa950a9 --- /dev/null +++ b/pd/doc/3.audio.examples/E08.even.odd.pd @@ -0,0 +1,116 @@ +#N canvas 213 27 840 639 12; +#X floatatom 45 74 0 0 0; +#X obj 99 164 wrap~; +#X graph graph1 0 -1.02 882 1.02 624 153 824 23; +#X array phasor-output 882 float 0; +#X pop; +#X obj 45 102 phasor~ 0; +#X text 81 73 frequency; +#X obj 45 130 -~ 0.5; +#X obj 99 192 -~ 0.5; +#X obj 36 244 -~; +#X obj 98 244 +~; +#X graph graph1 0 -1.02 882 1.02 625 288 825 158; +#X array wrap-output 882 float 0; +#X pop; +#X graph graph1 0 -1.02 882 1.02 626 423 826 293; +#X array sum 882 float 0; +#X pop; +#X graph graph1 0 -1.02 882 1.02 626 563 826 433; +#X array difference 882 float 0; +#X pop; +#X obj 172 166 tabwrite~ phasor-output; +#X obj 172 218 tabwrite~ wrap-output; +#X obj 172 282 tabwrite~ sum; +#X obj 172 327 tabwrite~ difference; +#X msg 172 120 bang; +#X text 106 13 BUCHLA'S METHOD; +#X floatatom 119 369 0 0 0; +#N canvas 159 26 618 383 output 0; +#X obj 393 156 t b; +#X obj 393 106 f; +#X obj 393 56 inlet; +#X text 399 25 mute; +#X obj 393 181 f; +#X msg 480 174 0; +#X msg 393 81 bang; +#X obj 393 131 moses 1; +#X obj 480 149 t b f; +#X obj 452 113 moses 1; +#X obj 138 144 dbtorms; +#X obj 452 88 r master-lvl; +#X obj 138 38 r master-lvl; +#X obj 393 206 s master-lvl; +#X obj 22 181 inlet~; +#X obj 254 37 inlet; +#X text 254 14 level; +#X obj 254 96 s master-lvl; +#X msg 151 61 set \$1; +#X obj 151 85 outlet; +#X msg 269 60 \; pd dsp 1; +#X obj 138 190 line~; +#X obj 22 212 *~; +#X obj 138 167 pack 0 50; +#X text 34 159 audio; +#X text 148 106 show level; +#X obj 73 182 inlet~; +#X obj 73 213 *~; +#X obj 22 241 dac~ 1; +#X obj 73 241 dac~ 2; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 23 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 21 0 27 1; +#X connect 22 0 28 0; +#X connect 23 0 21 0; +#X connect 26 0 27 0; +#X connect 27 0 29 0; +#X restore 81 392 pd output; +#X msg 156 369 MUTE; +#X text 13 430 A patch to split a sawtooth into even and odd harmonics +ala Buchla. The wrap~ object folds its input into the interval [0 \, +1) so taht \, for instance \, subtracting 1/5 from a phasor and wrapping +it gives another phasor a half cycle out of phase frmo the original. +Adding and subtracting the two give the results shown and heard. (Listen +to the two outputs separately \, then together.); +#X text 631 567 ---- 0.02 seconds ----; +#X text 577 613 updated for Pd version 0.34; +#X text 193 369 <-- output; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 3 0 5 0; +#X connect 5 0 1 0; +#X connect 5 0 12 0; +#X connect 5 0 8 0; +#X connect 5 0 7 0; +#X connect 6 0 13 0; +#X connect 6 0 8 1; +#X connect 6 0 7 1; +#X connect 7 0 15 0; +#X connect 7 0 19 0; +#X connect 8 0 14 0; +#X connect 8 0 19 1; +#X connect 16 0 13 0; +#X connect 16 0 14 0; +#X connect 16 0 15 0; +#X connect 16 0 12 0; +#X connect 18 0 19 2; +#X connect 19 0 18 0; +#X connect 20 0 19 3; diff --git a/pd/doc/3.audio.examples/E09.bandlimited.pd b/pd/doc/3.audio.examples/E09.bandlimited.pd new file mode 100644 index 00000000..f49bcb68 --- /dev/null +++ b/pd/doc/3.audio.examples/E09.bandlimited.pd @@ -0,0 +1,166 @@ +#N canvas 21 90 540 752 12; +#X floatatom 183 91; +#X obj 183 115 mtof; +#X floatatom 340 183; +#X obj 164 431 -~; +#N canvas 391 51 561 806 tables 1; +#X graph graph1 0 -1 1002 1 99 322 499 22; +#X array array1 1002 float; +#X pop; +#X graph graph1 0 -1 882 1 96 684 496 384; +#X array array2 882 float; +#X pop; +#X text 138 326 ---------------- 1002 samples ---------------; +#X text 150 693 ---------------- 0.02 sec ---------------; +#X restore 33 201 pd tables; +#N canvas 104 390 728 408 make-table 0; +#X obj 469 146 cos~; +#X obj 303 146 cos~; +#X obj 255 141 cos~; +#X msg 199 210 bang; +#X obj 255 229 tabwrite~ array1; +#X text 366 79 period is 2000 samples \, twice the table length; +#X msg 94 94 \; pd dsp 1; +#X text 118 286 this network puts a half cycle of a band-limited square wave into the table "array1."; +#X text 114 335 logically the half-cycle is in samples 1 through 1000 \; samples 0 and 1001 are provided so that the 4-point interpolation will work everywhere.; +#X text 401 57 back the phase up one sample; +#X msg 336 56 -0.0005; +#X obj 171 16 loadbang; +#X obj 303 120 *~ 3; +#X obj 468 122 *~ 5; +#X obj 303 171 *~ 0.33333; +#X obj 468 172 *~ -0.2; +#X obj 255 169 *~ -1; +#X msg 171 38 bang; +#X obj 254 80 phasor~ 22.05; +#X obj 255 202 *~ 0.57692; +#X connect 0 0 15 0; +#X connect 1 0 14 0; +#X connect 2 0 16 0; +#X connect 3 0 4 0; +#X connect 10 0 18 1; +#X connect 11 0 17 0; +#X connect 12 0 1 0; +#X connect 13 0 0 0; +#X connect 14 0 19 0; +#X connect 15 0 19 0; +#X connect 16 0 19 0; +#X connect 17 0 10 0; +#X connect 17 0 6 0; +#X connect 17 0 3 0; +#X connect 18 0 2 0; +#X connect 18 0 12 0; +#X connect 18 0 13 0; +#X connect 19 0 4 0; +#X restore 34 224 pd make-table; +#X obj 183 163 sig~; +#X obj 341 283 /~; +#X obj 357 256 clip~ 1 999999; +#X obj 183 218 phasor~; +#X obj 196 301 *~; +#X obj 196 325 clip~ -0.5 0.5; +#X floatatom 183 139; +#X obj 196 397 tabread4~ array1; +#X floatatom 340 135; +#X obj 340 206 * 0.33333; +#X obj 340 159 mtof; +#X text 374 110 band limit (MIDI units); +#X text 220 78 pitch; +#X obj 340 87 loadbang; +#X msg 340 111 130; +#X obj 340 230 sig~; +#X text 246 139 frequency; +#X obj 196 349 *~ 1000; +#X obj 196 373 +~ 501; +#X obj 183 242 -~ 0.5; +#X floatatom 206 441; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 177 469 pd output; +#X msg 235 441 MUTE; +#X text 276 440 <-- output amplitude; +#X text 27 503 Patch to make an approximately band-limited sawtooth. This is useful if you intend to use sawtooth generators above about 200 Hz. \, perhaps to use any of the techniques shown in the previous four patches.; +#X text 28 562 We generate a perfect square wave at Nyquist/6 \; this will have partials 1 \, 3 \, and 5 \, but the Nyquist frequency at partial 6 will cut off the rest of the partials. This is stored in array1 using the "make-table" subpatch.; +#X text 64 34 BAND-LIMITED SAWTOOTH GENERATOR; +#X obj 43 459 tabwrite~ array2; +#X msg 44 435 bang; +#X text 28 632 Now any time we wish to make a discontinuity in the output signal \, we make it look exactly like the bandlimited square wave looks. We do this by reading through the table we recorded \, carefully adding a "digital" \, non-band-limited \, sawtooth to "array1" so that the discontinuities in the two cancel out and what you have left is the transition in the table.; +#X text 338 737 updated for Pd version 0.26; +#X text 41 409 graph output; +#X connect 0 0 1 0; +#X connect 1 0 12 0; +#X connect 2 0 15 0; +#X connect 3 0 27 0; +#X connect 3 0 33 0; +#X connect 6 0 8 0; +#X connect 6 0 9 0; +#X connect 7 0 10 1; +#X connect 8 0 7 1; +#X connect 9 0 25 0; +#X connect 10 0 11 0; +#X connect 11 0 23 0; +#X connect 12 0 6 0; +#X connect 13 0 3 0; +#X connect 14 0 16 0; +#X connect 15 0 21 0; +#X connect 16 0 2 0; +#X connect 19 0 20 0; +#X connect 20 0 14 0; +#X connect 21 0 7 0; +#X connect 23 0 24 0; +#X connect 24 0 13 0; +#X connect 25 0 10 0; +#X connect 25 0 3 1; +#X connect 26 0 27 1; +#X connect 27 0 26 0; +#X connect 28 0 27 2; +#X connect 34 0 33 0; diff --git a/pd/doc/3.audio.examples/F01.PART7.filters.pd b/pd/doc/3.audio.examples/F01.PART7.filters.pd new file mode 100644 index 00000000..4a64a0b5 --- /dev/null +++ b/pd/doc/3.audio.examples/F01.PART7.filters.pd @@ -0,0 +1,72 @@ +#N canvas 124 28 964 549 12; +#X floatatom 20 391; +#X floatatom 297 394; +#X floatatom 210 394; +#X graph graph1 0 -1 400 1 544 335 944 35; +#X array orig 400 float; +#X array lop 400 float; +#X array hip 400 float; +#X array bp 400 float; +#X pop; +#X obj 334 457 r metro; +#X obj 180 322 hip~ 100; +#X obj 105 320 lop~ 100; +#X obj 273 322 bp~ 100 10; +#X floatatom 255 245; +#X floatatom 338 295; +#X floatatom 118 393; +#X text 9 11 Filters; +#X msg 87 130 \; pd dsp 1 \; metro bang; +#X msg 191 135 \; pd dsp 0; +#X text 15 417 Original; +#X text 122 417 Low pass; +#X text 210 417 High pass; +#X text 298 416 Band pass; +#X obj 14 517 tabwrite~ orig; +#X obj 309 520 tabwrite~ bp; +#X obj 213 520 tabwrite~ hip; +#X obj 116 519 tabwrite~ lop; +#X text 97 110 start; +#X text 193 111 stop; +#X floatatom 14 235; +#X obj 14 261 osc~ 440; +#X text 51 236 <-- change frequency; +#X text 294 247 <-- center/rolloff frequency; +#X text 374 297 <-- Q; +#X text 548 341 This graph holds 4 arrays for the input and three filter outputs.; +#X text 375 389 RMS amplitudes of the original signal and the three filter outputs; +#X text 746 536 updated for Pd version 0.26; +#X obj 334 482 metro 1000; +#X text 29 33 Pd provides low \, high \, and band pass filters \, as shown here. By changing the test frequency \, the filter frequency \, and the "Q" value \, you can see how these filters affect the amplitude and phase of incoming signals; +#X obj 20 366 env~ 4096; +#X obj 118 368 env~ 4096; +#X obj 210 369 env~ 4096; +#X obj 297 369 env~ 4096; +#X obj 91 213 print~; +#X text 456 434 Notice how the phase of the graphed sinusoids slips back and forth... this is because graphing always starts on the nearest 64-sample boundary to the time the metronome fires. If you run at 48K the slippage disappears \, because then the metronome fires every 48K samples \, which is a multiple of 64; +#X connect 4 0 32 0; +#X connect 5 0 20 0; +#X connect 5 0 36 0; +#X connect 6 0 21 0; +#X connect 6 0 35 0; +#X connect 7 0 19 0; +#X connect 7 0 37 0; +#X connect 8 0 6 1; +#X connect 8 0 5 1; +#X connect 8 0 7 1; +#X connect 9 0 7 2; +#X connect 24 0 25 0; +#X connect 25 0 18 0; +#X connect 25 0 6 0; +#X connect 25 0 5 0; +#X connect 25 0 7 0; +#X connect 25 0 34 0; +#X connect 25 0 38 0; +#X connect 32 0 18 0; +#X connect 32 0 21 0; +#X connect 32 0 20 0; +#X connect 32 0 19 0; +#X connect 34 0 0 0; +#X connect 35 0 10 0; +#X connect 36 0 2 0; +#X connect 37 0 1 0; diff --git a/pd/doc/3.audio.examples/F02.bandpass.pd b/pd/doc/3.audio.examples/F02.bandpass.pd new file mode 100644 index 00000000..0ce9cc47 --- /dev/null +++ b/pd/doc/3.audio.examples/F02.bandpass.pd @@ -0,0 +1,146 @@ +#N canvas 58 17 943 765 12; +#X floatatom 91 731 0 0 0; +#X graph graph1 0 -1 155947 1 624 401 824 251; +#X array array1 155948 float 0; +#X pop; +#X floatatom 247 705 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 406 192 t b; +#X obj 406 132 f; +#X obj 406 72 inlet; +#X text 413 35 mute; +#X obj 406 222 f; +#X msg 510 214 0; +#X msg 406 102 bang; +#X obj 406 162 moses 1; +#X obj 510 184 t b f; +#X obj 476 140 moses 1; +#X obj 100 178 dbtorms; +#X obj 476 110 r master-lvl; +#X obj 100 50 r master-lvl; +#X obj 406 252 s master-lvl; +#X obj 26 217 inlet~; +#X obj 239 49 inlet; +#X text 239 22 level; +#X obj 239 120 s master-lvl; +#X msg 115 78 set \$1; +#X obj 115 107 outlet; +#X msg 257 77 \; pd dsp 1; +#X obj 100 233 line~; +#X obj 26 254 *~; +#X obj 26 289 dac~; +#X obj 100 205 pack 0 50; +#X text 24 190 audio; +#X text 112 132 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 210 740 pd output; +#X msg 280 707 MUTE; +#X text 320 706 <-- output amplitude; +#X obj 206 654 hip~ 5; +#X obj 31 545 tabread4~ array1; +#X obj 31 340 r totsamps; +#X obj 31 430 /; +#X obj 206 625 bp~; +#X obj 206 596 bp~; +#X obj 216 463 mtof; +#X floatatom 216 491 0 0 0; +#X floatatom 319 570 0 0 0; +#X obj 319 541 r q; +#X floatatom 216 434 0 0 0; +#X msg 227 550 \; p set \$1; +#X obj 216 406 r p; +#X obj 90 647 env~ 4096; +#X obj 31 487 *~ 0; +#X obj 31 458 phasor~ 0; +#X obj 31 516 +~ 1; +#X obj 227 521 ftom; +#X msg 826 49 \; pd dsp 0; +#X obj 90 674 + 0.5; +#X obj 91 702 int; +#X msg 31 400 44100; +#X obj 31 368 t b f; +#X text 648 14 START; +#X text 845 19 STOP; +#X text 88 11 BANDPASS FILTERS; +#X text 12 41 In this example we use two cascaded bandpass filters +to troll for partials in Jonathan Harvey's famous bell sample.; +#X obj 78 487 r totsamps; +#X text 14 82 Note that filters can give unexpected level changes. +The bp~ object is designed to have roughly unit gain at teh pass band +\, so the higher you set "Q" the more amplitude is lost. YOu can correct +for this by pushing the output amplitude \, but be sure to remember +to reset the output amplitude before you reduce Q again. I set the +Q to 100 and the output amplitude to 110 or 120 (with the room gain +way down.) Then holding the shift key \, slowly drag the center pitch +upward listening for modes.; +#X text 16 233 You can hear partials around 48 \, 51.3 \, 55 (faint!) +\, 57 (fainter!) \, 60 \, two beating partials around 65 \, 67 \, 69 +\, 70.9 \, 71.75 \, 72.6 \, 74 \, 74.65 \, 75.6 \, 77 \, 81.2 \, 84.6 +\, 86.5 \, and probably many more. There's also one down at 36 \, but +it's easier to see it on the meter than hear it.; +#X text 271 436 <-- center pitch; +#X text 281 450 (shift-drag to fine tune); +#X text 292 492 <-- center frequency; +#X text 359 570 <-- Q (filter selectivity); +#X obj 683 453 r readfile; +#X obj 683 530 soundfiler; +#X msg 683 503 read -resize \$1 array1; +#X obj 683 478 symbol; +#X msg 553 48 \; readfile ../sound/bell.aiff \; totsamps 143718 \; +p 69 \; q 0 \; pd dsp 1; +#X text 681 739 updated for Pd version 0.33; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 6 0 3 0; +#X connect 7 0 11 0; +#X connect 8 0 28 0; +#X connect 9 0 21 0; +#X connect 10 0 6 0; +#X connect 10 0 19 0; +#X connect 11 0 10 0; +#X connect 12 0 13 0; +#X connect 13 0 11 1; +#X connect 13 0 10 1; +#X connect 13 0 23 0; +#X connect 14 0 11 2; +#X connect 14 0 10 2; +#X connect 15 0 14 0; +#X connect 16 0 12 0; +#X connect 18 0 16 0; +#X connect 19 0 25 0; +#X connect 20 0 22 0; +#X connect 21 0 20 0; +#X connect 22 0 7 0; +#X connect 23 0 17 0; +#X connect 25 0 26 0; +#X connect 26 0 0 0; +#X connect 27 0 9 0; +#X connect 28 0 27 0; +#X connect 28 1 9 1; +#X connect 33 0 20 1; +#X connect 40 0 43 0; +#X connect 42 0 41 0; +#X connect 43 0 42 0; diff --git a/pd/doc/3.audio.examples/F03.filter.sweep.pd b/pd/doc/3.audio.examples/F03.filter.sweep.pd new file mode 100644 index 00000000..0d478275 --- /dev/null +++ b/pd/doc/3.audio.examples/F03.filter.sweep.pd @@ -0,0 +1,173 @@ +#N canvas 194 58 693 586 12; +#X text 437 559 updated for Pd version 0.26; +#X floatatom 70 539 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 41 567 pd output; +#X msg 99 539 MUTE; +#X text 138 538 <-- output amplitude; +#X obj 41 212 line~; +#X floatatom 41 164 0 0 0; +#X obj 41 188 pack 0 100; +#X obj 528 110 loadbang; +#X text 35 6 SWEEPING FILTERS; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 302 48 graph; +#X text 504 141 0; +#X text 506 41 10; +#X text 321 151 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 309 225 graph; +#X text 319 333 ------ 130 samples ------; +#X text 518 318 0; +#X text 520 218 12000; +#X restore 461 256 pd conversion-tables; +#X obj 41 260 phasor~; +#X obj 41 236 tabread4~ mtof; +#X obj 174 384 +~; +#X obj 190 361 line~; +#X obj 190 337 pack 0 100; +#X floatatom 190 313 0 0 0; +#X floatatom 174 164 0 0 0; +#X floatatom 197 238 0 0 0; +#X obj 41 140 r pitch; +#X obj 197 214 r depth; +#X obj 174 140 r speed; +#X obj 190 289 r offset; +#X obj 121 465 r q; +#X floatatom 121 489 0 0 0; +#X obj 41 484 vcf~; +#X obj 41 508 hip~ 5; +#X obj 174 263 *~ 0; +#X obj 174 188 phasor~ 0; +#X obj 174 408 tabread4~ mtof; +#X msg 528 134 \; pitch 48 \; speed -2 \; depth 27 \; offset 56 \; +q 2; +#X text 160 490 <-- Q (selectivity); +#X text 51 277 sawtooth; +#X text 50 291 oscillator; +#X text 228 167 <-- sweep speed; +#X text 265 189 LFO for sweep; +#X text 251 241 <-- sweep depth; +#X text 242 316 <-- base center frequency; +#X text 218 383 add base to sweep; +#X text 307 408 convert to Hz.; +#X text 13 28 If you want actively changing center frequencies \, use +"vcf~" instead of "bp~". The vcf~ module takes an audio signal to set +center frequency. (Q is still set by messages though.) Vcf is somewhat +more expensive than bp~.; +#X text 78 165 <-- pitch; +#X text 13 95 Note the effect of negative and positive sweep speed. +; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 12 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X connect 8 0 30 0; +#X connect 11 0 25 0; +#X connect 12 0 11 0; +#X connect 13 0 29 0; +#X connect 14 0 13 1; +#X connect 15 0 14 0; +#X connect 16 0 15 0; +#X connect 17 0 28 0; +#X connect 18 0 27 1; +#X connect 19 0 6 0; +#X connect 20 0 18 0; +#X connect 21 0 17 0; +#X connect 22 0 16 0; +#X connect 23 0 24 0; +#X connect 24 0 25 2; +#X connect 25 0 26 0; +#X connect 26 0 2 0; +#X connect 27 0 13 0; +#X connect 28 0 27 0; +#X connect 29 0 25 1; diff --git a/pd/doc/3.audio.examples/F04.filter.floyd.pd b/pd/doc/3.audio.examples/F04.filter.floyd.pd new file mode 100644 index 00000000..02027117 --- /dev/null +++ b/pd/doc/3.audio.examples/F04.filter.floyd.pd @@ -0,0 +1,193 @@ +#N canvas 133 190 795 593 12; +#X floatatom 44 540 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 15 568 pd output; +#X msg 90 540 MUTE; +#X text 151 539 <-- output amplitude; +#X obj 487 217 loadbang; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 302 48 graph; +#X text 504 141 0; +#X text 506 41 10; +#X text 321 151 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 309 225 graph; +#X text 319 333 ------ 130 samples ------; +#X text 518 318 0; +#X text 520 218 12000; +#X restore 490 428 pd conversion-tables; +#X obj 250 308 line~; +#X obj 250 284 pack 0 100; +#X floatatom 251 213 0 0 0; +#X obj 171 413 r q; +#X floatatom 171 437 0 0 0; +#X obj 15 492 vcf~; +#X obj 15 516 hip~ 5; +#X obj 250 333 tabread4~ mtof; +#X text 214 436 <-- Q (selectivity); +#X text 277 354 convert to Hz.; +#X text 35 6 ANOTHER SWEEPING FILTER EXAMPLE; +#X obj 15 286 clip~ 0 0.5; +#X obj 15 310 *~ 2; +#X obj 15 334 -~; +#X text 121 270 trick to; +#X text 121 291 make symmetric; +#X text 121 312 triangle wave; +#X obj 31 161 f; +#X obj 64 159 + 1; +#X obj 31 211 tabread array1; +#X obj 31 235 mtof; +#X obj 31 113 r metro; +#X obj 64 183 mod 8; +#X obj 31 259 phasor~ 0; +#N canvas 0 0 450 300 graph1 0; +#X array array1 8 float 0; +#X coords 0 96 8 36 200 100 1; +#X restore 464 75 graph; +#X obj 251 189 r cf; +#X text 293 210 <-- center frequency; +#X obj 31 137 metro 85; +#X obj 15 376 hip~ 5000; +#X obj 15 399 *~ 100; +#X obj 252 237 moses 61; +#X msg 251 260 61; +#X msg 487 241 \; cf 61 \; q 30 \; metro 1 \; array1 0 45 48 50 48 +55 53 55 57; +#X text 13 28 Here's an approximate reconstruction of an old riff by +Pink Floyd (I haven't checked the tempo or transposition against the +original yet.) Because we're filtering a waveform with odd partials +\, it's easier to pick out the partials in the filtered sound.; +#X text 104 352 Here we fudge; +#X text 100 371 to better imitate; +#X text 100 390 the EMS3 bandpass; +#X text 85 403 sound; +#X text 340 231 protect against; +#X text 341 252 hitting the; +#X text 341 271 fundamental; +#X text 137 139 sequencer for; +#X text 137 158 8 note loop; +#X obj 171 459 moses 1; +#X msg 144 459 1; +#X text 241 460 speaker protection; +#X text 437 558 updated for Pd version 0.35; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 38 0; +#X connect 6 0 13 0; +#X connect 7 0 6 0; +#X connect 8 0 36 0; +#X connect 9 0 10 0; +#X connect 10 0 49 0; +#X connect 11 0 12 0; +#X connect 12 0 1 0; +#X connect 13 0 11 1; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 34 0; +#X connect 23 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 28 0; +#X connect 25 0 26 0; +#X connect 26 0 29 0; +#X connect 27 0 33 0; +#X connect 28 0 23 1; +#X connect 29 0 17 0; +#X connect 29 0 19 1; +#X connect 31 0 8 0; +#X connect 33 0 23 0; +#X connect 34 0 35 0; +#X connect 35 0 11 0; +#X connect 36 0 37 0; +#X connect 36 1 7 0; +#X connect 37 0 7 0; +#X connect 49 0 50 0; +#X connect 49 1 11 2; +#X connect 50 0 11 2; diff --git a/pd/doc/3.audio.examples/F05.filter.noise.pd b/pd/doc/3.audio.examples/F05.filter.noise.pd new file mode 100644 index 00000000..7421c180 --- /dev/null +++ b/pd/doc/3.audio.examples/F05.filter.noise.pd @@ -0,0 +1,196 @@ +#N canvas 137 175 735 587 12; +#X text 437 559 updated for Pd version 0.26; +#X floatatom 67 397 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 38 425 pd output; +#X msg 96 397 MUTE; +#X text 135 396 <-- output amplitude; +#X obj 515 150 loadbang; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 449 418 pd conversion-tables; +#X obj 49 201 line~; +#X obj 49 177 pack 0 100; +#X floatatom 49 151 0 0 0; +#X obj 88 254 r q; +#X floatatom 88 278 0 0 0; +#X obj 38 342 vcf~; +#X obj 38 366 hip~ 5; +#X obj 49 226 tabread4~ mtof; +#X text 124 277 <-- Q (selectivity); +#X obj 49 127 r cf; +#X text 84 145 <-- center frequency; +#X text 35 6 FILTERING NOISE; +#X obj 39 102 noise~; +#X msg 515 174 \; cf 60 \; q 3 \;; +#X text 13 28 THe noise~ module puts out unit-amplitude white noise. +Be careful again here about surging amplitudes if Q hits zero.; +#X obj 88 305 moses 1; +#X msg 60 305 1; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 20 0; +#X connect 7 0 14 0; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 10 0 11 0; +#X connect 11 0 22 0; +#X connect 12 0 13 0; +#X connect 13 0 2 0; +#X connect 14 0 12 1; +#X connect 16 0 9 0; +#X connect 19 0 12 0; +#X connect 22 0 23 0; +#X connect 22 1 12 2; +#X connect 23 0 12 2; diff --git a/pd/doc/3.audio.examples/F06.ring.modulation.pd b/pd/doc/3.audio.examples/F06.ring.modulation.pd new file mode 100644 index 00000000..0380a07d --- /dev/null +++ b/pd/doc/3.audio.examples/F06.ring.modulation.pd @@ -0,0 +1,153 @@ +#N canvas 1 23 809 567 12; +#X graph graph1 0 -1.02 882 1.02 542 471 742 341; +#X array pulse-output 882 float 0; +#X pop; +#X floatatom 101 331 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 63 359 pd output; +#X msg 139 332 MUTE; +#X text 179 331 <-- output amplitude; +#X floatatom 63 48 0 0 0; +#X obj 63 303 hip~ 5; +#X graph graph1 0 0 128 1000 490 259 746 129; +#X array spectrum 128 float 0; +#X pop; +#X obj 129 278 tabwrite~ pulse-output; +#X msg 129 243 bang; +#X text 170 244 <-- click to graph; +#N canvas 204 17 358 234 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 2048 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 74 281 pd fft; +#X text 488 265 0; +#X obj 79 194 osc~ 0; +#N canvas 0 0 600 384 pulse-train 0; +#X obj 185 162 line~; +#X obj 39 251 cos~; +#X obj 185 138 pack 0 50; +#X obj 40 178 -~ 0.5; +#X obj 40 204 *~; +#X obj 185 63 / 10; +#X obj 185 87 moses 0; +#X msg 185 111 0; +#X obj 39 227 clip~ -0.5 0.5; +#X obj 185 187 +~ 1; +#X obj 38 274 +~ 1; +#X obj 184 38 inlet; +#X obj 38 299 outlet~; +#X obj 40 154 phasor~ 344.532; +#X text 51 13 This is the pulse train generator from example 17; +#X connect 0 0 9 0; +#X connect 1 0 10 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 6 1 2 0; +#X connect 7 0 2 0; +#X connect 8 0 1 0; +#X connect 9 0 4 1; +#X connect 10 0 12 0; +#X connect 11 0 5 0; +#X connect 13 0 3 0; +#X restore 63 75 pd pulse-train; +#X floatatom 79 168 0 0 0; +#X text 124 167 <-- modulation frequency; +#X text 102 48 <-- bandwidth; +#X obj 63 218 *~; +#X text 736 262 2656 Hz.; +#X text 196 77 fundamental is 344.5 Hz; +#X text 157 210 an oscillator...; +#X text 66 22 RING MODULATION; +#X text 542 473 ---- 0.02 seconds ----; +#X text 528 533 updated for Pd version 0.34; +#X text 156 195 Just multiply by; +#X text 12 422 Ring modulation is just multiplication by an oscillator. +This patch shows the effect of ring modulation on a pulse train. When +bandwidth is high and modulation frequency is moderately low \, you +see the spectrum reflect off the "y axis".; +#X obj 79 140 * 344.5; +#X floatatom 79 114 0 0 0; +#X text 120 114 <-- modulation frequency as; +#X text 159 128 multiple of fundamental; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 14 0; +#X connect 6 0 2 0; +#X connect 9 0 8 0; +#X connect 9 0 11 1; +#X connect 13 0 18 1; +#X connect 14 0 18 0; +#X connect 15 0 13 0; +#X connect 18 0 11 0; +#X connect 18 0 6 0; +#X connect 18 0 8 0; +#X connect 27 0 15 0; +#X connect 28 0 27 0; diff --git a/pd/doc/3.audio.examples/F07.ssb.modulation.pd b/pd/doc/3.audio.examples/F07.ssb.modulation.pd new file mode 100644 index 00000000..968b3b45 --- /dev/null +++ b/pd/doc/3.audio.examples/F07.ssb.modulation.pd @@ -0,0 +1,150 @@ +#N canvas 7 6 923 594 12; +#X obj 170 349 phasor~ 0; +#X obj 170 393 cos~; +#X obj 206 371 +~ -0.25; +#X obj 206 394 cos~; +#X obj 23 438 *~; +#X obj 88 438 *~; +#X obj 22 462 -~; +#X floatatom 170 322 0 0 0; +#X obj 23 238 tabread4~ array1; +#X obj 23 67 r totsamps; +#X obj 23 142 /; +#X obj 23 190 *~ 0; +#X obj 23 166 phasor~ 0; +#X obj 23 214 +~ 1; +#X msg 23 117 44100; +#X obj 23 91 t b f; +#X obj 62 190 r totsamps; +#X msg 636 38 \; pd dsp 0; +#X text 429 14 START; +#X text 653 20 STOP; +#X floatatom 51 499 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 22 527 pd output; +#X msg 87 500 MUTE; +#X text 121 499 <-- output amplitude; +#N canvas 0 0 600 388 hilbert 0; +#X obj 166 190 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1; +#X obj 166 164 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1; +#X obj 99 111 biquad~ -0.02569 0.260502 -0.260502 0.02569 1; +#X obj 99 137 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1; +#X obj 98 76 inlet~; +#X obj 166 213 outlet~; +#X obj 99 213 outlet~; +#X text 95 261 This is a pair of all-pass filters whose outputs somehow +manage to be about 90 degrees out of phase from each other. I don't +know what phase relation they have with the original signal. I adapted +this from a 4X patch by Emmanuel Favreau \, circa 1982; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 1 0; +#X connect 4 0 2 0; +#X restore 23 400 pd hilbert; +#X graph graph1 0 -1 155947 1 441 284 641 134; +#X array array1 155948 float 0; +#X pop; +#X text 36 257 sample loop for; +#X text 36 271 test signal; +#X text 35 314 pair of allpass; +#X text 34 333 filters to make; +#X text 34 353 90 degree phase; +#X text 32 373 shifted versions; +#X text 201 323 <-- shift frequency; +#X text 122 438 <-- complex multiply; +#X text 123 452 (calculate real part); +#X text 161 412 cosine and sine waves; +#X text 55 7 SINGLE SIDEBAND MODULATION; +#X text 55 26 (AKA FREQUENCY SHIFTING); +#X text 394 296 The signal sideband modulator gives you only one sideband +for each frequency in teh input signal (whereas ring modulation gave +both a positie and negative sideband.) You can set the shift frequency +positive to shift all frequencies upward \, or negative to shift them +downwards.; +#X obj 484 417 r readfile; +#X msg 334 34 \; readfile ../sound/bell.aiff \; pd dsp 1; +#X obj 484 444 symbol; +#X msg 483 470 read -resize \$1 array1; +#X obj 483 496 soundfiler; +#X obj 483 521 s totsamps; +#X text 671 568 updated for Pd version 0.33; +#X connect 0 0 2 0; +#X connect 0 0 1 0; +#X connect 1 0 4 1; +#X connect 2 0 3 0; +#X connect 3 0 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 1; +#X connect 6 0 21 0; +#X connect 7 0 0 0; +#X connect 8 0 24 0; +#X connect 9 0 15 0; +#X connect 10 0 12 0; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 13 0 8 0; +#X connect 14 0 10 0; +#X connect 15 0 14 0; +#X connect 15 1 10 1; +#X connect 16 0 11 1; +#X connect 20 0 21 1; +#X connect 21 0 20 0; +#X connect 22 0 21 2; +#X connect 24 0 4 0; +#X connect 24 1 5 0; +#X connect 39 0 41 0; +#X connect 41 0 42 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; diff --git a/pd/doc/3.audio.examples/G01.delays.pd b/pd/doc/3.audio.examples/G01.delays.pd new file mode 100644 index 00000000..5c4f20de --- /dev/null +++ b/pd/doc/3.audio.examples/G01.delays.pd @@ -0,0 +1,225 @@ +#N canvas 22 1 729 584 12; +#X floatatom 62 506 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 33 534 pd output; +#X msg 91 506 MUTE; +#X text 130 505 <-- output amplitude; +#X obj 33 482 hip~ 5; +#X text 92 12 DELAYS; +#X obj 33 341 -~; +#X obj 30 241 tabread4~ mtof; +#X obj 33 317 *~ 3; +#X obj 69 318 *~ 2; +#X obj 49 266 phasor~; +#X floatatom 81 215 0 0 0; +#X obj 33 293 clip~ 0 0.667; +#X obj 30 190 line~; +#X obj 30 165 pack 0 1000; +#X obj 28 64 metro 1000; +#X obj 28 88 random 200; +#X obj 29 114 - 100; +#X obj 30 141 * 0.001; +#X obj 33 453 +~; +#X obj 44 374 delwrite~ delay1 2000; +#X floatatom 49 401 0 0 0; +#X obj 49 426 delread~ delay1 1000; +#X obj 27 41 loadbang; +#X text 210 37 You can delay a signal using the delwrite~ and delread~ +objects. In this example \, the pitch of the oscillator is varying +slightly so that the delayed signal is different from the straight +signal.; +#X text 212 99 delread always delays the signal an integer number of +samples and does no interpolation.; +#X text 211 137 The delwrite~ object creates the delay line \; you +give it a name and a size in milliseconds. Each delwrite~ should have +a different name.; +#X text 209 184 Delread~'s arguments are the name of a delwrite (of +which there should be exactly one) and a delay time in milliseconds +between 0 and the length of the delay line. Each delwrite~ may have +as many delread~s as you wish \, which function as multiple delay taps. +; +#X obj 30 215 +~ 60; +#X text 112 215 <-- pitch; +#X text 83 401 <-- delay time; +#X text 60 341 asymmetric triangle wave; +#X text 236 372 write to delay line; +#X text 232 425 read from delay line; +#X text 59 454 add the original and the delayed signal; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 449 418 pd conversion-tables; +#X text 427 536 updated for Pd version 0.35; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 1 0; +#X connect 6 0 19 0; +#X connect 6 0 20 0; +#X connect 7 0 10 0; +#X connect 8 0 6 0; +#X connect 9 0 6 1; +#X connect 10 0 9 0; +#X connect 10 0 12 0; +#X connect 11 0 28 1; +#X connect 12 0 8 0; +#X connect 13 0 28 0; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 14 0; +#X connect 19 0 4 0; +#X connect 21 0 22 0; +#X connect 22 0 19 1; +#X connect 23 0 15 0; +#X connect 28 0 7 0; diff --git a/pd/doc/3.audio.examples/G02.delay.loop.pd b/pd/doc/3.audio.examples/G02.delay.loop.pd new file mode 100644 index 00000000..71b35253 --- /dev/null +++ b/pd/doc/3.audio.examples/G02.delay.loop.pd @@ -0,0 +1,213 @@ +#N canvas 22 1 630 601 12; +#X text 309 531 updated for Pd version 0.26; +#X floatatom 58 505 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 29 533 pd output; +#X msg 87 505 MUTE; +#X text 126 504 <-- output amplitude; +#X obj 29 476 hip~ 5; +#X obj 29 297 -~; +#X obj 29 273 *~ 3; +#X obj 66 279 *~ 2; +#X floatatom 29 177 0 0 0; +#X obj 29 249 clip~ 0 0.667; +#X obj 39 450 delwrite~ delay1 2000; +#X floatatom 45 353 0 0 0; +#X text 79 176 <-- pitch; +#X text 75 352 <-- delay time; +#X text 238 450 write to delay line; +#X text 226 378 read from delay line; +#X text 64 426 add the original and the delayed signal; +#X obj 29 201 mtof; +#X msg 135 238 1; +#X obj 29 321 *~; +#X obj 29 225 phasor~ 0; +#X obj 135 286 tabread4~ dbtorms; +#X obj 135 262 adsr 100 100 2000 0 2000; +#X obj 29 427 +~; +#X obj 45 377 delread~ delay1 160; +#X obj 45 401 *~ 0.7; +#X text 103 401 feedback gain; +#X text 57 9 DELAYS WITH FEEDBACK; +#X text 33 39 You can feed the result of a delread~ module back into +its own delwrite~ \, as long as you're careful about stability. For +delays below 30 msec \, you can frequently hear teh resonant pitch. +For longer delay times you get the famous old delay loop effect.; +#X text 32 118 We've added an amplitude control here so that teh test +oscillator only speaks while you're dragging the pitch up and down. +Be sure to try the shift key.; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 334 483 pd conversion-tables; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 2 0; +#X connect 6 0 20 0; +#X connect 7 0 6 0; +#X connect 8 0 6 1; +#X connect 9 0 18 0; +#X connect 9 0 19 0; +#X connect 10 0 7 0; +#X connect 12 0 25 0; +#X connect 18 0 21 0; +#X connect 19 0 23 0; +#X connect 20 0 24 0; +#X connect 21 0 8 0; +#X connect 21 0 10 0; +#X connect 22 0 20 1; +#X connect 23 0 22 0; +#X connect 24 0 11 0; +#X connect 24 0 5 0; +#X connect 25 0 26 0; +#X connect 26 0 24 1; diff --git a/pd/doc/3.audio.examples/G03.delay.variable.pd b/pd/doc/3.audio.examples/G03.delay.variable.pd new file mode 100644 index 00000000..bb16de95 --- /dev/null +++ b/pd/doc/3.audio.examples/G03.delay.variable.pd @@ -0,0 +1,129 @@ +#N canvas 100 17 671 522 12; +#X obj 63 306 hip~ 10; +#X floatatom 331 222; +#X obj 331 270 line~; +#X obj 331 246 pack 0 100; +#X floatatom 256 192; +#X floatatom 442 297; +#X obj 442 369 line~; +#X obj 442 345 pack 0 100; +#X obj 442 321 * 0.01; +#X floatatom 143 167; +#X obj 143 238 line~; +#X obj 143 214 pack 0 100; +#X obj 63 258 *~; +#X obj 63 282 cos~; +#X floatatom 63 135; +#X obj 63 159 mtof; +#X obj 63 183 * 0.5; +#X obj 63 330 clip~ -0.2 0.2; +#X obj 143 190 * 0.01; +#X obj 426 444 delwrite~ delay1 1000; +#X obj 63 354 +~; +#X obj 426 396 *~; +#X obj 256 336 vd~ delay1; +#X obj 256 288 *~; +#X obj 256 216 / 100; +#X floatatom 93 419; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 64 447 pd output; +#X msg 122 419 MUTE; +#X text 161 418 <-- output amplitude; +#X obj 63 378 hip~ 5; +#X text 401 505 updated for Pd version 0.26; +#X obj 256 264 +~ 1; +#X obj 256 240 osc~ 0; +#X obj 256 312 +~ 1.46; +#X obj 426 420 clip~ -5 5; +#X text 43 35 This is a fuzzed FM generator going into a delay loop \, this time using a variable delay object (vd~). You can get several interesting effects this way. We have taken the precaution if clipping inside the loop to avoid instabilities. You can push the loop gain past 1 if you want \, it will just uscillate.; +#X text 184 165 <-- timbre; +#X text 96 136 <-- pitch; +#X text 300 192 <-- cycle frequency (hundredths); +#X text 361 222 <-- cycle depth (msec); +#X text 491 298 <-- feedback (hundredths); +#X text 86 9 VARIABLE DELAYS; +#X obj 63 207 osc~ 0; +#X connect 0 0 17 0; +#X connect 1 0 3 0; +#X connect 2 0 23 1; +#X connect 3 0 2 0; +#X connect 4 0 24 0; +#X connect 5 0 8 0; +#X connect 6 0 21 1; +#X connect 7 0 6 0; +#X connect 8 0 7 0; +#X connect 9 0 18 0; +#X connect 10 0 12 1; +#X connect 11 0 10 0; +#X connect 12 0 13 0; +#X connect 13 0 0 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 42 0; +#X connect 17 0 20 0; +#X connect 18 0 11 0; +#X connect 20 0 29 0; +#X connect 21 0 34 0; +#X connect 22 0 20 1; +#X connect 23 0 33 0; +#X connect 24 0 32 0; +#X connect 25 0 26 1; +#X connect 26 0 25 0; +#X connect 27 0 26 2; +#X connect 29 0 26 0; +#X connect 29 0 21 0; +#X connect 31 0 23 0; +#X connect 32 0 31 0; +#X connect 33 0 22 0; +#X connect 34 0 19 0; +#X connect 42 0 12 0; diff --git a/pd/doc/3.audio.examples/G04.delay.pitchshift.pd b/pd/doc/3.audio.examples/G04.delay.pitchshift.pd new file mode 100644 index 00000000..feb56e2f --- /dev/null +++ b/pd/doc/3.audio.examples/G04.delay.pitchshift.pd @@ -0,0 +1,226 @@ +#N canvas 93 36 1005 580 12; +#X obj 19 493 hip~ 5; +#X floatatom 19 87 0 0 0; +#X obj 84 359 *~; +#X obj 192 290 line~; +#X floatatom 265 114 0 0 0; +#X text 68 9 PITCH SHIFTER; +#X obj 192 264 pack 0 200; +#X obj 266 141 moses 1; +#X msg 227 141 1; +#X obj 266 88 r window; +#X obj 19 61 r transpose; +#X obj 19 143 exp; +#X floatatom 19 169 0 0 0; +#X obj 19 259 /; +#X obj 146 189 * 0.001; +#X obj 314 366 line~; +#X obj 315 338 pack 0 200; +#X floatatom 315 258 0 0 0; +#X text 314 202 delay (msec); +#X obj 315 232 r delay; +#X obj 84 385 +~; +#X msg 315 311 1; +#X obj 315 285 moses 1.5; +#X obj 84 411 vd~ delay1; +#X obj 19 410 cos~; +#X obj 19 437 *~; +#X obj 19 466 +~; +#X obj 106 317 wrap~; +#X obj 251 360 *~; +#X obj 251 393 +~; +#X obj 251 422 vd~ delay1; +#X obj 188 420 cos~; +#X obj 188 447 *~; +#X msg 492 56 \; transpose 0 \; window 100 \; delay 0; +#X obj 492 30 loadbang; +#X obj 264 42 delwrite~ delay1 5000; +#X obj 146 216 t b f; +#X floatatom 19 285 0 0 0; +#X obj 19 312 phasor~ 0; +#X floatatom 51 526 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 372 176 t b; +#X obj 372 121 f; +#X obj 372 66 inlet; +#X text 378 32 mute; +#X obj 372 204 f; +#X msg 468 196 0; +#X msg 372 94 bang; +#X obj 372 149 moses 1; +#X obj 468 168 t b f; +#X obj 437 129 moses 1; +#X obj 91 163 dbtorms; +#X obj 437 101 r master-lvl; +#X obj 91 46 r master-lvl; +#X obj 372 231 s master-lvl; +#X obj 24 199 inlet~; +#X obj 219 45 inlet; +#X text 219 20 level; +#X obj 219 110 s master-lvl; +#X msg 106 72 set \$1; +#X obj 106 98 outlet; +#X msg 235 70 \; pd dsp 1; +#X obj 91 213 line~; +#X obj 24 233 *~; +#X obj 24 265 dac~; +#X obj 91 188 pack 0 50; +#X text 22 174 audio; +#X text 102 121 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 19 557 pd output; +#X msg 83 526 MUTE; +#X text 125 525 <-- output amplitude; +#X obj 106 290 +~ 0.5; +#X obj 19 358 -~ 0.5; +#X obj 19 384 *~ 0.5; +#X obj 188 359 -~ 0.5; +#X obj 188 392 *~ 0.5; +#X floatatom 227 167 0 0 0; +#X obj 19 196 - 1; +#X obj 19 117 * 0.05776; +#X obj 19 222 * -1; +#X text 53 86 <-- transposition; +#X text 96 99 (halftones); +#X text 86 177 speed; +#X text 85 191 change; +#X text 310 113 <--window (msec); +#X text 54 252 tape head; +#X text 55 265 rotation speed; +#N canvas 0 0 612 637 test-input 0; +#X graph graph1 0 -1 155947 1 150 291 350 141; +#X array array1 155948 float 0; +#X pop; +#X obj 139 518 tabread4~ array1; +#X obj 139 333 r totsamps; +#X obj 139 413 /; +#X obj 139 465 *~ 0; +#X obj 139 439 phasor~ 0; +#X obj 139 492 +~ 1; +#X msg 139 386 44100; +#X obj 139 360 t b f; +#X obj 182 469 r totsamps; +#X text 153 538 sample loop for; +#X text 153 555 test signal; +#X obj 162 30 loadbang; +#X obj 139 590 outlet~; +#X obj 393 169 r readfile; +#X obj 393 199 symbol; +#X msg 392 228 read -resize \$1 array1; +#X obj 392 256 soundfiler; +#X obj 392 284 s totsamps; +#X msg 161 64 \; readfile ../sound/bell.aiff; +#X connect 1 0 13 0; +#X connect 2 0 8 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 6 0 1 0; +#X connect 7 0 3 0; +#X connect 8 0 7 0; +#X connect 8 1 3 1; +#X connect 9 0 4 1; +#X connect 12 0 19 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X restore 264 11 pd test-input; +#X text 439 161 This is a classic rotating-tape-head style pitch shifter +using the vd~ variable delay object. Ther are two moving tape heads +\, each of which is loudest at the middle of its trajectory \, and +enveloped out at the moment it has to jump back (or forward) to start +another scratch. Most of the brain work is in computing how fast the +tape heads have to move to get the desired transposition.; +#X text 439 280 The "window size" is the total trajectory of the read +points in the delay line \, in milliseconds. The delay times are controlled +by a phasor~ object. The second delay time \, 180 degrees out of phase +from the first one \, is computed using the "wrap" object.; +#X text 437 370 The "window size" is the total trajectory of the read +points in the delay line \, in milliseconds. The delay times are controlled +by a phasor~ object. The second delay time \, 180 degrees out of phase +from the first one \, is computed using the "wrap" object.; +#X text 436 462 The cos~ objects compute the fadein and fadeout of +the two delay line outputs. They each traverse the positive half of +the cosine waveform (phase -0.25 to +0.25) over the time the phase +goes from one end to the other.; +#X text 757 557 updated for Pd version 0.33; +#X connect 0 0 40 0; +#X connect 1 0 50 0; +#X connect 2 0 20 0; +#X connect 3 0 2 1; +#X connect 3 0 28 1; +#X connect 4 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 8 0; +#X connect 7 1 48 0; +#X connect 8 0 48 0; +#X connect 9 0 4 0; +#X connect 10 0 1 0; +#X connect 11 0 12 0; +#X connect 12 0 49 0; +#X connect 13 0 37 0; +#X connect 14 0 36 0; +#X connect 15 0 20 1; +#X connect 15 0 29 1; +#X connect 16 0 15 0; +#X connect 17 0 22 0; +#X connect 19 0 17 0; +#X connect 20 0 23 0; +#X connect 21 0 16 0; +#X connect 22 0 21 0; +#X connect 22 1 16 0; +#X connect 23 0 25 1; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 0 0; +#X connect 27 0 28 0; +#X connect 27 0 46 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 32 1; +#X connect 31 0 32 0; +#X connect 32 0 26 1; +#X connect 34 0 33 0; +#X connect 36 0 13 0; +#X connect 36 1 13 1; +#X connect 37 0 38 0; +#X connect 38 0 2 0; +#X connect 38 0 44 0; +#X connect 38 0 43 0; +#X connect 39 0 40 1; +#X connect 40 0 39 0; +#X connect 41 0 40 2; +#X connect 43 0 27 0; +#X connect 44 0 45 0; +#X connect 45 0 24 0; +#X connect 46 0 47 0; +#X connect 47 0 31 0; +#X connect 48 0 6 0; +#X connect 48 0 14 0; +#X connect 49 0 51 0; +#X connect 50 0 11 0; +#X connect 51 0 13 0; +#X connect 59 0 35 0; diff --git a/pd/doc/3.audio.examples/G05.delay.reverb.pd b/pd/doc/3.audio.examples/G05.delay.reverb.pd new file mode 100644 index 00000000..aad17023 --- /dev/null +++ b/pd/doc/3.audio.examples/G05.delay.reverb.pd @@ -0,0 +1,316 @@ +#N canvas 127 171 643 406 12; +#N canvas 0 0 499 321 test-input 0; +#X obj 75 253 outlet~; +#X obj 74 201 -~; +#X obj 74 177 *~ 3; +#X obj 111 183 *~ 2; +#X floatatom 74 81 0 0 0; +#X obj 74 153 clip~ 0 0.667; +#X text 124 80 <-- pitch; +#X obj 74 105 mtof; +#X msg 195 142 1; +#X obj 74 225 *~; +#X obj 74 129 phasor~ 0; +#X obj 195 190 tabread4~ dbtorms; +#X obj 195 166 adsr 100 100 2000 0 2000; +#X obj 73 54 inlet; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 260 101 pd conversion-tables; +#X connect 1 0 9 0; +#X connect 2 0 1 0; +#X connect 3 0 1 1; +#X connect 4 0 7 0; +#X connect 4 0 8 0; +#X connect 5 0 2 0; +#X connect 7 0 10 0; +#X connect 8 0 12 0; +#X connect 9 0 0 0; +#X connect 10 0 3 0; +#X connect 10 0 5 0; +#X connect 11 0 9 1; +#X connect 12 0 11 0; +#X connect 13 0 4 0; +#X restore 75 129 pd test-input; +#X text 328 322 updated for Pd version 0.26; +#X text 62 8 REVERBERATOR; +#X floatatom 75 100 0 0 0; +#X text 126 105 <-- pitch; +#X floatatom 137 219 0 0 0; +#N canvas 159 26 618 379 output 0; +#X obj 393 156 t b; +#X obj 393 106 f; +#X obj 393 56 inlet; +#X text 399 25 mute; +#X obj 393 181 f; +#X msg 480 174 0; +#X msg 393 81 bang; +#X obj 393 131 moses 1; +#X obj 480 149 t b f; +#X obj 452 113 moses 1; +#X obj 138 144 dbtorms; +#X obj 452 88 r master-lvl; +#X obj 138 38 r master-lvl; +#X obj 393 206 s master-lvl; +#X obj 22 140 inlet~; +#X obj 254 37 inlet; +#X text 254 14 level; +#X obj 254 96 s master-lvl; +#X msg 151 61 set \$1; +#X obj 151 85 outlet; +#X msg 269 60 \; pd dsp 1; +#X obj 138 190 line~; +#X obj 22 231 *~; +#X obj 138 167 pack 0 50; +#X text 34 118 audio; +#X text 148 106 show level; +#X obj 73 140 inlet~; +#X obj 73 232 *~; +#X obj 22 260 dac~ 1; +#X obj 73 260 dac~ 2; +#X obj 22 182 hip~ 5; +#X obj 73 181 hip~ 5; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 23 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 30 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 21 0 27 1; +#X connect 22 0 28 0; +#X connect 23 0 21 0; +#X connect 26 0 31 0; +#X connect 27 0 29 0; +#X connect 30 0 22 0; +#X connect 31 0 27 0; +#X restore 75 247 pd output; +#X msg 166 219 MUTE; +#X text 184 217 <-- output amplitude; +#N canvas 137 269 1056 577 reverb 0; +#X obj 77 37 inlet~; +#X obj 77 85 echo echo-del2 8.45346; +#X obj 77 61 echo echo-del1 5.43216; +#X obj 77 109 echo echo-del3 13.4367; +#X obj 77 133 echo echo-del4 21.5463; +#X obj 77 157 echo echo-del5 34.3876; +#X obj 77 181 echo echo-del6 55.5437; +#X obj 253 545 delwrite~ loop-del1 70; +#X obj 295 157 delread~ loop-del1 70; +#X obj 466 157 delread~ loop-del2 81.9345; +#X obj 416 545 delwrite~ loop-del2 81.9345; +#X obj 665 154 delread~ loop-del3 94.7545; +#X obj 855 154 delread~ loop-del4 115.945; +#X obj 622 545 delwrite~ loop-del3 94.7545; +#X obj 820 545 delwrite~ loop-del4 115.945; +#X obj 282 215 +~; +#X obj 443 215 +~; +#X obj 187 251 outlet~; +#X obj 364 244 outlet~; +#X obj 251 337 +~; +#X obj 619 328 +~; +#X obj 408 334 -~; +#X obj 791 327 -~; +#X obj 251 391 +~; +#X obj 411 397 +~; +#X obj 615 407 -~; +#X obj 785 388 -~; +#X obj 620 474 *~ 0; +#X obj 620 511 lop~ 5000; +#X obj 415 472 *~ 0; +#X obj 415 510 lop~ 5000; +#X obj 246 475 *~ 0; +#X obj 246 513 lop~ 5000; +#X obj 821 472 *~ 0; +#X obj 821 506 lop~ 5000; +#X obj 924 254 inlet; +#X obj 924 278 moses 100; +#X obj 926 325 moses -100; +#X msg 979 303 100; +#X msg 930 349 -100; +#X obj 934 386 / 200; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X connect 1 1 3 1; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 4 0; +#X connect 3 1 4 1; +#X connect 4 0 5 0; +#X connect 4 1 5 1; +#X connect 5 0 6 0; +#X connect 5 1 6 1; +#X connect 6 0 15 0; +#X connect 6 1 16 0; +#X connect 8 0 15 1; +#X connect 9 0 16 1; +#X connect 11 0 19 1; +#X connect 11 0 21 1; +#X connect 12 0 20 1; +#X connect 12 0 22 1; +#X connect 15 0 17 0; +#X connect 15 0 19 0; +#X connect 15 0 21 0; +#X connect 16 0 18 0; +#X connect 16 0 20 0; +#X connect 16 0 22 0; +#X connect 19 0 23 0; +#X connect 19 0 25 0; +#X connect 20 0 25 1; +#X connect 20 0 23 1; +#X connect 21 0 24 0; +#X connect 21 0 26 0; +#X connect 22 0 24 1; +#X connect 22 0 26 1; +#X connect 23 0 27 0; +#X connect 24 0 29 0; +#X connect 25 0 31 0; +#X connect 26 0 33 0; +#X connect 27 0 28 0; +#X connect 28 0 13 0; +#X connect 29 0 30 0; +#X connect 30 0 10 0; +#X connect 31 0 32 0; +#X connect 32 0 7 0; +#X connect 33 0 34 0; +#X connect 34 0 14 0; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 36 1 38 0; +#X connect 37 0 39 0; +#X connect 37 1 40 0; +#X connect 38 0 37 0; +#X connect 39 0 40 0; +#X connect 40 0 33 1; +#X connect 40 0 31 1; +#X connect 40 0 29 1; +#X connect 40 0 27 1; +#X restore 50 193 pd reverb; +#X floatatom 108 163 0 0 0; +#X text 143 163 <-- feedback (100 maximum); +#X text 32 41 Here is a simple recirculating reverberator. "Feedback" +should be between -100 and 100; +#X text 37 285 You can spend a lifetime tweaking reverberators... we'll +just leave it at that for now.; +#X connect 0 0 9 0; +#X connect 0 0 6 0; +#X connect 3 0 0 0; +#X connect 5 0 6 2; +#X connect 6 0 5 0; +#X connect 7 0 6 3; +#X connect 9 0 6 0; +#X connect 9 1 6 1; +#X connect 10 0 9 1; diff --git a/pd/doc/3.audio.examples/H01.more.FM.pd b/pd/doc/3.audio.examples/H01.more.FM.pd new file mode 100644 index 00000000..1b0e112b --- /dev/null +++ b/pd/doc/3.audio.examples/H01.more.FM.pd @@ -0,0 +1,132 @@ +#N canvas 25 100 785 694 12; +#X floatatom 197 602 0 0 0; +#N canvas 159 26 541 274 output 0; +#X obj 351 166 t b; +#X obj 351 114 f; +#X obj 351 62 inlet; +#X text 358 30 mute; +#X obj 351 192 f; +#X msg 442 186 0; +#X msg 351 88 bang; +#X obj 351 140 moses 1; +#X obj 413 114 moses 1; +#X obj 86 153 dbtorms; +#X obj 413 88 r master-lvl; +#X obj 86 44 r master-lvl; +#X obj 351 218 s master-lvl; +#X obj 12 166 inlet~; +#X obj 207 43 inlet; +#X text 207 19 level; +#X obj 207 104 s master-lvl; +#X msg 100 67 set \$1; +#X obj 100 93 outlet; +#X msg 222 67 \; pd dsp 1; +#X obj 86 205 line~; +#X obj 12 218 *~; +#X obj 12 244 dac~; +#X obj 86 179 pack 0 50; +#X text 12 142 audio; +#X text 100 118 show level; +#X obj 12 192 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 158 630 pd output; +#X msg 234 602 MUTE; +#X text 528 618 updated for Pd version 0.34; +#X text 277 601 <-- output; +#X text 79 4 FM \, PWM \, PAF as formant generators; +#X text 39 22 The next several patches illustrate "Synthesizing Sounds +with Specified \, Time-Varying Spectra" presented at ICMC 2001 and +reprinted on http://www.crca.ucsd.edu/~msp/publications.html.; +#X obj 146 468 line~; +#X obj 146 444 pack 0 50; +#X floatatom 146 389 0 0 0; +#X obj 124 493 *~; +#X text 145 367 index; +#X floatatom 248 398 0 0 0; +#X text 250 370 carrier freq; +#X obj 158 547 cos~; +#X graph graph1 0 0 128 500 499 556 755 426; +#X array spectrum 128 float 0; +#X pop; +#X msg 233 546 bang; +#X text 271 543 <-- click to graph; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 187 574 pd fft; +#X text 490 562 0; +#X text 738 559 5512; +#X obj 153 520 +~; +#X obj 248 448 phasor~; +#X obj 23 458 osc~ 172.266; +#X obj 146 417 / 100; +#X obj 248 422 * 172.266; +#X text 34 93 First compare this phase modulation example with the +ring modulation example from the section on processing (patch 51). +Here we choose a convenient \, fixed modulation frequency and consider +the effect of changing carrier frequency and modulation index. It's +exactly as if the carrier frequency were a ring modulation frequency. +; +#X text 33 331 Next we'll look at two techniques for sliding a formant +frequency without losing harmonicity.; +#X text 33 191 Using either method we can synthesize the hat-shaped +spectra called "formants." However \, if you try to move the formant +up or down in frequency \, you'll lose harmonicity \; the partials +are only integer multiples of the fundamental \, 172.266 \, when the +carrier is an integer multiple. To hear this \, set index to 20 and +carrier frequency to zero \, and scroll carrier through integers. Then +shift-drag on the carrier frequency to change it in hundredths. Presto +\, inharmonic sounds...; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 7 0 10 1; +#X connect 8 0 7 0; +#X connect 9 0 24 0; +#X connect 10 0 21 0; +#X connect 12 0 25 0; +#X connect 14 0 1 0; +#X connect 14 0 18 0; +#X connect 16 0 18 1; +#X connect 21 0 14 0; +#X connect 22 0 21 1; +#X connect 23 0 10 0; +#X connect 24 0 8 0; +#X connect 25 0 22 0; diff --git a/pd/doc/3.audio.examples/H02.packets.pd b/pd/doc/3.audio.examples/H02.packets.pd new file mode 100644 index 00000000..072ae27d --- /dev/null +++ b/pd/doc/3.audio.examples/H02.packets.pd @@ -0,0 +1,161 @@ +#N canvas 83 221 878 705 12; +#X obj 315 424 line~; +#X obj 47 517 cos~; +#X graph graph1 0 -2 882 2 644 469 844 339; +#X array pulse-output 882 float 0; +#X pop; +#X floatatom 84 633 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 48 660 pd output; +#X msg 124 633 MUTE; +#X obj 315 400 pack 0 50; +#X floatatom 315 328 0 0 0; +#X obj 47 429 -~ 0.5; +#X obj 47 468 *~; +#X obj 315 352 / 10; +#X obj 47 493 clip~ -0.5 0.5; +#X text 315 306 bandwidth; +#X msg 165 602 bang; +#X obj 315 448 +~ 1; +#X obj 48 540 +~ 1; +#X obj 197 513 cos~; +#X obj 48 569 *~; +#X floatatom 219 342 4 0 0; +#X obj 219 366 / 10; +#X text 644 472 --- 0.02 seconds ---; +#X obj 197 487 *~; +#N canvas 204 427 939 588 graph 0; +#X obj 91 345 inlet~; +#X obj 729 341 inlet; +#X obj 74 395 tabwrite~ pulse-output; +#X obj 319 350 inlet~; +#X obj 493 343 inlet~; +#X obj 302 400 tabwrite~ window; +#X obj 484 401 tabwrite~ carrier; +#X msg 390 53 \; array2 rename window; +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 1 0 6 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X restore 76 602 pd graph; +#X obj 315 376 max 0; +#X obj 219 438 line~; +#X obj 219 414 pack 0 50; +#X obj 219 390 max 0; +#X graph graph3 0 -2 881 2 644 328 844 188; +#X array carrier 882 float 0; +#X pop; +#X graph graph4 0 -2 881 2 645 175 845 35; +#X array window 882 float 0; +#X pop; +#X text 211 601 <-- graph; +#X floatatom 47 381 4 0 0; +#X obj 47 405 phasor~ 100; +#X text 31 2 WINDOWED PACKETS; +#X text 169 632 <-- output; +#X text 43 356 freq.; +#X text 43 337 fundamental; +#X text 28 51 The simpler technique is to synthesize enveloped sinusoidal +wave packets. The packets should repeat at the fundamental frequency +\, but the frequency of the packet itself controls the center frequency +of the formant. The length of the packet varies inversely with bandwidth. +; +#X text 27 132 In the patch below \, the "clip~" followed by "cos~" +and "+~ 1" is the enveloping ("windowing" function \, which appears +in the top graph. This is just the original PWM patch from part 2 The +carrier \, on the other hand \, is a broken sinusoid made by amplifying +the phasor~ (the "*~" controlled by "center freq.") and taking the +cos~ of the result. The "breaks" in the sinusoid only occur when the +enveloping signal is zero.; +#X text 197 256 center; +#X text 195 275 freq. (in; +#X text 194 294 tenths of; +#X text 193 314 fundamental); +#X text 92 535 window; +#X text 233 487 magnified phase; +#X text 278 531 desired center frequency; +#X text 250 514 <--this cosine goes at the; +#X text 279 550 but its phase is reset each; +#X text 277 569 fundamental period.; +#X text 612 666 updated for Pd version 0.34; +#X connect 0 0 14 0; +#X connect 1 0 15 0; +#X connect 3 0 4 1; +#X connect 4 0 3 0; +#X connect 5 0 4 2; +#X connect 6 0 0 0; +#X connect 7 0 10 0; +#X connect 8 0 9 0; +#X connect 8 0 21 0; +#X connect 9 0 11 0; +#X connect 10 0 23 0; +#X connect 11 0 1 0; +#X connect 13 0 22 3; +#X connect 14 0 9 1; +#X connect 15 0 17 0; +#X connect 15 0 22 1; +#X connect 16 0 17 1; +#X connect 16 0 22 2; +#X connect 17 0 22 0; +#X connect 17 0 4 0; +#X connect 18 0 19 0; +#X connect 19 0 26 0; +#X connect 21 0 16 0; +#X connect 23 0 6 0; +#X connect 24 0 21 1; +#X connect 25 0 24 0; +#X connect 26 0 25 0; +#X connect 30 0 31 0; +#X connect 31 0 8 0; diff --git a/pd/doc/3.audio.examples/H03.packet.spectrum.pd b/pd/doc/3.audio.examples/H03.packet.spectrum.pd new file mode 100644 index 00000000..bef1483b --- /dev/null +++ b/pd/doc/3.audio.examples/H03.packet.spectrum.pd @@ -0,0 +1,147 @@ +#N canvas 83 221 774 628 12; +#X obj 302 351 line~; +#X obj 34 444 cos~; +#X floatatom 71 560 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 35 587 pd output; +#X msg 111 560 MUTE; +#X obj 302 327 pack 0 50; +#X floatatom 302 255 0 0 0; +#X obj 34 356 -~ 0.5; +#X obj 34 395 *~; +#X obj 302 279 / 10; +#X obj 34 420 clip~ -0.5 0.5; +#X text 302 233 bandwidth; +#X obj 302 375 +~ 1; +#X obj 35 467 +~ 1; +#X obj 184 440 cos~; +#X obj 35 496 *~; +#X floatatom 206 269 4 0 0; +#X obj 206 293 / 10; +#X obj 184 414 *~; +#X text 204 224 center; +#X text 204 243 freq.; +#X obj 302 303 max 0; +#X obj 206 365 line~; +#X obj 206 341 pack 0 50; +#X obj 206 317 max 0; +#X floatatom 34 308 4 0 0; +#X obj 34 332 phasor~ 100; +#X text 156 559 <-- output; +#X text 30 283 freq.; +#X text 30 264 fundamental; +#X graph graph1 0 0 128 500 440 492 696 362; +#X array spectrum 128 float 0; +#X pop; +#X msg 108 498 bang; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 59 524 pd fft; +#X text 439 502 0; +#X text 687 499 5512; +#X text 149 498 <-- graph; +#X text 31 2 WINDOWED PACKET SPECTRUM; +#X text 19 34 Here's the spectrum you get. Note that even if you put +the center frequency right on a partial \, there is significant energy +in neighboring partials (try fundamental 440 \, "center freq" 30 \, +bandwidth 0.); +#X text 18 104 The center frequency is in units of ten per partial +\, or in other words a value of "30" means "centered on the third partial". +; +#X text 505 596 updated for Pd version 0.34; +#X text 22 155 This technique only works if you're doing Hanning-window +shaped PWM--you can't combine this naturally with FM or with the waveshaping +technique we'll see later.; +#X connect 0 0 12 0; +#X connect 1 0 13 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 5 0 0 0; +#X connect 6 0 9 0; +#X connect 7 0 8 0; +#X connect 7 0 18 0; +#X connect 8 0 10 0; +#X connect 9 0 21 0; +#X connect 10 0 1 0; +#X connect 12 0 8 1; +#X connect 13 0 15 0; +#X connect 14 0 15 1; +#X connect 15 0 3 0; +#X connect 15 0 32 0; +#X connect 16 0 17 0; +#X connect 17 0 24 0; +#X connect 18 0 14 0; +#X connect 21 0 5 0; +#X connect 22 0 18 1; +#X connect 23 0 22 0; +#X connect 24 0 23 0; +#X connect 25 0 26 0; +#X connect 26 0 7 0; +#X connect 31 0 32 1; diff --git a/pd/doc/3.audio.examples/H04.two.cosines.pd b/pd/doc/3.audio.examples/H04.two.cosines.pd new file mode 100644 index 00000000..0f813164 --- /dev/null +++ b/pd/doc/3.audio.examples/H04.two.cosines.pd @@ -0,0 +1,124 @@ +#N canvas 10 49 705 610 12; +#X floatatom 262 549 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 226 576 pd output; +#X msg 302 549 MUTE; +#X msg 59 550 bang; +#X obj 185 427 cos~; +#X floatatom 232 217 4 0 0; +#X obj 232 241 / 10; +#X text 464 288 --- 0.02 seconds ---; +#X obj 185 397 *~; +#X text 236 133 center; +#X obj 232 313 line~; +#X obj 232 265 max 0; +#X graph graph3 0 -2 881 2 450 276 650 136; +#X array carrier 882 float 0; +#X pop; +#X floatatom 33 284 4 0 0; +#X text 29 240 fundamental; +#X text 31 2 ADDING TWO COSINES; +#X text 234 152 freq. (in; +#X text 233 171 tenths of; +#X text 232 191 fundamental); +#X text 29 259 frequency; +#X obj 227 427 cos~; +#X obj 268 340 wrap~; +#X obj 232 367 -~; +#X obj 227 397 +~; +#X obj 232 464 -~; +#X obj 247 494 *~; +#X obj 225 519 +~; +#X obj 59 578 tabwrite~ carrier; +#X obj 33 308 phasor~ 40; +#X obj 232 289 pack 0 50; +#X text 27 36 The other \, spiffier way is to make a sum of cosines +to interpolate between adjacent harmonics. Suppose for example we want +a center frequency of 5.3 (in units of the fundamental.) We just take +partial 5 with amplitude 0.7 and partial 6 with amplitude 0.7:; +#X text 451 581 updated for Pd version 0.34; +#X text 281 366 subtract to get the integer part "n"; +#X text 277 399 multiply phase by n and n+1; +#X text 282 427 synthesize the two partials; +#X text 54 526 graph; +#X text 347 548 <--output; +#X text 323 339 the fractional part "b"; +#X text 280 463 p2 - p1; +#X text 295 492 b * (p2 - p1); +#X text 264 519 b * p2 + (1-b) * p1; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 27 0; +#X connect 4 0 24 1; +#X connect 4 0 26 0; +#X connect 5 0 6 0; +#X connect 6 0 11 0; +#X connect 8 0 4 0; +#X connect 8 0 23 0; +#X connect 10 0 22 0; +#X connect 10 0 21 0; +#X connect 11 0 29 0; +#X connect 13 0 28 0; +#X connect 20 0 24 0; +#X connect 21 0 22 1; +#X connect 21 0 25 1; +#X connect 22 0 8 1; +#X connect 23 0 20 0; +#X connect 24 0 25 0; +#X connect 25 0 26 1; +#X connect 26 0 1 0; +#X connect 26 0 27 0; +#X connect 28 0 8 0; +#X connect 28 0 23 1; +#X connect 29 0 10 0; diff --git a/pd/doc/3.audio.examples/H05.declickit.pd b/pd/doc/3.audio.examples/H05.declickit.pd new file mode 100644 index 00000000..eb296e63 --- /dev/null +++ b/pd/doc/3.audio.examples/H05.declickit.pd @@ -0,0 +1,132 @@ +#N canvas 10 49 715 680 12; +#X floatatom 242 612 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 206 639 pd output; +#X msg 282 612 MUTE; +#X obj 165 490 cos~; +#X obj 165 460 *~; +#X obj 207 490 cos~; +#X obj 249 406 wrap~; +#X obj 212 415 -~; +#X obj 207 460 +~; +#X obj 207 525 -~; +#X obj 227 557 *~; +#X obj 205 582 +~; +#X text 454 648 updated for Pd version 0.34; +#X text 327 611 <--output; +#X obj 191 184 loadbang; +#X obj 191 210 metro 400; +#X obj 203 234 del 200; +#X obj 204 335 samphold~; +#X obj 259 364 toggle 20 0 empty empty empty 20 8 0 10 -262144 -1 -1 +0 1; +#X obj 166 290 sig~; +#X msg 203 263 3.5; +#X msg 166 263 2; +#X obj 23 280 phasor~ 169; +#N canvas 0 0 600 400 switch 0; +#X obj 85 52 inlet~; +#X obj 177 58 inlet~; +#X obj 298 66 inlet; +#X obj 112 107 -~; +#X obj 112 131 *~ 0; +#X obj 90 157 +~; +#X obj 160 249 outlet~; +#X connect 0 0 3 1; +#X connect 0 0 5 0; +#X connect 1 0 3 0; +#X connect 2 0 4 1; +#X connect 3 0 4 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X restore 166 364 pd switch; +#X text 31 2 CHANGING THE CENTER FREQUENCY QUICKLY; +#X text 313 381 off to hear the straight sig~; +#X text 286 363 <--on to hear the "samphold~" \,; +#X text 25 27 Since in the previous patch the amplitudes of the two +cosines depend on "center frequency" we can't change that discontinuously +without clicking \, as you hear in this patch. The fix is to use a +samphold~ object to keep the center frequency frozen except at phase +crossings. At the phase crossings the two weighted cosines add to one +\, so we can discontinuously change the frequencies and weights there. +; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 9 1; +#X connect 3 0 11 0; +#X connect 4 0 3 0; +#X connect 4 0 8 0; +#X connect 5 0 9 0; +#X connect 6 0 7 1; +#X connect 6 0 10 1; +#X connect 7 0 4 1; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 1 0; +#X connect 14 0 15 0; +#X connect 15 0 21 0; +#X connect 15 0 16 0; +#X connect 16 0 20 0; +#X connect 17 0 23 1; +#X connect 18 0 23 2; +#X connect 19 0 17 0; +#X connect 19 0 23 0; +#X connect 20 0 19 0; +#X connect 21 0 19 0; +#X connect 22 0 4 0; +#X connect 22 0 8 1; +#X connect 22 0 17 1; +#X connect 23 0 7 0; +#X connect 23 0 6 0; diff --git a/pd/doc/3.audio.examples/H06.sweepable.FM.pd b/pd/doc/3.audio.examples/H06.sweepable.FM.pd new file mode 100644 index 00000000..ff3827ee --- /dev/null +++ b/pd/doc/3.audio.examples/H06.sweepable.FM.pd @@ -0,0 +1,161 @@ +#N canvas 89 117 803 661 12; +#X floatatom 242 605 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 204 634 pd output; +#X msg 280 606 MUTE; +#X obj 165 506 cos~; +#X obj 165 460 *~; +#X obj 208 508 cos~; +#X obj 249 409 wrap~; +#X obj 212 408 -~; +#X obj 208 485 +~; +#X obj 206 543 -~; +#X obj 226 575 *~; +#X obj 204 600 +~; +#X text 520 628 updated for Pd version 0.34; +#X text 325 605 <--output; +#X obj 212 378 samphold~; +#X text 31 2 APPLYING TWO-COSINE CARRIER TO FM; +#X floatatom 229 238 4 0 0; +#X obj 229 261 / 10; +#X text 229 157 center; +#X obj 229 330 line~; +#X obj 229 284 max 0; +#X text 229 177 freq. (in; +#X text 229 197 tenths of; +#X text 229 217 fundamental); +#X obj 229 307 pack 0 50; +#X obj 118 313 phasor~; +#X floatatom 118 290 4 0 0; +#X text 103 237 fundamental; +#X text 103 257 (= mod freq); +#X text 432 284 index; +#X text 432 304 (percent); +#X floatatom 432 325 4 0 0; +#X obj 382 391 cos~; +#X obj 432 394 line~; +#X obj 382 414 *~; +#X obj 432 348 / 100; +#X obj 432 371 pack 0 50; +#X obj 165 483 +~; +#X graph graph1 0 0 128 500 515 256 771 126; +#X array spectrum 128 float 0; +#X pop; +#X text 511 261 0; +#X text 759 258 5512; +#X msg 117 599 bang; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 68 630 pd fft; +#X text 25 33 And now we just treat the cosines like carrier signals +in an FM instrument. This doesn't work as well as you'd wish \, because +the phases of the partials of the two FM instruments don't line up +\, so that \, for indices of modulation above about 20% \, you get +beating effects as the center frequency goes up and down.; +#X text 385 440 modulating; +#X text 385 460 oscillator; +#X text 37 482 both phases-->; +#X text 6 465 add modulator to; +#X text 117 577 graph; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 9 1; +#X connect 3 0 11 0; +#X connect 4 0 37 0; +#X connect 5 0 9 0; +#X connect 6 0 7 1; +#X connect 6 0 10 1; +#X connect 7 0 4 1; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 1 0; +#X connect 11 0 42 0; +#X connect 14 0 7 0; +#X connect 14 0 6 0; +#X connect 16 0 17 0; +#X connect 17 0 20 0; +#X connect 19 0 14 0; +#X connect 20 0 24 0; +#X connect 24 0 19 0; +#X connect 25 0 14 1; +#X connect 25 0 32 0; +#X connect 25 0 4 0; +#X connect 25 0 8 1; +#X connect 26 0 25 0; +#X connect 31 0 35 0; +#X connect 32 0 34 0; +#X connect 33 0 34 1; +#X connect 34 0 37 1; +#X connect 35 0 36 0; +#X connect 36 0 33 0; +#X connect 37 0 8 0; +#X connect 37 0 3 0; +#X connect 41 0 42 1; diff --git a/pd/doc/3.audio.examples/H07.paf.pd b/pd/doc/3.audio.examples/H07.paf.pd new file mode 100644 index 00000000..56c024c0 --- /dev/null +++ b/pd/doc/3.audio.examples/H07.paf.pd @@ -0,0 +1,234 @@ +#N canvas 53 0 782 687 12; +#X floatatom 253 735 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 215 764 pd output; +#X msg 291 735 MUTE; +#X obj 158 616 cos~; +#X obj 158 593 *~; +#X obj 201 616 cos~; +#X obj 257 542 wrap~; +#X obj 221 542 -~; +#X obj 201 593 +~; +#X obj 194 646 -~; +#X obj 214 678 *~; +#X obj 176 678 +~; +#X text 515 768 updated for Pd version 0.34; +#X text 336 734 <--output; +#X obj 221 510 samphold~; +#X floatatom 221 369 4 0 0; +#X obj 221 392 / 10; +#X text 221 288 center; +#X obj 221 461 line~; +#X obj 221 415 max 0; +#X text 221 308 freq. (in; +#X text 221 328 tenths of; +#X text 221 348 fundamental); +#X obj 221 438 pack 0 50; +#X obj 104 445 phasor~; +#X floatatom 104 399 4 0 0; +#X text 84 372 fundamental; +#X text 435 441 index; +#X text 435 461 (percent); +#X floatatom 435 482 4 0 0; +#X obj 435 528 line~; +#X obj 343 550 *~; +#X obj 435 505 pack 0 50; +#X graph graph1 0 0 128 500 510 395 766 265; +#X array spectrum 128 float 0; +#X pop; +#X text 501 397 0; +#X text 745 398 5512; +#X msg 80 713 bang; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 31 745 pd fft; +#X text 82 687 graph; +#X text 31 2 THE PAF: TWO-COSINE RING MODULATOR FOR WAVESHAPER; +#X graph graph4 0 0 199 1 563 718 763 578; +#X array bell-curve 200 float 1; +#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 +7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 +4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 +2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 +9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 +0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 +0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 +0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 +0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 +0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 +0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 +0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 +0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 +0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 +0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 +0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 +0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 +0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 +0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 +0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 +0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 +0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 +0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 +0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 +0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 +7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 +1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 +3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 +5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; +#X pop; +#N canvas 94 264 600 388 make-table 0; +#X msg 81 44 bang; +#X obj 81 73 t b b; +#X obj 159 142 f; +#X obj 197 142 + 1; +#X msg 175 112 0; +#X obj 81 102 until; +#X obj 161 177 t f f; +#X obj 76 306 tabwrite bell-curve; +#X obj 52 270 expr exp(-$f1*$f1); +#X obj 63 168 sel 199; +#X obj 51 241 expr ($f1-100)/25; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 10 0; +#X connect 6 1 7 1; +#X connect 8 0 7 0; +#X connect 9 0 5 1; +#X connect 10 0 8 0; +#X restore 627 538 pd make-table; +#X obj 104 422 * 0.5; +#X obj 343 527 cos~; +#X obj 343 504 -~ 0.25; +#X obj 343 573 +~ 100; +#X obj 343 596 tabread4~ bell-curve; +#X obj 104 474 *~ 2; +#X obj 215 707 *~; +#X text 25 33 Instead of using the two cosines as FM carrier oscillators +\, we can use them as ring modulators for a synthetic tone. Here (as +described in the paper) we use a sinusoid looking up a Gaussian bell +curve. This has the nice properties that the partials are always positive +cosines in phase \, and the spectrum spreads out smoothly as the index +changes.; +#X text 26 137 We needed the sine wave to have half the fundamental +frequency \, so we run the phasor~ at half speed but double its output +to the cosine pair and the samphold~ \, thus giving us the original +frequency. As to the half-speed signal \, we take its sine (-~ 0.25 +and cos~) \, then center it for lookup in a 200-point table containing +a bell curve.; +#X text 251 705 <--ring mod step; +#X text 375 621 waveshaper; +#X text 27 239 Then with ~* we do the ring modulation and we're done. +; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 9 1; +#X connect 3 0 11 0; +#X connect 4 0 8 0; +#X connect 4 0 3 0; +#X connect 5 0 9 0; +#X connect 6 0 7 1; +#X connect 6 0 10 1; +#X connect 7 0 4 1; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 48 0; +#X connect 14 0 7 0; +#X connect 14 0 6 0; +#X connect 15 0 16 0; +#X connect 16 0 19 0; +#X connect 18 0 14 0; +#X connect 19 0 23 0; +#X connect 23 0 18 0; +#X connect 24 0 44 0; +#X connect 24 0 47 0; +#X connect 25 0 42 0; +#X connect 29 0 32 0; +#X connect 30 0 31 1; +#X connect 31 0 45 0; +#X connect 32 0 30 0; +#X connect 36 0 37 1; +#X connect 42 0 24 0; +#X connect 43 0 31 0; +#X connect 44 0 43 0; +#X connect 45 0 46 0; +#X connect 46 0 48 1; +#X connect 47 0 14 1; +#X connect 47 0 4 0; +#X connect 47 0 8 0; +#X connect 48 0 1 0; +#X connect 48 0 37 0; diff --git a/pd/doc/3.audio.examples/H08.paf.control.pd b/pd/doc/3.audio.examples/H08.paf.control.pd new file mode 100644 index 00000000..7d329357 --- /dev/null +++ b/pd/doc/3.audio.examples/H08.paf.control.pd @@ -0,0 +1,219 @@ +#N canvas 89 36 743 752 12; +#X floatatom 217 684 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 179 713 pd output; +#X msg 255 684 MUTE; +#X obj 122 565 cos~; +#X obj 122 542 *~; +#X obj 165 565 cos~; +#X obj 220 510 wrap~; +#X obj 184 510 -~; +#X obj 165 542 +~; +#X obj 158 595 -~; +#X obj 178 627 *~; +#X obj 140 627 +~; +#X text 478 719 updated for Pd version 0.34; +#X text 299 702 <--output; +#X obj 184 478 samphold~; +#X floatatom 183 266 4 0 0; +#X text 181 218 center; +#X obj 184 345 line~; +#X obj 184 322 pack 0 50; +#X obj 67 413 phasor~; +#X floatatom 69 305 4 0 0; +#X text 52 256 fundamental; +#X floatatom 408 361 4 0 0; +#X obj 408 438 line~; +#X obj 306 518 *~; +#X obj 408 415 pack 0 50; +#N canvas 94 264 600 388 make-table 0; +#X msg 81 44 bang; +#X obj 81 73 t b b; +#X obj 159 142 f; +#X obj 197 142 + 1; +#X msg 175 112 0; +#X obj 81 102 until; +#X obj 161 177 t f f; +#X obj 76 306 tabwrite bell-curve; +#X obj 52 270 expr exp(-$f1*$f1); +#X obj 63 168 sel 199; +#X obj 51 241 expr ($f1-100)/25; +#X graph graph4 0 0 199 1 342 225 542 85; +#X array bell-curve 200 float 1; +#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 +7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 +4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 +2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 +9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 +0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 +0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 +0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 +0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 +0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 +0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 +0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 +0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 +0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 +0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 +0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 +0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 +0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 +0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 +0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 +0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 +0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 +0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 +0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 +0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 +7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 +1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 +3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 +5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; +#X pop; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 10 0; +#X connect 6 1 7 1; +#X connect 8 0 7 0; +#X connect 9 0 5 1; +#X connect 10 0 8 0; +#X restore 573 591 pd make-table; +#X obj 67 390 * 0.5; +#X obj 306 495 cos~; +#X obj 306 472 -~ 0.25; +#X obj 306 549 +~ 100; +#X obj 306 572 tabread4~ bell-curve; +#X obj 67 442 *~ 2; +#X obj 179 656 *~; +#X text 338 597 waveshaper; +#X text 31 2 CHANGING PAF CONTROLS TO NATURAL UNITS; +#X obj 67 362 mtof; +#X obj 68 335 max 0; +#X obj 206 370 expr 1/$f1; +#X obj 183 296 mtof; +#X text 181 238 freq.; +#X obj 184 394 *~; +#X text 406 340 bandwidth; +#X obj 408 389 mtof; +#X obj 408 474 *~; +#X obj 408 498 *~ 25; +#X text 25 33 The more "natural" units for describing a formant might +be center frequency and bandwidth \, so that you can change the fundamental +without having the formant shift up and down in parallel. Here all +three frequencies are expressed in MIDI units. The bandwidth and center +frequency have to be divided by the fundamental (the expr 1/$f1 takes +its reciprocal and two *~ objects finish the division.); +#X text 448 473 divide by fundamental; +#X text 466 497 range for table; +#X text 372 548 offset to middle of table; +#X text 191 416 C.F. relative; +#X text 192 432 to fundamental; +#X text 48 275 (MIDI units); +#X text 215 654 ring mod; +#X text 25 150 And now you essentially have the PAF. Note \, however +\, that there's a nice paf~ "external" object in the "extras" library +that does this all more efficiently and takes care of a couple of subtle +details we don't see here...; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 9 1; +#X connect 3 0 11 0; +#X connect 4 0 8 0; +#X connect 4 0 3 0; +#X connect 5 0 9 0; +#X connect 6 0 7 1; +#X connect 6 0 10 1; +#X connect 7 0 4 1; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 33 0; +#X connect 14 0 7 0; +#X connect 14 0 6 0; +#X connect 15 0 39 0; +#X connect 17 0 41 0; +#X connect 18 0 17 0; +#X connect 19 0 29 0; +#X connect 19 0 32 0; +#X connect 20 0 37 0; +#X connect 22 0 43 0; +#X connect 23 0 44 0; +#X connect 24 0 30 0; +#X connect 25 0 23 0; +#X connect 27 0 19 0; +#X connect 28 0 24 0; +#X connect 29 0 28 0; +#X connect 30 0 31 0; +#X connect 31 0 33 1; +#X connect 32 0 14 1; +#X connect 32 0 4 0; +#X connect 32 0 8 0; +#X connect 33 0 1 0; +#X connect 36 0 27 0; +#X connect 36 0 38 0; +#X connect 37 0 36 0; +#X connect 38 0 41 1; +#X connect 38 0 44 1; +#X connect 39 0 18 0; +#X connect 41 0 14 0; +#X connect 43 0 25 0; +#X connect 44 0 45 0; +#X connect 45 0 24 1; diff --git a/pd/doc/3.audio.examples/J01.quartic.pd b/pd/doc/3.audio.examples/J01.quartic.pd new file mode 100644 index 00000000..d71da05a --- /dev/null +++ b/pd/doc/3.audio.examples/J01.quartic.pd @@ -0,0 +1,140 @@ +#N canvas 57 35 614 650 12; +#X graph graph1 0 0 40 1 151 551 551 301; +#X array array-ampdb 41 float 1; +#A 0 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1; +#X array array-dbdb 41 float 1; +#A 0 0 0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3 +0.325 0.35 0.375 0.4 0.425 0.45 0.475 0.5 0.525 0.55 0.575 0.6 0.625 +0.65 0.675 0.7 0.725 0.75 0.775 0.8 0.825 0.85 0.875 0.9 0.925 0.95 +0.975 1; +#X array array-4thpow 41 float 1; +#A 0 0 3.90624e-07 6.25001e-06 3.16406e-05 1e-04 0.000244141 0.00050625 +0.000937891 0.0016 0.00256289 0.00390625 0.00571914 0.0081 0.0111566 +0.0150063 0.0197754 0.0256 0.0326254 0.0410062 0.0509067 0.0625 0.0759691 +0.0915063 0.109313 0.1296 0.152588 0.178506 0.207594 0.2401 0.276282 +0.316406 0.36075 0.4096 0.46325 0.522006 0.586182 0.6561 0.732094 0.814506 +0.903688 1; +#X pop; +#N canvas 293 37 890 657 otherstuff 0; +#X obj 42 438 loadbang; +#X msg 259 94 bang; +#X obj 259 123 t b b; +#X obj 337 192 f; +#X obj 375 192 + 1; +#X msg 353 162 0; +#X obj 259 152 until; +#X obj 263 329 dbtorms; +#X obj 339 227 t f f; +#X msg 51 101 bang; +#X obj 51 130 t b b; +#X obj 129 199 f; +#X obj 167 199 + 1; +#X msg 145 169 0; +#X obj 51 159 until; +#X obj 131 234 t f f; +#X obj 59 339 tabwrite array-dbdb; +#X obj 263 355 tabwrite array-ampdb; +#X msg 505 98 bang; +#X obj 505 127 t b b; +#X obj 583 196 f; +#X obj 621 196 + 1; +#X msg 599 166 0; +#X obj 505 156 until; +#X obj 585 231 t f f; +#X obj 559 432 expr $f1 * $f1 * $f1 * $f1; +#X obj 559 341 expr 1 + $f2 * ($f1 - 1); +#X obj 705 253 loadbang; +#X floatatom 703 309 0 0 0; +#X msg 705 281 1; +#X obj 559 385 max 0; +#X obj 561 464 tabwrite array-4thpow; +#X obj 263 274 + 100; +#X obj 51 232 sel 40; +#X obj 258 221 sel 40; +#X obj 503 226 sel 40; +#X obj 559 300 / 40; +#X obj 263 302 - 40; +#X obj 93 303 / 40; +#X msg 43 465 \; graph1 xlabel -0.03 0 10 20 30 40 \; graph1 ylabel +-2 0.25 0.5 0.75 1; +#X text 53 27 (here's how I computed the three transfer functions...) +; +#X connect 0 0 39 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 2 1 5 0; +#X connect 3 0 4 0; +#X connect 3 0 8 0; +#X connect 3 0 34 0; +#X connect 4 0 3 1; +#X connect 5 0 3 1; +#X connect 6 0 3 0; +#X connect 7 0 17 0; +#X connect 8 0 32 0; +#X connect 8 1 17 1; +#X connect 9 0 10 0; +#X connect 10 0 14 0; +#X connect 10 1 13 0; +#X connect 11 0 12 0; +#X connect 11 0 15 0; +#X connect 11 0 33 0; +#X connect 12 0 11 1; +#X connect 13 0 11 1; +#X connect 14 0 11 0; +#X connect 15 0 38 0; +#X connect 15 1 16 1; +#X connect 18 0 19 0; +#X connect 19 0 23 0; +#X connect 19 1 22 0; +#X connect 20 0 21 0; +#X connect 20 0 24 0; +#X connect 20 0 35 0; +#X connect 21 0 20 1; +#X connect 22 0 20 1; +#X connect 23 0 20 0; +#X connect 24 0 36 0; +#X connect 24 1 31 1; +#X connect 25 0 31 0; +#X connect 26 0 30 0; +#X connect 27 0 29 0; +#X connect 28 0 26 1; +#X connect 29 0 28 0; +#X connect 30 0 25 0; +#X connect 32 0 37 0; +#X connect 33 0 14 1; +#X connect 34 0 6 1; +#X connect 35 0 23 1; +#X connect 36 0 26 0; +#X connect 37 0 7 0; +#X connect 38 0 16 0; +#X restore 53 608 pd otherstuff; +#X text 292 403 linear; +#X text 279 509 decibels; +#X text 387 518 quartic; +#X text 45 5 QUARTIC CURVES AS THE IDEAL AMPLITUDE AND FREQUENCY SCALERS +; +#X text 346 611 updated for Pd version 0.34; +#X text 246 578 units-->; +#X text 45 447 amplitude; +#X text 79 429 |; +#X text 79 420 |; +#X text 79 410 |; +#X text 79 402 |; +#X text 78 398 ^; +#X text 38 149 The graph below shows that a simple quartic curve \, +x-to-the-fourth-power \, twists like decibels but--unlike decibels--actually +hits zero at left. You get the best of both worlds. Moreover \, raising +something to the fourth power is very cheap: just two multiplications--whereas +\, if you're computing envelopes in dB \, eventually you'll have to +exponentiate \, sample by sample \, to get to linear units.; +#X text 36 34 It's an old saw that we perceive amplitude and frequency +logarithmically. But using decibels as a unit for controlling amplitude +and frequency gets ugly for two reasons. First \, it's expensive to +do the conversion. Second and more profoundly \, decibels grow by shifting +\, and things should grow by scaling \, so that \, for example \, zero +really means "nothing."; diff --git a/pd/doc/3.audio.examples/J02.more.quartic.pd b/pd/doc/3.audio.examples/J02.more.quartic.pd new file mode 100644 index 00000000..fdb01dab --- /dev/null +++ b/pd/doc/3.audio.examples/J02.more.quartic.pd @@ -0,0 +1,147 @@ +#N canvas 130 66 880 587 12; +#X floatatom 89 506 0 0 100; +#N canvas 159 26 516 274 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 396 182 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 391 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 391 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 20 182 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 104 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 90 outlet; +#X msg 214 65 \; pd dsp 1; +#X obj 83 198 line~; +#X obj 20 207 *~; +#X obj 20 232 dac~; +#X obj 83 173 pack 0 50; +#X text 20 159 audio; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 21 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X restore 51 534 pd output; +#X msg 127 507 MUTE; +#X obj 32 441 *~; +#X obj 12 469 -~; +#X obj 73 446 *~; +#X floatatom 170 421 1 0 100; +#X obj 365 337 osc~; +#X obj 365 362 *~; +#X obj 425 342 line~; +#X obj 365 312 line~; +#X obj 550 468 osc~; +#X obj 599 496 *~; +#X obj 621 379 line~; +#X obj 550 379 line~; +#X obj 550 326 sqrt; +#X obj 550 352 sqrt; +#X obj 621 326 sqrt; +#X obj 621 352 sqrt; +#X obj 550 411 *~; +#X obj 550 441 *~; +#X obj 621 411 *~; +#X obj 621 440 *~; +#X obj 550 301 unpack; +#X obj 621 301 unpack; +#X obj 365 287 r freq; +#X obj 425 318 r amp; +#X obj 550 276 r freq; +#X obj 621 276 r amp; +#X obj 365 388 s~ linear; +#X obj 599 523 s~ quartic; +#X obj 12 377 r~ linear; +#X obj 56 406 r~ quartic; +#X msg 27 185 \; amp 0 5000 \;; +#X msg 29 139 \; amp 1 5000 \;; +#X msg 139 185 \; amp 0 1000 \;; +#X msg 141 139 \; amp 1 1000 \;; +#X msg 26 238 \; freq 1760 5000 \;; +#X msg 29 286 \; freq 55 5000 \;; +#X msg 180 238 \; freq 1760 1000 \;; +#X msg 183 286 \; freq 55 1000 \;; +#X text 90 15 QUARTIC AND LINEAR ENVELOPES COMPARED; +#X obj 202 488 loadbang; +#X msg 202 516 \; amp 1 \; freq 1760; +#X text 194 414 1 for quartic \; 0 for linear; +#X text 19 39 This patch has two sine wave oscillators \, one with +linear envelopes \, the other with quartic ones which sound more uniform. +The "toggle switch" at bottom selects between the two \, and the message +boxes sweep the amplitude and frequency up and down.; +#X text 366 257 LINEAR; +#X text 555 249 QUARTIC; +#X text 335 120 The two oscillators are below. In the quartic one \, +for both the amplitude and the frequency \, we have to take the fourth +root of the target value (which we get by taking square root twice.) +Then we raise the line~ output to the fourth power by squaring twice +(the *~ objects \, whose left and right inlets are the same.) The cost +is mostly that of the four additional *~ objects.; +#X text 579 560 updated for Pd version 0.34; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 5 1; +#X connect 6 0 3 1; +#X connect 7 0 8 0; +#X connect 8 0 29 0; +#X connect 9 0 8 1; +#X connect 10 0 7 0; +#X connect 11 0 12 0; +#X connect 12 0 30 0; +#X connect 13 0 21 0; +#X connect 13 0 21 1; +#X connect 14 0 19 0; +#X connect 14 0 19 1; +#X connect 15 0 16 0; +#X connect 16 0 14 0; +#X connect 17 0 18 0; +#X connect 18 0 13 0; +#X connect 19 0 20 0; +#X connect 19 0 20 1; +#X connect 20 0 11 0; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 22 0 12 1; +#X connect 23 0 15 0; +#X connect 23 1 14 1; +#X connect 24 0 17 0; +#X connect 24 1 13 1; +#X connect 25 0 10 0; +#X connect 26 0 9 0; +#X connect 27 0 23 0; +#X connect 28 0 24 0; +#X connect 31 0 3 0; +#X connect 31 0 4 0; +#X connect 32 0 5 0; +#X connect 42 0 43 0; diff --git a/pd/doc/3.audio.examples/J03.qlist.pd b/pd/doc/3.audio.examples/J03.qlist.pd new file mode 100644 index 00000000..58495ca1 --- /dev/null +++ b/pd/doc/3.audio.examples/J03.qlist.pd @@ -0,0 +1,102 @@ +#N canvas 233 179 684 516 12; +#X floatatom 57 459 0 0 0; +#N canvas 159 26 497 272 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 182 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 159 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 19 488 pd output; +#X msg 95 459 MUTE; +#X obj 19 211 osc-voice amp1 pit1; +#X obj 19 240 osc-voice amp2 pit2; +#X obj 19 269 osc-voice amp3 pit3; +#X obj 19 298 osc-voice amp4 pit4; +#X obj 19 327 osc-voice amp5 pit5; +#X obj 19 356 osc-voice amp6 pit6; +#X obj 19 385 osc-voice amp7 pit7; +#X obj 19 414 osc-voice amp8 pit8; +#X obj 467 382 qlist; +#X msg 389 226 stop; +#X msg 527 339 read qlist.txt; +#X obj 527 294 loadbang; +#X text 261 203 start; +#X text 391 202 stop; +#X text 537 318 reread file; +#X msg 470 238 rewind; +#X msg 538 238 next; +#X msg 258 254 tempo 100 \, bang; +#X msg 253 227 tempo 1 \, bang; +#X text 82 11 USING QLIST TO SEQUENCE AN OSCILLATOR BANK; +#X text 474 215 single step; +#X obj 556 454 r #; +#X text 35 61 Here is an eight voice additive synthesis patch controlled +by a qlist. Open a text editor on the file \, "qlist.txt" \, to see +how the oscillators' amplitudes and frequencies are specified. The +abstraction \, "osc-voice" \, shows an effective way to make patches +react to qlists but also to mousing.; +#X text 258 453 this is where qlist comments go:; +#X text 418 485 updatged for Pd version 0.34; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 1 0; +#X connect 12 0 11 0; +#X connect 13 0 11 0; +#X connect 14 0 13 0; +#X connect 18 0 11 0; +#X connect 19 0 11 0; +#X connect 20 0 11 0; +#X connect 21 0 11 0; diff --git a/pd/doc/3.audio.examples/J04.more.adsr.pd b/pd/doc/3.audio.examples/J04.more.adsr.pd new file mode 100644 index 00000000..5b38917a --- /dev/null +++ b/pd/doc/3.audio.examples/J04.more.adsr.pd @@ -0,0 +1,117 @@ +#N canvas 105 38 705 609 12; +#X obj 39 140 r trigger; +#X floatatom 70 376 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 351 166 t b; +#X obj 351 114 f; +#X obj 351 62 inlet; +#X text 358 30 mute; +#X obj 351 192 f; +#X msg 442 185 0; +#X msg 351 88 bang; +#X obj 351 140 moses 1; +#X obj 442 159 t b f; +#X obj 413 122 moses 1; +#X obj 86 154 dbtorms; +#X obj 413 96 r master-lvl; +#X obj 86 44 r master-lvl; +#X obj 351 218 s master-lvl; +#X obj 23 188 inlet~; +#X obj 207 42 inlet; +#X text 207 19 level; +#X obj 207 104 s master-lvl; +#X msg 100 67 set \$1; +#X obj 100 93 outlet; +#X msg 222 66 \; pd dsp 1; +#X obj 86 202 line~; +#X obj 23 221 *~; +#X obj 23 250 dac~; +#X obj 86 178 pack 0 50; +#X text 21 165 audio; +#X text 97 114 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 39 406 pd output; +#X msg 107 376 MUTE; +#X text 150 375 <-- output amplitude; +#X text 518 189 <-- attack; +#X text 485 281 <-- release; +#X obj 39 338 *~; +#X obj 39 282 *~; +#X obj 39 310 *~; +#X obj 80 340 osc~ 440; +#X text 88 9 ADSR envelope; +#X text 35 29 You can use the quartic trick to simplify patches using +ADSR envelopes. For amplitude control it's especially simple. It's +usually good enough in practice to control amplitudes by ranging an +ADSR from 0 to 1 (divide by 100 so your input range can be a comfortable +0-100) \, then take fourth power:; +#X obj 77 227 / 100; +#X floatatom 77 197 3 0 100; +#X msg 383 269 \; trigger 0; +#X obj 39 166 unpack; +#X floatatom 39 197 1 0 100; +#X msg 383 175 \; trigger 1 100; +#X text 503 229 <-- softer attack; +#X msg 382 222 \; trigger 1 60; +#X text 441 583 updated for Pd version 0.34; +#X text 14 437 Note that the units aren't dB \; for most of the range +0-100 it's about 0.4 dB per unit. If you want something closer to dB +\, you can set the scale as 0-40 instead of 0-100 (just change "/ 100" +to "/ 40") and then you'll get the response shown in the first patch +in this section.; +#X obj 596 519 *~; +#X obj 596 547 *~; +#X floatatom 605 390 3 0 100; +#X obj 605 416 mtof; +#X obj 605 441 sqrt; +#X obj 605 466 sqrt; +#X text 174 526 To use ADSR to control pitch \, you should; +#X text 173 545 usually just use real pitch units like this-->; +#X obj 596 490 adsr 0; +#X obj 39 253 adsr 0 100 200 70 300; +#X connect 0 0 16 0; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 7 0 2 0; +#X connect 8 0 9 0; +#X connect 8 0 9 1; +#X connect 9 0 7 0; +#X connect 10 0 7 1; +#X connect 13 0 32 1; +#X connect 14 0 13 0; +#X connect 16 0 17 0; +#X connect 16 1 14 0; +#X connect 17 0 32 0; +#X connect 23 0 24 0; +#X connect 23 0 24 1; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 31 1; +#X connect 31 0 23 0; +#X connect 31 0 23 1; +#X connect 32 0 8 0; +#X connect 32 0 8 1; diff --git a/pd/doc/3.audio.examples/J05.vibrato.pd b/pd/doc/3.audio.examples/J05.vibrato.pd new file mode 100644 index 00000000..78c38efd --- /dev/null +++ b/pd/doc/3.audio.examples/J05.vibrato.pd @@ -0,0 +1,158 @@ +#N canvas 80 10 736 726 12; +#X obj 27 220 r trigger; +#X floatatom 65 581 0 0 0; +#N canvas 159 26 531 288 output 0; +#X obj 351 166 t b; +#X obj 351 114 f; +#X obj 351 62 inlet; +#X text 358 30 mute; +#X obj 351 192 f; +#X msg 442 185 0; +#X msg 351 88 bang; +#X obj 351 140 moses 1; +#X obj 413 122 moses 1; +#X obj 86 154 dbtorms; +#X obj 413 96 r master-lvl; +#X obj 86 44 r master-lvl; +#X obj 351 218 s master-lvl; +#X obj 24 163 inlet~; +#X obj 207 42 inlet; +#X text 207 19 level; +#X obj 207 104 s master-lvl; +#X msg 100 67 set \$1; +#X obj 100 93 outlet; +#X msg 222 66 \; pd dsp 1; +#X obj 86 202 line~; +#X obj 23 221 *~; +#X obj 23 250 dac~; +#X obj 86 178 pack 0 50; +#X text 22 140 audio; +#X obj 442 159 t b; +#X obj 21 191 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 25 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 25 0 5 0; +#X connect 26 0 21 0; +#X restore 26 610 pd output; +#X msg 102 581 MUTE; +#X obj 27 446 *~; +#X obj 27 474 *~; +#X floatatom 62 277 3 0 100; +#X msg 484 482 \; trigger 0; +#X obj 27 246 unpack; +#X floatatom 27 277 1 0 100; +#X text 463 668 updated for Pd version 0.34; +#X obj 26 525 +~ 0.3; +#X obj 26 551 cos~; +#X obj 26 499 osc~; +#X text 88 9 PORTAMENTO AND VIBRATO; +#X obj 62 300 mtof; +#X obj 62 325 sqrt; +#X obj 62 350 sqrt; +#X text 619 402 <-- midC; +#X text 607 444 <-- octave up; +#X msg 484 388 \; trigger 1 60; +#X msg 483 435 \; trigger 1 72; +#X text 584 488 <-- release; +#X text 590 506 is optional; +#X obj 27 416 *~; +#X obj 236 396 +~ 1; +#X graph graph1 0 -1 130 1 433 643 633 543; +#X array array62 131 float 1; +#A 0 0.970031 1 0.970031 0.881921 0.740952 0.555571 0.336891 0.0980184 +-0.146729 -0.382682 -0.595698 -0.773009 -0.88 -0.9 -0.92 -0.92 -0.85773 +-0.707109 -0.514106 -0.290288 -0.0490716 0.195086 0.427551 0.63439 +0.803205 0.86 0.88 0.88 0.88 0.84 0.82 0.471402 0.242986 6.63397e-06 +-0.242974 -0.471391 -0.671554 -0.831465 -0.941541 -0.995184 -0.989178 +-0.923883 -0.803213 -0.68 -0.42 -0.24 0.1 0.4 0.6 0.7071 0.857723 0.956937 +0.998795 0.980787 0.903994 0.773018 0.595708 0.382694 0.146742 -0.0980052 +-0.336878 -0.55556 -0.7 -0.8 -0.88 -0.88 -0.88 -0.84 -0.82 -0.555582 +-0.336903 -0.0980316 0.146716 0.38267 0.595687 0.773001 0.903983 0.980782 +0.998796 0.956945 0.857737 0.707119 0.514117 0.290301 0.0490849 -0.195073 +-0.427539 -0.63438 -0.803197 -0.923873 -0.989174 -0.995187 -0.94155 +-0.83148 -0.671573 -0.471414 -0.242999 -1.99019e-05 0.242961 0.471379 +0.671544 0.831458 0.88 0.9 0.9 0.88 0.803221 0.63441 0.08 -0.14 -0.28 +-0.48 -0.64 -0.72 -0.857717 -0.956933 -0.998794 -0.98079 -0.904 -0.773026 +-0.595719 -0.382706 -0.146755 0.097992 0.336866 0.555549 0.740934 0.881909 +0.970025 1 0.970038; +#X pop; +#X obj 236 342 tabosc4~ array62; +#X floatatom 236 286 3 0 0; +#X obj 236 313 / 6; +#X obj 236 370 *~; +#X floatatom 390 323 3 0 0; +#X text 235 421 since we'll multiply \,; +#X text 234 436 vibrato output should; +#X text 234 453 be centered at 1 \, not 0; +#X text 275 372 multiply by vib depth; +#X obj 390 350 / 6923; +#X text 28 35 Portamento can be treated as a special case of an ADSR +envelope \, with 100 percent sustain. Vibrato is properly computed +in units of pitch \, but it's also easy to add vibrato to the envelope--before +raising it to the fourth power \, so that it acts pseudo-logarithmically. +Rather than add to the ADSR output \, we multiply a signal which controls +relative frequency. The relative frequency change is one plus an oscillator. +; +#X text 61 417 apply vibrato; +#X text 65 445 fourth; +#X text 68 461 power; +#X text 96 529 waveform; +#X text 95 509 simple; +#X text 465 344 4/(exp(log(2)/1200)-1); +#X text 469 325 conversion factor is; +#X text 383 279 vibrato depth; +#X text 382 296 in cents; +#X text 233 245 vibrato speed; +#X text 232 262 in Hertz; +#X text 152 168 I made a table with 6 cycles of vibrato and made small +changes with the mouse to get a not-exactly-repeating vibrato \, and +thus have to divide vibrato frequency by 6 You can just use a sine +or triangle wave if you prefer.; +#X obj 27 375 adsr 0 100 200 100 300; +#X connect 0 0 8 0; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 4 0 5 0; +#X connect 4 0 5 1; +#X connect 5 0 13 0; +#X connect 6 0 15 0; +#X connect 8 0 9 0; +#X connect 8 1 6 0; +#X connect 9 0 50 0; +#X connect 11 0 12 0; +#X connect 12 0 2 0; +#X connect 13 0 11 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 50 1; +#X connect 24 0 4 0; +#X connect 24 0 4 1; +#X connect 25 0 24 1; +#X connect 27 0 30 0; +#X connect 28 0 29 0; +#X connect 29 0 27 0; +#X connect 30 0 25 0; +#X connect 31 0 36 0; +#X connect 36 0 30 1; +#X connect 50 0 24 0; diff --git a/pd/doc/3.audio.examples/J06.adsr.sequenced.pd b/pd/doc/3.audio.examples/J06.adsr.sequenced.pd new file mode 100644 index 00000000..26300054 --- /dev/null +++ b/pd/doc/3.audio.examples/J06.adsr.sequenced.pd @@ -0,0 +1,217 @@ +#N canvas 32 15 950 613 12; +#X obj 33 220 r trigger; +#X floatatom 70 520 0 0 0; +#N canvas 159 26 584 307 output 0; +#X obj 390 189 t b; +#X obj 390 129 f; +#X obj 390 69 inlet; +#X text 397 32 mute; +#X obj 390 219 f; +#X msg 451 217 0; +#X msg 390 99 bang; +#X obj 390 159 moses 1; +#X obj 460 137 moses 1; +#X obj 100 178 dbtorms; +#X obj 460 107 r master-lvl; +#X obj 100 50 r master-lvl; +#X obj 390 249 s master-lvl; +#X obj 26 217 inlet~; +#X obj 239 49 inlet; +#X text 239 22 level; +#X obj 239 120 s master-lvl; +#X msg 115 78 set \$1; +#X obj 115 107 outlet; +#X msg 257 77 \; pd dsp 1; +#X obj 100 233 line~; +#X obj 26 254 *~; +#X obj 26 289 dac~; +#X obj 100 205 pack 0 50; +#X text 24 190 audio; +#X text 112 132 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 21 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X restore 32 546 pd output; +#X msg 108 521 MUTE; +#X obj 33 438 *~; +#X obj 33 331 *~ 0.01; +#X obj 33 366 *~; +#X obj 33 396 *~; +#X obj 80 360 r pitch; +#X obj 80 410 mtof; +#X floatatom 80 385 4 0 0; +#X floatatom 57 272 4 0 0; +#X obj 57 247 r level; +#X floatatom 131 272 4 0 0; +#X obj 131 247 r attack; +#X floatatom 216 272 4 0 0; +#X obj 216 247 r decay; +#X floatatom 291 272 4 0 0; +#X floatatom 385 272 4 0 0; +#X obj 291 247 r sustain; +#X obj 385 247 r release; +#X obj 509 106 r note; +#X msg 510 195 \; trigger 1; +#X obj 634 185 del; +#X msg 634 210 \; trigger 0; +#X obj 9 167 qlist; +#X obj 8 6 r qlist; +#X msg 30 35 bang; +#X msg 30 60 rewind; +#X obj 37 89 r tempo; +#X floatatom 37 114 4 0 0; +#X msg 37 139 tempo \$1; +#X obj 509 156 t b f; +#X obj 564 157 s pitch; +#X obj 656 120 r duration; +#X floatatom 656 145 4 0 0; +#X floatatom 509 131 4 0 0; +#X obj 289 320 r trigger; +#X floatatom 315 376 4 0 0; +#X floatatom 387 406 4 0 0; +#X floatatom 477 406 4 0 0; +#X floatatom 563 406 4 0 0; +#X floatatom 659 406 4 0 0; +#X obj 315 351 r level2; +#X obj 387 381 r attack2; +#X obj 477 381 r decay2; +#X obj 563 381 r sustain2; +#X obj 659 381 r release2; +#X obj 80 435 tabosc4~ array1; +#X floatatom 239 366 4 0 0; +#X obj 33 482 vcf~; +#X floatatom 140 488 4 0 0; +#X obj 140 463 r q; +#X obj 33 306 adsr 0 0 0 0 0; +#X obj 289 444 adsr 0 0 0 0 0; +#X obj 315 401 / 69.23; +#X obj 239 391 mtof; +#X obj 239 416 sqrt; +#X obj 239 441 sqrt; +#X obj 197 336 r filter; +#X obj 240 494 *~; +#X obj 240 519 *~; +#X obj 289 469 +~ 1; +#X obj 239 466 *~; +#X text 139 215 ADSR for amplitude:; +#X text 402 300 ADSR for filter. Here \, I thought it better to make +the envelope modify a constant "filter pitch"--so the "filter" receive +gets the "mtof" treatment and the ADSR is an offset in halftones (thus +the "/ 69.23" as compared to the previous patch.); +#X text 141 5 USING QLIST TO MAKE SEQUENCES OF "NOTES"; +#N canvas -10 258 703 380 otherstuff 0; +#X obj 289 86 loadbang; +#X obj 418 85 loadbang; +#X graph graph2 0 -1 66 1 62 221 262 81; +#X array array1 67 float 1; +#A 0 0 0 0 0 0.714286 0.742857 0.757143 0.771429 0.778571 0.785714 +0.785714 0.785714 0.785714 0.790476 0.795238 0.614286 0.585714 0.442857 +0.271429 -0.128571 -0.142857 -0.157143 -0.171429 -0.642857 -0.528571 +-0.614286 -0.685714 -0.828571 -0.828571 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0.557143 0.571429 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; +#X pop; +#X msg 418 115 \; qlist read qlist2.txt; +#X msg 289 111 \; level 100 \; attack 20 \; decay 300 \; sustain 70 +\; release 300 \; duration 300 \; pitch 72 \; filter 38 \; level2 49 +\; attack2 19 \; decay2 300 \; sustain2 17 \; release2 700 \; q 3 \; +tempo 1; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X restore 32 571 pd otherstuff; +#X text 82 34 <--start loop; +#X text 99 62 <--stop loop; +#X text 85 114 <--set tempo; +#X text 248 34 The qlist reads the file \, "qlist2.txt" \, which contains +four "note" messages and a message at the end that restarts the qlist +at the beginning. The "note" messages are translated into a pitch change +and triggers for the ADSRs:; +#X text 694 573 updated for Pd version 0.34; +#X text 155 573 <--loadbangs and table; +#X msg 468 518 \; qlist read qlist2.txt; +#X text 462 494 click to reload qlist2.txt; +#X text 149 521 <--output; +#X connect 0 0 53 0; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 4 0 50 0; +#X connect 5 0 6 0; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 6 0 7 1; +#X connect 7 0 4 0; +#X connect 8 0 10 0; +#X connect 9 0 48 0; +#X connect 10 0 9 0; +#X connect 11 0 53 1; +#X connect 12 0 11 0; +#X connect 13 0 53 2; +#X connect 14 0 13 0; +#X connect 15 0 53 3; +#X connect 16 0 15 0; +#X connect 17 0 53 4; +#X connect 18 0 53 5; +#X connect 19 0 17 0; +#X connect 20 0 18 0; +#X connect 21 0 36 0; +#X connect 23 0 24 0; +#X connect 26 0 25 0; +#X connect 27 0 25 0; +#X connect 28 0 25 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 25 0; +#X connect 32 0 23 0; +#X connect 32 0 22 0; +#X connect 32 1 33 0; +#X connect 34 0 35 0; +#X connect 35 0 23 1; +#X connect 36 0 32 0; +#X connect 37 0 54 0; +#X connect 38 0 55 0; +#X connect 39 0 54 2; +#X connect 40 0 54 3; +#X connect 41 0 54 4; +#X connect 42 0 54 5; +#X connect 43 0 38 0; +#X connect 44 0 39 0; +#X connect 45 0 40 0; +#X connect 46 0 41 0; +#X connect 47 0 42 0; +#X connect 48 0 4 1; +#X connect 49 0 56 0; +#X connect 50 0 2 0; +#X connect 51 0 50 2; +#X connect 52 0 51 0; +#X connect 53 0 5 0; +#X connect 54 0 62 0; +#X connect 55 0 54 1; +#X connect 56 0 57 0; +#X connect 57 0 58 0; +#X connect 58 0 63 0; +#X connect 59 0 49 0; +#X connect 60 0 61 0; +#X connect 60 0 61 1; +#X connect 61 0 50 1; +#X connect 62 0 63 1; +#X connect 63 0 60 0; +#X connect 63 0 60 1; diff --git a/pd/doc/3.audio.examples/J07.execution.order.pd b/pd/doc/3.audio.examples/J07.execution.order.pd new file mode 100644 index 00000000..2bea8e92 --- /dev/null +++ b/pd/doc/3.audio.examples/J07.execution.order.pd @@ -0,0 +1,127 @@ +#N canvas 100 17 724 631 12; +#X floatatom 448 290 0 0 0; +#X obj 70 432 +~; +#X obj 91 401 vd~ delay1; +#X floatatom 108 559 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 18 152 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 197 104 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 16 129 audio; +#X text 93 110 show level; +#X obj 18 179 hip~ 5; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 70 585 pd output; +#X msg 145 559 MUTE; +#X text 184 558 <-- output amplitude; +#X text 86 9 ORDER OF EXECUTION OF DELWRITE~ AND DELREAD~/VD~; +#X text 43 35 If you're writing to and reading from a delay line \, +you have to get the write sorted before the read or else you'll never +get less than a block's delay. This patch compares a "wrong" flanger +with a "right" one:; +#X obj 69 299 noise~; +#X obj 91 375 line~; +#X obj 448 344 pack 0 100; +#X text 518 292 <-- delay in samples; +#X obj 92 505 *~; +#X obj 92 481 -~; +#X floatatom 175 505 1 0 0; +#X obj 293 297 noise~; +#X obj 423 398 line~; +#N canvas 0 0 600 400 delay-writer 0; +#X obj 96 107 inlet~; +#X obj 96 180 outlet~; +#X obj 116 144 delwrite~ delay2 1000; +#X connect 0 0 1 0; +#X connect 0 0 2 0; +#X restore 293 325 pd delay-writer; +#N canvas 0 0 280 330 delay-reader 0; +#X obj 96 107 inlet~; +#X obj 89 267 outlet~; +#X obj 112 163 inlet~; +#X obj 112 198 vd~ delay2; +#X obj 89 237 +~; +#X connect 0 0 4 0; +#X connect 2 0 3 0; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X restore 293 427 pd delay-reader; +#X obj 70 533 +~; +#X text 194 505 <-- 0 to hear left-hand side \, 1 to hear right hand +side.; +#X text 46 105 All it took was to put the delread~ and vd~ objects +in subpatches. The audio connections between the subpatches force the +"reader" to be sorted after the "writer". DSP sorting in Pd follows +the hierarchy of windows.; +#X obj 447 318 / 44.1; +#X obj 82 329 delwrite~ delay1 1000; +#X text 450 596 updated for Pd version 0.34; +#X text 43 173 To hear the difference scroll the delay time between +0 and 100 samples. The patch at left doesn't let you get below 64 samples. +; +#X text 43 228 You can use the same strategy to avoid picking up 64-sample +delays in send~/receive~ and throw~/catch~ pairs.; +#X connect 0 0 23 0; +#X connect 1 0 14 1; +#X connect 1 0 20 0; +#X connect 2 0 1 1; +#X connect 3 0 4 1; +#X connect 4 0 3 0; +#X connect 5 0 4 2; +#X connect 9 0 1 0; +#X connect 9 0 24 0; +#X connect 10 0 2 0; +#X connect 11 0 10 0; +#X connect 11 0 17 0; +#X connect 13 0 20 1; +#X connect 14 0 13 0; +#X connect 15 0 13 1; +#X connect 16 0 18 0; +#X connect 17 0 19 1; +#X connect 18 0 19 0; +#X connect 19 0 14 0; +#X connect 20 0 4 0; +#X connect 23 0 11 0; diff --git a/pd/doc/3.audio.examples/J08.control.blocksize.pd b/pd/doc/3.audio.examples/J08.control.blocksize.pd new file mode 100644 index 00000000..05bad0d2 --- /dev/null +++ b/pd/doc/3.audio.examples/J08.control.blocksize.pd @@ -0,0 +1,111 @@ +#N canvas 100 17 662 466 12; +#X floatatom 130 389 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 397 110 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 85 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 18 152 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 197 104 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 16 129 audio; +#X text 93 110 show level; +#X obj 18 179 hip~ 5; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 92 415 pd output; +#X msg 167 389 MUTE; +#X text 206 388 <-- output amplitude; +#X obj 51 203 noise~; +#N canvas 0 0 760 350 delay-writer 0; +#X obj 75 100 inlet~; +#X obj 79 250 outlet~; +#X obj 90 194 delwrite~ delay3 1000; +#X obj 379 97 block~ 1; +#X obj 145 131 delread~ delay3; +#X obj 144 159 *~ 0.99; +#X obj 79 164 +~; +#X obj 146 100 inlet; +#X text 84 22 Because of the feedback \, the delwrite~ has to go after +the delread~. So we set the blocksize to 1 to minimize the resulting +delay.; +#X connect 0 0 6 0; +#X connect 4 0 5 0; +#X connect 5 0 6 1; +#X connect 6 0 2 0; +#X connect 6 0 1 0; +#X connect 7 0 4 0; +#X restore 91 328 pd delay-writer; +#X text 401 435 updated for Pd version 0.34; +#X obj 77 285 *~; +#X obj 273 275 expr 1000/$f1; +#X obj 273 249 mtof; +#X msg 176 220 1; +#X msg 176 282 0; +#X obj 177 164 metro 500; +#X obj 273 195 random 60; +#X obj 177 135 loadbang; +#X obj 216 217 del 2; +#X obj 273 221 + 30; +#X obj 51 228 lop~ 1000; +#X text 86 9 CONTROLLING DELAY WITH BLOCK~; +#X text 75 52 In situations where a delay read feeds pack to a delay +write \, you can shorten the minimum delay by changing the block size. +Do this in a subpatch...; +#X text 238 328 <-- here is the delay loop; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 17 0; +#X connect 5 0 1 0; +#X connect 7 0 5 0; +#X connect 8 0 5 1; +#X connect 9 0 8 0; +#X connect 10 0 7 1; +#X connect 11 0 7 1; +#X connect 12 0 10 0; +#X connect 12 0 13 0; +#X connect 12 0 15 0; +#X connect 13 0 16 0; +#X connect 14 0 12 0; +#X connect 15 0 11 0; +#X connect 16 0 9 0; +#X connect 17 0 7 0; diff --git a/pd/doc/3.audio.examples/J09.up.downsampling.pd b/pd/doc/3.audio.examples/J09.up.downsampling.pd new file mode 100644 index 00000000..cf50f9b9 --- /dev/null +++ b/pd/doc/3.audio.examples/J09.up.downsampling.pd @@ -0,0 +1,191 @@ +#N canvas 32 25 1089 690 10; +#X obj 57 567 osc~ 412; +#X floatatom 58 543 5 0 0; +#X obj 122 595 tabwrite~ scope; +#X msg 122 571 bang; +#X msg 205 43 bang; +#X obj 42 191 tabwrite~ scope; +#X msg 54 165 bang; +#N canvas 316 181 600 400 simple 0; +#X obj 185 46 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 38 inlet~; +#X obj 78 258 outlet~; +#X obj 317 103 block~ 64 1 0.25; +#X connect 0 0 1 0; +#X connect 2 0 1 0; +#X connect 2 0 3 0; +#X restore 42 64 pd simple downsampling 4; +#X msg 451 42 bang; +#X obj 275 190 tabwrite~ scope; +#X msg 287 164 bang; +#X graph graph2 0 -1 511 1 297 629 897 489; +#X array scope 512 float 0; +#X pop; +#X msg 683 45 bang; +#X obj 520 193 tabwrite~ scope; +#X msg 532 167 bang; +#X msg 929 44 bang; +#X obj 753 192 tabwrite~ scope; +#X msg 765 166 bang; +#N canvas 165 168 600 400 simple 0; +#X obj 185 74 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 38 inlet~; +#X obj 78 258 outlet~; +#X text 130 38 zero-padding upsampling; +#X obj 317 103 block~ 64 1 4; +#X connect 0 0 1 0; +#X connect 2 0 1 0; +#X connect 2 0 3 0; +#X restore 520 66 pd simple upsampling 4; +#X obj 42 38 r~ sine; +#X obj 275 39 r~ sine; +#X obj 57 595 s~ sine; +#X obj 520 41 r~ sine; +#X obj 753 41 r~ sine; +#X obj 41 415 tabwrite~ scope; +#X msg 47 369 bang; +#X msg 804 265 bang; +#X obj 711 415 tabwrite~ scope; +#X msg 723 389 bang; +#X obj 41 262 r~ sine; +#X obj 711 264 r~ sine; +#X obj 152 416 tabwrite~ scope; +#X msg 158 370 bang; +#X text 43 431 zero-padded; +#N canvas 290 149 600 400 downsampling 0; +#X obj 78 38 inlet~; +#X obj 78 258 outlet~; +#X obj 152 258 outlet~ hold; +#X obj 317 103 block~ 64 1 0.25; +#X connect 0 0 1 0; +#X connect 0 0 2 0; +#X restore 41 288 pd downsampling 4 (mixed); +#N canvas 261 147 600 400 bad 0; +#X obj 185 81 inlet; +#X obj 185 102 tabwrite~ scope; +#X text 172 257 "lin" is for linear upsampling; +#X text 160 39 "lin" has no meaning when downsampling; +#X obj 317 103 block~ 64 2; +#X obj 78 258 outlet~; +#X obj 78 38 inlet~; +#X connect 0 0 1 0; +#X connect 6 0 1 0; +#X connect 6 0 5 0; +#X restore 711 288 pd bad overlap; +#X msg 1018 263 bang; +#X obj 841 415 tabwrite~ scope; +#X msg 853 389 bang; +#X obj 841 264 r~ sine; +#N canvas 121 72 600 400 bad 0; +#X obj 185 81 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 258 outlet~ lin; +#X obj 78 38 inlet~ lin; +#X text 167 38 "lin" is for linear upsampling; +#X text 166 259 "lin" has no meaning when downsampling; +#X obj 317 103 block~ 64 2 2; +#X connect 0 0 1 0; +#X connect 3 0 1 0; +#X connect 3 0 2 0; +#X restore 841 288 pd bad overlap (upsampled); +#X msg 458 267 bang; +#X obj 323 417 tabwrite~ scope; +#X msg 335 391 bang; +#X obj 323 266 r~ sine; +#X text 155 433 sample&hold; +#X msg 653 265 bang; +#X obj 511 416 tabwrite~ scope; +#X msg 523 390 bang; +#X obj 511 265 r~ sine; +#N canvas 249 128 600 400 downsampled 0; +#X obj 185 81 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 258 outlet~ lin; +#X obj 78 230 *~ 0.5; +#X obj 78 38 inlet~; +#X obj 317 103 block~ 128 2 0.25; +#X connect 0 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 4 0 3 0; +#X restore 511 289 pd downsampled overlap; +#N canvas 175 94 600 400 upsampled 0; +#X obj 185 81 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 258 outlet~ lin; +#X obj 78 38 inlet~ lin; +#X obj 78 230 *~ 0.5; +#X obj 317 103 block~ 256 2 2; +#X connect 0 0 1 0; +#X connect 3 0 1 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X restore 323 290 pd upsampled overlap; +#N canvas 350 164 600 400 upsampling 0; +#X obj 185 81 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 38 inlet~ hold; +#X obj 78 258 outlet~; +#X text 160 39 "hold" is for sample&hold upsampling; +#X obj 317 103 block~ 64 1 16; +#X connect 0 0 1 0; +#X connect 2 0 1 0; +#X connect 2 0 3 0; +#X restore 753 65 pd upsampling 16 (sample&hold); +#N canvas 236 170 600 400 downsampling 0; +#X obj 185 81 inlet; +#X obj 185 102 tabwrite~ scope; +#X obj 78 258 outlet~ lin; +#X obj 78 38 inlet~ lin; +#X text 172 257 "lin" is for linear upsampling; +#X obj 320 102 block~ 64 1 0.125; +#X text 330 137 0.125 = 1/8 = 8*downsampling; +#X text 160 39 "lin" has (still !) no meaning when downsampling; +#X connect 0 0 1 0; +#X connect 3 0 1 0; +#X connect 3 0 2 0; +#X restore 275 63 pd downsampling 8 (linear); +#X text 718 314 a pd-bug !; +#X connect 0 0 2 0; +#X connect 0 0 21 0; +#X connect 1 0 0 0; +#X connect 3 0 2 0; +#X connect 4 0 7 1; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 8 0 53 1; +#X connect 10 0 9 0; +#X connect 12 0 18 1; +#X connect 14 0 13 0; +#X connect 15 0 52 1; +#X connect 17 0 16 0; +#X connect 18 0 13 0; +#X connect 19 0 7 0; +#X connect 20 0 53 0; +#X connect 22 0 18 0; +#X connect 23 0 52 0; +#X connect 25 0 24 0; +#X connect 26 0 35 1; +#X connect 28 0 27 0; +#X connect 29 0 34 0; +#X connect 30 0 35 0; +#X connect 32 0 31 0; +#X connect 34 0 24 0; +#X connect 34 1 31 0; +#X connect 35 0 27 0; +#X connect 36 0 40 1; +#X connect 38 0 37 0; +#X connect 39 0 40 0; +#X connect 40 0 37 0; +#X connect 41 0 51 1; +#X connect 43 0 42 0; +#X connect 44 0 51 0; +#X connect 46 0 50 1; +#X connect 48 0 47 0; +#X connect 49 0 50 0; +#X connect 50 0 47 0; +#X connect 51 0 42 0; +#X connect 52 0 16 0; +#X connect 53 0 9 0; diff --git a/pd/doc/3.audio.examples/J10.waveshaping.pd b/pd/doc/3.audio.examples/J10.waveshaping.pd new file mode 100644 index 00000000..b217112f --- /dev/null +++ b/pd/doc/3.audio.examples/J10.waveshaping.pd @@ -0,0 +1,133 @@ +#N canvas 222 24 761 466 12; +#X floatatom 61 408 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 23 433 pd output; +#X msg 99 405 MUTE; +#X text 139 406 <-- output amplitude; +#X obj 336 272 loadbang; +#X text 35 6 ANALOG SYNTH SEQUENCER; +#X obj 215 152 metro 100; +#X obj 214 178 f; +#X obj 248 181 + 1; +#X obj 248 205 mod 11; +#X graph graph1 0 36 11 96 511 197 711 97; +#X array array1 11 float 0; +#X pop; +#X floatatom 215 127 0 0 0; +#X floatatom 304 152 0 0 0; +#X obj 214 230 tabread array1; +#X obj 214 256 mtof; +#X obj 214 283 osc~ 0; +#X msg 26 171 1; +#X obj 24 303 *~; +#X obj 24 350 cos~; +#X obj 24 375 hip~ 5; +#X obj 24 327 +~ 0.1; +#X msg 336 298 \; array1 0 50 51 52 50 52 56 50 56 58 52 58; +#X floatatom 43 219 0 0 0; +#X floatatom 163 221 0 0 0; +#X floatatom 93 219 0 0 0; +#X floatatom 128 220 0 0 0; +#X msg 93 311 0; +#X msg 93 329 0.1; +#X msg 93 348 0.25; +#X msg 215 101 1; +#X text 244 101 <--START; +#X text 126 331 <--symmetry; +#X text 72 185 ADSR controls; +#X text 43 199 lvl; +#X text 95 200 A; +#X text 137 201 D; +#X text 170 202 S; +#X floatatom 298 181 0 0 0; +#X text 332 183 <--increment; +#X text 339 155 <--msec; +#X text 20 35 Analog synths had sequencers which could be used in a +wide variety of ways. You can use an array to hold a sequence of control +values as shown here.; +#X obj 23 274 adsr 1 65 13 10 1000; +#X obj 42 243 / 100; +#X text 336 340 You can also do microtones \; 50.5 is a quarter tone +sharper than 50; +#X text 505 431 updated for Pd version 0.34; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 21 0; +#X connect 6 0 7 0; +#X connect 6 0 16 0; +#X connect 7 0 8 0; +#X connect 7 0 13 0; +#X connect 8 0 9 0; +#X connect 9 0 7 1; +#X connect 11 0 6 0; +#X connect 12 0 6 1; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 17 1; +#X connect 16 0 41 0; +#X connect 17 0 20 0; +#X connect 18 0 19 0; +#X connect 19 0 1 0; +#X connect 20 0 18 0; +#X connect 22 0 42 0; +#X connect 23 0 41 4; +#X connect 24 0 41 2; +#X connect 25 0 41 3; +#X connect 26 0 20 1; +#X connect 27 0 20 1; +#X connect 28 0 20 1; +#X connect 29 0 11 0; +#X connect 37 0 8 1; +#X connect 41 0 17 0; +#X connect 42 0 41 1; diff --git a/pd/doc/3.audio.examples/adsr.pd b/pd/doc/3.audio.examples/adsr.pd index b6b2d7d2..351f354c 100644 --- a/pd/doc/3.audio.examples/adsr.pd +++ b/pd/doc/3.audio.examples/adsr.pd @@ -1,64 +1,77 @@ -#N canvas 112 36 785 655 12; -#X obj 205 119 inlet; -#X obj 412 147 inlet; -#X text 201 94 trigger; -#X obj 205 147 sel 0; -#X obj 258 157 t b; -#X obj 134 335 f \$1; -#X obj 134 360 pack 0 \$2; -#X obj 476 148 inlet; -#X obj 403 281 del \$2; +#N canvas 371 139 752 655 12; +#X obj 105 111 inlet; +#X obj 435 151 inlet; +#X text 101 86 trigger; +#X obj 105 139 sel 0; +#X obj 244 155 t b; +#X obj 166 264 f \$1; +#X obj 166 289 pack 0 \$2; +#X obj 492 151 inlet; +#X obj 438 281 del \$2; #X obj 458 429 line~; -#X obj 432 304 f \$4; -#X obj 466 379 pack 0 \$3; -#X obj 537 149 inlet; -#X obj 605 149 inlet; -#X obj 678 148 inlet; -#X msg 205 178 stop; -#X obj 576 301 pack 0 \$5; -#X text 410 124 level; -#X obj 466 355 * \$1; -#X text 31 306 ATTACK; +#X obj 462 304 f \$4; +#X obj 501 379 pack 0 \$3; +#X obj 554 151 inlet; +#X obj 616 151 inlet; +#X obj 689 150 inlet; +#X msg 105 170 stop; +#X obj 612 306 pack 0 \$5; +#X text 435 129 level; +#X obj 501 355 * \$1; #X obj 458 454 outlet~; -#X text 6 329 recall level; -#X text 6 349 and pack with; -#X text 7 369 attack time; -#X text 131 134 if zero; -#X text 132 151 release; -#X text 112 168 and cancel; -#X text 143 185 decay; -#X text 262 139 bang if attack; -#X text 245 272 on attack \, set a; -#X text 200 286 delay to go to sustain; -#X text 242 303 recall sustain value; -#X text 237 354 multiply by overall level; -#X text 281 375 pack with decay time; -#X text 569 327 on release ramp; -#X text 570 344 back to zero; -#X text 17 487 When you send this patch a nonzero trigger it schedules -a line~ to do an attack and decay \, and if zero \, it starts the release -ramp.; -#X obj 432 329 * 0.01; -#X text 16 539 Objects such as "f" and "pack" can be given dollar sign +#X text 102 378 and pack with; +#X text 103 398 attack time; +#X text 31 126 if zero; +#X text 32 143 release; +#X text 12 160 and cancel; +#X text 43 177 decay; +#X text 284 272 on attack \, set a; +#X text 278 305 recall sustain value; +#X text 315 378 pack with decay time; +#X text 605 332 on release ramp; +#X text 606 349 back to zero; +#X obj 462 329 * 0.01; +#X text 47 567 Objects such as "f" and "pack" can be given dollar sign arguments to initialize their contents from adsr's creation arguments. Inlets are supplied to change them on the fly.; -#X text 505 613 Updated for Pd version 0.34; -#X text 86 4 ADSR ENVELOPE; -#X text 245 327 convert from percent; -#X text 76 24 Arguments: level \, attack time \, decay time \, sustain +#X text 13 2 ADSR ENVELOPE; +#X text 488 129 attack; +#X text 555 128 decay; +#X text 609 129 sustain; +#X text 686 129 release; +#X text 202 71 attack; +#X obj 204 92 moses; +#X obj 194 122 t b b; +#X msg 128 290 0; +#X text 20 273 optionally; +#X text 10 291 bash to zero; +#X text 25 246 ATTACK:; +#X text 49 477 When you send this patch a positive trigger it schedules +a line~ to do an attack and decay \, and if zero \, it starts the release +ramp.; +#X text 495 629 Updated for Pd version 0.37; +#X text 255 89 test for negative trigger; +#X text 253 113 if so \, zero; +#X text 254 129 the output; +#X text 278 165 in any case; +#X text 303 355 multiply by peak level; +#X text 280 286 delay for sustain; +#X text 276 328 convert from percent; +#X text 155 340 ... then; +#X text 103 359 recall peak level; +#X text 439 113 peak; +#X text 281 149 ... do this; +#X text 47 529 Negative triggers cause the output to jump to zero and +then attack (instead of attacking from the current location).; +#X text 208 1 Arguments: level \, attack time \, decay time \, sustain level \, release time. A \, D \, and R are in msec and S is in percent. -This patch is used as an abstraction in 25.envelope.pd and others. -; -#X text 472 127 attack; -#X text 538 126 decay; -#X text 598 127 sustain; -#X text 675 127 release; +This patch is used as an abstraction in various examples.; #X connect 0 0 3 0; #X connect 1 0 5 1; #X connect 1 0 18 1; #X connect 3 0 15 0; #X connect 3 0 16 0; -#X connect 3 1 4 0; +#X connect 3 1 39 0; #X connect 4 0 5 0; #X connect 4 0 8 0; #X connect 5 0 6 0; @@ -66,8 +79,8 @@ This patch is used as an abstraction in 25.envelope.pd and others. #X connect 7 0 6 1; #X connect 7 0 8 1; #X connect 8 0 10 0; -#X connect 9 0 20 0; -#X connect 10 0 37 0; +#X connect 9 0 19 0; +#X connect 10 0 31 0; #X connect 11 0 9 0; #X connect 12 0 11 1; #X connect 13 0 10 1; @@ -75,4 +88,9 @@ This patch is used as an abstraction in 25.envelope.pd and others. #X connect 15 0 8 0; #X connect 16 0 9 0; #X connect 18 0 11 0; -#X connect 37 0 18 0; +#X connect 31 0 18 0; +#X connect 39 0 40 0; +#X connect 39 1 4 0; +#X connect 40 0 4 0; +#X connect 40 1 41 0; +#X connect 41 0 9 0; diff --git a/pd/doc/3.audio.examples/output~.pd b/pd/doc/3.audio.examples/output~.pd index 13ae9252..d1ccdc9f 100644 --- a/pd/doc/3.audio.examples/output~.pd +++ b/pd/doc/3.audio.examples/output~.pd @@ -7,13 +7,13 @@ #X obj 630 518 t b f; #X obj 596 479 moses 1; #X obj 30 117 dbtorms; -#X obj 83 208 inlet~; +#X obj 86 207 inlet~; #X msg 341 285 \; pd dsp 1; -#X obj 27 208 line~; -#X obj 61 242 *~; -#X obj 61 272 dac~; +#X obj 30 207 line~; +#X obj 64 241 *~; +#X obj 64 271 dac~; #X obj 30 147 pack 0 50; -#X text 110 184 audio in; +#X text 113 183 audio in; #X text 301 496 test if less than 1 -->; #X text 267 523 if true convert to bang -->; #X text 101 116 <-- convert from dB to linear units; @@ -21,8 +21,8 @@ #X obj 516 449 bng 15 250 50 0 empty empty mute -38 7 0 12 -262144 -1 -1; #X text 119 146 <-- make a ramp to avoid clicks or zipper noise; -#X obj 172 209 inlet~; -#X obj 151 241 *~; +#X obj 175 208 inlet~; +#X obj 154 240 *~; #X text 502 399 MUTE logic:; #X obj 341 193 r \$0-master-lvl; #X obj 516 573 s \$0-master-lvl; @@ -46,8 +46,8 @@ patch.; #X connect 6 1 2 1; #X connect 7 0 13 0; #X connect 8 0 11 1; -#X connect 10 0 11 1; #X connect 10 0 22 0; +#X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 13 0 10 0; #X connect 18 0 9 0; diff --git a/pd/doc/3.audio.examples/qlist-sampler.txt b/pd/doc/3.audio.examples/qlist-sampler.txt new file mode 100644 index 00000000..0c412767 --- /dev/null +++ b/pd/doc/3.audio.examples/qlist-sampler.txt @@ -0,0 +1,147 @@ +note 60 90 50 2 50 30 30; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +15 note 60; +100 note 59 90 100; +comment measure 1; +100 note 60 90 150 2 0; + note 36 90 200 2 50; +200 note 48 90 250 2 0; + note 40 90 200 2 50; + note 43 90 200 2 50; +200 note 48 90 250 2 0; + note 31 90 200 2 50; +200 note 55 90 100; + note 41 90 200; + note 43 90 200; +100 note 53 90 100; +100 note 52 90 100; + note 36 90 200; +100 note 55 90 100; +100 note 60 90 100; + note 40 90 200; + note 43 90 200; +100 note 59 90 100; +100 note 60 90 100; + note 25 90 200; +100 note 64 90 100; +100 note 62 90 100; + note 39 90 200; + note 43 90 200; +100 note 61 90 100; + +comment measure 2; +100 note 62 90 150 2 0; + note 26 90 200; +200 note 50 90 250 2 50; + note 41 90 200; + note 42 90 200; +200 note 50 90 250; + note 29 90 200; +200 note 50 90 100; + note 30 90 200; + note 44 90 200; + note 48 90 200; +100 note 48 90 100; +100 note 47 90 100; + note 31 90 200; + note 43 90 200; + note 47 90 200; +100 note 50 90 100; +100 note 55 90 100; + note 34 90 200; + note 42 90 200; + note 46 90 200; +100 note 54 90 100; +100 note 55 90 200; + note 35 90 200; + note 42 90 200; + note 45 90 200; +200 note 57 90 100; + note 41 90 200; + note 47 90 200; +100 note 59 90 100; +comment measure 3; +100 note 60 90 100; + note 24 90 200; + note 40 90 200; + note 48 90 200 2 0; + +100 note 59 90 100 2 50; +100 note 57 90 100; +100 note 55 90 100; + +100 note 57 90 100; + note 28 90 200; + note 38 90 200; + note 46 90 200; +100 note 55 90 100; +100 note 53 90 100; +100 note 52 90 100; + +100 note 53 90 100; + note 29 90 100; + note 36 90 100; + note 45 90 100; +100 note 52 90 100; +100 note 50 90 100; + note 29 90 300; + note 36 90 300; + note 45 90 300; +100 note 48 90 100; + +100 note 50 90 100; +100 note 48 90 100; +100 note 47 90 100; + note 29 90 300; + note 38 90 300; + note 44 90 300 2 0; +100 note 45 90 100 2 50; + +comment measure 4; +100 note 43 90 100; + note 31 90 200; + note 38 90 200; +100 note 48 90 100; +100 note 47 90 100; + note 31 90 300; + note 40 90 300; + note 43 90 300 2 0; +100 note 50 90 100 2 50; + +100 note 48 90 100; +100 note 52 90 100; +100 note 50 90 100; + note 31 90 300 2 0; + note 41 90 300; + note 43 90 300; +100 note 53 90 100 2 50; + +100 note 52 90 200; + note 31 90 300 2 50; +200 note 48 90 200; + note 19 90 200 2 50; + note 29 90 200 2 50; + note 36 90 200 2 50; + +200 note 48 90 100 2 50 0 4000; + note 12 90 300; + note 28 90 300; + note 36 90 300; + + + diff --git a/pd/doc/3.audio.examples/qlist.txt b/pd/doc/3.audio.examples/qlist.txt index fe105141..719dc89b 100644 --- a/pd/doc/3.audio.examples/qlist.txt +++ b/pd/doc/3.audio.examples/qlist.txt @@ -1,4 +1,4 @@ -# This is a qlist for patch number 60, which demonstrates an oscillator
+# This is a qlist for patch number 68, which demonstrates an oscillator
bank.
;
# comments start with a "#" which must be followed by a space. The comment
diff --git a/pd/doc/3.audio.examples/shepvoice.pd b/pd/doc/3.audio.examples/shepvoice.pd new file mode 100644 index 00000000..f1929976 --- /dev/null +++ b/pd/doc/3.audio.examples/shepvoice.pd @@ -0,0 +1,37 @@ +#N canvas 63 20 638 403 12; +#X obj 300 253 pack 0 50; +#X obj 243 203 pack 0 50; +#X obj 151 216 inlet~; +#X obj 243 232 line~; +#X obj 300 278 line~; +#X obj 243 297 *~; +#X obj 151 316 +~; +#X obj 151 342 outlet~; +#X obj 399 121 r pitch+; +#X obj 326 108 r interval+; +#X obj 297 144 expr $f1 * $f2 + $f3; +#X obj 537 90 r dropoff+; +#X obj 297 75 expr ($i1% 10000) * 0.0002 - 1; +#X obj 296 20 r phase; +#X obj 296 47 + \$1; +#X obj 457 114 expr exp(-$f1*$f1*$f2); +#X obj 243 179 mtof; +#X obj 243 258 osc~; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 2 0 6 0; +#X connect 3 0 17 0; +#X connect 4 0 5 1; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 8 0 10 2; +#X connect 9 0 10 1; +#X connect 10 0 16 0; +#X connect 11 0 15 1; +#X connect 12 0 10 0; +#X connect 12 0 15 0; +#X connect 13 0 14 0; +#X connect 14 0 12 0; +#X connect 15 0 0 0; +#X connect 16 0 1 0; +#X connect 17 0 5 0; diff --git a/pd/doc/3.audio.examples/sinevoice.pd b/pd/doc/3.audio.examples/sinevoice.pd new file mode 100644 index 00000000..d8d1848b --- /dev/null +++ b/pd/doc/3.audio.examples/sinevoice.pd @@ -0,0 +1,67 @@ +#N canvas 621 65 547 441 12; +#X obj 120 299 line~; +#X obj 120 323 *~; +#X obj 120 346 *~; +#X obj 125 232 sqrt; +#X obj 96 39 inlet; +#X obj 125 253 sqrt; +#X obj 51 360 inlet~; +#X obj 51 413 outlet~; +#X obj 120 370 *~; +#X obj 206 351 osc~; +#X obj 51 388 +~; +#X obj 261 210 pack; +#X text 142 40 inlet: volume \, pitch \, duration; +#X obj 96 88 unpack 0 0 0; +#X text 12 2 arguments: \$1 = relative amplitude \, \$2 = pitch multiplier +\, \$3 = detune \, \$4 = time multiplier; +#X obj 157 117 dbtorms; +#X obj 157 139 * \$1; +#X obj 125 211 f; +#X obj 206 216 f; +#X obj 228 117 mtof; +#X obj 228 142 * \$2; +#X obj 228 164 + \$3; +#X obj 273 118 * \$4; +#X msg 8 148 0 5; +#X msg 99 118 bang; +#X obj 42 148 del 5; +#X obj 106 65 outlet; +#X msg 99 161 0; +#X obj 125 272 pack 0 5; +#X obj 99 139 del 10; +#X connect 0 0 1 0; +#X connect 0 0 1 1; +#X connect 1 0 2 0; +#X connect 1 0 2 1; +#X connect 2 0 8 0; +#X connect 3 0 5 0; +#X connect 4 0 13 0; +#X connect 4 0 26 0; +#X connect 5 0 28 0; +#X connect 6 0 10 0; +#X connect 8 0 10 1; +#X connect 9 0 8 1; +#X connect 10 0 7 0; +#X connect 11 0 0 0; +#X connect 13 0 15 0; +#X connect 13 0 23 0; +#X connect 13 0 24 0; +#X connect 13 1 19 0; +#X connect 13 2 22 0; +#X connect 15 0 16 0; +#X connect 16 0 17 1; +#X connect 17 0 3 0; +#X connect 18 0 9 0; +#X connect 19 0 20 0; +#X connect 20 0 21 0; +#X connect 21 0 18 1; +#X connect 22 0 11 1; +#X connect 23 0 0 0; +#X connect 24 0 25 0; +#X connect 24 0 29 0; +#X connect 25 0 17 0; +#X connect 25 0 18 0; +#X connect 27 0 11 0; +#X connect 28 0 0 0; +#X connect 29 0 27 0; diff --git a/pd/doc/5.reference/acoustics-help.pd b/pd/doc/5.reference/acoustics-help.pd new file mode 100644 index 00000000..2a46f589 --- /dev/null +++ b/pd/doc/5.reference/acoustics-help.pd @@ -0,0 +1,40 @@ +#N canvas 163 25 582 408 12; +#X obj 15 269 ftom; +#X obj 8 10 mtof; +#X obj 15 217 mtof; +#X floatatom 15 189 0 0 0; +#X floatatom 15 244 0 0 0; +#X obj 64 10 ftom; +#X floatatom 15 293 0 0 0; +#X obj 120 11 dbtorms; +#X obj 196 11 rmstodb; +#X obj 275 11 dbtopow; +#X obj 352 11 powtodb; +#X text 21 53 The mtof object transposes a midi value into a frequency +in Hertz \, so that "69" goes to "440". You can specify microtonal +pitches as in "69.5" (a quarter tone higher than 69). Ftom does the +reverse.; +#X floatatom 147 185 0 0 0; +#X floatatom 147 240 0 0 0; +#X floatatom 147 289 0 0 0; +#X obj 147 213 dbtorms; +#X obj 147 265 rmstodb; +#X floatatom 261 186 0 0 0; +#X floatatom 261 241 0 0 0; +#X floatatom 261 290 0 0 0; +#X obj 261 214 dbtopow; +#X obj 261 266 powtodb; +#X text 27 336 Overflows and underflows are clipped.; +#X text 300 376 updated for pd version 0.33; +#X connect 0 0 6 0; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X connect 12 0 15 0; +#X connect 13 0 16 0; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 17 0 20 0; +#X connect 18 0 21 0; +#X connect 20 0 18 0; +#X connect 21 0 19 0; diff --git a/pd/doc/5.reference/acoustics~-help.pd b/pd/doc/5.reference/acoustics~-help.pd new file mode 100644 index 00000000..f7515339 --- /dev/null +++ b/pd/doc/5.reference/acoustics~-help.pd @@ -0,0 +1,81 @@ +#N canvas 35 42 813 458 12; +#X obj 158 118 mtof~; +#X obj 158 174 snapshot~; +#X obj 698 132 metro 100; +#X floatatom 158 205 0 0 0; +#X obj 49 174 snapshot~; +#X floatatom 49 55 0 0 0; +#X floatatom 49 205 0 0 0; +#X obj 49 118 ftom~; +#X obj 264 174 snapshot~; +#X floatatom 264 205 0 0 0; +#X obj 264 118 dbtorms~; +#X obj 697 58 loadbang; +#X msg 709 88 \; pd dsp 1; +#X obj 49 86 sig~; +#X floatatom 158 55 0 0 0; +#X obj 158 86 sig~; +#X floatatom 264 54 0 0 0; +#X obj 264 86 sig~; +#X obj 492 172 snapshot~; +#X floatatom 492 203 0 0 0; +#X obj 383 172 snapshot~; +#X floatatom 383 53 0 0 0; +#X floatatom 383 203 0 0 0; +#X obj 607 172 snapshot~; +#X floatatom 607 203 0 0 0; +#X obj 383 84 sig~; +#X floatatom 492 53 0 0 0; +#X obj 492 84 sig~; +#X floatatom 607 53 0 0 0; +#X obj 607 84 sig~; +#X obj 383 115 rmstodb~; +#X obj 492 115 dbtopow~; +#X obj 607 115 powtodb~; +#X obj 17 10 mtof~; +#X text 70 11 (etc) - conversions for audio signals; +#X text 60 400 see also:; +#X obj 145 400 mtof; +#X text 192 400 (etc.); +#X text 547 416 updated for Pd version 0.33; +#X text 43 241 These objects convert MIDI pitch to frequency and back +\, and dB to and from RMS and power. THey take audio signals as input +and output (and work sample by sample.) Since they call library math +functions \, they may be much more expensive than other workaday tilde +objects such as *~ and osc~ \, depending on your hardware and math +library.; +#X text 41 343 Boundary conditions are handled "reasonably". 100 db +is assigned an RMS of 1 \, and dbtorms~ and dbtopow~ output true zero +for 0 dB and less.; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 2 0 8 0; +#X connect 2 0 4 0; +#X connect 2 0 20 0; +#X connect 2 0 18 0; +#X connect 2 0 23 0; +#X connect 4 0 6 0; +#X connect 5 0 13 0; +#X connect 7 0 4 0; +#X connect 8 0 9 0; +#X connect 10 0 8 0; +#X connect 11 0 2 0; +#X connect 11 0 12 0; +#X connect 13 0 7 0; +#X connect 14 0 15 0; +#X connect 15 0 0 0; +#X connect 16 0 17 0; +#X connect 17 0 10 0; +#X connect 18 0 19 0; +#X connect 20 0 22 0; +#X connect 21 0 25 0; +#X connect 23 0 24 0; +#X connect 25 0 30 0; +#X connect 26 0 27 0; +#X connect 27 0 31 0; +#X connect 28 0 29 0; +#X connect 29 0 32 0; +#X connect 30 0 20 0; +#X connect 31 0 18 0; +#X connect 32 0 23 0; diff --git a/pd/doc/5.reference/adc~_dac~-help.pd b/pd/doc/5.reference/adc~_dac~-help.pd new file mode 100644 index 00000000..e97429b6 --- /dev/null +++ b/pd/doc/5.reference/adc~_dac~-help.pd @@ -0,0 +1,11 @@ +#N canvas 195 155 575 293 12; +#X obj 8 11 adc~; +#X obj 72 11 dac~; +#X obj 63 121 adc~ 5; +#X text 143 121 (input from channel 5 only); +#X obj 61 145 dac~ 1 2 5 23; +#X text 184 145 (output to channels 1 \, 2 \, 5 \, and 23); +#X text 16 173 The actual number of channels Pd inputs and outputs are set on Pd's command line. You can open patches that want to use more channels \, and channel numbers out of rance will be dropped (dac~) or appear as zero (adc~).; +#X text 308 254 updated for Pd version 0.33; +#X text 122 9 - audio I/O; +#X text 8 46 Adc~ and dac~ rovide real-time audio input and output for Pd \, respectively \, whether analog or digital. By default they are stereo but you can specify channel numbers as in:; diff --git a/pd/doc/5.reference/append-help.pd b/pd/doc/5.reference/append-help.pd new file mode 100644 index 00000000..7cacefe4 --- /dev/null +++ b/pd/doc/5.reference/append-help.pd @@ -0,0 +1,44 @@ +#N canvas 330 8 595 450 12; +#X text 15 344 see also:; +#N canvas 164 72 425 146 help-append-template1 0; +#X obj 60 21 template float x float y float z; +#X obj 18 81 filledpolygon z z 0 0 0 20 0 20 30 0 30; +#X restore 357 373 pd help-append-template1; +#X obj 141 393 template; +#X obj 16 368 get; +#X obj 48 368 set; +#X obj 148 368 getsize; +#X obj 215 368 setsize; +#X obj 218 393 element; +#X obj 15 394 sublist; +#X obj 83 393 scalar; +#N canvas 0 0 276 163 help-append-data 1; +#X restore 357 351 pd help-append-data; +#X obj 212 255 pointer; +#X obj 21 10 append; +#X text 75 9 -- add item to a list; +#X msg 212 231 traverse pd-help-append-data \, bang; +#X obj 34 295 append help-append-template1 x y z; +#X floatatom 34 246 5 0 0; +#X obj 34 266 t f f; +#X msg 356 311 \; pd-help-append-data clear; +#X text 27 28 "append" maintains a pointer to a scalar \, or else an +empty pointer to the head of a list. You may set the pointer using +the leftmost inlet. The creation arguments specify the template of +a new scalar to append \, and the names of the fields (there should +be at least one) you will wish to initialize. To append an object \, +send a number to the leftmost inlet. "Append"'s pointer is updated +to point to the new scalar \, and the new pointer is also output.; +#X text 28 149 To insert to the beginning of a list \, you can append +to the "head" of the list. You may append objects of different templates +using different "append" objects.; +#X obj 81 368 pointer; +#X text 341 408 updated for Pd version 0.35; +#X text 34 226 click this first->; +#X text 230 210 go to (and output) "head" of the list; +#X connect 11 0 15 3; +#X connect 14 0 11 0; +#X connect 16 0 17 0; +#X connect 17 0 15 0; +#X connect 17 1 15 1; +#X connect 17 1 15 2; diff --git a/pd/doc/5.reference/bag-help.pd b/pd/doc/5.reference/bag-help.pd new file mode 100644 index 00000000..cdd5bfff --- /dev/null +++ b/pd/doc/5.reference/bag-help.pd @@ -0,0 +1,27 @@ +#N canvas 118 56 577 366 12; +#X text 18 337 see also:; +#X obj 148 337 makenote; +#X msg 76 151 60 64; +#X msg 127 151 60 0; +#X msg 171 151 62 64; +#X msg 218 151 62 0; +#X obj 76 278 print; +#X text 121 279 Output is in the printout window.; +#X msg 218 197 clear; +#X obj 66 15 bag; +#X text 101 14 - COLLECTION OF NUMBERS; +#X text 12 42 The bag object takes (value \, flag) pairs. If the flag is true (nonzero) \, the value is added to the collection \; if false \, it's removed. The collection may have many copies of the same value. You can output the collection (and empty it) with a "flush" message \, or just empty it with "clear." You can use this to mimic a sustain pedal \, for example.; +#X msg 217 174 flush; +#X obj 104 337 poly; +#X obj 76 248 bag; +#X text 267 151 <-- add or delete elements; +#X text 271 174 <-- output them; +#X text 273 198 <-- start over; +#X text 328 337 updated for Pd version 0.33; +#X connect 2 0 14 0; +#X connect 3 0 14 0; +#X connect 4 0 14 0; +#X connect 5 0 14 0; +#X connect 8 0 14 0; +#X connect 12 0 14 0; +#X connect 14 0 6 0; diff --git a/pd/doc/5.reference/bang-help.pd b/pd/doc/5.reference/bang-help.pd new file mode 100644 index 00000000..1f522268 --- /dev/null +++ b/pd/doc/5.reference/bang-help.pd @@ -0,0 +1,13 @@ +#N canvas 118 56 581 250 12; +#X obj 49 182 print; +#X text 107 183 Output is in the printout window.; +#X obj 66 15 bang; +#X text 112 14 - SEND "BANG" MSSESSAGE; +#X msg 61 105 walk the cat; +#X msg 49 79 45; +#X obj 49 152 bang; +#X text 336 233 updated for Pd version 0.27; +#X text 23 42 Outputs a "bang" message whatever it receives.; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 0 0; diff --git a/pd/doc/5.reference/bang~-help.pd b/pd/doc/5.reference/bang~-help.pd new file mode 100644 index 00000000..debade2f --- /dev/null +++ b/pd/doc/5.reference/bang~-help.pd @@ -0,0 +1,18 @@ +#N canvas 0 0 529 299 12; +#X obj 112 128 bang~; +#X obj 112 159 print; +#X msg 210 223 \; pd dsp 1; +#X msg 297 216 \; pd dsp 0; +#X msg 210 144 bang; +#X obj 19 20 bang~; +#X obj 306 193 loadbang; +#X obj 297 169 delay 100; +#X text 211 122 click to test; +#X text 71 21 - output bang after each DSP cycle; +#X text 5 59 Bang~ outputs a bang after each DSP cycle (at the same logical time as the DSP cycle.) This is primarily useful for sampling the outputs of analysis algorithms.; +#X text 251 266 updated for Pd version 0.33; +#X connect 0 0 1 0; +#X connect 4 0 2 0; +#X connect 4 0 7 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; diff --git a/pd/doc/5.reference/biquad~-help.pd b/pd/doc/5.reference/biquad~-help.pd new file mode 100644 index 00000000..b7757244 --- /dev/null +++ b/pd/doc/5.reference/biquad~-help.pd @@ -0,0 +1,36 @@ +#N canvas 327 119 689 397 12; +#X obj 15 12 biquad~; +#X msg 510 20 \; pd dsp 1; +#X msg 504 66 \; pd dsp 0; +#X obj 84 248 env~; +#X floatatom 84 275 0 0 0 0 - - -; +#X floatatom 15 110 0 0 0 0 - - -; +#X obj 15 246 env~; +#X floatatom 15 274 0 0 0 0 - - -; +#X text 13 297 Compare the value of the straight signal on the left +with the value of the filtered signal on the right.; +#X obj 84 215 biquad~ 1.41407 -0.9998 1 -1.41421 1; +#X msg 101 121 1.41407 -0.9998 1 -1.41421 1; +#X text 76 31 calculates the following difference equation:; +#X text 77 44 y(n) = ff1 * w(n) + ff2 * w(n-1) + ff3 * w(n-2); +#X text 77 60 w(n) = x(n) + fb1 * w(n-1) + fb2 * w(n-2); +#X text 18 76 Syntax: biquad~ fb1 fb2 ff1 ff2 ff3; +#X text 259 239 this biquad~ is a notch filter for fn = Pi/4; +#X text 265 258 (= SR/8 = 5512.5 Hz @44.1k); +#X text 91 14 2-pole-2-zero-filter; +#X text 113 99 list sets filter parameters; +#X msg 119 161 set 0 0; +#X msg 120 186 clear; +#X obj 15 170 osc~ 5512.5; +#X text 422 337 updated for Pd version-0.30; +#X text 189 163 set internal state; +#X text 187 185 ... or just clear it; +#X connect 3 0 4 0; +#X connect 5 0 21 0; +#X connect 6 0 7 0; +#X connect 9 0 3 0; +#X connect 10 0 9 0; +#X connect 19 0 9 0; +#X connect 20 0 9 0; +#X connect 21 0 6 0; +#X connect 21 0 9 0; diff --git a/pd/doc/5.reference/bng-help.pd b/pd/doc/5.reference/bng-help.pd new file mode 100644 index 00000000..d48d560a --- /dev/null +++ b/pd/doc/5.reference/bng-help.pd @@ -0,0 +1,265 @@ +#N canvas 11 201 538 357 10; +#X obj 1 1 cnv 8 100 60 empty empty bng 20 20 1 18 -262144 -1109 0 +; +#X text 10 288 (c) musil@iem.kug.ac.at; +#X text 52 301 IEM KUG; +#X text 118 61 click properties to; +#X text 106 72 modify geometry \, colors \, etc.; +#X obj 64 257 print; +#N canvas 598 330 290 225 once 0; +#X msg 38 73 1; +#X obj 38 47 t b b; +#X obj 68 124 sel 0; +#X obj 68 103 f 0; +#X obj 38 24 inlet; +#X obj 68 154 outlet; +#X connect 0 0 3 1; +#X connect 1 0 0 0; +#X connect 1 1 3 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X restore 64 234 pd once; +#X obj 36 258 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 3 130 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 36 173 bng 50 950 50 1 foo5_snd foo5_rcv big-bang 63 2 192 12 +-262131 -260818 -143491; +#X msg 36 53 33; +#X msg 50 75 -3.14; +#X msg 73 117 11 22 33.33; +#X msg 63 95 open xxx; +#X msg 96 142 funny; +#X text 101 11 gui-bang:; +#X obj 202 135 s foo5_rcv; +#X obj 202 155 r foo5_snd; +#X obj 202 115 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 +-1 -1; +#X obj 202 175 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 +-1 -1; +#X msg 4 53 0; +#X text 125 205 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 124 216 for moving selected gui-objects; +#N canvas 425 170 699 530 edit 0; +#X obj 39 197 f; +#X msg 17 176 bang; +#X floatatom 55 175 3 63 88; +#X floatatom 90 197 3 0 37; +#X obj 39 220 pack 0 0; +#X text 117 197 y-label; +#X text 83 175 x-label; +#X floatatom 259 143 3 8 75; +#X text 286 143 size; +#X obj 279 236 f; +#X msg 257 215 bang; +#X floatatom 295 214 3 -10 10; +#X floatatom 330 236 3 -10 10; +#X obj 279 259 pack 0 0; +#X obj 304 348 f; +#X msg 282 327 bang; +#X floatatom 320 326 3 20 90; +#X floatatom 355 348 3 150 200; +#X obj 304 371 pack 0 0; +#X text 323 214 x-delta; +#X text 357 236 y-delta; +#X text 348 326 x-position; +#X text 382 348 y-position; +#X obj 59 312 f; +#X msg 37 291 bang; +#X floatatom 75 290 3 0 2; +#X floatatom 110 312 3 4 36; +#X obj 59 335 pack 0 0; +#X text 103 290 font; +#X text 139 312 height; +#X msg 36 399 \; foo5_rcv label blabla; +#X msg 59 360 \; foo5_rcv label_font \$1 \$2; +#X msg 39 245 \; foo5_rcv label_pos \$1 \$2; +#X msg 47 135 \; foo5_rcv color \$1 \$2 \$3; +#X msg 259 172 \; foo5_rcv size \$1; +#X msg 279 284 \; foo5_rcv delta \$1 \$2; +#X msg 304 396 \; foo5_rcv pos \$1 \$2; +#X msg 483 133 \; foo5_rcv receive foo5a_rcv; +#X msg 482 171 \; foo5a_rcv receive foo5_rcv; +#X msg 483 50 \; foo5_rcv send foo5a_snd; +#X msg 483 88 \; foo5_rcv send foo5_snd; +#X text 526 349 no init; +#X msg 505 368 \; foo5_rcv init 0; +#X msg 512 435 \; foo5_rcv init 1; +#X obj 493 260 f; +#X msg 471 239 bang; +#X floatatom 509 238 4 10 100; +#X floatatom 544 261 5 100 3000; +#X obj 493 283 pack 0 0; +#X msg 493 308 \; foo5_rcv flashtime \$1 \$2; +#X text 548 237 interrupt-time; +#X text 585 262 hold-time; +#X msg 36 435 \; foo5_rcv label big-bang; +#X text 502 417 init bang on loadbang; +#X text 519 221 flash-time:; +#X obj 47 114 pack 0 0 0; +#X obj 47 86 f; +#X msg 24 38 bang; +#X floatatom 63 36 3 0 29; +#X floatatom 79 56 3 0 29; +#X floatatom 112 72 3 0 29; +#X text 91 36 background; +#X text 106 56 front-color; +#X text 140 73 label-color; +#X msg 285 35 back; +#X msg 285 55 front; +#X msg 285 75 label; +#X msg 247 35 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 285 96 pd RGB_____________; +#X floatatom 327 65 3 0 255; +#X floatatom 370 65 3 0 255; +#X floatatom 413 66 3 0 255; +#X text 34 10 preset-colors; +#X text 296 7 RGB-colors; +#X text 327 47 red; +#X text 363 46 green; +#X text 411 46 blue; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 32 0; +#X connect 7 0 34 0; +#X connect 9 0 13 0; +#X connect 10 0 9 0; +#X connect 11 0 9 1; +#X connect 12 0 13 1; +#X connect 13 0 35 0; +#X connect 14 0 18 0; +#X connect 15 0 14 0; +#X connect 16 0 14 1; +#X connect 17 0 18 1; +#X connect 18 0 36 0; +#X connect 23 0 27 0; +#X connect 24 0 23 0; +#X connect 25 0 23 1; +#X connect 26 0 27 1; +#X connect 27 0 31 0; +#X connect 44 0 48 0; +#X connect 45 0 44 0; +#X connect 46 0 44 1; +#X connect 47 0 48 1; +#X connect 48 0 49 0; +#X connect 55 0 33 0; +#X connect 56 0 55 0; +#X connect 57 0 56 0; +#X connect 58 0 56 1; +#X connect 59 0 55 1; +#X connect 60 0 55 2; +#X connect 64 0 68 0; +#X connect 65 0 68 0; +#X connect 66 0 68 0; +#X connect 67 0 68 0; +#X connect 68 0 55 0; +#X connect 68 1 55 1; +#X connect 68 2 55 2; +#X connect 69 0 68 1; +#X connect 70 0 68 2; +#X connect 71 0 68 3; +#X restore 297 144 pd edit; +#X obj 248 34 bng 15 250 50 0 aaa aaa empty 20 8 192 8 -262144 -1 -1 +; +#X text 185 312 updated for Pd version 0.35; +#X text 27 313 graz \, austria 2002; +#X obj 180 11 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X connect 6 0 5 0; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 9 0 6 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 12 0 9 0; +#X connect 13 0 9 0; +#X connect 14 0 9 0; +#X connect 17 0 19 0; +#X connect 18 0 16 0; +#X connect 20 0 9 0; diff --git a/pd/doc/5.reference/bp~-help.pd b/pd/doc/5.reference/bp~-help.pd new file mode 100644 index 00000000..8bcd86b4 --- /dev/null +++ b/pd/doc/5.reference/bp~-help.pd @@ -0,0 +1,40 @@ +#N canvas 533 67 651 393 12; +#X obj 124 11 bp~; +#X text 159 11 - BANDPASS FILTER; +#X obj 70 263 env~; +#X floatatom 70 283 0 0 0; +#X floatatom 104 193 0 0 0; +#X obj 12 261 env~; +#X floatatom 12 282 0 0 0; +#X text 119 264 env~ gives the amplitude of the signal envelop in dB. +; +#X floatatom 12 123 0 0 0; +#X msg 544 67 \; pd dsp 0; +#X obj 12 146 osc~ 100; +#X text 57 121 <-- scroll to change input frequency; +#X msg 72 170 clear; +#X text 122 169 <-- reinitialize internal state; +#X text 398 361 updated for Pd version-0.30; +#X msg 544 28 \; pd dsp 1; +#X text 13 73 The left inlet is the incoming audio signal \, the middle +control input sets center frequency and the rigth input sets "Q".; +#X text 136 194 <-- center frequency; +#X obj 72 241 bp~ 100 10; +#X text 169 242 Arguments initialize center frequency and Q.; +#X text 12 301 Compare the amplitude of the original signal on the +left with the amplitude of the filtered signal on the right.; +#X floatatom 153 215 0 0 0; +#X text 185 216 <-- Q; +#X text 16 35 bp~ passes a sinusoid at the center frequency at unit +gain (approximately). Other frequencies are attenuated.; +#X text 21 357 see also:; +#X obj 110 356 vcf~; +#X connect 2 0 3 0; +#X connect 4 0 18 1; +#X connect 5 0 6 0; +#X connect 8 0 10 0; +#X connect 10 0 5 0; +#X connect 10 0 18 0; +#X connect 12 0 18 0; +#X connect 18 0 2 0; +#X connect 21 0 18 2; diff --git a/pd/doc/5.reference/canvas-help.pd b/pd/doc/5.reference/canvas-help.pd new file mode 100644 index 00000000..a6e33be5 --- /dev/null +++ b/pd/doc/5.reference/canvas-help.pd @@ -0,0 +1,19 @@ +#N canvas 210 82 579 437 12; +#X obj 66 15 table; +#X text 123 16 - Array of numbers; +#X obj 34 199 table help-tab1 25; +#X text 10 43 "Table" builds a subpatch with a graphical array inside. +The creation arguments specify the name and an optional size in points. +; +#X msg 70 265 \; help-tab1 read table.txt; +#X msg 70 309 \; help-tab1 write /tmp/table.txt; +#X text 70 243 You can also send messages to the array by name:; +#X text 216 200 <- optional creation args: name \, size; +#X text 17 355 Unfortunately there's no way to set vertical range \, +etc.; +#X text 9 101 Note that the data (and other properties) of the array +aren't saved with the patch. You can resize \, save to and/or read +from an external file as you would with "array" objects. See "arrays" +in the 2.control examples under the "pure documentation" help menu +item.; +#X text 325 391 updated for Pd version 0.35; diff --git a/pd/doc/5.reference/change-help.pd b/pd/doc/5.reference/change-help.pd new file mode 100644 index 00000000..74e16f6a --- /dev/null +++ b/pd/doc/5.reference/change-help.pd @@ -0,0 +1,23 @@ +#N canvas 376 130 540 355 12; +#X msg 67 124 bang; +#X floatatom 67 266 0 0 0; +#X floatatom 79 154 0 0 0; +#X floatatom 104 182 0 0 0; +#X text 284 309 updated for Pd version 0.27; +#X text 173 239 creation argument initializes first value; +#X obj 66 15 change; +#X text 114 16 - ELIMINATE REDUNDANCY IN A NUMBER STEAM; +#X text 12 42 The change object outputs its input only when it changes. +You can "set" the current value \, or bang to force output.; +#X obj 67 240 change 6.5; +#X msg 105 211 set \$1; +#X text 136 183 set the value; +#X text 112 123 output current value; +#X text 110 154 if different from current value \, output and set; +#X obj 67 293 print; +#X connect 0 0 9 0; +#X connect 1 0 14 0; +#X connect 2 0 9 0; +#X connect 3 0 10 0; +#X connect 9 0 1 0; +#X connect 10 0 9 0; diff --git a/pd/doc/5.reference/clip~-help.pd b/pd/doc/5.reference/clip~-help.pd new file mode 100644 index 00000000..61c222fa --- /dev/null +++ b/pd/doc/5.reference/clip~-help.pd @@ -0,0 +1,30 @@ +#N canvas 182 132 778 399 12; +#X obj 75 164 clip~ -0.5 0.5; +#X obj 75 104 osc~ 1000; +#X graph graph1 0 1 100 -1 78 280 278 380; +#X array array99 100 float 0; +#X pop; +#X obj 91 213 metro 500; +#X obj 91 188 r metro; +#X text 239 235 <-- graph the output; +#X obj 75 237 tabwrite~ array99; +#X msg 519 69 \; metro 0; +#X msg 515 12 \; pd dsp 1 \; metro 1; +#X text 604 26 <-- Click to start; +#X text 589 73 <-- Click to stop; +#X obj 42 19 clip~; +#X text 88 18 - restrict a signal to lie between two limits; +#X text 243 136 inlets to reset clip range; +#X floatatom 135 136 4 0 0; +#X floatatom 196 137 4 0 0; +#X text 210 164 creation arguments initialize clip range; +#X text 4 55 The clip~ object passes its signal input to its output +\, clipping it to lie between two limits.; +#X text 470 371 updated for Pd version 0.33; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 4 0 3 0; +#X connect 14 0 0 1; +#X connect 15 0 0 2; diff --git a/pd/doc/5.reference/cos~-help.pd b/pd/doc/5.reference/cos~-help.pd new file mode 100644 index 00000000..ba6f918e --- /dev/null +++ b/pd/doc/5.reference/cos~-help.pd @@ -0,0 +1,32 @@ +#N canvas 134 143 768 332 12; +#X obj 112 12 cos~; +#X obj 23 200 cos~; +#X obj 23 249 snapshot~; +#X obj 23 152 sig~; +#X floatatom 23 275 0 0 0; +#X obj 23 125 * 0.01; +#X floatatom 23 98 0 0 0; +#X obj 90 215 metro 500; +#X obj 90 189 r metro; +#X msg 540 93 \; metro 0; +#X msg 521 39 \; pd dsp 1 \; metro 1; +#X text 159 13 - COSINE WAVESHAPER; +#X text 86 125 Divide by 100; +#X text 71 153 convert to audio; +#X text 78 100 <-- Scroll to set input value; +#X text 64 276 <-- output of the cos~ object; +#X text 291 195 see also:; +#X obj 379 197 osc~; +#X obj 423 197 tabread4~; +#X text 494 293 updated for Pd version 0.33; +#X text 608 54 <-Click to start; +#X text 609 99 <-Click to stop; +#X text 9 45 The cos~ object outputs the cosine of its signal input.; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 1 0; +#X connect 5 0 3 0; +#X connect 6 0 5 0; +#X connect 7 0 2 0; +#X connect 8 0 7 0; diff --git a/pd/doc/5.reference/cputime-help.pd b/pd/doc/5.reference/cputime-help.pd new file mode 100644 index 00000000..c0a0f43a --- /dev/null +++ b/pd/doc/5.reference/cputime-help.pd @@ -0,0 +1,15 @@ +#N canvas 302 232 550 286 12; +#X msg 74 144 bang; +#X msg 30 115 bang; +#X floatatom 30 206 0 0 0; +#X text 71 113 Click here to reset; +#X text 27 232 Output is in milliseconds; +#X obj 30 175 cputime; +#X text 124 144 Click here to get elapsed CPU time; +#X text 6 51 The cputime object measures elapsed CPU time \, as measured by your operating system. This appears to work on NT \, IRIX \, and Linux \, but not on W98.; +#X obj 66 15 cputime; +#X text 123 16 - measure CPU usage; +#X text 297 261 updated for Pd version 0.33; +#X connect 0 0 5 1; +#X connect 1 0 5 0; +#X connect 5 0 2 0; diff --git a/pd/doc/5.reference/delay-help.pd b/pd/doc/5.reference/delay-help.pd new file mode 100644 index 00000000..5f90cd4b --- /dev/null +++ b/pd/doc/5.reference/delay-help.pd @@ -0,0 +1,30 @@ +#N canvas 3 0 513 348 12; +#X obj 66 15 delay; +#X obj 13 229 50; +#X msg 13 98 bang; +#X floatatom 13 255; +#X floatatom 116 182; +#X obj 51 230 0; +#X text 111 16 - CALLBACK AFTER TIME DELAY; +#X text 130 205 <-- creation argument initializes delay time; +#X text 6 41 The delay object sends a bang to its outlet after a delay in milliseconds specified by its right inlet or its creation argument.; +#X obj 51 204 delay 1000; +#X text 58 86 Click here to test the delay object by initializing the number box below to 50 and then clearing it after the specified delay.; +#X text 94 132 Click here to CANCEL delay's action; +#X msg 51 133 stop; +#X text 43 324 see also:; +#X obj 155 323 timer; +#X obj 111 323 metro; +#X msg 62 155 2000; +#X text 102 154 Number in right inlet sets time and schedules the action.; +#X text 316 320 updated for Pd version 0.3; +#X text 145 183 <-- scroll to change delay time in milliseconds; +#X text 14 280 Note: sending a bang to a delay which is already set will reschedule its output \, cancelling the old one.; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 2 0 9 0; +#X connect 4 0 9 1; +#X connect 5 0 3 0; +#X connect 9 0 5 0; +#X connect 12 0 9 0; +#X connect 16 0 9 0; diff --git a/pd/doc/5.reference/delread~-help.pd b/pd/doc/5.reference/delread~-help.pd new file mode 100644 index 00000000..682f6e98 --- /dev/null +++ b/pd/doc/5.reference/delread~-help.pd @@ -0,0 +1,33 @@ +#N canvas 24 20 796 472 12; +#X text 351 276 1st argument: name of delay line; +#X floatatom 116 253 0 0 0; +#X text 151 255 float input (delay time in ms); +#X text 127 310 signal output (delayed signal); +#X text 21 52 You can use more than one delread~ objects for the same delay line.; +#X text 20 81 If the specified delay time is longer than the size of the delay line or less than zero it is clipped to the length of the delay line.; +#X obj 383 226 delwrite~ del_example 1000; +#X floatatom 383 177 0 0 0; +#X obj 116 375 snapshot~; +#X floatatom 116 399 0 0 0; +#X obj 24 246 loadbang; +#X obj 24 313 metro 200; +#X msg 32 273 \; pd dsp 1; +#X obj 116 286 delread~ del_example 1000; +#X obj 24 16 delread~; +#X text 424 176 input to delay line; +#X obj 383 201 sig~; +#X text 433 443 updated for Pd version 0.33; +#X text 89 16 - read a signal from a delay line; +#X text 21 133 Note: if the delaywrite~ runs after the delread~ the minimum delay is actually one DSP period \, not zero.; +#X text 351 292 2nd argument: (initial) delay time in ms; +#X obj 126 444 delwrite~; +#X obj 217 444 vd~; +#X text 36 443 see also:; +#X connect 1 0 13 0; +#X connect 7 0 16 0; +#X connect 8 0 9 0; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 8 0; +#X connect 13 0 8 0; +#X connect 16 0 6 0; diff --git a/pd/doc/5.reference/delwrite~-help.pd b/pd/doc/5.reference/delwrite~-help.pd new file mode 100644 index 00000000..50ca3f63 --- /dev/null +++ b/pd/doc/5.reference/delwrite~-help.pd @@ -0,0 +1,15 @@ +#N canvas 12 24 663 281 12; +#X obj 24 16 delwrite~; +#X obj 24 158 delwrite~ del_line_xxx 500; +#X text 88 123 signal input; +#X text 116 16 writes a signal in a delay line; +#X text 271 156 1st argument: name of delay line; +#X text 411 243 updated for Pd version 0.33; +#X obj 24 124 sig~ 0; +#X text 19 50 Delwrite~ allocates memory for a delay line and writes an audio signal into it. Delread~ objects by hte same name read from the delay line.; +#X text 294 186 (= max. delay time); +#X text 271 172 2nd argument: length of delay line in msec; +#X text 24 203 see also:; +#X obj 112 205 delread~; +#X obj 193 205 vd~; +#X connect 6 0 1 0; diff --git a/pd/doc/5.reference/drawnumber-help.pd b/pd/doc/5.reference/drawnumber-help.pd new file mode 100644 index 00000000..a62a8103 --- /dev/null +++ b/pd/doc/5.reference/drawnumber-help.pd @@ -0,0 +1,35 @@ +#N struct help-drawnumber-template float x float y float cat float +dog; +#N canvas 369 6 538 189 12; +#X text 15 103 see also:; +#X obj 18 7 drawnumber; +#X obj 204 132 plot; +#X obj 100 131 drawpolygon; +#X obj 22 130 template; +#X text 114 7 -- draw numeric fields from data structures; +#N canvas 14 10 297 129 help-drawnumber-data 1; +#X scalar help-drawnumber-template 50 100 23 43 \;; +#X scalar help-drawnumber-template 150 50 3.14 -1.618 \;; +#X restore 273 71 pd help-drawnumber-data; +#N canvas 57 283 580 439 help-drawnumber-template 1; +#X text 24 316 This object defines the fields for this template. Their +values are initialized in the "works" subwindow. You can see them by +right-clicking on the object in the "data" window and selecting "properties." +; +#X text 44 104 - RGB color (0=black \, 999=white \, 900=red \, 90=green +\, 9=blue \, 555=grey \, etc.); +#X obj 11 294 template float x float y float cat float dog; +#X text 22 166 Any of these can be numbers or field names \, like "dog" +and "cat" here.; +#X text 22 202 When not in "edit" mode \, you can click and drag vertically +on the numbers to change their values. (In edit mode you can move \, +cut \, copy \, and paste the objects.); +#X text 24 251 Keyboard entry isn't supported yet.; +#X obj 24 15 drawnumber cat 0 0 0 cat=; +#X obj 259 16 drawnumber dog 0 -15 900 dog=; +#X text 44 136 - an optional label ("cat=" for instance); +#X text 26 44 drawnumber takes arguments specifying:; +#X text 44 84 - an (x \, y) pair giving relative coordinates \;; +#X text 44 64 - the number to draw; +#X restore 273 45 pd help-drawnumber-template; +#X text 275 159 updated for Pd version 0.35; diff --git a/pd/doc/5.reference/drawpolygon-help.pd b/pd/doc/5.reference/drawpolygon-help.pd new file mode 100644 index 00000000..fc422af4 --- /dev/null +++ b/pd/doc/5.reference/drawpolygon-help.pd @@ -0,0 +1,41 @@ +#N struct help-drawpolygon-template float x float y float cat float +dog float weasel; +#N canvas 411 8 565 187 12; +#X text 13 130 see also:; +#X obj 111 149 drawnumber; +#X obj 207 149 plot; +#X obj 21 10 drawpolygon; +#X obj 21 33 drawcurve; +#X obj 126 11 filledpolygon; +#X obj 127 33 filledcurve; +#X text 225 10 -- draw shapes for data structures; +#N canvas 30 290 587 435 help-drawpolygon-template 1; +#X obj 14 335 template float x float y float cat float dog float weasel +; +#X obj 19 24 drawpolygon 0 2 0 0 0 weasel; +#X text 26 44 drawpolygon and drawcurve take arguments specifying: +; +#X text 29 137 Any of these can be numbers or field names \, like "weasel" +here. The example above draws a vertical black line of height "weasel". +; +#X obj 19 194 filledpolygon 900 dog 3 10 0 20 cat 30 0; +#X text 31 216 filledpolyconn and filledcurve take the same arguments +\, except that a new first argument is added to specify interior color. +Here the interior color is red (900) \, the outline color is controlled +by the "dog" field \, and the three points describe a triangle of altitude +"cat". The fields x and y automatically govern the placement of the +object as a whole.; +#X text 45 62 - RGB color (0=black \, 999=white \, 900=red \, 90=green +\, 9=blue \, 555=grey \, etc.); +#X text 46 95 - line width; +#X text 46 116 - two or more (x \, y) pairs giving coordinates.; +#X text 24 357 This object defines the fields for this template. You +can see teh fields' values by right-clicking on the object in the "data" +window and selecting "properties."; +#X restore 274 93 pd help-drawpolygon-template; +#X obj 34 149 template; +#N canvas 10 18 384 178 help-drawpolygon-data 1; +#X scalar help-drawpolygon-template 50 40 30 9 80 \;; +#X scalar help-drawpolygon-template 150 40 -20 90 50 \;; +#X restore 274 119 pd help-drawpolygon-data; +#X text 312 168 updated for Pd version 0.35; diff --git a/pd/doc/5.reference/element-help.pd b/pd/doc/5.reference/element-help.pd new file mode 100644 index 00000000..a3faeecf --- /dev/null +++ b/pd/doc/5.reference/element-help.pd @@ -0,0 +1,51 @@ +#N struct help-element-template float x float y array array1 help-element-array1-template +; +#N struct help-element-array1-template float y; +#N canvas 330 34 668 442 12; +#X text 24 373 see also:; +#X obj 21 393 template; +#N canvas 393 10 491 261 help-element-template 0; +#X obj 27 76 plot array1 500 1 10 15 20; +#X obj 27 174 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10; +#X obj 24 16 template float x float y array array1 help-element-array1-template +; +#X restore 414 349 pd help-element-template; +#N canvas 0 0 288 159 help-element-data 1; +#X scalar help-element-template 35 24 \; 0 \; 10 \; 0 \; 10 \; 20 \; +10 \; 20 \; 70 \; 10 \; \;; +#X restore 450 328 pd help-element-data; +#N canvas 196 292 365 134 help-element-array1-template 0; +#X obj 30 71 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5; +#X obj 32 27 template float y; +#X restore 354 371 pd help-element-array1-template; +#X obj 22 11 element; +#X text 91 10 -- get pointer to an element of an array; +#X obj 98 393 pointer; +#X obj 166 393 getsize; +#X obj 234 393 setsize; +#X text 24 44 "element" takes a pointer at right and a number at left. +It looks up a field from the pointer \, which should be an array \, +and outputs the element of the array specified by the number. There +are no pointers to arrays themselves \, just to individual elements. +The template and field mane are specified as creation arguments.; +#X obj 150 228 pointer; +#X msg 150 204 traverse pd-help-element-data \, next; +#X floatatom 38 230 5 0 0; +#X obj 38 256 element help-element-template array1; +#X obj 38 303 get help-element-array1-template y; +#X floatatom 38 330 5 0 0; +#X text 370 256 arguments: template \, field name; +#X text 247 230 pointer inlet; +#X text 36 209 index; +#X text 43 277 outlet is pointer to single element; +#X text 89 328 here we just get the value of y.; +#X text 24 143 Indices range from 0 to the number of elements minus +one \; indices out of range are quietly replaced by the nearest endpoint. +; +#X text 152 184 click here first; +#X text 407 416 updated for Pd version 0.35; +#X connect 11 0 14 1; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; diff --git a/pd/doc/5.reference/env~-help.pd b/pd/doc/5.reference/env~-help.pd new file mode 100644 index 00000000..64a245ae --- /dev/null +++ b/pd/doc/5.reference/env~-help.pd @@ -0,0 +1,28 @@ +#N canvas 40 55 711 401 12; +#X floatatom 103 303 0 0 0; +#X obj 74 14 env~; +#X text 120 16 - envelope follower; +#X obj 103 275 env~ 16384; +#X obj 103 214 osc~ 400; +#X obj 103 241 *~; +#X floatatom 217 220 3 -99 300; +#X obj 217 244 dbtorms; +#X text 9 46 The env~ object takes a signal and outputs its RMS amplitude +in dB (with 1 normalized to 100 dB.) Output is bounded below by zero. +; +#X text 8 105 The analysis is Hanning windowed.; +#X text 9 131 The optional creation argument is the analysis window +size in samples \, and should be a power of two. The analysis windows +overlap by two \, so that the period of output is half the window size. +; +#X text 206 274 <- creation argument sets window size; +#X text 265 221 <- set peak-to-peak amplitude here in dB.; +#X text 185 305 <- the output is RMS amplitude which is about 3 dB +below peak-to-peak amplitude.; +#X text 459 375 updated for Pd version 0.35; +#X connect 3 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 5 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 5 1; diff --git a/pd/doc/5.reference/fft~-help.pd b/pd/doc/5.reference/fft~-help.pd new file mode 100644 index 00000000..149a6634 --- /dev/null +++ b/pd/doc/5.reference/fft~-help.pd @@ -0,0 +1,64 @@ +#N canvas 22 7 886 436 12; +#X text 85 158 frequency; +#X floatatom 16 173 0 0 0; +#X obj 16 120 * 44100; +#X floatatom 16 94 0 0 0; +#X text 88 92 frequency; +#X text 91 111 in bins; +#X text 85 175 in Hz.; +#X obj 16 229 osc~; +#X obj 36 16 fft~; +#X obj 86 17 ifft~; +#X text 146 15 - forward and inverse complex FFT; +#X obj 36 42 rfft~; +#X obj 86 43 rifft~; +#X text 146 41 - forward and inverse real FFT; +#X obj 16 254 rfft~; +#X obj 16 148 / 64; +#X obj 574 21 loadbang; +#X msg 574 47 \; pd dsp 1; +#X text 636 403 updated for Pd version 0.33; +#X obj 16 322 rifft~; +#X obj 102 310 print~ real; +#X obj 115 285 print~ imaginary; +#X obj 16 352 /~ 64; +#X obj 16 407 print~ resynthesized; +#X msg 30 380 bang; +#X msg 101 248 bang; +#X msg 100 199 0.25; +#X msg 152 199 0; +#X text 195 200 <-- bash phase; +#X text 152 249 <-- print analysis; +#X text 79 380 <-- print resynthesis; +#X text 76 352 <-- renormalize; +#X text 347 294 There is no normalization \, so that an FFT followed +by an IFFT has a gain of N.; +#X text 346 343 See the FFT examples to see how to use these in practice. +; +#X text 346 112 The FFT objects do Fourier analyses and resyntheses +of incoming real or complex signals. Complex signals are handled as +pairs of signals (real and imaginary part.) The analysis size is one +block (you can use the block~ or switch~ obejcts to control block size). +; +#X text 347 205 The real FFT outputs N/2+1 real parts and N/2-1 imaginary +parts. The other outputs are zero. At DC and at the Nyquist there is +no imaginary part \, but the second through Nth output is as a real +and imaginary pair \, which can be thought of as the cosine and sin +component strengths.; +#X connect 1 0 7 0; +#X connect 2 0 15 0; +#X connect 3 0 2 0; +#X connect 7 0 14 0; +#X connect 14 0 20 0; +#X connect 14 0 19 0; +#X connect 14 1 21 0; +#X connect 14 1 19 1; +#X connect 15 0 1 0; +#X connect 16 0 17 0; +#X connect 19 0 22 0; +#X connect 22 0 23 0; +#X connect 24 0 23 0; +#X connect 25 0 20 0; +#X connect 25 0 21 0; +#X connect 26 0 7 1; +#X connect 27 0 7 1; diff --git a/pd/doc/5.reference/float-help.pd b/pd/doc/5.reference/float-help.pd new file mode 100644 index 00000000..efc5235a --- /dev/null +++ b/pd/doc/5.reference/float-help.pd @@ -0,0 +1,18 @@ +#N canvas 23 20 429 272 12; +#X msg 30 107 bang; +#X obj 30 183 float 6.5; +#X floatatom 30 209; +#X floatatom 42 129; +#X floatatom 88 153; +#X obj 55 12 float; +#X text 97 11 - STORE A (FLOATING POINT) NUMBER; +#X text 12 36 The float object stores a number \, initialized by its creation argument \, which may be reset using its inlet and output by sending it the "bang" message. Sending a number sets a new value and outputs it.; +#X text 77 103 outputs the value; +#X text 74 130 sets and outputs the value; +#X text 123 155 sets the value; +#X text 108 184 creation argument initializes the value; +#X text 223 242 updated for Pd version 0.3; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; diff --git a/pd/doc/5.reference/framp~-help.pd b/pd/doc/5.reference/framp~-help.pd new file mode 100644 index 00000000..cbf3f047 --- /dev/null +++ b/pd/doc/5.reference/framp~-help.pd @@ -0,0 +1,40 @@ +#N canvas 22 7 857 377 12; +#X text 85 158 frequency; +#X floatatom 16 173 0 0 0; +#X obj 16 120 * 44100; +#X floatatom 16 94 0 0 0; +#X text 88 92 frequency; +#X text 91 111 in bins; +#X text 85 175 in Hz.; +#X obj 17 238 rfft~; +#X obj 16 148 / 64; +#X obj 653 14 loadbang; +#X msg 653 40 \; pd dsp 1; +#X text 599 339 updated for Pd version 0.33; +#X msg 103 260 bang; +#X text 154 261 <-- print analysis; +#X obj 36 16 framp~; +#X text 119 15 - estimate frequency and amplitude of FFT components +; +#X obj 16 270 framp~; +#X obj 103 322 print~ frequency; +#X obj 118 297 print~ amplitude; +#X obj 16 204 osc~; +#X text 324 98 Framp~ takes as input a rectangular-windowed FFT and +outputs \, for each FFT channel \, the estimated amplitude and frequency +of any component feedinf that channel. A sinusoidal component should +appear in four components (or three in the special case of a sinusoid +exactly tuned to a bin.) Frequency output is in bins \, i.e. \, units +of SR/N.; +#X connect 1 0 19 0; +#X connect 2 0 8 0; +#X connect 3 0 2 0; +#X connect 7 0 16 0; +#X connect 7 1 16 1; +#X connect 8 0 1 0; +#X connect 9 0 10 0; +#X connect 12 0 17 0; +#X connect 12 0 18 0; +#X connect 16 0 17 0; +#X connect 16 1 18 0; +#X connect 19 0 7 0; diff --git a/pd/doc/5.reference/gatom-help.pd b/pd/doc/5.reference/gatom-help.pd new file mode 100644 index 00000000..2dd7ce61 --- /dev/null +++ b/pd/doc/5.reference/gatom-help.pd @@ -0,0 +1,32 @@ +#N canvas 138 65 675 508 12; +#X floatatom 107 9 0 0 0; +#X text 155 10 atoms (number boxes); +#X floatatom 38 85 0 0 0; +#X floatatom 38 125 0 0 0; +#X msg 51 260 set 45; +#X floatatom 51 288 0 0 0; +#X floatatom 51 317 0 0 0; +#X text 84 40 Number boxes allow you to display numbers or to enter +numbers using the mouse and keyboard. When a number arrives at the +number box's inlet \, it is displayed and sent to the outlet. You can +click on a number box and drag upward or downward to change the value +continuously.; +#X text 88 130 You can shift-click and drag to change the number by +hundredths instead of units. Alt clicking toggles the value between +0 and the last nonzero value.; +#X text 83 184 You can also type in values by clicking and typing a +number followed by "enter."; +#X text 30 220 the "set" message sets the number box's value but does +not send it to the outlet.; +#X text 423 482 updated for Pd version 0.34; +#X text 39 339 You can set the width of the box by right-clicking and +choosing "properties." By default the width is 5 characters. If you +select a width of 0 \, the number box will grow as needed to hold the +number--BUT BEWARE \, THIS IS EXPENSIVE IN CPU TIME. In a production +patch \, you'll want to set a specific width.; +#X floatatom 547 439 1 0 0; +#X text 41 438 A width of one gives a clickable toggle switch ala Max: +; +#X connect 2 0 3 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; diff --git a/pd/doc/5.reference/get-help.pd b/pd/doc/5.reference/get-help.pd new file mode 100644 index 00000000..6784a6ce --- /dev/null +++ b/pd/doc/5.reference/get-help.pd @@ -0,0 +1,46 @@ +#N struct help-get-template1 float x float y; +#N canvas 293 5 629 429 12; +#X text 13 325 see also:; +#X obj 143 370 template; +#X obj 84 345 set; +#X obj 116 345 append; +#X obj 175 345 getsize; +#X obj 243 345 setsize; +#X obj 311 345 element; +#X obj 16 370 sublist; +#X obj 84 370 scalar; +#X msg 60 130 next; +#N canvas 164 72 425 146 help-get-template1 0; +#X obj 41 87 filledpolygon 9 0 1 0 0 20 0 20 30 0 30; +#X obj 60 21 template float x float y; +#X restore 376 234 pd help-get-template1; +#N canvas 0 0 276 156 help-get-data 1; +#X scalar help-get-template1 46 23 \;; +#X scalar help-get-template1 106 73 \;; +#X restore 376 212 pd help-get-data; +#X obj 21 10 get; +#X text 86 10 -- get values from a scalar; +#X msg 45 102 traverse pd-help-get-data \, next; +#X floatatom 45 214 5 0 0; +#X floatatom 222 210 5 0 0; +#X obj 45 157 pointer; +#X text 337 101 output first scalar in list; +#X text 103 129 output next item; +#X text 21 277 If you have data whose template varies (from a heterogeneous +list \, for example) you can use "pointer" to select according to template +before sending to "get".; +#X obj 45 185 get help-get-template1 x y; +#X text 31 37 "Get" \, when sent a pointer to a scalar \, retrieves +fields from it by name. The fields can be float or symbol. In the future +this will also allow access to sublists of scalars.; +#X text 293 167 First argument selects template.; +#X text 294 182 Remaining args are names of fields.; +#X text 41 233 x output; +#X text 220 232 y output; +#X obj 16 345 pointer; +#X text 373 399 updated for Pd version 0.35; +#X connect 9 0 17 0; +#X connect 14 0 17 0; +#X connect 17 0 21 0; +#X connect 21 0 15 0; +#X connect 21 1 16 0; diff --git a/pd/doc/5.reference/getsize-help.pd b/pd/doc/5.reference/getsize-help.pd new file mode 100644 index 00000000..f2b17e2f --- /dev/null +++ b/pd/doc/5.reference/getsize-help.pd @@ -0,0 +1,41 @@ +#N struct help-getsize-template float x float y array array1 help-getsize-array1-template +; +#N struct help-getsize-array1-template float y; +#N canvas 340 20 655 398 12; +#X text 28 319 see also:; +#X obj 25 339 template; +#N canvas 393 10 491 261 help-getsize-template 0; +#X obj 27 76 plot array1 500 1 10 15 20; +#X obj 27 174 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10; +#X obj 24 16 template float x float y array array1 help-getsize-array1-template +; +#X restore 338 311 pd help-getsize-template; +#N canvas 0 0 301 193 help-getsize-data 1; +#X scalar help-getsize-template 43 37 \; 0 \; 10 \; 0 \; 10 \; 20 \; +10 \; 20 \; 70 \; 10 \; \;; +#X restore 337 290 pd help-getsize-data; +#N canvas 196 292 365 134 help-getsize-array1-template 0; +#X obj 30 71 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5; +#X obj 32 27 template float y; +#X restore 337 334 pd help-getsize-array1-template; +#X obj 102 339 pointer; +#X obj 236 338 setsize; +#X obj 25 166 pointer; +#X msg 25 142 traverse pd-help-getsize-data \, next; +#X floatatom 25 242 5 0 0; +#X text 360 214 arguments: template \, field name; +#X text 76 240 here we just get the value of y.; +#X obj 25 213 getsize help-getsize-template array1; +#X text 34 192 inlet for pointer; +#X obj 35 21 getsize; +#X text 98 22 -- get number of elements of an array; +#X text 24 44 When sent a pointer \, "element" looks up a field \, +which should be an array \, and outputs the number of elements of the +array. The template and field name are specified as creation arguments. +; +#X text 23 110 The smallest possible size is one.; +#X obj 169 339 element; +#X text 397 374 updated for Pd version 0.35; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 12 0 9 0; diff --git a/pd/doc/5.reference/graph-help.pd b/pd/doc/5.reference/graph-help.pd new file mode 100644 index 00000000..1badaee3 --- /dev/null +++ b/pd/doc/5.reference/graph-help.pd @@ -0,0 +1,13 @@ +#N canvas 28 3 693 300 12; +#X graph graph1 0 -1 99 1 188 290 338 190; +#X array array99 100 float; +#X pop; +#X text 174 19 GRAPHS; +#X text 20 42 A graph in Pd is a rectangular subregion of the window in +which you can store numeric arrays.; +#X text 19 140 You can change the array values by redrawing it in the graph. +See also "11.arrays" and passim in the "control examples".; +#X text 406 266 last updated for release 0.33; +#X text 18 85 If you create a new array Pd will usually make a new graph +to put it in (you can change this using the "array" dialog that pops up.) +; diff --git a/pd/doc/5.reference/hdial-help.pd b/pd/doc/5.reference/hdial-help.pd new file mode 100644 index 00000000..006c0f8b --- /dev/null +++ b/pd/doc/5.reference/hdial-help.pd @@ -0,0 +1,282 @@ +#N canvas 106 314 612 281 10; +#X obj 1 1 cnv 8 100 60 empty empty hdial=hdl 20 20 1 18 -262144 -1109 +0; +#X text 16 213 (c) musil@iem.kug.ac.at; +#X text 58 226 IEM KUG; +#X text 289 52 click properties to; +#X text 277 63 modify geometry \, colors \, etc.; +#X obj 356 172 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 +-1 -1; +#X obj 21 54 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 355 124 s foo8_rcv; +#X obj 356 150 r foo8_snd; +#X obj 44 100 hdl 25 1 1 10 foo8_snd foo8_rcv hdial_0_9 156 -8 192 +10 -99865 -262144 -260818 2; +#X msg 44 142 \$1; +#X floatatom 44 164 4 0 0; +#X obj 44 186 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 89 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 89 140 route 0 1 2 3 4 5 6 7 8 9; +#X msg 176 64 set \$1; +#X floatatom 176 43 4 0 9; +#X floatatom 44 54 4 0 9; +#X msg 91 41 7 0 -5.44; +#X msg 95 63 3 3 4.55; +#X obj 106 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 123 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 +1; +#X obj 140 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 157 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 174 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 191 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 208 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 225 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 242 161 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 82 178 print; +#X floatatom 380 198 4 0 0; +#X msg 380 172 \$1; +#X msg 355 103 set \$1; +#X floatatom 355 82 4 0 9; +#X text 128 178 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 127 189 for moving selected gui-objects; +#N canvas 226 227 699 530 edit 0; +#X obj 42 198 f; +#X msg 20 177 bang; +#X floatatom 58 176 3 63 156; +#X floatatom 93 198 3 -20 37; +#X obj 42 221 pack 0 0; +#X text 120 198 y-label; +#X text 86 176 x-label; +#X floatatom 270 187 3 8 50; +#X text 297 187 size; +#X obj 286 293 f; +#X msg 264 272 bang; +#X floatatom 302 271 3 -10 10; +#X floatatom 337 293 3 -10 10; +#X obj 286 316 pack 0 0; +#X obj 300 412 f; +#X msg 278 391 bang; +#X floatatom 316 390 3 20 60; +#X floatatom 351 412 3 100 200; +#X obj 300 435 pack 0 0; +#X text 330 271 x-delta; +#X text 364 293 y-delta; +#X text 344 390 x-position; +#X text 378 412 y-position; +#X obj 62 313 f; +#X msg 40 292 bang; +#X floatatom 78 291 3 0 2; +#X floatatom 113 313 3 4 36; +#X obj 62 336 pack 0 0; +#X text 106 291 font; +#X text 142 313 height; +#X text 504 293 no init; +#X text 475 348 init value on loadbang; +#X floatatom 482 228 5 2 20; +#X msg 47 125 \; foo8_rcv color \$1 \$2 \$3; +#X msg 42 246 \; foo8_rcv label_pos \$1 \$2; +#X msg 62 361 \; foo8_rcv label_font \$1 \$2; +#X msg 34 423 \; foo8_rcv label blabla; +#X msg 300 460 \; foo8_rcv pos \$1 \$2; +#X msg 286 341 \; foo8_rcv delta \$1 \$2; +#X msg 270 216 \; foo8_rcv size \$1; +#X msg 482 171 \; foo8a_rcv receive foo8_rcv; +#X msg 483 133 \; foo8_rcv receive foo8a_rcv; +#X msg 483 88 \; foo8_rcv send foo8_snd; +#X msg 483 50 \; foo8_rcv send foo8a_snd; +#X msg 483 312 \; foo8_rcv init 0; +#X msg 485 366 \; foo8_rcv init 1; +#X msg 490 436 \; foo8_rcv single_change; +#X msg 490 470 \; foo8_rcv double_change; +#X text 491 417 changing-behavior; +#X msg 482 254 \; foo8_rcv number \$1; +#X text 526 228 number of buttons; +#X obj 47 104 pack 0 0 0; +#X obj 47 76 f; +#X msg 24 28 bang; +#X floatatom 63 26 3 0 29; +#X floatatom 79 46 3 0 29; +#X floatatom 112 62 3 0 29; +#X text 91 26 background; +#X text 106 46 front-color; +#X text 140 63 label-color; +#X msg 285 25 back; +#X msg 285 45 front; +#X msg 285 65 label; +#X msg 247 25 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 285 86 pd RGB_____________; +#X floatatom 327 55 3 0 255; +#X floatatom 370 55 3 0 255; +#X floatatom 413 56 3 0 255; +#X text 34 0 preset-colors; +#X text 296 -3 RGB-colors; +#X text 327 37 red; +#X text 363 36 green; +#X text 411 36 blue; +#X msg 34 459 \; foo8_rcv label hdial_0_9; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 34 0; +#X connect 7 0 39 0; +#X connect 9 0 13 0; +#X connect 10 0 9 0; +#X connect 11 0 9 1; +#X connect 12 0 13 1; +#X connect 13 0 38 0; +#X connect 14 0 18 0; +#X connect 15 0 14 0; +#X connect 16 0 14 1; +#X connect 17 0 18 1; +#X connect 18 0 37 0; +#X connect 23 0 27 0; +#X connect 24 0 23 0; +#X connect 25 0 23 1; +#X connect 26 0 27 1; +#X connect 27 0 35 0; +#X connect 32 0 49 0; +#X connect 51 0 33 0; +#X connect 52 0 51 0; +#X connect 53 0 52 0; +#X connect 54 0 52 1; +#X connect 55 0 51 1; +#X connect 56 0 51 2; +#X connect 60 0 64 0; +#X connect 61 0 64 0; +#X connect 62 0 64 0; +#X connect 63 0 64 0; +#X connect 64 0 51 0; +#X connect 64 1 51 1; +#X connect 64 2 51 2; +#X connect 65 0 64 1; +#X connect 66 0 64 2; +#X connect 67 0 64 3; +#X restore 469 108 pd edit; +#X obj 346 35 hdl 15 1 0 8 eee eee empty 20 8 192 8 -262144 -1 -1 0 +; +#X obj 260 11 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X text 183 11 gui-hdial:; +#X text 33 238 graz \, austria 2002; +#X text 251 232 updated for Pd version 0.35; +#X connect 6 0 9 0; +#X connect 8 0 5 0; +#X connect 8 0 31 0; +#X connect 9 0 10 0; +#X connect 9 0 14 0; +#X connect 9 0 29 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 14 0 13 0; +#X connect 14 1 20 0; +#X connect 14 2 21 0; +#X connect 14 3 22 0; +#X connect 14 4 23 0; +#X connect 14 5 24 0; +#X connect 14 6 25 0; +#X connect 14 7 26 0; +#X connect 14 8 27 0; +#X connect 14 9 28 0; +#X connect 15 0 9 0; +#X connect 16 0 15 0; +#X connect 17 0 9 0; +#X connect 18 0 9 0; +#X connect 19 0 9 0; +#X connect 31 0 30 0; +#X connect 32 0 7 0; +#X connect 33 0 32 0; diff --git a/pd/doc/5.reference/help-metro.pd b/pd/doc/5.reference/help-metro.pd new file mode 100644 index 00000000..f848e582 --- /dev/null +++ b/pd/doc/5.reference/help-metro.pd @@ -0,0 +1,29 @@ +#N canvas 39 7 634 372 12; +#X text 19 36 The metro object sends a series of bangs at a constant rate. The right inlet takes the value in milliseconds between each bang. The left inlet takes a 1 or 0 \, turning the metronome on or off.; +#X obj 67 285 + 1; +#X obj 32 284 int; +#X floatatom 32 317 4 0 0; +#X obj 32 243 metro 500; +#X obj 5 6 metro; +#X floatatom 81 220 4 0 0; +#X text 104 282 These objects work together as a counter. For each bang sent by metro \, the output adds 1; +#X obj 32 103 loadbang; +#X msg 32 125 1; +#X text 92 135 nonzero number or "bang" to start; +#X msg 49 172 0; +#X msg 38 148 bang; +#X msg 49 194 stop; +#X text 99 181 zero or "stop" to stop.; +#X text 351 332 Updated for Pd version 0.33; +#X text 130 220 right inlet sets the rate in msec per tick.; +#X text 127 243 creation argument initializes rate in msec; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 2 0 1 0; +#X connect 4 0 2 0; +#X connect 6 0 4 1; +#X connect 8 0 9 0; +#X connect 9 0 4 0; +#X connect 11 0 4 0; +#X connect 12 0 4 0; +#X connect 13 0 4 0; diff --git a/pd/doc/5.reference/help-x_all_guis.pd b/pd/doc/5.reference/help-x_all_guis.pd new file mode 100644 index 00000000..3c18031b --- /dev/null +++ b/pd/doc/5.reference/help-x_all_guis.pd @@ -0,0 +1,20 @@ +#N canvas 209 342 290 271 10; +#X obj 23 31 bng 15 250 50 532480 \$1 \$1 empty 20 8 192 8 -262144 +-1 -1; +#X obj 23 63 tgl 15 1.06496e+06 \$2 \$2 empty 20 8 192 8 -262144 -1 +-1 0 1; +#X obj 22 95 vsl 15 128 0 127 0 1.59744e+06 \$3 \$3 empty 20 8 192 +8 -262144 -1 -1 0 1; +#X obj 65 30 hsl 128 15 0 127 0 2.12992e+06 \$4 \$4 empty 20 8 192 +8 -262144 -1 -1 0 1; +#X obj 63 63 hdl 15 1 2.6624e+06 8 \$5 \$5 empty 20 8 192 8 -262144 +-1 -1 0; +#X obj 62 99 vu 15 120 \$6 empty 35 8 64 8 -66577 -1 1 49152; +#X obj 115 99 cnv 15 100 60 \$7 \$7 \$7 20 12 917696 14 -233017 -66577 +3.72736e+06; +#X obj 41 308 inlet; +#X obj 41 334 outlet; +#X obj 227 30 vdl 15 1 4.79232e+06 8 \$9 \$9 empty 20 8 192 8 -262144 +-1 -1 0; +#X obj 116 176 nbx 5 14 -1e+37 1e+37 0 4.25984e+06 \$8 \$8 empty 45 +7 192 10 -262144 -1 -1 0; diff --git a/pd/doc/5.reference/hip~-help.pd b/pd/doc/5.reference/hip~-help.pd new file mode 100644 index 00000000..bc8c408d --- /dev/null +++ b/pd/doc/5.reference/hip~-help.pd @@ -0,0 +1,31 @@ +#N canvas 21 5 556 324 12; +#X obj 70 228 env~; +#X floatatom 70 248; +#X floatatom 107 178; +#X obj 70 206 hip~ 5; +#X text 119 201 The high pass filter is initialized to cutoff frequencies below 5 Hz.; +#X obj 12 226 env~; +#X floatatom 12 245; +#X text 108 227 env~ gives the amplitude of the signal envelop in dB.; +#X floatatom 12 107; +#X msg 452 24 \; pd dsp 1; +#X msg 452 58 \; pd dsp 0; +#X obj 83 6 lop~; +#X text 9 68 The left inlet is the incoming audio signal. The right inlet is the cutoff frequency in Hz.; +#X obj 12 130 osc~ 100; +#X text 57 105 <-- scroll to change input frequency; +#X text 12 266 Compare the value of the original signal on the left with the value of the filtered signal on the right.; +#X text 8 35 lop~ is a one-pole low pass filter with a specified rolloff frequency.; +#X text 114 7 - one-pole low pass filter; +#X msg 70 154 clear; +#X text 114 153 <-- reinitialize internal state; +#X text 139 179 <-- set cutoff frequency; +#X text 361 306 updated for Pd version-0.30; +#X connect 0 0 1 0; +#X connect 2 0 3 1; +#X connect 3 0 0 0; +#X connect 5 0 6 0; +#X connect 8 0 13 0; +#X connect 13 0 5 0; +#X connect 13 0 3 0; +#X connect 18 0 3 0; diff --git a/pd/doc/5.reference/hslider-help.pd b/pd/doc/5.reference/hslider-help.pd new file mode 100644 index 00000000..80bd83a5 --- /dev/null +++ b/pd/doc/5.reference/hslider-help.pd @@ -0,0 +1,303 @@ +#N canvas 243 228 551 413 10; +#X obj 1 1 cnv 8 100 60 empty empty hslider=hsl 20 20 1 18 -262144 +-1109 0; +#X floatatom 38 127 9 0 0; +#X msg 47 84 set \$1; +#X floatatom 38 41 7 0 0; +#X text 13 355 (c) musil@iem.kug.ac.at; +#X text 55 368 IEM KUG; +#X obj 38 149 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 18 41 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 41 107 hsl 101 15 25 75 0 1 foo1_snd foo1_rcv empty 8 -8 192 +10 -225280 -1109 -1 6200 1; +#X text 174 11 gui-horicontal-slider:; +#X floatatom 47 62 7 0 0; +#X floatatom 116 150 9 0 0; +#X obj 110 308 r goo2_snd; +#X obj 145 248 s goo2_rcv; +#X floatatom 105 40 7 0 0; +#X floatatom 145 206 7 0 0; +#X obj 60 170 print; +#N canvas 276 200 290 224 once 0; +#X obj 38 47 t b b f; +#X msg 56 85 1; +#X obj 31 108 f 0; +#X obj 31 131 pack 0 0; +#X obj 31 156 route 0; +#X obj 38 24 inlet; +#X obj 31 180 outlet; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 0 2 3 1; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X restore 60 147 pd once; +#X obj 40 265 hsl 73 15 55 3520 1 1 goo2_snd goo2_rcv log.freq. 8 -8 +192 10 -42246 -260818 -90133 1600 1; +#X obj 37 308 ftom; +#X floatatom 37 330 9 0 0; +#X floatatom 64 287 9 0 0; +#X floatatom 110 329 9 0 0; +#X text 175 176 click properties to; +#X floatatom 37 203 8 0 0; +#X obj 37 226 mtof; +#X text 12 184 --------------------; +#X text 163 187 modify geometry \, colors \, etc.; +#X obj 105 82 s foo1_rcv; +#X obj 116 130 r foo1_snd; +#X msg 105 61 set \$1; +#X msg 145 227 set \$1; +#X text 197 120 (0.01 pixels); +#X text 183 99 shift-click & drag; +#X text 189 109 for fine-tuning; +#X text 148 270 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 147 281 for moving selected gui-objects; +#N canvas 207 113 716 530 edit 0; +#X obj 32 220 f; +#X msg 10 199 bang; +#X floatatom 48 198 3 63 88; +#X floatatom 83 220 3 0 37; +#X obj 32 243 pack 0 0; +#X text 110 220 y-label; +#X text 76 198 x-label; +#X obj 279 246 f; +#X msg 257 225 bang; +#X floatatom 295 224 3 -10 10; +#X floatatom 330 246 3 -10 10; +#X obj 279 269 pack 0 0; +#X obj 292 358 f; +#X msg 270 337 bang; +#X floatatom 308 336 3 20 60; +#X floatatom 343 358 3 150 200; +#X obj 292 381 pack 0 0; +#X text 323 224 x-delta; +#X text 357 246 y-delta; +#X text 336 336 x-position; +#X text 370 358 y-position; +#X obj 52 335 f; +#X msg 30 314 bang; +#X floatatom 68 313 3 0 2; +#X floatatom 103 335 3 4 36; +#X obj 52 358 pack 0 0; +#X text 96 313 font; +#X text 132 335 height; +#X floatatom 476 188 1 0 1; +#X text 523 401 no init; +#X text 493 453 init value on loadbang; +#X msg 47 154 \; goo2_rcv color \$1 \$2 \$3; +#X msg 32 268 \; goo2_rcv label_pos \$1 \$2; +#X msg 52 383 \; goo2_rcv label_font \$1 \$2; +#X msg 34 427 \; goo2_rcv label blabla; +#X msg 292 406 \; goo2_rcv pos \$1 \$2; +#X msg 279 294 \; goo2_rcv delta \$1 \$2; +#X msg 475 21 \; goo2_rcv send goo2a_snd; +#X msg 475 59 \; goo2_rcv send goo2_snd; +#X msg 476 105 \; goo2_rcv receive goo2a_rcv; +#X msg 476 143 \; goo2a_rcv receive goo2_rcv; +#X msg 502 420 \; goo2_rcv init 0; +#X msg 503 471 \; goo2_rcv init 1; +#X text 520 188 steady; +#X obj 486 291 f; +#X msg 464 270 bang; +#X floatatom 502 269 3 55 440; +#X floatatom 537 291 6 440 3520; +#X obj 486 314 pack 0 0; +#X text 530 269 left-range-bound; +#X text 586 291 right-range-bound; +#X msg 486 339 \; goo2_rcv range \$1 \$2; +#X msg 363 465 \; goo2_rcv log; +#X msg 269 466 \; goo2_rcv lin; +#X text 269 448 linear / logarithmical; +#X obj 275 133 f; +#X msg 250 112 bang; +#X floatatom 291 111 3 15 73; +#X floatatom 326 133 3 8 50; +#X obj 275 156 pack 0 0; +#X text 319 111 width; +#X text 357 134 height; +#X msg 275 181 \; goo2_rcv size \$1 \$2; +#X msg 34 463 \; goo2_rcv label log.freq.; +#X msg 476 212 \; goo2_rcv steady \$1; +#X obj 47 100 pack 0 0 0; +#X obj 47 72 f; +#X msg 24 24 bang; +#X floatatom 63 22 3 0 29; +#X floatatom 79 42 3 0 29; +#X floatatom 112 58 3 0 29; +#X text 91 22 background; +#X text 106 42 front-color; +#X text 140 59 label-color; +#X msg 277 22 back; +#X msg 277 42 front; +#X msg 277 62 label; +#X msg 239 22 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 277 82 pd RGB_____________; +#X floatatom 319 52 3 0 255; +#X floatatom 362 52 3 0 255; +#X floatatom 405 53 3 0 255; +#X text 34 -1 preset-colors; +#X text 290 1 RGB-colors; +#X text 319 34 red; +#X text 355 33 green; +#X text 403 33 blue; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 32 0; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 7 1; +#X connect 10 0 11 1; +#X connect 11 0 36 0; +#X connect 12 0 16 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 16 1; +#X connect 16 0 35 0; +#X connect 21 0 25 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 25 1; +#X connect 25 0 33 0; +#X connect 28 0 64 0; +#X connect 44 0 48 0; +#X connect 45 0 44 0; +#X connect 46 0 44 1; +#X connect 47 0 48 1; +#X connect 48 0 51 0; +#X connect 55 0 59 0; +#X connect 56 0 55 0; +#X connect 57 0 55 1; +#X connect 58 0 59 1; +#X connect 59 0 62 0; +#X connect 65 0 31 0; +#X connect 66 0 65 0; +#X connect 67 0 66 0; +#X connect 68 0 66 1; +#X connect 69 0 65 1; +#X connect 70 0 65 2; +#X connect 74 0 78 0; +#X connect 75 0 78 0; +#X connect 76 0 78 0; +#X connect 77 0 78 0; +#X connect 78 0 65 0; +#X connect 78 1 65 1; +#X connect 78 2 65 2; +#X connect 79 0 78 1; +#X connect 80 0 78 2; +#X connect 81 0 78 3; +#X restore 314 245 pd edit; +#X obj 221 61 hsl 128 15 0 127 0 0 ddd ddd empty 20 8 192 8 -262144 +-1 -1 10600 1; +#X text 187 379 updated for Pd version 0.35; +#X text 30 380 graz \, austria 2002; +#X obj 168 34 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X connect 1 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 8 0; +#X connect 7 0 8 0; +#X connect 8 0 1 0; +#X connect 8 0 17 0; +#X connect 10 0 2 0; +#X connect 12 0 22 0; +#X connect 14 0 30 0; +#X connect 15 0 31 0; +#X connect 17 0 16 0; +#X connect 18 0 21 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 24 0 25 0; +#X connect 25 0 18 0; +#X connect 29 0 11 0; +#X connect 30 0 28 0; +#X connect 31 0 13 0; diff --git a/pd/doc/5.reference/int-help.pd b/pd/doc/5.reference/int-help.pd new file mode 100644 index 00000000..6b6de2f6 --- /dev/null +++ b/pd/doc/5.reference/int-help.pd @@ -0,0 +1,24 @@ +#N canvas 4 30 605 319 12; +#X msg 61 101 bang; +#X floatatom 61 248 0 0 0; +#X floatatom 73 125 0 0 0; +#X floatatom 102 198 0 0 0; +#X text 108 97 outputs the value; +#X text 110 126 sets and outputs the value; +#X text 113 220 creation argument initializes the value; +#X obj 61 222 int 6; +#X msg 73 148 9.6; +#X text 106 148 non-integers get truncated; +#X msg 71 173 -9.6; +#X text 113 173 toward zero; +#X text 136 200 set the value but no output; +#X obj 60 11 int; +#X text 108 12 - STORE AN INTEGER; +#X text 37 33 The int object stores a number \, initialized by its creation argument \, which may be reset using its inlet and output by sending it the "bang" message. The output is truncated to an integer ala Max.; +#X text 315 270 updated for Pd version 0.33; +#X connect 0 0 7 0; +#X connect 2 0 7 0; +#X connect 3 0 7 1; +#X connect 7 0 1 0; +#X connect 8 0 7 0; +#X connect 10 0 7 0; diff --git a/pd/doc/5.reference/key-help.pd b/pd/doc/5.reference/key-help.pd new file mode 100644 index 00000000..1ab0337c --- /dev/null +++ b/pd/doc/5.reference/key-help.pd @@ -0,0 +1,24 @@ +#N canvas 146 45 546 288 12; +#X obj 21 10 key; +#X obj 54 9 keyup; +#X obj 105 9 keyname; +#X text 173 8 -- grab keyboard; +#X obj 38 67 key; +#X floatatom 38 95 3 0 0 0 - - -; +#X floatatom 77 93 3 0 0 0 - - -; +#X obj 77 67 keyup; +#X floatatom 128 93 3 0 0 0 - - -; +#X obj 128 67 keyname; +#X symbolatom 172 94 10 0 0 0 - - -; +#X text 280 262 updated for Pd version 0.32.; +#X text 26 133 Key and keyup report the (system dependent) numbers +of "printing" keys of the keyboard. Keyname gives the symbolic name +of the key \, with a 1 or 0 if it's up or down \, and works with non-printing +keys like shift or "F1".; +#X text 18 200 Caveat -- this only works if Pd actually gets the key +events which can depend on the stacking order of windows and/or the +pointer location \, depending on the system.; +#X connect 4 0 5 0; +#X connect 7 0 6 0; +#X connect 9 0 8 0; +#X connect 9 1 10 0; diff --git a/pd/doc/5.reference/line-help.pd b/pd/doc/5.reference/line-help.pd new file mode 100644 index 00000000..fd0c02d4 --- /dev/null +++ b/pd/doc/5.reference/line-help.pd @@ -0,0 +1,32 @@ +#N canvas 31 15 669 403 12; +#X floatatom 22 339 0 0 0 0 - - -; +#X msg 31 232 0 1000; +#X msg 46 254 39; +#X obj 66 15 line; +#X text 106 14 - ramp generator; +#X msg 22 209 1 1000; +#X text 18 36 The line object takes (target \, time) pairs and slews +to the specified target over the time given \, updating its output +at a "grain rate" given by the creation argument. If you dont' specify +a time \, line jumps immediately to the target. Note that the inlet +does not remember old values (unlike every other inlet in Pd) -- sending +a float causes a jump in the output regardless of whatever time value +was specified in some previous message. If the line object receives +a message specifying some new target before reaching the previous one +\, it takes off from its current value.; +#X text 93 221 send a pair to ramp to a new value; +#X text 105 251 send a single number to jump; +#X text 46 363 see also:; +#X obj 132 361 line~; +#X msg 57 279 stop; +#X text 98 278 "stop" message to stop output; +#X obj 22 313 line 0 100; +#X text 383 369 updated for Pd version 0.37; +#X text 125 310 creation arguments:; +#X text 316 310 1 initial value; +#X text 318 330 2 time grain in milliseconds; +#X connect 1 0 13 0; +#X connect 2 0 13 0; +#X connect 5 0 13 0; +#X connect 11 0 13 0; +#X connect 13 0 0 0; diff --git a/pd/doc/5.reference/line~-help.pd b/pd/doc/5.reference/line~-help.pd new file mode 100644 index 00000000..7b470c2d --- /dev/null +++ b/pd/doc/5.reference/line~-help.pd @@ -0,0 +1,33 @@ +#N canvas 121 54 813 370 12; +#X obj 33 301 snapshot~; +#X obj 21 8 line~; +#X obj 33 226 line~; +#X floatatom 33 324 0 0 0; +#X obj 43 274 metro 100; +#X obj 43 249 r start; +#X msg 550 21 \; pd dsp 1 \; start bang; +#X msg 34 106 1 1000; +#X text 89 105 a pair of numbers starts a ramp; +#X msg 60 176 2; +#X text 91 150 a single number jumps to value; +#X msg 61 200 stop; +#X text 104 199 "stop" message freezes line~ at its current value; +#X msg 60 153 0; +#X msg 43 128 0 5000; +#X text 10 28 The line~ object generates linear ramps whose levels and timing are determined by messages you send it. The messages may be a single target value (causing the output to jump to the target) or a target and a time in milliseconds (to start a new ramp.); +#X text 644 36 Click to start; +#X text 639 94 Click to stop; +#X text 185 300 see also:; +#X obj 271 302 line; +#X msg 550 75 \; pd dsp 0 \; start 0; +#X text 75 7 - audio ramp generator; +#X text 576 335 updated for version 0.33; +#X connect 0 0 3 0; +#X connect 2 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 4 0; +#X connect 7 0 2 0; +#X connect 9 0 2 0; +#X connect 11 0 2 0; +#X connect 13 0 2 0; +#X connect 14 0 2 0; diff --git a/pd/doc/5.reference/lop~-help.pd b/pd/doc/5.reference/lop~-help.pd new file mode 100644 index 00000000..9f3e85f8 --- /dev/null +++ b/pd/doc/5.reference/lop~-help.pd @@ -0,0 +1,31 @@ +#N canvas 402 99 566 329 12; +#X obj 70 228 env~; +#X floatatom 70 248; +#X floatatom 107 178; +#X obj 70 206 hip~ 5; +#X text 119 201 The high pass filter is initialized to cutoff frequencies below 5 Hz.; +#X obj 12 226 env~; +#X floatatom 12 245; +#X text 108 227 env~ gives the amplitude of the signal envelop in dB.; +#X floatatom 12 107; +#X msg 452 24 \; pd dsp 1; +#X msg 452 58 \; pd dsp 0; +#X obj 83 6 lop~; +#X text 9 68 The left inlet is the incoming audio signal. The right inlet is the cutoff frequency in Hz.; +#X obj 12 130 osc~ 100; +#X text 57 105 <-- scroll to change input frequency; +#X text 12 266 Compare the value of the original signal on the left with the value of the filtered signal on the right.; +#X text 8 35 lop~ is a one-pole low pass filter with a specified rolloff frequency.; +#X text 114 7 - one-pole low pass filter; +#X msg 70 154 clear; +#X text 114 153 <-- reinitialize internal state; +#X text 139 179 <-- set cutoff frequency; +#X text 364 306 updated for Pd version-0.30; +#X connect 0 0 1 0; +#X connect 2 0 3 1; +#X connect 3 0 0 0; +#X connect 5 0 6 0; +#X connect 8 0 13 0; +#X connect 13 0 5 0; +#X connect 13 0 3 0; +#X connect 18 0 3 0; diff --git a/pd/doc/5.reference/makefilename-help.pd b/pd/doc/5.reference/makefilename-help.pd new file mode 100644 index 00000000..6850699b --- /dev/null +++ b/pd/doc/5.reference/makefilename-help.pd @@ -0,0 +1,17 @@ +#N canvas 18 58 583 301 12; +#X floatatom 30 169 0 0 0; +#X obj 30 223 print; +#X obj 30 196 makefilename dog%d.aif; +#X msg 245 166 symbol meat; +#X msg 355 167 symbol hair; +#X obj 245 223 print; +#X obj 245 196 makefilename dog%s.aif; +#X text 28 49 The Makefilename object generates symbols according to a format string \, for use as a series of filenames \, table names \, or whatnot. You can plug in a variable number or symbol by putting "%d" or "%s" in the string. If you put "%s" in the string be sure to send it a symbol and vice versa... there's no checking.; +#X text 319 257 updated for Pd version 0.33; +#X obj 49 17 makefilename; +#X text 170 18 - format a "name" with a variable field; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 4 0 6 0; +#X connect 6 0 5 0; diff --git a/pd/doc/5.reference/makenote-help.pd b/pd/doc/5.reference/makenote-help.pd new file mode 100644 index 00000000..e3d003fc --- /dev/null +++ b/pd/doc/5.reference/makenote-help.pd @@ -0,0 +1,26 @@ +#N canvas 39 28 663 385 12; +#X floatatom 180 207 0 0 0; +#X floatatom 110 176 0 0 0; +#X msg 48 127 60; +#X obj 41 262 print x1; +#X obj 180 262 print x2; +#X floatatom 41 104 0 0 0; +#X obj 29 14 makenote; +#X text 113 14 - send note-on messages and schedule note-off for later; +#X text 19 41 Makenote makes MIDI-style note-on/note-off pairs \, which you can use for MIDI output or to drive note-like processes within Pd.; +#X msg 48 153 60.5; +#X text 80 105 numbers at left are "pitches" which may be integers or not.; +#X text 146 178 "velocity"; +#X text 215 210 duration in milliseconds; +#X obj 41 235 makenote 3.2 500; +#X text 193 235 creation arguments initialize velocity and duration; +#X text 38 316 see also; +#X obj 117 316 stripnote; +#X text 389 325 updated for Pd version 0.33; +#X connect 0 0 13 2; +#X connect 1 0 13 1; +#X connect 2 0 13 0; +#X connect 5 0 13 0; +#X connect 9 0 13 0; +#X connect 13 0 3 0; +#X connect 13 1 4 0; diff --git a/pd/doc/5.reference/math-help.pd b/pd/doc/5.reference/math-help.pd new file mode 100644 index 00000000..5464b8aa --- /dev/null +++ b/pd/doc/5.reference/math-help.pd @@ -0,0 +1,60 @@ +#N canvas 0 0 554 555 12; +#X floatatom 283 263 0 0 0; +#X floatatom 226 349 0 0 0; +#X floatatom 226 262 0 0 0; +#X floatatom 281 486 0 0 0; +#X floatatom 281 425 0 0 0; +#X floatatom 185 486 0 0 0; +#X floatatom 185 425 0 0 0; +#X floatatom 117 486 0 0 0; +#X floatatom 117 425 0 0 0; +#X floatatom 117 326 0 0 0; +#X floatatom 117 265 0 0 0; +#X floatatom 30 486 0 0 0; +#X floatatom 30 425 0 0 0; +#X floatatom 218 186 0 0 0; +#X floatatom 135 182 0 0 0; +#X obj 66 146 sin; +#X floatatom 66 53 0 0 0; +#X floatatom 66 180 0 0 0; +#X obj 66 113 * 6.28319; +#X obj 66 83 / 360; +#X obj 135 148 cos; +#X obj 218 152 tan; +#X obj 30 456 sqrt; +#X obj 117 296 atan; +#X obj 117 456 log; +#X obj 185 456 exp; +#X obj 281 456 abs; +#X obj 226 290 float; +#X obj 283 290 t b f; +#X obj 226 319 atan2; +#X text 87 17 Higher math in Pd; +#X text 171 58 trig functions take inputs in radians; +#X text 24 213 The arc tangent takes two forms. The atan2 version takes an (x \, y) pair and gives you an output between -pi and pi.; +#X text 23 380 also \, square root \, natural logarithm and exponential \, and absolute value:; +#X text 292 529 updated for Pd version 0.33; +#X connect 0 0 28 0; +#X connect 2 0 27 0; +#X connect 4 0 26 0; +#X connect 6 0 25 0; +#X connect 8 0 24 0; +#X connect 10 0 23 0; +#X connect 12 0 22 0; +#X connect 15 0 17 0; +#X connect 16 0 19 0; +#X connect 18 0 15 0; +#X connect 18 0 20 0; +#X connect 18 0 21 0; +#X connect 19 0 18 0; +#X connect 20 0 14 0; +#X connect 21 0 13 0; +#X connect 22 0 11 0; +#X connect 23 0 9 0; +#X connect 24 0 7 0; +#X connect 25 0 5 0; +#X connect 26 0 3 0; +#X connect 27 0 29 0; +#X connect 28 0 27 0; +#X connect 28 1 29 1; +#X connect 29 0 1 0; diff --git a/pd/doc/5.reference/message-help.pd b/pd/doc/5.reference/message-help.pd new file mode 100644 index 00000000..13a74f55 --- /dev/null +++ b/pd/doc/5.reference/message-help.pd @@ -0,0 +1,46 @@ +#N canvas 0 365 726 512 12; +#X msg 88 13 message boxes; +#X text 55 36 Message boxes hold one or more message. Anytime the message +box receives any message at all \, the messages in the box are all +sent to their destinations.; +#X obj 178 301 print; +#X msg 178 241 60 64; +#X msg 178 271 pitch \$1 \, velocity \$2; +#X msg 49 378 123 \; my-receiver-name 858 \; another-receiver -45; +#X text 55 84 Clicking on a message also sends it \, so you can use +messsage boxes for push buttins. For instance \, click here while watching +the printout window:; +#X msg 164 141 walk the dog; +#X obj 164 170 print; +#X text 281 141 <--- message; +#X text 265 167 <--- object (different border); +#X text 35 200 You can separate multiple messages by commas. Also \, +you can use "$1" \, "$2" \, etc. to make variable messages:; +#X text 14 323 Finally \, if you separate messages by a semicolon instead +of a comma \, the following message(s) are re-routed to named objects +such as "receives":; +#X obj 49 433 print; +#X obj 253 378 receive my-receiver-name; +#X floatatom 253 402 0 0 0; +#X floatatom 252 449 0 0 0; +#X obj 252 425 receive another-receiver; +#X msg 559 349 dog bird monkey \; monkey \;; +#X msg 559 229 set dog; +#X msg 567 252 set cat; +#X text 593 189 this is; +#X text 592 206 arcane:; +#X msg 576 303 add monkey; +#X msg 581 327 add2 bird; +#X msg 573 277 set; +#X text 415 479 updated for Pd version 0.34; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 13 0; +#X connect 7 0 8 0; +#X connect 14 0 15 0; +#X connect 17 0 16 0; +#X connect 19 0 18 0; +#X connect 20 0 18 0; +#X connect 23 0 18 0; +#X connect 24 0 18 0; +#X connect 25 0 18 0; diff --git a/pd/doc/5.reference/midi-help.pd b/pd/doc/5.reference/midi-help.pd new file mode 100644 index 00000000..4b731688 --- /dev/null +++ b/pd/doc/5.reference/midi-help.pd @@ -0,0 +1,129 @@ +#N canvas 68 50 876 553 12; +#X floatatom 318 379 0 0 0; +#X floatatom 282 468 0 0 0; +#X floatatom 200 469 0 0 0; +#X text 96 330 off; +#X floatatom 52 383 0 0 0; +#X floatatom 70 134 0 0 0; +#X obj 34 108 notein; +#X floatatom 34 134 0 0 0; +#X obj 52 488 noteout; +#X obj 52 462 makenote 64 250; +#X obj 52 409 metro 500; +#X msg 52 356 1; +#X msg 84 356 0; +#X text 52 333 on; +#X msg 52 436 60; +#X obj 200 496 pgmout; +#X obj 282 494 bendout; +#X floatatom 416 379 0 0 0; +#X floatatom 197 136 0 0 0; +#X floatatom 145 136 0 0 0; +#X text 41 79 omni; +#X floatatom 106 134 0 0 0; +#X obj 145 109 notein 1; +#X text 145 85 channel 1; +#X text 194 17 MIDI I/O objects; +#X text 85 54 notes; +#X text 334 47 control change; +#X text 264 69 everything; +#X floatatom 309 137 0 0 0; +#X floatatom 271 137 0 0 0; +#X floatatom 347 136 0 0 0; +#X obj 271 110 ctlin; +#X floatatom 440 138 0 0 0; +#X floatatom 396 138 0 0 0; +#X obj 396 111 ctlin 7; +#X text 364 71 specific controller number; +#X text 410 88 omni; +#X text 496 89 channel 1; +#X floatatom 493 140 0 0 0; +#X obj 493 114 ctlin 7 1; +#X obj 61 221 pgmin; +#X floatatom 97 248 0 0 0; +#X floatatom 61 248 0 0 0; +#X floatatom 197 250 0 0 0; +#X floatatom 161 250 0 0 0; +#X floatatom 307 253 0 0 0; +#X floatatom 272 253 0 0 0; +#X floatatom 382 255 0 0 0; +#X floatatom 343 253 0 0 0; +#X floatatom 420 256 0 0 0; +#X obj 161 222 bendin; +#X obj 272 226 touchin; +#X obj 343 227 polytouchin; +#X text 49 167 these can also take an optional channel number as argument but by default are omni:; +#X text 32 197 program change; +#X text 155 198 pitch bend; +#X text 271 203 channel and poly aftertouch; +#X floatatom 191 380 0 0 0; +#X floatatom 224 380 0 0 0; +#X floatatom 260 382 0 0 0; +#X obj 191 407 ctlout; +#X obj 318 406 ctlout 7; +#X text 192 349 control out; +#X text 314 353 control 7; +#X text 409 354 control 7 \, channel 4; +#X obj 416 406 ctlout 7 4; +#X text 101 277 outputs work similarly. They all take an optional channel as creation argument \, and ctlin takes a control number and a channel. You get inlets to change them in any case. IF you specify no channel \, it's channel 1; +#X floatatom 355 467 0 0 0; +#X floatatom 440 466 0 0 0; +#X obj 355 493 touchout; +#X obj 440 492 polytouchout; +#X floatatom 479 467 0 0 0; +#X floatatom 520 467 0 0 0; +#X obj 625 218 midiin; +#X floatatom 625 249 0 0 0; +#X floatatom 656 249 0 0 0; +#X floatatom 695 249 0 0 0; +#X floatatom 726 250 0 0 0; +#X text 590 155 These two are always omni and; +#X text 590 174 output the port number instead; +#X text 594 192 of the channel:; +#X obj 697 218 sysexin; +#X obj 623 472 midiout; +#X text 571 413 use this to output raw MIDI; +#X text 566 433 (the second inlet is the port; +#X text 569 451 number.); +#X text 625 514 updated for Pd release 0.33; +#X connect 0 0 61 0; +#X connect 1 0 16 0; +#X connect 2 0 15 0; +#X connect 4 0 10 0; +#X connect 6 0 7 0; +#X connect 6 1 5 0; +#X connect 6 2 21 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 14 0; +#X connect 11 0 4 0; +#X connect 12 0 4 0; +#X connect 14 0 9 0; +#X connect 17 0 65 0; +#X connect 22 0 19 0; +#X connect 22 1 18 0; +#X connect 31 0 29 0; +#X connect 31 1 28 0; +#X connect 31 2 30 0; +#X connect 34 0 33 0; +#X connect 34 1 32 0; +#X connect 39 0 38 0; +#X connect 40 0 42 0; +#X connect 40 1 41 0; +#X connect 50 0 44 0; +#X connect 50 1 43 0; +#X connect 51 0 46 0; +#X connect 51 1 45 0; +#X connect 52 0 48 0; +#X connect 52 1 47 0; +#X connect 52 2 49 0; +#X connect 57 0 60 0; +#X connect 58 0 60 1; +#X connect 59 0 60 2; +#X connect 67 0 69 0; +#X connect 68 0 70 0; +#X connect 71 0 70 1; +#X connect 72 0 70 2; +#X connect 73 0 74 0; +#X connect 73 1 75 0; +#X connect 81 0 76 0; diff --git a/pd/doc/5.reference/moses-help.pd b/pd/doc/5.reference/moses-help.pd new file mode 100644 index 00000000..c1f23c90 --- /dev/null +++ b/pd/doc/5.reference/moses-help.pd @@ -0,0 +1,17 @@ +#N canvas 0 0 624 300 12; +#X obj 72 196 moses 10; +#X floatatom 72 164 4 0 0; +#X floatatom 139 167 4 0 0; +#X floatatom 72 229 4 0 0; +#X floatatom 139 230 4 0 0; +#X obj 63 24 moses; +#X text 118 23 - part a stream of numbers; +#X text 303 235 updated for Pd version 0.33; +#X text 24 64 Moses takes numbers and outputs them at left if they're +less than a control value \, and at right if they're greater or equal +to it. The creation argument initializes the control value (10 in this +example) and the right inlet changes it.; +#X connect 0 0 3 0; +#X connect 0 1 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; diff --git a/pd/doc/5.reference/my_canvas-help.pd b/pd/doc/5.reference/my_canvas-help.pd new file mode 100644 index 00000000..decda628 --- /dev/null +++ b/pd/doc/5.reference/my_canvas-help.pd @@ -0,0 +1,243 @@ +#N canvas 482 81 568 339 10; +#X obj 1 1 cnv 15 300 60 foo10_snd foo10_rcv my_canvas=cnv 63 37 192 +17 -257472 -355 0; +#X text 4 232 (c) musil@iem.kug.ac.at; +#X text 46 245 IEM KUG; +#N canvas 219 100 699 530 edit 0; +#X obj 39 226 f; +#X msg 17 205 bang; +#X floatatom 55 204 3 63 88; +#X floatatom 90 226 3 0 37; +#X obj 39 249 pack 0 0; +#X text 117 226 y-label; +#X text 83 204 x-label; +#X obj 297 281 f; +#X msg 275 260 bang; +#X floatatom 313 259 3 -10 10; +#X floatatom 348 281 3 -10 10; +#X obj 297 304 pack 0 0; +#X obj 309 396 f; +#X msg 287 375 bang; +#X floatatom 325 374 3 20 60; +#X floatatom 360 396 3 150 200; +#X obj 309 419 pack 0 0; +#X text 341 259 x-delta; +#X text 375 281 y-delta; +#X text 353 374 x-position; +#X text 387 396 y-position; +#X obj 59 341 f; +#X msg 37 320 bang; +#X floatatom 75 319 3 0 2; +#X floatatom 110 341 3 4 36; +#X obj 59 364 pack 0 0; +#X text 103 319 font; +#X text 139 341 height; +#X floatatom 275 183 3 2 20; +#X msg 52 137 \; foo10_rcv color \$1 \$2; +#X msg 39 274 \; foo10_rcv label_pos \$1 \$2; +#X msg 59 390 \; foo10_rcv label_font \$1 \$2; +#X msg 36 430 \; foo10_rcv label blabla; +#X msg 36 466 \; foo10_rcv label my_canvas; +#X msg 309 444 \; foo10_rcv pos \$1 \$2; +#X msg 297 329 \; foo10_rcv delta \$1 \$2; +#X obj 505 234 f; +#X msg 483 213 bang; +#X floatatom 521 212 5 100 1000; +#X floatatom 556 234 4 50 500; +#X obj 505 257 pack 0 0; +#X text 566 212 width; +#X text 594 236 height; +#X msg 505 282 \; foo10_rcv vis_size \$1 \$2; +#X msg 275 211 \; foo10_rcv size \$1; +#X text 305 183 selectable size; +#X msg 483 156 \; foo10a_rcv receive foo10_rcv; +#X msg 483 119 \; foo10_rcv receive foo10a_rcv; +#X msg 482 29 \; foo10_rcv send foo10a_snd; +#X msg 482 67 \; foo10_rcv send foo10_snd; +#X msg 509 372 \; foo10_rcv get_pos; +#X obj 510 407 r foo10_snd; +#X obj 510 428 unpack 0 0; +#X floatatom 510 453 4 0 0; +#X floatatom 575 452 4 0 0; +#X text 490 452 x=; +#X text 557 452 y=; +#X obj 52 79 f; +#X msg 29 31 bang; +#X floatatom 68 29 3 0 29; +#X floatatom 103 47 3 0 29; +#X text 96 29 background; +#X text 131 48 label-color; +#X msg 290 25 back; +#X msg 290 49 label; +#X msg 252 25 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 28 180 loadbang; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 97 135 route back label bang; +#X obj 235 168 t b b b; +#X connect 0 0 29 0; +#X connect 1 0 25 0; +#X connect 2 0 26 0; +#X connect 3 0 27 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 11 1; +#X connect 6 0 10 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 10 1; +#X connect 9 0 11 1; +#X connect 10 0 24 1; +#X connect 11 0 23 1; +#X connect 17 0 18 0; +#X connect 17 1 18 1; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 28 0; +#X connect 22 0 6 0; +#X connect 23 0 21 0; +#X connect 24 0 12 0; +#X connect 25 0 20 0; +#X connect 26 0 18 0; +#X connect 27 0 17 0; +#X connect 28 0 11 0; +#X connect 28 0 10 0; +#X connect 29 0 4 0; +#X connect 29 1 7 0; +#X connect 29 2 30 0; +#X connect 30 0 24 0; +#X connect 30 1 23 0; +#X connect 30 2 28 0; +#X restore 290 86 pd RGB_____________; +#X floatatom 332 55 3 0 255; +#X floatatom 375 55 3 0 255; +#X floatatom 418 56 3 0 255; +#X text 39 3 preset-colors; +#X text 301 0 RGB-colors; +#X text 332 37 red; +#X text 368 36 green; +#X text 416 36 blue; +#X obj 52 104 pack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 30 0; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 7 1; +#X connect 10 0 11 1; +#X connect 11 0 35 0; +#X connect 12 0 16 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 16 1; +#X connect 16 0 34 0; +#X connect 21 0 25 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 25 1; +#X connect 25 0 31 0; +#X connect 28 0 44 0; +#X connect 36 0 40 0; +#X connect 37 0 36 0; +#X connect 38 0 36 1; +#X connect 39 0 40 1; +#X connect 40 0 43 0; +#X connect 51 0 52 0; +#X connect 52 0 53 0; +#X connect 52 1 54 0; +#X connect 57 0 75 0; +#X connect 58 0 57 0; +#X connect 59 0 57 1; +#X connect 60 0 75 1; +#X connect 63 0 66 0; +#X connect 64 0 66 0; +#X connect 65 0 66 0; +#X connect 66 0 75 0; +#X connect 66 1 75 1; +#X connect 67 0 66 1; +#X connect 68 0 66 2; +#X connect 69 0 66 3; +#X connect 75 0 29 0; +#X restore 305 20 pd edit; +#X floatatom 110 193 4 0 0; +#X floatatom 147 193 4 0 0; +#X text 121 209 x; +#X text 158 209 y; +#X obj 7 161 metro 100; +#X obj 33 141 tgl 15 1 empty empty empty 20 8 0 10 -262144 -1 -1 1 +1; +#X obj 110 145 r from_K1; +#X floatatom 188 194 4 0 0; +#X floatatom 225 194 4 0 0; +#X text 198 210 x; +#X text 236 210 y; +#X obj 188 146 r from_K2; +#X msg 7 185 \; to_K get_pos; +#N canvas 0 296 395 395 room 1; +#X obj 1 1 cnv 1 400 400 empty empty type...ctrl+e 150 140 2 17 -33289 +-24198 0; +#X obj 15 16 cnv 1 1 360 empty empty move_K1_and_K2 115 160 2 17 -166441 +-24198 0; +#X obj 374 15 cnv 1 1 360 empty empty empty 20 12 2 20 -99865 -66577 +0; +#X obj 15 15 cnv 1 360 1 empty empty empty 20 12 2 20 -166441 -66577 +0; +#X obj 17 375 cnv 1 358 1 empty empty empty 20 12 2 20 -99865 -66577 +0; +#X obj 23 22 cnv 25 25 25 from_K1 to_K K1 1 13 194 14 -261681 -123526 +0; +#X obj 342 342 cnv 25 25 25 from_K2 to_K K2 1 13 194 14 -225280 -1109 +0; +#X restore 307 147 pd room; +#X obj 110 169 unpack; +#X obj 188 170 unpack; +#X text 51 92 to modify geometry \, colors \, etc.; +#X obj 2 115 cnv 1 470 1 empty empty empty 20 12 2 20 -261681 -66577 +0; +#X text 40 78 of the light-blue; +#X text 166 78 my_canvas-object \,; +#X text 5 64 click the properties-dialog on the top-left corner; +#X obj 361 195 r foo10_rcv; +#X obj 403 215 s ggg; +#X text 172 257 updated for Pd version 0.35; +#X text 21 257 graz \, austria 2002; +#X obj 187 236 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X connect 8 0 16 0; +#X connect 9 0 8 0; +#X connect 10 0 18 0; +#X connect 15 0 19 0; +#X connect 18 0 4 0; +#X connect 18 1 5 0; +#X connect 19 0 11 0; +#X connect 19 1 12 0; +#X connect 25 0 26 0; diff --git a/pd/doc/5.reference/namecanvas-help.pd b/pd/doc/5.reference/namecanvas-help.pd new file mode 100644 index 00000000..4c408bcb --- /dev/null +++ b/pd/doc/5.reference/namecanvas-help.pd @@ -0,0 +1,8 @@ +#N canvas 38 53 532 261 12; +#X obj 66 15 namecanvas; +#X text 169 15 - ATTACH THIS CANVAS TO A NAME; +#X obj 204 107 namecanvas bonzo; +#X msg 205 64 \; bonzo msg 50 50 hi there; +#X text 252 224 updated for Pd version 0.33; +#X msg 79 180 \; pd-namecanvas.pd msg 50 70 this is better; +#X text 44 153 This is obsolete. Instead \, you can just say:; diff --git a/pd/doc/5.reference/netreceive-help.pd b/pd/doc/5.reference/netreceive-help.pd new file mode 100644 index 00000000..b4bd3f9c --- /dev/null +++ b/pd/doc/5.reference/netreceive-help.pd @@ -0,0 +1,23 @@ +#N canvas 50 24 682 520 12; +#X obj 100 323 netreceive 3000; +#X floatatom 202 353 0 0 0; +#X obj 100 414 netreceive 3001 1; +#X text 33 36 The Netreceive object opens a socket for TCP ("stream") or UDP ("datagram") network reception on a specified port. If using TCP \, an outlet gives you the number of Netsend objects (or other compatible clients) have opened connections here.; +#X text 31 117 Incoming network messages appear on "receive" objects \; it's up to the sender to select which one. Here \, a "receive foo" fields messages sent from the Netsend help window \, q.v.; +#X text 108 270 first argument: portnumber = 3000; +#X text 105 291 second argument: 0 or none for TCP \, nonzero for UDP; +#X text 238 322 <-- TCP \, port 3000; +#X text 262 413 <-- UDP \, port 3001; +#X text 236 354 <--- number of open connections; +#X text 85 12 Netreceive -- listen for incoming messages from network; +#X text 26 383 incoming messages; +#X text 203 488 see also:; +#X obj 289 490 netsend; +#X obj 100 353 print tcp; +#X obj 100 442 print udp; +#X text 425 484 updated for Pd version 0.33; +#X text 30 207 SECURITY ALERT: don't publish the port number of your netreceive unless you wouldn't mind other people being able to send you messages.; +#X text 32 168 There are some possibilities for intercommunication with other programs... see the help for "netsend."; +#X connect 0 0 14 0; +#X connect 0 1 1 0; +#X connect 2 0 15 0; diff --git a/pd/doc/5.reference/netsend-help.pd b/pd/doc/5.reference/netsend-help.pd new file mode 100644 index 00000000..f2eb9bad --- /dev/null +++ b/pd/doc/5.reference/netsend-help.pd @@ -0,0 +1,55 @@ +#N canvas 84 44 866 530 12; +#X obj 15 425 netsend; +#X msg 15 263 connect localhost 3000; +#X msg 24 403 send foo \$1; +#X floatatom 24 376 0 0 0; +#X msg 15 344 disconnect; +#X msg 285 397 send foo \$1; +#X floatatom 285 370 0 0 0; +#X msg 268 344 disconnect; +#X obj 268 422 netsend 1; +#X msg 268 263 connect localhost 3001; +#X floatatom 15 452 0 0 0; +#X floatatom 268 449 0 0 0; +#X text 359 422 creation argument: 0 or none for TCP \, nonzero for +UDP; +#X text 66 242 TCP; +#X text 343 239 UDP; +#X text 197 9 Netsend -- send Pd messages over a network; +#X text 475 261 Connect to "localhost" port 3000/3001; +#X text 373 345 Close the connection; +#X text 325 372 Send messages to "foo" on remote machine; +#X text 10 473 Outlet is nonzero if connection is open \, zero otherwise. +; +#X text 87 38 The Netsend object connects to another machine over the +network for sending TCP ("stream") or UDP ("datagram") messages. An +outlet reports whether the connection is open or not. A connection +request should specify the name or IP address of the other host and +the port number. There should be a "Netreceive" on the remote host +with a matching port number.; +#X obj 409 497 netreceive; +#X text 318 497 see also:; +#X text 607 498 updated for Pd version 0.33; +#X text 87 150 Opt@web.fm has made compatible objects for Max so that +Pd and Max can intercommunicate: see ftp://fals.ch/pub/pdnets/.; +#X text 87 186 The Linux version of Pd comes with "pdsend" and "pdreceive" +standalone programs. These haven't been tested in Windows yet (but +the source is included in the Pd distribution.); +#X msg 15 290 connect molloy 3000; +#X msg 268 290 connect molloy 3001; +#X msg 15 317 connect bug 3000; +#X msg 268 317 connect bug 3000; +#X connect 0 0 10 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 11 0; +#X connect 9 0 8 0; +#X connect 26 0 0 0; +#X connect 27 0 8 0; +#X connect 28 0 0 0; +#X connect 29 0 8 0; diff --git a/pd/doc/5.reference/noise~-help.pd b/pd/doc/5.reference/noise~-help.pd new file mode 100644 index 00000000..cafc15c3 --- /dev/null +++ b/pd/doc/5.reference/noise~-help.pd @@ -0,0 +1,18 @@ +#N canvas 174 90 458 270 12; +#X floatatom 77 178 4 0 0; +#X obj 77 111 noise~; +#X obj 167 149 print~; +#X msg 167 123 bang; +#X obj 282 89 loadbang; +#X msg 282 114 \; pd dsp 1; +#X obj 77 150 env~ 4096; +#X text 67 204 RMS in dB; +#X text 171 242 updated for Pd version 0.33; +#X obj 20 11 noise~; +#X text 84 11 - uniformly distributed white noise; +#X text 38 49 the output range is -1 to 1...; +#X connect 1 0 2 0; +#X connect 1 0 6 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 6 0 0 0; diff --git a/pd/doc/5.reference/numbox2-help.pd b/pd/doc/5.reference/numbox2-help.pd new file mode 100644 index 00000000..a26db250 --- /dev/null +++ b/pd/doc/5.reference/numbox2-help.pd @@ -0,0 +1,302 @@ +#N canvas 290 235 617 416 10; +#X obj 1 1 cnv 8 100 60 empty empty numbox=nbx 20 20 1 18 -262144 -1109 +0; +#X floatatom 38 300 9 0 0; +#X msg 47 84 set \$1; +#X floatatom 38 43 7 0 0; +#X text 25 363 (c) musil@iem.kug.ac.at; +#X text 67 376 IEM KUG; +#X obj 38 324 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 18 47 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X floatatom 47 63 7 0 0; +#X floatatom 116 324 9 0 0; +#X floatatom 106 42 7 0 0; +#X floatatom 183 113 7 0 0; +#X obj 111 249 ftom; +#X floatatom 111 271 9 0 0; +#X floatatom 147 244 9 0 0; +#X floatatom 221 266 9 0 0; +#X text 217 151 click properties to; +#X floatatom 111 112 9 0 0; +#X obj 111 134 mtof; +#X text 202 65 (0.01 pixels); +#X text 57 99 ------------------------------------------; +#X text 57 286 --------------------------------------------; +#X text 205 162 modify geometry \, colors \, etc.; +#X msg 106 63 set \$1; +#X text 188 44 shift-click & drag; +#X text 194 54 for fine-tuning; +#X text 195 203 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 193 214 for moving selected gui-objects; +#N canvas 239 379 699 530 edit 0; +#X obj 37 233 f; +#X msg 15 212 bang; +#X floatatom 53 211 3 6 88; +#X floatatom 88 233 3 -20 37; +#X obj 37 256 pack 0 0; +#X text 115 233 y-label; +#X text 81 211 x-label; +#X obj 287 271 f; +#X msg 265 250 bang; +#X floatatom 303 249 3 -10 10; +#X floatatom 338 271 3 -10 10; +#X obj 287 294 pack 0 0; +#X obj 299 381 f; +#X msg 277 360 bang; +#X floatatom 315 359 3 20 90; +#X floatatom 350 381 3 150 200; +#X obj 299 404 pack 0 0; +#X text 331 249 x-delta; +#X text 365 271 y-delta; +#X text 343 359 x-position; +#X text 377 381 y-position; +#X obj 57 348 f; +#X msg 35 327 bang; +#X floatatom 73 326 3 0 2; +#X floatatom 108 348 3 4 36; +#X obj 57 371 pack 0 0; +#X text 101 326 font; +#X text 137 348 height; +#X floatatom 476 188 1 0 1; +#X text 523 401 no init; +#X text 493 453 init value on loadbang; +#X text 520 188 steady; +#X obj 486 291 f; +#X msg 464 270 bang; +#X floatatom 502 269 4 55 440; +#X floatatom 537 291 6 440 3520; +#X obj 486 314 pack 0 0; +#X text 269 469 linear / logarithmical; +#X msg 47 158 \; goo4_rcv color \$1 \$2 \$3; +#X msg 37 281 \; goo4_rcv label_pos \$1 \$2; +#X msg 57 396 \; goo4_rcv label_font \$1 \$2; +#X msg 40 442 \; goo4_rcv label blabla; +#X msg 269 487 \; goo4_rcv lin; +#X msg 363 486 \; goo4_rcv log; +#X msg 299 429 \; goo4_rcv pos \$1 \$2; +#X msg 287 319 \; goo4_rcv delta \$1 \$2; +#X msg 475 21 \; goo4_rcv send goo4a_snd; +#X msg 475 59 \; goo4_rcv send goo4_snd; +#X msg 476 105 \; goo4_rcv receive goo4a_rcv; +#X msg 476 143 \; goo4a_rcv receive goo4_rcv; +#X msg 486 339 \; goo4_rcv range \$1 \$2; +#X msg 502 420 \; goo4_rcv init 0; +#X msg 503 471 \; goo4_rcv init 1; +#X text 539 270 bottom-range-bound; +#X text 586 292 top-range-bound; +#X obj 286 160 f; +#X msg 264 139 bang; +#X floatatom 302 138 3 4 55; +#X floatatom 337 160 3 15 73; +#X obj 286 183 pack 0 0; +#X msg 286 208 \; goo4_rcv size \$1 \$2; +#X text 330 138 width; +#X text 368 161 height; +#X msg 41 478 \; goo4_rcv label log.freq.; +#X msg 476 212 \; goo4_rcv steady \$1; +#X obj 47 116 pack 0 0 0; +#X obj 47 88 f; +#X msg 24 40 bang; +#X floatatom 63 38 3 0 29; +#X floatatom 79 58 3 0 29; +#X floatatom 112 74 3 0 29; +#X text 91 38 background; +#X text 106 58 front-color; +#X text 140 75 label-color; +#X msg 285 37 back; +#X msg 285 57 front; +#X msg 285 77 label; +#X msg 247 37 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 285 98 pd RGB_____________; +#X floatatom 327 67 3 0 255; +#X floatatom 370 67 3 0 255; +#X floatatom 413 68 3 0 255; +#X text 34 12 preset-colors; +#X text 296 9 RGB-colors; +#X text 327 49 red; +#X text 363 48 green; +#X text 411 48 blue; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 39 0; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 7 1; +#X connect 10 0 11 1; +#X connect 11 0 45 0; +#X connect 12 0 16 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 16 1; +#X connect 16 0 44 0; +#X connect 21 0 25 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 25 1; +#X connect 25 0 40 0; +#X connect 28 0 64 0; +#X connect 32 0 36 0; +#X connect 33 0 32 0; +#X connect 34 0 32 1; +#X connect 35 0 36 1; +#X connect 36 0 50 0; +#X connect 55 0 59 0; +#X connect 56 0 55 0; +#X connect 57 0 55 1; +#X connect 58 0 59 1; +#X connect 59 0 60 0; +#X connect 65 0 38 0; +#X connect 66 0 65 0; +#X connect 67 0 66 0; +#X connect 68 0 66 1; +#X connect 69 0 65 1; +#X connect 70 0 65 2; +#X connect 74 0 78 0; +#X connect 75 0 78 0; +#X connect 76 0 78 0; +#X connect 77 0 78 0; +#X connect 78 0 65 0; +#X connect 78 1 65 1; +#X connect 78 2 65 2; +#X connect 79 0 78 1; +#X connect 80 0 78 2; +#X connect 81 0 78 3; +#X restore 327 48 pd edit; +#X obj 61 345 print; +#N canvas 276 200 290 224 once 0; +#X obj 38 47 t b b f; +#X msg 56 85 1; +#X obj 31 108 f 0; +#X obj 31 131 pack 0 0; +#X obj 31 156 route 0; +#X obj 38 24 inlet; +#X obj 31 180 outlet; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 0 2 3 1; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X restore 61 322 pd once; +#X obj 249 87 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X text 218 387 updated for Pd version 0.35; +#X text 42 388 graz \, austria 2002; +#X text 192 13 gui-number-box:; +#X obj 106 84 s foo13_rcv; +#X obj 183 133 s goo14_rcv; +#X obj 221 244 r goo14_snd; +#X obj 116 302 r foo13_snd; +#X obj 47 172 nbx 4 15 100 300 0 0 foo13_snd foo13_rcv empty 45 7 192 +10 -225280 -1109 -1 100 256; +#X obj 111 200 nbx 5 18 55 3520 1 0 goo14_snd goo14_rcv log.freq. 45 +-10 192 14 -261681 -260818 -90881 55 72; +#X obj 464 114 nbx 5 14 -1e+37 1e+37 0 0 hhh hhh empty 45 7 192 10 +-262144 -1 -1 0 256; +#X connect 1 0 6 0; +#X connect 2 0 39 0; +#X connect 3 0 39 0; +#X connect 7 0 39 0; +#X connect 8 0 2 0; +#X connect 10 0 23 0; +#X connect 11 0 36 0; +#X connect 12 0 13 0; +#X connect 17 0 18 0; +#X connect 18 0 40 0; +#X connect 23 0 35 0; +#X connect 30 0 29 0; +#X connect 37 0 15 0; +#X connect 38 0 9 0; +#X connect 39 0 30 0; +#X connect 39 0 1 0; +#X connect 40 0 12 0; +#X connect 40 0 14 0; diff --git a/pd/doc/5.reference/openpanel-help.pd b/pd/doc/5.reference/openpanel-help.pd new file mode 100644 index 00000000..15e5d244 --- /dev/null +++ b/pd/doc/5.reference/openpanel-help.pd @@ -0,0 +1,11 @@ +#N canvas 35 31 585 245 12; +#X obj 128 136 openpanel; +#X msg 128 108 bang; +#X obj 128 161 print; +#X text 31 11 openpanel -- query you for a filename; +#X text 48 218 see also:; +#X obj 136 219 savepanel; +#X text 272 223 updated for Pd version 0.33; +#X text 33 59 When Openpanel gets a "bang" an "Open file" browser appears on the screen. If you select a file \, its name appears on the outlet.; +#X connect 0 0 2 0; +#X connect 1 0 0 0; diff --git a/pd/doc/5.reference/operators-help.pd b/pd/doc/5.reference/operators-help.pd new file mode 100644 index 00000000..64b47e4d --- /dev/null +++ b/pd/doc/5.reference/operators-help.pd @@ -0,0 +1,31 @@ +#N canvas 52 109 635 355 12; +#X obj 29 172 +; +#X floatatom 41 113 0 0 0; +#X floatatom 29 197 0 0 0; +#X floatatom 51 143 0 0 0; +#X msg 29 82 bang; +#X obj 44 6 +; +#X text 27 307 see also:; +#X obj 186 314 +~; +#X text 79 5 (etc.) -- ARITHMETIC; +#X text 72 88 Bang outputs sum; +#X text 79 112 Numbers in left inlet add and output sum; +#X text 93 142 Numbers in right inlet only change the inlet's value; +#X obj 113 314 trigger; +#X text 348 325 last updated for version 0.33; +#X text 93 189 You can supply a creation argument to initialize the right inlet:; +#X text 29 29 The floating point binary operators are + \, - \, * \, / \, pow \, max \, and min. Note that pow only works for nonnegative mantissas.; +#X floatatom 101 225 0 0 0; +#X floatatom 101 275 0 0 0; +#X obj 101 250 pow -1; +#X floatatom 179 225 0 0 0; +#X floatatom 179 275 0 0 0; +#X obj 179 250 min 20; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 0 0; +#X connect 16 0 18 0; +#X connect 18 0 17 0; +#X connect 19 0 21 0; +#X connect 21 0 20 0; diff --git a/pd/doc/5.reference/osc~-help.pd b/pd/doc/5.reference/osc~-help.pd new file mode 100644 index 00000000..2bd5f0df --- /dev/null +++ b/pd/doc/5.reference/osc~-help.pd @@ -0,0 +1,58 @@ +#N canvas 85 32 811 508 12; +#X obj 252 320 dac~ 1; +#X obj 252 292 *~; +#X floatatom 156 115 0 0 0; +#X obj 276 264 line~; +#X msg 276 208 0.1 100; +#X msg 295 233 0 100; +#X text 347 203 on; +#X text 344 232 off; +#X text 333 261 envelope; +#X text 333 274 generator; +#X text 260 183 amplitude controls:; +#X text 250 344 audio output; +#X text 424 426 see also:; +#X obj 580 428 cos~; +#X obj 629 428 tabread4~; +#X obj 68 14 osc~; +#X text 142 16 - cosine wave oscillator; +#X obj 126 294 metro 500; +#X obj 126 269 r metro; +#X text 88 344 graph the output; +#X obj 510 427 phasor~; +#X msg 571 79 \; metro 0; +#X msg 570 20 \; pd dsp 1 \; metro 1; +#X floatatom 637 245 0 0 0; +#X obj 637 275 sig~; +#X text 522 266 convert to; +#X text 512 282 audio signal; +#X text 518 305 oscillator; +#X text 479 243 frequency control; +#X obj 637 306 osc~; +#X text 3 120 change frequency; +#X text 244 145 <-- creation argument sets initial frequency; +#X text 231 123 v-- inlet resets phase; +#X graph graph1 0 -1 100 1 94 388 294 488; +#X array array99 100 float; +#X pop; +#X text 16 39 The osc~ object outputs a cosine wave. If no argument is supplied \, the input is taken to be an audio signal. With a floating-point argument \, osc~ takes floating-point messages to change frequency.; +#X text 510 336 invoked without argument to; +#X text 512 360 specify audio signal input; +#X text 2 105 incoming numbers; +#X obj 89 322 tabwrite~ array99; +#X obj 156 144 osc~ 1000; +#X text 546 480 updated for Pd version 0.33; +#X text 655 39 <-Click to start; +#X text 648 88 <-Click to stop; +#X connect 1 0 0 0; +#X connect 2 0 39 0; +#X connect 3 0 1 1; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 17 0 38 0; +#X connect 18 0 17 0; +#X connect 18 0 17 0; +#X connect 23 0 24 0; +#X connect 24 0 29 0; +#X connect 39 0 1 0; +#X connect 39 0 38 0; diff --git a/pd/doc/5.reference/otherbinops-help.pd b/pd/doc/5.reference/otherbinops-help.pd new file mode 100644 index 00000000..3f310818 --- /dev/null +++ b/pd/doc/5.reference/otherbinops-help.pd @@ -0,0 +1,90 @@ +#N canvas 20 43 698 447 12; +#X floatatom 524 338 0 0 0; +#X floatatom 353 338 0 0 0; +#X floatatom 298 338 0 0 0; +#X floatatom 413 338 0 0 0; +#X floatatom 467 338 0 0 0; +#X obj 524 311 <; +#X obj 298 262 r left; +#X obj 540 267 r right; +#X floatatom 71 335 0 0 0; +#X floatatom 19 334 0 0 0; +#X floatatom 119 335 0 0 0; +#X floatatom 163 334 0 0 0; +#X obj 16 45 &; +#X obj 66 45 |; +#X obj 118 45 &&; +#X obj 169 45 ||; +#X obj 19 307 &; +#X obj 71 308 |; +#X obj 119 308 &&; +#X obj 163 307 ||; +#X text 13 73 The Logical Operators; +#X obj 19 266 r left; +#X obj 218 266 r right; +#X obj 12 118 >; +#X obj 61 118 >=; +#X obj 114 118 ==; +#X obj 215 119 <=; +#X obj 262 119 <; +#X text 11 153 The Relational Operators; +#X obj 298 312 >; +#X obj 353 312 >=; +#X obj 413 312 ==; +#X obj 467 312 <=; +#X text 16 190 relational output is logical- and negative numbers BAD +in bitwise logical operators. These operators as defined by C programming +language. (inputs and outputs are converted to and from floating point). +; +#X floatatom 410 65 0 0 0; +#X obj 410 92 s left; +#X floatatom 481 66 0 0 0; +#X obj 481 94 t b f; +#X obj 481 122 s left; +#X obj 541 122 s right; +#X obj 166 118 !=; +#X text 377 42 set left and right inputs here; +#X floatatom 202 335 0 0 0; +#X floatatom 246 334 0 0 0; +#X obj 208 46 <<; +#X obj 259 46 >>; +#X obj 202 308 <<; +#X obj 246 307 >>; +#X text 421 383 last updated for version 0.32; +#X connect 5 0 0 0; +#X connect 6 0 29 0; +#X connect 6 0 30 0; +#X connect 6 0 31 0; +#X connect 6 0 32 0; +#X connect 6 0 5 0; +#X connect 7 0 29 1; +#X connect 7 0 30 1; +#X connect 7 0 31 1; +#X connect 7 0 32 1; +#X connect 7 0 5 1; +#X connect 16 0 9 0; +#X connect 17 0 8 0; +#X connect 18 0 10 0; +#X connect 19 0 11 0; +#X connect 21 0 16 0; +#X connect 21 0 17 0; +#X connect 21 0 18 0; +#X connect 21 0 19 0; +#X connect 21 0 46 0; +#X connect 21 0 47 0; +#X connect 22 0 19 1; +#X connect 22 0 18 1; +#X connect 22 0 17 1; +#X connect 22 0 16 1; +#X connect 22 0 47 1; +#X connect 22 0 46 1; +#X connect 29 0 2 0; +#X connect 30 0 1 0; +#X connect 31 0 3 0; +#X connect 32 0 4 0; +#X connect 34 0 35 0; +#X connect 36 0 37 0; +#X connect 37 0 38 0; +#X connect 37 1 39 0; +#X connect 46 0 42 0; +#X connect 47 0 43 0; diff --git a/pd/doc/5.reference/pack-help.pd b/pd/doc/5.reference/pack-help.pd new file mode 100644 index 00000000..c979d480 --- /dev/null +++ b/pd/doc/5.reference/pack-help.pd @@ -0,0 +1,37 @@ +#N canvas 14 8 809 354 12; +#X floatatom 19 86 0 0 0; +#X msg 29 115 bang; +#X floatatom 49 138 0 0 0; +#X floatatom 188 138 0 0 0; +#X obj 19 254 print; +#X msg 86 138 symbol cat; +#X obj 82 9 pack; +#X text 28 319 See also; +#X obj 106 321 unpack; +#X text 14 34 The pack object takes a series of inputs and outputs +a concatenated list. The number of creation arguments determines the +number of inlets.; +#X text 60 85 <-- number in first inlet generates output; +#X text 70 114 <-- bang generates output without resetting first value +; +#X text 226 135 <-- numbers and symbols in the corresponding inlets +change the values without causing output (see "trigger" for a way to +change this behavior.); +#X text 250 187 <-- as with any Pd object \, you can send a list whose +atoms are automatically distributed to the corresponding inlets.; +#X msg 175 190 1 2 dog; +#X obj 167 321 trigger; +#X obj 19 227 pack 100 0 s 0; +#X text 121 9 - combine several atoms into one message; +#X text 155 226 <-- creation arguments specify the number of inlets +and their types: a number make a numeric outlet (and initializes the +value). A symbol argument can start with "s" \, "f" \, or "p" to specify +a "symbol" \, "float" (number) \, or pointer outlet.; +#X text 538 331 updated for Pd version 0.34; +#X connect 0 0 16 0; +#X connect 1 0 16 0; +#X connect 2 0 16 1; +#X connect 3 0 16 3; +#X connect 5 0 16 2; +#X connect 14 0 16 0; +#X connect 16 0 4 0; diff --git a/pd/doc/5.reference/pd-help.pd b/pd/doc/5.reference/pd-help.pd new file mode 100644 index 00000000..f7db8f66 --- /dev/null +++ b/pd/doc/5.reference/pd-help.pd @@ -0,0 +1,52 @@ +#N canvas 32 130 677 385 12; +#N canvas 0 0 600 400 /SUBPATCH/ 0; +#X restore 59 10 pd; +#X text 88 12 - subpatch; +#X obj 218 10 inlet; +#X text 263 10 - control inlet; +#X obj 442 11 inlet~; +#X text 494 12 - audio inlet; +#X obj 215 39 outlet; +#X text 265 39 - control outlet; +#X obj 435 40 outlet~; +#X text 494 40 - audio outlet; +#X text 37 74 Type "pd" into an object box to make a subpatch. When +in run mode you can click on the object to open the subpatch. You can +name the subpatch with an argument:; +#N canvas 0 0 600 396 my-subpatch 0; +#X restore 133 131 pd my-subpatch; +#N canvas 0 0 600 392 my-subpatch-with-inlets-and-outlets 0; +#X obj 68 126 inlet; +#X text 20 96 control inlet for receiving messages; +#X floatatom 68 154 0 0 0; +#X floatatom 71 255 0 0 0; +#X obj 71 287 outlet; +#X text 35 225 control outlet for sending message; +#X obj 403 121 inlet~; +#X obj 403 172 print~; +#X msg 418 146 bang; +#X obj 402 314 outlet~; +#X obj 402 288 sig~ 34; +#X connect 0 0 2 0; +#X connect 3 0 4 0; +#X connect 6 0 7 0; +#X connect 8 0 7 0; +#X connect 10 0 9 0; +#X restore 86 272 pd my-subpatch-with-inlets-and-outlets; +#X text 55 174 and you can put inlets and outlets by making "inlet" +objects \, etc \, in the subpatch (open the patch below to see them.) +; +#X obj 423 322 print~; +#X msg 362 294 bang; +#X obj 422 243 sig~ 12; +#X floatatom 86 246 0 0 0; +#X floatatom 86 298 0 0 0; +#X text 441 272 (check that audio is on); +#X text 52 221 messages in and out; +#X text 392 220 audio in and out; +#X text 391 351 updated for Pd version 0.26; +#X connect 12 0 18 0; +#X connect 12 1 14 0; +#X connect 15 0 14 0; +#X connect 16 0 12 1; +#X connect 17 0 12 0; diff --git a/pd/doc/5.reference/phasor~-help.pd b/pd/doc/5.reference/phasor~-help.pd new file mode 100644 index 00000000..2da01cf9 --- /dev/null +++ b/pd/doc/5.reference/phasor~-help.pd @@ -0,0 +1,36 @@ +#N canvas 5 31 889 373 12; +#X graph graph1 0 1 100 -1 67 250 267 350; +#X array array99 100 float; +#X pop; +#X obj 29 181 metro 500; +#X obj 13 126 phasor~; +#X floatatom 13 76 0 0 0; +#X obj 57 12 phasor~; +#X obj 29 156 r metro; +#X obj 13 100 sig~ 890; +#X text 78 75 <-- specify frequency; +#X text 92 98 <-- convert it to audio signal; +#X msg 409 75 \; metro 0; +#X msg 405 18 \; pd dsp 1 \; metro 1; +#X text 494 32 <-- Click to start; +#X text 479 79 <-- Click to stop; +#X text 129 14 - sawtooth generator; +#X text 170 207 <-- graph the output; +#X text 82 128 <-- right inlet resets phase; +#X obj 425 227 phasor~ 440; +#X floatatom 425 203 0 0 0; +#X text 348 118 The phasor~ object outputs a sawtooth signal \, traditionally used for table lookup via cos~ or tabread4~. If no argument is supplied \, the input is taken to be an audio signal \; with a floating-point argument \, phasor~ takes floating-point messages to change frequency.; +#X text 294 246 Invoked above with argument for non-signal input. Incoming messages override the initial value.; +#X text 311 301 see also:; +#X obj 396 301 osc~; +#X obj 439 301 cos~; +#X obj 481 301 tabread4~; +#X text 627 345 updated for Pd version 0.33; +#X obj 13 205 tabwrite~ array99; +#X connect 1 0 25 0; +#X connect 2 0 25 0; +#X connect 3 0 6 0; +#X connect 5 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 2 0; +#X connect 17 0 16 0; diff --git a/pd/doc/5.reference/pipe-help.pd b/pd/doc/5.reference/pipe-help.pd new file mode 100644 index 00000000..272057ed --- /dev/null +++ b/pd/doc/5.reference/pipe-help.pd @@ -0,0 +1,41 @@ +#N canvas 99 89 737 480 12; +#X floatatom 52 127 0 0 0; +#X floatatom 127 227 0 0 0; +#X floatatom 52 284 0 0 0; +#X floatatom 544 281 0 0 0; +#X floatatom 535 392 0 0 0; +#X obj 534 364 pipe 5 6 7 1000; +#X obj 543 307 t f f f; +#X obj 563 338 + 1; +#X obj 597 337 + 2; +#X floatatom 590 390 0 0 0; +#X floatatom 658 391 0 0 0; +#X text 32 433 see also:; +#X text 129 13 pipe -- message "delay line"; +#X obj 52 253 pipe 2000; +#X text 91 125 numbers to store and output later; +#X text 117 148 output all stored messages immediately; +#X msg 63 152 flush; +#X msg 65 180 clear; +#X text 113 180 forget all stored messages; +#X text 91 286 delayed output; +#X obj 116 435 delay; +#X obj 167 435 timer; +#X text 51 42 The Pipe object stores a sequence of messages and outputs them after a specified delay time in miliseconds. You can change the delay time as you wish. The outputs are sorted automatically.; +#X text 140 254 creation argument initializes delay time; +#X text 163 228 set delay time; +#X text 487 449 updated for Pd version 0.33; +#X text 21 330 You can specify compound messages (lists) by adding arguments which set their type and initial value as in "pack." In this case the delay time comes last and is changed by the last inlet. You can also pack symbols and pointers but this feature is UNTESTED.; +#X connect 0 0 13 0; +#X connect 1 0 13 1; +#X connect 3 0 6 0; +#X connect 5 0 4 0; +#X connect 5 1 9 0; +#X connect 5 2 10 0; +#X connect 6 0 5 0; +#X connect 6 1 7 0; +#X connect 6 2 8 0; +#X connect 7 0 5 1; +#X connect 8 0 5 2; +#X connect 13 0 2 0; +#X connect 16 0 13 0; diff --git a/pd/doc/5.reference/plot-help.pd b/pd/doc/5.reference/plot-help.pd new file mode 100644 index 00000000..2070ed69 --- /dev/null +++ b/pd/doc/5.reference/plot-help.pd @@ -0,0 +1,58 @@ +#N struct help-plot-template float x float y array array1 help-plot-array1-template +array array2 help-plot-array2-template array array3 help-plot-array3-template +; +#N struct help-plot-array1-template float y; +#N struct help-plot-array2-template float x float y; +#N struct help-plot-array3-template float y float w; +#N canvas 398 0 516 229 12; +#N canvas 173 285 626 539 help-plot-template 1; +#X text 29 34 creation arguments:; +#X text 48 71 - RGB color (0=black \, 999=white \, 900=red \, 90=green +\, 9=blue \, 555=grey \, etc.); +#X text 47 52 - OPTIONAL word "curve" to specify bezier; +#X text 46 98 - line width; +#X text 46 114 - relative x and y location; +#X text 47 130 - x spacing; +#X obj 39 217 plot curve array2 70 3 100 0; +#X obj 30 308 plot curve array3 9 1 120 50 20; +#X obj 45 12 plot array1 500 1 10 15 20; +#X text 29 147 This first example plots the red trace (500) \, width +1 \, at point (10 \, 15) \, with horizontal spacing 20 The black diamonds +come from the template of the array1 element itself.; +#X text 62 239 This is the green spiral (color 70 \, line width 3 \, +location (100 \, 0). Since the template for array2 contains an "x" +cariable \, play ignores x spacing requests and takes x from the data +itself.; +#X text 50 328 If a "w" variable is present in the template as for +array3 \, it is added to the line width.; +#X obj 27 501 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10; +#X text 27 454 To see the data itself \, select "properties" for the +scalar by right clicking on the purple square.; +#X obj 24 387 struct help-plot-template float x float y array array1 +help-plot-array1-template array array2 help-plot-array2-template array +array3 help-plot-array3-template; +#X text 33 366 here's the "struct" for all this:; +#X restore 243 78 pd help-plot-template; +#N canvas 196 292 273 120 help-plot-array1-template 0; +#X obj 30 71 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5; +#X obj 32 27 template float y; +#X restore 242 101 pd help-plot-array1-template; +#N canvas 161 163 273 120 help-plot-array2-template 0; +#X obj 32 26 template float x float y; +#X restore 243 123 pd help-plot-array2-template; +#N canvas 0 0 411 207 help-plot-data 1; +#X scalar help-plot-template 39 73 \; 0 \; 20 \; 0 \; 30 \; 0 \; \; +0 0 \; 0 10 \; 20 0 \; 0 -30 \; -40 0 \; 0 50 \; 60 0 \; \; 0 0 \; +10 10 \; 0 10 \; 0 1 \; 20 1 \; 20 10 \; 20 1 \; \;; +#X restore 242 57 pd help-plot-data; +#X text 23 139 see also:; +#X obj 30 184 drawnumber; +#X obj 29 163 template; +#X obj 35 22 plot; +#X text 87 21 -- draw array elements of scalars; +#X obj 29 206 drawpolygon; +#N canvas 161 163 273 120 help-plot-array3-template 0; +#X obj 43 32 template float y float w; +#X restore 242 144 pd help-plot-array3-template; +#X text 8 79 explanation is in here-->; +#X text 264 203 updated for Pd version 0.35; diff --git a/pd/doc/5.reference/pointer-help.pd b/pd/doc/5.reference/pointer-help.pd new file mode 100644 index 00000000..96a22ff1 --- /dev/null +++ b/pd/doc/5.reference/pointer-help.pd @@ -0,0 +1,79 @@ +#N struct template2 float x float y; +#N struct template1 float x float y float z; +#N canvas 223 0 715 654 12; +#X text 20 572 see also:; +#X obj 21 10 pointer; +#X text 95 10 -- remember the location of a scalar in a list; +#N canvas 164 72 425 146 help-pointer-template1 0; +#X obj 18 81 filledpolygon z 0 1 0 0 20 0 20 30 0 30; +#X obj 60 21 struct template1 float x float y float z; +#X restore 327 386 pd help-pointer-template1; +#N canvas 26 456 510 145 help-pointer-template2 0; +#X obj 52 78 filledcurve 909 0 0 0 0 30 30 60 0 30 -30 0 0; +#X obj 60 21 struct template2 float x float y; +#X restore 327 409 pd help-pointer-template2; +#X obj 23 592 get; +#X obj 56 592 set; +#X obj 91 592 append; +#X obj 152 592 getsize; +#X obj 220 593 setsize; +#X obj 290 593 element; +#X obj 23 617 sublist; +#N canvas 0 0 312 185 help-pointer-data 1; +#X scalar template2 20 97 \;; +#X scalar template1 80 17 90 \;; +#X scalar template1 120 117 9 \;; +#X restore 327 364 pd help-pointer-data; +#X obj 54 360 pointer; +#X msg 54 231 traverse pd-help-pointer-data; +#X msg 67 255 bang; +#X text 109 256 outputs current value; +#X msg 69 281 next; +#X obj 54 385 print out1; +#X obj 167 371 print out2; +#X text 119 274 moves forward one item and outputs pointer \; if we +reach the end \, a "bang" goes to out2.; +#X text 16 426 Optional arguments to pointer allow you to select according +to the class of the scalar being output:; +#X msg 74 487 next; +#X msg 60 464 traverse pd-help-pointer-data; +#X obj 60 515 pointer help-pointer-template1 help-pointer-template2 +; +#X obj 60 541 print template1; +#X obj 198 541 print template2; +#X obj 338 541 print other; +#X obj 441 541 print bangout; +#X text 333 232 sets to the "head" of the list; +#X text 29 34 "Pointer" is a storage object like "float" \, except +that the thing stored is the location of a scalar somewhere. You can +send a pointer a value (perhaps from another "pointer" object). The +right inlet takes pointers and simply stores them. A bang in the left +outputs the pointer \, and a pointer in the left both sets and outputs +the value.; +#X text 29 132 The value of a pointer can either indicate a real scalar +\, or else the "head" (before the first element) of the list. This +allows you to point to an empty list \, and also \, to "append" a scalar +to the beginning of the list.; +#X text 29 191 Pointers are "safe": if you delete a scalar pointers +to it are marked invalid.; +#X text 166 391 bang at end; +#X text 167 407 of list; +#X text 53 405 output; +#X text 445 617 updated for Pd version 0.35; +#X obj 92 616 struct; +#X msg 71 307 vnext 1; +#X text 149 308 "vnext" gets the next object (if arg is 0) or the next +selected object (if arg is 1 -- but the window must be visible for +the "selection" to make sense).; +#X connect 13 0 18 0; +#X connect 13 1 19 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 17 0 13 0; +#X connect 22 0 24 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 24 1 26 0; +#X connect 24 2 27 0; +#X connect 24 3 28 0; +#X connect 38 0 13 0; diff --git a/pd/doc/5.reference/poly-help.pd b/pd/doc/5.reference/poly-help.pd new file mode 100644 index 00000000..0b34f99e --- /dev/null +++ b/pd/doc/5.reference/poly-help.pd @@ -0,0 +1,30 @@ +#N canvas 0 0 600 496 12; +#X text 155 228 <-- scroll to change the value of delay in milliseconds.; +#X text 406 383 updated for Pd version 0.25; +#X text 42 383 see also:; +#X obj 66 15 poly; +#X text 101 14 - MIDI-STYLE POLYPHONIC VOICE ALLOCATOR; +#X text 12 42 The poly object takes a stream of pitch/velocity pairs and outputs triples containing voice number \, pitch and velocity. You can pack the output and use the route object to route messages among a bank of voices depending on the first outlet. Poly can be configured to do voice stealing or not (the default.); +#X obj 110 384 route; +#X obj 154 384 makenote; +#X obj 52 254 poly 4 1; +#X text 134 253 <-- first argument \, number of voices \; second argument selects voice stealing; +#X msg 52 168 60 64; +#X msg 103 168 60 0; +#X msg 147 168 62 64; +#X msg 194 168 62 0; +#X obj 52 280 pack 0 0 0; +#X obj 52 306 print; +#X text 97 305 Output is in the printout window.; +#X msg 254 177 stop; +#X msg 296 177 clear; +#X connect 8 0 14 0; +#X connect 8 1 14 1; +#X connect 8 2 14 2; +#X connect 10 0 8 0; +#X connect 11 0 8 0; +#X connect 12 0 8 0; +#X connect 13 0 8 0; +#X connect 14 0 15 0; +#X connect 17 0 8 0; +#X connect 18 0 8 0; diff --git a/pd/doc/5.reference/print-help.pd b/pd/doc/5.reference/print-help.pd new file mode 100644 index 00000000..50af069a --- /dev/null +++ b/pd/doc/5.reference/print-help.pd @@ -0,0 +1,13 @@ +#N canvas 349 65 615 247 12; +#X msg 102 52 walk the dog; +#X msg 29 51 bang; +#X msg 70 51 234; +#X obj 29 96 print x1; +#X obj 21 10 print; +#X text 37 134 Print prints out the messages it receives on the "terminal +window" that Pd is run from.; +#X text 249 200 updated for Pd version 0.31.; +#X text 73 10 -- print messages to terminal window; +#X connect 0 0 3 0; +#X connect 1 0 3 0; +#X connect 2 0 3 0; diff --git a/pd/doc/5.reference/print~-help.pd b/pd/doc/5.reference/print~-help.pd new file mode 100644 index 00000000..b3a9c429 --- /dev/null +++ b/pd/doc/5.reference/print~-help.pd @@ -0,0 +1,18 @@ +#N canvas 118 333 531 212 10; +#X msg 74 143 2; +#X msg 455 77 \; pd dsp 0; +#X msg 454 40 \; pd dsp 1; +#X obj 62 177 print~; +#X msg 74 118 bang; +#X obj 62 92 phasor~ 1000; +#X text 122 119 bang prints one vector; +#X obj 454 18 loadbang; +#X text 109 142 print two or more successive vectors; +#X obj 32 12 print~; +#X text 85 12 - print out raw values of a signal; +#X text 301 171 Updated for Pd version 0.33; +#X text 19 44 The print~ object takes a signal input and prints one or more vectors out when you send it a bang or a number. By default a vector is 64 samples.; +#X connect 0 0 3 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 7 0 2 0; diff --git a/pd/doc/5.reference/qlist-help.pd b/pd/doc/5.reference/qlist-help.pd new file mode 100644 index 00000000..a5b2a574 --- /dev/null +++ b/pd/doc/5.reference/qlist-help.pd @@ -0,0 +1,76 @@ +#N canvas 7 31 1178 587 12; +#X obj 546 328 qlist; +#X msg 592 110 rewind; +#X msg 591 135 next; +#X floatatom 546 382 0 0 0; +#X msg 593 54 bang; +#X obj 441 515 r this; +#X obj 544 515 r that; +#X obj 441 544 print this; +#X obj 544 544 print that; +#X obj 560 356 print done; +#X msg 593 80 tempo 1; +#X text 18 51 The qlist object reads text files containing time-tagged +Pd messages. You can have them sequenced automatically (by sending +a "bang" message \, possibly changing speed via "tempo" messages) or +manually via the "rewind" and "next" messages.; +#X text 15 136 To run the qlist automatically \, send it a "read" message +(the filename is relative to the directory the patch is in) and later +a "bang." Messages in the file are separated by semicolons. Optional +leading numbers are delay times in milliseconds. If the tempo is diffrerent +from 1 the messages are sent faster or slower accordingly. Messages +should start with a symbol giving the destination object. In the file +"qlist.q" used here \, the messages go to objects "this" and "that" +which are receives below.; +#X text 17 281 To run it manually \, send "rewind" followed by "next". +All messages not preceeded by numbers are sent. As soon as a message +starting with one or more numbers is encountered \, the numbers are +output as a list. There are many ways you could design a sequencer +around this.; +#X text 668 48 sequence automatically; +#X text 670 79 set relative tempo; +#X text 668 105 go to beginning (and stop); +#X text 668 132 single-step forward; +#X text 713 273 read a file; +#X text 777 300 write one; +#X text 552 404 This outlet gets a list of leading numbers for the +next message \, for you to use in designing your own sequencer.; +#X msg 586 274 read qlist.txt; +#X msg 586 300 write /tmp/qlist.txt; +#X text 21 493 see also:; +#X obj 97 493 textfile; +#X text 22 362 You can also record textual messages and save them to +a file. Send "clear" to empty the qlist and "add" to add messages (terminated +with semicolons.) The message \, "add2" adds a list of atoms without +finishing with a semicolon in case you want to make variable-length +messages.; +#X msg 589 190 clear; +#X msg 589 216 add 500 this is another message; +#X msg 590 242 add2 that; +#X text 666 187 empty the qlist; +#X text 882 217 add a message to a qlist; +#X text 683 240 add a message to a qlist but don't terminate it; +#X text 653 341 This outlet gets a bang when you hit the end of the +sequence. In the file "qlist.txt" the end is delayed 1000 milliseconds +after the last message.; +#X text 379 470 These receives are invoked in the file "qlist.txt" +in this directory.; +#X obj 71 13 qlist; +#X text 132 15 - text-based sequencer; +#X text 668 158 single-step forward SUPRESSING MESSAGE-SENDING; +#X msg 591 161 next 1; +#X text 921 558 updated for Pd version 0.35; +#X connect 0 0 3 0; +#X connect 0 1 9 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 10 0 0 0; +#X connect 21 0 0 0; +#X connect 22 0 0 0; +#X connect 26 0 0 0; +#X connect 27 0 0 0; +#X connect 28 0 0 0; +#X connect 37 0 0 0; diff --git a/pd/doc/5.reference/random-help.pd b/pd/doc/5.reference/random-help.pd new file mode 100644 index 00000000..b792325c --- /dev/null +++ b/pd/doc/5.reference/random-help.pd @@ -0,0 +1,19 @@ +#N canvas 0 0 630 421 12; +#X msg 40 212 bang; +#X obj 40 287 random 5; +#X floatatom 83 261 0 0 0; +#X floatatom 40 312 0 0 0; +#X msg 50 236 seed 123; +#X text 92 210 bang for output; +#X text 132 236 message to set the seed; +#X text 116 259 inlet to reset the range; +#X text 119 286 argument to initialize the range; +#X text 378 337 updated for Pd version 0.33; +#X text 11 46 Random outputs pseudorandom integers from 0 to N-1 where N is the creation argument (5 in the example below.) You can specify a seed if you wish. Seeds are kept locally so that if two Randoms are seeded the same they will have the same output (or indeed you can seed the same one twice to repeat the output.); +#X text 12 139 On the other hand \, if you don't supply a seed each instance of random gets its own seed. WARNING: nothing is known about the quality of teh pseudorandom number generator. It isn't any standard one!; +#X obj 20 11 random; +#X text 84 11 - pseudorandom integers; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 1 1; +#X connect 4 0 1 0; diff --git a/pd/doc/5.reference/readsf~-help.pd b/pd/doc/5.reference/readsf~-help.pd new file mode 100644 index 00000000..29c90988 --- /dev/null +++ b/pd/doc/5.reference/readsf~-help.pd @@ -0,0 +1,63 @@ +#N canvas 113 157 888 480 12; +#X msg 561 8 \; pd dsp 1; +#X msg 39 240 1; +#X msg 39 261 0; +#X obj 516 359 print didit; +#X obj 139 361 env~ 16384; +#X floatatom 139 380 0 0 0 0 - - -; +#X msg 40 283 print; +#X obj 20 393 dac~; +#X obj 233 360 env~ 16384; +#X floatatom 233 379 0 0 0 0 - - -; +#X obj 30 308 readsf~ 4 1e+06; +#X obj 327 359 env~ 16384; +#X floatatom 327 378 0 0 0 0 - - -; +#X obj 421 359 env~ 16384; +#X floatatom 421 379 0 0 0 0 - - -; +#X msg 26 210 open ../sound/bell.aiff 0 200 4 2 b; +#X obj 80 362 *~ 0.1; +#X obj 21 363 *~ 0.1; +#X text 40 7 READSF~ - read a soundfile; +#X msg 26 189 open ../sound/bell.aiff; +#X text 185 296 optional arguments: number of channels \; buffer size +per channnel in bytes.; +#X text 548 341 when the soundfile is done.; +#X text 547 327 last outlet gives a "bang"; +#X text 359 186 Open takes a filename \, an onset in sample frames +\, and \, as an override \, you may also supply a header size to skip +\, a number of channels \, bytes per channel \, and endianness.; +#X text 36 24 The readsf~ object reads a soundfile into its signal +outputs. You must open the soundfile in advance (a couple of seconds +before you'll need it) using the "open" message. The object immediately +starts reading from the file \, but output will only appear after you +send a "1" to start playback. A "0" stops it.; +#X text 33 121 The wave \, aiff \, and nextstep formats are parsed +automatically \, although only 2- 3- and 4- byte samples are accepted +(4 bytes implies floating point and is not available in aiff format.) +; +#X text 647 450 Updated for version 0.37; +#X obj 116 452 soundfiler; +#X text 24 452 see also:; +#X obj 216 452 readsf~; +#X text 94 238 1 starts playback; +#X text 97 261 0 stops it; +#X connect 1 0 10 0; +#X connect 2 0 10 0; +#X connect 4 0 5 0; +#X connect 6 0 10 0; +#X connect 8 0 9 0; +#X connect 10 0 4 0; +#X connect 10 0 17 0; +#X connect 10 1 8 0; +#X connect 10 1 16 0; +#X connect 10 2 11 0; +#X connect 10 2 16 0; +#X connect 10 3 13 0; +#X connect 10 3 17 0; +#X connect 10 4 3 0; +#X connect 11 0 12 0; +#X connect 13 0 14 0; +#X connect 15 0 10 0; +#X connect 16 0 7 1; +#X connect 17 0 7 0; +#X connect 19 0 10 0; diff --git a/pd/doc/5.reference/realtime-help.pd b/pd/doc/5.reference/realtime-help.pd new file mode 100644 index 00000000..60fcffaa --- /dev/null +++ b/pd/doc/5.reference/realtime-help.pd @@ -0,0 +1,15 @@ +#N canvas 156 202 565 269 12; +#X msg 73 146 bang; +#X msg 30 115 bang; +#X floatatom 30 206 0 0 0; +#X text 71 113 Click here to reset; +#X text 27 232 Output is in milliseconds; +#X text 114 147 Click here to get elapsed CPU time; +#X obj 66 15 realtime; +#X text 12 47 The realtime object measures elapsed real time \, as measured by your operating system.; +#X obj 30 176 realtime; +#X text 134 15 - ask OS for elapsed real time; +#X text 302 244 updated for Pd version 0.33; +#X connect 0 0 8 1; +#X connect 1 0 8 0; +#X connect 8 0 2 0; diff --git a/pd/doc/5.reference/receive-help.pd b/pd/doc/5.reference/receive-help.pd new file mode 100644 index 00000000..17bb08cb --- /dev/null +++ b/pd/doc/5.reference/receive-help.pd @@ -0,0 +1,26 @@ +#N canvas 257 45 511 351 12; +#X text 278 321 updated for Pd version 0.32; +#X floatatom 36 55 5 0 0; +#X floatatom 152 58 5 0 0; +#X floatatom 272 57 5 0 0; +#X floatatom 38 134 5 0 0; +#X floatatom 171 136 5 0 0; +#X floatatom 305 134 5 0 0; +#X text 62 321 abbreviation:; +#X obj 36 80 send help-rcv1; +#X obj 152 81 send help-rcv1; +#X obj 271 81 send help-rcv2; +#X obj 38 110 receive help-rcv1; +#X obj 171 110 receive help-rcv2; +#X obj 305 110 receive help-rcv2; +#X text 31 161 "Receive" outputs messages sent via "send." Sends and receives are named to tell them whom to connect to. They work across windows too. Also \, you can use message boxes as shown:; +#X msg 84 233 \; help-rcv1 34 \; help-rcv2 67; +#X obj 161 320 r; +#X obj 21 10 receive; +#X text 79 10 -- receive messages without patch cords; +#X connect 1 0 8 0; +#X connect 2 0 9 0; +#X connect 3 0 10 0; +#X connect 11 0 4 0; +#X connect 12 0 5 0; +#X connect 13 0 6 0; diff --git a/pd/doc/5.reference/route-help.pd b/pd/doc/5.reference/route-help.pd new file mode 100644 index 00000000..224fb0ea --- /dev/null +++ b/pd/doc/5.reference/route-help.pd @@ -0,0 +1,80 @@ +#N canvas 0 0 815 537 12; +#X obj 183 213 print x1; +#X obj 261 213 print x2; +#X obj 339 213 print x3; +#X obj 422 213 print x4; +#X obj 183 185 route 23 54 1; +#X msg 183 155 234 345 456; +#X msg 308 155 23 34 45; +#X msg 414 155 54 43; +#X msg 485 155 1 foo bar; +#X msg 254 247 impeach ringo starr; +#X obj 191 275 route big apple; +#X msg 435 248 apple pie; +#X msg 191 247 1 2 3; +#X msg 523 248 big apple pie; +#X msg 578 155 walk the dog; +#X text 45 33 Route checks the first element of a message against each +of its arguments \, which may be numbers or symbols (but not a mixture +of the two.); +#X text 44 85 If a match is found \, the rest of the message appears +on the corresponding outlet. If no match \, the message is repeated +to the last "rejection" outlet. The number of outlets is the number +of arguments plus one.; +#X text 19 185 numeric arguments:; +#X text 17 275 symbolic arguments:; +#X obj 157 489 print z1; +#X obj 233 489 print z2; +#X msg 124 424 bang; +#X msg 170 424 list; +#X msg 213 424 5; +#X msg 251 424 float 5; +#X msg 320 424 list 5; +#X msg 385 424 symbol pie; +#X msg 560 424 pie; +#X msg 483 424 list pie; +#X msg 70 424 1 2 3; +#X obj 157 461 route list float symbol bang; +#X obj 310 489 print z3; +#X obj 387 489 print z4; +#X obj 461 489 print z5; +#X obj 191 305 print y1; +#X obj 269 305 print y2; +#X obj 347 305 print y3; +#X text 76 344 To avoid confusion between \, say \, the number 5 and +the list contining only the number 5 \, both messages match "float" +\, and ditto for symbols. An empty list matches "bang". In Pd these +are all considered special cases of lists.; +#X text 545 506 updated for Pd version 0.35; +#X text 97 9 - route messages according to their first element; +#X obj 43 8 route; +#X connect 4 0 0 0; +#X connect 4 1 1 0; +#X connect 4 2 2 0; +#X connect 4 3 3 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 4 0; +#X connect 8 0 4 0; +#X connect 9 0 10 0; +#X connect 10 0 34 0; +#X connect 10 1 35 0; +#X connect 10 2 36 0; +#X connect 11 0 10 0; +#X connect 12 0 10 0; +#X connect 13 0 10 0; +#X connect 14 0 4 0; +#X connect 21 0 30 0; +#X connect 22 0 30 0; +#X connect 23 0 30 0; +#X connect 24 0 30 0; +#X connect 25 0 30 0; +#X connect 26 0 30 0; +#X connect 27 0 30 0; +#X connect 28 0 30 0; +#X connect 29 0 30 0; +#X connect 30 0 19 0; +#X connect 30 1 20 0; +#X connect 30 2 31 0; +#X connect 30 3 32 0; +#X connect 30 4 33 0; diff --git a/pd/doc/5.reference/rsqrt~-help.pd b/pd/doc/5.reference/rsqrt~-help.pd new file mode 100644 index 00000000..fb0bc350 --- /dev/null +++ b/pd/doc/5.reference/rsqrt~-help.pd @@ -0,0 +1,32 @@ +#N canvas 183 264 685 375 12; +#X obj 68 211 metro 500; +#X obj 68 186 r metro; +#X msg 575 106 \; metro 0; +#X msg 574 48 \; pd dsp 1 \; metro 1; +#X floatatom 52 112 0 0 0; +#X floatatom 52 268 0 0 0; +#X text 419 349 updated for Pd version 0.33; +#X obj 574 21 loadbang; +#X obj 52 235 snapshot~; +#X floatatom 51 351 9 0 0; +#X obj 51 295 t f f; +#X obj 51 322 *; +#X obj 52 138 sig~; +#X obj 36 16 rsqrt~; +#X text 105 14 - signal reciprocal square root; +#X text 18 45 rsqrt~ takes the approximate reciprocal square root of +the incoming signal \, using a fast \, approximate algorithm which +is probably accurate to about 120 dB (20 bits).; +#X obj 52 162 rsqrt~; +#X connect 0 0 8 0; +#X connect 1 0 0 0; +#X connect 1 0 0 0; +#X connect 4 0 12 0; +#X connect 5 0 10 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 10 0 11 0; +#X connect 10 1 11 1; +#X connect 11 0 9 0; +#X connect 12 0 16 0; +#X connect 16 0 8 0; diff --git a/pd/doc/5.reference/samphold~-help.pd b/pd/doc/5.reference/samphold~-help.pd new file mode 100644 index 00000000..1a58bd02 --- /dev/null +++ b/pd/doc/5.reference/samphold~-help.pd @@ -0,0 +1,34 @@ +#N canvas 121 54 554 287 10; +#X obj 32 238 snapshot~; +#X floatatom 32 257; +#X obj 41 219 metro 100; +#X obj 41 197 r start; +#X msg 387 21 \; pd dsp 1 \; start bang; +#X text 392 270 updated for version 0.29; +#X text 454 30 Click to start; +#X text 447 78 Click to stop; +#X msg 388 65 \; pd dsp 0 \; start 0; +#X obj 19 7 samphold~; +#X text 96 6 - sample and hold unit; +#X obj 32 170 samphold~; +#X text 10 26 The samphold~ object samples its left input whenever its right input decreases in value (as a phasor~ does each period \, for example.) Both inputs are audio signals.; +#X obj 67 129 sig~; +#X obj 101 148 sig~; +#X floatatom 67 109; +#X floatatom 101 127; +#X msg 32 66 set 34; +#X msg 38 87 reset; +#X text 81 65 set output to a number; +#X text 81 86 force the next sample; +#X text 97 109 sample signal; +#X text 135 127 control signal; +#X connect 0 0 1 0; +#X connect 2 0 0 0; +#X connect 3 0 2 0; +#X connect 11 0 0 0; +#X connect 13 0 11 0; +#X connect 14 0 11 1; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 17 0 11 0; +#X connect 18 0 11 0; diff --git a/pd/doc/5.reference/savepanel-help.pd b/pd/doc/5.reference/savepanel-help.pd new file mode 100644 index 00000000..b5d7e7a6 --- /dev/null +++ b/pd/doc/5.reference/savepanel-help.pd @@ -0,0 +1,12 @@ +#N canvas 9 118 567 234 12; +#X msg 102 92 bang; +#X obj 102 145 print; +#X text 295 199 updated for Pd version 0.24; +#X text 28 192 see also:; +#X text 16 35 When Savepanel gets a "bang" a "Save As" file browser appears on the screen \, If you choose a filename \, it appears on the outlet.; +#X obj 102 120 savepanel; +#X obj 115 191 openpanel; +#X obj 19 7 savepanel; +#X text 104 6 - query you for the name of a file to create; +#X connect 0 0 5 0; +#X connect 5 0 1 0; diff --git a/pd/doc/5.reference/select-help.pd b/pd/doc/5.reference/select-help.pd new file mode 100644 index 00000000..6bc17ad7 --- /dev/null +++ b/pd/doc/5.reference/select-help.pd @@ -0,0 +1,73 @@ +#N canvas 47 29 618 662 12; +#X floatatom 22 332 0 0 0; +#X msg 156 120 6; +#X msg 119 120 234; +#X floatatom 119 150 0 0 0; +#X msg 121 301 1; +#X msg 89 301 54; +#X obj 22 392 print x1; +#X obj 100 391 print x2; +#X msg 58 301 23; +#X msg 22 302 234; +#X msg 65 120 6; +#X obj 28 180 select 6; +#X msg 28 120 234; +#X obj 28 210 print x1; +#X obj 107 211 print x2; +#X obj 177 391 print x3; +#X obj 255 392 print x4; +#X floatatom 28 150 0 0 0; +#X obj 22 362 select 23 54 1; +#X text 45 609 abbreviation:; +#X obj 169 610 sel; +#X text 20 37 In its simplest form shown below \, Select checks its input agains the constant "6". If they match \, the first outlet gives "bang" and otherwise the input is copied to the second outlet. If Select is used with a single argument \, a second inlet allows you to change the test value.; +#X text 22 239 You can give several arguments. You get an outlet for each test value and finally an outlet for values which match none of them. In this case you don't get inlets to change the test values:; +#X obj 32 566 print x1; +#X obj 114 567 print x2; +#X msg 34 451 symbol cort; +#X msg 46 476 symbol zack; +#X msg 178 476 symbol cort; +#X msg 184 501 symbol zack; +#X obj 34 539 select cort; +#X msg 308 462 symbol cort; +#X msg 415 462 symbol zack; +#X obj 308 551 print x1; +#X obj 385 551 print x2; +#X obj 308 521 select cort zack; +#X obj 462 551 print x3; +#X msg 413 487 symbol bill; +#X text 24 426 Select can also be used to sort symbols:; +#X text 83 637 see also:; +#X obj 175 639 route; +#X obj 32 10 select; +#X text 92 10 - compare numbers or symbols; +#X text 370 629 updated for Pd version 0.33; +#X connect 0 0 18 0; +#X connect 1 0 3 0; +#X connect 2 0 3 0; +#X connect 3 0 11 1; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 8 0 0 0; +#X connect 9 0 0 0; +#X connect 10 0 17 0; +#X connect 11 0 13 0; +#X connect 11 1 14 0; +#X connect 12 0 17 0; +#X connect 17 0 11 0; +#X connect 18 0 6 0; +#X connect 18 1 7 0; +#X connect 18 2 15 0; +#X connect 18 3 16 0; +#X connect 25 0 29 0; +#X connect 26 0 29 0; +#X connect 27 0 29 1; +#X connect 28 0 29 1; +#X connect 29 0 23 0; +#X connect 29 1 24 0; +#X connect 30 0 34 0; +#X connect 31 0 34 0; +#X connect 34 0 32 0; +#X connect 34 1 33 0; +#X connect 34 2 35 0; +#X connect 36 0 34 0; diff --git a/pd/doc/5.reference/send-help.pd b/pd/doc/5.reference/send-help.pd new file mode 100644 index 00000000..f8d44a85 --- /dev/null +++ b/pd/doc/5.reference/send-help.pd @@ -0,0 +1,26 @@ +#N canvas 257 45 511 351 12; +#X text 278 321 updated for Pd version 0.32; +#X obj 21 10 send; +#X text 60 11 -- send messages without patch cords; +#X obj 36 80 send help-send1; +#X obj 152 81 send help-send1; +#X obj 271 81 send help-send2; +#X obj 38 110 receive help-send1; +#X obj 171 110 receive help-send2; +#X obj 305 110 receive help-send2; +#X floatatom 36 55 5 0 0; +#X floatatom 152 58 5 0 0; +#X floatatom 272 57 5 0 0; +#X floatatom 38 134 5 0 0; +#X floatatom 171 136 5 0 0; +#X floatatom 305 134 5 0 0; +#X obj 161 320 s; +#X text 62 321 abbreviation:; +#X text 31 161 "Send" sends messages to "receive" objects. Sends and receives are named to tell them whom to connect to. They work across windows too. Also \, you can use message boxes as shown:; +#X msg 84 233 \; help-send1 34 \; help-send2 67; +#X connect 6 0 12 0; +#X connect 7 0 13 0; +#X connect 8 0 14 0; +#X connect 9 0 3 0; +#X connect 10 0 4 0; +#X connect 11 0 5 0; diff --git a/pd/doc/5.reference/send~-help.pd b/pd/doc/5.reference/send~-help.pd new file mode 100644 index 00000000..5c9db395 --- /dev/null +++ b/pd/doc/5.reference/send~-help.pd @@ -0,0 +1,32 @@ +#N canvas 31 28 678 406 12; +#X floatatom 344 238 0 0 0; +#X obj 344 189 receive~ signal1; +#X obj 17 215 send~ signal1; +#X obj 17 192 sig~ 50; +#X obj 344 213 snapshot~; +#X obj 42 22 send~; +#X obj 94 23 receive~; +#X text 178 23 - one-to-many nonlocal signal connections; +#X obj 507 133 loadbang; +#X obj 507 194 metro 200; +#X msg 517 155 \; pd dsp 1; +#X floatatom 18 168 4 0 0; +#X text 48 51 A send~ object copies its input to a local buffer which all receive~ objects of the same name read from. They may be in different windows or even different patches. Any number of receives may be associated with one send~ but it is an error to have two send~s of the same name.; +#X obj 179 344 tabreceive~; +#X text 405 368 updated for Pd version 0.33.; +#X obj 148 187 sig~ 25; +#X obj 148 215 send~ signal2; +#X msg 355 139 set signal2; +#X msg 356 161 set signal1; +#X text 34 287 Send~/Receive~ only work for the default block size (64) \; for FFT applications see also:; +#X text 35 262 Receive~ takes "set" messages to switch between send~s.; +#X connect 1 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X connect 8 0 9 0; +#X connect 8 0 10 0; +#X connect 9 0 4 0; +#X connect 11 0 3 0; +#X connect 15 0 16 0; +#X connect 17 0 1 0; +#X connect 18 0 1 0; diff --git a/pd/doc/5.reference/set-help.pd b/pd/doc/5.reference/set-help.pd new file mode 100644 index 00000000..227b29b4 --- /dev/null +++ b/pd/doc/5.reference/set-help.pd @@ -0,0 +1,45 @@ +#N struct help-set-template1 float x float y; +#N canvas 300 3 583 365 12; +#X text 19 263 see also:; +#X obj 137 308 template; +#X obj 112 284 append; +#X obj 170 284 getsize; +#X obj 237 284 setsize; +#X obj 215 308 element; +#X obj 11 308 sublist; +#X obj 78 308 scalar; +#X msg 210 155 next; +#X obj 21 10 get; +#X floatatom 19 173 5 0 0; +#X floatatom 108 181 5 0 0; +#X obj 196 180 pointer; +#X text 273 113 output first scalar in list; +#X text 256 155 output next item; +#X text 262 204 First argument selects template.; +#X text 263 219 Remaining args are names of fields.; +#X obj 11 283 pointer; +#X msg 196 131 traverse pd-help-set-data \, next; +#N canvas 0 0 276 122 help-set-data 1; +#X scalar help-set-template1 39 23 \;; +#X scalar help-set-template1 99 73 \;; +#X restore 377 244 pd help-set-data; +#N canvas 164 72 425 146 help-set-template1 0; +#X obj 41 87 filledpolygon 9 0 1 0 0 20 0 20 30 0 30; +#X obj 60 21 template float x float y; +#X restore 377 266 pd help-set-template1; +#X text 86 10 -- set values in a scalar; +#X obj 19 204 set help-set-template1 x y; +#X text 18 155 x value; +#X text 106 162 y value; +#X obj 79 283 get; +#X text 19 32 "Set" takes a pointer to a scalar in its rightmost inlet +\; the remaining inlets set numeric values of fields. Only the leftmost +inlet is "hot". You can't "set" arrays or sublists. Instead \, you +can get pointers into them using "element" and "sublist" (probably +not working yet) and set individual items.; +#X text 336 342 updated for Pd version 0.35; +#X connect 8 0 12 0; +#X connect 10 0 22 0; +#X connect 11 0 22 1; +#X connect 12 0 22 2; +#X connect 18 0 12 0; diff --git a/pd/doc/5.reference/setsize-help.pd b/pd/doc/5.reference/setsize-help.pd new file mode 100644 index 00000000..ce68f5fc --- /dev/null +++ b/pd/doc/5.reference/setsize-help.pd @@ -0,0 +1,54 @@ +#N struct help-setsize-template float x float y array array1 help-setsize-array1-template +; +#N struct help-setsize-array1-template float y; +#N canvas 331 45 678 459 12; +#X text 31 359 see also:; +#X obj 28 379 template; +#N canvas 393 10 491 261 help-setsize-template 0; +#X obj 27 174 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10; +#X obj 24 16 template float x float y array array1 help-setsize-array1-template +; +#X obj 27 76 plot array1 500 1 10 15 10; +#X restore 364 261 pd help-setsize-template; +#N canvas 0 0 295 165 help-setsize-data 1; +#X scalar help-setsize-template 31 23 \; 0 \; 10 \; 0 \; 10 \; 20 \; +10 \; 20 \; 70 \; 10 \; \;; +#X restore 363 240 pd help-setsize-data; +#N canvas 196 292 365 134 help-setsize-array1-template 0; +#X obj 30 71 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5; +#X obj 32 27 template float y; +#X restore 363 284 pd help-setsize-array1-template; +#X obj 107 379 pointer; +#X obj 242 379 setsize; +#X obj 272 186 pointer; +#X msg 272 162 traverse pd-help-setsize-data \, next; +#X floatatom 25 189 5 0 0; +#X text 359 210 arguments: template \, field name; +#X obj 25 213 setsize help-setsize-template array1; +#X text 115 183 inlet for pointer; +#X obj 36 11 setsize; +#X obj 174 379 element; +#X text 31 156 number sets; +#X text 30 170 size; +#X text 99 12 -- resize an array; +#X text 25 34 "setsize" takes a pointer to a scalar at left and a number +at right. Its creation arguments specify the template of the pointer +and the name of an array field. Sending a number then sets the number +of elements of the array.; +#X text 24 93 The smallest possible size is one. If the array is resized +downward the extra data are lost. If resized upward \, the new elements +are initialized to default values.; +#X msg 566 335 bang; +#X text 297 333 click to reload from file -->; +#X text 274 143 click here first; +#N canvas 460 63 435 172 readit 1; +#X msg 66 65 \; pd-help-setsize-data read setsize.txt; +#X obj 107 18 inlet; +#X msg 62 123 \; pd-help-setsize-data write setsize.txt; +#X connect 1 0 0 0; +#X restore 566 361 pd readit; +#X text 416 395 updated for Pd version 0.35; +#X connect 7 0 11 1; +#X connect 8 0 7 0; +#X connect 9 0 11 0; +#X connect 20 0 23 0; diff --git a/pd/doc/5.reference/sigbinops-help.pd b/pd/doc/5.reference/sigbinops-help.pd new file mode 100644 index 00000000..b461c846 --- /dev/null +++ b/pd/doc/5.reference/sigbinops-help.pd @@ -0,0 +1,60 @@ +#N canvas 18 67 1086 595 10; +#X obj 8 251 +~; +#X obj 115 249 -~; +#X obj 222 249 *~; +#X obj 327 251 /~; +#X obj 38 17 +~; +#X obj 73 17 -~; +#X obj 106 16 *~; +#X obj 140 16 /~; +#X graph graph1 0 -1 100 1 678 446 1078 146; +#X array array1 100 float; +#X pop; +#X obj 327 293 tabwrite~ array1; +#X obj 8 293 tabwrite~ array1; +#X obj 115 293 tabwrite~ array1; +#X obj 222 293 tabwrite~ array1; +#X text 266 14 -- operators on audio signals; +#X obj 8 160 osc~ 440; +#X obj 480 157 osc~ 675; +#X msg 17 271 bang; +#X obj 173 15 max~; +#X obj 207 15 min~; +#X text 487 458 modified for Pd version 0.27; +#X obj 536 293 tabwrite~ array1; +#X obj 431 293 tabwrite~ array1; +#X obj 431 249 max~; +#X obj 536 251 min~; +#X msg 127 272 bang; +#X msg 233 271 bang; +#X msg 343 272 bang; +#X msg 443 271 bang; +#X msg 553 272 bang; +#X text 52 332 The binary signal operators can be configured to combine two signals as above \, or \, if you give a numeric argument \, audio signals are combined with scalars:; +#X obj 204 377 +~ 5; +#X text 60 406 The right inlet takes audio signals or numbers depending on whether the argument is present or not.; +#X msg 68 71 \; pd dsp 1; +#X connect 0 0 10 0; +#X connect 1 0 11 0; +#X connect 2 0 12 0; +#X connect 3 0 9 0; +#X connect 14 0 0 0; +#X connect 14 0 1 0; +#X connect 14 0 3 0; +#X connect 14 0 2 0; +#X connect 14 0 22 0; +#X connect 14 0 23 0; +#X connect 15 0 3 1; +#X connect 15 0 2 1; +#X connect 15 0 1 1; +#X connect 15 0 0 1; +#X connect 15 0 22 1; +#X connect 15 0 23 1; +#X connect 16 0 10 0; +#X connect 22 0 21 0; +#X connect 23 0 20 0; +#X connect 24 0 11 0; +#X connect 25 0 12 0; +#X connect 26 0 9 0; +#X connect 27 0 21 0; +#X connect 28 0 20 0; diff --git a/pd/doc/5.reference/sig~-help.pd b/pd/doc/5.reference/sig~-help.pd new file mode 100644 index 00000000..72781487 --- /dev/null +++ b/pd/doc/5.reference/sig~-help.pd @@ -0,0 +1,20 @@ +#N canvas 132 175 547 284 12; +#X obj 109 221 snapshot~; +#X floatatom 110 246 0 0 0; +#X obj 78 12 sig~; +#X obj 24 133 sig~; +#X floatatom 24 108 0 0 0; +#X text 114 14 - convert numbers to audio signal; +#X text 11 53 In this example \, the sig~ object converts numbers to an audio signal \, which the snapshot~ converts back again.; +#X text 64 108 <-- Scroll to set value; +#X obj 109 131 loadbang; +#X msg 118 155 \; pd dsp 1; +#X obj 109 195 metro 200; +#X text 291 249 updated for Pd version 0.33; +#X connect 0 0 1 0; +#X connect 0 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 8 0 9 0; +#X connect 8 0 10 0; +#X connect 10 0 0 0; diff --git a/pd/doc/5.reference/snapshot~-help.pd b/pd/doc/5.reference/snapshot~-help.pd new file mode 100644 index 00000000..468eb678 --- /dev/null +++ b/pd/doc/5.reference/snapshot~-help.pd @@ -0,0 +1,33 @@ +#N canvas 85 46 661 400 12; +#X obj 19 316 snapshot~; +#X floatatom 19 339 0 0 0 0 - - -; +#X obj 74 14 snapshot~; +#X msg 30 264 bang; +#X text 112 342 This output updates each time bang is clicked above. +; +#X text 154 14 - convert a signal to a number on demand; +#X text 9 46 The snapshot~ object takes a signal and converts it to +a control value whenever it receives a bang in its left outlet. This +object is particularly useful for monitoring outputs.; +#X msg 565 43 \; pd dsp 1; +#X obj 565 20 loadbang; +#X obj 19 239 osc~ 0.1; +#X text 24 221 0.1 Hz cosine; +#X text 397 373 updated for Pd version 0.37; +#X msg 35 288 set 5; +#X text 102 239 signal in to take snapshots of; +#X text 73 263 bang -- take one snapshot; +#X text 89 288 set -- set value (which is reset next DSP block.); +#X msg 565 85 \; pd dsp 0; +#X text 11 109 In the example below \, a snapshot~ object prints out +the values of a low frequency cosine wave every time it is sent a bang +message.; +#X text 12 161 A 'set' message is provided for the (rare) situations +where you might make a known change to the signal input \, and then +read snapshot's value before any ensuing signal computation.; +#X connect 0 0 1 0; +#X connect 0 0 1 0; +#X connect 3 0 0 0; +#X connect 8 0 7 0; +#X connect 9 0 0 0; +#X connect 12 0 0 0; diff --git a/pd/doc/5.reference/soundfiler-help.pd b/pd/doc/5.reference/soundfiler-help.pd new file mode 100644 index 00000000..515f102b --- /dev/null +++ b/pd/doc/5.reference/soundfiler-help.pd @@ -0,0 +1,67 @@ +#N canvas 59 252 1102 576 12; +#N canvas 0 0 450 300 graph1 0; +#X array array1 77971 float 0; +#X coords 0 1 77971 -1 300 100 1; +#X restore 71 353 graph; +#N canvas 0 0 450 300 graph1 0; +#X array array2 77971 float 0; +#X coords 0 1 77971 -1 300 100 1; +#X restore 71 459 graph; +#X obj 11 313 soundfiler; +#X msg 17 241 write -aiff /tmp/foo1 array2; +#X msg 8 152 read ../sound/bell.aiff array2; +#X msg 17 199 read -raw 128 2 2 b ../sound/bell.aiff array1 array2 +; +#X text 26 10 SOUNDFILER - read and write soundfiles to arrays; +#X text 548 3 When reading you can leave soundfiler to figure out which +of the three known soundfile formats the file belongs to or override +all header information using the "-raw" flag.; +#X text 665 52 Flags for reading:; +#X text 574 68 -skip <sample frames to skip in file>; +#X text 574 87 -nframes <maximum number of sample frames to read>; +#X text 575 143 -raw <headersize> <channels> <bytespersample> <endianness> +; +#X text 594 161 This causes all header information to be ignored. Endianness +is "l" ("little") for Intel machines or "b" ("big") for Macintoshes +and SGIs. You can give "n" (natural) to take the byte order your machine +prefers.; +#X text 575 106 -resize; +#X text 575 124 -maxsize <maximum number of samples we can resize to> +; +#X text 560 226 Flags for writing:; +#X text 575 247 -wave \, -nextstep \, -aiff; +#X text 576 266 -big \, -little (nextstep only!); +#X text 575 288 -skip <number of sample frames to skip in array>; +#X text 576 310 -nframes <maximum number to write>; +#X text 577 354 -normalize; +#X text 576 332 -bytes <2 \, 3 \, or 4>; +#X floatatom 11 337 0 0 0 0 - - -; +#X msg 15 175 read -resize ../sound/bell.aiff array2; +#X text 751 539 updated for Pd version 0.29; +#X msg 17 288 write -nextstep -bytes 4 /tmp/foo3 array1 array2; +#X msg 16 265 write -wave -nframes 10000 /tmp/foo2 array2; +#X text 287 150 read a file; +#X text 362 173 ...optionally resize; +#X text 225 217 ...or even overriding everything; +#X text 283 240 write a file; +#X text 352 309 write stereo; +#X text 560 385 The number of channels is limited to 64; +#X text 612 433 see also:; +#X obj 606 456 tabwrite~; +#X obj 607 480 tabread4~; +#X obj 713 435 tabplay~; +#X obj 711 484 writesf~; +#X obj 712 461 readsf~; +#X text 9 31 The soundfiler object reads and writes floating point +arrays to binary soundfiles which may contain 2 or 3 byte fixed point +or 4 byte floating point samples in wave \, aiff \, or next formats +(no floating point aiff \, though.). The number of channels of the +soundfile need not match the number of arrays given (extras are dropped +and unsupplied channels are zeroed out.); +#X connect 2 0 22 0; +#X connect 3 0 2 0; +#X connect 4 0 2 0; +#X connect 5 0 2 0; +#X connect 23 0 2 0; +#X connect 25 0 2 0; +#X connect 26 0 2 0; diff --git a/pd/doc/5.reference/spigot-help.pd b/pd/doc/5.reference/spigot-help.pd new file mode 100644 index 00000000..3daf9157 --- /dev/null +++ b/pd/doc/5.reference/spigot-help.pd @@ -0,0 +1,21 @@ +#N canvas 349 223 586 335 12; +#X msg 25 157 0.5 1000; +#X floatatom 74 242 1 0 0; +#X obj 25 267 spigot; +#X obj 25 300 print; +#X msg 38 210 walk the cat; +#X msg 31 182 bang; +#X obj 35 11 spigot; +#X text 100 12 - pass or block messages; +#X text 99 242 control: nonzero to pass messages \, zero to stop them +; +#X text 333 303 updated for Pd version 0.33; +#X text 35 63 Spigot passes messages from its left inlet to its outlet +\, as long as a nonzero number is sent to its right inlet. When its +right inlet gets zero \, incoming messages are "blocked \, " i.e. \, +ignored.; +#X connect 0 0 2 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 4 0 2 0; +#X connect 5 0 2 0; diff --git a/pd/doc/5.reference/sqrt~-help.pd b/pd/doc/5.reference/sqrt~-help.pd new file mode 100644 index 00000000..b7b8e1a4 --- /dev/null +++ b/pd/doc/5.reference/sqrt~-help.pd @@ -0,0 +1,32 @@ +#N canvas 182 132 778 399 12; +#X obj 71 201 metro 500; +#X obj 71 176 r metro; +#X msg 575 106 \; metro 0; +#X msg 574 48 \; pd dsp 1 \; metro 1; +#X floatatom 55 102 0 0 0; +#X floatatom 55 258 0 0 0; +#X text 470 371 updated for Pd version 0.33; +#X obj 574 21 loadbang; +#X obj 36 16 sqrt~; +#X text 88 18 - signal square root; +#X obj 55 152 sqrt~; +#X obj 55 225 snapshot~; +#X floatatom 54 341 9 0 0; +#X obj 54 285 t f f; +#X obj 54 312 *; +#X obj 55 128 sig~; +#X text 18 45 sqrt~ takes the approximate square root of the incoming +signal \, using a fast \, approximate algorithm which is probably accurate +to about 120 dB (20 bits).; +#X connect 0 0 11 0; +#X connect 1 0 0 0; +#X connect 1 0 0 0; +#X connect 4 0 15 0; +#X connect 5 0 13 0; +#X connect 7 0 3 0; +#X connect 10 0 11 0; +#X connect 11 0 5 0; +#X connect 13 0 14 0; +#X connect 13 1 14 1; +#X connect 14 0 12 0; +#X connect 15 0 10 0; diff --git a/pd/doc/5.reference/stripnote-help.pd b/pd/doc/5.reference/stripnote-help.pd new file mode 100644 index 00000000..80a8cecb --- /dev/null +++ b/pd/doc/5.reference/stripnote-help.pd @@ -0,0 +1,16 @@ +#N canvas 53 36 458 251 10; +#X msg 39 100 23 0; +#X obj 39 175 print x1; +#X obj 96 175 print x2; +#X obj 39 139 stripnote; +#X msg 79 100 34.5 67.8; +#X obj 65 214 makenote; +#X text 83 12 - send note-on messages and schedule note-off for later; +#X text 283 220 updated for Pd version 0.28; +#X text 10 214 see also; +#X obj 23 10 stripnote; +#X text 17 44 Stripnote takes note-off (zero-velocity) messages out of a stream of MIDI-style note message and passes the others through unchanged.; +#X connect 0 0 3 0; +#X connect 3 0 1 0; +#X connect 3 1 2 0; +#X connect 4 0 3 0; diff --git a/pd/doc/5.reference/struct-help.pd b/pd/doc/5.reference/struct-help.pd new file mode 100644 index 00000000..a18fa6e9 --- /dev/null +++ b/pd/doc/5.reference/struct-help.pd @@ -0,0 +1,26 @@ +#N canvas 343 45 557 321 12; +#X text 88 11 -- declare the fields in a data structure.; +#N canvas 345 476 638 171 help-template1 0; +#X obj 60 21 struct struct-1 float x float y symbol dog array weasel +struct-2; +#X text 40 76 In this example \, the "struct-1" structure is defined +in which "x" and "y" are "floats" \, i.e. \, numbers \, but "dog" is +a symbol and "weasel" is an array of objects of structure "struct-2". +; +#X restore 324 156 pd help-template1; +#N canvas 10 274 588 157 help-template2 0; +#X text 28 95 Here is one which specifies only the floating point "y" +\; it's used for the elements of the array shown in the other template. +; +#X obj 60 21 struct struct-2 float y; +#X restore 324 183 pd help-template2; +#X obj 36 215 drawpolygon; +#X text 36 195 see also:; +#X obj 141 215 drawnumber; +#X obj 236 216 plot; +#X text 281 290 updated for Pd version 0.35; +#X obj 21 10 struct; +#X text 16 49 There should be one "struct" object in each Pd window +you are using as a data structure template. The arguments specify the +types and names of the fields \; and for array fields \, a third argument +specifies the template that the array elements should belong to.; diff --git a/pd/doc/5.reference/sublist-help.pd b/pd/doc/5.reference/sublist-help.pd new file mode 100644 index 00000000..a3067d5a --- /dev/null +++ b/pd/doc/5.reference/sublist-help.pd @@ -0,0 +1,10 @@ +#N canvas 252 0 559 226 12; +#X text 311 181 updated for Pd version 0.32; +#X obj 21 10 sublist; +#X text 86 10 -- get a list from a field of a scalar; +#X text 31 37 Don't try this yet -- it's untested.; +#X text 36 89 "sublist" will take as creation arguments a template +name and a field name \; its one input takes a pointer. If you send +a pointer (which should agree with the template name) \, "sublist" +will output the field (which should be of type "list".) The output +is in fact a pointer to the head of the sublist.; diff --git a/pd/doc/5.reference/swap-help.pd b/pd/doc/5.reference/swap-help.pd new file mode 100644 index 00000000..987a5844 --- /dev/null +++ b/pd/doc/5.reference/swap-help.pd @@ -0,0 +1,20 @@ +#N canvas 376 130 488 326 12; +#X msg 67 124 bang; +#X floatatom 67 252; +#X floatatom 79 154; +#X floatatom 118 194; +#X obj 66 15 swap; +#X text 114 16 - SWAP TWO NUMBERS \, RESPECTING RIGHT-TO-LEFT ORDER; +#X text 284 309 updated for Pd version 0.27; +#X text 12 42 The swap object stores numbers from its left inlet to output on its right inlet -- after repeating its right hand input out the left.; +#X text 112 123 outputs 2 stored values; +#X obj 67 226 swap 6.5; +#X text 110 154 sets second value and outputs both; +#X text 150 195 sets first value; +#X text 142 226 creation argument initializes first value; +#X floatatom 118 254; +#X connect 0 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 9 1; +#X connect 9 0 1 0; +#X connect 9 1 13 0; diff --git a/pd/doc/5.reference/switch~-help.pd b/pd/doc/5.reference/switch~-help.pd new file mode 100644 index 00000000..c3ab8797 --- /dev/null +++ b/pd/doc/5.reference/switch~-help.pd @@ -0,0 +1,45 @@ +#N canvas 218 166 619 368 12; +#X msg 382 133 \; metro 0; +#X text 462 92 <-Click to start; +#X text 455 137 <-Click to stop; +#X text 47 13 switch and block - turn DSP on and off for subpatches +and control block size; +#N canvas 15 32 598 301 switched 1; +#X obj 265 148 switch~; +#X floatatom 265 121 1 0 0; +#X floatatom 75 168 4 0 0; +#X obj 75 104 noise~; +#X obj 75 136 env~ 512; +#X text 25 26 DSP in this subwindow is turned on and off by the switch~ +object. Any subwindows of this window can also be switched off here. +If a patch and a superpatch both have switches \, both must be "on" +for DSP to run in the patch.; +#X text 32 203 switch~ takes optional arguments the same as block~. +If you supply arguments to switch \, the patch will be switched AND +reblocked.; +#X text 31 258 Only one switch~ or block~ may appear in any window. +; +#X connect 1 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X restore 139 124 pd switched; +#N canvas 13 421 564 200 blocked 1; +#X obj 184 35 block~ 1024 4; +#X text 14 76 This object specified that DSP in this subwindow is to +be computed at a block size of 1024 \, and an overlap of 4 \, i.e. +\, every 256 samples. You may not (yet) specify a block size smaller +than your superpatch. This is useful for writing FFT based patches +(see the "fft examples" tutorial series.); +#X restore 141 158 pd blocked; +#X msg 382 87 \; pd dsp 1; +#X obj 382 61 loadbang; +#X text 38 82 see the subpatches for explanation:; +#X text 362 334 updated for Pd version 0.34; +#X text 34 195 BUG! -- dac~ and adc~ work only with a blocksize of +64 If you want to reblock audio computation \, do so in a sub-patch +and keep the adc~ and dac~ objects in a super-patch. Also \, you can't +send~ or receive~ between windows with different block sizes or overlapping. +Only the inlet~ and outlet~ objects know how to reblock signals. In +this example \, you could put a dac~ in this \, outer window \, or +in the switched subwindow \, but not the blocked one.; +#X connect 7 0 6 0; diff --git a/pd/doc/5.reference/tabosc4~-help.pd b/pd/doc/5.reference/tabosc4~-help.pd new file mode 100644 index 00000000..ada694e1 --- /dev/null +++ b/pd/doc/5.reference/tabosc4~-help.pd @@ -0,0 +1,86 @@ +#N canvas 307 35 742 511 12; +#X floatatom 66 450 0 0 0; +#N canvas 159 26 495 270 output 0; +#X obj 414 196 t b; +#X obj 414 134 f; +#X obj 414 73 inlet; +#X text 421 36 mute; +#X obj 414 227 f; +#X msg 521 218 0; +#X msg 414 104 bang; +#X obj 414 166 moses 1; +#X obj 521 187 t b f; +#X obj 486 143 moses 1; +#X obj 102 181 dbtorms; +#X obj 486 113 r master-lvl; +#X obj 102 52 r master-lvl; +#X obj 414 257 s master-lvl; +#X obj 26 222 inlet~; +#X obj 244 50 inlet; +#X text 244 22 level; +#X obj 244 122 s master-lvl; +#X msg 118 80 set \$1; +#X obj 118 109 outlet; +#X msg 262 78 \; pd dsp 1; +#X obj 102 238 line~; +#X obj 26 259 *~; +#X obj 26 295 dac~; +#X obj 102 210 pack 0 50; +#X text 24 195 audio; +#X text 114 135 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 32 476 pd output; +#X msg 102 450 MUTE; +#X text 148 449 <--- volume in dB; +#X floatatom 32 296 4 0 0; +#X obj 32 326 sig~ 100; +#X obj 547 52 table table1; +#X obj 547 80 table table2; +#X msg 372 287 \; table1 sinesum 512 0.5 0.5 0.5 0.5 \; table2 cosinesum 512 0 1; +#X text 433 474 Updated for Pd version 0.33; +#X obj 20 11 tabosc4~; +#X text 110 12 4-point interpolating oscillator; +#X msg 52 372 set table1; +#X obj 32 413 tabosc4~ table1; +#X msg 156 372 set table2; +#X text 372 343 click above \, start DSP \, and turn output; +#X text 372 361 volume up to hear this; +#X text 14 40 tabosc4~ is a traditional computer music style wavetable lookup oscillator using 4-point polynomial interpolation. The table should have a poiwer of two points plus three "guard points" \, one at the beginning and two at the end \, which should be wraparound copies of the last point and the first two points \, respectively. The "sinesum" and "cosinesum" methods for arrays do this automatically for you if you just want to specify partial strengths.; +#X text 14 178 For good results use 512 points for up to about 15 partials \, or 32*npartials (rounded up to a power of 2) for more than 15; +#X floatatom 275 391 4 0 0; +#X text 12 233 Don't send new "sinesum" messages to tables while you're running -- instead \, use "set" messages to switch between tables.; +#X text 80 298 signal input for frequency (Hz.); +#X text 46 349 message to switch tables; +#X text 325 391 inlet to reset phase; +#X text 166 414 creation argument initializes table; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 5 0; +#X connect 5 0 13 0; +#X connect 12 0 13 0; +#X connect 13 0 1 0; +#X connect 14 0 13 0; +#X connect 19 0 13 1; diff --git a/pd/doc/5.reference/tabplay~-help.pd b/pd/doc/5.reference/tabplay~-help.pd new file mode 100644 index 00000000..92cdb81e --- /dev/null +++ b/pd/doc/5.reference/tabplay~-help.pd @@ -0,0 +1,66 @@ +#N canvas 28 13 707 471 10; +#X msg 639 93 \; pd dsp 0; +#X graph graph1 0 -1 155948 1 428 369 678 169; +#X array array99 155948 float 0; +#X pop; +#X floatatom 11 342 0 0 0; +#X msg 11 109 set array99; +#X text 93 109 "set" message permits you to switch between arrays; +#X text 128 228 creation argument initializes array name; +#X text 5 392 see also the "array" tutorial in section 2 of the Pd +documentation \, and these objects:; +#X obj 6 438 tabwrite~; +#X obj 140 439 tabread; +#X obj 194 439 tabwrite; +#X obj 254 439 tabsend~; +#X obj 315 439 tabreceive~; +#X obj 41 13 tabplay~; +#X text 108 14 play a table as a sample (non-transposing); +#X obj 11 228 tabplay~ array99; +#X obj 452 82 soundfiler; +#X msg 452 48 read -resize ../sound/bell.aiff array99 \; pd dsp 1 \; +; +#X floatatom 452 104 0 0 0; +#X obj 11 316 env~ 16384; +#X obj 396 439 soundfiler; +#X obj 73 439 tabread4~; +#X obj 87 360 dac~ 1; +#X obj 87 323 *~; +#X obj 100 304 line~; +#X msg 100 263 0.1 100; +#X msg 116 284 0 100; +#X text 162 264 on; +#X text 157 283 off; +#X text 148 301 envelope; +#X text 148 312 generator; +#X text 101 248 amplitude controls:; +#X text 131 362 audio output; +#X obj 87 342 hip~ 5; +#X msg 26 179 0 44100; +#X msg 27 158 44100; +#X msg 26 138 bang; +#X text 475 449 updated for Pd version 0.29; +#X text 29 43 The tabplay~ object plays a sample \, or part of one +\, with no transposition or interpolation. It is cheaper than tabread4~ +and there are none of tabread4~'s interpolation artifacts.; +#X text 509 25 click here to load table; +#X text 80 136 "bang" or 0 plays whole sample; +#X text 82 157 play starting at 44100th sample; +#X text 93 177 play starting at beginning for 44100 samples; +#X msg 25 199 44100 1000; +#X text 103 198 play from 44100 through 45099 (1000 samples); +#X connect 3 0 14 0; +#X connect 14 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 16 0 15 0; +#X connect 18 0 2 0; +#X connect 22 0 32 0; +#X connect 23 0 22 1; +#X connect 24 0 23 0; +#X connect 25 0 23 0; +#X connect 32 0 21 0; +#X connect 33 0 14 0; +#X connect 34 0 14 0; +#X connect 35 0 14 0; +#X connect 42 0 14 0; diff --git a/pd/doc/5.reference/tabread-help.pd b/pd/doc/5.reference/tabread-help.pd new file mode 100644 index 00000000..fa671a21 --- /dev/null +++ b/pd/doc/5.reference/tabread-help.pd @@ -0,0 +1,21 @@ +#N canvas 44 26 703 454 12; +#X text 52 181 index; +#X obj 36 9 tabread; +#X obj 15 244 tabread array99; +#X floatatom 15 182 0 0 0; +#X floatatom 15 278 0 0 0; +#X graph graph1 0 0 10 10 362 379 612 179; +#X array array99 10 float; +#X pop; +#X msg 31 56 \; readout 1 \; array99 resize 10 \; array99 bounds 0 0 10 10 \; array99 xlabel -0.5 0 1 2 3 4 5 6 7 8 9 10 \; array99 ylabel -1 0 1 2 3 4 5 6 7 8 9 10 \; array99 0 1 4 2 8 5 6 1 4 2 8; +#X text 60 276 output = array99[index]; +#X text 141 33 click here to initialize; +#X text 159 236 creation argument; +#X text 155 254 gives array name; +#X msg 25 204 set array99; +#X text 137 204 change array name; +#X text 422 407 updated for Pd version 0.33; +#X text 110 8 - read numbers from a table; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 11 0 2 0; diff --git a/pd/doc/5.reference/tabread4~-help.pd b/pd/doc/5.reference/tabread4~-help.pd new file mode 100644 index 00000000..c28f580a --- /dev/null +++ b/pd/doc/5.reference/tabread4~-help.pd @@ -0,0 +1,43 @@ +#N canvas 59 33 814 475 10; +#X obj 11 228 tabread4~ array99; +#X text 21 207 signal input x(n); +#X msg 727 51 \; pd dsp 0; +#X graph graph1 0 -1 9 1 514 373 764 173; +#X array array99 10 float 0; +#X pop; +#X text 127 21 4-point-interpolating table lookup; +#X obj 11 316 snapshot~; +#X obj 30 290 metro 200; +#X obj 11 124 sig~; +#X floatatom 11 98 0 0 0; +#X obj 30 264 r readout; +#X floatatom 11 342 0 0 0; +#X msg 452 50 \; readout 1 \; array99 resize 10 \; array99 0 -0.5 -0.5 +-0.5 0.5 0.5 0.5 \; pd dsp 1 \;; +#X text 49 94 incoming signal is index. Indices should range from 1 +to (size-2) so that the 4-point interpolation is meaningful. You can +shift-drag the number box to see the effect of interpolation.; +#X msg 34 158 set array99; +#X text 116 158 "set" message permits you to switch between arrays +; +#X text 139 228 creation argument initializes array name; +#X text 5 392 see also the "array" tutorial in section 2 of the Pd +documentation \, and these objects:; +#X obj 47 21 tabread4~; +#X text 509 27 click here to test; +#X obj 12 442 tabwrite~; +#X obj 157 442 tabread; +#X obj 216 442 tabwrite; +#X obj 281 442 tabsend~; +#X obj 346 442 tabreceive~; +#X text 7 58 Tabread4~ is used to build samplers and other table lookup +algorithms. The interpolation scheme is 4-point polynomial.; +#X text 616 460 updated for Pd version 0.29; +#X obj 83 442 tabplay~; +#X connect 0 0 5 0; +#X connect 5 0 10 0; +#X connect 6 0 5 0; +#X connect 7 0 0 0; +#X connect 8 0 7 0; +#X connect 9 0 6 0; +#X connect 13 0 0 0; diff --git a/pd/doc/5.reference/tabreceive~-help.pd b/pd/doc/5.reference/tabreceive~-help.pd new file mode 100644 index 00000000..7de98346 --- /dev/null +++ b/pd/doc/5.reference/tabreceive~-help.pd @@ -0,0 +1,6 @@ +#N canvas 109 83 646 239 12; +#X obj 21 18 tabreceive~; +#X text 17 53 creation argument: name of array; +#X text 16 83 By default a block is 64 samples \; this can be reset using the block~ object.; +#X text 380 201 updated for Pd version 0.33; +#X text 129 18 - read a block of a signal from an array continuously; diff --git a/pd/doc/5.reference/tabsend~-help.pd b/pd/doc/5.reference/tabsend~-help.pd new file mode 100644 index 00000000..85a4183f --- /dev/null +++ b/pd/doc/5.reference/tabsend~-help.pd @@ -0,0 +1,6 @@ +#N canvas 151 91 596 222 12; +#X obj 31 27 tabsend~; +#X text 113 26 writes one block of a signal continuously to an array; +#X text 41 60 creation argument: name of array; +#X text 29 96 By default a block is 64 samples \; this can be reset using the block~ object.; +#X text 318 186 updated for Pd version 0.33; diff --git a/pd/doc/5.reference/tabwrite-help.pd b/pd/doc/5.reference/tabwrite-help.pd new file mode 100644 index 00000000..60b31513 --- /dev/null +++ b/pd/doc/5.reference/tabwrite-help.pd @@ -0,0 +1,21 @@ +#N canvas 44 17 653 456 12; +#X obj 31 27 tabwrite; +#X floatatom 9 176 0 0 0; +#X obj 9 282 tabwrite array99; +#X text 113 28 write numbers to a table; +#X graph graph1 0 0 10 10 355 389 605 189; +#X array array99 10 float; +#X pop; +#X msg 9 53 \; readout 1 \; array99 resize 10 \; array99 bounds 0 0 10 10 \; array99 xlabel -0.5 0 1 2 3 4 5 6 7 8 9 10 \; array99 ylabel -1 0 1 2 3 4 5 6 7 8 9 10 \; array99 0 1 4 2 8 5 6 1 4 2 8; +#X text 406 94 click here to initialize; +#X floatatom 146 257 0 0 0; +#X text 158 279 creation argument; +#X text 160 297 is array name; +#X text 46 174 set y value; +#X text 44 239 right inlet selects x value; +#X msg 25 204 set array99; +#X text 133 203 change array name; +#X text 389 423 updated for Pd version 0.33; +#X connect 1 0 2 0; +#X connect 7 0 2 1; +#X connect 12 0 2 0; diff --git a/pd/doc/5.reference/tabwrite~-help.pd b/pd/doc/5.reference/tabwrite~-help.pd new file mode 100644 index 00000000..606f4f30 --- /dev/null +++ b/pd/doc/5.reference/tabwrite~-help.pd @@ -0,0 +1,30 @@ +#N canvas 119 134 697 332 10; +#X obj 31 27 tabwrite~; +#X text 110 27 object to write a signal in an array; +#X msg 43 131 bang; +#X obj 23 211 tabwrite~ array99; +#X graph graph1 0 -1 100 1 460 235 610 135; +#X array array99 100 float; +#X pop; +#X obj 23 82 sig~ 3000; +#X obj 23 110 phasor~; +#X text 149 213 creation argument initializes array name; +#X msg 40 181 set array99; +#X msg 445 35 \; pd dsp 1; +#X msg 524 37 \; pd dsp 0; +#X text 85 133 bang to start recording; +#X text 126 180 set the destination array; +#X text 18 251 see also the "array" tutorial in section 2 of the Pd documentation \, and these objects:; +#X obj 90 282 tabread; +#X obj 149 282 tabwrite; +#X obj 214 282 tabsend~; +#X obj 279 282 tabreceive~; +#X obj 17 282 tabread4~; +#X msg 43 153 stop; +#X text 85 154 stop recording; +#X text 458 288 updated for Pd version 0.29; +#X connect 2 0 3 0; +#X connect 5 0 6 0; +#X connect 6 0 3 0; +#X connect 8 0 3 0; +#X connect 19 0 3 0; diff --git a/pd/doc/5.reference/text-help.pd b/pd/doc/5.reference/text-help.pd new file mode 100644 index 00000000..96664048 --- /dev/null +++ b/pd/doc/5.reference/text-help.pd @@ -0,0 +1,4 @@ +#N canvas 74 127 544 214 12; +#X text 281 174 updated for Pd version 0.26; +#X text 107 13 comments; +#X text 38 73 This is Pd's help window for comments \, which don't do anything.; diff --git a/pd/doc/5.reference/textfile-help.pd b/pd/doc/5.reference/textfile-help.pd new file mode 100644 index 00000000..8da1dde6 --- /dev/null +++ b/pd/doc/5.reference/textfile-help.pd @@ -0,0 +1,59 @@ +#N canvas 12 43 1181 529 12; +#X msg 582 27 rewind; +#X obj 577 416 print done; +#X text 745 185 read a file; +#X text 801 214 write one; +#X text 97 472 see also:; +#X obj 521 365 textfile; +#X msg 584 188 read textfile.txt; +#X obj 176 473 qlist; +#X obj 145 20 textfile; +#X text 236 20 read and write text files; +#X text 34 92 The textfile object reads and writes text files to and +from memory. You can read a file and output sequential lines as lists +\, or collect lines and write them out. You can use this object to +generate "models" for Gem \, for instance.; +#X text 665 28 go to beginning; +#X msg 582 54 bang; +#X text 665 53 output one line as a list; +#X msg 584 216 write /tmp/textfile.txt; +#X msg 584 243 write /tmp/textfile2.txt cr; +#X text 593 264 write a file \, terminating lines only with carriage +return (omitting semicolons.) You can read files this way too \, in +which case carriage returns are mapped to semicolons.; +#X obj 521 438 print list; +#X msg 583 312 read textfile.txt cr; +#X msg 582 82 clear; +#X text 737 83 empty the object; +#X text 737 111 add a message; +#X text 521 464 this outlet gets the lines in sequence.; +#X text 35 246 You can also use this object simply for storing heterogeneous +sequences of lists.; +#X text 608 385 This outlet gets a bang when you hit the end of the +sequence.; +#X msg 582 162 set 2 4 6 8; +#X text 740 163 clear and then add one message; +#X msg 582 109 add cis boom bah; +#X msg 582 136 add2 bang; +#X text 734 136 add an unterminated message; +#X text 31 160 To record textual messages and save them to a file \, +first send "clear" to empty the qlist and "add" to add messages (terminated +with semicolons.) The message \, "add2" adds a list of atoms without +finishing with a semicolon in case you want to make variable-length +messages.; +#X msg 582 339 print; +#X text 636 342 debugging printout; +#X text 901 500 updated for Pd version 0.33; +#X connect 0 0 5 0; +#X connect 5 0 17 0; +#X connect 5 1 1 0; +#X connect 6 0 5 0; +#X connect 12 0 5 0; +#X connect 14 0 5 0; +#X connect 15 0 5 0; +#X connect 18 0 5 0; +#X connect 19 0 5 0; +#X connect 25 0 5 0; +#X connect 27 0 5 0; +#X connect 28 0 5 0; +#X connect 31 0 5 0; diff --git a/pd/doc/5.reference/threshold~-help.pd b/pd/doc/5.reference/threshold~-help.pd new file mode 100644 index 00000000..5922d15b --- /dev/null +++ b/pd/doc/5.reference/threshold~-help.pd @@ -0,0 +1,31 @@ +#N canvas 114 43 685 360 12; +#X msg 452 58 \; pd dsp 0; +#X msg 452 24 \; pd dsp 1; +#X obj 124 11 threshold~; +#X text 200 12 - TRIGGER FROM AUDIO SIGNAL; +#X obj 49 183 sig~; +#X obj 49 261 threshold~ 10 100 0 100; +#X text 303 255 Arguments:; +#X text 384 255 1 trigger threshold; +#X floatatom 49 156 5 0 0; +#X obj 49 289 print trigger; +#X obj 205 287 print rest; +#X text 385 271 2 trigger debounce time; +#X text 385 288 3 rest threshold; +#X text 384 303 4 rest debounce time; +#X text 486 342 updated for Pd version 0.32; +#X msg 205 209 1; +#X msg 235 210 0; +#X text 12 39 threshold~ monitors its input signal and outputs bangs when the signal exceeds a specified "trigger" value \, and also when the signal recedes below a "rest" value. You can specify debounce times in milliseconds \, for the threshold~ to wait after the two event types before triggering again.; +#X msg 131 151 set 0 2000 1 2000; +#X msg 131 174 set 10 100 0 100; +#X text 262 150 "set" to change the parameters; +#X text 268 210 zero or nonszero in inlet to set the state to "high" or "low". There is no debounce period after this.; +#X connect 4 0 5 0; +#X connect 5 0 9 0; +#X connect 5 1 10 0; +#X connect 8 0 4 0; +#X connect 15 0 5 1; +#X connect 16 0 5 1; +#X connect 18 0 5 0; +#X connect 19 0 5 0; diff --git a/pd/doc/5.reference/throw~-help.pd b/pd/doc/5.reference/throw~-help.pd new file mode 100644 index 00000000..c9a1ce9d --- /dev/null +++ b/pd/doc/5.reference/throw~-help.pd @@ -0,0 +1,34 @@ +#N canvas 80 120 664 313 12; +#X obj 97 159 throw~ signal1; +#X floatatom 268 211 0 0 0; +#X obj 90 193 sig~ 50; +#X obj 268 181 snapshot~; +#X obj 90 221 throw~ signal1; +#X obj 97 88 sig~ 25; +#X obj 268 135 catch~ signal1; +#X obj 35 17 throw~; +#X obj 97 17 catch~; +#X text 163 16 - summing signal bus and non-local connection; +#X obj 551 88 loadbang; +#X msg 561 110 \; pd dsp 1; +#X obj 551 151 metro 200; +#X text 33 48 Any number of throw~ objects can add into one catch~ object (but two catch~ objects cannot share the same name.); +#X floatatom 401 206 0 0 0; +#X obj 402 182 snapshot~; +#X obj 402 134 catch~ signal2; +#X msg 113 111 set signal2; +#X msg 114 135 set signal1; +#X text 75 252 You can redirect throw~ via a "set" message.; +#X text 410 283 updated for Pd version 0.33; +#X connect 2 0 4 0; +#X connect 3 0 1 0; +#X connect 5 0 0 0; +#X connect 6 0 3 0; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 12 0 3 0; +#X connect 12 0 15 0; +#X connect 15 0 14 0; +#X connect 16 0 15 0; +#X connect 17 0 0 0; +#X connect 18 0 0 0; diff --git a/pd/doc/5.reference/timer-help.pd b/pd/doc/5.reference/timer-help.pd new file mode 100644 index 00000000..0f7b3829 --- /dev/null +++ b/pd/doc/5.reference/timer-help.pd @@ -0,0 +1,15 @@ +#N canvas 440 273 514 280 10; +#X msg 60 146 bang; +#X msg 30 115 bang; +#X obj 30 175 timer; +#X obj 66 15 timer; +#X text 111 16 - measure logical time; +#X floatatom 30 206; +#X text 71 113 Click here to reset; +#X text 98 147 Click here to get elapsed logical time; +#X text 27 232 Output is in milliseconds; +#X text 6 51 The timer object measures elapsed logical time. Logical time moves forward as if all computation were instantaneous and as if all "delay" and "metro" objects were exact.; +#X text 319 260 updated for Pd version 0.25; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 5 0; diff --git a/pd/doc/5.reference/toggle-help.pd b/pd/doc/5.reference/toggle-help.pd new file mode 100644 index 00000000..5cb9ae75 --- /dev/null +++ b/pd/doc/5.reference/toggle-help.pd @@ -0,0 +1,273 @@ +#N canvas 205 140 489 376 10; +#X obj 1 1 cnv 8 100 60 empty empty toggle=tgl 20 20 1 18 -262144 -1109 +0; +#X text 21 296 (c) musil@iem.kug.ac.at; +#X text 63 309 IEM KUG; +#X text 115 41 click properties to; +#X text 103 52 modify geometry \, colors \, etc.; +#X obj 168 113 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 +-1 -1; +#X obj 168 179 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 +-1 -1; +#X obj 168 133 s foo6_rcv; +#X obj 168 159 r foo6_snd; +#X text 153 14 gui-toggle:; +#X obj 26 270 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 10 117 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X msg 26 39 33; +#X obj 26 180 tgl 60 1 foo6_snd foo6_rcv big_toggle 63 20 194 13 -228992 +-4033 -34 1 1; +#X msg 42 79 1; +#X msg 49 99 0; +#X floatatom 26 249 4 0 0; +#X msg 33 59 -0.001; +#X msg 103 135 set 1; +#X msg 108 157 set 0; +#X obj 3 155 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 1 +; +#X obj 65 249 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 +1; +#X msg 95 114 set -0.23; +#X obj 189 93 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 188 179 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 +1; +#X msg 93 93 0 3 4.55; +#X msg 85 73 0.22 0 -5.44; +#X msg 189 113 set \$1; +#X text 96 222 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 95 233 for moving selected gui-objects; +#N canvas 440 175 699 530 edit 0; +#X msg 47 151 \; foo6_rcv color \$1 \$2 \$3; +#X obj 47 126 pack 0 0 0; +#X obj 47 98 f; +#X msg 24 50 bang; +#X floatatom 63 48 3 0 29; +#X floatatom 79 68 3 0 29; +#X floatatom 112 84 3 0 29; +#X text 91 48 background; +#X text 106 68 front-color; +#X text 140 85 label-color; +#X obj 49 223 f; +#X msg 27 202 bang; +#X floatatom 65 201 3 63 88; +#X floatatom 100 223 3 0 37; +#X obj 49 246 pack 0 0; +#X text 127 223 y-label; +#X text 93 201 x-label; +#X msg 49 271 \; foo6_rcv label_pos \$1 \$2; +#X floatatom 505 55 3 8 75; +#X text 532 55 size; +#X msg 505 76 \; foo6_rcv size \$1; +#X obj 282 182 f; +#X msg 260 161 bang; +#X floatatom 298 160 3 -10 10; +#X floatatom 333 182 3 -10 10; +#X obj 282 205 pack 0 0; +#X msg 282 230 \; foo6_rcv delta \$1 \$2; +#X obj 296 301 f; +#X msg 274 280 bang; +#X floatatom 312 279 3 20 60; +#X floatatom 347 301 3 150 200; +#X obj 296 324 pack 0 0; +#X msg 296 349 \; foo6_rcv pos \$1 \$2; +#X text 326 160 x-delta; +#X text 360 182 y-delta; +#X text 340 279 x-position; +#X text 374 301 y-position; +#X obj 305 423 f; +#X msg 283 402 bang; +#X floatatom 321 401 3 -10 10; +#X floatatom 356 423 3 -10 10; +#X obj 305 446 pack 0 0; +#X text 383 423 y-label; +#X text 349 401 x-label; +#X msg 305 471 \; foo6_rcv delta \$1 \$2; +#X msg 499 140 \; foo6_rcv send foo6a_snd; +#X msg 499 178 \; foo6_rcv send foo6_snd; +#X msg 494 216 \; foo6_rcv receive foo6a_rcv; +#X msg 494 254 \; foo6a_rcv receive foo6_rcv; +#X msg 41 448 \; foo6_rcv label blabla; +#X msg 41 484 \; foo6_rcv label big_toggle; +#X obj 69 338 f; +#X msg 47 317 bang; +#X floatatom 85 316 3 0 2; +#X floatatom 120 338 3 4 36; +#X obj 69 361 pack 0 0; +#X msg 69 386 \; foo6_rcv label_font \$1 \$2; +#X text 113 316 font; +#X text 149 338 height; +#X floatatom 498 307 5 -200 200; +#X text 542 307 nonzero-value; +#X msg 498 331 \; foo6_rcv nonzero \$1; +#X msg 503 412 \; foo6_rcv init 0; +#X msg 510 479 \; foo6_rcv init 1; +#X text 524 393 no init; +#X text 500 461 init value on loadbang; +#X msg 285 47 back; +#X msg 285 67 front; +#X msg 285 87 label; +#X msg 247 47 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 285 108 pd RGB_____________; +#X floatatom 327 77 3 0 255; +#X floatatom 370 77 3 0 255; +#X floatatom 413 78 3 0 255; +#X text 34 22 preset-colors; +#X text 296 19 RGB-colors; +#X text 327 59 red; +#X text 363 58 green; +#X text 411 58 blue; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 2 1; +#X connect 5 0 1 1; +#X connect 6 0 1 2; +#X connect 10 0 14 0; +#X connect 11 0 10 0; +#X connect 12 0 10 1; +#X connect 13 0 14 1; +#X connect 14 0 17 0; +#X connect 18 0 20 0; +#X connect 21 0 25 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 25 1; +#X connect 25 0 26 0; +#X connect 27 0 31 0; +#X connect 28 0 27 0; +#X connect 29 0 27 1; +#X connect 30 0 31 1; +#X connect 31 0 32 0; +#X connect 37 0 41 0; +#X connect 38 0 37 0; +#X connect 39 0 37 1; +#X connect 40 0 41 1; +#X connect 41 0 44 0; +#X connect 51 0 55 0; +#X connect 52 0 51 0; +#X connect 53 0 51 1; +#X connect 54 0 55 1; +#X connect 55 0 56 0; +#X connect 59 0 61 0; +#X connect 66 0 70 0; +#X connect 67 0 70 0; +#X connect 68 0 70 0; +#X connect 69 0 70 0; +#X connect 70 0 1 0; +#X connect 70 1 1 1; +#X connect 70 2 1 2; +#X connect 71 0 70 1; +#X connect 72 0 70 2; +#X connect 73 0 70 3; +#X restore 278 136 pd edit; +#X obj 222 276 tgl 15 0 bbb bbb empty 20 8 192 8 -262144 -1 -1 1 1 +; +#X text 191 320 updated for Pd version 0.35; +#X text 38 321 graz \, austria 2002; +#X obj 127 255 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X connect 5 0 7 0; +#X connect 8 0 6 0; +#X connect 8 0 24 0; +#X connect 11 0 13 0; +#X connect 12 0 13 0; +#X connect 13 0 16 0; +#X connect 13 0 21 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 16 0 10 0; +#X connect 17 0 13 0; +#X connect 18 0 13 0; +#X connect 19 0 13 0; +#X connect 20 0 13 0; +#X connect 22 0 13 0; +#X connect 23 0 27 0; +#X connect 25 0 13 0; +#X connect 26 0 13 0; +#X connect 27 0 7 0; diff --git a/pd/doc/5.reference/trigger-help.pd b/pd/doc/5.reference/trigger-help.pd new file mode 100644 index 00000000..a32d5def --- /dev/null +++ b/pd/doc/5.reference/trigger-help.pd @@ -0,0 +1,37 @@ +#N canvas 58 142 685 355 12; +#X msg 28 149 2.5; +#X msg 126 151 bang; +#X msg 68 150 23 64; +#X obj 28 242 print x1; +#X obj 112 242 print x2; +#X obj 196 240 print x3; +#X obj 43 26 trigger; +#X obj 286 241 print x4; +#X text 114 27 - sequence messages in right-to-left order; +#X text 417 331 updated for Pd version 0.33; +#X text 81 290 the above can be abbreviated as:; +#X msg 172 152 symbol dog; +#X text 39 59 The trigger object outputs its input from right to left +\, converting to the types indicated by its creation arguments. There +is also a "pointer" argument type (see the pointer object.); +#X obj 381 293 t f b l s a; +#X msg 466 167 dog my cats; +#X obj 466 199 trigger bang anything; +#X obj 374 242 print x5; +#X obj 466 240 print y1; +#X obj 552 242 print y2; +#X obj 28 202 trigger float bang symbol list anything; +#X text 464 122 "anythings" can only; +#X text 461 142 be converted to bang:; +#X connect 0 0 19 0; +#X connect 1 0 19 0; +#X connect 2 0 19 0; +#X connect 11 0 19 0; +#X connect 14 0 15 0; +#X connect 15 0 17 0; +#X connect 15 1 18 0; +#X connect 19 0 3 0; +#X connect 19 1 4 0; +#X connect 19 2 5 0; +#X connect 19 3 7 0; +#X connect 19 4 16 0; diff --git a/pd/doc/5.reference/unpack-help.pd b/pd/doc/5.reference/unpack-help.pd new file mode 100644 index 00000000..5f1a4120 --- /dev/null +++ b/pd/doc/5.reference/unpack-help.pd @@ -0,0 +1,28 @@ +#N canvas 234 84 730 277 12; +#X floatatom 80 180 0 0 0; +#X floatatom 205 180 0 0 0; +#X floatatom 243 180 0 0 0; +#X floatatom 46 180 0 0 0; +#X obj 117 180 print foo; +#X obj 133 243 pack; +#X text 51 242 See also; +#X obj 101 9 unpack; +#X text 164 8 - split a message to atoms; +#X text 196 139 <-- creation arguments specify the types of atoms expected +; +#X msg 46 102 1 2; +#X msg 85 102 3 4 shut; +#X msg 164 102 5 6 pick 7 8; +#X text 368 239 updated for Pd version 0.33; +#X obj 46 139 unpack 0 0 s 0 0; +#X text 25 36 unpack takes lists of atoms and distributes them to its +outlets. The creation arguments specify float (any number or the symbol +'f') \, pointer (symbol 'p') or symbol (symbol 's').; +#X connect 10 0 14 0; +#X connect 11 0 14 0; +#X connect 12 0 14 0; +#X connect 14 0 3 0; +#X connect 14 1 0 0; +#X connect 14 2 4 0; +#X connect 14 3 1 0; +#X connect 14 4 2 0; diff --git a/pd/doc/5.reference/until-help.pd b/pd/doc/5.reference/until-help.pd new file mode 100644 index 00000000..9da7a9ce --- /dev/null +++ b/pd/doc/5.reference/until-help.pd @@ -0,0 +1,25 @@ +#N canvas 142 97 410 273 10; +#X msg 65 116 bang; +#X obj 66 15 until; +#X text 114 16 - LOOP; +#X text 24 36 The until object's left inlet starts a loop in which it outputs "bang" until its right inlet gets a bang which stops it. If you start "until" with a number \, it iterates at most that number of times \, as in the Max "uzi" object.; +#X text 24 85 WARNING: if you bang an "until" which doesn't have a stopping mechanism \, Pd goes into an infinite loop!; +#X obj 65 168 until; +#X text 110 115 start; +#X msg 73 137 3; +#X text 109 138 start limited to 3 iterations; +#X obj 65 196 f; +#X obj 96 198 + 1; +#X obj 140 198 sel 0; +#X obj 65 240 print; +#X obj 96 219 mod 10; +#X text 225 247 updated for Pd version 0.28; +#X connect 0 0 5 0; +#X connect 5 0 9 0; +#X connect 7 0 5 0; +#X connect 9 0 10 0; +#X connect 9 0 12 0; +#X connect 10 0 13 0; +#X connect 11 0 5 1; +#X connect 13 0 9 1; +#X connect 13 0 11 0; diff --git a/pd/doc/5.reference/value-help.pd b/pd/doc/5.reference/value-help.pd new file mode 100644 index 00000000..66c457a3 --- /dev/null +++ b/pd/doc/5.reference/value-help.pd @@ -0,0 +1,30 @@ +#N canvas 257 45 500 281 12; +#X text 290 257 updated for Pd version 0.32; +#X floatatom 36 55 5 0 0; +#X text 50 249 abbreviation:; +#X text 79 10 -- nonlocal shared value (named variable); +#X floatatom 36 130 5 0 0; +#X msg 46 78 bang; +#X obj 21 10 value; +#X obj 36 105 value help-value1; +#X obj 149 248 v; +#X floatatom 163 55 5 0 0; +#X floatatom 163 130 5 0 0; +#X msg 173 78 bang; +#X obj 163 105 value help-value1; +#X floatatom 291 55 5 0 0; +#X floatatom 291 130 5 0 0; +#X msg 301 78 bang; +#X obj 291 105 value help-value2; +#X text 31 171 "Value" stores a numeric value which is shared between all values with the same name (which need not be in the same Pd window.); +#X text 345 54 numbers set the value; +#X text 349 77 bang retrieves it; +#X connect 1 0 7 0; +#X connect 5 0 7 0; +#X connect 7 0 4 0; +#X connect 9 0 12 0; +#X connect 11 0 12 0; +#X connect 12 0 10 0; +#X connect 13 0 16 0; +#X connect 15 0 16 0; +#X connect 16 0 14 0; diff --git a/pd/doc/5.reference/vcf~-help.pd b/pd/doc/5.reference/vcf~-help.pd new file mode 100644 index 00000000..45dde1d8 --- /dev/null +++ b/pd/doc/5.reference/vcf~-help.pd @@ -0,0 +1,35 @@ +#N canvas 0 0 644 422 12; +#X obj 257 200 sig~; +#X text 14 193 test signal; +#X text 100 341 amp in (db); +#X text 92 144 test frequency; +#X text 224 340 amp out (db); +#X obj 220 264 vcf~; +#X text 246 144 center frequency; +#X text 374 184 q; +#X floatatom 122 168 5 0 0; +#X floatatom 257 171 5 0 0; +#X obj 122 193 osc~; +#X floatatom 353 203 5 0 0; +#X obj 122 291 env~ 8192; +#X obj 220 290 env~ 8192; +#X floatatom 121 318 5 0 0; +#X floatatom 220 319 5 0 0; +#X obj 80 13 vcf~; +#X text 135 13 -- voltage-controlled bandpass filter; +#X text 26 395 see also:; +#X obj 115 394 bp~; +#X text 302 394 updated for Pd version 0.35; +#X text 12 45 vcf~ is like bp~ except that it takes an audio signal +to set center frequency \, which may thus change continuously in time. +The "Q" or filter sharpness is still only set by messages. More expensive +than bp~ in CPU time but more powerful too.; +#X connect 0 0 5 1; +#X connect 5 0 13 0; +#X connect 8 0 10 0; +#X connect 9 0 0 0; +#X connect 10 0 5 0; +#X connect 10 0 12 0; +#X connect 11 0 5 2; +#X connect 12 0 14 0; +#X connect 13 0 15 0; diff --git a/pd/doc/5.reference/vdial-help.pd b/pd/doc/5.reference/vdial-help.pd new file mode 100644 index 00000000..048c4c2b --- /dev/null +++ b/pd/doc/5.reference/vdial-help.pd @@ -0,0 +1,282 @@ +#N canvas 106 314 558 455 10; +#X obj 1 1 cnv 8 100 60 empty empty vdial=vdl 20 20 1 18 -262144 -1109 +0; +#X text 13 390 (c) musil@iem.kug.ac.at; +#X text 55 403 IEM KUG; +#X text 132 122 click properties to; +#X text 120 133 modify geometry \, colors \, etc.; +#X obj 159 261 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 +-1 -1; +#X obj 21 54 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X msg 41 319 \$1; +#X floatatom 41 341 4 0 0; +#X obj 41 363 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 86 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 86 317 route 0 1 2 3 4 5 6 7 8 9; +#X msg 194 92 set \$1; +#X floatatom 194 71 4 0 9; +#X floatatom 44 54 4 0 9; +#X msg 91 41 7 0 -5.44; +#X msg 95 63 3 3 4.55; +#X obj 103 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 120 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 +1; +#X obj 137 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 154 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 171 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 188 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 205 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 222 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 239 338 tgl 12 0 empty empty empty 8 -8 0 10 -262144 -1 -1 0 +1; +#X obj 79 355 print; +#X floatatom 183 287 4 0 0; +#X msg 183 261 \$1; +#X msg 158 192 set \$1; +#X floatatom 158 171 4 0 9; +#X text 125 355 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 124 366 for moving selected gui-objects; +#N canvas 230 247 699 530 edit 0; +#X obj 42 198 f; +#X msg 20 177 bang; +#X floatatom 58 176 3 63 156; +#X floatatom 93 198 3 -20 37; +#X obj 42 221 pack 0 0; +#X text 120 198 y-label; +#X text 86 176 x-label; +#X floatatom 270 187 3 8 50; +#X text 297 187 size; +#X obj 286 293 f; +#X msg 264 272 bang; +#X floatatom 302 271 3 -10 10; +#X floatatom 337 293 3 -10 10; +#X obj 286 316 pack 0 0; +#X obj 300 412 f; +#X msg 278 391 bang; +#X floatatom 316 390 3 20 60; +#X floatatom 351 412 3 100 200; +#X obj 300 435 pack 0 0; +#X text 330 271 x-delta; +#X text 364 293 y-delta; +#X text 344 390 x-position; +#X text 378 412 y-position; +#X obj 62 313 f; +#X msg 40 292 bang; +#X floatatom 78 291 3 0 2; +#X floatatom 113 313 3 4 36; +#X obj 62 336 pack 0 0; +#X text 106 291 font; +#X text 142 313 height; +#X text 504 293 no init; +#X text 475 348 init value on loadbang; +#X floatatom 482 228 5 2 20; +#X text 491 417 changing-behavior; +#X text 526 228 number of buttons; +#X obj 47 104 pack 0 0 0; +#X obj 47 76 f; +#X msg 24 28 bang; +#X floatatom 63 26 3 0 29; +#X floatatom 79 46 3 0 29; +#X floatatom 112 62 3 0 29; +#X text 91 26 background; +#X text 106 46 front-color; +#X text 140 63 label-color; +#X msg 285 25 back; +#X msg 285 45 front; +#X msg 285 65 label; +#X msg 247 25 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 285 86 pd RGB_____________; +#X floatatom 327 55 3 0 255; +#X floatatom 370 55 3 0 255; +#X floatatom 413 56 3 0 255; +#X text 34 0 preset-colors; +#X text 296 -3 RGB-colors; +#X text 327 37 red; +#X text 363 36 green; +#X text 411 36 blue; +#X msg 47 125 \; foo12_rcv color \$1 \$2 \$3; +#X msg 42 246 \; foo12_rcv label_pos \$1 \$2; +#X msg 62 361 \; foo12_rcv label_font \$1 \$2; +#X msg 34 423 \; foo12_rcv label blabla; +#X msg 34 459 \; foo12_rcv label vdial_0_9; +#X msg 300 460 \; foo12_rcv pos \$1 \$2; +#X msg 286 341 \; foo12_rcv delta \$1 \$2; +#X msg 270 216 \; foo12_rcv size \$1; +#X msg 483 50 \; foo12_rcv send foo12a_snd; +#X msg 483 88 \; foo12_rcv send foo12_snd; +#X msg 482 171 \; foo12a_rcv receive foo12_rcv; +#X msg 483 133 \; foo12_rcv receive foo12a_rcv; +#X msg 482 254 \; foo12_rcv number \$1; +#X msg 483 312 \; foo12_rcv init 0; +#X msg 485 366 \; foo12_rcv init 1; +#X msg 490 436 \; foo12_rcv single_change; +#X msg 490 470 \; foo12_rcv double_change; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 58 0; +#X connect 7 0 64 0; +#X connect 9 0 13 0; +#X connect 10 0 9 0; +#X connect 11 0 9 1; +#X connect 12 0 13 1; +#X connect 13 0 63 0; +#X connect 14 0 18 0; +#X connect 15 0 14 0; +#X connect 16 0 14 1; +#X connect 17 0 18 1; +#X connect 18 0 62 0; +#X connect 23 0 27 0; +#X connect 24 0 23 0; +#X connect 25 0 23 1; +#X connect 26 0 27 1; +#X connect 27 0 59 0; +#X connect 32 0 69 0; +#X connect 35 0 57 0; +#X connect 36 0 35 0; +#X connect 37 0 36 0; +#X connect 38 0 36 1; +#X connect 39 0 35 1; +#X connect 40 0 35 2; +#X connect 44 0 48 0; +#X connect 45 0 48 0; +#X connect 46 0 48 0; +#X connect 47 0 48 0; +#X connect 48 0 35 0; +#X connect 48 1 35 1; +#X connect 48 2 35 2; +#X connect 49 0 48 1; +#X connect 50 0 48 2; +#X connect 51 0 48 3; +#X restore 267 222 pd edit; +#X obj 221 11 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X text 30 415 graz \, austria 2002; +#X text 223 401 updated for Pd version 0.35; +#X text 144 11 gui-vdial:; +#X obj 79 110 vdl 25 1 0 8 foo12_snd foo12_rcv vdial_0_9 20 -8 192 +10 -99865 -262144 -260818 0; +#X obj 352 36 vdl 15 1 0 8 iii iii empty 20 8 192 8 -262144 -1 -1 0 +; +#X obj 158 213 s foo12_rcv; +#X obj 159 239 r foo12_snd; +#X connect 6 0 38 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 11 0 10 0; +#X connect 11 1 17 0; +#X connect 11 2 18 0; +#X connect 11 3 19 0; +#X connect 11 4 20 0; +#X connect 11 5 21 0; +#X connect 11 6 22 0; +#X connect 11 7 23 0; +#X connect 11 8 24 0; +#X connect 11 9 25 0; +#X connect 12 0 38 0; +#X connect 13 0 12 0; +#X connect 14 0 38 0; +#X connect 15 0 38 0; +#X connect 16 0 38 0; +#X connect 28 0 27 0; +#X connect 29 0 40 0; +#X connect 30 0 29 0; +#X connect 38 0 11 0; +#X connect 38 0 26 0; +#X connect 38 0 7 0; +#X connect 41 0 5 0; +#X connect 41 0 28 0; diff --git a/pd/doc/5.reference/vd~-help.pd b/pd/doc/5.reference/vd~-help.pd new file mode 100644 index 00000000..5a36ff73 --- /dev/null +++ b/pd/doc/5.reference/vd~-help.pd @@ -0,0 +1,19 @@ +#N canvas 109 10 654 410 12; +#X floatatom 50 194 0 0 0; +#X obj 50 287 outlet~; +#X text 130 286 signal output (delayed signal); +#X obj 24 16 vd~; +#X text 60 9 reads a signal from a delay line at a variable delay time (4-point-interpolation); +#X obj 50 222 sig~; +#X text 99 219 signal input (delay time in ms); +#X obj 50 254 vd~ del_example; +#X text 193 252 creation argument: name of delay line; +#X text 31 51 vd~ implements a 4-point interpolating delay tap from a corresponding delwrite~ object. The delay in milliseconds of the tap is specified by the incoming signal.; +#X text 35 340 see also:; +#X obj 123 343 delwrite~; +#X obj 212 342 delread~; +#X text 354 373 updated for Pd version 0.33; +#X text 28 103 The delay time is always at least one sample and at most the length of the delay line (specified by hte delwrite~). In addition \, in case the delwrite~ runs later in the DSP loop than the vd~ \, the delay is constrained below by one vector length (64 samples.); +#X connect 0 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 1 0; diff --git a/pd/doc/5.reference/vslider-help.pd b/pd/doc/5.reference/vslider-help.pd new file mode 100644 index 00000000..69452ad6 --- /dev/null +++ b/pd/doc/5.reference/vslider-help.pd @@ -0,0 +1,302 @@ +#N canvas 147 201 617 416 10; +#X obj 1 1 cnv 8 100 60 empty empty vslider=vsl 20 20 1 18 -262144 +-1109 0; +#X floatatom 38 300 9 0 0; +#X msg 47 84 set \$1; +#X floatatom 38 43 7 0 0; +#X text 25 363 (c) musil@iem.kug.ac.at; +#X text 67 376 IEM KUG; +#X obj 38 324 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X obj 18 47 bng 15 250 50 0 empty empty empty 8 -8 0 10 -262144 -1 +-1; +#X floatatom 47 63 7 0 0; +#X floatatom 116 324 9 0 0; +#X floatatom 106 42 7 0 0; +#X floatatom 147 113 7 0 0; +#X obj 75 249 ftom; +#X floatatom 75 271 9 0 0; +#X floatatom 111 244 9 0 0; +#X floatatom 185 266 9 0 0; +#X text 181 151 click properties to; +#X floatatom 75 112 9 0 0; +#X obj 75 134 mtof; +#X text 166 12 gui-vertical-slider:; +#X obj 38 162 vsl 15 101 100 300 0 1 foo3_snd foo3_rcv empty 8 -8 192 +10 -225280 -1109 -1 2500 1; +#X obj 75 168 vsl 15 73 55 3520 1 1 goo4_snd goo4_rcv log.freq. 11 +-6 192 10 -261681 -260818 -90881 0 1; +#X obj 185 244 r goo4_snd; +#X obj 147 133 s goo4_rcv; +#X text 202 65 (0.01 pixels); +#X text 57 99 ------------------------------------------; +#X text 57 286 --------------------------------------------; +#X text 169 162 modify geometry \, colors \, etc.; +#X obj 106 84 s foo3_rcv; +#X obj 116 302 r foo3_snd; +#X msg 106 63 set \$1; +#X text 188 44 shift-click & drag; +#X text 194 54 for fine-tuning; +#X text 119 192 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 118 203 for moving selected gui-objects; +#N canvas 239 379 699 530 edit 0; +#X obj 37 233 f; +#X msg 15 212 bang; +#X floatatom 53 211 3 6 88; +#X floatatom 88 233 3 -20 37; +#X obj 37 256 pack 0 0; +#X text 115 233 y-label; +#X text 81 211 x-label; +#X obj 287 271 f; +#X msg 265 250 bang; +#X floatatom 303 249 3 -10 10; +#X floatatom 338 271 3 -10 10; +#X obj 287 294 pack 0 0; +#X obj 299 381 f; +#X msg 277 360 bang; +#X floatatom 315 359 3 20 90; +#X floatatom 350 381 3 150 200; +#X obj 299 404 pack 0 0; +#X text 331 249 x-delta; +#X text 365 271 y-delta; +#X text 343 359 x-position; +#X text 377 381 y-position; +#X obj 57 348 f; +#X msg 35 327 bang; +#X floatatom 73 326 3 0 2; +#X floatatom 108 348 3 4 36; +#X obj 57 371 pack 0 0; +#X text 101 326 font; +#X text 137 348 height; +#X floatatom 476 188 1 0 1; +#X text 523 401 no init; +#X text 493 453 init value on loadbang; +#X text 520 188 steady; +#X obj 486 291 f; +#X msg 464 270 bang; +#X floatatom 502 269 4 55 440; +#X floatatom 537 291 6 440 3520; +#X obj 486 314 pack 0 0; +#X text 269 469 linear / logarithmical; +#X msg 47 158 \; goo4_rcv color \$1 \$2 \$3; +#X msg 37 281 \; goo4_rcv label_pos \$1 \$2; +#X msg 57 396 \; goo4_rcv label_font \$1 \$2; +#X msg 40 442 \; goo4_rcv label blabla; +#X msg 269 487 \; goo4_rcv lin; +#X msg 363 486 \; goo4_rcv log; +#X msg 299 429 \; goo4_rcv pos \$1 \$2; +#X msg 287 319 \; goo4_rcv delta \$1 \$2; +#X msg 475 21 \; goo4_rcv send goo4a_snd; +#X msg 475 59 \; goo4_rcv send goo4_snd; +#X msg 476 105 \; goo4_rcv receive goo4a_rcv; +#X msg 476 143 \; goo4a_rcv receive goo4_rcv; +#X msg 486 339 \; goo4_rcv range \$1 \$2; +#X msg 502 420 \; goo4_rcv init 0; +#X msg 503 471 \; goo4_rcv init 1; +#X text 539 270 bottom-range-bound; +#X text 586 292 top-range-bound; +#X obj 286 160 f; +#X msg 264 139 bang; +#X floatatom 302 138 3 4 55; +#X floatatom 337 160 3 15 73; +#X obj 286 183 pack 0 0; +#X msg 286 208 \; goo4_rcv size \$1 \$2; +#X text 330 138 width; +#X text 368 161 height; +#X msg 41 478 \; goo4_rcv label log.freq.; +#X msg 476 212 \; goo4_rcv steady \$1; +#X obj 47 116 pack 0 0 0; +#X obj 47 88 f; +#X msg 24 40 bang; +#X floatatom 63 38 3 0 29; +#X floatatom 79 58 3 0 29; +#X floatatom 112 74 3 0 29; +#X text 91 38 background; +#X text 106 58 front-color; +#X text 140 75 label-color; +#X msg 285 37 back; +#X msg 285 57 front; +#X msg 285 77 label; +#X msg 247 37 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 196 269 bang; +#X msg 187 295 0; +#X msg 214 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 359 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 343 385 outlet; +#X obj 28 180 loadbang; +#X obj 97 135 route back front label bang; +#X obj 343 362 f; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 235 168 t b b b b; +#X connect 0 0 28 0; +#X connect 1 0 32 0; +#X connect 2 0 33 0; +#X connect 3 0 34 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 13 1; +#X connect 8 0 15 1; +#X connect 9 0 14 1; +#X connect 10 0 11 0; +#X connect 10 0 12 0; +#X connect 11 0 13 1; +#X connect 11 0 14 1; +#X connect 12 0 15 1; +#X connect 13 0 31 1; +#X connect 14 0 30 1; +#X connect 15 0 29 1; +#X connect 21 0 22 0; +#X connect 21 1 22 1; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 23 1 24 1; +#X connect 24 0 35 0; +#X connect 27 0 6 0; +#X connect 28 0 4 0; +#X connect 28 1 7 0; +#X connect 28 2 10 0; +#X connect 28 3 36 0; +#X connect 29 0 26 0; +#X connect 30 0 25 0; +#X connect 31 0 16 0; +#X connect 32 0 24 0; +#X connect 33 0 22 0; +#X connect 34 0 21 0; +#X connect 35 0 15 0; +#X connect 35 0 14 0; +#X connect 35 0 13 0; +#X connect 36 0 31 0; +#X connect 36 1 30 0; +#X connect 36 2 29 0; +#X connect 36 3 35 0; +#X restore 285 98 pd RGB_____________; +#X floatatom 327 67 3 0 255; +#X floatatom 370 67 3 0 255; +#X floatatom 413 68 3 0 255; +#X text 34 12 preset-colors; +#X text 296 9 RGB-colors; +#X text 327 49 red; +#X text 363 48 green; +#X text 411 48 blue; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 39 0; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 7 1; +#X connect 10 0 11 1; +#X connect 11 0 45 0; +#X connect 12 0 16 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 16 1; +#X connect 16 0 44 0; +#X connect 21 0 25 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 25 1; +#X connect 25 0 40 0; +#X connect 28 0 64 0; +#X connect 32 0 36 0; +#X connect 33 0 32 0; +#X connect 34 0 32 1; +#X connect 35 0 36 1; +#X connect 36 0 50 0; +#X connect 55 0 59 0; +#X connect 56 0 55 0; +#X connect 57 0 55 1; +#X connect 58 0 59 1; +#X connect 59 0 60 0; +#X connect 65 0 38 0; +#X connect 66 0 65 0; +#X connect 67 0 66 0; +#X connect 68 0 66 1; +#X connect 69 0 65 1; +#X connect 70 0 65 2; +#X connect 74 0 78 0; +#X connect 75 0 78 0; +#X connect 76 0 78 0; +#X connect 77 0 78 0; +#X connect 78 0 65 0; +#X connect 78 1 65 1; +#X connect 78 2 65 2; +#X connect 79 0 78 1; +#X connect 80 0 78 2; +#X connect 81 0 78 3; +#X restore 327 48 pd edit; +#X obj 61 345 print; +#N canvas 276 200 290 224 once 0; +#X obj 38 47 t b b f; +#X msg 56 85 1; +#X obj 31 108 f 0; +#X obj 31 131 pack 0 0; +#X obj 31 156 route 0; +#X obj 38 24 inlet; +#X obj 31 180 outlet; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 0 2 3 1; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X restore 61 322 pd once; +#X obj 377 110 vsl 15 128 0 127 0 0 ccc ccc empty 20 8 192 8 -262144 +-1 -1 4200 1; +#X obj 249 87 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X text 218 387 updated for Pd version 0.35; +#X text 42 388 graz \, austria 2002; +#X connect 1 0 6 0; +#X connect 2 0 20 0; +#X connect 3 0 20 0; +#X connect 7 0 20 0; +#X connect 8 0 2 0; +#X connect 10 0 30 0; +#X connect 11 0 23 0; +#X connect 12 0 13 0; +#X connect 17 0 18 0; +#X connect 18 0 21 0; +#X connect 20 0 1 0; +#X connect 20 0 37 0; +#X connect 21 0 14 0; +#X connect 21 0 12 0; +#X connect 22 0 15 0; +#X connect 29 0 9 0; +#X connect 30 0 28 0; +#X connect 37 0 36 0; diff --git a/pd/doc/5.reference/vu-help.pd b/pd/doc/5.reference/vu-help.pd new file mode 100644 index 00000000..3c94ba52 --- /dev/null +++ b/pd/doc/5.reference/vu-help.pd @@ -0,0 +1,247 @@ +#N canvas 171 210 549 418 10; +#X obj 1 1 cnv 8 100 60 empty empty vu 20 20 1 18 -262144 -1109 0; +#X text 19 363 (c) musil@iem.kug.ac.at; +#X text 61 376 IEM KUG; +#X floatatom 177 129 7 -110 20; +#X text 202 41 click properties to; +#X text 190 52 modify geometry \, colors \, etc.; +#X text 49 13 gui-vu-meter-display:; +#X obj 99 39 tgl 15 1 empty empty empty 8 -8 0 10 -262144 -1 -1 1 1 +; +#X obj 12 179 vu 16 120 foo7_rcv vu-meter 60 0 64 10 -1 -355 1 0; +#X floatatom 11 332 6 0 0; +#X floatatom 22 310 6 0 0; +#X text 75 309 dB; +#X text 63 333 dB; +#X text 71 128 dB; +#X text 80 148 dB; +#X text 103 146 peak-level; +#X text 101 125 rms-level; +#X text 96 308 peak-level; +#X text 83 332 rms-level; +#X text 108 99 <list> of rms \, peak; +#X obj 177 231 s foo7_rcv; +#X obj 177 211 pack 0 0; +#X floatatom 195 150 7 -110 20; +#X obj 195 191 t b f; +#X text 236 129 dB; +#X text 255 151 dB; +#X text 71 258 UP- \, DOWN- \, LEFT- or RIGHT-key; +#X text 70 269 for moving selected gui-objects; +#X floatatom 11 128 7 -110 20; +#X floatatom 22 149 7 -110 20; +#N canvas 236 62 699 530 edit 0; +#X obj 37 222 f; +#X msg 15 201 bang; +#X floatatom 53 200 3 50 88; +#X floatatom 88 222 3 0 37; +#X obj 37 245 pack 0 0; +#X text 115 222 y-label; +#X text 81 200 x-label; +#X obj 292 313 f; +#X msg 270 292 bang; +#X floatatom 308 291 3 -10 10; +#X floatatom 343 313 3 -10 10; +#X obj 292 336 pack 0 0; +#X obj 304 435 f; +#X msg 282 414 bang; +#X floatatom 320 413 3 20 140; +#X floatatom 355 435 3 150 200; +#X obj 304 458 pack 0 0; +#X text 336 291 x-delta; +#X text 370 313 y-delta; +#X text 348 413 x-position; +#X text 382 435 y-position; +#X obj 57 337 f; +#X msg 35 316 bang; +#X floatatom 73 315 3 0 2; +#X floatatom 108 337 3 8 36; +#X obj 57 360 pack 0 0; +#X text 101 315 font; +#X text 137 337 height; +#X floatatom 471 106 1 0 1; +#X msg 52 131 \; foo7_rcv color \$1 \$2; +#X msg 37 270 \; foo7_rcv label_pos \$1 \$2; +#X msg 57 386 \; foo7_rcv label_font \$1 \$2; +#X msg 37 427 \; foo7_rcv label blabla; +#X msg 292 361 \; foo7_rcv delta \$1 \$2; +#X msg 304 483 \; foo7_rcv pos \$1 \$2; +#X msg 469 23 \; foo7_rcv receive foo7a_rcv; +#X msg 469 60 \; foo7a_rcv receive foo7_rcv; +#X text 492 106 display scale; +#X msg 471 132 \; foo7_rcv scale \$1; +#X obj 279 193 f; +#X msg 257 172 bang; +#X floatatom 295 171 3 8 50; +#X floatatom 330 193 3 110 200; +#X obj 279 216 pack 0 0; +#X text 323 171 width; +#X text 357 193 height; +#X msg 279 241 \; foo7_rcv size \$1 \$2; +#X msg 37 463 \; foo7_rcv label vu-meter; +#X obj 52 79 f; +#X msg 29 31 bang; +#X floatatom 68 29 3 0 29; +#X floatatom 103 47 3 0 29; +#X text 96 29 background; +#X text 131 48 label-color; +#X msg 290 25 back; +#X msg 290 49 label; +#X msg 252 25 bang; +#N canvas 15 207 606 448 RGB_____________ 0; +#X obj 97 56 inlet; +#X obj 262 53 inlet; +#X obj 339 55 inlet; +#X obj 405 56 inlet; +#X obj 97 270 bang; +#X msg 77 295 0; +#X msg 104 295 1; +#X obj 146 268 bang; +#X msg 132 295 0; +#X msg 160 295 1; +#X obj 265 313 spigot; +#X obj 312 313 spigot; +#X obj 249 385 outlet; +#X text 93 33 select; +#X text 267 28 red; +#X text 337 30 green; +#X text 409 30 blue; +#X obj 405 102 t b f; +#X obj 339 160 +; +#X obj 339 185 t b f; +#X obj 339 216 +; +#X obj 296 385 outlet; +#X obj 28 180 loadbang; +#X obj 296 361 f; +#X obj 249 361 f; +#X obj 262 79 * -65536; +#X obj 339 80 * -256; +#X obj 405 80 * -1; +#X obj 339 247 - 1; +#X obj 97 135 route back label bang; +#X obj 235 168 t b b b; +#X connect 0 0 29 0; +#X connect 1 0 25 0; +#X connect 2 0 26 0; +#X connect 3 0 27 0; +#X connect 4 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 11 1; +#X connect 6 0 10 1; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 8 0 10 1; +#X connect 9 0 11 1; +#X connect 10 0 24 1; +#X connect 11 0 23 1; +#X connect 17 0 18 0; +#X connect 17 1 18 1; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 28 0; +#X connect 22 0 6 0; +#X connect 23 0 21 0; +#X connect 24 0 12 0; +#X connect 25 0 20 0; +#X connect 26 0 18 0; +#X connect 27 0 17 0; +#X connect 28 0 11 0; +#X connect 28 0 10 0; +#X connect 29 0 4 0; +#X connect 29 1 7 0; +#X connect 29 2 30 0; +#X connect 30 0 24 0; +#X connect 30 1 23 0; +#X connect 30 2 28 0; +#X restore 290 86 pd RGB_____________; +#X floatatom 332 55 3 0 255; +#X floatatom 375 55 3 0 255; +#X floatatom 418 56 3 0 255; +#X text 39 3 preset-colors; +#X text 301 0 RGB-colors; +#X text 332 37 red; +#X text 368 36 green; +#X text 416 36 blue; +#X obj 52 104 pack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 1; +#X connect 4 0 30 0; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 7 1; +#X connect 10 0 11 1; +#X connect 11 0 33 0; +#X connect 12 0 16 0; +#X connect 13 0 12 0; +#X connect 14 0 12 1; +#X connect 15 0 16 1; +#X connect 16 0 34 0; +#X connect 21 0 25 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 25 1; +#X connect 25 0 31 0; +#X connect 28 0 38 0; +#X connect 39 0 43 0; +#X connect 40 0 39 0; +#X connect 41 0 39 1; +#X connect 42 0 43 1; +#X connect 43 0 46 0; +#X connect 48 0 66 0; +#X connect 49 0 48 0; +#X connect 50 0 48 1; +#X connect 51 0 66 1; +#X connect 54 0 57 0; +#X connect 55 0 57 0; +#X connect 56 0 57 0; +#X connect 57 0 66 0; +#X connect 57 1 66 1; +#X connect 58 0 57 1; +#X connect 59 0 57 2; +#X connect 60 0 57 3; +#X connect 66 0 29 0; +#X restore 313 188 pd edit; +#N canvas 147 336 290 278 source 0; +#X obj 40 95 random 102; +#X obj 40 171 - 101; +#X obj 40 205 pack 0 0; +#X obj 40 45 metro 300; +#X obj 40 69 t b b; +#X obj 133 95 random 20; +#X obj 40 117 t f f; +#X obj 91 147 +; +#X obj 91 172 - 101; +#X obj 40 21 inlet; +#X obj 40 230 outlet; +#X connect 0 0 6 0; +#X connect 1 0 2 0; +#X connect 2 0 10 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 4 1 5 0; +#X connect 5 0 7 1; +#X connect 6 0 1 0; +#X connect 6 1 7 0; +#X connect 7 0 8 0; +#X connect 8 0 2 1; +#X connect 9 0 3 0; +#X restore 99 62 pd source; +#X obj 263 94 s fff; +#X obj 186 302 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii; +#X text 210 386 updated for Pd version 0.35; +#X text 36 388 graz \, austria 2002; +#X connect 3 0 21 0; +#X connect 7 0 31 0; +#X connect 8 0 9 0; +#X connect 8 1 10 0; +#X connect 21 0 20 0; +#X connect 22 0 23 0; +#X connect 23 0 21 0; +#X connect 23 1 21 1; +#X connect 28 0 8 0; +#X connect 29 0 8 1; +#X connect 31 0 8 0; +#X connect 31 0 32 0; diff --git a/pd/doc/5.reference/wrap~-help.pd b/pd/doc/5.reference/wrap~-help.pd new file mode 100644 index 00000000..81681f30 --- /dev/null +++ b/pd/doc/5.reference/wrap~-help.pd @@ -0,0 +1,26 @@ +#N canvas 182 132 703 319 12; +#X obj 58 220 metro 500; +#X obj 58 195 r metro; +#X msg 575 106 \; metro 0; +#X msg 574 48 \; pd dsp 1 \; metro 1; +#X floatatom 42 121 0 0 0; +#X floatatom 42 277 0 0 0; +#X text 443 271 updated for Pd version 0.33; +#X obj 574 21 loadbang; +#X obj 42 244 snapshot~; +#X obj 42 147 sig~; +#X obj 36 16 wrap~; +#X text 93 16 - remainder modulo 1; +#X text 18 45 wrap~ gives the difference between the input and the +largest integer not exceeding it (for positive numbers this is the +fractional part).; +#X obj 42 171 wrap~; +#X text 127 123 <-- shift-drag here to get non-integers to try; +#X connect 0 0 8 0; +#X connect 1 0 0 0; +#X connect 1 0 0 0; +#X connect 4 0 9 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 9 0 13 0; +#X connect 13 0 8 0; diff --git a/pd/doc/5.reference/writesf~-help.pd b/pd/doc/5.reference/writesf~-help.pd new file mode 100644 index 00000000..7cbb915b --- /dev/null +++ b/pd/doc/5.reference/writesf~-help.pd @@ -0,0 +1,41 @@ +#N canvas 279 74 734 440 12; +#X msg 592 11 \; pd dsp 1; +#X msg 141 163 print; +#X msg 53 83 bang; +#X msg 140 115 start; +#X msg 142 141 stop; +#X obj 53 114 del 1000; +#X text 41 9 writesf~ -- write audio signals to a soundfile; +#X text 230 212 creation argument is number of channels; +#X text 259 234 (1 to 64).; +#X text 193 115 start streaming audio; +#X text 188 141 stop streaming audio; +#X obj 131 207 writesf~ 2; +#X msg 131 31 open /tmp/foo.wav; +#X obj 115 408 soundfiler; +#X text 454 407 updated for Pd version 0.37; +#X text 23 408 see also:; +#X obj 145 185 osc~ 440; +#X text 34 257 writesf~ creates a subthread whose task is to write +audio streams to disk. You need not provide any disk access time between +"open" and "start" \, but between "stop" and the next "open" you must +give the object time to flush all the output to disk.; +#X msg 131 86 open -bytes 4 /tmp/foo.wav; +#X text 300 30 create a new 16-bit soundfile; +#X text 377 59 create 24-bit soundfile; +#X text 376 86 create 32-bit floating-point soundfile; +#X msg 131 59 open -bytes 3 /tmp/foo.wav; +#X text 32 338 The soundfile is 2- or 3-byte fixed point ("pcm") or +4-byte floating-point. The soundfile format is determined by the file +extent ("foo.wav" \, "foo.aiff" \, or "foo.snd").; +#X obj 217 410 readsf~; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 11 0; +#X connect 4 0 11 0; +#X connect 5 0 4 0; +#X connect 12 0 11 0; +#X connect 16 0 11 0; +#X connect 18 0 11 0; +#X connect 22 0 11 0; diff --git a/pd/doc/6.externs/makefile b/pd/doc/6.externs/makefile index f807ba0b..a4e9308c 100644 --- a/pd/doc/6.externs/makefile +++ b/pd/doc/6.externs/makefile @@ -5,28 +5,34 @@ clean: ; rm -f *.pd_linux *.o # ----------------------- NT ----------------------- -pd_nt: foo1.dll foo2.dll dspobj~.dll +pd_nt: obj1.dll obj2.dll obj3.dll obj4.dll obj5.dll dspobj~.dll -.SUFFIXES: .dll +.SUFFIXES: .obj .dll PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo VC="C:\Program Files\Microsoft Visual Studio\Vc98" -PDNTINCLUDE = /I. /I\tcl\include /I\ftp\pd\src /I$(VC)\include +PDNTINCLUDE = /I. /I\tcl\include /I..\..\src /I$(VC)\include PDNTLDIR = $(VC)\lib PDNTLIB = $(PDNTLDIR)\libc.lib \ $(PDNTLDIR)\oldnames.lib \ $(PDNTLDIR)\kernel32.lib \ - \ftp\pd\bin\pd.lib + ..\..\bin\pd.lib .c.dll: cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c link /dll /export:$*_setup $*.obj $(PDNTLIB) +# override explicitly for tilde objects like this: +dspobj~.dll: dspobj~.c; + cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c + link /dll /export:dspobj_tilde_setup $*.obj $(PDNTLIB) + # ----------------------- IRIX 5.x ----------------------- -pd_irix5: foo1.pd_irix5 foo2.pd_irix5 dspobj~.pd_irix5 +pd_irix5: obj1.pd_irix5 obj2.pd_irix5 \ + obj3.pd_irix5 obj4.pd_irix5 obj5.pd_irix5 dspobj~.pd_irix5 .SUFFIXES: .pd_irix5 @@ -40,24 +46,10 @@ SGIINCLUDE = -I../../src/ ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o rm $*.o -# ----------------------- IRIX 6.x ----------------------- - -pd_irix6: foo1.pd_irix6 foo2.pd_irix6 dspobj~.pd_irix6 - -.SUFFIXES: .pd_irix6 - -SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \ - -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \ - -Ofast=ip32 - -.c.pd_irix6: - cc $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c - ld -IPA -n32 -shared -rdata_shared -o $*.pd_irix6 $*.o - rm $*.o - # ----------------------- LINUX i386 ----------------------- -pd_linux: foo1.pd_linux foo2.pd_linux dspobj~.pd_linux +pd_linux: obj1.pd_linux obj2.pd_linux obj3.pd_linux obj4.pd_linux \ + obj5.pd_linux dspobj~.pd_linux .SUFFIXES: .pd_linux @@ -73,3 +65,18 @@ LINUXINCLUDE = -I../../src strip --strip-unneeded $*.pd_linux rm $*.o +# ----------------------- Mac OSX ----------------------- + +pd_darwin: obj1.pd_darwin obj2.pd_darwin \ + obj3.pd_darwin obj4.pd_darwin obj5.pd_darwin dspobj~.pd_darwin + +.SUFFIXES: .pd_darwin + +DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch + +.c.pd_darwin: + cc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o + rm -f $*.o + diff --git a/pd/doc/6.externs/obj1.c b/pd/doc/6.externs/obj1.c new file mode 100644 index 00000000..0618d646 --- /dev/null +++ b/pd/doc/6.externs/obj1.c @@ -0,0 +1,47 @@ +/* code for "obj1" pd class. This takes two messages: floating-point +numbers, and "rats", and just prints something out for each message. */ + +#include "m_pd.h" + + /* the data structure for each copy of "obj1". In this case we + on;y need pd's obligatory header (of type t_object). */ +typedef struct obj1 +{ + t_object x_ob; +} t_obj1; + + /* this is called back when obj1 gets a "float" message (i.e., a + number.) */ +void obj1_float(t_obj1 *x, t_floatarg f) +{ + post("obj1: %f", f); +} + + /* this is called when obj1 gets the message, "rats". */ +void obj1_rats(t_obj1 *x) +{ + post("obj1: rats"); +} + + /* this is a pointer to the class for "obj1", which is created in the + "setup" routine below and used to create new ones in the "new" routine. */ +t_class *obj1_class; + + /* this is called when a new "obj1" object is created. */ +void *obj1_new(void) +{ + t_obj1 *x = (t_obj1 *)pd_new(obj1_class); + post("obj1_new"); + return (void *)x; +} + + /* this is called once at setup time, when this code is loaded into Pd. */ +void obj1_setup(void) +{ + post("obj1_setup"); + obj1_class = class_new(gensym("obj1"), (t_newmethod)obj1_new, 0, + sizeof(t_obj1), 0, 0); + class_addmethod(obj1_class, (t_method)obj1_rats, gensym("rats"), 0); + class_addfloat(obj1_class, obj1_float); +} + diff --git a/pd/doc/6.externs/obj2.c b/pd/doc/6.externs/obj2.c new file mode 100644 index 00000000..14cd134a --- /dev/null +++ b/pd/doc/6.externs/obj2.c @@ -0,0 +1,45 @@ +/* code for the "obj2" pd class. This one, in addition to the "obj1" +code, has an inlet taking numbers. */ + +#include "m_pd.h" + +typedef struct obj2 +{ + t_object x_ob; +} t_obj2; + +void obj2_float(t_obj2 *x, t_floatarg f) +{ + post("obj2: %f", f); +} + +void obj2_rats(t_obj2 *x) +{ + post("obj2: rats"); +} + +void obj2_ft1(t_obj2 *x, t_floatarg g) +{ + post("ft1: %f", g); +} + +t_class *obj2_class; + +void *obj2_new(void) +{ + t_obj2 *x = (t_obj2 *)pd_new(obj2_class); + inlet_new(&x->x_ob, &x->x_ob.ob_pd, gensym("float"), gensym("ft1")); + post("obj2_new"); + return (void *)x; +} + +void obj2_setup(void) +{ + post("obj2_setup"); + obj2_class = class_new(gensym("obj2"), (t_newmethod)obj2_new, + 0, sizeof(t_obj2), 0, 0); + class_addmethod(obj2_class, (t_method)obj2_rats, gensym("rats"), 0); + class_addmethod(obj2_class, (t_method)obj2_ft1, gensym("ft1"), A_FLOAT, 0); + class_addfloat(obj2_class, obj2_float); +} + diff --git a/pd/doc/6.externs/obj3.c b/pd/doc/6.externs/obj3.c new file mode 100644 index 00000000..434fbb95 --- /dev/null +++ b/pd/doc/6.externs/obj3.c @@ -0,0 +1,39 @@ +/* code for the "obj3" pd class. This adds an outlet and a state variable. */ + +#include "m_pd.h" + +typedef struct obj3 +{ + t_object x_ob; + t_outlet *x_outlet; + float x_value; +} t_obj3; + +void obj3_float(t_obj3 *x, t_floatarg f) +{ + outlet_float(x->x_outlet, f + x->x_value); +} + +void obj3_ft1(t_obj3 *x, t_floatarg g) +{ + x->x_value = g; +} + +t_class *obj3_class; + +void *obj3_new(void) +{ + t_obj3 *x = (t_obj3 *)pd_new(obj3_class); + inlet_new(&x->x_ob, &x->x_ob.ob_pd, gensym("float"), gensym("ft1")); + x->x_outlet = outlet_new(&x->x_ob, gensym("float")); + return (void *)x; +} + +void obj3_setup(void) +{ + obj3_class = class_new(gensym("obj3"), (t_newmethod)obj3_new, + 0, sizeof(t_obj3), 0, 0); + class_addmethod(obj3_class, (t_method)obj3_ft1, gensym("ft1"), A_FLOAT, 0); + class_addfloat(obj3_class, obj3_float); +} + diff --git a/pd/doc/6.externs/obj4.c b/pd/doc/6.externs/obj4.c new file mode 100644 index 00000000..3da2a84a --- /dev/null +++ b/pd/doc/6.externs/obj4.c @@ -0,0 +1,47 @@ +/* code for the "obj4" pd class. This adds a creation argument, of +type "float". */ + +#include "m_pd.h" + +typedef struct obj4 +{ + t_object x_ob; + t_outlet *x_outlet; + float x_value; +} t_obj4; + +void obj4_float(t_obj4 *x, t_floatarg f) +{ + outlet_float(x->x_outlet, x->x_value + f); +} + +void obj4_ft1(t_obj4 *x, t_floatarg g) +{ + x->x_value = g; +} + +t_class *obj4_class; + + /* as requested by the new invocation of "class_new" below, the new + routine will be called with a "float" argument. */ +void *obj4_new(t_floatarg f) +{ + t_obj4 *x = (t_obj4 *)pd_new(obj4_class); + inlet_new(&x->x_ob, &x->x_ob.ob_pd, gensym("float"), gensym("ft1")); + x->x_outlet = outlet_new(&x->x_ob, gensym("float")); + /* just stick the argument in the object structure for later. */ + x->x_value = f; + return (void *)x; +} + +void obj4_setup(void) +{ + /* here we add "A_DEFFLOAT" to the (zero-terminated) list of arg + types we declare for a new object. The value will be filled + in as 0 if not given in the object box. */ + obj4_class = class_new(gensym("obj4"), (t_newmethod)obj4_new, + 0, sizeof(t_obj4), 0, A_DEFFLOAT, 0); + class_addmethod(obj4_class, (t_method)obj4_ft1, gensym("ft1"), A_FLOAT, 0); + class_addfloat(obj4_class, obj4_float); +} + diff --git a/pd/doc/6.externs/obj5.c b/pd/doc/6.externs/obj5.c new file mode 100644 index 00000000..687c8e0a --- /dev/null +++ b/pd/doc/6.externs/obj5.c @@ -0,0 +1,54 @@ +/* code for the "obj5" pd class. This shows "gimme" arguments, which have +variable arguments parsed by the routines (both "new" and "rats".) */ + +#include "m_pd.h" + +typedef struct obj5 +{ + t_object x_ob; +} t_obj5; + + /* the "rats" method is called with the selector (just "rats" again) + and an array of the typed areguments, which are each either a number + or a symbol. We just print them out. */ +void obj5_rats(t_obj5 *x, t_symbol *selector, int argcount, t_atom *argvec) +{ + int i; + post("rats: selector %s", selector->s_name); + for (i = 0; i < argcount; i++) + { + if (argvec[i].a_type == A_FLOAT) + post("float: %f", argvec[i].a_w.w_float); + else if (argvec[i].a_type == A_SYMBOL) + post("symbol: %s", argvec[i].a_w.w_symbol->s_name); + } +} + +t_class *obj5_class; + + /* same for the "new" (creation) routine, except that we don't have + "x" as an argument since we have to create "x" in this routine. */ +void *obj5_new(t_symbol *selector, int argcount, t_atom *argvec) +{ + t_obj5 *x = (t_obj5 *)pd_new(obj5_class); + int i; + post("new: selector %s", selector->s_name); + for (i = 0; i < argcount; i++) + { + if (argvec[i].a_type == A_FLOAT) + post("float: %f", argvec[i].a_w.w_float); + else if (argvec[i].a_type == A_SYMBOL) + post("symbol: %s", argvec[i].a_w.w_symbol->s_name); + } + return (void *)x; +} + +void obj5_setup(void) +{ + /* We specify "A_GIMME" as creation argument for both the creation + routine and the method (callback) for the "rats" message. */ + obj5_class = class_new(gensym("obj5"), (t_newmethod)obj5_new, + 0, sizeof(t_obj5), 0, A_GIMME, 0); + class_addmethod(obj5_class, (t_method)obj5_rats, gensym("rats"), A_GIMME, 0); +} + diff --git a/pd/doc/6.externs/test-obj1.pd b/pd/doc/6.externs/test-obj1.pd new file mode 100644 index 00000000..f50ce449 --- /dev/null +++ b/pd/doc/6.externs/test-obj1.pd @@ -0,0 +1,6 @@ +#N canvas 68 38 317 151 12; +#X msg 68 52 5; +#X msg 100 52 rats; +#X obj 67 90 obj1; +#X connect 0 0 2 0; +#X connect 1 0 2 0; diff --git a/pd/doc/6.externs/test-obj2.pd b/pd/doc/6.externs/test-obj2.pd new file mode 100644 index 00000000..1d3fd191 --- /dev/null +++ b/pd/doc/6.externs/test-obj2.pd @@ -0,0 +1,8 @@ +#N canvas 62 333 310 157 12; +#X msg 109 51 rats; +#X msg 157 52 7; +#X msg 68 52 4; +#X obj 68 90 obj2; +#X connect 0 0 3 0; +#X connect 1 0 3 1; +#X connect 2 0 3 0; diff --git a/pd/doc/6.externs/test-obj3.pd b/pd/doc/6.externs/test-obj3.pd new file mode 100644 index 00000000..1072a4af --- /dev/null +++ b/pd/doc/6.externs/test-obj3.pd @@ -0,0 +1,8 @@ +#N canvas 128 288 310 157 12; +#X obj 68 91 obj3; +#X floatatom 67 61 3 0 0 0 - - -; +#X floatatom 108 59 3 0 0 0 - - -; +#X floatatom 70 118 3 0 0 0 - - -; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; diff --git a/pd/doc/6.externs/test-obj4.pd b/pd/doc/6.externs/test-obj4.pd new file mode 100644 index 00000000..619012f5 --- /dev/null +++ b/pd/doc/6.externs/test-obj4.pd @@ -0,0 +1,6 @@ +#N canvas 128 288 310 157 12; +#X floatatom 67 61 3 0 0 0 - - -; +#X floatatom 70 118 3 0 0 0 - - -; +#X obj 68 91 obj4 34; +#X connect 0 0 2 0; +#X connect 2 0 1 0; diff --git a/pd/doc/6.externs/test-obj5.pd b/pd/doc/6.externs/test-obj5.pd new file mode 100644 index 00000000..550f34a1 --- /dev/null +++ b/pd/doc/6.externs/test-obj5.pd @@ -0,0 +1,4 @@ +#N canvas 128 288 310 157 12; +#X obj 15 74 obj5 1 2 3 cis boom bah; +#X msg 15 30 rats 4 5 6 tara tara boum boum; +#X connect 1 0 0 0; diff --git a/pd/doc/7.stuff/synth/1.poly.synth.pd b/pd/doc/7.stuff/synth/1.poly.synth.pd index bd2a95a8..a92a0815 100644 --- a/pd/doc/7.stuff/synth/1.poly.synth.pd +++ b/pd/doc/7.stuff/synth/1.poly.synth.pd @@ -1,5 +1,5 @@ #N canvas 232 162 657 719 12; -#X floatatom 424 666 0 0 100; +#X floatatom 424 666 0 0 100 0 - - -; #N canvas 269 205 698 344 output 0; #X obj 388 156 t b; #X obj 388 105 f; @@ -230,7 +230,7 @@ #X connect 8 0 5 1; #X restore 186 132 pd tables; #X obj 25 117 metro 500; -#X floatatom 67 178 5 0 0; +#X floatatom 67 178 5 0 0 0 - - -; #X obj 25 203 makenote 64 250; #X obj 27 229 pack; #X obj 27 253 s syn-midinoteon; @@ -243,9 +243,9 @@ #X obj 329 474 numset fs x; #X obj 329 503 numset fr x; #X obj 329 532 numset q x; -#X floatatom 101 96 5 0 0; -#X floatatom 155 176 5 0 0; -#X floatatom 115 149 5 0 0; +#X floatatom 101 96 5 0 0 0 - - -; +#X floatatom 155 176 5 0 0 0 - - -; +#X floatatom 115 149 5 0 0 0 - - -; #X obj 25 178 + 24; #X obj 25 149 random 48; #X obj 329 15 preset preset1 x; @@ -253,7 +253,6 @@ #X obj 329 108 preset preset3 x; #X obj 329 155 preset preset4 x; #X obj 330 561 numset 2nd x; -#X obj 330 590 numset 2pc; #X obj 16 626 pack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X text 451 219 amplitude; #X text 440 246 amp attack time; @@ -268,24 +267,25 @@ #X text 448 507 filter release time; #X text 453 535 q; #X text 450 566 2nd osc detune; -#X text 432 596 2nd osc amp (%); +#X text 444 596 2nd osc amp (%); #X text 508 666 OUTPUT LEVEL; #X text 41 14 polyphonic synth with; #X text 40 37 voice presets; #X text 21 74 random-note tester; +#X obj 330 590 numset 2pc x; #X connect 0 0 1 1; #X connect 1 0 0 0; #X connect 2 0 1 2; -#X connect 3 0 39 0; -#X connect 3 1 39 1; +#X connect 3 0 38 0; +#X connect 3 1 38 1; #X connect 4 0 5 0; #X connect 4 1 5 1; #X connect 5 0 3 0; -#X connect 6 0 39 2; -#X connect 7 0 39 3; -#X connect 8 0 39 6; -#X connect 9 0 39 4; -#X connect 10 0 39 5; +#X connect 6 0 38 2; +#X connect 7 0 38 3; +#X connect 8 0 38 6; +#X connect 9 0 38 4; +#X connect 10 0 38 5; #X connect 11 0 1 0; #X connect 12 0 3 0; #X connect 15 0 32 0; @@ -294,18 +294,18 @@ #X connect 17 1 18 1; #X connect 18 0 19 0; #X connect 20 0 15 0; -#X connect 21 0 39 7; -#X connect 22 0 39 8; -#X connect 23 0 39 9; -#X connect 24 0 39 10; -#X connect 25 0 39 11; -#X connect 26 0 39 12; -#X connect 27 0 39 13; +#X connect 21 0 38 7; +#X connect 22 0 38 8; +#X connect 23 0 38 9; +#X connect 24 0 38 10; +#X connect 25 0 38 11; +#X connect 26 0 38 12; +#X connect 27 0 38 13; #X connect 28 0 15 1; #X connect 29 0 17 2; #X connect 30 0 32 1; #X connect 31 0 17 0; #X connect 32 0 31 0; -#X connect 37 0 39 14; -#X connect 38 0 39 15; -#X connect 39 0 13 0; +#X connect 37 0 38 14; +#X connect 38 0 13 0; +#X connect 57 0 38 15; diff --git a/pd/doc/7.stuff/synth/preset4.txt b/pd/doc/7.stuff/synth/preset4.txt index f9ce0b38..ccd58b35 100644 --- a/pd/doc/7.stuff/synth/preset4.txt +++ b/pd/doc/7.stuff/synth/preset4.txt @@ -1,3 +1,4 @@ +list 2pc-in 0 list 2nd-in 0 list q-in 3.01 list fr-in 200 diff --git a/pd/doc/sound/voice.wav b/pd/doc/sound/voice.wav Binary files differindex efb6f45e..8b7f1acc 100644 --- a/pd/doc/sound/voice.wav +++ b/pd/doc/sound/voice.wav |