DJ/VJ scratching system
First my story: (you can skip down to END OF STORY if you want)
Ever since I saw Mike Relm go to town with a DVDJ, I've wanted a system where I could scratch and cue video. However, I haven't wanted to spend the $2500 for a DVDJ. As I was researching, I found a number of different systems. I am not a DJ by trade, so to get a system like Traktor or Serrato with their video modules plus turntables plus hardware plus a DJ mixer, soon everything gets really expensive. But in looking around, I found the Ms.Pinky system and after a little bit, I found a USB turntable on Woot for $60. So I bought it. It was marketed as a DJ turntable, but I knew that it wasn't really serious since it had a belt drive, but it came with a slip-pad and the USB connection meant that I wouldn't need a preamp. And so I spend the $100 on the Ms.Pinky vinyl plus software license (now only $80). This worked decently, but I had a lot of trouble really getting it totally on point. The relative mode worked well, but sometimes would skip if I scratched too vigorously. The absolute mode I couldn't get to work at all. After reading a little more, I came to the conclusion that my signal from vinyl to computer just wasn't strong enough, so I would need maybe a new needle or maybe a different turntable and I didn't really want to spend the money experimenting. I think that the Ms. Pinky system is probably a very good system with the right equipment, but I don't do this professionally, so I don't want to spend the loot on a system.
Earlier, before I bought Ms.Pinky (about two years ago), I had also looked around for a cheap MIDI USB DJ controller and not found one. Well, about a month ago, I saw the ION Discover DJ controller was on sale at Bed, Bath & Beyond for $50. They sold out before I could get one, but Vann's was selling it for $70, so I decided that that was good enough and bought one. I had planned to try to use it with Ms. Pinky since you can hook up MIDI controllers to it. But it turns out that you can hook up MIDI controllers to every control except the turntable, so that was a no go. If I had Max/MSP/Jitter, I could have changed that, but that's also way expensive. So, how should I scratch? My controller came with DJ'ing software and there's also some freeware, like Mixxx, but none of this has video support. So I look around and find Pure Data and GEM.
And I see lots of questions about scratching, how to do it. And there are even some tutorials and small patches out there, but as I look at them, none of them are quite what I'm looking for. The YouTube tutorial is really problematic because it's no good at all for scratching a song. It can create a scratching sound for a small sample, but it's taking the turntable's speed and using that as the position in the sample. If you did that with a longer song, it wouldn't even sound like a scratch. And then there are some which do work right, but none of them keep track of where you are in the playback. So, whenever you start scratching, you're starting from the beginning of the song or the middle.
So, I looked at all this and I said, "Hey, I can do this. I've got my spring break coming up. Looking at how easy PD looks and how much other good (if imperfect) work other people have done, I bet that I could build a good system for audio and video scratching within a week." And, I have.
END OF STORY
So that's what I'm presenting to you, my free audio and video scratching system in Pure Data (Pd-extended, really). I use the name DJ Lease Def, so it's the Lease Def DJ system. It's not quite perfect because it loads its samples into tables using soundfiler which means that it has a huge delay when you load a new file during which the whole thing goes silent. I am unhappy about this, but unsure how to fix it. Otherwise, it's pretty nifty. Anyway, rather than be one big patch, it relies on a system of patches which work with each other. Each of the different parts will come in several versions and you can choose which one you want to use and load up the different parts and they should work together correctly. Right now, for most of the parts there's only one version, but I'll be adding others later.
There's a more detailed instruction manual in the .zip file, but the summary is that you load:
the engine (only one version right now): loads the files, does the actual signal processing and playback
one control patch (three versions to choose from currently, two GUI versions and a MIDI version specific to the Ion Discover DJ): is used to do most of the controlling of the engine other than loading files such as scratching, fading, adjusting volume, etc.
zero or one cueing patch (one version, optional): manages the controls for jumping around to different points in songs
zero or one net patch (one version: video playback): does some sort of add-on. Will probably most commonly be used for video. The net patches have to run in a separate instance of Pd-extended and they listen for signals from the engine via local UDP packets. This is set-up this way because when the audio and video tried to run in the same instance, I would get periodic little pops, clicks, and other unsmoothnesses. The audio part renders 1000 times per second for maximum fidelity, but the video part only renders like 30 or 60 times per second. Pure Data is not quite smooth enough to handle this in a clever real-time multithreading manner to ensure that they both always get their time slices. But you put them in separate processes, it all works fine.
So, anyway, it's real scratching beginning exactly where you were in playing the song and when you stop scratching it picks up just where you left off, you can set and jump to cue points, and it does video which will follow right along with both the scratching and cuing. So I'm pretty proud of it. The downsides are that you have to separate the audio and video files, that the audio has to be uncompressed aiff or wav (and that loading a new file pauses everything for like 10 seconds), that for really smooth video when you're scratching or playing backwards you have to encode it with a codec with no inter-frame encoding such as MJPEG, which results in bigger video files (but the playback scratches perfectly as a result).
So anyway, check it out, let me know what you think. If you have any questions or feedback please share. If anyone wants to build control patches for other MIDI hardware, please do and share them with me. I'd be glad to include them in the download. The different patches communicate using send and receive with a standard set of symbols. I've included documentation about what the expected symbols and values are. Also, if anyone wants me to write patches for some piece of hardware that you have, if you can give me one, I'll be glad to do it.
Keith Irwin (DJ Lease Def)
VisualTracker - request for participants
Here is some more info:
This is development info of VisualTracker for pd (pre alpha 100404)
What is it:
VisualTracker is sample sequencer – it triggers loaded samples in times defined in time line in editor window. Samples can be played in their default speed / length or can be fitted in tempo. In “fit mode” you can define number of bars to fit in and also multiplication of file. All changes have visual interpretation in sample canvases.
VisualTracker for pd (pre alpha 100404) was developed in Pd version 0.41.4-extended, on Windows XP
How to make it work:
- Open VisualTracker_(pre_alpha_100404).pd in pd.
- Editor and Samples window are automatically opened.
- Preset currentstate.vtp is automatically loaded – this preset is saved before closing the patch.
- After first run there are 3 empty sample boxes in samples window and 3 corresponding sample canvases in editor window.
- Load any wav (44100 Hz) by pressing „load“ in selected sample box. No space characters in path or filename are allowed. Loading of these files is aborted and error message appears for several seconds. Name of the successfully loaded sample including full path appears in sample box and also sample canvas in editor window. Size of sample canvas is changed according to the sample length. Try to change global BPM – size of sample canvas is recalculated.
- Check „fit“ to fit sample in current BPM. Set length of sample in bars and multiplication.
- Add another sample by creating object [sample] or just copy existing sample box in samples window.
- Switch to editor window, press CTRL+E to switch to pd edit mode and drag and drop sample canvases to desired position on time line. Sample canvases are automatically snapping to bar columns and rows.
- Switch back to normal mode by CTRL+E
- Press PLAY to replay your sample composition. Samples are played only if corresponding sample canvas is placed in track 1-6. If sample canvas is above the tracks sound is muted.
- Press „save“ in main VisualTracker window to save current preset to a text file. Any name and extension with no spaces is allowed.
- Before closing VisualTracker press „save state & close“. It saves current state to preset named currentstate.vtp and delete all sample boxes from samples window and all sample canvases from editor window. Now you can turn off and eventually save VisualTracker patch. This is important to avoid double appearance of sample canvases because information about samples and composition is stored independently from pd patch and should not be saved inside patch. If there are still some „orphaned“ sample canvases hanging delete them manually.
Components:
- Sample window: place for unlimited amount of [sample] abstractions. Once abstraction is created (by copying or creating the object) corresponding sample canvas is created in editor window. [sample] abstraction is sending data to sample canvas (name, color, size, snapping) and receiving back position. Triggering of sample playback is based on position of sample canvas.
- Editor window: place for sample canvases composition on the top of timeline grid. Sample canvases can be moved by mouse in pd edit mode (CTRL+E). Timeline grid will be extended and improved in next versions.
- Preset save/load: saves and loads presets to/from a text file using [coll] object. Preset contains global values (number of samples in composition, bpm) and local values for each sample box (filename, position, track, multiplication, number of bars, fit switch, color and two unused values).
- Sequencer: located in program subpatch. Very simple - functionality will be extended and improved in next versions
- Other: located in program subpatch. Contains some other patches as colortable, BPM manager, output etc.
Pd sound editor 0.0.1
here is the text... seems to be my only option.
#N canvas 0 22 1280 737 10;
#N canvas 777 105 398 583 codey-code 0;
#N canvas 115 48 1154 665 zoom 0;
#X obj 881 70 r \$0-filesize;
#X obj 854 227 s \$0-length;
#X obj 944 158 s \$0-windowsize;
#X msg 873 173 0;
#X obj 872 196 s \$0-selectstart-r;
#X msg 903 153 1;
#X obj 855 125 t f b b f;
#X obj 901 176 s \$0-selectend-r;
#X obj 136 559 pack 0 0;
#X obj 181 530 tabread original-R;
#X obj 136 582 s -RIGHT;
#X obj 126 507 tabread original-L;
#X obj 80 535 pack 0 0;
#X obj 80 558 s -LEFT;
#X obj 96 175 r \$0-length;
#N canvas 0 22 462 312 untils 0;
#X obj 261 160 f;
#X obj 288 162 + 1;
#X obj 261 138 until;
#X msg 299 132 0;
#X obj 261 107 t f b;
#X obj 261 78 inlet;
#X obj 261 190 outlet;
#X connect 0 0 1 0;
#X connect 0 0 6 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 4 0 2 0;
#X connect 4 1 3 0;
#X connect 5 0 4 0;
#X restore 37 343 pd untils;
#X msg 38 322 16000;
#X obj 673 317 *;
#X obj 37 365 t f f;
#X obj 124 431 *;
#X obj 97 279 / 16000;
#X obj 190 145 r \$0-filesize;
#X obj 175 176 *;
#X text 195 89 fraction of file to graph;
#X obj 891 332 s \$0-offset;
#X obj 860 338 -;
#X obj 860 300 t b f;
#X obj 860 252 r \$0-selectstart;
#X obj 891 276 r \$0-selectend;
#X obj 673 363 s \$0-zoomfraction;
#X obj 176 69 r \$0-zoomfraction;
#X obj 12 299 t b b;
#X obj 11 499 s \$0-done;
#X obj 123 467 +;
#X obj 159 6 r \$0-zoom2sel;
#X obj 715 315 r \$0-zoomfraction;
#X text 158 311 start position (0->filesize);
#X obj 158 429 *;
#X obj 229 367 r \$0-filesize;
#X obj 859 359 s \$0-fraction;
#X obj 685 194 r \$0-fraction;
#X msg 717 255 1;
#X obj 717 275 t f f;
#X obj 672 230 f;
#X obj 161 106 f;
#X obj 471 290 f;
#X obj 495 395 s \$0-zoomoffset;
#X obj 485 234 r \$0-offset;
#X obj 486 262 *;
#X obj 471 168 t b b;
#X obj 496 366 +;
#X msg 570 326 0;
#X obj 159 333 r \$0-zoomoffset;
#X msg 531 327 0;
#X obj 260 405 r \$0-filein;
#X msg 260 427 0;
#X obj 81 205 f;
#X obj 80 243 t b f;
#X obj 58 120 r \$0-filein;
#X obj 59 143 t b;
#X obj 542 282 r \$0-length;
#X obj 543 304 t b b b;
#X msg 89 146 1;
#X obj 83 70 r \$0-zoomed;
#X obj 563 236 r \$0-zoomfraction;
#X msg 220 265 0;
#X obj 219 288 s \$0-selectstart-r;
#X msg 250 245 1;
#X obj 248 268 s \$0-selectend-r;
#X obj 218 219 t b b;
#X obj 160 28 t b b b;
#X obj 535 367 r \$0-zoomoffset;
#X obj 533 65 r \$0-zoom100;
#X obj 532 89 t b b b;
#X obj 855 100 f;
#X obj 851 39 r \$0-filein;
#X obj 468 457 r \$0-fraction;
#X obj 635 462 r \$0-offset;
#X obj 502 481 r \$0-zoomfraction;
#X obj 468 537 *;
#X obj 468 561 s \$0-sel-fraction;
#X obj 502 503 t b f;
#X obj 656 546 *;
#X obj 690 512 t b f;
#X obj 656 598 s \$0-sel-offset;
#X obj 713 461 r \$0-zoomfraction;
#X obj 656 571 +;
#X obj 700 547 r \$0-zoomoffset;
#N canvas 455 151 506 362 wrapend 0;
#X obj 329 69 r \$0-zoomfraction;
#X obj 289 102 +;
#X obj 285 69 t b f;
#X obj 197 104 r \$0-filesize;
#X obj 204 215 -;
#X obj 287 124 t b f;
#X obj 222 155 *;
#X obj 214 185 t b f;
#X obj 204 241 moses 0;
#X obj 190 265 +;
#X obj 181 43 inlet;
#X obj 185 66 t f f;
#X obj 191 291 outlet;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 4 0;
#X connect 3 0 6 0;
#X connect 4 0 8 0;
#X connect 5 0 6 0;
#X connect 5 1 6 1;
#X connect 6 0 7 0;
#X connect 7 0 4 0;
#X connect 7 1 4 1;
#X connect 8 0 9 1;
#X connect 9 0 12 0;
#X connect 10 0 11 0;
#X connect 11 0 9 0;
#X connect 11 1 2 0;
#X restore 288 595 pd wrapend;
#X obj 288 619 t b f;
#X text 326 613 *finds the end of the file;
#X connect 0 0 74 1;
#X connect 3 0 4 0;
#X connect 5 0 7 0;
#X connect 6 0 1 0;
#X connect 6 1 3 0;
#X connect 6 2 5 0;
#X connect 6 3 2 0;
#X connect 8 0 10 0;
#X connect 9 0 8 1;
#X connect 11 0 12 1;
#X connect 12 0 13 0;
#X connect 14 0 56 1;
#X connect 15 0 18 0;
#X connect 16 0 15 0;
#X connect 17 0 29 0;
#X connect 18 0 12 0;
#X connect 18 0 8 0;
#X connect 18 1 19 0;
#X connect 19 0 33 0;
#X connect 20 0 19 1;
#X connect 21 0 22 1;
#X connect 22 0 57 0;
#X connect 25 0 39 0;
#X connect 26 0 25 0;
#X connect 26 1 25 1;
#X connect 26 1 24 0;
#X connect 27 0 26 0;
#X connect 28 0 25 0;
#X connect 30 0 44 1;
#X connect 31 0 32 0;
#X connect 31 1 16 0;
#X connect 33 0 11 0;
#X connect 33 0 9 0;
#X connect 34 0 70 0;
#X connect 35 0 17 1;
#X connect 37 0 33 1;
#X connect 38 0 37 1;
#X connect 40 0 43 1;
#X connect 41 0 42 0;
#X connect 42 0 17 0;
#X connect 42 1 17 1;
#X connect 43 0 17 0;
#X connect 44 0 22 0;
#X connect 45 0 50 0;
#X connect 47 0 48 0;
#X connect 48 0 45 1;
#X connect 49 0 45 0;
#X connect 49 1 43 0;
#X connect 50 0 46 0;
#X connect 51 0 50 1;
#X connect 51 0 48 0;
#X connect 52 0 37 0;
#X connect 53 0 50 0;
#X connect 54 0 55 0;
#X connect 55 0 33 1;
#X connect 56 0 57 0;
#X connect 57 0 31 0;
#X connect 57 1 20 0;
#X connect 58 0 59 0;
#X connect 59 0 56 0;
#X connect 59 0 62 0;
#X connect 60 0 61 0;
#X connect 61 0 53 0;
#X connect 61 1 51 0;
#X connect 61 2 41 0;
#X connect 62 0 44 1;
#X connect 63 0 44 0;
#X connect 64 0 48 1;
#X connect 65 0 66 0;
#X connect 67 0 68 0;
#X connect 69 0 65 0;
#X connect 69 1 67 0;
#X connect 70 0 69 0;
#X connect 70 1 44 0;
#X connect 70 2 49 0;
#X connect 71 0 50 1;
#X connect 72 0 73 0;
#X connect 73 0 59 0;
#X connect 73 2 74 0;
#X connect 74 0 6 0;
#X connect 75 0 74 0;
#X connect 76 0 79 0;
#X connect 77 0 82 0;
#X connect 78 0 81 0;
#X connect 79 0 80 0;
#X connect 81 0 79 0;
#X connect 81 1 79 1;
#X connect 82 0 86 0;
#X connect 83 0 82 0;
#X connect 83 1 82 1;
#X connect 85 0 83 0;
#X connect 86 0 84 0;
#X connect 87 0 86 1;
#X connect 88 0 89 0;
#X restore 78 412 pd zoom;
#N canvas 0 22 793 420 file 0;
#X obj 51 115 soundfiler;
#X obj 52 59 openpanel;
#X msg 54 83 read -resize \$1 original-L original-R;
#X obj 77 170 s \$0-filesize;
#X obj 56 35 r \$0-openfile;
#X obj 51 136 t b f;
#X obj 55 193 s \$0-filein;
#X obj 573 16 table original-L;
#X obj 573 39 table original-R;
#X obj 562 116 table clipboard-L;
#X obj 561 139 table clipboard-R;
#X obj 303 128 soundfiler;
#X msg 306 96 write \$1 original-L original-R;
#X obj 308 48 r \$0-savefile;
#X obj 304 72 savepanel;
#X connect 0 0 5 0;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 6 0;
#X connect 5 1 3 0;
#X connect 12 0 11 0;
#X connect 13 0 14 0;
#X connect 14 0 12 0;
#X restore 72 96 pd file;
#N canvas 327 88 808 653 zoom+scroll 0;
#X obj 154 353 s \$0-zoomoffset;
#X obj 127 329 t b f;
#X obj 126 374 s \$0-zoomed;
#X obj 166 187 r \$0-zoomfraction;
#X obj 118 208 *;
#X obj 127 273 +;
#X obj 156 251 r \$0-zoomoffset;
#X obj 129 300 max 0;
#X obj 11 13 r \$0-goleft;
#X obj 95 13 r \$0-goright;
#X obj 572 98 r \$0-zoomfraction;
#X obj 555 261 clip 0 1;
#X obj 603 307 s \$0-zoomfraction;
#X obj 594 334 s \$0-zoomed;
#X obj 490 21 r \$0-zoomin;
#X obj 568 22 r \$0-zoomout;
#X msg 570 69 2;
#X msg 491 71 0.5;
#X obj 584 539 s \$0-selectend-r;
#X obj 555 512 s \$0-selectstart-r;
#X obj 566 394 r \$0-selectstart;
#X obj 599 417 r \$0-selectend;
#X obj 585 455 *;
#X obj 556 281 t f b f;
#X obj 536 340 t f f;
#X obj 522 108 * 1;
#X obj 521 133 *;
#X obj 525 198 t f f;
#X obj 554 456 *;
#X obj 506 314 expr 1/$f1;
#X obj 115 46 r \$0-nudgeleft;
#X obj 178 71 r \$0-nudgeright;
#X msg 11 57 -0.0625;
#X msg 74 60 0.0625;
#X msg 116 89 -0.015625;
#X msg 177 93 0.015625;
#X msg 282 107 -0.000976562;
#X msg 366 123 0.000976562;
#X obj 281 63 r \$0-nudgeleft2;
#X obj 368 102 r \$0-nudgeright2;
#X obj 525 162 clip 0 1;
#X connect 1 0 2 0;
#X connect 1 1 0 0;
#X connect 3 0 4 1;
#X connect 4 0 5 0;
#X connect 5 0 7 0;
#X connect 6 0 5 1;
#X connect 7 0 1 0;
#X connect 8 0 32 0;
#X connect 9 0 33 0;
#X connect 10 0 26 1;
#X connect 11 0 23 0;
#X connect 14 0 17 0;
#X connect 15 0 16 0;
#X connect 16 0 25 0;
#X connect 17 0 25 0;
#X connect 20 0 28 1;
#X connect 21 0 22 1;
#X connect 22 0 18 0;
#X connect 23 1 13 0;
#X connect 23 2 12 0;
#X connect 24 0 28 0;
#X connect 24 1 22 0;
#X connect 25 0 26 0;
#X connect 26 0 40 0;
#X connect 27 0 29 0;
#X connect 27 1 11 0;
#X connect 28 0 19 0;
#X connect 29 0 24 0;
#X connect 30 0 34 0;
#X connect 31 0 35 0;
#X connect 32 0 4 0;
#X connect 33 0 4 0;
#X connect 34 0 4 0;
#X connect 35 0 4 0;
#X connect 36 0 4 0;
#X connect 37 0 4 0;
#X connect 38 0 36 0;
#X connect 39 0 37 0;
#X connect 40 0 27 0;
#X restore 79 432 pd zoom+scroll;
#N canvas 556 91 708 661 playselection 0;
#X obj 201 597 dac~;
#X obj 150 481 tabread4~ original-L;
#X obj 290 480 tabread4~ original-R;
#X obj 231 185 r \$0-playbackspeed;
#X obj 235 232 tabread \$0-arc;
#X obj 489 516 switch~;
#X msg 475 485 0;
#X msg 520 494 1;
#X obj 55 396 +~;
#X obj 371 143 t f f;
#X obj 299 314 pipe 5;
#X obj 376 323 vline~;
#X obj 179 536 *~;
#X obj 280 538 *~;
#X msg 374 295 0 4 \, 1 5 7;
#X obj 230 207 + 200;
#X obj 50 263 f;
#X msg 35 192 1;
#X obj 49 284 pack 0 1;
#X obj 47 362 vline~;
#X obj 128 88 *;
#X obj 143 29 r \$0-filesize;
#X obj 267 80 *;
#X obj 284 35 r \$0-filesize;
#X obj 267 15 r \$0-sel-offset;
#X obj 126 9 r \$0-sel-fraction;
#X obj 127 56 t b f;
#X obj 266 56 t b f;
#X obj 179 317 >=;
#X obj 180 342 sel 1;
#X obj 49 236 metro 1;
#X msg 196 151 0;
#X obj 37 149 t b b;
#X msg 48 336 \$1 1;
#X msg 94 326 \$1 1;
#X obj 96 354 line 0 0.01;
#X obj 182 401 s \$0-loopit;
#X obj 16 83 r \$0-loopit;
#X obj 78 263 + 44.1;
#X obj 234 257 * 44.1;
#X obj 411 371 - 1;
#X obj 412 394 abs;
#X obj 182 376 spigot 0;
#X obj 370 416 spigot 1;
#X obj 438 329 r \$0-loopsel;
#X obj 467 126 s \$0-playbackspeed-r;
#X msg 469 106 300;
#X obj 467 9 r \$0-playback-norm;
#X obj 489 65 r \$0-arcmade;
#X obj 38 128 r \$0-playnow;
#X obj 567 202 r \$0-play;
#X obj 591 279 s \$0-playnow;
#X obj 571 253 sel 0 1;
#X obj 568 226 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0
1;
#X msg 528 395 set 0;
#X floatatom 214 299 5 0 0 0 - - -;
#X connect 1 0 12 0;
#X connect 2 0 13 0;
#X connect 3 0 15 0;
#X connect 4 0 39 0;
#X connect 6 0 5 0;
#X connect 6 0 30 0;
#X connect 6 0 54 0;
#X connect 7 0 5 0;
#X connect 8 0 1 0;
#X connect 8 0 2 0;
#X connect 9 0 10 0;
#X connect 9 1 14 0;
#X connect 10 0 8 1;
#X connect 11 0 12 1;
#X connect 11 0 13 1;
#X connect 12 0 0 0;
#X connect 13 0 0 1;
#X connect 14 0 11 0;
#X connect 15 0 4 0;
#X connect 16 0 18 0;
#X connect 16 0 38 0;
#X connect 17 0 30 0;
#X connect 18 0 33 0;
#X connect 18 0 34 0;
#X connect 19 0 8 0;
#X connect 20 0 28 1;
#X connect 21 0 20 0;
#X connect 22 0 9 0;
#X connect 23 0 22 0;
#X connect 24 0 27 0;
#X connect 25 0 26 0;
#X connect 26 0 20 0;
#X connect 26 1 20 1;
#X connect 27 0 22 0;
#X connect 27 1 22 1;
#X connect 28 0 29 0;
#X connect 29 0 42 0;
#X connect 29 0 43 0;
#X connect 30 0 16 0;
#X connect 31 0 16 1;
#X connect 31 0 19 0;
#X connect 31 0 35 0;
#X connect 32 0 17 0;
#X connect 32 1 31 0;
#X connect 32 1 7 0;
#X connect 33 0 19 0;
#X connect 34 0 35 0;
#X connect 35 0 28 0;
#X connect 37 0 32 0;
#X connect 38 0 16 1;
#X connect 39 0 38 1;
#X connect 39 0 55 0;
#X connect 40 0 41 0;
#X connect 41 0 43 1;
#X connect 42 0 36 0;
#X connect 43 0 6 0;
#X connect 44 0 42 1;
#X connect 44 0 40 0;
#X connect 46 0 45 0;
#X connect 47 0 46 0;
#X connect 48 0 46 0;
#X connect 49 0 32 0;
#X connect 50 0 53 0;
#X connect 52 0 6 0;
#X connect 52 1 51 0;
#X connect 53 0 52 0;
#X connect 54 0 53 0;
#X restore 160 182 pd playselection;
#N canvas 0 22 541 518 tan-arc 0;
#X obj 201 115 f;
#X obj 229 114 + 1;
#X obj 203 85 until;
#X obj 201 140 t f f;
#X msg 269 87 0;
#X obj 132 2 loadbang;
#X obj 128 246 expr pow($f1 \, 3);
#X obj 127 205 - 0.5;
#X obj 129 225 * 2;
#X obj 127 183 / 1000;
#X msg 129 24 1000;
#X obj 134 290 expr pow(1000 \, $f1);
#X obj 285 285 expr tanh($f1);
#X obj 358 154 f;
#X obj 386 153 + 1;
#X obj 360 124 until;
#X obj 285 249 - 5;
#X obj 358 179 t f f;
#X msg 426 126 0;
#X obj 363 72 loadbang;
#X msg 360 93 100000;
#X obj 285 222 / 10000;
#X obj 326 339 tabwrite \$0-tanh;
#X obj 143 353 tabwrite \$0-arc;
#X obj 161 376 table \$0-arc 1000;
#X obj 323 370 table \$0-tanh 100000;
#X obj 131 47 t b f;
#X obj 44 173 s \$0-arcmade;
#X connect 0 0 1 0;
#X connect 0 0 3 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 9 0;
#X connect 3 1 23 1;
#X connect 4 0 0 1;
#X connect 5 0 10 0;
#X connect 6 0 11 0;
#X connect 7 0 8 0;
#X connect 8 0 6 0;
#X connect 9 0 7 0;
#X connect 10 0 26 0;
#X connect 11 0 23 0;
#X connect 12 0 22 0;
#X connect 13 0 14 0;
#X connect 13 0 17 0;
#X connect 14 0 13 1;
#X connect 15 0 13 0;
#X connect 16 0 12 0;
#X connect 17 0 21 0;
#X connect 17 1 22 1;
#X connect 18 0 13 1;
#X connect 19 0 20 0;
#X connect 20 0 15 0;
#X connect 21 0 16 0;
#X connect 26 0 27 0;
#X connect 26 1 2 0;
#X restore 209 94 pd tan-arc;
#N canvas 0 22 764 631 delete 0;
#X obj 455 164 r \$0-filesize;
#X obj 441 211 *;
#X obj 454 187 t b f;
#X obj 385 52 r \$0-filesize;
#X obj 371 99 *;
#X obj 369 151 +;
#X obj 369 125 * -1;
#X obj 383 75 t b f f;
#X obj 352 299 moses 1000;
#X obj 261 139 f;
#X obj 260 160 moses 1;
#X obj 339 241 f;
#X obj 367 241 + 1;
#X obj 340 208 until;
#X obj 340 181 t f f b;
#X msg 378 209 0;
#X obj 535 234 r \$0-filesize;
#X obj 521 281 *;
#X obj 533 257 t b f f;
#X obj 409 327 +;
#X obj 396 359 tabread original-L;
#X obj 402 398 tabread original-R;
#X obj 325 271 t f f;
#X obj 326 442 s original-L;
#X obj 353 519 s original-R;
#X obj 326 414 pack 0 0;
#X obj 353 496 pack 0 0;
#X msg 231 329 resize \$1;
#X obj 241 193 f;
#X obj 239 354 s original-R;
#X obj 222 375 s original-L;
#X obj 511 209 r \$0-sel-fraction;
#X obj 438 144 r \$0-sel-offset;
#X obj 361 28 r \$0-sel-fraction;
#X obj 244 106 t b b b;
#X obj 142 322 s \$0-filesize;
#X obj 219 234 t f f;
#X obj 106 217 s \$0-refresh;
#X obj 225 57 t b b;
#X obj 222 31 r \$0-delete;
#X obj 251 80 s \$0-sendundo;
#X connect 0 0 2 0;
#X connect 1 0 8 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 7 0;
#X connect 4 0 6 0;
#X connect 5 0 9 1;
#X connect 5 0 28 1;
#X connect 6 0 5 0;
#X connect 7 0 4 0;
#X connect 7 1 4 1;
#X connect 7 2 5 1;
#X connect 8 0 20 0;
#X connect 8 0 21 0;
#X connect 8 1 19 0;
#X connect 9 0 10 0;
#X connect 10 1 14 0;
#X connect 11 0 12 0;
#X connect 11 0 22 0;
#X connect 12 0 11 1;
#X connect 13 0 11 0;
#X connect 14 0 13 0;
#X connect 14 2 15 0;
#X connect 15 0 11 1;
#X connect 16 0 18 0;
#X connect 17 0 19 1;
#X connect 18 0 17 0;
#X connect 18 1 17 1;
#X connect 19 0 20 0;
#X connect 19 0 21 0;
#X connect 20 0 25 1;
#X connect 21 0 26 1;
#X connect 22 0 25 0;
#X connect 22 0 26 0;
#X connect 22 1 8 0;
#X connect 25 0 23 0;
#X connect 26 0 24 0;
#X connect 27 0 29 0;
#X connect 27 0 30 0;
#X connect 28 0 36 0;
#X connect 31 0 17 0;
#X connect 32 0 1 0;
#X connect 33 0 4 0;
#X connect 34 0 37 0;
#X connect 34 1 28 0;
#X connect 34 2 9 0;
#X connect 36 0 35 0;
#X connect 36 1 27 0;
#X connect 38 0 34 0;
#X connect 38 1 40 0;
#X connect 39 0 38 0;
#X restore 172 292 pd delete;
#N canvas 178 115 455 651 silence 0;
#X obj 132 142 r \$0-filesize;
#X obj 118 189 *;
#X obj 131 165 t b f;
#X obj 237 145 r \$0-filesize;
#X obj 223 192 *;
#X obj 236 168 t b f;
#X obj 101 226 f;
#X obj 102 278 f;
#X obj 152 407 f;
#X obj 180 407 + 1;
#X obj 103 253 t b f;
#X obj 153 374 until;
#X obj 113 324 moses 1;
#X obj 153 347 t f f b;
#X msg 191 375 0;
#X obj 14 31 t b b b;
#X obj 114 122 r \$0-sel-offset;
#X obj 213 121 r \$0-sel-fraction;
#X obj 12 6 r \$0-silence;
#X obj 99 549 s original-L;
#X obj 202 548 s original-R;
#X obj 116 481 pack 0 0;
#X obj 205 515 pack 0 0;
#X obj 151 448 +;
#X obj 9 252 s \$0-refresh;
#X obj 59 61 s \$0-sendundo;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 10 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 8 0 23 0;
#X connect 9 0 8 1;
#X connect 10 0 7 0;
#X connect 10 1 23 1;
#X connect 11 0 8 0;
#X connect 12 1 13 0;
#X connect 13 0 11 0;
#X connect 13 2 14 0;
#X connect 14 0 8 1;
#X connect 15 0 24 0;
#X connect 15 1 6 0;
#X connect 15 2 25 0;
#X connect 16 0 1 0;
#X connect 17 0 4 0;
#X connect 18 0 15 0;
#X connect 21 0 19 0;
#X connect 22 0 20 0;
#X connect 23 0 21 0;
#X connect 23 0 22 0;
#X restore 172 316 pd silence;
#N canvas 0 22 703 683 refresh 0;
#X obj 254 522 pack 0 0;
#X obj 299 493 tabread original-R;
#X obj 254 545 s -RIGHT;
#X obj 244 470 tabread original-L;
#X obj 198 498 pack 0 0;
#X obj 198 521 s -LEFT;
#N canvas 0 22 462 312 untils 0;
#X obj 261 160 f;
#X obj 288 162 + 1;
#X obj 261 138 until;
#X msg 299 132 0;
#X obj 261 107 t f b;
#X obj 261 78 inlet;
#X obj 261 190 outlet;
#X connect 0 0 1 0;
#X connect 0 0 6 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 4 0 2 0;
#X connect 4 1 3 0;
#X connect 5 0 4 0;
#X restore 155 306 pd untils;
#X msg 156 285 16000;
#X obj 155 328 t f f;
#X obj 242 394 *;
#X obj 215 242 / 16000;
#X obj 130 262 t b b;
#X obj 241 430 +;
#X text 276 307 start position (0->filesize);
#X obj 276 392 *;
#X obj 291 368 r \$0-filesize;
#X obj 277 329 r \$0-zoomoffset;
#X obj 378 368 r \$0-filein;
#X msg 378 390 0;
#X obj 202 169 f;
#X obj 198 206 t b f;
#X obj 275 82 r \$0-filesize;
#X obj 261 129 *;
#X obj 274 105 t b f;
#X obj 250 58 r \$0-zoomfraction;
#X obj 145 82 r \$0-refresh;
#X obj 147 111 t b b;
#X connect 0 0 2 0;
#X connect 1 0 0 1;
#X connect 3 0 4 1;
#X connect 4 0 5 0;
#X connect 6 0 8 0;
#X connect 7 0 6 0;
#X connect 8 0 4 0;
#X connect 8 0 0 0;
#X connect 8 1 9 0;
#X connect 9 0 12 0;
#X connect 10 0 9 1;
#X connect 11 1 7 0;
#X connect 12 0 3 0;
#X connect 12 0 1 0;
#X connect 14 0 12 1;
#X connect 15 0 14 1;
#X connect 16 0 14 0;
#X connect 17 0 18 0;
#X connect 18 0 12 1;
#X connect 19 0 20 0;
#X connect 20 0 11 0;
#X connect 20 1 10 0;
#X connect 21 0 23 0;
#X connect 22 0 19 1;
#X connect 23 0 22 0;
#X connect 23 1 22 1;
#X connect 24 0 22 0;
#X connect 25 0 26 0;
#X connect 26 1 19 0;
#X restore 75 119 pd refresh;
#N canvas 352 116 690 400 select 0;
#X obj 114 163 s \$0-selectstart-r;
#X obj 273 130 s \$0-selectend-r;
#X obj 43 57 r \$0-selall;
#X obj 120 58 r \$0-selstarts1;
#X msg 84 109 0;
#X obj 137 82 r \$0-selends1;
#X msg 314 98 1;
#X obj 247 21 r \$0-selall;
#X obj 271 44 r \$0-selstarts2;
#X obj 314 73 r \$0-selends2;
#X msg 452 182 \; editor-left-r vis_size \$1 400;
#X msg 451 77 \; editor-middle-r vis_size \$1 400;
#X obj 452 52 * 1000;
#X obj 448 154 * 1000;
#X obj 451 29 r \$0-selectend;
#X obj 450 131 r \$0-selectstart;
#X msg 272 98 0.001;
#X msg 144 105 0.995;
#X connect 2 0 4 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 5 0 17 0;
#X connect 6 0 1 0;
#X connect 7 0 6 0;
#X connect 8 0 16 0;
#X connect 9 0 6 0;
#X connect 12 0 11 0;
#X connect 13 0 10 0;
#X connect 14 0 12 0;
#X connect 15 0 13 0;
#X connect 16 0 1 0;
#X connect 17 0 0 0;
#X restore 76 390 pd select;
#N canvas 465 200 755 428 grid 0;
#X obj 286 279 f \$0;
#X obj 285 256 loadbang;
#X msg 323 282 bang;
#X msg 223 235 0;
#X msg 240 256 410;
#X obj 518 13 loadbang;
#X obj 520 56 s \$0-gridtype-r;
#X obj 454 279 f \$0;
#X obj 453 256 loadbang;
#X msg 491 282 bang;
#X msg 391 235 0;
#X msg 408 256 410;
#X msg 416 329 \; \$2-grid2 vis_size 1 \$1;
#X obj 146 46 r \$0-gridtype;
#X msg 248 329 \; \$2-grid1 vis_size 1 \$1;
#X obj 116 272 f \$0;
#X obj 115 249 loadbang;
#X msg 153 275 bang;
#X msg 53 228 0;
#X msg 78 322 \; \$2-grid vis_size 1 \$1;
#X obj 52 171 > 0;
#X obj 52 194 sel 0 1;
#X obj 223 206 sel 0 1;
#X obj 224 183 > 1;
#X obj 389 206 sel 0 1;
#X obj 390 183 > 2;
#X obj 575 231 s \$0-grid2;
#X msg 571 201 color \$1;
#X msg 643 178 color \$1;
#X floatatom 574 174 5 0 0 0 - - -;
#X obj 645 201 s \$0-grid1;
#X msg 559 114 color \$1;
#X floatatom 573 87 5 0 0 0 - - -;
#X obj 561 137 s \$0-grid;
#X obj 413 308 pack 0 \$0;
#X obj 246 308 pack 0 \$0;
#X obj 76 301 pack 0 \$0;
#X msg 519 34 0;
#X msg 70 249 410;
#X connect 0 0 35 1;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 35 0;
#X connect 4 0 35 0;
#X connect 5 0 37 0;
#X connect 7 0 34 1;
#X connect 8 0 7 0;
#X connect 9 0 7 0;
#X connect 10 0 34 0;
#X connect 11 0 34 0;
#X connect 13 0 20 0;
#X connect 13 0 23 0;
#X connect 13 0 25 0;
#X connect 15 0 36 1;
#X connect 16 0 15 0;
#X connect 17 0 15 0;
#X connect 18 0 36 0;
#X connect 20 0 21 0;
#X connect 21 0 18 0;
#X connect 21 1 38 0;
#X connect 22 0 3 0;
#X connect 22 1 4 0;
#X connect 23 0 22 0;
#X connect 24 0 10 0;
#X connect 24 1 11 0;
#X connect 25 0 24 0;
#X connect 27 0 26 0;
#X connect 28 0 30 0;
#X connect 29 0 27 0;
#X connect 31 0 33 0;
#X connect 32 0 31 0;
#X connect 32 0 28 0;
#X connect 34 0 12 0;
#X connect 35 0 14 0;
#X connect 36 0 19 0;
#X connect 37 0 6 0;
#X connect 38 0 36 0;
#X restore 82 485 pd grid;
#N canvas 735 127 201 188 cut 0;
#X obj 13 30 r \$0-cut;
#X obj 30 84 t b b b;
#X obj 53 128 s \$0-copy;
#X obj 29 154 s \$0-delete;
#X obj 73 105 s \$0-sendundo;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 1 1 2 0;
#X connect 1 2 4 0;
#X restore 73 180 pd cut;
#N canvas 178 115 455 651 gain 0;
#X obj 139 120 r \$0-filesize;
#X obj 125 167 *;
#X obj 138 143 t b f;
#X obj 244 123 r \$0-filesize;
#X obj 230 170 *;
#X obj 243 146 t b f;
#X obj 108 204 f;
#X obj 109 256 f;
#X obj 159 385 f;
#X obj 187 385 + 1;
#X obj 110 231 t b f;
#X obj 160 352 until;
#X obj 120 302 moses 1;
#X obj 160 325 t f f b;
#X msg 198 353 0;
#X obj 14 55 t b b b;
#X obj 121 100 r \$0-sel-offset;
#X obj 220 99 r \$0-sel-fraction;
#X obj 63 627 s original-L;
#X obj 166 626 s original-R;
#X obj 74 588 pack 0 0;
#X obj 169 593 pack 0 0;
#X obj 158 426 +;
#X obj 9 252 s \$0-refresh;
#X obj 157 449 t f f;
#X obj 193 481 tabread original-L;
#X obj 310 480 tabread original-R;
#X obj 195 504 * 1;
#X obj 310 505 * 1;
#X obj 194 530 clip -1 1;
#X obj 311 530 clip -1 1;
#X obj 285 370 r \$0-gainamount;
#X msg 290 276 500;
#X obj 291 252 r \$0-arcmade;
#X obj 291 306 s \$0-gainamount-r;
#X obj 287 398 tabread \$0-arc;
#X obj 12 29 r \$0-gain;
#X obj 78 69 s \$0-sendundo;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 10 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 8 0 22 0;
#X connect 9 0 8 1;
#X connect 10 0 7 0;
#X connect 10 1 22 1;
#X connect 11 0 8 0;
#X connect 12 1 13 0;
#X connect 13 0 11 0;
#X connect 13 2 14 0;
#X connect 14 0 8 1;
#X connect 15 0 23 0;
#X connect 15 1 6 0;
#X connect 15 2 37 0;
#X connect 16 0 1 0;
#X connect 17 0 4 0;
#X connect 20 0 18 0;
#X connect 21 0 19 0;
#X connect 22 0 24 0;
#X connect 24 0 20 0;
#X connect 24 0 21 0;
#X connect 24 1 25 0;
#X connect 24 1 26 0;
#X connect 25 0 27 0;
#X connect 26 0 28 0;
#X connect 27 0 29 0;
#X connect 28 0 30 0;
#X connect 29 0 20 1;
#X connect 30 0 21 1;
#X connect 31 0 35 0;
#X connect 32 0 34 0;
#X connect 33 0 32 0;
#X connect 35 0 27 1;
#X connect 35 0 28 1;
#X connect 36 0 15 0;
#X restore 171 337 pd gain;
#N canvas 178 115 708 654 normalize 0;
#X obj 158 121 r \$0-filesize;
#X obj 144 168 *;
#X obj 157 144 t b f;
#X obj 263 124 r \$0-filesize;
#X obj 249 171 *;
#X obj 262 147 t b f;
#X obj 97 164 f;
#X obj 98 216 f;
#X obj 148 345 f;
#X obj 176 345 + 1;
#X obj 99 191 t b f;
#X obj 149 312 until;
#X obj 109 241 moses 1;
#X msg 187 313 0;
#X obj 14 55 t b b b;
#X obj 140 101 r \$0-sel-offset;
#X obj 239 100 r \$0-sel-fraction;
#X obj 52 587 s original-L;
#X obj 155 586 s original-R;
#X obj 63 548 pack 0 0;
#X obj 158 553 pack 0 0;
#X obj 147 386 +;
#X obj 9 252 s \$0-refresh;
#X obj 146 409 t f f;
#X obj 182 441 tabread original-L;
#X obj 299 440 tabread original-R;
#X obj 184 464 * 1;
#X obj 299 465 * 1;
#X obj 183 490 clip -1 1;
#X obj 300 490 clip -1 1;
#X obj 12 29 r \$0-normalize;
#X obj 262 403 expr 1/$f1;
#X obj 296 258 f;
#X obj 324 258 + 1;
#X obj 297 225 until;
#X msg 335 226 0;
#X obj 149 285 t f f b f;
#X obj 297 287 +;
#X obj 314 348 tabread original-L;
#X obj 431 347 tabread original-R;
#X obj 301 308 t f f;
#X obj 500 455 >;
#X obj 464 481 spigot;
#X obj 464 421 t f f;
#X obj 464 504 t f f;
#X msg 562 434 0;
#X obj 297 198 t f f b b;
#X obj 81 68 s \$0-sendundo;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 10 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 8 0 21 0;
#X connect 9 0 8 1;
#X connect 10 0 7 0;
#X connect 10 1 21 1;
#X connect 10 1 37 1;
#X connect 11 0 8 0;
#X connect 12 1 36 0;
#X connect 13 0 8 1;
#X connect 14 0 22 0;
#X connect 14 1 6 0;
#X connect 14 2 47 0;
#X connect 15 0 1 0;
#X connect 16 0 4 0;
#X connect 19 0 17 0;
#X connect 20 0 18 0;
#X connect 21 0 23 0;
#X connect 23 0 19 0;
#X connect 23 0 20 0;
#X connect 23 1 24 0;
#X connect 23 1 25 0;
#X connect 24 0 26 0;
#X connect 25 0 27 0;
#X connect 26 0 28 0;
#X connect 27 0 29 0;
#X connect 28 0 19 1;
#X connect 29 0 20 1;
#X connect 30 0 14 0;
#X connect 31 0 26 1;
#X connect 31 0 27 1;
#X connect 32 0 33 0;
#X connect 32 0 37 0;
#X connect 33 0 32 1;
#X connect 34 0 32 0;
#X connect 35 0 32 1;
#X connect 36 0 11 0;
#X connect 36 2 13 0;
#X connect 36 3 46 0;
#X connect 37 0 40 0;
#X connect 38 0 43 0;
#X connect 39 0 43 0;
#X connect 40 0 38 0;
#X connect 40 1 39 0;
#X connect 41 0 42 1;
#X connect 42 0 44 0;
#X connect 43 0 42 0;
#X connect 43 1 41 0;
#X connect 44 0 31 0;
#X connect 44 1 41 1;
#X connect 45 0 41 1;
#X connect 46 0 34 0;
#X connect 46 2 35 0;
#X connect 46 3 45 0;
#X restore 172 358 pd normalize;
#N canvas 178 115 840 626 reverse 0;
#X obj 129 105 r \$0-filesize;
#X obj 115 152 *;
#X obj 128 128 t b f;
#X obj 234 108 r \$0-filesize;
#X obj 220 155 *;
#X obj 233 131 t b f;
#X obj 98 189 f;
#X obj 99 241 f;
#X obj 114 539 s clipboard-L;
#X obj 162 480 tabread original-L;
#X obj 117 506 pack 0 0;
#X obj 149 370 f;
#X obj 177 370 + 1;
#X obj 100 216 t b f;
#X obj 150 337 until;
#X obj 84 265 moses 1;
#X obj 149 393 t f f;
#X obj 176 424 +;
#X obj 239 330 s clipboard-R;
#X msg 231 305 resize \$1;
#X obj 222 350 s clipboard-L;
#X obj 206 540 pack 0 0;
#X obj 251 514 tabread original-R;
#X obj 203 573 s clipboard-R;
#X obj 150 310 t f f b;
#X msg 188 338 0;
#X obj 111 85 r \$0-sel-offset;
#X obj 210 84 r \$0-sel-fraction;
#X obj 479 271 f;
#X obj 507 271 + 1;
#X obj 480 238 until;
#X obj 479 294 t f f;
#X obj 480 211 t f f b;
#X msg 518 239 0;
#X obj 507 324 -;
#X obj 507 348 abs;
#X obj 525 388 tabread clipboard-R;
#X obj 513 410 tabread clipboard-L;
#X obj 462 464 pack 0 0;
#X obj 457 388 +;
#X obj 461 494 s original-L;
#X obj 546 492 pack 0 0;
#X obj 549 519 s original-R;
#X obj 59 82 t b b;
#X obj 41 352 s \$0-refresh;
#X obj 58 11 r \$0-reverse;
#X obj 127 286 t f f;
#X obj 58 37 t b b;
#X obj 84 60 s \$0-sendundo;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 4 0 34 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 13 0;
#X connect 7 0 15 0;
#X connect 9 0 10 1;
#X connect 10 0 8 0;
#X connect 11 0 12 0;
#X connect 11 0 16 0;
#X connect 12 0 11 1;
#X connect 13 0 7 0;
#X connect 13 1 17 1;
#X connect 13 1 39 1;
#X connect 14 0 11 0;
#X connect 15 1 46 0;
#X connect 16 0 10 0;
#X connect 16 0 21 0;
#X connect 16 1 17 0;
#X connect 17 0 9 0;
#X connect 17 0 22 0;
#X connect 19 0 18 0;
#X connect 19 0 20 0;
#X connect 21 0 23 0;
#X connect 22 0 21 1;
#X connect 24 0 14 0;
#X connect 24 1 19 0;
#X connect 24 2 25 0;
#X connect 25 0 11 1;
#X connect 26 0 1 0;
#X connect 27 0 4 0;
#X connect 28 0 29 0;
#X connect 28 0 31 0;
#X connect 29 0 28 1;
#X connect 30 0 28 0;
#X connect 31 0 39 0;
#X connect 31 1 34 0;
#X connect 32 0 30 0;
#X connect 32 2 33 0;
#X connect 33 0 28 1;
#X connect 34 0 35 0;
#X connect 35 0 36 0;
#X connect 35 0 37 0;
#X connect 36 0 41 1;
#X connect 37 0 38 1;
#X connect 38 0 40 0;
#X connect 39 0 38 0;
#X connect 39 0 41 0;
#X connect 41 0 42 0;
#X connect 43 0 44 0;
#X connect 43 1 6 0;
#X connect 45 0 47 0;
#X connect 46 0 32 0;
#X connect 46 1 24 0;
#X connect 47 0 43 0;
#X connect 47 1 48 0;
#X restore 173 382 pd reverse;
#N canvas 185 37 460 703 fadeout 0;
#X obj 128 121 r \$0-filesize;
#X obj 114 168 *;
#X obj 127 144 t b f;
#X obj 233 124 r \$0-filesize;
#X obj 219 171 *;
#X obj 232 147 t b f;
#X obj 97 205 f;
#X obj 98 257 f;
#X obj 148 386 f;
#X obj 176 386 + 1;
#X obj 99 232 t b f;
#X obj 149 353 until;
#X obj 109 303 moses 1;
#X obj 149 326 t f f b;
#X msg 187 354 0;
#X obj 16 36 t b b b;
#X obj 110 101 r \$0-sel-offset;
#X obj 209 100 r \$0-sel-fraction;
#X obj 52 651 s original-L;
#X obj 155 650 s original-R;
#X obj 63 612 pack 0 0;
#X obj 158 617 pack 0 0;
#X obj 147 450 +;
#X obj 9 293 s \$0-refresh;
#X obj 146 473 t f f;
#X obj 182 505 tabread original-L;
#X obj 299 504 tabread original-R;
#X obj 184 528 * 1;
#X obj 299 529 * 1;
#X obj 183 554 clip -1 1;
#X obj 300 554 clip -1 1;
#X obj 12 8 r \$0-fadeout;
#X obj 282 401 /;
#X obj 149 413 t f f;
#X obj 283 425 - 1;
#X obj 282 448 abs;
#X obj 75 65 s \$0-sendundo;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 4 0 32 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 10 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 8 0 33 0;
#X connect 9 0 8 1;
#X connect 10 0 7 0;
#X connect 10 1 22 1;
#X connect 11 0 8 0;
#X connect 12 1 13 0;
#X connect 13 0 11 0;
#X connect 13 2 14 0;
#X connect 14 0 8 1;
#X connect 15 0 23 0;
#X connect 15 1 6 0;
#X connect 15 2 36 0;
#X connect 16 0 1 0;
#X connect 17 0 4 0;
#X connect 20 0 18 0;
#X connect 21 0 19 0;
#X connect 22 0 24 0;
#X connect 24 0 20 0;
#X connect 24 0 21 0;
#X connect 24 1 25 0;
#X connect 24 1 26 0;
#X connect 25 0 27 0;
#X connect 26 0 28 0;
#X connect 27 0 29 0;
#X connect 28 0 30 0;
#X connect 29 0 20 1;
#X connect 30 0 21 1;
#X connect 31 0 15 0;
#X connect 32 0 34 0;
#X connect 33 0 22 0;
#X connect 33 1 32 0;
#X connect 34 0 35 0;
#X connect 35 0 27 1;
#X connect 35 0 28 1;
#X restore 174 245 pd fadeout;
#N canvas 78 101 1206 598 undo 0;
#X obj 270 259 tabread original-L;
#X obj 330 231 tabread original-R;
#X obj 245 47 r \$0-filesize;
#X obj 209 297 pack 0 0;
#X obj 232 131 until;
#X obj 230 76 f;
#X obj 223 13 r \$0-sendundo;
#X obj 231 152 f;
#X obj 258 151 + 1;
#X obj 230 175 t f f;
#X obj 266 304 pack 0 0;
#X msg 366 148 \; \$2-undo-L resize \$1 \; \$2-undo-R resize \$1;
#X obj 365 126 pack 0 0;
#X obj 411 102 f \$0;
#X obj 412 78 loadbang;
#X obj 267 350 s \$0-undo-R;
#X obj 210 374 s \$0-undo-L;
#X obj 841 331 pack 0 0;
#X obj 864 165 until;
#X obj 862 110 f;
#X obj 863 186 f;
#X obj 890 185 + 1;
#X obj 862 209 t f f;
#X obj 898 338 pack 0 0;
#X obj 635 30 r \$0-undo;
#X obj 327 200 s \$0-undosize;
#X obj 878 80 r \$0-undosize;
#X msg 973 210 \; original-L resize \$1 \; original-R resize \$1;
#X obj 963 265 tabread \$0-undo-R;
#X obj 902 294 tabread \$0-undo-L;
#X obj 842 408 s original-L;
#X obj 898 384 s original-R;
#X obj 637 281 s \$0-refresh;
#X obj 452 317 r \$0-zoomoffset;
#X obj 423 296 r \$0-zoomfraction;
#X obj 984 185 s \$0-filesize;
#X obj 401 352 f;
#X obj 434 352 f;
#X obj 339 302 t b b;
#X obj 405 384 s \$0-undo-fraction;
#X obj 429 404 s \$0-undo-offset;
#X obj 231 101 t f f f b;
#X obj 635 64 t b b b;
#X obj 703 122 r \$0-undo-fraction;
#X obj 718 146 r \$0-undo-offset;
#X obj 690 214 s \$0-zoomfraction;
#X obj 719 235 s \$0-zoomoffset;
#X obj 690 180 f;
#X obj 719 187 f;
#X obj 663 123 t b b;
#X msg 301 95 0;
#X msg 928 130 0;
#X obj 861 136 t f f f b;
#X obj 17 111 table \$0-undo-L;
#X obj 116 110 table \$0-undo-R;
#X connect 0 0 3 1;
#X connect 1 0 10 1;
#X connect 2 0 5 1;
#X connect 3 0 16 0;
#X connect 4 0 7 0;
#X connect 5 0 41 0;
#X connect 6 0 5 0;
#X connect 7 0 8 0;
#X connect 7 0 9 0;
#X connect 8 0 7 1;
#X connect 9 0 3 0;
#X connect 9 0 10 0;
#X connect 9 1 0 0;
#X connect 9 1 1 0;
#X connect 10 0 15 0;
#X connect 12 0 11 0;
#X connect 13 0 12 1;
#X connect 14 0 13 0;
#X connect 17 0 30 0;
#X connect 18 0 20 0;
#X connect 19 0 52 0;
#X connect 20 0 21 0;
#X connect 20 0 22 0;
#X connect 21 0 20 1;
#X connect 22 0 17 0;
#X connect 22 0 23 0;
#X connect 22 1 28 0;
#X connect 22 1 29 0;
#X connect 23 0 31 0;
#X connect 24 0 42 0;
#X connect 26 0 19 1;
#X connect 28 0 23 1;
#X connect 29 0 17 1;
#X connect 33 0 37 1;
#X connect 34 0 36 1;
#X connect 36 0 39 0;
#X connect 37 0 40 0;
#X connect 38 0 36 0;
#X connect 38 1 37 0;
#X connect 41 0 4 0;
#X connect 41 1 12 0;
#X connect 41 2 25 0;
#X connect 41 3 38 0;
#X connect 41 3 50 0;
#X connect 42 0 32 0;
#X connect 42 1 49 0;
#X connect 42 2 19 0;
#X connect 43 0 47 1;
#X connect 44 0 48 1;
#X connect 47 0 45 0;
#X connect 48 0 46 0;
#X connect 49 0 47 0;
#X connect 49 1 48 0;
#X connect 50 0 7 1;
#X connect 51 0 20 1;
#X connect 52 0 18 0;
#X connect 52 1 27 0;
#X connect 52 2 35 0;
#X connect 52 3 51 0;
#X restore 212 128 pd undo;
#N canvas 178 115 523 658 crop 0;
#X obj 69 -10 r \$0-crop;
#X obj 192 90 r \$0-filesize;
#X obj 178 137 *;
#X obj 191 113 t b f;
#X obj 297 93 r \$0-filesize;
#X obj 283 140 *;
#X obj 296 116 t b f;
#X obj 161 174 f;
#X obj 162 226 f;
#X obj 163 502 s clipboard-L;
#X obj 211 443 tabread original-L;
#X obj 166 469 pack 0 0;
#X obj 198 333 f;
#X obj 226 333 + 1;
#X obj 163 201 t b f;
#X obj 199 300 until;
#X obj 159 250 moses 1;
#X obj 198 356 t f f;
#X obj 225 387 +;
#X obj 288 293 s clipboard-R;
#X msg 280 268 resize \$1;
#X obj 271 313 s clipboard-L;
#X obj 255 503 pack 0 0;
#X obj 300 477 tabread original-R;
#X obj 252 536 s clipboard-R;
#X obj 58 213 f;
#X obj 69 302 f;
#X obj 97 302 + 1;
#X obj 70 269 until;
#X obj 199 273 t f f b;
#X msg 237 301 0;
#X obj 69 324 t f f;
#X obj 28 388 pack 0 0;
#X obj 76 359 tabread clipboard-L;
#X obj 78 65 t b b b;
#X obj 29 471 pack 0 0;
#X obj 74 445 tabread clipboard-R;
#X obj 28 411 s original-L;
#X obj 30 494 s original-R;
#X obj 37 554 s original-R;
#X obj 20 574 s original-L;
#X msg 16 531 resize \$1;
#X obj 54 239 t f f f;
#X obj 56 164 s \$0-filesize;
#X obj 27 110 f;
#X obj 175 70 r \$0-sel-offset;
#X obj 273 69 r \$0-sel-fraction;
#X obj 27 132 t b f;
#X obj 21 189 s \$0-filein;
#X obj 78 16 t b b;
#X obj 104 39 s \$0-sendundo;
#X connect 0 0 49 0;
#X connect 1 0 3 0;
#X connect 2 0 7 1;
#X connect 3 0 2 0;
#X connect 3 1 2 1;
#X connect 4 0 6 0;
#X connect 5 0 8 1;
#X connect 5 0 44 1;
#X connect 6 0 5 0;
#X connect 6 1 5 1;
#X connect 7 0 14 0;
#X connect 8 0 16 0;
#X connect 10 0 11 1;
#X connect 11 0 9 0;
#X connect 12 0 13 0;
#X connect 12 0 17 0;
#X connect 13 0 12 1;
#X connect 14 0 8 0;
#X connect 14 1 18 1;
#X connect 15 0 12 0;
#X connect 16 1 29 0;
#X connect 17 0 11 0;
#X connect 17 0 22 0;
#X connect 17 1 18 0;
#X connect 18 0 10 0;
#X connect 18 0 23 0;
#X connect 20 0 19 0;
#X connect 20 0 21 0;
#X connect 22 0 24 0;
#X connect 23 0 22 1;
#X connect 25 0 42 0;
#X connect 26 0 27 0;
#X connect 26 0 31 0;
#X connect 27 0 26 1;
#X connect 28 0 26 0;
#X connect 29 0 15 0;
#X connect 29 1 20 0;
#X connect 29 1 25 1;
#X connect 29 2 30 0;
#X connect 30 0 12 1;
#X connect 30 0 26 1;
#X connect 31 0 32 0;
#X connect 31 0 35 0;
#X connect 31 1 33 0;
#X connect 31 1 36 0;
#X connect 32 0 37 0;
#X connect 33 0 32 1;
#X connect 34 0 44 0;
#X connect 34 1 25 0;
#X connect 34 2 7 0;
#X connect 35 0 38 0;
#X connect 36 0 35 1;
#X connect 41 0 40 0;
#X connect 41 0 39 0;
#X connect 42 0 41 0;
#X connect 42 1 28 0;
#X connect 44 0 47 0;
#X connect 45 0 2 0;
#X connect 46 0 5 0;
#X connect 47 0 48 0;
#X connect 47 1 43 0;
#X connect 49 0 34 0;
#X connect 49 1 50 0;
#X restore 73 160 pd crop;
#N canvas 185 37 464 707 fadein 0;
#X obj 128 121 r \$0-filesize;
#X obj 114 168 *;
#X obj 127 144 t b f;
#X obj 233 124 r \$0-filesize;
#X obj 219 171 *;
#X obj 232 147 t b f;
#X obj 97 205 f;
#X obj 98 257 f;
#X obj 148 386 f;
#X obj 176 386 + 1;
#X obj 99 232 t b f;
#X obj 149 353 until;
#X obj 109 303 moses 1;
#X obj 149 326 t f f b;
#X msg 187 354 0;
#X obj 16 36 t b b b;
#X obj 110 101 r \$0-sel-offset;
#X obj 209 100 r \$0-sel-fraction;
#X obj 52 651 s original-L;
#X obj 155 650 s original-R;
#X obj 63 612 pack 0 0;
#X obj 158 617 pack 0 0;
#X obj 147 450 +;
#X obj 9 293 s \$0-refresh;
#X obj 146 473 t f f;
#X obj 182 505 tabread original-L;
#X obj 299 504 tabread original-R;
#X obj 184 528 * 1;
#X obj 299 529 * 1;
#X obj 183 554 clip -1 1;
#X obj 300 554 clip -1 1;
#X obj 282 401 /;
#X obj 149 413 t f f;
#X obj 75 65 s \$0-sendundo;
#X obj 13 8 r \$0-fadein;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 4 0 31 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 10 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 8 0 32 0;
#X connect 9 0 8 1;
#X connect 10 0 7 0;
#X connect 10 1 22 1;
#X connect 11 0 8 0;
#X connect 12 1 13 0;
#X connect 13 0 11 0;
#X connect 13 2 14 0;
#X connect 14 0 8 1;
#X connect 15 0 23 0;
#X connect 15 1 6 0;
#X connect 15 2 33 0;
#X connect 16 0 1 0;
#X connect 17 0 4 0;
#X connect 20 0 18 0;
#X connect 21 0 19 0;
#X connect 22 0 24 0;
#X connect 24 0 20 0;
#X connect 24 0 21 0;
#X connect 24 1 25 0;
#X connect 24 1 26 0;
#X connect 25 0 27 0;
#X connect 26 0 28 0;
#X connect 27 0 29 0;
#X connect 28 0 30 0;
#X connect 29 0 20 1;
#X connect 30 0 21 1;
#X connect 31 0 27 1;
#X connect 31 0 28 1;
#X connect 32 0 22 0;
#X connect 32 1 31 0;
#X connect 34 0 15 0;
#X restore 172 267 pd fadein;
#N canvas 178 115 471 667 copy 0;
#X obj 128 80 r \$0-filesize;
#X obj 114 127 *;
#X obj 127 103 t b f;
#X obj 233 83 r \$0-filesize;
#X obj 219 130 *;
#X obj 232 106 t b f;
#X obj 97 164 f;
#X obj 98 216 f;
#X obj 113 514 s clipboard-L;
#X obj 161 455 tabread original-L;
#X obj 116 481 pack 0 0;
#X obj 148 345 f;
#X obj 176 345 + 1;
#X obj 99 191 t b f;
#X obj 149 312 until;
#X obj 109 262 moses 1;
#X obj 148 368 t f f;
#X obj 175 399 +;
#X obj 238 305 s clipboard-R;
#X msg 230 280 resize \$1;
#X obj 221 325 s clipboard-L;
#X obj 205 515 pack 0 0;
#X obj 250 489 tabread original-R;
#X obj 202 548 s clipboard-R;
#X obj 149 285 t f f b;
#X msg 187 313 0;
#X obj 110 60 r \$0-sel-offset;
#X obj 209 59 r \$0-sel-fraction;
#X obj 83 27 r \$0-copy;
#X obj 237 240 t f f;
#X obj 331 285 s \$0-clipsize;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 5 0;
#X connect 4 0 7 1;
#X connect 5 0 4 0;
#X connect 5 1 4 1;
#X connect 6 0 13 0;
#X connect 7 0 15 0;
#X connect 9 0 10 1;
#X connect 10 0 8 0;
#X connect 11 0 12 0;
#X connect 11 0 16 0;
#X connect 12 0 11 1;
#X connect 13 0 7 0;
#X connect 13 1 17 1;
#X connect 14 0 11 0;
#X connect 15 1 24 0;
#X connect 16 0 10 0;
#X connect 16 0 21 0;
#X connect 16 1 17 0;
#X connect 17 0 9 0;
#X connect 17 0 22 0;
#X connect 19 0 18 0;
#X connect 19 0 20 0;
#X connect 21 0 23 0;
#X connect 22 0 21 1;
#X connect 24 0 14 0;
#X connect 24 1 29 0;
#X connect 24 2 25 0;
#X connect 25 0 11 1;
#X connect 26 0 1 0;
#X connect 27 0 4 0;
#X connect 28 0 6 0;
#X connect 29 0 19 0;
#X connect 29 1 30 0;
#X restore 72 204 pd copy;
#N canvas 664 54 512 713 paste 0;
#X obj 182 70 r \$0-filesize;
#X obj 169 128 *;
#X obj 30 346 pack 0 0;
#X obj 62 210 f;
#X obj 90 210 + 1;
#X obj 63 177 until;
#X obj 62 233 t f f;
#X obj 119 380 pack 0 0;
#X obj 63 150 t f f b;
#X msg 101 178 0;
#X obj 150 47 r \$0-sel-offset;
#X msg 388 148 resize \$1;
#X obj 397 173 s original-R;
#X obj 379 193 s original-L;
#X obj 59 289 +;
#X obj 92 302 tabread clipboard-L;
#X obj 103 271 tabread clipboard-R;
#X obj 34 12 r \$0-paste;
#X obj 103 13 r \$0-clipsize;
#X obj 35 54 f;
#X obj 115 414 s original-R;
#X obj 27 378 s original-L;
#X obj 350 35 r \$0-filesize;
#X obj 316 87 +;
#X obj 318 110 t f f;
#X obj 329 220 s \$0-filesize;
#X obj 193 596 pack 0 0;
#X obj 221 372 f;
#X obj 249 372 + 1;
#X obj 221 343 until;
#X obj 225 483 t f f;
#X obj 282 630 pack 0 0;
#X obj 222 539 +;
#X obj 278 664 s original-R;
#X obj 190 628 s original-L;
#X obj 266 521 tabread original-R;
#X obj 253 554 tabread original-L;
#X obj 282 374 r \$0-filesize;
#X obj 222 394 * -1;
#X obj 222 417 +;
#X obj 290 476 r \$0-clipsize;
#X obj 329 190 f;
#X obj 58 99 t f b b b f;
#X obj 218 317 f;
#X obj 32 75 t b f;
#X obj 323 254 r \$0-filesize;
#X obj 307 308 -;
#X obj 308 282 t b f;
#X msg 247 292 0;
#X obj 12 408 s \$0-refresh;
#X connect 0 0 1 1;
#X connect 1 0 14 1;
#X connect 1 0 47 0;
#X connect 2 0 21 0;
#X connect 3 0 4 0;
#X connect 3 0 6 0;
#X connect 4 0 3 1;
#X connect 5 0 3 0;
#X connect 6 0 14 0;
#X connect 6 1 15 0;
#X connect 6 1 16 0;
#X connect 7 0 20 0;
#X connect 8 0 5 0;
#X connect 8 2 9 0;
#X connect 9 0 3 1;
#X connect 10 0 1 0;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 14 0 2 0;
#X connect 14 0 7 0;
#X connect 15 0 2 1;
#X connect 16 0 7 1;
#X connect 17 0 19 0;
#X connect 18 0 19 1;
#X connect 19 0 44 0;
#X connect 22 0 23 1;
#X connect 23 0 24 0;
#X connect 24 0 41 1;
#X connect 24 1 11 0;
#X connect 26 0 34 0;
#X connect 27 0 28 0;
#X connect 27 0 38 0;
#X connect 28 0 27 1;
#X connect 29 0 27 0;
#X connect 30 0 32 0;
#X connect 30 1 35 0;
#X connect 30 1 36 0;
#X connect 31 0 33 0;
#X connect 32 0 26 0;
#X connect 32 0 31 0;
#X connect 35 0 31 1;
#X connect 36 0 26 1;
#X connect 37 0 39 1;
#X connect 38 0 39 0;
#X connect 39 0 30 0;
#X connect 40 0 32 1;
#X connect 41 0 25 0;
#X connect 42 0 8 0;
#X connect 42 1 41 0;
#X connect 42 2 43 0;
#X connect 42 3 48 0;
#X connect 42 4 23 0;
#X connect 43 0 29 0;
#X connect 44 0 49 0;
#X connect 44 1 42 0;
#X connect 45 0 46 0;
#X connect 46 0 43 1;
#X connect 47 0 46 0;
#X connect 47 1 46 1;
#X connect 48 0 27 1;
#X restore 73 225 pd paste;
#N canvas 0 22 753 654 mix 0;
#X obj 274 115 r \$0-clipsize;
#N canvas 0 22 454 304 until 0;
#X obj 261 160 f;
#X obj 288 162 + 1;
#X obj 261 138 until;
#X msg 299 132 0;
#X obj 261 107 t f b;
#X obj 261 78 inlet;
#X obj 261 190 outlet;
#X connect 0 0 1 0;
#X connect 0 0 6 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 4 0 2 0;
#X connect 4 1 3 0;
#X connect 5 0 4 0;
#X restore 249 162 pd until;
#X obj 166 35 r \$0-mix;
#X obj 524 350 r \$0-mixamount;
#X msg 521 141 0.501;
#X obj 521 118 loadbang;
#X obj 522 168 s \$0-mixamount-r;
#X obj 475 229 r \$0-sel-offset;
#X obj 480 308 *;
#X obj 480 262 t b f;
#X obj 523 265 r \$0-filesize;
#X obj 171 72 t b b;
#X obj 249 136 f;
#X obj 249 188 t f f;
#X obj 273 241 t f f;
#X obj 302 265 +;
#X obj 525 371 - 1;
#X obj 526 392 abs;
#X obj 303 430 +;
#X obj 255 459 pack 0 0;
#X obj 197 498 pack 0 0;
#X obj 102 301 tabread original-L;
#X obj 75 323 tabread clipboard-L;
#X obj 198 537 s original-L;
#X obj 256 499 s original-R;
#X obj 276 311 tabread clipboard-R;
#X obj 303 289 tabread original-R;
#X obj 137 407 +;
#X obj 124 136 s \$0-refresh;
#X obj 240 375 +;
#X obj 338 391 * 0.5;
#X obj 299 395 * 0.5;
#X obj 171 369 * 0.5;
#X obj 134 372 * 0.5;
#X connect 0 0 12 1;
#X connect 1 0 13 0;
#X connect 2 0 11 0;
#X connect 3 0 16 0;
#X connect 3 0 31 1;
#X connect 3 0 33 1;
#X connect 4 0 6 0;
#X connect 5 0 4 0;
#X connect 7 0 9 0;
#X connect 8 0 15 1;
#X connect 8 0 29 1;
#X connect 9 0 8 0;
#X connect 9 1 8 1;
#X connect 10 0 8 0;
#X connect 11 0 28 0;
#X connect 11 1 12 0;
#X connect 12 0 1 0;
#X connect 13 0 29 0;
#X connect 13 1 14 0;
#X connect 14 0 25 0;
#X connect 14 0 22 0;
#X connect 14 1 15 0;
#X connect 15 0 26 0;
#X connect 15 0 21 0;
#X connect 16 0 17 0;
#X connect 17 0 30 1;
#X connect 17 0 32 1;
#X connect 18 0 19 1;
#X connect 19 0 24 0;
#X connect 20 0 23 0;
#X connect 21 0 32 0;
#X connect 22 0 33 0;
#X connect 25 0 31 0;
#X connect 26 0 30 0;
#X connect 27 0 20 1;
#X connect 29 0 19 0;
#X connect 29 0 20 0;
#X connect 30 0 18 1;
#X connect 31 0 18 0;
#X connect 32 0 27 1;
#X connect 33 0 27 0;
#X restore 174 404 pd mix;
#X restore 673 451 pd codey-code;
#X obj 47 -27 cnv 15 999 400 editor-right editor-right-r empty 20 12
0 14 -225280 -262144 0;
#X obj 48 -27 cnv 15 147 400 editor-middle editor-middle-r empty 20
12 0 14 -154682 -262144 0;
#X obj 46 -27 cnv 15 24 400 editor-left editor-left-r empty 20 12 0
14 -225280 -262144 0;
#X obj 51 373 hsl 995 24 0 1 0 0 \$0-selectstart \$0-selectstart-r
empty -2 -6 0 10 -228856 -1 -1 2386 0;
#X obj 51 398 hsl 995 24 0 1 0 0 \$0-selectend \$0-selectend-r empty
-2 -6 0 10 -228856 -1 -1 14612 0;
#X text 166 488 zoom;
#X obj 365 459 bng 15 250 50 0 \$0-openfile towruoitwruoirwy open 20
7 0 10 -228856 -1 -1;
#X obj 219 537 bng 15 250 50 0 \$0-zoom2sel twiuyituewyitewu empty
0 -6 0 10 -228856 -1 -1;
#X text 238 535 zoom to selection;
#X obj 179 462 bng 30 250 50 0 \$0-zoomin twiuyituewyitewu + 7 12 0
30 -228856 -1 -99865;
#X obj 149 462 bng 30 250 50 0 \$0-zoomout twiuyituewyitewu - 5 14
0 34 -228856 -1 -99865;
#X obj 675 513 r \$0-filesize;
#X floatatom 675 544 0 0 0 0 - - -;
#X text 943 406 selection region;
#X obj 139 423 bng 40 250 50 0 \$0-goleft ieiuwteyute <- 3 17 0 29
-228856 -1 -258113;
#X obj 219 518 bng 15 250 50 0 \$0-zoom100 ewootwuoitewu empty 0 -6
0 10 -228856 -1 -1;
#X obj 89 423 bng 20 250 50 0 \$0-nudgeleft2 erywiyewir < 4 9 0 15
-228856 -1 -258113;
#X obj 179 423 bng 40 250 50 0 \$0-goright ieiuwteyute -> 3 17 0 29
-228856 -1 -258113;
#X obj 219 423 bng 30 250 50 0 \$0-nudgeright erywiyewir > 9 13 0 25
-228856 -1 -258113;
#X obj 249 423 bng 20 250 50 0 \$0-nudgeright2 erywiyewir > 7 9 0 15
-228856 -1 -258113;
#X obj 109 423 bng 30 250 50 0 \$0-nudgeleft erywiyewir < 7 13 0 25
-228856 -1 -258113;
#X obj 873 452 key;
#X obj 873 473 sel 32;
#X obj 925 510 s \$0-play;
#X obj 925 490 bng 15 250 50 0 empty empty empty 0 -6 0 10 -228856
-1 -1;
#X text 804 452 grid;
#X obj 421 526 bng 15 250 50 0 \$0-crop wtyowteuyoieutwo crop 20 7
0 10 -228856 -1 -1;
#X obj 478 458 bng 15 250 50 0 \$0-delete wtyowteuyoieutwo delete 20
7 0 10 -228856 -1 -1;
#X obj 23 373 bng 24 250 50 0 \$0-selstarts1 ityotwy empty 0 -6 0 10
-228856 -1 -1;
#X obj 1049 398 bng 24 250 50 0 \$0-selends2 ityotwy empty 0 -6 0 10
-228856 -1 -1;
#X obj 219 562 bng 15 250 50 0 \$0-selall werorewoyueorw empty 0 -6
0 10 -228856 -1 -1;
#X text 239 562 select-all;
#X obj 36 72 cnv 10 1010 1 riweywoteuyotewu \$0-gridlong empty 20 12
0 14 -24198 -262144 0;
#X obj 36 272 cnv 10 1010 1 riweywoteuyotewu \$0-gridlong empty 20
12 0 14 -24198 -262144 0;
#X obj 23 -25 vsl 24 394 -100 700 0 0 \$0-playbackspeed \$0-playbackspeed-r
empty 0 -8 0 10 -228856 -1 -1 19650 0;
#X obj 172 -39 cnv 10 1 1 empty \$0-grid1 empty 20 12 0 14 -261681
-262144 0;
#X obj 297 -39 cnv 10 1 1 empty \$0-grid empty 20 12 0 14 -261681 -262144
0;
#X obj 421 -39 cnv 10 1 1 empty \$0-grid1 empty 20 12 0 14 -261681
-262144 0;
#X obj 546 -39 cnv 10 1 1 empty \$0-grid empty 20 12 0 14 -261681 -262144
0;
#X obj 671 -39 cnv 10 1 1 empty \$0-grid1 empty 20 12 0 14 -261681
-262144 0;
#X obj 796 -39 cnv 10 1 1 empty \$0-grid empty 20 12 0 14 -261681 -262144
0;
#X obj 922 -39 cnv 10 1 1 empty \$0-grid1 empty 20 12 0 14 -261681
-262144 0;
#N canvas 0 22 450 300 (subpatch) 0;
#X array -RIGHT 16000 float 2;
#X coords 0 1 16000 -1 1000 200 1;
#X restore 48 173 graph;
#N canvas 0 22 450 300 (subpatch) 0;
#X array -LEFT 16000 float 2;
#X coords 0 1 16000 -1 1000 200 1;
#X restore 48 -27 graph;
#X obj 478 477 bng 15 250 50 0 \$0-silence wtyowteuyoieutwo silence
20 7 0 10 -228856 -1 -1;
#X obj 1049 373 bng 24 250 50 0 \$0-selends1 ityotwy empty 0 -6 0 10
-228856 -1 -1;
#X obj 23 398 bng 24 250 50 0 \$0-selstarts2 ityotwy empty 0 -6 0 10
-228856 -1 -1;
#X obj 365 507 bng 15 250 50 0 \$0-copy wtyowteuyoieutwo copy 20 7
0 10 -228856 -1 -1;
#X obj 674 476 tgl 30 0 \$0-loopsel \$0-loopsel-r LOOP 34 15 0 20 -228856
-1 -1 1 1;
#N canvas 0 22 458 308 cpu 0;
#X obj 118 168 cputime;
#X obj 118 28 loadbang;
#X obj 118 112 metro 1000;
#X msg 118 56 1;
#X obj 118 140 t b b;
#X obj 118 228 * 0.1;
#X obj 118 197 int;
#X obj 118 252 outlet;
#X connect 0 0 6 0;
#X connect 1 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 0 0;
#X connect 4 1 0 1;
#X connect 5 0 7 0;
#X connect 6 0 5 0;
#X restore 1065 -18 pd cpu;
#X floatatom 1065 2 5 0 0 0 - - -;
#X obj 6 165 bng 15 250 50 0 \$0-playback-norm oerwioewuoweu empty
0 -6 0 10 -228856 -1 -1;
#X obj 576 454 vsl 15 70 0 1000 0 0 \$0-gainamount \$0-gainamount-r
empty 0 -8 0 10 -228856 -1 -1 3450 1;
#X obj 576 531 bng 15 250 50 0 \$0-gain oweyuotuotewu gain -3 25 0
10 -228856 -1 -1;
#X text 564 479 --;
#X text 590 479 --;
#X obj 478 496 bng 15 250 50 0 \$0-normalize wtyowteuyoieutwo normalize
20 7 0 10 -228856 -1 -1;
#X obj 478 515 bng 15 250 50 0 \$0-reverse weoytowutowiutwr reverse
20 7 0 10 -228856 -1 -1;
#X obj 478 534 bng 15 250 50 0 \$0-fadeout yiruwtyiutrwyu fade-out
20 7 0 10 -228856 -1 -1;
#X obj 478 553 bng 15 250 50 0 \$0-fadein yiruwtyiutrwyu fade-in 20
7 0 10 -228856 -1 -1;
#X obj 235 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 360 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 484 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 609 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 734 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 859 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 985 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 109 -39 cnv 10 1 1 empty \$0-grid2 empty 20 12 0 14 -233017
-262144 0;
#X obj 97 -49 cnv 15 900 20 empty empty empty 20 12 0 14 -262144 -66577
0;
#X obj 804 469 vradio 15 1 0 4 \$0-gridtype \$0-gridtype-r empty 0
-6 0 10 -228856 -1 -1 0;
#X text 820 468 off;
#X text 820 482 4;
#X text 820 499 8;
#X text 821 513 16;
#X text 238 516 zoom 100%;
#X obj 365 553 bng 15 250 50 0 \$0-undo uyweiuytewiuetw undo 20 7 0
10 -228856 -1 -1;
#X obj 705 545 / 44100;
#X floatatom 705 567 5 0 0 1 seconds - -;
#X obj 421 507 bng 15 250 50 0 \$0-cut wtyowteuyoieutwo cut 20 7 0
10 -228856 -1 -1;
#X obj 365 526 bng 15 250 50 0 \$0-paste rtuiytioytrwoiyirtw paste
20 7 0 10 -228856 -1 -1;
#X obj 614 454 vsl 15 70 0 1 0 0 \$0-mixamount \$0-mixamount-r empty
0 -8 0 10 -228856 -1 -1 3457 1;
#X obj 614 531 bng 15 250 50 0 \$0-mix oweyuotuotewu mix 0 25 0 10
-228856 -1 -1;
#X text 602 479 --;
#X text 628 479 --;
#X obj 365 478 bng 15 250 50 0 \$0-savefile towyotwyotw save 20 7 0
10 -228856 -1 -1;
#X text 923 470 play (spacebar);
#X floatatom -99 445 5 0 0 0 - - -;
#X floatatom 9 437 5 0 0 0 - - -;
#X obj 48 593 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X floatatom 9 531 5 0 0 0 - - -;
#X obj 9 510 <;
#X floatatom 63 531 5 0 0 0 - - -;
#X obj 63 510 >;
#X obj 9 572 moses 1;
#X obj 9 551 change;
#X obj 102 593 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 63 572 moses 1;
#X obj 63 551 change;
#X msg 48 612 0;
#X msg 102 612 1;
#X floatatom -47 535 5 0 0 0 - - -;
#X obj -8 597 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj -47 575 moses 1;
#X obj -47 554 change;
#X floatatom -99 535 5 0 0 0 - - -;
#X obj -60 597 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj -99 576 moses 1;
#X obj -99 555 change;
#X obj 1078 381 loadbang;
#X obj -47 514 < 0.005;
#X floatatom -99 487 5 0 0 0 - - -;
#X floatatom 9 480 5 0 0 0 - - -;
#X obj -99 466 + 0.0001;
#X obj 9 459 - 0.0001;
#X obj -99 514 > 0.987;
#X obj -124 102 random 7000;
#X obj -124 80 metro;
#X floatatom -124 148 5 0 0 0 - - -;
#X obj -124 59 tgl 15 0 empty empty empty 17 7 0 10 -228856 -1 -1 0
1;
#X obj -124 125 * 0.1;
#X msg 1078 405 \; pd dsp 1;
#X obj -94 59 hsl 100 15 10 1000 0 1 empty empty empty -2 -8 0 10 -228856
-1 -1 7800 0;
#X obj -123 247 metro;
#X floatatom -123 310 5 0 0 0 - - -;
#X obj -123 217 tgl 15 0 empty empty empty 17 7 0 10 -228856 -1 -1
0 1;
#X obj -93 201 hsl 100 15 10 1000 0 1 empty empty empty -2 -8 0 10
-228856 -1 -1 5600 0;
#X obj -123 289 * 0.001;
#X floatatom -72 382 5 0 0 0 - - -;
#X obj -123 359 moses 0.1;
#X obj -123 268 random 777;
#X floatatom -54 316 5 0 0 0 - - -;
#X obj -54 295 * 0.001;
#X obj -54 336 moses 0.1;
#X floatatom -54 357 5 0 0 0 - - -;
#X obj -27 216 / 2;
#X obj -54 253 metro;
#X obj -54 229 tgl 15 0 empty empty empty 17 7 0 10 -228856 -1 -1 0
1;
#X obj -54 274 random 100;
#X obj -54 129 tgl 30 0 empty empty empty 17 7 0 10 -258113 -1 -1 0
1;
#X connect 4 0 87 0;
#X connect 5 0 88 0;
#X connect 12 0 13 0;
#X connect 12 0 77 0;
#X connect 22 0 23 0;
#X connect 23 0 25 0;
#X connect 25 0 24 0;
#X connect 50 0 51 0;
#X connect 77 0 78 0;
#X connect 87 0 113 0;
#X connect 88 0 114 0;
#X connect 89 0 99 0;
#X connect 90 0 95 0;
#X connect 91 0 90 0;
#X connect 92 0 98 0;
#X connect 93 0 92 0;
#X connect 94 1 89 0;
#X connect 95 0 94 0;
#X connect 96 0 100 0;
#X connect 97 1 96 0;
#X connect 98 0 97 0;
#X connect 99 0 4 0;
#X connect 100 0 5 0;
#X connect 101 0 104 0;
#X connect 102 0 100 0;
#X connect 103 1 102 0;
#X connect 104 0 103 0;
#X connect 105 0 108 0;
#X connect 106 0 99 0;
#X connect 107 1 106 0;
#X connect 108 0 107 0;
#X connect 109 0 30 0;
#X connect 109 0 121 0;
#X connect 110 0 101 0;
#X connect 111 0 91 1;
#X connect 111 0 93 0;
#X connect 111 0 115 0;
#X connect 112 0 93 1;
#X connect 112 0 110 0;
#X connect 112 0 91 0;
#X connect 113 0 111 0;
#X connect 114 0 112 0;
#X connect 115 0 105 0;
#X connect 116 0 120 0;
#X connect 117 0 116 0;
#X connect 118 0 35 0;
#X connect 119 0 117 0;
#X connect 120 0 118 0;
#X connect 122 0 117 1;
#X connect 123 0 130 0;
#X connect 124 0 129 0;
#X connect 125 0 123 0;
#X connect 126 0 123 1;
#X connect 126 0 135 0;
#X connect 127 0 124 0;
#X connect 128 0 5 0;
#X connect 129 1 128 0;
#X connect 130 0 127 0;
#X connect 131 0 133 0;
#X connect 132 0 131 0;
#X connect 133 0 134 0;
#X connect 134 0 4 0;
#X connect 135 0 136 1;
#X connect 136 0 138 0;
#X connect 137 0 136 0;
#X connect 138 0 132 0;
#X connect 139 0 119 0;
#X connect 139 0 125 0;
#X connect 139 0 137 0;
LEDs on, and video too
I'm pretty sure this is a really basic question.
I've attached my patch.
At the very bottom of the patch you'll see four splits.
For the left-most split, I want nine LEDs to turn on in between those ranges.
For the next one along, I want six LEDs to turn on in between those ranges.
And for the next, I want three LEDs to turn on in between those ranges.
And the last one, I don't want any of the nine LEDs to light up.
Any ideas how I can do this?
I'm also struggling with the video. The patch will be hooked up to a pressure pad. When the user sits on the pressure pad, the video is to start playing. When the user stands up, I want the video to go back to the beginning - but I don't want it to play. I just want it to sit on the first frame. Additionally, if the user sits to the end of the video, I want it to just stay on the last frame until they stand up - at which point it will do the same as I just mentioned - return to frame one and wait to be played again.
Anything you can help me with would be massively appreciated!
Random numbers, timers, projections
Hey everyone.
You'll have to excuse me 'cause I don't have a clue about PD, but need to use it for one of my current projects.
Basically, I want to project some text from my computer onto a blank canvas. I want to use a pressure sensor to detect when a user is sitting down. Once it knows someone is sitting down, I want the text to change.
From here on, I want the text to change after a given amount of time... say... 30 seconds for now?
When it gets to the last slide of text, I want it to do nothing other than display this line of text, until the user places their hand over an LDR. When the user's hand is placed over the LDR, the light will be reduced to a certain level. Once this level is reached, I want PD to time for 15 seconds, and at the end of the 15 seconds, illuminate any random combination of light bulbs and set off a rumble pack beneath where they have put their hand. If the user removes their hand before the 15 seconds is up, I do not want any of the light bulbs to illuminate, and I do not want the rumble pack to go off.
[When certain bulbs are illuminated, I want certain lines of text to be projected.
Say bulbs 1 and 2 are illuminated, but 3, 4 and 5 are not. I would like text to be projected that says "Bulbs 1 and 2 are illuminated. Bulbs 3, 4 and 5 are not". Or say Bulbs 1, 3 and 5 are illuminated, I want text to be projected that says "Bulbs 1, 3 and 5 are illuminated. Bulbs 2 and 4 are not."]
If the user stands up at any point in time, removing pressure from the pressure sensor, I want the initial line of text to be displayed on screen again, and everything to start over.
Sorry if this sounds very complex, please let me know if you can help out at all.
Edit ::
If it makes it any easier, you could ignore the bit that I've put in the square brackets. Instead of this, I would just like one more screen of text to be projected when any combination of the bulbs are illuminated.
Pd-extended 0.40.3 released, dedicated to Jamie Tittle
Finally, it's done! The most polished release of Pd yet. We are further refining Pd into a truly powerful and usable programming platform.
http://puredata.org/downloads/
This release is dedicated to Jamie Tittle, aka tigital, who recently died of cancer. He was a long time and key contributor to Gem and Pd in general, even while he was in the hospital undergoing treatment. He is sorely missed in this community, and I am sure by many others.
Some highlights of this release:
* more functional namespace tools ([declare] and [import])
* new appearance designed to enhance readability
* GLSL shader support in Gem
* usability improvements
* on Mac OS X, you can now build "standalone" applications
* standard locations for user-installed externals
* many bug fixes
Here's the rough changelog:
-
next visual appearance designed for readability
-
default locations for user-installed externals, helpfiles, etc.
GNU/Linux: /usr/local/lib/pd-externals and ~/pd-externals
Mac OS X: /Library/Pd and ~/Library/Pd
Windows: %ProgramFiles%/Common Files/Pd and %UserProfile%/Application Data/Pd -
lots of standard key bindings added:
Enter/Return for OK
Escape for Cancel
Ctrl/Cmd-W closes all windows
on Mac OS X, Cmd-` cycles thru open windows
on Mac OS X, Cmd-m minimizes windows
Ctrl/Cmd-R raises/lowers Pd window
Ctrl/Cmd-Shift-R shrinks/grows Pd window
Ctrl/Cmd-Shift-L clears Pd window's text console
Ctrl/Cmd-B opens the Help Browser -
you can now use "~" in all paths to mean home folder, and on Windows you can use environment variables, lie %UserProfile% in paths
-
improved Cut/Copy/Paste support for working in object and message boxes
-
fixed Cut/Copy/Paste for the Pd window's console
-
[declare] and [import] now sorted out for loading (but much work needs to be done before there namespace support is complete)
-
"File -> Save As" defaults to the Home folder (~/) on Mac OSX
-
new patches default to the folder last saved in
-
included pgp_opengl aka 3dp on GNU/Linux and Mac OS X
-
'hardware' and 'deprecated' removed from libraries loaded by default
-
On Debian/Ubuntu, the packages now install into /usr rather than /usr/local
-
On Mac OS X, you can now build "standalone" applications from the File menu.
-
bug fixes and clean up of [hid] and mapping externals
-
included config in Info.plist for the Spotlight Importer
KNOWN BUGS
-
check http://puredata.info/dev/bugtracker before reporting bugs
-
Escape, Enter, and Ctrl/Cmd-W don't close the Path and Startup preferences
-
pdp_opengl is alpha and will definitely crash Pd
-
loading pdp_opengl will crash Pd if X11 is not open before trying to load it
-
the GUI runs slower in some situations
Problem compiling external on Windows
Hey,
thanks to everyone who responded to my posts both here and in the mailing list. Since then, I've figured out how to compile externals written in C using Microsoft Visual C++ 2005. There's more to document, however, such as how to compile externals using some of the other Windows compilers (Borland, djgpp, etc.), and also how to compile externals written in C++ in Windows. But one thing at a time.
one little thing to note... steps 4 and 7 may seem a little roundabout, but they account for the fact that MSVC sometimes has trouble with spaces in directory names (eg. C://Program Files/). If anyone knows how to override this behavior, post a reply, and I'll try to simplify the steps accordingly.
Updated June 29, 2007:
use [b]C://Progra~1/[/b] instead of [b]C://Program Files/[/b],
use [b]C://Docume~1/[/b] instead of [b]C://Documents and Settings/[/b], etc.
So, without further ado...
How to compile a pd external written in C using Microsoft Visual C++ 2005:
Compared to Windows, linux offers a much more user-friendly environment for compiling pd externals. However, with a little patience, a usable environment can be set up in Windows, and the good news is that everything you need is available for free. There are several reputable Windows-compatible C/C++ compilers out there, but here I'll discuss compiling externals with Microsoft Visual C++ 2005 (MSVC for short).
1. Download and Install Microsoft Visual C++ 2005 Express Edition.
a. Click the link above, then click Go! in the Visual C++ box.
b. Run vcsetup.exe to install the program
(the setup wizard should guide you through the process).
2. Download [url=http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB9267
]Visual C++ 2005 Express Service Pack 1.
a. Click the link above to download the Service Pack.
b. Run VS80sp1-KB926748-X86-INTL.exe to install the program.
3. Create a new project:
a. Open Visual C++.
b. Open the New Project window (Ctrl+Shift+N).
c. In the Project Types pane, select Visual C++.
d. In the Templates pane, select emptyproj.
e. Enter object name (helloworld).
f. Leave Create directory for solution unchecked, and click OK.
4. Import the pd header file:
a. Get m_pd.h here, or, using pd-vanilla (not pd-extended):
1. Open Windows Explorer or My Computer.
2. Navigate to the pd/src/ directory on your system.
3. Open m_pd.h in a text editor (file type is: C/C++ header).
b. Select all (Ctrl+A).
c. Copy selection to the clipboard (Ctrl+C).
d. Back in Visual C++, open the New File window (Ctrl+N).
e. In the Categories pane, select General.
f. In the Templates pane, select Text File, and click Open.
g. Copy the contents of m_pd.h into the editor window (Ctrl+V).
h. Open the Save File As Window (Ctrl+S).
i. Save as m_pd.h.
j. From the File Menu, select Move m_pd.h into; select helloworld.
5. Write the source code for the external in C.
a. Open the New File window (Ctrl+N).
b. In the Categories pane, select General.
c. In the Templates pane, select Text File, and click Open.
d. Write your source code in the editor window.
The following example is taken from the tutorial by Johannes M. Zmoelnig.
#include "m_pd.h"
static t_class *helloworld_class;
typedef struct _helloworld {
t_object x_obj;
} t_helloworld;
void helloworld_bang(t_helloworld *x)
{
post("Hello world !!");
}
void *helloworld_new(void)
{
t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);
return (void *)x;
}
void helloworld_setup(void) {
helloworld_class = class_new(gensym("helloworld"),
(t_newmethod)helloworld_new,
0, sizeof(t_helloworld),
CLASS_DEFAULT, 0);
class_addbang(helloworld_class, helloworld_bang);
}
6. Save and import the source code into the project:
a. Open the Save File As Window (Ctrl+S).
b. Save as helloworld.c.
c. From the File Menu, select Move helloworld.c into; select helloworld.
7. Access the pd library file:
a. Open Windows Explorer or My Computer.
b. Navigate to the pd/bin/ directory on your system.
c. Right-click on pd.lib (file type is: Object File Library) and select Copy.
d. Navigate to the C://TEMP/ directory on your system.
e. Paste the copy of pd.lib in the C://TEMP/ directory (right-click or Ctrl-V).
8. Set configuration properties:
a. Set configuration type to .dll:
1. Back in Visual C++, open the helloworld Property Pages window (Alt+F7).
2. In the left pane, select Configuration Properties >> General.
3. In the right pane, under Project Defaults, click on
Configuration Type, and select Dynamic Library (.dll)
(using the arrow on the right).
b. Add MSW to preprocessor definitions:
1. In the left pane, select
Configuration Properties >> C/C++ >> Preprocessor.
2. In the right pane, type MSW in the Preprocessor Definitions field.
c. Tell compiler which language to use:
1. In the left pane, select
Configuration Properties >> C/C++ >> Advanced.
2. In the right pane, select Compile As.
3. Select Compile as C Code (/TC) by clicking the arrow on the right.
d. Tell linker where to find pd.lib:
1. In the left pane, select Configuration Properties >> Linker >> Input.
2. In the right pane, select Additional Dependencies and enter
C://TEMP/pd.lib.
e. Tell linker to export the setup function:
1. In the left pane, select
Configuration Properties >> Linker >> Command Line.
2. In the right pane, type
/export:helloworld_setup in the Additional options field.
3. Click OK.
9. Compile and link:
a. Use the Build Solution command (F7).
10. Copy the new helloworld.dll file into pd.
a. Open Windows Explorer or My Computer.
b. Navigate to the
My Documents/Visual Studio 2005/Projects/helloworld/Debug/
directory on your system.
c. Right-click on helloworld.dll (file type is: Application Extension)
and select Copy.
d. Navigate to the pd/extra directory on your system.
e. Paste the copy of helloworld.dll in the pd/extra directory
(right-click or Ctrl-V).
11. Test the external in pd.
a. the external should now be a useable object in pd.
b. open a new pd patch and try to create a helloworld object.
c. add a bang to the left inlet and test it out.
d. if the main pd console window displays "Hello world !!",
the external has succeeded.
Hope this helps!
-- middlepedal
Need help with PD externals
SUBJECT: Need help with PD externals
Hi,
-
I have written some code in C/C++. I would now like to create a pd external and be able to run my C/C++ code in pd (windows environment). I would like my PD object to have say 3-4 inlets and 2-3 outlets.
Furthermore at least one of the inlets would contain compound data, something like an array of 10-15 floats.
Thus my external would be a bit more complex than the 'very basic one', which has a single float as inlet, & a single float as outlet. -
I work in the windows environment (currently my operating environment has pentium machines with windows operating systems installed on them (windows XP, or windows 2000 Professional).
I am using a the free DevCPP or DevC++ compiler (version 4.9.9.2) the IDE, (which uses the gnu C compiler MinGW at its base). Furthermore, I am using: Pd version 0.38.4-extended-RC8 (windows platform). I wonder if someone has already developed externals in a same (or similar, i.e. Windows) environment.
- If someone has, can you please mail me a simple compilable code that you might have had prepared, and guide me through the exact steps which one must follow to make a pd external.
- I wish to know, if in the Windows/DevCPP compiler environment, whether it is possbile to create a PD external without creating a dll in windows, or is it always necessary to first create a dll, even in the simplest case?
- Last, but not the least, I must mention here that I don't have "a lot" of experience in pd, so I will appreciate if someone could explain things in an easy to understand style.
But in any case, I will ask again, in case I don't understand something.
I hope that should work.
Thanks and regards,
ps:
The following should actually have been posted as a separate thread, but since its related to the topic above, i continue to write it here:
In addition to what I have asked for above, I would also like some feedback on the following...
SUBJECT2: Creating/Compiling PD externals
My previous unsucessful attempts at creating/understanding the PD external:
I had tried to read through, and tried to implement the sample code in the tutorial, named:
"How to write an External for puredata" available at the iem site...
But I am facing a few problems, and here are some specific queries related to that:
A.) While in the windows environment, must one always need to create a dll first, or is it possible to create a PD external in any other way as well?
B.) If one must do it by first creating a dll, then the code as mentioned in the tutorial would need to be modified and can't just be copy+pasted & compiled directly. I.e.
One needs to paste the data declaration part in the header;
ii) Also one must declare all the subroutine (i.e. procedures/methods) names in the header file as well, while their definition or implementation goes in another main file, which must include our earlier created header file; and finally
iii) One must insert a special prefix before all the methods when are required for the dll...
Am I right about the 3 above mentioned points?
Thanks yet again,
How do you bring in a wav file?
hello liz
first of all you have to create a table (an array)
table sound-file-array 256 for example
next you have to load a file in that table . to do that you have to use the soundfiler object.
you could do that to choose the file you want to load.:
bang (message type)
'
openpanel (object type)
'
-read -resize $1 sound-file-array (message type)
'
soundfiler
that's all. soundfiler 's outlet outputs the filesize.
if you want to use stereo samples , you have to create two arrays and change the message sent to the soundfiler in that way:
-read -resize $1 sound-file-array.L sound-file-array.R (message type)
(it could also be -read -resize $1 table1 table2 )
at least using that way you 'll be limited to 4mb files . if you want to load huge samples , you should rather send this:
-read -maxsize 1e07 $1 sound-file-array (message type)
that 's the way to do that.
but if you want to apply some fx in realtime you could stream a file directly from the harddisk , using sfplay from zexylib.
to output the file you'll have to use sfrecord , i don't recommend tabwrite for such a function . in my opinion it's easier to bounce the file directly to the hdd. else you have to take care of the filesize and to do a mechanism to record sound in a table and after to export it to the hdd.
let me know if it does the job the way you want.
see ya