commit 633af1071fdf7326bc06327a2187c9130986ea47 Author: Dooho Yi Date: Fri Apr 7 00:47:44 2023 +0900 init diff --git a/Rain1.wav b/Rain1.wav new file mode 100755 index 0000000..d1cf9cf Binary files /dev/null and b/Rain1.wav differ diff --git a/_archive.ringringrain_2011/_instruction.txt b/_archive.ringringrain_2011/_instruction.txt new file mode 100644 index 0000000..f265f7c --- /dev/null +++ b/_archive.ringringrain_2011/_instruction.txt @@ -0,0 +1,45 @@ +Instruction +([xx] referring sections in 'Useful Notes') +- +1) building image / set-up ssh. & x11 +-> [a0] +-> [a1: verify ccrma img.] +-> dd image. (8GB Trenscend class 10 microsdhc had been used.) / use rdisk if you are using mac. damn faster. (but, better not use mac for that 5 min.) +-> go get XQuartz, for OSX Lion. +-> [a3: mac's ssh check] + +2) +-> ssh into RPi - ssh -XY ccrma@192.168.105.106 (through Ethernet, this ip is fixed one. mac's ethernet should be manually set as 192.168.105.105/24) +-> [a8] +-> reboot - sudo shutdown -r now (default pw: temppwd) +-> cd /sys/class/sound and look around.. card0 should be identified as your USB interface.. / [b08], [b13] +-> [b02: upload files into RPi] +-> pd & - to edit things.. and test sound.. etc. +-> arduino & - edit firmata code. and re-fuse arduino. +-> don't try to do heavy monitoring. gui overload is really significant.. / use very slow monitoring in GUI mode and change the freq. back with text editor (like, nano) +-> pd -nogui XXXX & +-> be warned with [b16] / it really matters. +-> if it works fine. you can check stream type (for example, S16_LE, 44.1kHz sth..) / [b14] +-> finally, [b15] +-> and reboot. and give it a long run test. +-> that's it. done. clap. + + +Useful Notes (ToC) -> useful_notes.txt +- +a0 Powering the RPi +a1 Verify if the the hash key is the same (optional), in the terminal run: +a3 locale problem of ssh +a4 finding raspberry's ip! --> arp -a +a8 assigning UX1-EA (usb audio dev.) as a default dev. +- +b01 fsck for raspberry pi +b02 Using scp to transfer files in Linux +b03 blocked RPi +b08 identifying sound card (ex. hw:0,1) +b09 setting file for pd +b10 make a backup of image +b13 identifying the cards.. (for jack..) +b14 where to find current stream info! +b15 starting automatically pd patch. +b16 don't use loadbang -> pd dsp 1; when you do pd with nogui-mode on RPi). NEVER! \ No newline at end of file diff --git a/_archive.ringringrain_2011/_useful_notes.txt b/_archive.ringringrain_2011/_useful_notes.txt new file mode 100644 index 0000000..a5336d1 --- /dev/null +++ b/_archive.ringringrain_2011/_useful_notes.txt @@ -0,0 +1,344 @@ +Useful Notes + +- ToC Start - +a0 Powering the RPi +a1 Verify if the the hash key is the same (optional), in the terminal run: +a3 locale problem of ssh +a4 finding raspberry's ip! --> arp -a +a8 assigning UX1-EA (usb audio dev.) as a default dev. +- +b01 fsck for raspberry pi +b02 Using scp to transfer files in Linux +b03 blocked RPi +b08 identifying sound card (ex. hw:0,1) +b09 setting file for pd +b10 make a backup of image +b13 identifying the cards.. (for jack..) +b14 where to find current stream info! +b15 starting automatically pd patch. +b16 don't use loadbang -> pd dsp 1; on RPi. NEVER! +- ToC End - + + + +- +a0 Powering the RPi +If you use the micro-USB power input to power the RPi you might encounter sudden reboots when plugging in or unplugging USB devices. If you want to be sure your RPi doesn't reboot in such cases you can try backfeed powering your RPi by connecting the power supply to one of the USB ports or use a powered USB hub that backfeeds. Also make sure your power supply can provide at least 700mA at 5V. If you plan on using an USB interface you might need more power so try to find a power supply that provides 2A or even more. +- +a1 Verify if the the hash key is the same (optional), in the terminal run: +shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip +- +a3 locale problem of ssh +- +Q. perl: warning: Setting locale failed. +perl: warning: Please check that your locale settings: + LANGUAGE = (unset), + LC_ALL = (unset), + LC_CTYPE = "UTF-8", + LANG = "en_GB.UTF-8" + are supported and installed on your system. +perl: warning: Falling back to the standard locale ("C"). +locale: Cannot set LC_CTYPE to default locale: No such file or directory +locale: Cannot set LC_ALL to default locale: No such file or directory +- +A. +- +Does this problem happen if you are using a particular program on the RPi, or is it when you use SSH from another computer? + +If it happens when using SSH, this is a fault on the SSH client, not the RPi. For example using an Ubuntu machine as the SSH client will cause this problem. + +To fix this SSH problem, edit the file /etc/ssh/ssh_config on the SSH client (not the RPi) and remove the line +SendEnv LANG LC_* + +This stops the client sending invalid locale information to the RPi. +- +Thanks bredman, your tip worked for me. +In my case, however, the conf file is /etc/ssh_config (ssh client on Mac Mountain Lion, 10.8.2). I commented like this: +# SendEnv LANG LC_* +and now I can even run python scripts on the raspberry that earlier caused errors like +"UnicodeEncodeError: 'ascii' codec can't encode character ..." +Great! +- +a4 finding raspberry's ip! --> arp -a +- +a8 assigning UX1-EA (usb audio dev.) as a default dev. +- +How to Assign USB Audio as primary sound device in ALSA +- +This is for anyone that has a fried sound card (like me) in their laptop. Instead of replacing the motherboard or tossing your old laptop in the trash, get a pair of USB speakers and follow this procedure: +(This procedure will get sound going without the need of installing pulse audio) +1) Backup the file /etc/modprobe.d/alsa-base.conf +Note: Original alsa-base.conf: +# autoloader aliases +install sound-slot-0 /sbin/modprobe snd-card-0 +install sound-slot-1 /sbin/modprobe snd-card-1 +install sound-slot-2 /sbin/modprobe snd-card-2 +install sound-slot-3 /sbin/modprobe snd-card-3 +install sound-slot-4 /sbin/modprobe snd-card-4 +install sound-slot-5 /sbin/modprobe snd-card-5 +install sound-slot-6 /sbin/modprobe snd-card-6 +install sound-slot-7 /sbin/modprobe snd-card-7 +# Cause optional modules to be loaded above generic modules +install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; } +install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; } +install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; } +# Prevent abnormal drivers from grabbing index 0 +options bt87x index=-2 +options cx88_alsa index=-2 +options snd-atiixp-modem index=-2 +options snd-intel8x0m index=-2 +options snd-via82xx-modem index=-2 +# Keep snd-pcsp from beeing loaded as first soundcard +options snd-pcsp index=-2 +# Keep snd-usb-audio from beeing loaded as first soundcard +options snd-usb-audio index=-2 + +Add: +# Assign USB Audio as default sound card +options snd_usb_audio index=-1 + +Delete these last TWO lines in the file: +# Keep snd-usb-audio from beeing loaded as first soundcard +options snd-usb-audio index=-2 + +New file should look like this: +# autoloader aliases +install sound-slot-0 /sbin/modprobe snd-card-0 +install sound-slot-1 /sbin/modprobe snd-card-1 +install sound-slot-2 /sbin/modprobe snd-card-2 +install sound-slot-3 /sbin/modprobe snd-card-3 +install sound-slot-4 /sbin/modprobe snd-card-4 +install sound-slot-5 /sbin/modprobe snd-card-5 +install sound-slot-6 /sbin/modprobe snd-card-6 +install sound-slot-7 /sbin/modprobe snd-card-7 +# Cause optional modules to be loaded above generic modules +install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; } +install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; } +install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; } + +# Assign USB Audio as default sound card +options snd_usb_audio index=-1 + +# Prevent abnormal drivers from grabbing index 0 +options bt87x index=-2 +options cx88_alsa index=-2 +options snd-atiixp-modem index=-2 +options snd-intel8x0m index=-2 +options snd-via82xx-modem index=-2 +# Keep snd-pcsp from beeing loaded as first soundcard +options snd-pcsp index=-2 +NOTE 1: If a sound card is not found by ALSA... ALSA config will not make USB the default sound card, so this tells method tells ALSA, USB audio is what you want it to use. +NOTE 2: PCM still needs to be checked in the Alsa Mixer. +NOTE 3: The volume icon will now show up in Tint2 (needs to be unmuted) - reboot may be required. +NOTE 4: The spelling of the word "beeing", it's a typo by the original coder. +- +b01 fsck for raspberry pi + +/dev/mmcblk0p2 is the root file system, so it is not easily unmounted. It could probably be re-mounted as read-only, but a simpler way is to schedule a fsck at the next reboot. + +sudo touch /forcefsck +then reboot. Or reboot with + +shutdown -rF now +which does the same. +- +Where are fsck results logged at boot time, after /forcefsck? +- +pi@raspberrypi /var/log/fsck $ ls -la +total 16 +drwxr-xr-x 2 root root 4096 Feb 9 09:52 . +drwxr-xr-x 9 root root 4096 May 16 23:44 .. +-rw-r----- 1 root adm 125 May 16 23:44 checkfs +-rw-r----- 1 root adm 221 May 16 23:44 checkroot +pi@raspberrypi /var/log/fsck $ cat checkroot +Log of fsck -C -f -a -t ext4 /dev/mmcblk0p2 +Thu May 16 23:44:09 2013 + +fsck from util-linux 2.20.1 +/dev/mmcblk0p2: 67102/237568 files (0.2% non-contiguous), 384740/937984 blocks + +Thu May 16 23:44:17 2013 +---------------- +pi@raspberrypi /var/log/fsck $ cat checkfs +Log of fsck -C -R -A -a -f +Thu May 16 23:44:21 2013 + +fsck from util-linux 2.20.1 + +Thu May 16 23:44:21 2013 +---------------- +- +b02 Using scp to transfer files in Linux +- +To copy files from the local system to a remote system: +scp file... user@host.domain:path +- +b03 blocked RPi +- +The new overclocking functionality seems to have destroyed my RasPi. + +I updated everything in my Debian distro yesterday to try out the new overclocking functionality. Ran raspi_config and selected the "medium" option (900 mHz, 2 volt, etc.) + +The unit ran fine, no hiccups. Just a bit faster. I've had the unit up and running for the better part of 2 weeks now without powering it down, so I left it running overnight at the new speed. + +This morning it appears to be dead. Open SSH sessions to my desktop were dead, unit wasn't pingable, and no HDMI video. Removed power and rebooted. Nothing. It looks like the network traffic lights show activity when powered up, but nothing else is working. + +So now what? Since this seems to have been a "sanctioned" upgrade, is this a warranty issue? Is it warning to others? Did someone not test this stuff properly? +- +Locked up again, on the very lowest raspi-config overclock setting ("modest"). It continues to require a complete unplugging of everything to get it to reboot. +- +b08 identifying sound card (ex. hw:0,1) + +Use "aplay -l" to get a list of the devices on your system. The hw:X,Y comes from this mapping of your hardware -- in this case, X is the card number, while Y is the device number. +- +You might be able to get away with using device aliases instead of the "hw:X,Y" -- this is what the output of "aplay -L" shows. The "something:CARD=FOO,DEV=Y" stuff is the alias, and probably won't change between different device plug-ins +- +b09 setting file for pd +- +$ nano /home/derek/.pdsettings + +GNU nano 1.2.4 File: /home/derek/.pdsettings + +audioapi: 5 +noaudioin: False +audioindev1: 0 4 +noaudioout: False +audiooutdev1: 0 4 +audiobuf: 50 +rate: 44100 +nomidiin: False +midiindev1: 0 +nomidiout: False +midioutdev1: 0 +path1: /home/derek/pd/rradical/memento +path2: /home/derek/pd/ix_toxy +path3: /home/derek/pd/berlin +path4: /home/derek/pd/rradical/memento/tutorial +path5: /home/derek/workshop_patches +path6: /usr/local/lib/pd/doc/5.reference +path7: /usr/local/lib/pd/extra/xjimmies +npath: 7 +standardpath: 1 +verbose: 0 +loadlib1: pool +loadlib2: iemlib1 +loadlib3: iemlib2 +loadlib4: iem_mp3 +loadlib5: iem_t3_lib +loadlib6: OSC +loadlib7: zexy +nloadlib: 7 +defeatrt: 0 +flags: -alsamidi -rt +- +b10 make a backup of image +- +using ubuntu live cd. boot with trial mode. +- +sudo fdisk -l +sudo dd if=/dev/sda of=./OldHD.img +- +b13 identifying the cards.. (for jack..) +- +What is the output of +cat /proc/asound/cards +with the DAC attached? + +And could you also post the output of +sudo lsusb -vvv +- +b14 where to find current stream info! +(how can i check what is current playback setup at the moment of playback) +- +ccrma@satellite /proc/asound/card0 $ cat stream0 +EDIROL UA-1EX at usb-bcm2708_usb-1.3, full speed : USB Audio + +Playback: + Status: Running + Interface = 0 + Altset = 1 + Packet Size = 288 + Momentary freq = 44100 Hz (0x2c.199a) + Interface 0 + Altset 1 + Format: S24_3LE + Channels: 2 + Endpoint: 1 OUT (ADAPTIVE) + Rates: 44100 + +Capture: + Status: Stop + Interface 1 + Altset 1 + Format: S24_3LE + Channels: 2 + Endpoint: 2 IN (ASYNC) + Rates: 44100 +- +reference +- +http://guayadeque.org/index.php?p=/discussion/576/correct-switching-between-16bit-and-24bit-usb-audio-playback/p1 +- +b15 starting automatically pd patch. +- +ccrma@satellite ~/on-startup $ cat load_default_patch +#!/bin/bash +# +# This script starts pd with a default patch (please see all the way below) +# +# +# +# Copyright (C) Feb. 2012 Edgar Berdahl for the Satelite CCRMA project +# +# The above copyright notice including the copyright holders and this +# permission notice shall be included in all copies, substantial +# portions, or derivatives of the Software and Software portions. +# +# The end-user documentation included with the redistribution, if any, +# must include the following acknowledgment: "This product includes +# software developed in the course of the Satellite CCRMA project +# (http://ccrma.stanford.edu/satellite/) and its contributors", in the +# same place and form as other third-party acknowledgments. In +# addition, this acknowledgment must appear in the software itself in +# the same form and location as other such third-party acknowledgments. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation except subject to the additional +# attribution requirements described beneath the copyright notice above. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the modified GNU General Public +# License along with this program. + + + + +# It is necessary to specify the complete path of the pd patch: +#pd -nogui /home/ccrma/on-startup/default-patch.pd +pd -nogui /home/ccrma/puredata/paperPerfm2011_B-E_RPi_nogui.pd +- +b16 don't use loadbang -> pd dsp 1; on RPi. NEVER! +- +Why Doesn't Audio Work When I Start Pd In -Nogui Mode? +When I start Pd from the commandline without the GUI in -nogui mode, it can't connect to the soundcard and no dsp seems to happen? +Currently, there is a bug in Pd where starting in -nogui mode causes patches to be run before it connects to a sound card. When running the graphical user interface (GUI), there is a delay as the GUI is being setup before patches are run and this is enough time for the sound to be connected. Basically, if you are turning on dsp with a loadbang like this: +[loadbang] +| +[; pd dsp 1( +Pd tries to start dsp, but in -nogui mode, it hasn't yet connected to the sound card and you'll get an error similar to this: +snd_pcm_open (input): Device or resource busy +snd_pcm_open (output): Device or resource busy +If so, you can add a delay before starting the dsp: +[loadbang] +| +[delay 100] +| +[; pd dsp 1( +This should be enough time to mimic the delay taken when the GUI starts and the sound card can be setup before dsp is started. +- +http://puredata.info/docs/faq/why-doesn-t-audio-work-when-i-start-pd-in-nogui-mode \ No newline at end of file diff --git a/_archive.ringringrain_2011/puredata/.DS_Store b/_archive.ringringrain_2011/puredata/.DS_Store new file mode 100644 index 0000000..a0d3f81 Binary files /dev/null and b/_archive.ringringrain_2011/puredata/.DS_Store differ diff --git a/_archive.ringringrain_2011/puredata/Rain1.wav b/_archive.ringringrain_2011/puredata/Rain1.wav new file mode 100755 index 0000000..d1cf9cf Binary files /dev/null and b/_archive.ringringrain_2011/puredata/Rain1.wav differ diff --git a/_archive.ringringrain_2011/puredata/mapping2float-help.pd b/_archive.ringringrain_2011/puredata/mapping2float-help.pd new file mode 100644 index 0000000..5f3a4e7 --- /dev/null +++ b/_archive.ringringrain_2011/puredata/mapping2float-help.pd @@ -0,0 +1,13 @@ +#N canvas 0 0 450 300 10; +#X obj 46 23 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144 +-1 -1 0 1; +#X floatatom 45 208 5 0 0 0 - - -; +#X obj 46 168 mapping2float 20 30; +#X text 122 25 convert 0 1 range to whatever float interval; +#X floatatom 111 135 5 0 0 0 - - -; +#X floatatom 176 135 5 0 0 0 - - -; +#X text 230 136 set output range; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X connect 4 0 2 1; +#X connect 5 0 2 2; diff --git a/_archive.ringringrain_2011/puredata/mapping2float.pd b/_archive.ringringrain_2011/puredata/mapping2float.pd new file mode 100644 index 0000000..7e02c3d --- /dev/null +++ b/_archive.ringringrain_2011/puredata/mapping2float.pd @@ -0,0 +1,24 @@ +#N canvas 796 236 280 351 10; +#X obj 32 32 inlet; +#X obj 32 273 outlet; +#X obj 93 31 inlet; +#X obj 148 32 inlet; +#X text 113 57 min; +#X text 167 51 max; +#X obj 93 112 t b f; +#X obj 93 164 - \$1; +#X obj 93 138 \$2; +#X obj 133 81 loadbang; +#X obj 32 205 *; +#X obj 32 235 + \$1; +#X connect 0 0 10 0; +#X connect 2 0 6 0; +#X connect 2 0 11 1; +#X connect 3 0 8 0; +#X connect 6 0 8 0; +#X connect 6 1 7 1; +#X connect 7 0 10 1; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 10 0 11 0; +#X connect 11 0 1 0; diff --git a/_archive.ringringrain_2011/puredata/paperPerfm2011_B-E_RPi.pd b/_archive.ringringrain_2011/puredata/paperPerfm2011_B-E_RPi.pd new file mode 100755 index 0000000..23b7e02 --- /dev/null +++ b/_archive.ringringrain_2011/puredata/paperPerfm2011_B-E_RPi.pd @@ -0,0 +1,1149 @@ +#N canvas 0 33 1400 809 10; +#X floatatom 48 551 5 0 0 0 - - - 0; +#X floatatom 94 550 5 0 0 0 - - - 0; +#X obj 54 709 loadbang; +#X floatatom 136 549 5 0 0 0 - - - 0; +#X floatatom 178 550 5 0 0 0 - - - 0; +#X floatatom 220 550 5 0 0 0 - - - 0; +#X floatatom 260 550 5 0 0 0 - - - 0; +#X floatatom 303 550 5 0 0 0 - - - 0; +#X floatatom 348 550 5 0 0 0 - - - 0; +#X floatatom 388 550 5 0 0 0 - - - 0; +#N canvas 0 22 450 300 (subpatch) 0; +#X array array99 2.57403e+06 float 0; +#X coords 0 0.3 2.57403e+06 -0.3 100 200 1; +#X restore 417 709 graph; +#X floatatom 68 1006 0 0 0 0 - - - 0; +#X msg 68 894 set array99; +#X obj 68 948 tabplay~ array99; +#X obj 54 766 soundfiler; +#X floatatom 54 789 0 0 0 0 - - - 0; +#X obj 68 980 env~ 16384; +#X obj 247 1040 *~; +#X text 296 1050 audio output; +#X obj 247 1059 hip~ 5; +#X msg 83 923 bang; +#X obj 161 970 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 54 815 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000; +#X obj 602 802 +; +#X obj 632 803 +; +#X obj 647 828 +; +#X obj 663 803 +; +#X obj 680 829 +; +#X obj 696 803 +; +#X obj 713 829 +; +#X obj 727 803 +; +#X obj 746 829 +; +#X obj 820 801 +; +#X obj 834 828 +; +#X obj 854 801 +; +#X floatatom 275 990 5 0 0 0 - - - 0; +#X obj 115 1521 dac~; +#X obj 161 1486 *~; +#X obj 75 1489 *~; +#X obj 326 1495 *~; +#X obj 240 1498 *~; +#X obj 280 1530 dac~; +#X obj 454 1544 dac~; +#X obj 500 1509 *~; +#X obj 414 1512 *~; +#X obj 620 1561 dac~; +#X obj 666 1526 *~; +#X obj 580 1529 *~; +#X obj 12 1447 osc~ 261.63; +#X obj 795 1567 dac~; +#X obj 841 1532 *~; +#X obj 755 1535 *~; +#X obj 969 1569 dac~; +#X obj 1015 1534 *~; +#X obj 929 1537 *~; +#X obj 1145 1575 dac~; +#X obj 1105 1543 *~; +#X obj 275 962 mavg; +#X floatatom 846 1272 5 0 0 0 - - - 0; +#X obj 847 1211 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 90 1425 mavg; +#X obj 176 1424 mavg; +#X obj 255 1434 mavg; +#X obj 341 1433 mavg; +#X obj 429 1448 mavg; +#X obj 515 1447 mavg; +#X obj 595 1465 mavg; +#X obj 681 1464 mavg; +#X obj 770 1471 mavg; +#X obj 856 1470 mavg; +#X obj 944 1473 mavg; +#X obj 1030 1472 mavg; +#X obj 1120 1479 mavg; +#X floatatom 930 1278 5 0 0 0 - - - 0; +#X obj 927 1214 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 71 846 delay 2000; +#X obj 83 873 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000; +#X obj 313 938 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X floatatom 314 992 5 0 0 0 - - - 0; +#X obj 103 1453 osc~ 293.66; +#X obj 186 1455 osc~ 329.63; +#X obj 267 1460 osc~ 349.23; +#X obj 353 1472 osc~ 392; +#X obj 440 1476 osc~ 440; +#X obj 523 1489 osc~ 493.88; +#X obj 613 1494 osc~ 523.25; +#X obj 698 1495 osc~ 587.33; +#X obj 788 1500 osc~ 659.26; +#X obj 872 1497 osc~ 698.46; +#X obj 962 1502 osc~ 783.99; +#X obj 1048 1503 osc~ 880; +#X msg 279 714 1; +#X obj 279 691 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X text 309 711 testers; +#X obj 1324 1576 dac~; +#X obj 1284 1544 *~; +#X obj 1299 1480 mavg; +#X obj 1188 1541 *~; +#X obj 1203 1479 mavg; +#X obj 868 828 +; +#X obj 888 801 +; +#X obj 1135 1509 osc~ 976; +#X obj 1227 1504 osc~ 1072; +#X obj 248 1159 dac~; +#X msg 493 197 1; +#X obj 493 174 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 464 174 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X msg 464 197 0; +#X obj 846 1303 s mavg; +#X obj 931 1305 s amp; +#X obj 129 1424 r mavg; +#X obj 197 1399 r mavg; +#X obj 1154 1475 r mavg; +#X obj 1219 1445 r mavg; +#X obj 290 1433 r mavg; +#X obj 361 1405 r mavg; +#X obj 467 1447 r mavg; +#X obj 531 1416 r mavg; +#X obj 633 1464 r mavg; +#X obj 702 1434 r mavg; +#X obj 806 1470 r mavg; +#X obj 872 1437 r mavg; +#X obj 982 1471 r mavg; +#X obj 1047 1438 r mavg; +#X obj 91 1389 *; +#X obj 143 1388 *; +#X obj 308 1397 *; +#X obj 255 1398 *; +#X obj 106 1354 r amp; +#X obj 184 1359 r amp; +#X obj 266 1370 r amp; +#X obj 338 1371 r amp; +#X obj 443 1378 r amp; +#X obj 429 1412 *; +#X obj 482 1411 *; +#X obj 595 1429 *; +#X obj 648 1428 *; +#X obj 770 1435 *; +#X obj 823 1434 *; +#X obj 944 1437 *; +#X obj 997 1436 *; +#X obj 1120 1443 *; +#X obj 1170 1443 *; +#X obj 1299 1444 *; +#X obj 599 1384 r amp; +#X obj 652 1387 r amp; +#X obj 780 1400 r amp; +#X obj 848 1391 r amp; +#X obj 962 1404 r amp; +#X obj 517 1380 r amp; +#X obj 1135 1413 r amp; +#X obj 1193 1404 r amp; +#X obj 1021 1404 r amp; +#X obj 1311 1415 r amp; +#X obj 1341 1449 r mavg; +#N canvas 0 22 450 300 pan 0; +#X obj 93 -99 f 1; +#X obj 93 -75 -; +#X obj 129 -52 *; +#X obj 78 -51 *; +#X obj 78 -145 inlet; +#X obj 144 -145 inlet; +#X obj 78 -10 outlet; +#X obj 129 -10 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 1; +#X connect 2 0 7 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 4 0 3 0; +#X connect 4 0 2 0; +#X connect 5 0 1 1; +#X connect 5 0 2 1; +#X restore 262 1104 pd pan; +#X obj 247 1129 *~; +#X obj 280 1129 *~; +#X obj 454 1090 snapshot~; +#X floatatom 454 1120 5 0 0 0 - - - 0; +#X obj 454 1013 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 521 1038 +~ 1; +#X obj 521 1065 *~ 0.5; +#X obj 521 1010 osc~ 0.1; +#X obj 501 1121 s pann; +#X obj 300 1073 r pann; +#X msg 846 1240 25; +#X msg 929 1248 0.05; +#X msg 313 962 120; +#X obj 454 1038 metro 200; +#X msg 440 1148 1; +#X obj 262 1016 * 6; +#X obj 361 1071 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X msg 321 1098 1; +#X floatatom 68 572 5 0 0 0 - - - 0; +#X floatatom 114 571 5 0 0 0 - - - 0; +#X floatatom 156 570 5 0 0 0 - - - 0; +#X floatatom 198 571 5 0 0 0 - - - 0; +#X floatatom 240 571 5 0 0 0 - - - 0; +#X floatatom 280 571 5 0 0 0 - - - 0; +#X floatatom 323 571 5 0 0 0 - - - 0; +#X floatatom 368 571 5 0 0 0 - - - 0; +#X obj 67 617 s c1; +#X obj 81 638 s c2; +#X obj 104 616 s c3; +#X obj 116 638 s c4; +#X obj 138 616 s c5; +#X obj 151 638 s c6; +#X obj 172 616 s c7; +#X obj 185 637 s c8; +#X obj 208 615 s c9; +#X obj 220 637 s c10; +#X obj 268 614 s c11; +#X obj 282 635 s c12; +#X obj 310 613 s c13; +#X obj 322 636 s c14; +#X obj 349 614 s c15; +#X obj 362 636 s c16; +#X obj 390 614 s c17; +#X obj 80 1300 r c1; +#X obj 167 1296 r c2; +#X obj 249 1309 r c3; +#X obj 327 1306 r c4; +#X obj 423 1321 r c5; +#X obj 585 1317 r c7; +#X obj 669 1332 r c8; +#X obj 765 1342 r c9; +#X obj 852 1345 r c10; +#X obj 953 1360 r c11; +#X obj 1034 1349 r c12; +#X obj 1121 1359 r c13; +#X obj 1203 1351 r c14; +#X obj 1301 1362 r c15; +#X obj 624 723 r c1; +#X obj 638 744 r c2; +#X obj 661 722 r c3; +#X obj 673 744 r c4; +#X obj 695 722 r c5; +#X obj 708 744 r c6; +#X obj 729 722 r c7; +#X obj 742 743 r c8; +#X obj 765 721 r c9; +#X obj 777 743 r c10; +#X obj 824 721 r c11; +#X obj 838 742 r c12; +#X obj 866 720 r c13; +#X obj 878 743 r c14; +#X obj 905 721 r c15; +#X obj 918 743 r c16; +#X obj 946 721 r c17; +#X obj 902 828 +; +#X obj 922 801 +; +#X obj 506 1320 r c6; +#X text 6 7 .; +#X msg 28 79 close; +#X obj 28 210 arduino 0; +#X obj 28 35 loadbang; +#X msg 86 134 devicename /dev/ttyACM0; +#X obj 86 73 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000; +#X msg 86 158 devices; +#X msg 86 181 info; +#N canvas 570 288 451 224 ver 0; +#X obj 23 7 inlet; +#X obj 250 100 cnv 15 145 17 empty \$0-version_cnv empty 4 10 0 12 +#c4c4fc #000000 0; +#X obj 23 157 send \$0-version_cnv; +#X msg 23 132 label \$1; +#X obj 48 103 symbol; +#X obj 38 77 loadbang; +#X msg 96 78 bang; +#X obj 309 163 outlet; +#X obj 23 29 route version bang; +#X obj 383 161 outlet; +#X obj 23 52 makesymbol Firmata-%s.%s; +#X connect 0 0 8 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 8 0 10 0; +#X connect 8 1 7 0; +#X connect 8 1 6 0; +#X connect 8 2 7 0; +#X connect 8 2 9 0; +#X connect 10 0 3 0; +#X coords 0 -1 1 1 145 17 1 250 100; +#X restore 111 249 pd ver; +#N canvas 568 269 424 226 firmware 0; +#X obj 123 2 inlet; +#X obj 250 100 cnv 15 145 17 empty \$0-firmware_cnv empty 4 10 0 12 +#e0c4fc #404040 0; +#X msg 123 156 label \$1; +#X obj 148 127 symbol; +#X obj 138 101 loadbang; +#X msg 196 102 bang; +#X obj 123 181 send \$0-firmware_cnv; +#X obj 123 24 route firmware; +#X obj 18 181 print Firmware; +#X obj 123 49 list; +#X obj 18 151 list trim; +#X obj 204 45 route bang; +#X obj 22 85 outlet; +#X obj 22 63 f 1; +#X obj 22 41 t b; +#X obj 123 80 makesymbol %s-%s.%s; +#X connect 0 0 7 0; +#X connect 2 0 6 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 7 0 9 0; +#X connect 7 0 14 0; +#X connect 7 1 11 0; +#X connect 9 0 15 0; +#X connect 10 0 8 0; +#X connect 11 0 5 0; +#X connect 13 0 12 0; +#X connect 14 0 13 0; +#X connect 15 0 2 0; +#X connect 15 0 10 0; +#X coords 0 -1 1 1 145 17 1 250 100; +#X restore 111 269 pd firmware; +#N canvas 626 98 404 287 device 0; +#X obj 35 60 inlet; +#X obj 35 118 route open port ports; +#X obj 35 169 tgl 15 0 empty empty open -3 20 0 10 #fcfcfc #000000 +#000000 0 1; +#X floatatom 76 170 5 0 0 3 port - - 0; +#X obj 117 170 print comport_ports; +#X obj 252 170 outlet; +#X obj 235 74 receive ARDUINO_TEST_RESET; +#X obj 235 97 bang; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 1 2 4 0; +#X connect 1 3 5 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X restore 111 227 pd device info; +#X text 203 227 <- open to see info; +#X obj 261 249 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000 0 -1; +#N canvas 0 0 450 300 if-no-arduino-found 0; +#X obj 159 92 inlet; +#X obj 132 114 float; +#X obj 132 26 loadbang; +#X obj 132 154 == 0; +#X obj 116 262 dac~; +#X obj 70 188 osc~ 440; +#X obj 117 216 *~; +#X text 203 127 Output test sine; +#X text 202 139 if can't find connected Arduino; +#X obj 117 238 *~ 0.07; +#X obj 132 50 delay 20000; +#X connect 0 0 1 1; +#X connect 1 0 3 0; +#X connect 2 0 10 0; +#X connect 3 0 6 1; +#X connect 5 0 6 0; +#X connect 9 0 4 0; +#X connect 9 0 4 1; +#X connect 10 0 1 0; +#X restore 281 249 pd if-no-arduino-found; +#X text 334 112 dsp ON/OFF; +#X floatatom 318 157 5 0 0 0 - - - 0; +#X text 355 158 % cpu; +#X obj 318 135 dsp; +#X obj 318 112 tgl 15 0 empty empty empty 8 -8 0 10 #fcfcfc #000000 +#000000 0 1; +#X obj 318 66 loadbang; +#X text 316 40 Automatically turn on audio; +#X text 316 50 8 seconds after patch opens.; +#X obj 318 89 delay 8000; +#X obj 28 346 route analog digital string sysex; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X obj 6 28 resample 100; +#X connect 0 0 4 0; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X restore 76 407 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 92 427 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 109 447 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 126 407 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 143 427 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 160 447 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 177 407 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 193 427 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 210 447 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 227 407 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 244 427 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 261 447 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 278 407 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 294 427 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 311 447 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 328 407 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 345 427 pd smpl; +#X obj 393 407 print unexpected!; +#X text 595 90 but \, if we employ [resample].. this again becomes +continuous data!; +#X obj 696 120 s smpl_r; +#X text 754 120 <-- control sampling interval of [pd smpl]. (unit: +millis); +#X obj 640 591 print; +#X obj 619 194 f; +#X obj 655 195 + 1; +#X msg 660 171 0; +#X floatatom 619 219 5 0 0 0 - - - 0; +#X obj 619 152 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 660 151 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X obj 600 120 loadbang; +#X text 659 219 sampling speed monitoring; +#X text 594 76 firmata gives digital output only when it've changed +; +#X msg 660 120 566; +#X obj 76 375 route 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19; +#X obj 640 496 pack f f f f f f f f f f f f f f f f f; +#X text 975 78 --> but remember actual communication only occurs still +only on CHANGES!!; +#X obj 640 563 spigot; +#X obj 673 543 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000 0 1; +#X obj 111 309 s firmata_detected; +#X obj 673 521 r firmata_detected; +#X obj 111 290 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000 0 1; +#X obj 696 543 print firmata_detected; +#X obj 86 52 delay 10000; +#X obj 95 94 print 10sec_elapsed; +#X text 160 52 10 sec; +#X text 23 1216 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 323 1216 - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - -; +#X text 25 14 - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - -; +#X text 325 14 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 633 1215 sound generators - tones; +#X text 27 662 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 327 662 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 635 13 arduino i/f; +#X text 637 661 sound generators - sample sound; +#X obj 76 474 == 0; +#X obj 92 494 == 0; +#X obj 109 514 == 0; +#X obj 160 514 == 0; +#X obj 143 494 == 0; +#X obj 126 474 == 0; +#X obj 177 474 == 0; +#X obj 193 494 == 0; +#X obj 210 514 == 0; +#X obj 227 474 == 0; +#X obj 244 494 == 0; +#X obj 261 514 == 0; +#X obj 278 474 == 0; +#X obj 294 494 == 0; +#X obj 311 514 == 0; +#X obj 328 474 == 0; +#X obj 345 494 == 0; +#X text 407 436 re-samplers (also replicate!); +#X text 405 492 inverters; +#X text 872 525 monitoring; +#X obj 620 404 r c1; +#X obj 634 425 r c2; +#X obj 657 403 r c3; +#X obj 669 425 r c4; +#X obj 691 403 r c5; +#X obj 704 425 r c6; +#X obj 725 403 r c7; +#X obj 738 424 r c8; +#X obj 761 402 r c9; +#X obj 773 424 r c10; +#X obj 820 402 r c11; +#X obj 834 423 r c12; +#X obj 862 401 r c13; +#X obj 874 424 r c14; +#X obj 901 402 r c15; +#X obj 914 424 r c16; +#X obj 942 402 r c17; +#X text 457 590 routing; +#X obj 407 116 print dsp_bang; +#X obj 318 181 print dsp_load; +#X msg 54 737 read -resize Rain1.wav array99; +#X obj 117 1303 r c16; +#X obj 203 1297 r c17; +#X obj 79 1354 +; +#X obj 159 1335 +; +#X obj 859 152 key; +#X floatatom 859 175 5 0 0 0 - - - 0; +#X obj 859 197 route 97 115 100 102 103 104 106 107 108 59 113 119 +101 114 116 121 117, f 71; +#X msg 856 225 2; +#X msg 886 229 3; +#X msg 916 225 4; +#X msg 946 229 5; +#X msg 976 225 6; +#X msg 1006 229 7; +#X msg 1036 225 8; +#X msg 1066 229 9; +#X msg 1096 225 10; +#X msg 1126 229 11; +#X msg 1156 225 12; +#X msg 1186 229 14; +#X msg 1216 225 15; +#X msg 1246 229 16; +#X msg 1276 225 17; +#X msg 1306 229 18; +#X msg 1336 225 19; +#X listbox 987 490 6 0 0 1 simulated!? - - 0; +#X msg 1039 276 \$1 0; +#X floatatom 859 295 5 0 0 0 - - - 0; +#X obj 859 317 route 97 115 100 102 103 104 106 107 108 59 113 119 +101 114 116 121 117, f 71; +#X msg 856 345 2; +#X msg 886 349 3; +#X msg 916 345 4; +#X msg 946 349 5; +#X msg 976 345 6; +#X msg 1006 349 7; +#X msg 1036 345 8; +#X msg 1066 349 9; +#X msg 1096 345 10; +#X msg 1126 349 11; +#X msg 1156 345 12; +#X msg 1186 349 14; +#X msg 1216 345 15; +#X msg 1246 349 16; +#X msg 1276 345 17; +#X msg 1306 349 18; +#X msg 1336 345 19; +#X obj 859 272 keyup; +#X msg 1086 402 \$1 1; +#X msg 725 148 100; +#X obj 716 326 loadbang; +#X connect 0 0 182 0; +#X connect 1 0 184 0; +#X connect 2 0 350 0; +#X connect 3 0 186 0; +#X connect 4 0 188 0; +#X connect 5 0 190 0; +#X connect 6 0 192 0; +#X connect 7 0 194 0; +#X connect 8 0 196 0; +#X connect 9 0 198 0; +#X connect 12 0 13 0; +#X connect 13 0 16 0; +#X connect 13 0 17 0; +#X connect 13 1 21 0; +#X connect 14 0 15 0; +#X connect 15 0 22 0; +#X connect 16 0 11 0; +#X connect 17 0 19 0; +#X connect 19 0 156 0; +#X connect 19 0 157 0; +#X connect 20 0 13 0; +#X connect 21 0 13 0; +#X connect 22 0 12 0; +#X connect 22 0 75 0; +#X connect 22 0 77 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 99 0; +#X connect 35 0 171 0; +#X connect 37 0 36 1; +#X connect 37 0 36 0; +#X connect 38 0 36 0; +#X connect 38 0 36 1; +#X connect 39 0 41 1; +#X connect 39 0 41 0; +#X connect 40 0 41 0; +#X connect 40 0 41 1; +#X connect 43 0 42 1; +#X connect 43 0 42 0; +#X connect 44 0 42 0; +#X connect 44 0 42 1; +#X connect 46 0 45 1; +#X connect 46 0 45 0; +#X connect 47 0 45 0; +#X connect 47 0 45 1; +#X connect 48 0 38 0; +#X connect 50 0 49 1; +#X connect 50 0 49 0; +#X connect 51 0 49 0; +#X connect 51 0 49 1; +#X connect 53 0 52 1; +#X connect 53 0 52 0; +#X connect 54 0 52 0; +#X connect 54 0 52 1; +#X connect 56 0 55 0; +#X connect 56 0 55 1; +#X connect 57 0 35 0; +#X connect 58 0 108 0; +#X connect 59 0 166 0; +#X connect 59 0 74 0; +#X connect 60 0 38 1; +#X connect 61 0 37 1; +#X connect 62 0 40 1; +#X connect 63 0 39 1; +#X connect 64 0 44 1; +#X connect 65 0 43 1; +#X connect 66 0 47 1; +#X connect 67 0 46 1; +#X connect 68 0 51 1; +#X connect 69 0 50 1; +#X connect 70 0 54 1; +#X connect 71 0 53 1; +#X connect 72 0 56 1; +#X connect 73 0 109 0; +#X connect 74 0 167 0; +#X connect 75 0 76 0; +#X connect 76 0 20 0; +#X connect 77 0 168 0; +#X connect 77 0 59 0; +#X connect 77 0 160 0; +#X connect 77 0 172 0; +#X connect 78 0 57 1; +#X connect 79 0 37 0; +#X connect 80 0 40 0; +#X connect 81 0 39 0; +#X connect 82 0 44 0; +#X connect 83 0 43 0; +#X connect 84 0 47 0; +#X connect 85 0 46 0; +#X connect 86 0 51 0; +#X connect 87 0 50 0; +#X connect 88 0 54 0; +#X connect 89 0 53 0; +#X connect 90 0 56 0; +#X connect 91 0 57 0; +#X connect 92 0 91 0; +#X connect 95 0 94 0; +#X connect 95 0 94 1; +#X connect 96 0 95 1; +#X connect 97 0 55 1; +#X connect 97 0 55 0; +#X connect 98 0 97 1; +#X connect 99 0 100 0; +#X connect 100 0 230 0; +#X connect 101 0 97 0; +#X connect 102 0 95 0; +#X connect 104 0 6 0; +#X connect 105 0 104 0; +#X connect 106 0 107 0; +#X connect 107 0 6 0; +#X connect 110 0 60 1; +#X connect 111 0 61 1; +#X connect 112 0 72 1; +#X connect 113 0 98 1; +#X connect 114 0 62 1; +#X connect 115 0 63 1; +#X connect 116 0 64 1; +#X connect 117 0 65 1; +#X connect 118 0 66 1; +#X connect 119 0 67 1; +#X connect 120 0 68 1; +#X connect 121 0 69 1; +#X connect 122 0 70 1; +#X connect 123 0 71 1; +#X connect 124 0 60 0; +#X connect 125 0 61 0; +#X connect 126 0 63 0; +#X connect 127 0 62 0; +#X connect 128 0 124 1; +#X connect 129 0 125 1; +#X connect 130 0 127 1; +#X connect 131 0 126 1; +#X connect 132 0 133 1; +#X connect 133 0 64 0; +#X connect 134 0 65 0; +#X connect 135 0 66 0; +#X connect 136 0 67 0; +#X connect 137 0 68 0; +#X connect 138 0 69 0; +#X connect 139 0 70 0; +#X connect 140 0 71 0; +#X connect 141 0 72 0; +#X connect 142 0 98 0; +#X connect 143 0 96 0; +#X connect 144 0 135 1; +#X connect 145 0 136 1; +#X connect 146 0 137 1; +#X connect 147 0 138 1; +#X connect 148 0 139 1; +#X connect 149 0 134 1; +#X connect 150 0 141 1; +#X connect 151 0 142 1; +#X connect 152 0 140 1; +#X connect 153 0 143 1; +#X connect 154 0 96 1; +#X connect 156 0 103 0; +#X connect 157 0 103 1; +#X connect 158 0 159 0; +#X connect 158 0 164 0; +#X connect 160 0 169 0; +#X connect 161 0 162 0; +#X connect 162 0 158 0; +#X connect 163 0 161 0; +#X connect 165 0 155 1; +#X connect 166 0 58 0; +#X connect 167 0 73 0; +#X connect 168 0 78 0; +#X connect 169 0 158 0; +#X connect 169 0 170 0; +#X connect 170 0 155 0; +#X connect 171 0 17 1; +#X connect 172 0 173 0; +#X connect 173 0 156 1; +#X connect 173 0 157 1; +#X connect 174 0 183 0; +#X connect 175 0 185 0; +#X connect 176 0 187 0; +#X connect 177 0 189 0; +#X connect 178 0 191 0; +#X connect 179 0 193 0; +#X connect 180 0 195 0; +#X connect 181 0 197 0; +#X connect 199 0 353 0; +#X connect 200 0 354 0; +#X connect 201 0 127 0; +#X connect 202 0 126 0; +#X connect 203 0 133 0; +#X connect 204 0 135 0; +#X connect 205 0 136 0; +#X connect 206 0 137 0; +#X connect 207 0 138 0; +#X connect 208 0 139 0; +#X connect 209 0 140 0; +#X connect 210 0 141 0; +#X connect 211 0 142 0; +#X connect 212 0 143 0; +#X connect 213 0 23 0; +#X connect 214 0 23 1; +#X connect 215 0 24 1; +#X connect 216 0 25 1; +#X connect 217 0 26 1; +#X connect 218 0 27 1; +#X connect 219 0 28 1; +#X connect 220 0 29 1; +#X connect 221 0 30 1; +#X connect 222 0 31 1; +#X connect 223 0 32 1; +#X connect 224 0 33 1; +#X connect 225 0 34 1; +#X connect 226 0 99 1; +#X connect 227 0 100 1; +#X connect 228 0 230 1; +#X connect 229 0 231 1; +#X connect 230 0 231 0; +#X connect 231 0 57 0; +#X connect 232 0 134 0; +#X connect 234 0 235 0; +#X connect 235 0 256 0; +#X connect 235 1 243 0; +#X connect 236 0 234 0; +#X connect 236 0 298 0; +#X connect 237 0 235 0; +#X connect 238 0 237 0; +#X connect 238 0 299 0; +#X connect 239 0 235 0; +#X connect 240 0 235 0; +#X connect 241 0 242 0; +#X connect 241 1 245 0; +#X connect 242 0 296 0; +#X connect 243 0 241 0; +#X connect 245 0 246 0; +#X connect 250 0 248 0; +#X connect 251 0 250 0; +#X connect 252 0 255 0; +#X connect 255 0 251 0; +#X connect 255 0 348 0; +#X connect 256 1 289 0; +#X connect 257 0 310 0; +#X connect 258 0 311 0; +#X connect 259 0 312 0; +#X connect 260 0 315 0; +#X connect 261 0 314 0; +#X connect 262 0 313 0; +#X connect 263 0 316 0; +#X connect 264 0 317 0; +#X connect 265 0 318 0; +#X connect 266 0 319 0; +#X connect 267 0 320 0; +#X connect 268 0 321 0; +#X connect 269 0 322 0; +#X connect 270 0 323 0; +#X connect 271 0 324 0; +#X connect 272 0 283 0; +#X connect 272 0 325 0; +#X connect 273 0 326 0; +#X connect 279 0 280 0; +#X connect 279 0 282 0; +#X connect 280 0 279 1; +#X connect 281 0 279 0; +#X connect 283 0 279 0; +#X connect 284 0 281 0; +#X connect 285 0 398 0; +#X connect 288 0 276 0; +#X connect 288 0 284 0; +#X connect 289 0 257 0; +#X connect 289 1 258 0; +#X connect 289 2 259 0; +#X connect 289 3 260 0; +#X connect 289 4 261 0; +#X connect 289 5 262 0; +#X connect 289 6 263 0; +#X connect 289 7 264 0; +#X connect 289 8 265 0; +#X connect 289 9 266 0; +#X connect 289 10 267 0; +#X connect 289 11 268 0; +#X connect 289 12 269 0; +#X connect 289 13 270 0; +#X connect 289 14 271 0; +#X connect 289 15 272 0; +#X connect 289 16 273 0; +#X connect 289 17 274 0; +#X connect 290 0 292 0; +#X connect 292 0 278 0; +#X connect 293 0 292 1; +#X connect 295 0 293 0; +#X connect 295 0 297 0; +#X connect 296 0 294 0; +#X connect 298 0 238 0; +#X connect 310 0 0 0; +#X connect 311 0 174 0; +#X connect 312 0 1 0; +#X connect 313 0 176 0; +#X connect 314 0 3 0; +#X connect 315 0 175 0; +#X connect 316 0 4 0; +#X connect 317 0 177 0; +#X connect 318 0 5 0; +#X connect 319 0 178 0; +#X connect 320 0 6 0; +#X connect 321 0 179 0; +#X connect 322 0 7 0; +#X connect 323 0 180 0; +#X connect 324 0 8 0; +#X connect 325 0 181 0; +#X connect 326 0 9 0; +#X connect 330 0 290 0; +#X connect 331 0 290 1; +#X connect 332 0 290 2; +#X connect 333 0 290 3; +#X connect 334 0 290 4; +#X connect 335 0 290 5; +#X connect 336 0 290 6; +#X connect 337 0 290 7; +#X connect 338 0 290 8; +#X connect 339 0 290 9; +#X connect 340 0 290 10; +#X connect 341 0 290 11; +#X connect 342 0 290 12; +#X connect 343 0 290 13; +#X connect 344 0 290 14; +#X connect 345 0 290 15; +#X connect 346 0 290 16; +#X connect 350 0 14 0; +#X connect 351 0 353 1; +#X connect 352 0 354 1; +#X connect 353 0 124 0; +#X connect 354 0 125 0; +#X connect 355 0 356 0; +#X connect 356 0 357 0; +#X connect 357 0 358 0; +#X connect 357 1 359 0; +#X connect 357 2 360 0; +#X connect 357 3 361 0; +#X connect 357 4 362 0; +#X connect 357 5 363 0; +#X connect 357 6 364 0; +#X connect 357 7 365 0; +#X connect 357 8 366 0; +#X connect 357 9 367 0; +#X connect 357 10 368 0; +#X connect 357 11 369 0; +#X connect 357 12 370 0; +#X connect 357 13 371 0; +#X connect 357 14 372 0; +#X connect 357 15 373 0; +#X connect 357 16 374 0; +#X connect 358 0 376 0; +#X connect 359 0 376 0; +#X connect 360 0 376 0; +#X connect 361 0 376 0; +#X connect 362 0 376 0; +#X connect 363 0 376 0; +#X connect 364 0 376 0; +#X connect 365 0 376 0; +#X connect 366 0 376 0; +#X connect 367 0 376 0; +#X connect 368 0 376 0; +#X connect 369 0 376 0; +#X connect 370 0 376 0; +#X connect 371 0 376 0; +#X connect 372 0 376 0; +#X connect 373 0 376 0; +#X connect 374 0 376 0; +#X connect 375 0 289 0; +#X connect 376 0 375 0; +#X connect 377 0 378 0; +#X connect 378 0 379 0; +#X connect 378 1 380 0; +#X connect 378 2 381 0; +#X connect 378 3 382 0; +#X connect 378 4 383 0; +#X connect 378 5 384 0; +#X connect 378 6 385 0; +#X connect 378 7 386 0; +#X connect 378 8 387 0; +#X connect 378 9 388 0; +#X connect 378 10 389 0; +#X connect 378 11 390 0; +#X connect 378 12 391 0; +#X connect 378 13 392 0; +#X connect 378 14 393 0; +#X connect 378 15 394 0; +#X connect 378 16 395 0; +#X connect 379 0 397 0; +#X connect 380 0 397 0; +#X connect 381 0 397 0; +#X connect 382 0 397 0; +#X connect 383 0 397 0; +#X connect 384 0 397 0; +#X connect 385 0 397 0; +#X connect 386 0 397 0; +#X connect 387 0 397 0; +#X connect 388 0 397 0; +#X connect 389 0 397 0; +#X connect 390 0 397 0; +#X connect 391 0 397 0; +#X connect 392 0 397 0; +#X connect 393 0 397 0; +#X connect 394 0 397 0; +#X connect 395 0 397 0; +#X connect 396 0 377 0; +#X connect 397 0 375 0; +#X connect 398 0 276 0; +#X connect 399 0 379 0; +#X connect 399 0 395 0; +#X connect 399 0 394 0; +#X connect 399 0 393 0; +#X connect 399 0 392 0; +#X connect 399 0 391 0; +#X connect 399 0 390 0; +#X connect 399 0 389 0; +#X connect 399 0 388 0; +#X connect 399 0 387 0; +#X connect 399 0 386 0; +#X connect 399 0 385 0; +#X connect 399 0 384 0; +#X connect 399 0 383 0; +#X connect 399 0 382 0; +#X connect 399 0 381 0; +#X connect 399 0 380 0; +#X coords 0 0 1 1 85 60 0; diff --git a/_archive.ringringrain_2011/puredata/paperPerfm2011_B-E_RPi_nogui.pd b/_archive.ringringrain_2011/puredata/paperPerfm2011_B-E_RPi_nogui.pd new file mode 100755 index 0000000..d7d7e88 --- /dev/null +++ b/_archive.ringringrain_2011/puredata/paperPerfm2011_B-E_RPi_nogui.pd @@ -0,0 +1,1011 @@ +#N canvas 226 142 1267 664 10; +#X floatatom -46 549 5 0 0 0 - - -; +#X floatatom 0 548 5 0 0 0 - - -; +#X obj -40 707 loadbang; +#X floatatom 42 547 5 0 0 0 - - -; +#X floatatom 84 548 5 0 0 0 - - -; +#X floatatom 126 548 5 0 0 0 - - -; +#X floatatom 166 548 5 0 0 0 - - -; +#X floatatom 209 548 5 0 0 0 - - -; +#X floatatom 254 548 5 0 0 0 - - -; +#X floatatom 294 548 5 0 0 0 - - -; +#N canvas 0 22 450 300 (subpatch) 0; +#X array array99 2.57403e+06 float 0; +#X coords 0 0.3 2.57403e+06 -0.3 100 200 1; +#X restore 323 707 graph; +#X floatatom -26 1004 0 0 0 0 - - -; +#X msg -26 892 set array99; +#X obj -26 946 tabplay~ array99; +#X obj -40 764 soundfiler; +#X floatatom -40 787 0 0 0 0 - - -; +#X obj -26 978 env~ 16384; +#X obj 153 1038 *~; +#X text 202 1048 audio output; +#X obj 153 1057 hip~ 5; +#X msg -11 921 bang; +#X obj 67 968 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj -40 813 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 508 800 +; +#X obj 538 801 +; +#X obj 553 826 +; +#X obj 569 801 +; +#X obj 586 827 +; +#X obj 602 801 +; +#X obj 619 827 +; +#X obj 633 801 +; +#X obj 652 827 +; +#X obj 726 799 +; +#X obj 740 826 +; +#X obj 760 799 +; +#X floatatom 181 988 5 0 0 0 - - -; +#X obj 31 1529 dac~; +#X obj 77 1494 *~; +#X obj -9 1497 *~; +#X obj 242 1503 *~; +#X obj 156 1506 *~; +#X obj 196 1538 dac~; +#X obj 370 1552 dac~; +#X obj 416 1517 *~; +#X obj 330 1520 *~; +#X obj 536 1569 dac~; +#X obj 582 1534 *~; +#X obj 496 1537 *~; +#X obj -72 1455 osc~ 261.63; +#X obj 711 1575 dac~; +#X obj 757 1540 *~; +#X obj 671 1543 *~; +#X obj 885 1577 dac~; +#X obj 931 1542 *~; +#X obj 845 1545 *~; +#X obj 1061 1583 dac~; +#X obj 1021 1551 *~; +#X obj 181 960 mavg; +#X floatatom 752 1270 5 0 0 0 - - -; +#X obj 753 1209 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 6 1433 mavg; +#X obj 92 1432 mavg; +#X obj 171 1442 mavg; +#X obj 257 1441 mavg; +#X obj 345 1456 mavg; +#X obj 431 1455 mavg; +#X obj 511 1473 mavg; +#X obj 597 1472 mavg; +#X obj 686 1479 mavg; +#X obj 772 1478 mavg; +#X obj 860 1481 mavg; +#X obj 946 1480 mavg; +#X obj 1036 1487 mavg; +#X floatatom 836 1276 5 0 0 0 - - -; +#X obj 833 1212 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj -23 844 delay 2000; +#X obj -11 871 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 219 936 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X floatatom 220 990 5 0 0 0 - - -; +#X obj 19 1461 osc~ 293.66; +#X obj 102 1463 osc~ 329.63; +#X obj 183 1468 osc~ 349.23; +#X obj 269 1480 osc~ 392; +#X obj 356 1484 osc~ 440; +#X obj 439 1497 osc~ 493.88; +#X obj 529 1502 osc~ 523.25; +#X obj 614 1503 osc~ 587.33; +#X obj 704 1508 osc~ 659.26; +#X obj 788 1505 osc~ 698.46; +#X obj 878 1510 osc~ 783.99; +#X obj 964 1511 osc~ 880; +#X msg 185 712 1; +#X obj 185 689 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 215 709 testers; +#X obj 1240 1584 dac~; +#X obj 1200 1552 *~; +#X obj 1215 1488 mavg; +#X obj 1104 1549 *~; +#X obj 1119 1487 mavg; +#X obj 774 826 +; +#X obj 794 799 +; +#X obj 1051 1517 osc~ 976; +#X obj 1143 1512 osc~ 1072; +#X obj 154 1157 dac~; +#X msg 399 195 1; +#X obj 399 172 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 370 172 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 370 195 0; +#X obj 752 1301 s mavg; +#X obj 837 1303 s amp; +#X obj 45 1432 r mavg; +#X obj 113 1407 r mavg; +#X obj 1070 1483 r mavg; +#X obj 1135 1453 r mavg; +#X obj 206 1441 r mavg; +#X obj 277 1413 r mavg; +#X obj 383 1455 r mavg; +#X obj 447 1424 r mavg; +#X obj 549 1472 r mavg; +#X obj 618 1442 r mavg; +#X obj 722 1478 r mavg; +#X obj 788 1445 r mavg; +#X obj 898 1479 r mavg; +#X obj 963 1446 r mavg; +#X obj 7 1397 *; +#X obj 59 1396 *; +#X obj 224 1405 *; +#X obj 171 1406 *; +#X obj 22 1362 r amp; +#X obj 100 1367 r amp; +#X obj 182 1378 r amp; +#X obj 254 1379 r amp; +#X obj 359 1386 r amp; +#X obj 345 1420 *; +#X obj 398 1419 *; +#X obj 511 1437 *; +#X obj 564 1436 *; +#X obj 686 1443 *; +#X obj 739 1442 *; +#X obj 860 1445 *; +#X obj 913 1444 *; +#X obj 1036 1451 *; +#X obj 1086 1451 *; +#X obj 1215 1452 *; +#X obj 515 1392 r amp; +#X obj 568 1395 r amp; +#X obj 696 1408 r amp; +#X obj 764 1399 r amp; +#X obj 878 1412 r amp; +#X obj 433 1388 r amp; +#X obj 1051 1421 r amp; +#X obj 1109 1412 r amp; +#X obj 937 1412 r amp; +#X obj 1227 1423 r amp; +#X obj 1257 1457 r mavg; +#N canvas 0 22 450 300 pan 0; +#X obj 93 -99 f 1; +#X obj 93 -75 -; +#X obj 129 -52 *; +#X obj 78 -51 *; +#X obj 78 -145 inlet; +#X obj 144 -145 inlet; +#X obj 78 -10 outlet; +#X obj 129 -10 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 1; +#X connect 2 0 7 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 4 0 3 0; +#X connect 4 0 2 0; +#X connect 5 0 1 1; +#X connect 5 0 2 1; +#X restore 168 1102 pd pan; +#X obj 153 1127 *~; +#X obj 186 1127 *~; +#X obj 360 1088 snapshot~; +#X floatatom 360 1118 5 0 0 0 - - -; +#X obj 360 1011 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 427 1036 +~ 1; +#X obj 427 1063 *~ 0.5; +#X obj 427 1008 osc~ 0.1; +#X obj 407 1119 s pann; +#X obj 206 1071 r pann; +#X msg 752 1238 25; +#X msg 835 1246 0.05; +#X msg 219 960 120; +#X obj 360 1036 metro 200; +#X msg 346 1146 1; +#X obj 168 1014 * 6; +#X obj 267 1069 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 227 1096 1; +#X floatatom -26 570 5 0 0 0 - - -; +#X floatatom 20 569 5 0 0 0 - - -; +#X floatatom 62 568 5 0 0 0 - - -; +#X floatatom 104 569 5 0 0 0 - - -; +#X floatatom 146 569 5 0 0 0 - - -; +#X floatatom 186 569 5 0 0 0 - - -; +#X floatatom 229 569 5 0 0 0 - - -; +#X floatatom 274 569 5 0 0 0 - - -; +#X obj -27 615 s c1; +#X obj -13 636 s c2; +#X obj 10 614 s c3; +#X obj 22 636 s c4; +#X obj 44 614 s c5; +#X obj 57 636 s c6; +#X obj 78 614 s c7; +#X obj 91 635 s c8; +#X obj 114 613 s c9; +#X obj 126 635 s c10; +#X obj 174 612 s c11; +#X obj 188 633 s c12; +#X obj 216 611 s c13; +#X obj 228 634 s c14; +#X obj 255 612 s c15; +#X obj 268 634 s c16; +#X obj 296 612 s c17; +#X obj -4 1308 r c1; +#X obj 83 1304 r c2; +#X obj 165 1317 r c3; +#X obj 243 1314 r c4; +#X obj 339 1329 r c5; +#X obj 501 1325 r c7; +#X obj 585 1340 r c8; +#X obj 681 1350 r c9; +#X obj 768 1353 r c10; +#X obj 869 1368 r c11; +#X obj 950 1357 r c12; +#X obj 1037 1367 r c13; +#X obj 1119 1359 r c14; +#X obj 1217 1370 r c15; +#X obj 530 721 r c1; +#X obj 544 742 r c2; +#X obj 567 720 r c3; +#X obj 579 742 r c4; +#X obj 601 720 r c5; +#X obj 614 742 r c6; +#X obj 635 720 r c7; +#X obj 648 741 r c8; +#X obj 671 719 r c9; +#X obj 683 741 r c10; +#X obj 730 719 r c11; +#X obj 744 740 r c12; +#X obj 772 718 r c13; +#X obj 784 741 r c14; +#X obj 811 719 r c15; +#X obj 824 741 r c16; +#X obj 852 719 r c17; +#X obj 808 826 +; +#X obj 828 799 +; +#X obj 422 1328 r c6; +#X text -88 5 .; +#X msg -66 77 close; +#X obj -66 33 loadbang; +#X msg -8 132 devicename /dev/ttyACM0; +#X obj -8 71 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg -8 156 devices; +#X msg -8 179 info; +#N canvas 570 288 451 224 ver 0; +#X obj 23 7 inlet; +#X obj 250 100 cnv 15 145 17 empty \$0-version_cnv empty 4 10 0 12 +-203904 -1 0; +#X obj 23 157 send \$0-version_cnv; +#X msg 23 132 label \$1; +#X obj 48 103 symbol; +#X obj 38 77 loadbang; +#X msg 96 78 bang; +#X obj 309 163 outlet; +#X obj 23 52 zexy/makesymbol Firmata-%s.%s; +#X obj 23 29 route version bang; +#X obj 383 161 outlet; +#X connect 0 0 9 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 8 0 3 0; +#X connect 9 0 8 0; +#X connect 9 1 7 0; +#X connect 9 1 6 0; +#X connect 9 2 7 0; +#X connect 9 2 10 0; +#X coords 0 -1 1 1 145 17 1 250 100; +#X restore 17 247 pd ver; +#N canvas 568 269 424 226 firmware 0; +#X obj 123 2 inlet; +#X obj 250 100 cnv 15 145 17 empty \$0-firmware_cnv empty 4 10 0 12 +-232576 -66577 0; +#X msg 123 156 label \$1; +#X obj 148 127 symbol; +#X obj 138 101 loadbang; +#X msg 196 102 bang; +#X obj 123 181 send \$0-firmware_cnv; +#X obj 123 24 route firmware; +#X obj 18 181 print Firmware; +#X obj 123 49 list; +#X obj 123 80 zexy/makesymbol %s-%s.%s; +#X obj 18 151 list trim; +#X obj 204 45 route bang; +#X obj 22 85 outlet; +#X obj 22 63 f 1; +#X obj 22 41 t b; +#X connect 0 0 7 0; +#X connect 2 0 6 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 7 0 9 0; +#X connect 7 0 15 0; +#X connect 7 1 12 0; +#X connect 9 0 10 0; +#X connect 10 0 2 0; +#X connect 10 0 11 0; +#X connect 11 0 8 0; +#X connect 12 0 5 0; +#X connect 14 0 13 0; +#X connect 15 0 14 0; +#X coords 0 -1 1 1 145 17 1 250 100; +#X restore 17 267 pd firmware; +#N canvas 626 98 404 287 device 1; +#X obj 35 60 inlet; +#X obj 35 118 route open port ports; +#X obj 35 169 tgl 15 0 empty empty open -3 20 0 10 -262144 -1 -1 0 +1; +#X floatatom 76 170 5 0 0 3 port - -; +#X obj 117 170 print comport_ports; +#X obj 252 170 outlet; +#X obj 235 74 receive ARDUINO_TEST_RESET; +#X obj 235 97 bang; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 1 2 4 0; +#X connect 1 3 5 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X restore 17 225 pd device info; +#X text 109 225 <- open to see info; +#X obj 167 247 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 -1 +-1; +#N canvas 0 0 450 300 if-no-arduino-found 0; +#X obj 159 92 inlet; +#X obj 132 114 float; +#X obj 132 26 loadbang; +#X obj 132 154 == 0; +#X obj 116 262 dac~; +#X obj 70 188 osc~ 440; +#X obj 117 216 *~; +#X text 203 127 Output test sine; +#X text 202 139 if can't find connected Arduino; +#X obj 117 238 *~ 0.07; +#X obj 132 50 delay 20000; +#X connect 0 0 1 1; +#X connect 1 0 3 0; +#X connect 2 0 10 0; +#X connect 3 0 6 1; +#X connect 5 0 6 0; +#X connect 9 0 4 0; +#X connect 9 0 4 1; +#X connect 10 0 1 0; +#X restore 187 247 pd if-no-arduino-found; +#X text 240 110 dsp ON/OFF; +#X floatatom 224 155 5 0 0 0 - - -; +#X text 261 156 % cpu; +#X obj 224 133 dsp; +#X obj 224 110 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 +1; +#X obj 224 64 loadbang; +#X text 222 38 Automatically turn on audio; +#X text 222 48 8 seconds after patch opens.; +#X obj 224 87 delay 8000; +#X obj -66 344 route analog digital string sysex; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore -18 405 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore -2 425 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 15 445 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 32 405 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 49 425 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 66 445 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 83 405 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 99 425 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 116 445 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 133 405 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 150 425 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 167 445 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 184 405 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 200 425 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 217 445 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 234 405 pd smpl; +#N canvas 375 23 321 141 smpl 0; +#X obj 6 7 inlet; +#X obj 6 28 mapping/resample 100; +#X obj 6 50 outlet; +#X obj 57 50 receive ARDUINO_TEST_RESET; +#X obj 123 7 r smpl_r; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 3 0 1 0; +#X connect 4 0 1 1; +#X restore 251 425 pd smpl; +#X obj 299 405 print unexpected!; +#X text 541 88 but \, if we employ [resample].. this again becomes +continuous data!; +#X obj 642 118 s smpl_r; +#X text 700 118 <-- control sampling interval of [pd smpl]. (unit: +millis); +#X obj 620 531 print; +#X obj 565 192 f; +#X obj 601 193 + 1; +#X msg 606 169 0; +#X floatatom 565 217 5 0 0 0 - - -; +#X obj 565 150 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 606 149 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 546 118 loadbang; +#X text 605 217 sampling speed monitoring; +#X text 540 74 firmata gives digital output only when it've changed +; +#X msg 606 118 50; +#X obj -18 373 route 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19; +#X obj 620 436 pack f f f f f f f f f f f f f f f f f; +#X text 802 86 --> but remember actual communication only occurs still +only on CHANGES!!; +#X obj 620 503 spigot; +#X obj 653 483 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 17 307 s firmata_detected; +#X obj 653 461 r firmata_detected; +#X obj 17 288 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 676 483 print firmata_detected; +#X obj -8 50 delay 10000; +#X obj 1 92 print 10sec_elapsed; +#X text 66 50 10 sec; +#X text -71 1214 - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - -; +#X text 229 1214 - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - -; +#X text -69 12 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 231 12 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 539 1213 sound generators - tones; +#X text -67 660 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 233 660 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 541 11 arduino i/f; +#X text 543 659 sound generators - sample sound; +#X obj -18 472 == 0; +#X obj -2 492 == 0; +#X obj 15 512 == 0; +#X obj 66 512 == 0; +#X obj 49 492 == 0; +#X obj 32 472 == 0; +#X obj 83 472 == 0; +#X obj 99 492 == 0; +#X obj 116 512 == 0; +#X obj 133 472 == 0; +#X obj 150 492 == 0; +#X obj 167 512 == 0; +#X obj 184 472 == 0; +#X obj 200 492 == 0; +#X obj 217 512 == 0; +#X obj 234 472 == 0; +#X obj 251 492 == 0; +#X text 313 434 re-samplers (also replicate!); +#X text 311 490 inverters; +#X text 852 465 monitoring; +#X obj 600 344 r c1; +#X obj 614 365 r c2; +#X obj 637 343 r c3; +#X obj 649 365 r c4; +#X obj 671 343 r c5; +#X obj 684 365 r c6; +#X obj 705 343 r c7; +#X obj 718 364 r c8; +#X obj 741 342 r c9; +#X obj 753 364 r c10; +#X obj 800 342 r c11; +#X obj 814 363 r c12; +#X obj 842 341 r c13; +#X obj 854 364 r c14; +#X obj 881 342 r c15; +#X obj 894 364 r c16; +#X obj 922 342 r c17; +#X text 363 588 routing; +#X obj 313 114 print dsp_bang; +#X obj 224 179 print dsp_load; +#X msg -40 735 read -resize Rain1.wav array99; +#X obj 33 1311 r c16; +#X obj 119 1305 r c17; +#X obj -5 1362 +; +#X obj 75 1343 +; +#X msg 63 162 open 2; +#X obj -66 208 arduino 2; +#X connect 0 0 182 0; +#X connect 1 0 184 0; +#X connect 2 0 349 0; +#X connect 3 0 186 0; +#X connect 4 0 188 0; +#X connect 5 0 190 0; +#X connect 6 0 192 0; +#X connect 7 0 194 0; +#X connect 8 0 196 0; +#X connect 9 0 198 0; +#X connect 12 0 13 0; +#X connect 13 0 16 0; +#X connect 13 0 17 0; +#X connect 13 1 21 0; +#X connect 14 0 15 0; +#X connect 15 0 22 0; +#X connect 16 0 11 0; +#X connect 17 0 19 0; +#X connect 19 0 156 0; +#X connect 19 0 157 0; +#X connect 20 0 13 0; +#X connect 21 0 13 0; +#X connect 22 0 12 0; +#X connect 22 0 75 0; +#X connect 22 0 77 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 99 0; +#X connect 35 0 171 0; +#X connect 37 0 36 1; +#X connect 37 0 36 0; +#X connect 38 0 36 0; +#X connect 38 0 36 1; +#X connect 39 0 41 1; +#X connect 39 0 41 0; +#X connect 40 0 41 0; +#X connect 40 0 41 1; +#X connect 43 0 42 1; +#X connect 43 0 42 0; +#X connect 44 0 42 0; +#X connect 44 0 42 1; +#X connect 46 0 45 1; +#X connect 46 0 45 0; +#X connect 47 0 45 0; +#X connect 47 0 45 1; +#X connect 48 0 38 0; +#X connect 50 0 49 1; +#X connect 50 0 49 0; +#X connect 51 0 49 0; +#X connect 51 0 49 1; +#X connect 53 0 52 1; +#X connect 53 0 52 0; +#X connect 54 0 52 0; +#X connect 54 0 52 1; +#X connect 56 0 55 0; +#X connect 56 0 55 1; +#X connect 57 0 35 0; +#X connect 58 0 108 0; +#X connect 59 0 166 0; +#X connect 59 0 74 0; +#X connect 60 0 38 1; +#X connect 61 0 37 1; +#X connect 62 0 40 1; +#X connect 63 0 39 1; +#X connect 64 0 44 1; +#X connect 65 0 43 1; +#X connect 66 0 47 1; +#X connect 67 0 46 1; +#X connect 68 0 51 1; +#X connect 69 0 50 1; +#X connect 70 0 54 1; +#X connect 71 0 53 1; +#X connect 72 0 56 1; +#X connect 73 0 109 0; +#X connect 74 0 167 0; +#X connect 75 0 76 0; +#X connect 76 0 20 0; +#X connect 77 0 168 0; +#X connect 77 0 59 0; +#X connect 77 0 160 0; +#X connect 77 0 172 0; +#X connect 78 0 57 1; +#X connect 79 0 37 0; +#X connect 80 0 40 0; +#X connect 81 0 39 0; +#X connect 82 0 44 0; +#X connect 83 0 43 0; +#X connect 84 0 47 0; +#X connect 85 0 46 0; +#X connect 86 0 51 0; +#X connect 87 0 50 0; +#X connect 88 0 54 0; +#X connect 89 0 53 0; +#X connect 90 0 56 0; +#X connect 91 0 57 0; +#X connect 92 0 91 0; +#X connect 95 0 94 0; +#X connect 95 0 94 1; +#X connect 96 0 95 1; +#X connect 97 0 55 1; +#X connect 97 0 55 0; +#X connect 98 0 97 1; +#X connect 99 0 100 0; +#X connect 100 0 230 0; +#X connect 101 0 97 0; +#X connect 102 0 95 0; +#X connect 104 0 6 0; +#X connect 105 0 104 0; +#X connect 106 0 107 0; +#X connect 107 0 6 0; +#X connect 110 0 60 1; +#X connect 111 0 61 1; +#X connect 112 0 72 1; +#X connect 113 0 98 1; +#X connect 114 0 62 1; +#X connect 115 0 63 1; +#X connect 116 0 64 1; +#X connect 117 0 65 1; +#X connect 118 0 66 1; +#X connect 119 0 67 1; +#X connect 120 0 68 1; +#X connect 121 0 69 1; +#X connect 122 0 70 1; +#X connect 123 0 71 1; +#X connect 124 0 60 0; +#X connect 125 0 61 0; +#X connect 126 0 63 0; +#X connect 127 0 62 0; +#X connect 128 0 124 1; +#X connect 129 0 125 1; +#X connect 130 0 127 1; +#X connect 131 0 126 1; +#X connect 132 0 133 1; +#X connect 133 0 64 0; +#X connect 134 0 65 0; +#X connect 135 0 66 0; +#X connect 136 0 67 0; +#X connect 137 0 68 0; +#X connect 138 0 69 0; +#X connect 139 0 70 0; +#X connect 140 0 71 0; +#X connect 141 0 72 0; +#X connect 142 0 98 0; +#X connect 143 0 96 0; +#X connect 144 0 135 1; +#X connect 145 0 136 1; +#X connect 146 0 137 1; +#X connect 147 0 138 1; +#X connect 148 0 139 1; +#X connect 149 0 134 1; +#X connect 150 0 141 1; +#X connect 151 0 142 1; +#X connect 152 0 140 1; +#X connect 153 0 143 1; +#X connect 154 0 96 1; +#X connect 156 0 103 0; +#X connect 157 0 103 1; +#X connect 158 0 159 0; +#X connect 158 0 164 0; +#X connect 160 0 169 0; +#X connect 161 0 162 0; +#X connect 162 0 158 0; +#X connect 163 0 161 0; +#X connect 165 0 155 1; +#X connect 166 0 58 0; +#X connect 167 0 73 0; +#X connect 168 0 78 0; +#X connect 169 0 158 0; +#X connect 169 0 170 0; +#X connect 170 0 155 0; +#X connect 171 0 17 1; +#X connect 172 0 173 0; +#X connect 173 0 156 1; +#X connect 173 0 157 1; +#X connect 174 0 183 0; +#X connect 175 0 185 0; +#X connect 176 0 187 0; +#X connect 177 0 189 0; +#X connect 178 0 191 0; +#X connect 179 0 193 0; +#X connect 180 0 195 0; +#X connect 181 0 197 0; +#X connect 199 0 352 0; +#X connect 200 0 353 0; +#X connect 201 0 127 0; +#X connect 202 0 126 0; +#X connect 203 0 133 0; +#X connect 204 0 135 0; +#X connect 205 0 136 0; +#X connect 206 0 137 0; +#X connect 207 0 138 0; +#X connect 208 0 139 0; +#X connect 209 0 140 0; +#X connect 210 0 141 0; +#X connect 211 0 142 0; +#X connect 212 0 143 0; +#X connect 213 0 23 0; +#X connect 214 0 23 1; +#X connect 215 0 24 1; +#X connect 216 0 25 1; +#X connect 217 0 26 1; +#X connect 218 0 27 1; +#X connect 219 0 28 1; +#X connect 220 0 29 1; +#X connect 221 0 30 1; +#X connect 222 0 31 1; +#X connect 223 0 32 1; +#X connect 224 0 33 1; +#X connect 225 0 34 1; +#X connect 226 0 99 1; +#X connect 227 0 100 1; +#X connect 228 0 230 1; +#X connect 229 0 231 1; +#X connect 230 0 231 0; +#X connect 231 0 57 0; +#X connect 232 0 134 0; +#X connect 234 0 355 0; +#X connect 235 0 234 0; +#X connect 235 0 297 0; +#X connect 236 0 355 0; +#X connect 237 0 236 0; +#X connect 237 0 298 0; +#X connect 238 0 355 0; +#X connect 239 0 355 0; +#X connect 240 0 241 0; +#X connect 240 1 244 0; +#X connect 241 0 295 0; +#X connect 242 0 240 0; +#X connect 244 0 245 0; +#X connect 249 0 247 0; +#X connect 250 0 249 0; +#X connect 251 0 254 0; +#X connect 254 0 250 0; +#X connect 254 0 347 0; +#X connect 255 1 288 0; +#X connect 256 0 309 0; +#X connect 257 0 310 0; +#X connect 258 0 311 0; +#X connect 259 0 314 0; +#X connect 260 0 313 0; +#X connect 261 0 312 0; +#X connect 262 0 315 0; +#X connect 263 0 316 0; +#X connect 264 0 317 0; +#X connect 265 0 318 0; +#X connect 266 0 319 0; +#X connect 267 0 320 0; +#X connect 268 0 321 0; +#X connect 269 0 322 0; +#X connect 270 0 323 0; +#X connect 271 0 282 0; +#X connect 271 0 324 0; +#X connect 272 0 325 0; +#X connect 278 0 279 0; +#X connect 278 0 281 0; +#X connect 279 0 278 1; +#X connect 280 0 278 0; +#X connect 282 0 278 0; +#X connect 283 0 280 0; +#X connect 284 0 287 0; +#X connect 287 0 275 0; +#X connect 287 0 283 0; +#X connect 288 0 256 0; +#X connect 288 1 257 0; +#X connect 288 2 258 0; +#X connect 288 3 259 0; +#X connect 288 4 260 0; +#X connect 288 5 261 0; +#X connect 288 6 262 0; +#X connect 288 7 263 0; +#X connect 288 8 264 0; +#X connect 288 9 265 0; +#X connect 288 10 266 0; +#X connect 288 11 267 0; +#X connect 288 12 268 0; +#X connect 288 13 269 0; +#X connect 288 14 270 0; +#X connect 288 15 271 0; +#X connect 288 16 272 0; +#X connect 288 17 273 0; +#X connect 289 0 291 0; +#X connect 291 0 277 0; +#X connect 292 0 291 1; +#X connect 294 0 292 0; +#X connect 294 0 296 0; +#X connect 295 0 293 0; +#X connect 297 0 237 0; +#X connect 309 0 0 0; +#X connect 310 0 174 0; +#X connect 311 0 1 0; +#X connect 312 0 176 0; +#X connect 313 0 3 0; +#X connect 314 0 175 0; +#X connect 315 0 4 0; +#X connect 316 0 177 0; +#X connect 317 0 5 0; +#X connect 318 0 178 0; +#X connect 319 0 6 0; +#X connect 320 0 179 0; +#X connect 321 0 7 0; +#X connect 322 0 180 0; +#X connect 323 0 8 0; +#X connect 324 0 181 0; +#X connect 325 0 9 0; +#X connect 329 0 289 0; +#X connect 330 0 289 1; +#X connect 331 0 289 2; +#X connect 332 0 289 3; +#X connect 333 0 289 4; +#X connect 334 0 289 5; +#X connect 335 0 289 6; +#X connect 336 0 289 7; +#X connect 337 0 289 8; +#X connect 338 0 289 9; +#X connect 339 0 289 10; +#X connect 340 0 289 11; +#X connect 341 0 289 12; +#X connect 342 0 289 13; +#X connect 343 0 289 14; +#X connect 344 0 289 15; +#X connect 345 0 289 16; +#X connect 349 0 14 0; +#X connect 350 0 352 1; +#X connect 351 0 353 1; +#X connect 352 0 124 0; +#X connect 353 0 125 0; +#X connect 354 0 355 0; +#X connect 355 0 255 0; +#X connect 355 1 242 0; +#X coords 0 0 1 1 85 60 0; diff --git a/_archive.ringringrain_2011/puredata/testtone-nogui.pd b/_archive.ringringrain_2011/puredata/testtone-nogui.pd new file mode 100755 index 0000000..ef58e45 --- /dev/null +++ b/_archive.ringringrain_2011/puredata/testtone-nogui.pd @@ -0,0 +1,541 @@ +#N canvas 204 123 494 364 12; +#X floatatom 72 273 3 0 0 0 - - -; +#X obj 27 221 notein; +#X obj 27 247 stripnote; +#X floatatom 27 272 3 0 0 0 - - -; +#X text 219 234 MIDI OUT; +#X text 27 197 MIDI IN; +#X floatatom 150 272 3 0 0 0 - - -; +#X floatatom 120 271 3 0 0 0 - - -; +#X obj 120 246 ctlin; +#N canvas 0 22 484 446 midi 0; +#X obj 96 65 inlet; +#X obj 96 262 noteout; +#X floatatom 96 92 0 0 0 0 - - -; +#X obj 338 113 loadbang; +#X obj 96 184 metro; +#X obj 96 236 makenote; +#X floatatom 189 166 0 0 0 0 - - -; +#X obj 96 210 f; +#X floatatom 145 166 0 0 0 0 - - -; +#X floatatom 233 166 0 0 0 0 - - -; +#X floatatom 276 166 0 0 0 0 - - -; +#X msg 338 148 500; +#X msg 370 148 60; +#X msg 399 148 64; +#X msg 427 148 250; +#X text 144 145 rate; +#X text 187 145 pitch; +#X text 232 145 vel; +#X text 268 146 length; +#X obj 230 257 ctlout 1; +#X floatatom 230 228 0 0 0 0 - - -; +#X connect 0 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 11 0; +#X connect 3 0 12 0; +#X connect 3 0 13 0; +#X connect 3 0 14 0; +#X connect 4 0 7 0; +#X connect 5 0 1 0; +#X connect 5 1 1 1; +#X connect 6 0 7 1; +#X connect 7 0 5 0; +#X connect 8 0 4 1; +#X connect 9 0 5 1; +#X connect 10 0 5 2; +#X connect 11 0 8 0; +#X connect 12 0 6 0; +#X connect 13 0 9 0; +#X connect 14 0 10 0; +#X connect 20 0 19 0; +#X restore 219 284 pd midi; +#X floatatom 178 93 3 0 0 0 - tone-vu1 -; +#X floatatom 205 93 3 0 0 0 - tone-vu2 -; +#X obj 177 126 tgl 20 0 tone-ch1 tone-ch1 1 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 202 126 tgl 20 0 tone-ch2 tone-ch2 2 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 219 258 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +1; +#X obj 184 192 tgl 15 0 tone-monitor set-tone-monitor monitor-inputs +23 8 0 12 -262144 -1 -1 0 1; +#X text 40 120 OFF; +#N canvas 0 22 524 326 more 0; +#X floatatom 42 209 0 0 0 0 - - -; +#X obj 42 183 f; +#X obj 79 183 + 1; +#X obj 42 150 metro 1000; +#X obj 42 123 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 +; +#X text 24 30 this window has various wierd debugging stuff...; +#X text 22 74 see if Pd's time; +#X text 22 93 measurement works:; +#X obj 227 127 adc~; +#X obj 226 224 print~; +#X obj 235 201 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 227 152 *~ 1; +#X obj 302 138 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 302 158 sel 0 1; +#X obj 301 183 1; +#X obj 333 185 1000; +#X text 226 94 print out literal values from ADC 1; +#X text 323 136 optionally multiply by 1000; +#X connect 1 0 2 0; +#X connect 1 0 0 0; +#X connect 2 0 1 1; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 8 0 11 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 13 1 15 0; +#X connect 14 0 11 1; +#X connect 15 0 11 1; +#X restore 388 266 pd more; +#X obj 343 193 tgl 15 0 tone-hipass tone-hipass-set input-hipass 23 +8 0 12 -262144 -1 -1 1 1; +#X obj 243 126 tgl 20 0 tone-ch3 tone-ch3 3 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 268 126 tgl 20 0 tone-ch4 tone-ch4 4 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 309 126 tgl 20 0 tone-ch5 tone-ch5 5 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 334 126 tgl 20 0 tone-ch6 tone-ch6 6 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 428 117 bng 15 250 50 0 tone-all empty ALL 20 8 0 12 -262144 +-1 -1; +#X obj 428 138 bng 15 250 50 0 tone-none empty NONE 20 8 0 12 -262144 +-1 -1; +#X floatatom 244 93 3 0 0 0 - tone-vu3 -; +#X floatatom 272 93 3 0 0 0 - tone-vu4 -; +#X floatatom 310 93 3 0 0 0 - tone-vu5 -; +#X floatatom 338 93 3 0 0 0 - tone-vu6 -; +#X text 237 73 AUDIO INPUT (RMS dB); +#X text 101 88 noise; +#X text 100 105 tone; +#X obj 84 90 vradio 15 1 0 2 tone-type tone-type-set empty 0 -6 0 8 +-262144 -1 -1 0; +#X obj 22 91 vradio 15 1 0 3 tone-radio tone-radio-set empty 0 -6 0 +8 -262144 -1 -1 1; +#X floatatom 376 93 3 0 0 0 - tone-vu7 -; +#X floatatom 404 93 3 0 0 0 - tone-vu8 -; +#X obj 375 126 tgl 20 0 tone-ch7 tone-ch7 7 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 400 126 tgl 20 0 tone-ch8 tone-ch8 8 5 -8 0 12 -262144 -1 -1 +1 1; +#N canvas 321 199 321 422 audio 0; +#X obj 25 303 s~ tone-mon; +#X obj 25 277 line~; +#X obj 25 249 pack 0 50; +#X obj 25 223 r tone-monitor; +#X obj 28 139 * 5; +#X obj 28 164 s tone-hip; +#X obj 28 114 r tone-hipass; +#N canvas 224 106 548 519 glue+loadbang 0; +#X obj 8 20 loadbang; +#X obj 175 18 r tone-all; +#X obj 285 16 r tone-none; +#X msg 175 46 \; tone-ch1 1 \; tone-ch2 1 \; tone-ch3 1 \; tone-ch4 +1 \; tone-ch5 1 \; tone-ch6 1 \; tone-ch7 1 \; tone-ch8 1; +#X msg 285 47 \; tone-ch1 0 \; tone-ch2 0 \; tone-ch3 0 \; tone-ch4 +0 \; tone-ch5 0 \; tone-ch6 0 \; tone-ch7 0 \; tone-ch8 0; +#X msg 34 330 \; pd dsp 1 \; tone-pitch 69 \; tone-radio 1 \; tone-radio-set +set 1 \; tone-type 0 \; tone-type-set 0 \; tone-all 1 \; tone-hipass-set +set 1 \;; +#X obj 8 53 delay 1000; +#X obj 8 81 print 1sec; +#X obj 19 109 delay 1000; +#X obj 33 164 delay 1000; +#X obj 40 222 delay 1000; +#X obj 19 137 print 2sec; +#X obj 33 192 print 3sec; +#X obj 40 250 print 4sec; +#X obj 121 250 delay 1000; +#X obj 121 278 print 5sec; +#X connect 0 0 6 0; +#X connect 1 0 3 0; +#X connect 2 0 4 0; +#X connect 6 0 7 0; +#X connect 6 0 8 0; +#X connect 8 0 11 0; +#X connect 8 0 9 0; +#X connect 9 0 12 0; +#X connect 9 0 10 0; +#X connect 10 0 13 0; +#X connect 10 0 14 0; +#X connect 14 0 15 0; +#X connect 14 0 5 0; +#X restore 22 332 pd glue+loadbang; +#N canvas 207 133 468 559 tone-generator 0; +#X obj 22 187 osc~; +#X obj 22 81 mtof; +#X floatatom 22 58 0 0 0 0 - - -; +#X floatatom 22 103 0 0 0 0 - - -; +#X obj 22 163 sig~; +#X obj 22 33 r tone-pitch; +#X obj 119 179 noise~; +#X obj 65 249 +~; +#X obj 282 140 - 1; +#X obj 282 172 * -1; +#X obj 191 228 line~; +#X obj 281 229 line~; +#X obj 22 211 *~; +#X obj 119 210 *~; +#X msg 191 199 \$1 20; +#X msg 281 200 \$1 20; +#X floatatom 273 109 0 0 0 0 - - -; +#X obj 64 504 *~; +#X obj 86 477 line~; +#X obj 86 450 pack 0 50; +#X floatatom 201 365 0 0 0 0 - - -; +#X obj 86 423 dbtorms; +#X obj 64 530 s~ tone-osc; +#X obj 201 282 r tone-radio; +#X obj 201 310 sel 0 1 2; +#X msg 270 333 0; +#X msg 201 335 80; +#X msg 234 335 60; +#X obj 273 86 r tone-type; +#X obj 89 359 r tone-level; +#X obj 178 453 s tone-level-set; +#X msg 177 428 set \$1; +#X obj 329 452 s tone-radio-set; +#X obj 327 369 sel 80 60 0; +#X msg 327 394 0; +#X msg 360 394 1; +#X msg 393 394 2; +#X msg 329 426 set \$1; +#X msg 423 394 2; +#X obj 72 89 s tone-pitch-set; +#X msg 72 66 set \$1; +#X obj 177 29 r tone-hz; +#X msg 75 117 set \$1; +#X obj 75 140 s tone-hz-set; +#X obj 177 55 ftom; +#X connect 0 0 12 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 2 0 40 0; +#X connect 3 0 4 0; +#X connect 3 0 42 0; +#X connect 4 0 0 0; +#X connect 5 0 2 0; +#X connect 6 0 13 0; +#X connect 7 0 17 0; +#X connect 8 0 9 0; +#X connect 9 0 15 0; +#X connect 10 0 12 1; +#X connect 11 0 13 1; +#X connect 12 0 7 0; +#X connect 13 0 7 1; +#X connect 14 0 10 0; +#X connect 15 0 11 0; +#X connect 16 0 8 0; +#X connect 16 0 14 0; +#X connect 17 0 22 0; +#X connect 18 0 17 1; +#X connect 19 0 18 0; +#X connect 20 0 21 0; +#X connect 20 0 31 0; +#X connect 21 0 19 0; +#X connect 23 0 24 0; +#X connect 24 0 26 0; +#X connect 24 1 27 0; +#X connect 24 2 25 0; +#X connect 25 0 20 0; +#X connect 26 0 20 0; +#X connect 27 0 20 0; +#X connect 28 0 16 0; +#X connect 29 0 31 0; +#X connect 29 0 21 0; +#X connect 31 0 30 0; +#X connect 33 0 34 0; +#X connect 33 1 35 0; +#X connect 33 2 36 0; +#X connect 33 3 38 0; +#X connect 34 0 37 0; +#X connect 35 0 37 0; +#X connect 36 0 37 0; +#X connect 37 0 32 0; +#X connect 38 0 37 0; +#X connect 40 0 39 0; +#X connect 41 0 44 0; +#X connect 42 0 43 0; +#X connect 44 0 2 0; +#X restore 24 68 pd tone-generator; +#N canvas 76 157 975 436 assigns 0; +#X obj 12 71 hip~ 5; +#X obj 20 122 int; +#X obj 20 96 env~ 8192; +#X obj 12 18 adc~ 1; +#X obj 22 171 r~ tone-mon; +#X obj 31 306 line~; +#X obj 12 196 *~; +#X obj 31 279 pack 0 50; +#X obj 31 253 r tone-ch1; +#X obj 22 226 r~ tone-osc; +#X obj 22 331 *~; +#X obj 12 386 dac~ 1; +#X obj 12 361 +~; +#X obj 20 44 r tone-hip; +#X obj 132 70 hip~ 5; +#X obj 140 121 int; +#X obj 140 95 env~ 8192; +#X obj 142 170 r~ tone-mon; +#X obj 151 305 line~; +#X obj 132 195 *~; +#X obj 151 278 pack 0 50; +#X obj 142 225 r~ tone-osc; +#X obj 142 330 *~; +#X obj 132 360 +~; +#X obj 140 43 r tone-hip; +#X obj 132 17 adc~ 2; +#X obj 132 385 dac~ 2; +#X obj 151 252 r tone-ch2; +#X obj 254 72 hip~ 5; +#X obj 262 123 int; +#X obj 262 97 env~ 8192; +#X obj 264 172 r~ tone-mon; +#X obj 273 307 line~; +#X obj 254 197 *~; +#X obj 273 280 pack 0 50; +#X obj 264 227 r~ tone-osc; +#X obj 264 332 *~; +#X obj 254 362 +~; +#X obj 262 45 r tone-hip; +#X obj 370 68 hip~ 5; +#X obj 378 119 int; +#X obj 378 93 env~ 8192; +#X obj 380 168 r~ tone-mon; +#X obj 389 303 line~; +#X obj 370 193 *~; +#X obj 389 276 pack 0 50; +#X obj 380 223 r~ tone-osc; +#X obj 380 328 *~; +#X obj 370 358 +~; +#X obj 378 41 r tone-hip; +#X obj 487 68 hip~ 5; +#X obj 495 119 int; +#X obj 495 93 env~ 8192; +#X obj 497 168 r~ tone-mon; +#X obj 506 303 line~; +#X obj 487 193 *~; +#X obj 506 276 pack 0 50; +#X obj 497 223 r~ tone-osc; +#X obj 497 328 *~; +#X obj 487 358 +~; +#X obj 495 41 r tone-hip; +#X obj 607 67 hip~ 5; +#X obj 615 118 int; +#X obj 615 92 env~ 8192; +#X obj 617 167 r~ tone-mon; +#X obj 626 302 line~; +#X obj 607 192 *~; +#X obj 626 275 pack 0 50; +#X obj 617 222 r~ tone-osc; +#X obj 617 327 *~; +#X obj 607 357 +~; +#X obj 615 40 r tone-hip; +#X obj 254 19 adc~ 3; +#X obj 370 15 adc~ 4; +#X obj 487 15 adc~ 5; +#X obj 607 14 adc~ 6; +#X obj 273 254 r tone-ch3; +#X obj 389 249 r tone-ch4; +#X obj 506 250 r tone-ch5; +#X obj 626 249 r tone-ch6; +#X obj 254 387 dac~ 3; +#X obj 369 382 dac~ 4; +#X obj 487 383 dac~ 5; +#X obj 607 382 dac~ 6; +#X obj 725 72 hip~ 5; +#X obj 733 123 int; +#X obj 733 97 env~ 8192; +#X obj 735 172 r~ tone-mon; +#X obj 744 307 line~; +#X obj 725 197 *~; +#X obj 744 280 pack 0 50; +#X obj 735 227 r~ tone-osc; +#X obj 735 332 *~; +#X obj 725 362 +~; +#X obj 733 45 r tone-hip; +#X obj 845 71 hip~ 5; +#X obj 853 122 int; +#X obj 853 96 env~ 8192; +#X obj 855 171 r~ tone-mon; +#X obj 864 306 line~; +#X obj 845 196 *~; +#X obj 864 279 pack 0 50; +#X obj 855 226 r~ tone-osc; +#X obj 855 331 *~; +#X obj 845 361 +~; +#X obj 853 44 r tone-hip; +#X obj 725 19 adc~ 7; +#X obj 845 18 adc~ 8; +#X obj 725 387 dac~ 7; +#X obj 845 386 dac~ 8; +#X obj 744 254 r tone-ch7; +#X obj 864 253 r tone-ch8; +#X obj 20 148 s tone-vu1; +#X obj 140 147 s tone-vu2; +#X obj 262 149 s tone-vu3; +#X obj 378 145 s tone-vu4; +#X obj 495 145 s tone-vu5; +#X obj 615 144 s tone-vu6; +#X obj 733 149 s tone-vu7; +#X obj 853 148 s tone-vu8; +#X connect 0 0 6 0; +#X connect 0 0 2 0; +#X connect 1 0 112 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 6 1; +#X connect 5 0 10 1; +#X connect 6 0 12 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 12 1; +#X connect 12 0 11 0; +#X connect 13 0 0 1; +#X connect 14 0 19 0; +#X connect 14 0 16 0; +#X connect 15 0 113 0; +#X connect 16 0 15 0; +#X connect 17 0 19 1; +#X connect 18 0 22 1; +#X connect 19 0 23 0; +#X connect 20 0 18 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 23 0 26 0; +#X connect 24 0 14 1; +#X connect 25 0 14 0; +#X connect 27 0 20 0; +#X connect 28 0 33 0; +#X connect 28 0 30 0; +#X connect 29 0 114 0; +#X connect 30 0 29 0; +#X connect 31 0 33 1; +#X connect 32 0 36 1; +#X connect 33 0 37 0; +#X connect 34 0 32 0; +#X connect 35 0 36 0; +#X connect 36 0 37 1; +#X connect 37 0 80 0; +#X connect 38 0 28 1; +#X connect 39 0 44 0; +#X connect 39 0 41 0; +#X connect 40 0 115 0; +#X connect 41 0 40 0; +#X connect 42 0 44 1; +#X connect 43 0 47 1; +#X connect 44 0 48 0; +#X connect 45 0 43 0; +#X connect 46 0 47 0; +#X connect 47 0 48 1; +#X connect 48 0 81 0; +#X connect 49 0 39 1; +#X connect 50 0 55 0; +#X connect 50 0 52 0; +#X connect 51 0 116 0; +#X connect 52 0 51 0; +#X connect 53 0 55 1; +#X connect 54 0 58 1; +#X connect 55 0 59 0; +#X connect 56 0 54 0; +#X connect 57 0 58 0; +#X connect 58 0 59 1; +#X connect 59 0 82 0; +#X connect 60 0 50 1; +#X connect 61 0 66 0; +#X connect 61 0 63 0; +#X connect 62 0 117 0; +#X connect 63 0 62 0; +#X connect 64 0 66 1; +#X connect 65 0 69 1; +#X connect 66 0 70 0; +#X connect 67 0 65 0; +#X connect 68 0 69 0; +#X connect 69 0 70 1; +#X connect 70 0 83 0; +#X connect 71 0 61 1; +#X connect 72 0 28 0; +#X connect 73 0 39 0; +#X connect 74 0 50 0; +#X connect 75 0 61 0; +#X connect 76 0 34 0; +#X connect 77 0 45 0; +#X connect 78 0 56 0; +#X connect 79 0 67 0; +#X connect 84 0 89 0; +#X connect 84 0 86 0; +#X connect 85 0 118 0; +#X connect 86 0 85 0; +#X connect 87 0 89 1; +#X connect 88 0 92 1; +#X connect 89 0 93 0; +#X connect 90 0 88 0; +#X connect 91 0 92 0; +#X connect 92 0 93 1; +#X connect 93 0 108 0; +#X connect 94 0 84 1; +#X connect 95 0 100 0; +#X connect 95 0 97 0; +#X connect 96 0 119 0; +#X connect 97 0 96 0; +#X connect 98 0 100 1; +#X connect 99 0 103 1; +#X connect 100 0 104 0; +#X connect 101 0 99 0; +#X connect 102 0 103 0; +#X connect 103 0 104 1; +#X connect 104 0 109 0; +#X connect 105 0 95 1; +#X connect 106 0 84 0; +#X connect 107 0 95 0; +#X connect 110 0 90 0; +#X connect 111 0 101 0; +#X restore 38 387 pd assigns; +#X obj 178 87 loadbang; +#X obj 178 111 1; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 6 0 4 0; +#X connect 10 0 11 0; +#X connect 11 0 4 0; +#X restore 388 243 pd audio; +#X floatatom 22 144 3 0 100 1 - tone-level-set tone-level; +#X floatatom 84 123 5 0 100 1 pitch tone-pitch-set tone-pitch; +#X floatatom 84 145 5 0 20000 1 HZ tone-hz-set tone-hz; +#X text 48 145 dB; +#X text 34 67 TEST TONES; +#X text 233 156 AUDIO OUTPUT ON/OFF; +#X text 18 5 Welcome to Pd ("Pure Data"). You can use this window to +test audio and MIDI connections. To see Pd's DOCUMENTATION \, select +"getting started" in the Help menu.; +#X text 18 323 Pd is Free software under the BSD license. See LICENSE.txt +in the distribution for details.; +#X obj 27 292 bng 20 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 120 293 bng 20 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 39 105 60; +#X text 39 88 80; +#X text 16 163 (100 max); +#X connect 1 0 2 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 2 1 0 0; +#X connect 3 0 47 0; +#X connect 7 0 48 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 14 0 9 0; diff --git a/_archive.ringringrain_2011/revised_to_work.txt b/_archive.ringringrain_2011/revised_to_work.txt new file mode 100644 index 0000000..e69de29 diff --git a/_archive.ringringrain_2011/sketchbook/.DS_Store b/_archive.ringringrain_2011/sketchbook/.DS_Store new file mode 100644 index 0000000..7813bad Binary files /dev/null and b/_archive.ringringrain_2011/sketchbook/.DS_Store differ diff --git a/_archive.ringringrain_2011/sketchbook/StandardFirmata_pullup_enable_autoinit_all_digital_in/StandardFirmata_pullup_enable_autoinit_all_digital_in.ino b/_archive.ringringrain_2011/sketchbook/StandardFirmata_pullup_enable_autoinit_all_digital_in/StandardFirmata_pullup_enable_autoinit_all_digital_in.ino new file mode 100755 index 0000000..e8d26de --- /dev/null +++ b/_archive.ringringrain_2011/sketchbook/StandardFirmata_pullup_enable_autoinit_all_digital_in/StandardFirmata_pullup_enable_autoinit_all_digital_in.ino @@ -0,0 +1,670 @@ +/* + * Firmata is a generic protocol for communicating with microcontrollers + * from software on a host computer. It is intended to work with + * any host computer software package. + * + * To download a host software package, please clink on the following link + * to open the download page in your default browser. + * + * http://firmata.org/wiki/Download + */ + +/* + Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved. + Copyright (C) 2010-2011 Paul Stoffregen. All rights reserved. + Copyright (C) 2009 Shigeru Kobayashi. All rights reserved. + Copyright (C) 2009-2011 Jeff Hoefs. All rights reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + See file LICENSE.txt for further informations on licensing terms. + + formatted using the GNU C formatting and indenting +*/ + +/* + * TODO: use Program Control to load stored profiles from EEPROM + */ + +#include +#include +#include + +// move the following defines to Firmata.h? +#define I2C_WRITE B00000000 +#define I2C_READ B00001000 +#define I2C_READ_CONTINUOUSLY B00010000 +#define I2C_STOP_READING B00011000 +#define I2C_READ_WRITE_MODE_MASK B00011000 +#define I2C_10BIT_ADDRESS_MODE_MASK B00100000 + +#define MAX_QUERIES 8 +#define MINIMUM_SAMPLING_INTERVAL 10 + +#define REGISTER_NOT_SPECIFIED -1 + +/*============================================================================== + * GLOBAL VARIABLES + *============================================================================*/ + +/* analog inputs */ +int analogInputsToReport = 0; // bitwise array to store pin reporting + +/* digital input ports */ +byte reportPINs[TOTAL_PORTS]; // 1 = report this port, 0 = silence +byte previousPINs[TOTAL_PORTS]; // previous 8 bits sent + +/* pins configuration */ +byte pinConfig[TOTAL_PINS]; // configuration of every pin +byte portConfigInputs[TOTAL_PORTS]; // each bit: 1 = pin in INPUT, 0 = anything else +int pinState[TOTAL_PINS]; // any value that has been written + +/* timer variables */ +unsigned long currentMillis; // store the current value from millis() +unsigned long previousMillis; // for comparison with currentMillis +int samplingInterval = 19; // how often to run the main loop (in ms) + +/* i2c data */ +struct i2c_device_info { + byte addr; + byte reg; + byte bytes; +}; + +/* for i2c read continuous more */ +i2c_device_info query[MAX_QUERIES]; + +byte i2cRxData[32]; +boolean isI2CEnabled = false; +signed char queryIndex = -1; +unsigned int i2cReadDelayTime = 0; // default delay time between i2c read request and Wire.requestFrom() + +Servo servos[MAX_SERVOS]; +/*============================================================================== + * FUNCTIONS + *============================================================================*/ + +void readAndReportData(byte address, int theRegister, byte numBytes) { + // allow I2C requests that don't require a register read + // for example, some devices using an interrupt pin to signify new data available + // do not always require the register read so upon interrupt you call Wire.requestFrom() + if (theRegister != REGISTER_NOT_SPECIFIED) { + Wire.beginTransmission(address); + #if ARDUINO >= 100 + Wire.write((byte)theRegister); + #else + Wire.send((byte)theRegister); + #endif + Wire.endTransmission(); + delayMicroseconds(i2cReadDelayTime); // delay is necessary for some devices such as WiiNunchuck + } else { + theRegister = 0; // fill the register with a dummy value + } + + Wire.requestFrom(address, numBytes); // all bytes are returned in requestFrom + + // check to be sure correct number of bytes were returned by slave + if(numBytes == Wire.available()) { + i2cRxData[0] = address; + i2cRxData[1] = theRegister; + for (int i = 0; i < numBytes; i++) { + #if ARDUINO >= 100 + i2cRxData[2 + i] = Wire.read(); + #else + i2cRxData[2 + i] = Wire.receive(); + #endif + } + } + else { + if(numBytes > Wire.available()) { + Firmata.sendString("I2C Read Error: Too many bytes received"); + } else { + Firmata.sendString("I2C Read Error: Too few bytes received"); + } + } + + // send slave address, register and received bytes + Firmata.sendSysex(SYSEX_I2C_REPLY, numBytes + 2, i2cRxData); +} + +void outputPort(byte portNumber, byte portValue, byte forceSend) +{ + // pins not configured as INPUT are cleared to zeros + portValue = portValue & portConfigInputs[portNumber]; + // only send if the value is different than previously sent + if(forceSend || previousPINs[portNumber] != portValue) { + Firmata.sendDigitalPort(portNumber, portValue); + previousPINs[portNumber] = portValue; + } +} + +/* ----------------------------------------------------------------------------- + * check all the active digital inputs for change of state, then add any events + * to the Serial output queue using Serial.print() */ +void checkDigitalInputs(void) +{ + /* Using non-looping code allows constants to be given to readPort(). + * The compiler will apply substantial optimizations if the inputs + * to readPort() are compile-time constants. */ + if (TOTAL_PORTS > 0 && reportPINs[0]) outputPort(0, readPort(0, portConfigInputs[0]), false); + if (TOTAL_PORTS > 1 && reportPINs[1]) outputPort(1, readPort(1, portConfigInputs[1]), false); + if (TOTAL_PORTS > 2 && reportPINs[2]) outputPort(2, readPort(2, portConfigInputs[2]), false); + if (TOTAL_PORTS > 3 && reportPINs[3]) outputPort(3, readPort(3, portConfigInputs[3]), false); + if (TOTAL_PORTS > 4 && reportPINs[4]) outputPort(4, readPort(4, portConfigInputs[4]), false); + if (TOTAL_PORTS > 5 && reportPINs[5]) outputPort(5, readPort(5, portConfigInputs[5]), false); + if (TOTAL_PORTS > 6 && reportPINs[6]) outputPort(6, readPort(6, portConfigInputs[6]), false); + if (TOTAL_PORTS > 7 && reportPINs[7]) outputPort(7, readPort(7, portConfigInputs[7]), false); + if (TOTAL_PORTS > 8 && reportPINs[8]) outputPort(8, readPort(8, portConfigInputs[8]), false); + if (TOTAL_PORTS > 9 && reportPINs[9]) outputPort(9, readPort(9, portConfigInputs[9]), false); + if (TOTAL_PORTS > 10 && reportPINs[10]) outputPort(10, readPort(10, portConfigInputs[10]), false); + if (TOTAL_PORTS > 11 && reportPINs[11]) outputPort(11, readPort(11, portConfigInputs[11]), false); + if (TOTAL_PORTS > 12 && reportPINs[12]) outputPort(12, readPort(12, portConfigInputs[12]), false); + if (TOTAL_PORTS > 13 && reportPINs[13]) outputPort(13, readPort(13, portConfigInputs[13]), false); + if (TOTAL_PORTS > 14 && reportPINs[14]) outputPort(14, readPort(14, portConfigInputs[14]), false); + if (TOTAL_PORTS > 15 && reportPINs[15]) outputPort(15, readPort(15, portConfigInputs[15]), false); +} + +// ----------------------------------------------------------------------------- +/* sets the pin mode to the correct state and sets the relevant bits in the + * two bit-arrays that track Digital I/O and PWM status + */ +void setPinModeCallback(byte pin, int mode) +{ + if (pinConfig[pin] == I2C && isI2CEnabled && mode != I2C) { + // disable i2c so pins can be used for other functions + // the following if statements should reconfigure the pins properly + disableI2CPins(); + } + if (IS_PIN_SERVO(pin) && mode != SERVO && servos[PIN_TO_SERVO(pin)].attached()) { + servos[PIN_TO_SERVO(pin)].detach(); + } + if (IS_PIN_ANALOG(pin)) { + reportAnalogCallback(PIN_TO_ANALOG(pin), mode == ANALOG ? 1 : 0); // turn on/off reporting + } + if (IS_PIN_DIGITAL(pin)) { + if (mode == INPUT) { + portConfigInputs[pin/8] |= (1 << (pin & 7)); + } else { + portConfigInputs[pin/8] &= ~(1 << (pin & 7)); + } + } + pinState[pin] = 0; + switch(mode) { + case ANALOG: + if (IS_PIN_ANALOG(pin)) { + if (IS_PIN_DIGITAL(pin)) { + pinMode(PIN_TO_DIGITAL(pin), INPUT); // disable output driver + //digitalWrite(PIN_TO_DIGITAL(pin), LOW); // disable internal pull-ups + digitalWrite(PIN_TO_DIGITAL(pin), HIGH); // enable internal pull-ups + } + pinConfig[pin] = ANALOG; + } + break; + case INPUT: + if (IS_PIN_DIGITAL(pin)) { + pinMode(PIN_TO_DIGITAL(pin), INPUT); // disable output driver + //digitalWrite(PIN_TO_DIGITAL(pin), LOW); // disable internal pull-ups + digitalWrite(PIN_TO_DIGITAL(pin), HIGH); // enable internal pull-ups + pinConfig[pin] = INPUT; + } + break; + case OUTPUT: + if (IS_PIN_DIGITAL(pin)) { + digitalWrite(PIN_TO_DIGITAL(pin), LOW); // disable PWM + pinMode(PIN_TO_DIGITAL(pin), OUTPUT); + pinConfig[pin] = OUTPUT; + } + break; + case PWM: + if (IS_PIN_PWM(pin)) { + pinMode(PIN_TO_PWM(pin), OUTPUT); + analogWrite(PIN_TO_PWM(pin), 0); + pinConfig[pin] = PWM; + } + break; + case SERVO: + if (IS_PIN_SERVO(pin)) { + pinConfig[pin] = SERVO; + if (!servos[PIN_TO_SERVO(pin)].attached()) { + servos[PIN_TO_SERVO(pin)].attach(PIN_TO_DIGITAL(pin)); + } + } + break; + case I2C: + if (IS_PIN_I2C(pin)) { + // mark the pin as i2c + // the user must call I2C_CONFIG to enable I2C for a device + pinConfig[pin] = I2C; + } + break; + default: + Firmata.sendString("Unknown pin mode"); // TODO: put error msgs in EEPROM + } + // TODO: save status to EEPROM here, if changed +} + +void analogWriteCallback(byte pin, int value) +{ + if (pin < TOTAL_PINS) { + switch(pinConfig[pin]) { + case SERVO: + if (IS_PIN_SERVO(pin)) + servos[PIN_TO_SERVO(pin)].write(value); + pinState[pin] = value; + break; + case PWM: + if (IS_PIN_PWM(pin)) + analogWrite(PIN_TO_PWM(pin), value); + pinState[pin] = value; + break; + } + } +} + +void digitalWriteCallback(byte port, int value) +{ + byte pin, lastPin, mask=1, pinWriteMask=0; + + if (port < TOTAL_PORTS) { + // create a mask of the pins on this port that are writable. + lastPin = port*8+8; + if (lastPin > TOTAL_PINS) lastPin = TOTAL_PINS; + for (pin=port*8; pin < lastPin; pin++) { + // do not disturb non-digital pins (eg, Rx & Tx) + if (IS_PIN_DIGITAL(pin)) { + // only write to OUTPUT and INPUT (enables pullup) + // do not touch pins in PWM, ANALOG, SERVO or other modes + if (pinConfig[pin] == OUTPUT || pinConfig[pin] == INPUT) { + pinWriteMask |= mask; + pinState[pin] = ((byte)value & mask) ? 1 : 0; + } + } + mask = mask << 1; + } + writePort(port, (byte)value, pinWriteMask); + } +} + + +// ----------------------------------------------------------------------------- +/* sets bits in a bit array (int) to toggle the reporting of the analogIns + */ +//void FirmataClass::setAnalogPinReporting(byte pin, byte state) { +//} +void reportAnalogCallback(byte analogPin, int value) +{ + if (analogPin < TOTAL_ANALOG_PINS) { + if(value == 0) { + analogInputsToReport = analogInputsToReport &~ (1 << analogPin); + } else { + analogInputsToReport = analogInputsToReport | (1 << analogPin); + } + } + // TODO: save status to EEPROM here, if changed +} + +void reportDigitalCallback(byte port, int value) +{ + if (port < TOTAL_PORTS) { + reportPINs[port] = (byte)value; + } + // do not disable analog reporting on these 8 pins, to allow some + // pins used for digital, others analog. Instead, allow both types + // of reporting to be enabled, but check if the pin is configured + // as analog when sampling the analog inputs. Likewise, while + // scanning digital pins, portConfigInputs will mask off values from any + // pins configured as analog +} + +/*============================================================================== + * SYSEX-BASED commands + *============================================================================*/ + +void sysexCallback(byte command, byte argc, byte *argv) +{ + byte mode; + byte slaveAddress; + byte slaveRegister; + byte data; + unsigned int delayTime; + + switch(command) { + case I2C_REQUEST: + mode = argv[1] & I2C_READ_WRITE_MODE_MASK; + if (argv[1] & I2C_10BIT_ADDRESS_MODE_MASK) { + Firmata.sendString("10-bit addressing mode is not yet supported"); + return; + } + else { + slaveAddress = argv[0]; + } + + switch(mode) { + case I2C_WRITE: + Wire.beginTransmission(slaveAddress); + for (byte i = 2; i < argc; i += 2) { + data = argv[i] + (argv[i + 1] << 7); + #if ARDUINO >= 100 + Wire.write(data); + #else + Wire.send(data); + #endif + } + Wire.endTransmission(); + delayMicroseconds(70); + break; + case I2C_READ: + if (argc == 6) { + // a slave register is specified + slaveRegister = argv[2] + (argv[3] << 7); + data = argv[4] + (argv[5] << 7); // bytes to read + readAndReportData(slaveAddress, (int)slaveRegister, data); + } + else { + // a slave register is NOT specified + data = argv[2] + (argv[3] << 7); // bytes to read + readAndReportData(slaveAddress, (int)REGISTER_NOT_SPECIFIED, data); + } + break; + case I2C_READ_CONTINUOUSLY: + if ((queryIndex + 1) >= MAX_QUERIES) { + // too many queries, just ignore + Firmata.sendString("too many queries"); + break; + } + queryIndex++; + query[queryIndex].addr = slaveAddress; + query[queryIndex].reg = argv[2] + (argv[3] << 7); + query[queryIndex].bytes = argv[4] + (argv[5] << 7); + break; + case I2C_STOP_READING: + byte queryIndexToSkip; + // if read continuous mode is enabled for only 1 i2c device, disable + // read continuous reporting for that device + if (queryIndex <= 0) { + queryIndex = -1; + } else { + // if read continuous mode is enabled for multiple devices, + // determine which device to stop reading and remove it's data from + // the array, shifiting other array data to fill the space + for (byte i = 0; i < queryIndex + 1; i++) { + if (query[i].addr = slaveAddress) { + queryIndexToSkip = i; + break; + } + } + + for (byte i = queryIndexToSkip; i 0) { + i2cReadDelayTime = delayTime; + } + + if (!isI2CEnabled) { + enableI2CPins(); + } + + break; + case SERVO_CONFIG: + if(argc > 4) { + // these vars are here for clarity, they'll optimized away by the compiler + byte pin = argv[0]; + int minPulse = argv[1] + (argv[2] << 7); + int maxPulse = argv[3] + (argv[4] << 7); + + if (IS_PIN_SERVO(pin)) { + if (servos[PIN_TO_SERVO(pin)].attached()) + servos[PIN_TO_SERVO(pin)].detach(); + servos[PIN_TO_SERVO(pin)].attach(PIN_TO_DIGITAL(pin), minPulse, maxPulse); + setPinModeCallback(pin, SERVO); + } + } + break; + case SAMPLING_INTERVAL: + if (argc > 1) { + samplingInterval = argv[0] + (argv[1] << 7); + if (samplingInterval < MINIMUM_SAMPLING_INTERVAL) { + samplingInterval = MINIMUM_SAMPLING_INTERVAL; + } + } else { + //Firmata.sendString("Not enough data"); + } + break; + case EXTENDED_ANALOG: + if (argc > 1) { + int val = argv[1]; + if (argc > 2) val |= (argv[2] << 7); + if (argc > 3) val |= (argv[3] << 14); + analogWriteCallback(argv[0], val); + } + break; + case CAPABILITY_QUERY: + Serial.write(START_SYSEX); + Serial.write(CAPABILITY_RESPONSE); + for (byte pin=0; pin < TOTAL_PINS; pin++) { + if (IS_PIN_DIGITAL(pin)) { + Serial.write((byte)INPUT); + Serial.write(1); + Serial.write((byte)OUTPUT); + Serial.write(1); + } + if (IS_PIN_ANALOG(pin)) { + Serial.write(ANALOG); + Serial.write(10); + } + if (IS_PIN_PWM(pin)) { + Serial.write(PWM); + Serial.write(8); + } + if (IS_PIN_SERVO(pin)) { + Serial.write(SERVO); + Serial.write(14); + } + if (IS_PIN_I2C(pin)) { + Serial.write(I2C); + Serial.write(1); // to do: determine appropriate value + } + Serial.write(127); + } + Serial.write(END_SYSEX); + break; + case PIN_STATE_QUERY: + if (argc > 0) { + byte pin=argv[0]; + Serial.write(START_SYSEX); + Serial.write(PIN_STATE_RESPONSE); + Serial.write(pin); + if (pin < TOTAL_PINS) { + Serial.write((byte)pinConfig[pin]); + Serial.write((byte)pinState[pin] & 0x7F); + if (pinState[pin] & 0xFF80) Serial.write((byte)(pinState[pin] >> 7) & 0x7F); + if (pinState[pin] & 0xC000) Serial.write((byte)(pinState[pin] >> 14) & 0x7F); + } + Serial.write(END_SYSEX); + } + break; + case ANALOG_MAPPING_QUERY: + Serial.write(START_SYSEX); + Serial.write(ANALOG_MAPPING_RESPONSE); + for (byte pin=0; pin < TOTAL_PINS; pin++) { + Serial.write(IS_PIN_ANALOG(pin) ? PIN_TO_ANALOG(pin) : 127); + } + Serial.write(END_SYSEX); + break; + } +} + +void enableI2CPins() +{ + byte i; + // is there a faster way to do this? would probaby require importing + // Arduino.h to get SCL and SDA pins + for (i=0; i < TOTAL_PINS; i++) { + if(IS_PIN_I2C(i)) { + // mark pins as i2c so they are ignore in non i2c data requests + setPinModeCallback(i, I2C); + } + } + + isI2CEnabled = true; + + // is there enough time before the first I2C request to call this here? + Wire.begin(); +} + +/* disable the i2c pins so they can be used for other functions */ +void disableI2CPins() { + isI2CEnabled = false; + // disable read continuous mode for all devices + queryIndex = -1; + // uncomment the following if or when the end() method is added to Wire library + // Wire.end(); +} + +/*============================================================================== + * SETUP() + *============================================================================*/ + +void systemResetCallback() +{ + // initialize a defalt state + // TODO: option to load config from EEPROM instead of default + if (isI2CEnabled) { + disableI2CPins(); + } + /*for (byte i=0; i < TOTAL_PORTS; i++) { + reportPINs[i] = false; // by default, reporting off + portConfigInputs[i] = 0; // until activated + previousPINs[i] = 0; + }*/ + // auto-init as all available pins as digital inputs. + // void reportDigitalCallback(byte port, int value) ==> this treats 'reportPINs' + reportDigitalCallback(0, 1); + reportDigitalCallback(1, 1); + reportDigitalCallback(2, 1); + // void setPinModeCallback(byte pin, int mode) ==> this treats 'portConfigInputs' / for 'previousPINs', have a look 'void outputPort(byte portNumber, byte portValue, byte forceSend)' ... '// only send if the value is different than previously sent' + setPinModeCallback(2, INPUT); + setPinModeCallback(3, INPUT); + setPinModeCallback(4, INPUT); + setPinModeCallback(5, INPUT); + setPinModeCallback(6, INPUT); + setPinModeCallback(7, INPUT); + setPinModeCallback(8, INPUT); + setPinModeCallback(9, INPUT); + setPinModeCallback(10, INPUT); + setPinModeCallback(11, INPUT); + setPinModeCallback(12, INPUT); + //setPinModeCallback(13, INPUT); + // + // firmate does not blocking 'digital input on pin 13' + // but, real cause comes out of the board design. + // ==> NOTE: Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7 V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. + // (http://arduino.cc/en/Tutorial/DigitalPins) + // so, it is, 'by h/w design', not feasible. + // + setPinModeCallback(14, INPUT); + setPinModeCallback(15, INPUT); + setPinModeCallback(16, INPUT); + setPinModeCallback(17, INPUT); + setPinModeCallback(18, INPUT); + setPinModeCallback(19, INPUT); + + // pins with analog capability default to analog input + // otherwise, pins default to digital output + /*for (byte i=0; i < TOTAL_PINS; i++) { + if (IS_PIN_ANALOG(i)) { + // turns off pullup, configures everything + setPinModeCallback(i, ANALOG); + } else { + // sets the output to 0, configures portConfigInputs + setPinModeCallback(i, OUTPUT); + } + }*/ + // by default, do not report any analog inputs + analogInputsToReport = 0; + + /* send digital inputs to set the initial state on the host computer, + * since once in the loop(), this firmware will only send on change */ + /* + TODO: this can never execute, since no pins default to digital input + but it will be needed when/if we support EEPROM stored config + for (byte i=0; i < TOTAL_PORTS; i++) { + outputPort(i, readPort(i, portConfigInputs[i]), true); + } + */ +} + +void setup() +{ + Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION); + + Firmata.attach(ANALOG_MESSAGE, analogWriteCallback); + Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback); + Firmata.attach(REPORT_ANALOG, reportAnalogCallback); + Firmata.attach(REPORT_DIGITAL, reportDigitalCallback); + Firmata.attach(SET_PIN_MODE, setPinModeCallback); + Firmata.attach(START_SYSEX, sysexCallback); + Firmata.attach(SYSTEM_RESET, systemResetCallback); + + Firmata.begin(57600); + systemResetCallback(); // reset to default config +} + +/*============================================================================== + * LOOP() + *============================================================================*/ +void loop() +{ + byte pin, analogPin; + + /* DIGITALREAD - as fast as possible, check for changes and output them to the + * FTDI buffer using Serial.print() */ + checkDigitalInputs(); + + /* SERIALREAD - processing incoming messagse as soon as possible, while still + * checking digital inputs. */ + while(Firmata.available()) + Firmata.processInput(); + + /* SEND FTDI WRITE BUFFER - make sure that the FTDI buffer doesn't go over + * 60 bytes. use a timer to sending an event character every 4 ms to + * trigger the buffer to dump. */ + + currentMillis = millis(); + if (currentMillis - previousMillis > samplingInterval) { + previousMillis += samplingInterval; + /* ANALOGREAD - do all analogReads() at the configured sampling interval */ + for(pin=0; pin -1) { + for (byte i = 0; i < queryIndex + 1; i++) { + readAndReportData(query[i].addr, query[i].reg, query[i].bytes); + } + } + } +} diff --git a/arduino-wifi.pd b/arduino-wifi.pd new file mode 100644 index 0000000..87093d4 --- /dev/null +++ b/arduino-wifi.pd @@ -0,0 +1,1183 @@ +#N canvas 350 188 596 398 10; +#X obj 32 56 inlet; +#X obj 32 334 outlet; +#N canvas 214 231 982 332 command 0; +#X obj 24 7 inlet; +#X obj 299 298 outlet; +#N canvas 562 295 547 478 digital-out 0; +#X obj 4 15 inlet; +#X obj 284 440 outlet; +#X msg 373 158 \$1; +#X text 402 157 add channel to command; +#X text 411 201 0x90; +#X obj 373 202 + 144; +#X obj 373 180 div 8; +#X obj 212 391 float; +#X obj 145 391 float; +#X obj 459 16 inlet; +#X text 339 15 state from port-out; +#X msg 157 84 \$2; +#X obj 237 121 <<; +#X msg 237 100 1 \$1; +#X obj 284 242 * 8; +#X obj 172 371 >> 7; +#X obj 239 371 & 127; +#X obj 249 314 &; +#X msg 290 267 255 \$1; +#X obj 290 288 <<; +#X obj 5 55 trigger bang bang bang anything anything anything; +#X obj 157 267 float; +#X obj 255 338 >>; +#X obj 207 197 |; +#X obj 207 165 float; +#X obj 157 159 float; +#X obj 157 115 select 0 1; +#X floatatom 462 49 0 0 0 0 - - - 0; +#X obj 157 181 * -1; +#X obj 157 210 - 1; +#X obj 157 239 &; +#X connect 0 0 20 0; +#X connect 2 0 6 0; +#X connect 5 0 1 0; +#X connect 6 0 5 0; +#X connect 6 0 14 0; +#X connect 7 0 1 0; +#X connect 8 0 1 0; +#X connect 9 0 23 0; +#X connect 9 0 27 0; +#X connect 11 0 26 0; +#X connect 12 0 24 1; +#X connect 12 0 25 1; +#X connect 13 0 12 0; +#X connect 14 0 18 0; +#X connect 14 0 22 1; +#X connect 15 0 8 1; +#X connect 16 0 7 1; +#X connect 17 0 22 0; +#X connect 18 0 19 0; +#X connect 19 0 17 1; +#X connect 20 0 8 0; +#X connect 20 1 7 0; +#X connect 20 3 11 0; +#X connect 20 4 13 0; +#X connect 20 5 2 0; +#X connect 21 0 23 1; +#X connect 21 0 17 0; +#X connect 21 0 30 1; +#X connect 22 0 16 0; +#X connect 22 0 15 0; +#X connect 23 0 21 0; +#X connect 24 0 23 0; +#X connect 25 0 28 0; +#X connect 26 0 25 0; +#X connect 26 1 24 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 21 0; +#X restore 310 114 pd digital-out; +#N canvas 37 230 541 377 pinMode 0; +#X obj 51 8 inlet; +#X obj 51 350 outlet; +#X text 141 54 pin#; +#X text 321 56 mode; +#X obj 174 147 moses 128; +#X msg 51 227 244; +#X text 194 131 do bounds checking to be safe; +#X obj 51 252 pack float float float; +#X obj 279 147 moses 128; +#X obj 225 255 bang; +#X obj 225 320 list trim; +#X obj 225 300 list prepend ERROR:; +#X msg 225 275 pinMode pin# greater than 127; +#X obj 330 213 bang; +#X msg 330 233 pinMode mode greater than 127; +#X obj 225 340 print [arduino]; +#N canvas 577 324 396 304 turn 0; +#X obj 123 21 inlet; +#X obj 43 21 inlet; +#X obj 123 78 select 0; +#X text 178 78 INPUT; +#X obj 215 252 outlet; +#X obj 110 135 spigot; +#X msg 123 109 1; +#X obj 215 180 >> 3; +#X obj 110 158 trigger bang float; +#X msg 152 109 0; +#X text 254 201 0xD0; +#X obj 215 201 + 208; +#X obj 215 228 pack float 1; +#X text 42 202 generate digitalIns message; +#X connect 0 0 2 0; +#X connect 1 0 5 0; +#X connect 2 0 6 0; +#X connect 5 0 8 0; +#X connect 6 0 5 1; +#X connect 7 0 11 0; +#X connect 8 0 9 0; +#X connect 8 1 7 0; +#X connect 9 0 5 1; +#X connect 11 0 12 0; +#X connect 12 0 4 0; +#X restore 174 184 pd turn digital reporting on; +#X obj 51 32 trigger bang anything; +#X obj 309 78 route float symbol; +#N canvas 0 76 450 300 s2f 0; +#X obj 72 14 inlet; +#X obj 72 265 outlet; +#X obj 72 69 select input output analog pwm servo; +#X obj 285 262 outlet; +#X msg 72 95 0; +#X msg 114 95 1; +#X msg 157 95 2; +#X msg 199 95 3; +#X msg 242 95 4; +#X connect 0 0 2 0; +#X connect 2 0 4 0; +#X connect 2 1 5 0; +#X connect 2 2 6 0; +#X connect 2 3 7 0; +#X connect 2 4 8 0; +#X connect 2 5 3 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 8 0 1 0; +#X restore 361 99 pd s2f; +#X obj 414 120 list; +#X msg 414 141 unknown pinMode: \$1; +#X obj 174 55 list split 1; +#X connect 0 0 17 0; +#X connect 4 0 7 1; +#X connect 4 0 16 0; +#X connect 4 1 9 0; +#X connect 5 0 7 0; +#X connect 7 0 1 0; +#X connect 8 0 7 2; +#X connect 8 0 16 1; +#X connect 8 1 13 0; +#X connect 9 0 12 0; +#X connect 10 0 15 0; +#X connect 11 0 10 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 14 0 11 0; +#X connect 16 0 1 0; +#X connect 17 0 5 0; +#X connect 17 1 22 0; +#X connect 18 0 8 0; +#X connect 18 1 19 0; +#X connect 18 2 20 0; +#X connect 19 0 8 0; +#X connect 19 1 20 0; +#X connect 20 0 21 0; +#X connect 21 0 11 0; +#X connect 22 0 4 0; +#X connect 22 1 18 0; +#X restore 237 93 pd pinMode; +#N canvas 300 396 372 380 pwm 0; +#X obj 44 14 inlet; +#X obj 44 312 outlet; +#X obj 44 79 unpack float float; +#X obj 44 124 + 224; +#X text 78 125 0xE0; +#X obj 44 212 pack float float float; +#X obj 149 126 * 255; +#X obj 173 165 >> 7; +#X obj 108 165 & 127; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 6 0; +#X connect 3 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 5 2; +#X connect 8 0 5 1; +#X restore 24 94 pd pwm; +#X msg 477 113 249; +#N canvas 0 50 462 312 analogIns 0; +#X obj 64 7 inlet; +#X obj 64 263 outlet; +#X obj 64 65 unpack float float; +#X obj 64 175 pack float float; +#X obj 169 95 select 0; +#X obj 214 118 bang; +#X msg 214 140 1; +#X msg 169 117 0; +#X obj 64 124 + 192; +#X obj 64 95 moses 16; +#X text 100 123 0xC0; +#X connect 0 0 2 0; +#X connect 2 0 9 0; +#X connect 2 1 4 0; +#X connect 3 0 1 0; +#X connect 4 0 7 0; +#X connect 4 1 5 0; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 7 0 3 1; +#X connect 8 0 3 0; +#X connect 9 0 8 0; +#X restore 69 94 pd analogIns; +#N canvas 592 114 341 294 digitalIns 0; +#X obj 87 26 inlet; +#X obj 87 250 outlet; +#X text 126 117 0xD0; +#X obj 87 90 unpack float float; +#X obj 87 146 pack float float; +#X obj 87 117 + 208; +#X connect 0 0 3 0; +#X connect 3 0 5 0; +#X connect 3 1 4 1; +#X connect 4 0 1 0; +#X connect 5 0 4 0; +#X restore 150 94 pd digitalIns; +#N canvas 623 398 451 466 sysex 0; +#X obj 62 424 outlet; +#X obj 28 22 inlet; +#X obj 28 145 list split 1; +#X obj 62 321 list prepend; +#X obj 62 177 route bang; +#X text 68 22 sysex; +#X obj 250 22 inlet; +#X text 286 21 string; +#X obj 250 155 trigger anything bang; +#X text 398 176 0x71; +#X msg 373 177 113; +#N canvas 363 261 467 461 split 0; +#X text 87 12 Firmata sends 8-bit chars as two 7-bit bytes; +#X obj 32 12 inlet; +#X obj 32 367 outlet; +#X obj 168 173 list; +#X obj 189 112 route bang; +#X obj 189 137 bang; +#X obj 32 54 trigger bang anything; +#X obj 155 89 list split 1; +#X obj 110 208 trigger bang anything anything; +#X text 256 191 LSB; +#X obj 226 298 % 128; +#X text 267 297 only 7-bits of data allowed; +#X text 204 190 MSB; +#X obj 198 234 >> 7; +#X text 235 137 bang resets once finished; +#N canvas 0 50 313 216 tolist 0; +#X obj 89 50 inlet; +#X obj 179 50 inlet; +#X obj 89 155 outlet; +#N canvas 140 104 344 212 msg 0; +#X obj 12 13 inlet; +#X obj 12 113 outlet; +#X msg 12 33; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X restore 89 124 pd msg; +#X msg 179 70 add2 \$1; +#X msg 89 86 bang \, set; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X restore 32 344 pd tolist; +#X connect 1 0 6 0; +#X connect 3 0 7 0; +#X connect 4 0 5 0; +#X connect 4 1 3 1; +#X connect 5 0 3 1; +#X connect 6 0 15 0; +#X connect 6 1 7 0; +#X connect 7 0 8 0; +#X connect 7 1 4 0; +#X connect 8 0 3 0; +#X connect 8 1 13 0; +#X connect 8 2 10 0; +#X connect 10 0 15 1; +#X connect 13 0 10 0; +#X connect 15 0 2 0; +#X restore 119 212 pd split into 7-bit bytes; +#X obj 62 344 list prepend 240; +#X text 168 345 0xF0 start_sysex; +#X text 167 366 0xF7 end_sysex; +#X obj 62 366 list append 247; +#X obj 28 66 trigger anything anything; +#X msg 175 87 \$1; +#X connect 1 0 16 0; +#X connect 2 1 4 0; +#X connect 3 0 12 0; +#X connect 4 0 3 0; +#X connect 4 1 11 0; +#X connect 6 0 8 0; +#X connect 8 0 11 0; +#X connect 8 1 10 0; +#X connect 10 0 3 1; +#X connect 11 0 3 0; +#X connect 12 0 15 0; +#X connect 15 0 0 0; +#X connect 16 0 2 0; +#X connect 16 1 17 0; +#X connect 17 0 3 1; +#X restore 860 113 pd sysex; +#N canvas 107 521 569 343 port-out 0; +#X obj 13 15 inlet; +#X obj 167 281 outlet; +#X msg 244 82 \$1; +#X text 343 149 add channel to command; +#X text 309 190 0x90; +#X obj 271 191 + 144; +#X obj 244 129 moses; +#X obj 13 55 trigger bang anything anything anything; +#X obj 271 149 moses 16; +#X obj 353 219 print [arduino]; +#X msg 353 197 ERROR: no such channel: \$1; +#X msg 167 82 \$2; +#X msg 90 82 \$2; +#X obj 167 129 & 127; +#X obj 90 130 & 128; +#X obj 90 151 == 128; +#X obj 21 285 outlet; +#X obj 36 230 * 8; +#X obj 21 251 <<; +#X connect 0 0 7 0; +#X connect 2 0 6 0; +#X connect 5 0 1 0; +#X connect 6 0 10 0; +#X connect 6 1 8 0; +#X connect 7 1 12 0; +#X connect 7 2 11 0; +#X connect 7 3 2 0; +#X connect 8 0 5 0; +#X connect 8 0 17 0; +#X connect 8 1 10 0; +#X connect 10 0 9 0; +#X connect 11 0 13 0; +#X connect 12 0 14 0; +#X connect 12 0 18 0; +#X connect 13 0 1 0; +#X connect 14 0 15 0; +#X connect 15 0 1 0; +#X connect 17 0 18 1; +#X connect 18 0 16 0; +#X restore 403 114 pd port-out; +#N canvas 429 494 450 300 samplingInterval 0; +#X obj 39 252 outlet; +#X obj 38 21 inlet; +#X text 156 54 LSB; +#X obj 39 131 % 128; +#X text 103 54 MSB; +#X obj 39 107 >> 7; +#X obj 39 153 pack float float; +#X obj 132 130 % 128; +#X text 172 129 only 7-bit chunks of data allowed; +#X msg 39 188 240 122 \$2 \$1 247; +#X text 152 189 START_SYSEX 0x7A LSB MSB END_SYSEX; +#X obj 39 71 trigger anything anything; +#X connect 1 0 11 0; +#X connect 3 0 6 0; +#X connect 5 0 3 0; +#X connect 6 0 9 0; +#X connect 7 0 6 1; +#X connect 9 0 0 0; +#X connect 11 0 5 0; +#X connect 11 1 7 0; +#X restore 733 113 pd samplingInterval; +#X obj 24 51 route pwm analog analogIns digitalIns pinMode; +#X obj 952 108 t a; +#X msg 506 143 240 \$1 247; +#X msg 506 113 121; +#X msg 536 113 107; +#N canvas 0 50 421 260 pinState 0; +#X obj 15 20 inlet; +#X obj 15 200 outlet; +#X obj 15 56 route float; +#X obj 15 78 moses 128; +#X obj 99 154 print [arduino]; +#X msg 99 129 ERROR: invalid pin for pinState query: \$1; +#X obj 99 104 list; +#X msg 15 177 240 109 \$1 247; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 6 0; +#X connect 3 0 7 0; +#X connect 3 1 5 0; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X connect 7 0 1 0; +#X restore 582 113 pd pinState; +#X obj 310 51 route digital port version firmware capability pinState +; +#X obj 661 52 route analogMapping samplingInterval sysex string; +#X msg 661 113 105; +#X connect 0 0 11 0; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 8 0 1 0; +#X connect 9 0 2 1; +#X connect 9 1 1 0; +#X connect 10 0 1 0; +#X connect 11 0 4 0; +#X connect 11 1 4 0; +#X connect 11 2 6 0; +#X connect 11 3 7 0; +#X connect 11 4 3 0; +#X connect 11 5 17 0; +#X connect 12 0 1 0; +#X connect 13 0 1 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 16 0 1 0; +#X connect 17 0 2 0; +#X connect 17 1 9 0; +#X connect 17 2 5 0; +#X connect 17 3 14 0; +#X connect 17 4 15 0; +#X connect 17 5 16 0; +#X connect 17 6 18 0; +#X connect 18 0 19 0; +#X connect 18 1 10 0; +#X connect 18 2 8 0; +#X connect 18 3 8 1; +#X connect 18 4 12 0; +#X connect 19 0 13 0; +#X restore 32 89 pd command processing; +#X text 28 38 processed input; +#N canvas 590 443 467 421 make 0; +#X obj 28 6 inlet; +#X obj 133 332 outlet; +#X obj 28 52 moses 128; +#X obj 130 100 trigger float float; +#N canvas 459 506 653 358 set 0; +#X obj 26 3 inlet; +#X obj 34 307 outlet; +#X text 85 31 0xF0; +#X obj 26 31 moses 240; +#X text 79 307 length in byte count; +#X msg 283 122 2; +#X obj 26 60 & 240; +#X obj 26 101 select 144 160 176 192 208 224; +#X text 29 86 0x90 0xA0 0xB0 0xC0 0xD0 0xE0; +#X msg 251 122 2; +#X text 282 83 0xF4 0xF9; +#X obj 195 242 print [arduino]_WARNING_currently_unsupported; +#X msg 55 122 160; +#X msg 26 122 2; +#X msg 85 122 176; +#X msg 114 122 1; +#X msg 144 122 1; +#X msg 173 122 2; +#X text 348 69 sysex; +#X msg 315 122 999999; +#X text 362 121 <-- sets sysex size limit; +#X text 62 60 strip channel info; +#X text 342 83 0xF0; +#X obj 251 101 select 244 249 240; +#X connect 0 0 3 0; +#X connect 3 0 6 0; +#X connect 3 1 23 0; +#X connect 5 0 1 0; +#X connect 6 0 7 0; +#X connect 7 0 13 0; +#X connect 7 1 12 0; +#X connect 7 2 14 0; +#X connect 7 3 15 0; +#X connect 7 4 16 0; +#X connect 7 5 17 0; +#X connect 9 0 1 0; +#X connect 12 0 11 0; +#X connect 13 0 1 0; +#X connect 14 0 11 0; +#X connect 15 0 1 0; +#X connect 16 0 1 0; +#X connect 17 0 1 0; +#X connect 19 0 1 0; +#X connect 23 0 9 0; +#X connect 23 1 5 0; +#X connect 23 2 19 0; +#X restore 241 127 pd set message length; +#X obj 79 250 select 0; +#X obj 79 228 float; +#X obj 117 228 - 1; +#X obj 79 178 trigger bang float; +#X text 89 52 only process command bytes; +#X text 140 78 end of sysex; +#X obj 79 79 route 247; +#X obj 79 100 bang; +#N canvas 0 50 313 216 tolist 0; +#X obj 89 50 inlet; +#X obj 179 50 inlet; +#X obj 89 155 outlet; +#N canvas 140 104 344 212 msg 0; +#X obj 12 13 inlet; +#X obj 12 113 outlet; +#X msg 12 33; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X restore 89 124 pd msg; +#X msg 179 70 add2 \$1; +#X msg 89 86 bang \, set; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X restore 133 308 pd tolist; +#X connect 0 0 2 0; +#X connect 2 0 8 0; +#X connect 2 1 11 0; +#X connect 3 0 8 0; +#X connect 3 1 4 0; +#X connect 4 0 6 1; +#X connect 5 0 13 0; +#X connect 6 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 6 1; +#X connect 8 0 6 0; +#X connect 8 1 13 1; +#X connect 11 0 12 0; +#X connect 11 1 3 0; +#X connect 12 0 13 0; +#X connect 13 0 1 0; +#X restore 32 199 pd make lists; +#N canvas 0 50 525 269 check 0; +#X obj 47 62 inlet; +#X obj 47 88 route version; +#X obj 47 127 unpack float float; +#X obj 92 171 print [arduino]_WARNING_INCOMPATIBLE_FIRMWARE_VERSION +; +#X obj 47 149 select 2; +#X text 102 150 <-- sets the protocol major version this is compatible +with; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 4 1 3 0; +#X restore 215 325 pd check version; +#N canvas 192 246 541 319 convert 0; +#X obj 142 278 outlet; +#N canvas 234 468 335 267 analog 0; +#X obj 65 16 inlet; +#X obj 65 213 outlet; +#X msg 65 150 analog \$1 \$2; +#X obj 65 129 pack float float; +#X obj 158 103 / 1023; +#X text 203 104 scale to 0-1; +#X obj 65 71 unpack float float; +#X connect 0 0 6 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 3 1; +#X connect 6 0 3 0; +#X connect 6 1 4 0; +#X restore 342 174 pd analog messages; +#X obj 97 13 inlet; +#N canvas 325 132 888 458 sysex 0; +#X obj 30 11 inlet; +#X obj 30 398 outlet; +#N canvas 990 306 450 300 firmware 0; +#X obj 91 6 inlet; +#X obj 91 272 outlet; +#X obj 91 170 list prepend; +#X obj 91 206 list prepend firmware; +#X obj 91 239 list trim; +#X obj 91 39 list split 2; +#N canvas 736 297 645 461 reassemble 0; +#X text 91 24 Firmata sends 8-bit chars as two 7-bit bytes; +#X obj 36 24 inlet; +#X obj 36 411 outlet; +#X obj 159 131 list split 2; +#X obj 196 206 list; +#X obj 109 256 trigger bang anything; +#X obj 232 280 unpack float float; +#X obj 232 340 +; +#X obj 193 154 route bang; +#X obj 337 303 << 7; +#X obj 193 179 bang; +#X obj 36 106 trigger bang anything; +#X text 249 179 reset the list if end of list or there is a single +byte left over; +#N canvas 0 50 313 216 tolist 0; +#X obj 89 50 inlet; +#X obj 179 50 inlet; +#X obj 89 155 outlet; +#N canvas 140 104 344 212 msg 0; +#X obj 12 13 inlet; +#X obj 12 113 outlet; +#X msg 12 33; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X restore 89 124 pd msg; +#X msg 179 70 add2 \$1; +#X msg 89 86 bang \, set; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X restore 36 381 pd tolist; +#X connect 1 0 11 0; +#X connect 3 0 5 0; +#X connect 3 1 8 0; +#X connect 3 2 10 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 5 1 6 0; +#X connect 6 0 7 0; +#X connect 6 1 9 0; +#X connect 7 0 13 1; +#X connect 8 0 10 0; +#X connect 8 1 4 1; +#X connect 9 0 7 1; +#X connect 10 0 4 1; +#X connect 11 0 13 0; +#X connect 11 1 3 0; +#X connect 13 0 2 0; +#X restore 160 79 pd reassemble chars; +#X obj 160 116 list tosymbol; +#X connect 0 0 5 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 2 0; +#X connect 5 1 6 0; +#X connect 5 2 6 0; +#X connect 6 0 7 0; +#X connect 7 0 2 1; +#X restore 30 220 pd firmware; +#N canvas 830 319 667 494 assemble 0; +#X text 91 24 Firmata sends 8-bit chars as two 7-bit bytes; +#X obj 36 24 inlet; +#X obj 36 408 outlet; +#X obj 159 131 list split 2; +#X obj 196 206 list; +#X obj 109 256 trigger bang anything; +#X obj 232 280 unpack float float; +#X obj 232 323 +; +#X obj 193 154 route bang; +#X obj 337 303 << 7; +#X obj 193 179 bang; +#X obj 36 106 trigger bang anything; +#X text 249 179 reset the list if end of list or there is a single +byte left over; +#N canvas 0 50 313 216 tolist 0; +#X obj 89 50 inlet; +#X obj 179 50 inlet; +#X obj 89 155 outlet; +#N canvas 140 104 344 212 msg 0; +#X obj 12 13 inlet; +#X obj 12 113 outlet; +#X msg 12 33; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X restore 89 124 pd msg; +#X msg 179 70 add2 \$1; +#X msg 89 86 bang \, set; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X restore 36 366 pd tolist; +#X connect 1 0 11 0; +#X connect 3 0 5 0; +#X connect 3 1 8 0; +#X connect 3 2 10 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 5 1 6 0; +#X connect 6 0 7 0; +#X connect 6 1 9 0; +#X connect 7 0 13 1; +#X connect 8 0 10 0; +#X connect 8 1 4 1; +#X connect 9 0 7 1; +#X connect 10 0 4 1; +#X connect 11 0 13 0; +#X connect 11 1 3 0; +#X connect 13 0 2 0; +#X restore 115 244 pd assemble 7-bit into 14-bit values; +#X obj 115 293 list prepend; +#X obj 115 314 list trim; +#X msg 275 188 string; +#X msg 184 185 servo_config; +#X text 71 396 data; +#X obj 138 398 outlet; +#X text 184 398 status; +#X obj 30 59 route 121; +#X obj 101 84 route 112; +#X obj 172 104 route 113; +#X obj 101 104 t a b; +#X obj 172 124 t a b; +#X text 95 60 0x79 firmware; +#X obj 388 138 route 108; +#X text 452 139 0x6C Capability; +#X text 237 106 0x71 string; +#X text 162 84 0x70 servo (where is this documented?); +#N canvas 268 50 540 585 capability 0; +#X obj 14 41 t b a a; +#X obj 306 13 table \$0.capability; +#X msg 53 90 resize \$1; +#X obj 53 64 list length; +#X obj 14 19 inlet; +#X obj 53 141 s \$0.capability; +#X obj 33 212 until; +#X obj 14 139 f; +#X obj 33 113 list prepend 0; +#X obj 14 169 t b a b; +#X obj 33 237 f; +#X msg 76 212 0; +#X obj 33 260 t a a; +#X obj 84 248 + 1; +#X obj 33 285 tabread \$0.capability; +#X obj 72 565 outlet; +#X obj 33 310 sel 127; +#X text 84 310 bump pin number; +#X obj 132 378 t a; +#X obj 99 377 == 1; +#X obj 120 337 t b b; +#X msg 120 357 1; +#X obj 72 357 t a b; +#X obj 72 401 list prepend; +#X obj 72 420 route 1 0; +#X obj 72 476 list prepend; +#X obj 72 439 pack f f; +#X obj 198 384 f; +#X obj 198 406 + 1; +#X obj 198 430 t a a; +#N canvas 372 119 398 398 conver_to_human_readable 0; +#X obj 9 10 inlet; +#X obj 9 375 outlet; +#X obj 9 31 unpack f f f; +#X obj 43 53 sel 0 1 2 3 4 5 6 7 8 9 10 11; +#X msg 43 294 DIGITAL_INPUT; +#X msg 57 274 DIGITAL_OUTPUT; +#X msg 71 255 ANALOG_INPUT; +#X msg 85 236 PWM; +#X msg 100 218 SERVO; +#X msg 114 200 SHIFT; +#X msg 128 180 I2C; +#X msg 142 161 ONEWIRE; +#X msg 157 140 STEPPER; +#X msg 171 121 ENCODER; +#X msg 185 101 SERIAL; +#X msg 199 80 INPUT_PULLUP; +#X obj 171 329 list; +#X obj 9 351 pack f s f; +#X connect 0 0 2 0; +#X connect 2 0 17 0; +#X connect 2 1 3 0; +#X connect 2 2 17 2; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X connect 3 2 6 0; +#X connect 3 3 7 0; +#X connect 3 4 8 0; +#X connect 3 5 9 0; +#X connect 3 6 10 0; +#X connect 3 7 11 0; +#X connect 3 8 12 0; +#X connect 3 9 13 0; +#X connect 3 10 14 0; +#X connect 3 11 15 0; +#X connect 4 0 16 0; +#X connect 5 0 16 0; +#X connect 6 0 16 0; +#X connect 7 0 16 0; +#X connect 8 0 16 0; +#X connect 9 0 16 0; +#X connect 10 0 16 0; +#X connect 11 0 16 0; +#X connect 12 0 16 0; +#X connect 13 0 16 0; +#X connect 14 0 16 0; +#X connect 15 0 16 0; +#X connect 16 0 17 1; +#X connect 17 0 1 0; +#X restore 72 497 pd conver_to_human_readable; +#X msg 72 458 \$2 \$1; +#X text 177 476 pin# \, mode \, resolution; +#X text 240 404 count pin#; +#X obj 72 522 list prepend capability; +#X obj 72 542 list trim; +#X msg 14 457 end; +#X msg 359 463 begin; +#X connect 0 0 7 0; +#X connect 0 1 8 0; +#X connect 0 2 3 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 0 7 1; +#X connect 4 0 0 0; +#X connect 6 0 10 0; +#X connect 7 0 9 0; +#X connect 8 0 5 0; +#X connect 9 0 36 0; +#X connect 9 1 6 0; +#X connect 9 2 11 0; +#X connect 9 2 37 0; +#X connect 10 0 12 0; +#X connect 11 0 10 1; +#X connect 11 0 29 0; +#X connect 12 0 14 0; +#X connect 12 1 13 0; +#X connect 13 0 10 1; +#X connect 14 0 16 0; +#X connect 16 0 20 0; +#X connect 16 1 22 0; +#X connect 18 0 19 1; +#X connect 19 0 18 0; +#X connect 19 0 23 1; +#X connect 20 0 21 0; +#X connect 20 1 27 0; +#X connect 21 0 19 1; +#X connect 22 0 23 0; +#X connect 22 1 19 0; +#X connect 23 0 24 0; +#X connect 24 0 26 0; +#X connect 24 1 26 1; +#X connect 25 0 30 0; +#X connect 26 0 31 0; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 25 1; +#X connect 29 1 27 1; +#X connect 30 0 34 0; +#X connect 31 0 25 0; +#X connect 34 0 35 0; +#X connect 35 0 15 0; +#X connect 36 0 34 0; +#X connect 37 0 34 0; +#X restore 388 184 pd capability; +#X obj 544 171 route 110; +#X text 607 172 0x6E Pin State; +#N canvas 268 50 386 285 pinState 0; +#X obj 14 19 inlet; +#X obj 14 215 outlet; +#N canvas 0 50 386 373 convert_to_human_readable 0; +#X obj 51 48 sel 0 1 2 3 4 5 6 7 8 9 10 11; +#X msg 51 289 DIGITAL_INPUT; +#X msg 65 269 DIGITAL_OUTPUT; +#X msg 79 250 ANALOG_INPUT; +#X msg 93 231 PWM; +#X msg 108 213 SERVO; +#X msg 122 195 SHIFT; +#X msg 136 175 I2C; +#X msg 150 156 ONEWIRE; +#X msg 165 135 STEPPER; +#X msg 179 116 ENCODER; +#X msg 193 96 SERIAL; +#X msg 207 75 INPUT_PULLUP; +#X obj 179 324 list; +#X obj 51 19 inlet; +#X obj 179 346 outlet; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 0 2 3 0; +#X connect 0 3 4 0; +#X connect 0 4 5 0; +#X connect 0 5 6 0; +#X connect 0 6 7 0; +#X connect 0 7 8 0; +#X connect 0 8 9 0; +#X connect 0 9 10 0; +#X connect 0 10 11 0; +#X connect 0 11 12 0; +#X connect 1 0 13 0; +#X connect 2 0 13 0; +#X connect 3 0 13 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 13 0; +#X connect 7 0 13 0; +#X connect 8 0 13 0; +#X connect 9 0 13 0; +#X connect 10 0 13 0; +#X connect 11 0 13 0; +#X connect 12 0 13 0; +#X connect 13 0 15 0; +#X connect 14 0 0 0; +#X restore 71 120 pd convert_to_human_readable; +#X obj 14 54 list split 2; +#X obj 14 81 unpack f f; +#X obj 14 161 pack f s f; +#X msg 14 186 pinState \$1 \$2 \$3; +#X msg 135 186 pinState \$1 NOT_PRESENT; +#X connect 0 0 3 0; +#X connect 2 0 5 1; +#X connect 3 0 4 0; +#X connect 3 1 5 2; +#X connect 3 2 7 0; +#X connect 4 0 5 0; +#X connect 4 1 2 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X restore 544 200 pd pinState; +#X obj 639 196 route 106; +#X text 704 195 0x6A Analog Mapping; +#N canvas 288 35 536 407 analogMapping 0; +#X obj 12 7 inlet; +#X obj 70 361 outlet; +#X obj 12 27 t b a a; +#X msg 51 72 resize \$1; +#X obj 51 47 list length; +#X obj 31 165 until; +#X obj 12 119 f; +#X obj 31 90 list prepend 0; +#X obj 12 144 t b a b; +#X obj 31 190 f; +#X msg 74 165 0; +#X obj 92 201 + 1; +#X obj 51 125 s \$0.analogMapping; +#X obj 178 14 table \$0.analogMapping; +#X obj 31 245 tabread \$0.analogMapping; +#X obj 31 265 sel 127; +#X obj 70 288 pack f f; +#X obj 31 213 t a a a; +#X obj 70 318 list prepend analogMapping; +#X obj 70 338 list trim; +#X msg 208 249 begin; +#X msg 12 285 end; +#X connect 0 0 2 0; +#X connect 2 0 6 0; +#X connect 2 1 7 0; +#X connect 2 2 4 0; +#X connect 3 0 12 0; +#X connect 4 0 3 0; +#X connect 4 0 6 1; +#X connect 5 0 9 0; +#X connect 6 0 8 0; +#X connect 7 0 12 0; +#X connect 8 0 21 0; +#X connect 8 1 5 0; +#X connect 8 2 10 0; +#X connect 8 2 20 0; +#X connect 9 0 17 0; +#X connect 10 0 9 1; +#X connect 11 0 9 1; +#X connect 14 0 15 0; +#X connect 15 1 16 0; +#X connect 16 0 18 0; +#X connect 17 0 14 0; +#X connect 17 1 16 1; +#X connect 17 2 11 0; +#X connect 18 0 19 0; +#X connect 19 0 1 0; +#X connect 20 0 18 0; +#X connect 21 0 18 0; +#X restore 639 223 pd analogMapping; +#X connect 0 0 11 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 4 1; +#X connect 7 0 4 1; +#X connect 11 0 2 0; +#X connect 11 1 12 0; +#X connect 12 0 14 0; +#X connect 12 1 13 0; +#X connect 13 0 15 0; +#X connect 13 1 17 0; +#X connect 14 0 3 0; +#X connect 14 1 7 0; +#X connect 15 0 3 0; +#X connect 15 1 6 0; +#X connect 17 0 21 0; +#X connect 17 1 22 0; +#X connect 21 0 9 0; +#X connect 22 0 24 0; +#X connect 22 1 25 0; +#X connect 24 0 9 0; +#X connect 25 0 27 0; +#X connect 27 0 9 0; +#X restore 134 174 pd sysex; +#N canvas 383 77 457 452 route 0; +#X obj 46 24 inlet; +#X obj 175 400 outlet; +#X obj 233 400 outlet; +#X obj 46 91 trigger anything anything; +#X obj 292 400 outlet; +#X obj 175 339 route digital analog; +#X msg 193 115 \$1; +#X obj 244 158 moses 224; +#X text 314 157 0xE0 analog messages; +#X obj 193 136 moses 144; +#X text 257 136 0x90 digital messages; +#X obj 244 209 bang; +#X obj 295 209 bang; +#X msg 244 236 digital; +#X msg 297 236 analog; +#X text 359 178 0xF0; +#X obj 346 236 bang; +#X obj 211 236 bang; +#N canvas 176 360 335 257 parse 0; +#X obj 73 18 inlet; +#X obj 73 215 outlet; +#X obj 73 161 pack float float; +#X obj 73 64 unpack float float float; +#X obj 166 110 +; +#X obj 214 85 << 7; +#X obj 73 85 & 15; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 3 1 4 0; +#X connect 3 2 5 0; +#X connect 4 0 2 1; +#X connect 5 0 4 1; +#X connect 6 0 2 0; +#X restore 46 167 pd parse messages; +#X obj 295 178 moses 240; +#X obj 175 279 list prepend; +#X obj 175 301 list trim; +#X connect 0 0 3 0; +#X connect 3 0 18 0; +#X connect 3 1 6 0; +#X connect 5 0 1 0; +#X connect 5 1 2 0; +#X connect 5 2 4 0; +#X connect 6 0 9 0; +#X connect 7 0 11 0; +#X connect 7 1 19 0; +#X connect 9 0 17 0; +#X connect 9 1 7 0; +#X connect 11 0 13 0; +#X connect 12 0 14 0; +#X connect 13 0 20 1; +#X connect 14 0 20 1; +#X connect 16 0 20 1; +#X connect 17 0 20 1; +#X connect 18 0 20 0; +#X connect 19 0 12 0; +#X connect 19 1 16 0; +#X connect 20 0 21 0; +#X connect 21 0 5 0; +#X restore 205 86 pd route digital/analog; +#X obj 97 75 route 249 240; +#X text 124 60 0xF9 0xF0; +#X msg 40 174 version \$1 \$2; +#X obj 263 277 outlet; +#X text 312 279 status outlet; +#X text 184 277 data outlet; +#N canvas 418 242 444 547 digital_messages 0; +#X obj 43 26 inlet; +#X obj 62 416 outlet; +#X obj 43 67 unpack f f, f 30; +#X obj 43 92 t a a a; +#X obj 41 510 table \$0.digital.input.change 16; +#X obj 82 116 tabread \$0.digital.input.change; +#X obj 82 141 expr $f1 ^ $f2; +#X text 181 143 which bits have changed?; +#N canvas 0 238 288 383 byte2bits 0; +#X msg 44 78 8; +#X obj 44 104 until; +#X obj 44 129 f; +#X obj 131 133 + 1; +#X msg 82 105 0; +#X msg 44 179 2 \$1; +#X obj 44 202 pow; +#X obj 44 226 &, f 8; +#X obj 44 153 t a a a, f 12; +#X obj 44 28 inlet; +#X obj 44 52 t b b a; +#X obj 71 303 outlet; +#X obj 44 249 sel 0; +#X obj 71 278 list prepend; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 12 0; +#X connect 8 0 5 0; +#X connect 8 1 13 1; +#X connect 8 2 3 0; +#X connect 9 0 10 0; +#X connect 10 0 0 0; +#X connect 10 1 4 0; +#X connect 10 2 7 1; +#X connect 12 1 13 0; +#X connect 13 0 11 0; +#X restore 82 174 pd byte2bits; +#X obj 110 278 &, f 14; +#X obj 82 227 t a a a, f 10; +#X msg 110 253 \$2; +#X obj 110 303 >>; +#X text 167 173 serialize bits \, limit to those that changed; +#X obj 62 333 pack f f; +#X obj 62 276 * 8; +#X obj 62 304 +, f 4; +#X text 126 334 digital input (pin \, value); +#X msg 62 387 digital \$1 \$2; +#X obj 43 473 s \$0.digital.input.change; +#X obj 43 448 pack f f, f 30; +#X text 206 472 cache value for later comparison; +#X msg 139 254 \$1; +#X msg 82 253 \$1; +#X text 87 201 <- bit position and corresponding bit mask; +#X connect 0 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 6 1; +#X connect 2 1 9 1; +#X connect 2 1 20 1; +#X connect 3 0 20 0; +#X connect 3 1 15 0; +#X connect 3 2 5 0; +#X connect 5 0 6 0; +#X connect 6 0 8 0; +#X connect 8 0 10 0; +#X connect 9 0 12 0; +#X connect 10 0 23 0; +#X connect 10 1 11 0; +#X connect 10 2 22 0; +#X connect 11 0 9 0; +#X connect 12 0 14 1; +#X connect 14 0 18 0; +#X connect 15 0 16 0; +#X connect 16 0 14 0; +#X connect 18 0 1 0; +#X connect 20 0 19 0; +#X connect 22 0 12 1; +#X connect 23 0 16 1; +#X restore 205 168 pd digital_messages; +#X obj 340 150 print [arduino]; +#X obj 340 109 list prepend UNKNOWN_RESPONSE; +#X obj 340 129 list trim; +#X connect 1 0 0 0; +#X connect 2 0 5 0; +#X connect 3 0 0 0; +#X connect 3 1 8 0; +#X connect 4 0 11 0; +#X connect 4 1 1 0; +#X connect 4 2 13 0; +#X connect 5 0 7 0; +#X connect 5 1 3 0; +#X connect 5 2 4 0; +#X connect 7 0 8 0; +#X connect 11 0 0 0; +#X connect 13 0 14 0; +#X connect 14 0 12 0; +#X restore 32 259 pd convert to symbolic commands; +#X text 323 361 released under the GNU GPL v2 or later; +#X obj 257 115 print [arduino]; +#X obj 257 57 loadbang; +#X text 254 34 supports Firmata v2.X; +#X text 27 361 (C) Copyright 2006-2012 Free Software Foundation; +#X msg 257 80 version 0.8; +#X obj 32 144 tcpclient; +#X obj 185 101 inlet; +#X connect 0 0 2 0; +#X connect 2 0 13 0; +#X connect 4 0 6 0; +#X connect 6 0 1 0; +#X connect 6 1 5 0; +#X connect 9 0 12 0; +#X connect 12 0 8 0; +#X connect 13 0 4 0; +#X connect 14 0 13 0; diff --git a/arduino/rainboard/rainboard.ino b/arduino/rainboard/rainboard.ino new file mode 100644 index 0000000..e86467e --- /dev/null +++ b/arduino/rainboard/rainboard.ino @@ -0,0 +1,116 @@ +#include +#include + +const char* ssid = "TEEPOT"; +const char* password = "3333388888"; +const int NETWORK_PORT = 27016; + +//// A UDP instance to let us send and receive packets over UDP +//WiFiUDP Udp; +//const IPAddress outIp(192,168,43,13); // remote IP (not needed for receive) +//const unsigned int outPort = 9999; // remote port (not needed for receive) +//const unsigned int localPort = 8888; // local port to listen for UDP packets (here's where we send the packets) + + +#include +#include "utility/WiFiClientStream.h" +#include "utility/WiFiServerStream.h" +WiFiServerStream serverStream(NETWORK_PORT); + +std::vector pins = {16, 15, 17, 18, 20, 19, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33}; //16 +//2 ==> flipping autonomously 1/0 without grounding! (maybe grounded by something else???) +//1, 3, 4, 5, 6, 7, 8, ==> flipping 1/0 ... while grounded manually. + +//i have a feeling ... this relates to 'touch sensing'... this precise flipping might be from cap. charge/discharge cycles? + +void setup() +{ + //pinmodes + for (int idx = 0; idx < pins.size(); idx++) { + pinMode(pins[idx], INPUT_PULLUP); + } + + //serial + Serial.begin(115200); + + //wifi + WiFi.mode(WIFI_STA); + // Connect to WiFi network + Serial.println(); + Serial.println(); + Serial.print("Connecting to "); + Serial.println(ssid); + WiFi.begin(ssid, password); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.println(""); + + Serial.println("WiFi connected"); + Serial.println("IP address: "); + Serial.println(WiFi.localIP()); + + //firmata + Firmata.disableBlinkVersion(); + Firmata.begin(serverStream); + +// Firmata.begin(115200); +// Firmata.setFirmwareNameAndVersion("ConfigurableFirmata", FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION); +} + +void loop() +{ + for (int idx = 0; idx < pins.size(); idx++) { + Firmata.sendAnalog(idx, digitalRead(pins[idx])*1023); + } + + serverStream.maintain(); +} + + +// [NOTE] +// because firmata analog way has limits of max. channels <= 16. you can use digital way.. like below. +// but this not yet confirmed whether it is working or not. +// + +// #include + +// int pins_port0[8] = {17, 18, 2, 3, 4, 5, 6, 7}; +// int pins_port1[8] = {8, 9, 10, 11, 12, 24, 25, 26}; +// int pins_port2[8] = {27, 28, 29, 30, 31, 32, 33, 33}; + +// void setup() +// { +// for (int idx = 0; idx < 8; idx++) pinMode(pins_port0[idx], INPUT_PULLUP); +// for (int idx = 0; idx < 8; idx++) pinMode(pins_port1[idx], INPUT_PULLUP); +// for (int idx = 0; idx < 8; idx++) pinMode(pins_port2[idx], INPUT_PULLUP); + +// Firmata.setFirmwareNameAndVersion("ConfigurableFirmata", FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION); +// Firmata.begin(115200); +// } + +// void loop() +// { +// byte port = 0; + +// static byte port0_prev = 0; +// port = 0x00; +// for (int idx = 0; idx < 8; idx++) port |= (digitalRead(pins_port0[idx]) ? 0x01< but remember actual communication only occurs still +only on CHANGES!!; +#X obj 640 563 spigot; +#X obj 673 543 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#000000 0 1; +#X obj 673 521 r firmata_detected; +#X obj 696 543 print firmata_detected; +#X text 23 1216 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 323 1216 - - - - - - - - - - - - - - - - - - - - - - - - - +- - - - -; +#X text 25 14 - - - - - - - - - - - - - - - - - - - - - - - - - - - +- - -; +#X text 325 14 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 633 1215 sound generators - tones; +#X text 27 662 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 327 662 - - - - - - - - - - - - - - - - - - - - - - - - - - +- - - -; +#X text 635 13 arduino i/f; +#X text 637 661 sound generators - sample sound; +#X obj 76 474 == 0; +#X obj 92 494 == 0; +#X obj 109 514 == 0; +#X obj 160 514 == 0; +#X obj 143 494 == 0; +#X obj 126 474 == 0; +#X obj 177 474 == 0; +#X obj 193 494 == 0; +#X obj 210 514 == 0; +#X obj 227 474 == 0; +#X obj 244 494 == 0; +#X obj 261 514 == 0; +#X obj 278 474 == 0; +#X obj 294 494 == 0; +#X obj 311 514 == 0; +#X obj 328 474 == 0; +#X obj 345 494 == 0; +#X text 407 436 re-samplers (also replicate!); +#X text 405 492 inverters; +#X text 872 525 monitoring; +#X obj 620 404 r c1; +#X obj 634 425 r c2; +#X obj 657 403 r c3; +#X obj 669 425 r c4; +#X obj 691 403 r c5; +#X obj 704 425 r c6; +#X obj 725 403 r c7; +#X obj 738 424 r c8; +#X obj 761 402 r c9; +#X obj 773 424 r c10; +#X obj 820 402 r c11; +#X obj 834 423 r c12; +#X obj 862 401 r c13; +#X obj 874 424 r c14; +#X obj 901 402 r c15; +#X obj 914 424 r c16; +#X obj 942 402 r c17; +#X text 457 590 routing; +#X obj 407 116 print dsp_bang; +#X obj 318 181 print dsp_load; +#X msg 54 737 read -resize Rain1.wav array99; +#X obj 117 1303 r c16; +#X obj 203 1297 r c17; +#X obj 79 1354 +; +#X obj 159 1335 +; +#X obj 859 152 key; +#X floatatom 859 175 5 0 0 0 - - - 0; +#X obj 859 197 route 97 115 100 102 103 104 106 107 108 59 113 119 +101 114 116 121 117, f 71; +#X msg 856 225 2; +#X msg 886 229 3; +#X msg 916 225 4; +#X msg 946 229 5; +#X msg 976 225 6; +#X msg 1006 229 7; +#X msg 1036 225 8; +#X msg 1066 229 9; +#X msg 1096 225 10; +#X msg 1126 229 11; +#X msg 1156 225 12; +#X msg 1186 229 14; +#X msg 1216 225 15; +#X msg 1246 229 16; +#X msg 1276 225 17; +#X msg 1306 229 18; +#X msg 1336 225 19; +#X listbox 987 490 6 0 0 1 simulated!? - - 0; +#X msg 1039 276 \$1 0; +#X floatatom 859 295 5 0 0 0 - - - 0; +#X obj 859 317 route 97 115 100 102 103 104 106 107 108 59 113 119 +101 114 116 121 117, f 71; +#X msg 856 345 2; +#X msg 886 349 3; +#X msg 916 345 4; +#X msg 946 349 5; +#X msg 976 345 6; +#X msg 1006 349 7; +#X msg 1036 345 8; +#X msg 1066 349 9; +#X msg 1096 345 10; +#X msg 1126 349 11; +#X msg 1156 345 12; +#X msg 1186 349 14; +#X msg 1216 345 15; +#X msg 1246 349 16; +#X msg 1276 345 17; +#X msg 1306 349 18; +#X msg 1336 345 19; +#X obj 859 272 keyup; +#X msg 1086 402 \$1 1; +#X msg 725 148 100; +#X obj 716 326 loadbang; +#X obj 26 218 arduino-wifi; +#X msg 146 188 disconnect; +#X msg 107 153 connect 192.168.43.95 27016; +#X obj 120 282 print; +#X connect 0 0 182 0; +#X connect 1 0 184 0; +#X connect 2 0 332 0; +#X connect 3 0 186 0; +#X connect 4 0 188 0; +#X connect 5 0 190 0; +#X connect 6 0 192 0; +#X connect 7 0 194 0; +#X connect 8 0 196 0; +#X connect 9 0 198 0; +#X connect 12 0 13 0; +#X connect 13 0 16 0; +#X connect 13 0 17 0; +#X connect 13 1 21 0; +#X connect 14 0 15 0; +#X connect 15 0 22 0; +#X connect 16 0 11 0; +#X connect 17 0 19 0; +#X connect 19 0 156 0; +#X connect 19 0 157 0; +#X connect 20 0 13 0; +#X connect 21 0 13 0; +#X connect 22 0 12 0; +#X connect 22 0 75 0; +#X connect 22 0 77 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 99 0; +#X connect 35 0 171 0; +#X connect 37 0 36 1; +#X connect 37 0 36 0; +#X connect 38 0 36 0; +#X connect 38 0 36 1; +#X connect 39 0 41 1; +#X connect 39 0 41 0; +#X connect 40 0 41 0; +#X connect 40 0 41 1; +#X connect 43 0 42 1; +#X connect 43 0 42 0; +#X connect 44 0 42 0; +#X connect 44 0 42 1; +#X connect 46 0 45 1; +#X connect 46 0 45 0; +#X connect 47 0 45 0; +#X connect 47 0 45 1; +#X connect 48 0 38 0; +#X connect 50 0 49 1; +#X connect 50 0 49 0; +#X connect 51 0 49 0; +#X connect 51 0 49 1; +#X connect 53 0 52 1; +#X connect 53 0 52 0; +#X connect 54 0 52 0; +#X connect 54 0 52 1; +#X connect 56 0 55 0; +#X connect 56 0 55 1; +#X connect 57 0 35 0; +#X connect 58 0 108 0; +#X connect 59 0 166 0; +#X connect 59 0 74 0; +#X connect 60 0 38 1; +#X connect 61 0 37 1; +#X connect 62 0 40 1; +#X connect 63 0 39 1; +#X connect 64 0 44 1; +#X connect 65 0 43 1; +#X connect 66 0 47 1; +#X connect 67 0 46 1; +#X connect 68 0 51 1; +#X connect 69 0 50 1; +#X connect 70 0 54 1; +#X connect 71 0 53 1; +#X connect 72 0 56 1; +#X connect 73 0 109 0; +#X connect 74 0 167 0; +#X connect 75 0 76 0; +#X connect 76 0 20 0; +#X connect 77 0 168 0; +#X connect 77 0 59 0; +#X connect 77 0 160 0; +#X connect 77 0 172 0; +#X connect 78 0 57 1; +#X connect 79 0 37 0; +#X connect 80 0 40 0; +#X connect 81 0 39 0; +#X connect 82 0 44 0; +#X connect 83 0 43 0; +#X connect 84 0 47 0; +#X connect 85 0 46 0; +#X connect 86 0 51 0; +#X connect 87 0 50 0; +#X connect 88 0 54 0; +#X connect 89 0 53 0; +#X connect 90 0 56 0; +#X connect 91 0 57 0; +#X connect 92 0 91 0; +#X connect 95 0 94 0; +#X connect 95 0 94 1; +#X connect 96 0 95 1; +#X connect 97 0 55 1; +#X connect 97 0 55 0; +#X connect 98 0 97 1; +#X connect 99 0 100 0; +#X connect 100 0 230 0; +#X connect 101 0 97 0; +#X connect 102 0 95 0; +#X connect 104 0 6 0; +#X connect 105 0 104 0; +#X connect 106 0 107 0; +#X connect 107 0 6 0; +#X connect 110 0 60 1; +#X connect 111 0 61 1; +#X connect 112 0 72 1; +#X connect 113 0 98 1; +#X connect 114 0 62 1; +#X connect 115 0 63 1; +#X connect 116 0 64 1; +#X connect 117 0 65 1; +#X connect 118 0 66 1; +#X connect 119 0 67 1; +#X connect 120 0 68 1; +#X connect 121 0 69 1; +#X connect 122 0 70 1; +#X connect 123 0 71 1; +#X connect 124 0 60 0; +#X connect 125 0 61 0; +#X connect 126 0 63 0; +#X connect 127 0 62 0; +#X connect 128 0 124 1; +#X connect 129 0 125 1; +#X connect 130 0 127 1; +#X connect 131 0 126 1; +#X connect 132 0 133 1; +#X connect 133 0 64 0; +#X connect 134 0 65 0; +#X connect 135 0 66 0; +#X connect 136 0 67 0; +#X connect 137 0 68 0; +#X connect 138 0 69 0; +#X connect 139 0 70 0; +#X connect 140 0 71 0; +#X connect 141 0 72 0; +#X connect 142 0 98 0; +#X connect 143 0 96 0; +#X connect 144 0 135 1; +#X connect 145 0 136 1; +#X connect 146 0 137 1; +#X connect 147 0 138 1; +#X connect 148 0 139 1; +#X connect 149 0 134 1; +#X connect 150 0 141 1; +#X connect 151 0 142 1; +#X connect 152 0 140 1; +#X connect 153 0 143 1; +#X connect 154 0 96 1; +#X connect 156 0 103 0; +#X connect 157 0 103 1; +#X connect 158 0 159 0; +#X connect 158 0 164 0; +#X connect 160 0 169 0; +#X connect 161 0 162 0; +#X connect 162 0 158 0; +#X connect 163 0 161 0; +#X connect 165 0 155 1; +#X connect 166 0 58 0; +#X connect 167 0 73 0; +#X connect 168 0 78 0; +#X connect 169 0 158 0; +#X connect 169 0 170 0; +#X connect 170 0 155 0; +#X connect 171 0 17 1; +#X connect 172 0 173 0; +#X connect 173 0 156 1; +#X connect 173 0 157 1; +#X connect 174 0 183 0; +#X connect 175 0 185 0; +#X connect 176 0 187 0; +#X connect 177 0 189 0; +#X connect 178 0 191 0; +#X connect 179 0 193 0; +#X connect 180 0 195 0; +#X connect 181 0 197 0; +#X connect 199 0 335 0; +#X connect 200 0 336 0; +#X connect 201 0 127 0; +#X connect 202 0 126 0; +#X connect 203 0 133 0; +#X connect 204 0 135 0; +#X connect 205 0 136 0; +#X connect 206 0 137 0; +#X connect 207 0 138 0; +#X connect 208 0 139 0; +#X connect 209 0 140 0; +#X connect 210 0 141 0; +#X connect 211 0 142 0; +#X connect 212 0 143 0; +#X connect 213 0 23 0; +#X connect 214 0 23 1; +#X connect 215 0 24 1; +#X connect 216 0 25 1; +#X connect 217 0 26 1; +#X connect 218 0 27 1; +#X connect 219 0 28 1; +#X connect 220 0 29 1; +#X connect 221 0 30 1; +#X connect 222 0 31 1; +#X connect 223 0 32 1; +#X connect 224 0 33 1; +#X connect 225 0 34 1; +#X connect 226 0 99 1; +#X connect 227 0 100 1; +#X connect 228 0 230 1; +#X connect 229 0 231 1; +#X connect 230 0 231 0; +#X connect 231 0 57 0; +#X connect 232 0 134 0; +#X connect 237 0 235 0; +#X connect 238 0 237 0; +#X connect 239 0 242 0; +#X connect 242 0 238 0; +#X connect 242 0 330 0; +#X connect 243 0 276 0; +#X connect 244 0 292 0; +#X connect 245 0 293 0; +#X connect 246 0 294 0; +#X connect 247 0 297 0; +#X connect 248 0 296 0; +#X connect 249 0 295 0; +#X connect 250 0 298 0; +#X connect 251 0 299 0; +#X connect 252 0 300 0; +#X connect 253 0 301 0; +#X connect 254 0 302 0; +#X connect 255 0 303 0; +#X connect 256 0 304 0; +#X connect 257 0 305 0; +#X connect 258 0 306 0; +#X connect 259 0 270 0; +#X connect 259 0 307 0; +#X connect 260 0 308 0; +#X connect 266 0 267 0; +#X connect 266 0 269 0; +#X connect 267 0 266 1; +#X connect 268 0 266 0; +#X connect 270 0 266 0; +#X connect 271 0 268 0; +#X connect 272 0 380 0; +#X connect 275 0 263 0; +#X connect 275 0 271 0; +#X connect 276 0 244 0; +#X connect 276 1 245 0; +#X connect 276 2 246 0; +#X connect 276 3 247 0; +#X connect 276 4 248 0; +#X connect 276 5 249 0; +#X connect 276 6 250 0; +#X connect 276 7 251 0; +#X connect 276 8 252 0; +#X connect 276 9 253 0; +#X connect 276 10 254 0; +#X connect 276 11 255 0; +#X connect 276 12 256 0; +#X connect 276 13 257 0; +#X connect 276 14 258 0; +#X connect 276 15 259 0; +#X connect 276 16 260 0; +#X connect 276 17 261 0; +#X connect 277 0 279 0; +#X connect 279 0 265 0; +#X connect 280 0 279 1; +#X connect 281 0 280 0; +#X connect 281 0 282 0; +#X connect 292 0 0 0; +#X connect 293 0 174 0; +#X connect 294 0 1 0; +#X connect 295 0 176 0; +#X connect 296 0 3 0; +#X connect 297 0 175 0; +#X connect 298 0 4 0; +#X connect 299 0 177 0; +#X connect 300 0 5 0; +#X connect 301 0 178 0; +#X connect 302 0 6 0; +#X connect 303 0 179 0; +#X connect 304 0 7 0; +#X connect 305 0 180 0; +#X connect 306 0 8 0; +#X connect 307 0 181 0; +#X connect 308 0 9 0; +#X connect 312 0 277 0; +#X connect 313 0 277 1; +#X connect 314 0 277 2; +#X connect 315 0 277 3; +#X connect 316 0 277 4; +#X connect 317 0 277 5; +#X connect 318 0 277 6; +#X connect 319 0 277 7; +#X connect 320 0 277 8; +#X connect 321 0 277 9; +#X connect 322 0 277 10; +#X connect 323 0 277 11; +#X connect 324 0 277 12; +#X connect 325 0 277 13; +#X connect 326 0 277 14; +#X connect 327 0 277 15; +#X connect 328 0 277 16; +#X connect 332 0 14 0; +#X connect 333 0 335 1; +#X connect 334 0 336 1; +#X connect 335 0 124 0; +#X connect 336 0 125 0; +#X connect 337 0 338 0; +#X connect 338 0 339 0; +#X connect 339 0 340 0; +#X connect 339 1 341 0; +#X connect 339 2 342 0; +#X connect 339 3 343 0; +#X connect 339 4 344 0; +#X connect 339 5 345 0; +#X connect 339 6 346 0; +#X connect 339 7 347 0; +#X connect 339 8 348 0; +#X connect 339 9 349 0; +#X connect 339 10 350 0; +#X connect 339 11 351 0; +#X connect 339 12 352 0; +#X connect 339 13 353 0; +#X connect 339 14 354 0; +#X connect 339 15 355 0; +#X connect 339 16 356 0; +#X connect 340 0 358 0; +#X connect 341 0 358 0; +#X connect 342 0 358 0; +#X connect 343 0 358 0; +#X connect 344 0 358 0; +#X connect 345 0 358 0; +#X connect 346 0 358 0; +#X connect 347 0 358 0; +#X connect 348 0 358 0; +#X connect 349 0 358 0; +#X connect 350 0 358 0; +#X connect 351 0 358 0; +#X connect 352 0 358 0; +#X connect 353 0 358 0; +#X connect 354 0 358 0; +#X connect 355 0 358 0; +#X connect 356 0 358 0; +#X connect 357 0 276 0; +#X connect 358 0 357 0; +#X connect 359 0 360 0; +#X connect 360 0 361 0; +#X connect 360 1 362 0; +#X connect 360 2 363 0; +#X connect 360 3 364 0; +#X connect 360 4 365 0; +#X connect 360 5 366 0; +#X connect 360 6 367 0; +#X connect 360 7 368 0; +#X connect 360 8 369 0; +#X connect 360 9 370 0; +#X connect 360 10 371 0; +#X connect 360 11 372 0; +#X connect 360 12 373 0; +#X connect 360 13 374 0; +#X connect 360 14 375 0; +#X connect 360 15 376 0; +#X connect 360 16 377 0; +#X connect 361 0 379 0; +#X connect 362 0 379 0; +#X connect 363 0 379 0; +#X connect 364 0 379 0; +#X connect 365 0 379 0; +#X connect 366 0 379 0; +#X connect 367 0 379 0; +#X connect 368 0 379 0; +#X connect 369 0 379 0; +#X connect 370 0 379 0; +#X connect 371 0 379 0; +#X connect 372 0 379 0; +#X connect 373 0 379 0; +#X connect 374 0 379 0; +#X connect 375 0 379 0; +#X connect 376 0 379 0; +#X connect 377 0 379 0; +#X connect 378 0 359 0; +#X connect 379 0 357 0; +#X connect 380 0 263 0; +#X connect 381 0 361 0; +#X connect 381 0 377 0; +#X connect 381 0 376 0; +#X connect 381 0 375 0; +#X connect 381 0 374 0; +#X connect 381 0 373 0; +#X connect 381 0 372 0; +#X connect 381 0 371 0; +#X connect 381 0 370 0; +#X connect 381 0 369 0; +#X connect 381 0 368 0; +#X connect 381 0 367 0; +#X connect 381 0 366 0; +#X connect 381 0 365 0; +#X connect 381 0 364 0; +#X connect 381 0 363 0; +#X connect 381 0 362 0; +#X connect 382 0 243 0; +#X connect 383 0 382 1; +#X connect 384 0 382 1; +#X coords 0 0 1 1 85 60 0;