Compare commits

..

10 commits

Author SHA1 Message Date
54d9f8e69c wair 30 sec for network ready 2023-05-08 15:13:29 +09:00
9c212c57bb no openhours, always on. 2023-05-08 15:06:20 +09:00
5037309eec final. (ip update) 2023-05-08 14:56:35 +09:00
86eb3a9f59 ask specific address from client 2023-05-07 16:47:06 +09:00
6147be7728 a new re-make: arduino micro + esp8266 combo- 2023-05-07 13:11:21 +09:00
bd236b605d merged 2023-05-03 17:47:40 +09:00
ad9407c2c7 vertical resolution muted. == merge grounds.. 2023-05-03 17:44:37 +09:00
7877b06578 cheking 2023-05-03 16:57:26 +09:00
752b1f1bc3 add 2023-05-02 16:40:23 +09:00
ba1720f74d add OTA & alivercounter 2023-05-01 21:45:12 +09:00
8 changed files with 1010 additions and 652 deletions

View file

@ -1 +0,0 @@
pio

View file

@ -1,117 +0,0 @@
#include <ConfigurableFirmata.h>
#include <vector>
const char* ssid = "nolink2";
const char* password = "2222277777";
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 <WiFi.h>
#include "utility/WiFiClientStream.h"
#include "utility/WiFiServerStream.h"
WiFiServerStream serverStream(NETWORK_PORT);
std::vector<int> 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());
Serial.println("Mac address: " + WiFi.macAddress());
//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 <ConfigurableFirmata.h>
// 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<<idx : 0x00);
// if (port0_prev != port) Firmata.sendDigitalPort(0, port);
// port0_prev = port;
// static byte port1_prev = 0;
// port = 0x00;
// for (int idx = 0; idx < 8; idx++) port |= (digitalRead(pins_port1[idx]) ? 0x01<<idx : 0x00);
// if (port1_prev != port) Firmata.sendDigitalPort(1, port);
// port1_prev = port;
// static byte port2_prev = 0;
// port = 0x00;
// for (int idx = 0; idx < 8; idx++) port |= (digitalRead(pins_port2[idx]) ? 0x01<<idx : 0x00);
// if (port2_prev != port) Firmata.sendDigitalPort(2, port);
// port2_prev = port;
// delay(20);
// }

View file

@ -1,2 +0,0 @@
default_fqbn: esp32:esp32:esp32s2:UploadSpeed=460800
default_port: /dev/tty.usbserial-1410

View file

@ -0,0 +1,103 @@
//
// ringringrain - pad(digital input) part. (arduino micro)
//
// D. Yi @ 2023 5 5
//
////pin usage
// 5 6 7 8 9 10 11 12 + 18(a0) 19(a1) 20(a2) 21(a3) 22(a4) 23(a5) == 14 digital in
//
// 0 1 => uart
// 0 1 => all works.. use serial (TTL+WIFI) or (RS232)
////pad structure
#define FLIPPED
// --> comment/uncomment for horizontal flipping of the installation.
#define NUMKEYS 14 // columns : 14, rows : 1
// --> how many keys are available for this pad
int keystat[NUMKEYS] = {0, };
// --> a buffer to store statuses of all keys
// --> needed to extract only 'the change' of key statuses
#define MAXCHANGES 10
int keychanges[MAXCHANGES] = {0, };
int n_keychg = 0;
// --> for monitoring only 'changed' keys.
#define NUMCOLS 14
#ifdef FLIPPED
int pins_cols[NUMCOLS] = {5, 6, 7, 8, 9, 10, 11, 12, 18, 19, 20, 21, 22, 23}; //14
// --> cols is horizontal offsets on the board
// --> to be read as input.
#else
int pins_cols[NUMCOLS] = {23, 22, 21, 20, 19, 18, 12, 11, 10, 9, 8, 7, 6, 5}; //14
// --> cols is horizontal offsets on the board
// --> to be read as input.
#endif
void setup()
{
//disable TX/RX led blinking: Arduino Micro specific
// pinMode(LED_BUILTIN_TX,INPUT);
// pinMode(LED_BUILTIN_RX,INPUT);
//serial
Serial.begin(57600); //debug (USB)
Serial1.begin(57600); //esp8266
//pinmodes
// cols : to be read as input. (PULL-UP)
for (int idx = 0; idx < NUMCOLS; idx++) {
pinMode(pins_cols[idx], INPUT_PULLUP);
}
}
void loop()
{
// perform a full scan of the key statuses!
// read all cols
for (int col = 0; col < NUMCOLS; col++) {
int key = col;
if (key < NUMKEYS) {
int state = !digitalRead(pins_cols[col]); //logic inversion. (HIGH = noteoff, LOW = noteon.)
// if it is 'changed',
if (state != keystat[key]) {
// if there is a room to record this change,
if (n_keychg < MAXCHANGES) {
// make a memo.
int keycoded = (key) * 10 + state; // for example : C4 note-on --> 601 ( == 60*10 + 1)
keychanges[n_keychg] = keycoded;
n_keychg++;
// send msg. over Serial.
byte * b = (byte*)&keycoded;
Serial1.write(b, 2);
//
// Serial.printf("sizeof(keycoded): %d\n", sizeof(keycoded)); // result == 2 (16bit machine)
}
}
// okay. good. now, apply the change.
keystat[key] = state;
}
}
// print out the changes.
for (int chg = 0; chg < n_keychg; chg++) {
Serial.print(keychanges[chg]);
Serial.print(" ");
}
// clear 'keychanges' array
for (int idx = 0; idx < MAXCHANGES; idx++) {
keychanges[idx] = 0;
n_keychg = 0;
}
//
delay(50);
}

View file

@ -0,0 +1,142 @@
//
// ringringrain - WIFI part. (esp8266)
//
// D. Yi @ 2023 5 5
//
//wi-fi
#include <ESP8266WiFi.h>
////network!
const char* ssid = "nolink";
const char* password = "2222277777";
const int NETWORK_PORT = 27016;
IPAddress local_IP(192, 168, 221, 114);
IPAddress gateway(192, 168, 221, 1);
IPAddress subnet(255, 255, 255, 0);
//wi-fi event handlers : re-connect automatically
WiFiEventHandler wifiConnectHandler;
WiFiEventHandler wifiDisconnectHandler;
void onWifiConnect(const WiFiEventStationModeGotIP& event) {
Serial.println("Connected to Wi-Fi sucessfully.");
Serial.print("IP address: ");
Serial.println("Mac address: " + WiFi.macAddress());
Serial.println(WiFi.localIP());
digitalWrite(2, HIGH);
}
void onWifiDisconnect(const WiFiEventStationModeDisconnected& event) {
Serial.println("Disconnected from Wi-Fi, trying to reconnect...");
WiFi.disconnect();
WiFi.begin(ssid, password);
digitalWrite(2, LOW);
}
//firmata over wi-fi
#include <ConfigurableFirmata.h>
#include "utility/WiFiClientStream.h"
#include "utility/WiFiServerStream.h"
WiFiServerStream serverStream(NETWORK_PORT);
//firmware update over the air
#include <ArduinoOTA.h>
//client device @ soft-serial (only RX valid. tx. is dummy.)
#include <SoftwareSerial.h>
SoftwareSerial client(D2, D8); // RX | TX
//==> NO way to do RX/TX only mode?? how bad. later change library?
////
void setup()
{
//wifi indicator
pinMode(2, OUTPUT);
digitalWrite(2, LOW); //disconnected.
//serial (for debug & info)
Serial.begin(115200);
//to get data frames from the client device.
client.begin(57600);
//wifi
wifiConnectHandler = WiFi.onStationModeGotIP(onWifiConnect);
wifiDisconnectHandler = WiFi.onStationModeDisconnected(onWifiDisconnect);
WiFi.mode(WIFI_STA);
// Connect to WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
if (!WiFi.config(local_IP, gateway, subnet)) {
Serial.println("STA Failed to configure");
}
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
// Serial.print(".");
delay(500);
}
Serial.println("");
//firmata
Firmata.disableBlinkVersion();
Firmata.begin(serverStream);
//ota
ArduinoOTA.onStart([]() {
Serial.println("Start");
});
ArduinoOTA.onEnd([]() {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.begin();
}
void loop()
{
// process client data frame
if (client.available() >= 2) {
//
int keycoded = 0; //==> NOTE init=0 is mandatory! (sender is 16bit device. receiver 32bit device.)
byte * b = (byte*)&keycoded;
client.readBytes(b, 2);
Serial.println(keycoded);
//
Firmata.sendAnalog(0, keycoded);
}
// send out alive counter every 1sec.
static unsigned long last = 0;
unsigned long now = millis();
if (now > last + 500) {
last = now;
//
static int alivecounter = 0;
Firmata.sendAnalog(1, alivecounter);
alivecounter++;
if (alivecounter == 1000) alivecounter = 0;
//
}
//firmata over wi-fi
serverStream.maintain();
//
ArduinoOTA.handle();
//for wdt
yield();
}

View file

@ -1 +0,0 @@
src/rainboard.ino

View file

@ -0,0 +1,208 @@
//
// a 2-dimensional ringringrain touch-pad(board)
//
// D. Yi @ 2023 4 9
//
////network!
#include <ConfigurableFirmata.h>
const char* ssid = "nolink2";
const char* password = "2222277777";
const int NETWORK_PORT = 27016;
#include <WiFi.h>
#include "utility/WiFiClientStream.h"
#include "utility/WiFiServerStream.h"
WiFiServerStream serverStream(NETWORK_PORT);
#include <ArduinoOTA.h>
////pad structure
#define FLIPPED
// --> comment/uncomment for horizontal flipping of the installation.
#define MERGED_STRIPE
#define NUMKEYS 42 // columns : 14, rows : 3
// --> how many keys are available for this pad
int keystat[NUMKEYS] = {0, };
// --> a buffer to store statuses of all keys
// --> needed to extract only 'the change' of key statuses
#define MAXCHANGES 10
int keychanges[MAXCHANGES] = {0, };
int n_keychg = 0;
// --> for monitoring only 'changed' keys.
#define NUMCOLS 14
#ifdef FLIPPED
int pins_cols[NUMCOLS] = {16, 15, 17, 18, 20, 19, 33, 34, 35, 36, 37, 38, 39, 40}; //14
// --> cols is horizontal offsets on the board
// --> to be read as input.
#else
int pins_cols[NUMCOLS] = {40, 39, 38, 37, 36, 35, 34, 33, 19, 20, 18, 17, 15, 16}; //14
// --> cols is horizontal offsets on the board
// --> to be read as input.
#endif
#define NUMROWS 2
int pins_rows[NUMROWS] = {7, 6}; //2
// #define NUMROWS 3
// int pins_rows[NUMROWS] = {8, 7, 6}; //3
// --> rows is vertical offsets on the board
// --> to be driven as output (or high impedance)
void setup()
{
//serial
Serial.begin(115200);
//pinmodes
// cols : to be read as input. (PULL-UP)
for (int idx = 0; idx < NUMCOLS; idx++) {
pinMode(pins_cols[idx], INPUT_PULLUP);
}
//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());
Serial.println("Mac address: " + WiFi.macAddress());
//firmata
Firmata.disableBlinkVersion();
Firmata.begin(serverStream);
//ota
ArduinoOTA.onStart([]() {
Serial.println("Start");
});
ArduinoOTA.onEnd([]() {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.begin();
}
void loop()
{
// perform a full scan of the key statuses!
// update row voltages
static int row = 0;
pinMode(pins_rows[row], INPUT); // let old 'on' row goes 'hi-z' first.
row++;
if (row >= NUMROWS) {
row = 0;
}
#if defined(MERGED_STRIPE)
// let all rows go 'on' together. => no vertical resolution.
for (int rr = 0; rr < NUMROWS; rr++) {
pinMode(pins_rows[rr], OUTPUT);
digitalWrite(pins_rows[rr], LOW); // let new 'hi-z' row goes 'on'.. -> ready to scan.
}
#else
pinMode(pins_rows[row], OUTPUT);
digitalWrite(pins_rows[row], LOW); // let new 'hi-z' row goes 'on'.. -> ready to scan.
#endif
// 100us ~ 200us, waiting for the electricity ready...
//delayMicroseconds(200);
delay(2); // 2000us == 2ms
// read all cols
for (int col = 0; col < NUMCOLS; col++) {
int key = row * NUMCOLS + col;
if (key < NUMKEYS) {
int cur_key = !digitalRead(pins_cols[col]); //logic inversion. (HIGH = noteoff, LOW = noteon.)
// if it is 'changed',
if (cur_key != keystat[key]) {
// if there is a room to record this change,
if (n_keychg < MAXCHANGES) {
// make a memo.
int keycoded = (key) * 10 + cur_key; // for example : C4 note-on --> 601 ( == 60*10 + 1)
keychanges[n_keychg] = keycoded;
n_keychg++;
// send Firmata msg. over WIFI.
Firmata.sendAnalog(0, keycoded);
//@Pd
//[pduino/arduino] will divide this by 1023.0 to map 0-1023 -> 0.0-1.0
//so, to recover original values, multiply back by 1023.0.
}
}
// okay. good. now, apply the change.
keystat[key] = cur_key;
}
}
// at the moment of 'full scan done'
if (row == NUMROWS - 1) {
// // print out the buffer status.
// for (int key = 0; key < NUMKEYS; key++) {
// Serial.print(keystat[key]); Serial.print(" ");
// }
// Serial.println();
// print out the changes.
for (int chg = 0; chg < n_keychg; chg++) {
Serial.print(keychanges[chg]);
Serial.print(" ");
}
// clear 'keychanges' array
for (int idx = 0; idx < MAXCHANGES; idx++) {
keychanges[idx] = 0;
n_keychg = 0;
}
// send out alive counter
static int loopcounter = 0;
static int alivecounter = 0;
loopcounter++;
if (loopcounter % 100 == 0) {
Firmata.sendAnalog(1, alivecounter);
alivecounter++;
if (alivecounter == 1000) {
alivecounter = 0;
}
}
}
//
// // discard all incoming MIDI msgs.
// while (usbMIDI.read()) { }
serverStream.maintain();
//
ArduinoOTA.handle();
}

View file

@ -1,162 +0,0 @@
//
// a 2-dimensional ringringrain touch-pad(board)
//
// D. Yi @ 2023 4 9
//
////network!
#include <ConfigurableFirmata.h>
const char* ssid = "nolink2";
const char* password = "2222277777";
const int NETWORK_PORT = 27016;
#include <WiFi.h>
#include "utility/WiFiClientStream.h"
#include "utility/WiFiServerStream.h"
WiFiServerStream serverStream(NETWORK_PORT);
////pad structure
// #define FLIPPED
// --> comment/uncomment for horizontal flipping of the installation.
#define NUMKEYS 42 // columns : 14, rows : 3
// --> how many keys are available for this pad
int keystat[NUMKEYS] = {0, };
// --> a buffer to store statuses of all keys
// --> needed to extract only 'the change' of key statuses
#define MAXCHANGES 10
int keychanges[MAXCHANGES] = {0, };
int n_keychg = 0;
// --> for monitoring only 'changed' keys.
#define NUMCOLS 14
#ifdef FLIPPED
int pins_cols[NUMCOLS] = {16, 15, 17, 18, 20, 19, 33, 34, 35, 36, 37, 38, 39, 40}; //14
// --> cols is horizontal offsets on the board
// --> to be read as input.
#else
int pins_cols[NUMCOLS] = {40, 39, 38, 37, 36, 35, 34, 33, 19, 20, 18, 17, 15, 16}; //14
// --> cols is horizontal offsets on the board
// --> to be read as input.
#endif
#define NUMROWS 2
int pins_rows[NUMROWS] = {7, 6}; //2
// #define NUMROWS 3
// int pins_rows[NUMROWS] = {8, 7, 6}; //3
// --> rows is vertical offsets on the board
// --> to be driven as output (or high impedance)
void setup()
{
//serial
Serial.begin(115200);
//pinmodes
// cols : to be read as input. (PULL-UP)
for (int idx = 0; idx < NUMCOLS; idx++) {
pinMode(pins_cols[idx], INPUT_PULLUP);
}
//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());
Serial.println("Mac address: " + WiFi.macAddress());
//firmata
Firmata.disableBlinkVersion();
Firmata.begin(serverStream);
}
void loop()
{
// perform a full scan of the key statuses!
// update row voltages
static int row = 0;
pinMode(pins_rows[row], INPUT); // let old 'on' row goes 'hi-z' first.
row++;
if (row >= NUMROWS) {
row = 0;
}
pinMode(pins_rows[row], OUTPUT);
digitalWrite(pins_rows[row], LOW); // let new 'hi-z' row goes 'on'.. -> ready to scan.
// 100us ~ 200us, waiting for the electricity ready...
//delayMicroseconds(200);
delay(2); // 2000us == 2ms
// read all cols
for (int col = 0; col < NUMCOLS; col++) {
int key = row * NUMCOLS + col;
if (key < NUMKEYS) {
int cur_key = !digitalRead(pins_cols[col]); //logic inversion. (HIGH = noteoff, LOW = noteon.)
// if it is 'changed',
if (cur_key != keystat[key]) {
// if there is a room to record this change,
if (n_keychg < MAXCHANGES) {
// make a memo.
int keycoded = (key) * 10 + cur_key; // for example : C4 note-on --> 601 ( == 60*10 + 1)
keychanges[n_keychg] = keycoded;
n_keychg++;
// send Firmata msg. over WIFI.
Firmata.sendAnalog(0, keycoded);
//@Pd
//[pduino/arduino] will divide this by 1023.0 to map 0-1023 -> 0.0-1.0
//so, to recover original values, multiply back by 1023.0.
}
}
// okay. good. now, apply the change.
keystat[key] = cur_key;
}
}
// at the moment of 'full scan done'
if (row == NUMROWS - 1) {
// // print out the buffer status.
// for (int key = 0; key < NUMKEYS; key++) {
// Serial.print(keystat[key]); Serial.print(" ");
// }
// Serial.println();
// print out the changes.
for (int chg = 0; chg < n_keychg; chg++) {
Serial.print(keychanges[chg]);
Serial.print(" ");
}
// clear 'keychanges' array
for (int idx = 0; idx < MAXCHANGES; idx++) {
keychanges[idx] = 0;
n_keychg = 0;
}
}
//
// // discard all incoming MIDI msgs.
// while (usbMIDI.read()) { }
serverStream.maintain();
}

View file

@ -0,0 +1 @@
../rainboard.ino

View file

@ -1,15 +1,15 @@
#N canvas 160 23 1006 580 10;
#N canvas 4 23 1006 580 10;
#X obj 924 484 loadbang;
#X obj 21 181 pack f f;
#X obj 109 274 clone ringringrain_piano_node 10;
#X obj 109 245 pack f f f;
#X obj 109 222 - 1;
#X msg 109 154 stop;
#X obj 128 274 clone ringringrain_piano_node 10;
#X obj 128 245 pack f f f;
#X obj 128 222 - 1;
#X msg 128 154 stop;
#X obj 202 413 tabwrite hands;
#X obj 202 344 unpack f f;
#X obj 202 390 f;
#X obj 202 367 t b a;
#X obj 109 199 poly 10;
#X obj 128 199 poly 10;
#X obj 19 465 table pitches;
#X obj 19 494 loadbang;
#X obj 21 97 tabread pitches;
@ -18,268 +18,16 @@
#X obj 924 507 del 5000;
#X msg 19 515 \; pitches 0 60 62 64 65 67 69 71 72 74 76 77 79 81 83
84 86 88 89 91 93 95 96 98 100 101 103 105 107 108;
#N canvas 100 173 852 552 ringringrain_A 0;
#X obj 388 42 arduino-wifi;
#X msg 478 42 disconnect;
#X obj 457 79 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X msg 457 17 connect 192.168.10.112 27016;
#X obj 388 105 route analog;
#X obj 388 128 route 0;
#X obj 388 151 * 1023;
#X obj 252 266 t a a;
#X obj 252 289 / 10;
#X obj 252 312 int;
#X obj 297 289 mod 10;
#X obj 297 312 int;
#X obj 180 330 pack f f;
#X floatatom 252 238 5 0 0 1 interlaced - - 0;
#X listbox 180 353 7 0 0 0 midi-like - - 0;
#X obj 252 361 moses 28;
#X floatatom 252 384 5 0 0 0 - - - 0;
#X floatatom 335 385 5 0 0 0 - - - 0;
#X obj 335 440 pack f f;
#X listbox 335 463 7 0 0 1 synth(lower) - - 0;
#X obj 252 440 pack f f;
#X listbox 252 463 7 0 0 0 synth(upper) - - 0;
#X obj 335 412 - 28;
#X obj 108 190 expr if($f1 < 140 \, $f1 \, $f1+140);
#X obj 388 190 expr if($f1 < 140 \, $f1+140 \, $f1+280);
#N canvas 273 125 970 258 simulation 0;
#X obj 35 48 tgl 15 0 empty empty on/off\\\ (normal:z\\\ to\\\ i\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 48 tgl 15 0 empty empty on/off\\\ (+shift:Z\\\ to\\\ I\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 150 keyhands;
#X floatatom 515 173 5 0 0 0 - - - 0;
#X obj 562 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 49 69 loadbang;
#X msg 49 91 keys 122 \\\; 120 \\\; 99 \\\; 118 \\\; 98 \\\; 110 \\\;
109 \\\; 44 \\\; 46 \\\; 47 \\\; 97 \\\; 115 \\\; 100 \\\; 102 \\\;
103 \\\; 104 \\\; 106 \\\; 107 \\\; 108 \\\; 59 \\\; 113 \\\; 119 \\\;
101 \\\; 114 \\\; 116 \\\; 121 \\\; 117 \\\; 105 \\\;, f 66;
#X obj 866 19 key;
#X floatatom 866 42 5 0 0 0 - - - 0;
#X msg 529 91 keys 90 \\\; 88 \\\; 67 \\\; 86 \\\; 66 \\\; 78 \\\;
77 \\\; 60 \\\; 62 \\\; 63 \\\; 65 \\\; 83 \\\; 68 \\\; 70 \\\; 71
\\\; 72 \\\; 74 \\\; 75 \\\; 76 \\\; 58 \\\; 81 \\\; 87 \\\; 69 \\\;
82 \\\; 84 \\\; 89 \\\; 85 \\\; 73 \\\;, f 66;
#X obj 529 69 loadbang;
#X obj 35 150 keyhands;
#X floatatom 35 173 5 0 0 0 - - - 0;
#X obj 82 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000
#000000;
#X obj 35 211 outlet;
#X obj 515 211 outlet;
#X obj 272 9 inlet;
#X connect 0 0 11 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 15 0;
#X connect 5 0 6 0;
#X connect 6 0 11 0;
#X connect 7 0 8 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 14 0;
#X connect 16 0 0 0;
#X connect 16 0 1 0;
#X restore 650 174 pd simulation left right paper;
#X obj 650 154 tgl 15 0 empty empty on/off 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 42 arduino-wifi;
#X msg 198 42 disconnect;
#X obj 177 79 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 105 route analog;
#X obj 108 128 route 0;
#X obj 108 151 * 1023;
#X text 22 191 interlace ==>;
#X text 373 361 <== split: upper/lower;
#X obj 252 501 outlet;
#X obj 335 501 outlet;
#X msg 177 17 connect 192.168.10.111 27016;
#X connect 0 0 4 0;
#X connect 0 1 2 0;
#X connect 1 0 0 1;
#X connect 3 0 0 1;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 24 0;
#X connect 7 0 8 0;
#X connect 7 1 10 0;
#X connect 8 0 9 0;
#X connect 9 0 12 0;
#X connect 9 0 15 0;
#X connect 10 0 11 0;
#X connect 11 0 12 1;
#X connect 11 0 18 1;
#X connect 11 0 20 1;
#X connect 12 0 14 0;
#X connect 13 0 7 0;
#X connect 15 0 16 0;
#X connect 15 1 17 0;
#X connect 16 0 20 0;
#X connect 17 0 22 0;
#X connect 18 0 19 0;
#X connect 19 0 36 0;
#X connect 20 0 21 0;
#X connect 21 0 35 0;
#X connect 22 0 18 0;
#X connect 23 0 13 0;
#X connect 24 0 13 0;
#X connect 25 0 23 0;
#X connect 25 1 24 0;
#X connect 26 0 25 0;
#X connect 27 0 30 0;
#X connect 27 1 29 0;
#X connect 28 0 27 1;
#X connect 30 0 31 0;
#X connect 31 0 32 0;
#X connect 32 0 23 0;
#X connect 37 0 27 1;
#X restore 21 19 pd ringringrain_A;
#N canvas 149 231 863 545 ringringrain_B 0;
#X obj 388 42 arduino-wifi;
#X msg 478 42 disconnect;
#X obj 457 79 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 388 105 route analog;
#X obj 388 128 route 0;
#X obj 388 151 * 1023;
#X obj 252 266 t a a;
#X obj 252 289 / 10;
#X obj 252 312 int;
#X obj 297 289 mod 10;
#X obj 297 312 int;
#X obj 180 330 pack f f;
#X floatatom 252 238 5 0 0 1 interlaced - - 0;
#X listbox 180 353 7 0 0 0 midi-like - - 0;
#X obj 252 361 moses 28;
#X floatatom 252 384 5 0 0 0 - - - 0;
#X floatatom 335 385 5 0 0 0 - - - 0;
#X obj 335 440 pack f f;
#X listbox 335 463 7 0 0 1 synth(lower) - - 0;
#X obj 252 440 pack f f;
#X listbox 252 463 7 0 0 0 synth(upper) - - 0;
#X obj 335 412 - 28;
#X obj 108 190 expr if($f1 < 140 \, $f1 \, $f1+140);
#X obj 388 190 expr if($f1 < 140 \, $f1+140 \, $f1+280);
#N canvas 273 125 970 258 simulation 0;
#X obj 35 48 tgl 15 0 empty empty on/off\\\ (normal:z\\\ to\\\ i\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 48 tgl 15 0 empty empty on/off\\\ (+shift:Z\\\ to\\\ I\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 150 keyhands;
#X floatatom 515 173 5 0 0 0 - - - 0;
#X obj 562 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 49 69 loadbang;
#X msg 49 91 keys 122 \\\; 120 \\\; 99 \\\; 118 \\\; 98 \\\; 110 \\\;
109 \\\; 44 \\\; 46 \\\; 47 \\\; 97 \\\; 115 \\\; 100 \\\; 102 \\\;
103 \\\; 104 \\\; 106 \\\; 107 \\\; 108 \\\; 59 \\\; 113 \\\; 119 \\\;
101 \\\; 114 \\\; 116 \\\; 121 \\\; 117 \\\; 105 \\\;, f 66;
#X obj 866 19 key;
#X floatatom 866 42 5 0 0 0 - - - 0;
#X msg 529 91 keys 90 \\\; 88 \\\; 67 \\\; 86 \\\; 66 \\\; 78 \\\;
77 \\\; 60 \\\; 62 \\\; 63 \\\; 65 \\\; 83 \\\; 68 \\\; 70 \\\; 71
\\\; 72 \\\; 74 \\\; 75 \\\; 76 \\\; 58 \\\; 81 \\\; 87 \\\; 69 \\\;
82 \\\; 84 \\\; 89 \\\; 85 \\\; 73 \\\;, f 66;
#X obj 529 69 loadbang;
#X obj 35 150 keyhands;
#X floatatom 35 173 5 0 0 0 - - - 0;
#X obj 82 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000
#000000;
#X obj 35 211 outlet;
#X obj 515 211 outlet;
#X obj 272 9 inlet;
#X connect 0 0 11 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 15 0;
#X connect 5 0 6 0;
#X connect 6 0 11 0;
#X connect 7 0 8 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 14 0;
#X connect 16 0 0 0;
#X connect 16 0 1 0;
#X restore 650 174 pd simulation left right paper;
#X obj 650 154 tgl 15 0 empty empty on/off 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 42 arduino-wifi;
#X msg 198 42 disconnect;
#X obj 177 79 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 105 route analog;
#X obj 108 128 route 0;
#X obj 108 151 * 1023;
#X text 22 191 interlace ==>;
#X text 373 361 <== split: upper/lower;
#X obj 252 501 outlet;
#X obj 335 501 outlet;
#X msg 177 17 connect 192.168.10.113 27016;
#X msg 457 17 connect 192.168.10.114 27016;
#X connect 0 0 3 0;
#X connect 0 1 2 0;
#X connect 1 0 0 1;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 23 0;
#X connect 6 0 7 0;
#X connect 6 1 9 0;
#X connect 7 0 8 0;
#X connect 8 0 11 0;
#X connect 8 0 14 0;
#X connect 9 0 10 0;
#X connect 10 0 11 1;
#X connect 10 0 17 1;
#X connect 10 0 19 1;
#X connect 11 0 13 0;
#X connect 12 0 6 0;
#X connect 14 0 15 0;
#X connect 14 1 16 0;
#X connect 15 0 19 0;
#X connect 16 0 21 0;
#X connect 17 0 18 0;
#X connect 18 0 35 0;
#X connect 19 0 20 0;
#X connect 20 0 34 0;
#X connect 21 0 17 0;
#X connect 22 0 12 0;
#X connect 23 0 12 0;
#X connect 24 0 22 0;
#X connect 24 1 23 0;
#X connect 25 0 24 0;
#X connect 26 0 29 0;
#X connect 26 1 28 0;
#X connect 27 0 26 1;
#X connect 29 0 30 0;
#X connect 30 0 31 0;
#X connect 31 0 22 0;
#X connect 36 0 26 1;
#X connect 37 0 0 1;
#X restore 521 19 pd ringringrain_B;
#X text 140 19 <= front wall;
#X text 642 19 <= right wall;
#X obj 21 68 unpack f f;
#X listbox 21 220 7 0 0 0 - - - 0;
#X obj 271 181 pack f f;
#X obj 359 245 pack f f f;
#X obj 359 222 - 1;
#X msg 359 154 stop;
#X obj 271 97 tabread pitches;
#X floatatom 271 120 5 0 0 0 - - - 0;
#X obj 271 68 unpack f f;
#N canvas 586 33 434 533 rain 0;
#X obj 235 181 pack f f;
#X obj 342 245 pack f f f;
#X obj 342 222 - 1;
#X msg 342 154 stop;
#X obj 235 97 tabread pitches;
#X floatatom 235 120 5 0 0 0 - - - 0;
#X obj 235 68 unpack f f;
#N canvas 1004 214 434 533 rain 0;
#X obj 27 80 loadbang;
#N canvas 0 22 450 300 (subpatch) 0;
#X array raining 2.57403e+06 float 0;
@ -359,7 +107,7 @@
#X obj 117 217 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X msg 199 113 0;
#X obj 152 72 t b a b;
#X obj 133 76 t b a b;
#X obj 152 215 tabread hands;
#X obj 18 65 metro 100;
#X obj 18 45 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000
@ -369,7 +117,7 @@
#X floatatom 117 308 5 0 0 0 - - - 0;
#X obj 117 330 outlet;
#X obj 228 21 table hands 60;
#X msg 152 49 60;
#X msg 133 53 60;
#X msg 275 80 \; hands const 0;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
@ -426,34 +174,34 @@
#X connect 25 0 6 1;
#X connect 26 0 25 0;
#X restore 826 487 pd rain wave;
#X listbox 271 204 7 0 0 0 - - - 0;
#X listbox 235 204 7 0 0 0 - - - 0;
#X obj 374 413 tabwrite hands;
#X obj 374 344 unpack f f;
#X obj 374 390 f;
#X obj 374 367 t b a;
#X obj 455 390 + 10;
#X obj 359 274 clone raindroplet 20;
#X obj 359 199 poly 20;
#X obj 342 274 clone raindroplet 20;
#X obj 342 199 poly 20;
#X obj 521 181 pack f f;
#X obj 609 274 clone ringringrain_piano_node 10;
#X obj 609 245 pack f f f;
#X obj 609 222 - 1;
#X msg 609 154 stop;
#X obj 609 199 poly 10;
#X obj 628 274 clone ringringrain_piano_node 10;
#X obj 628 245 pack f f f;
#X obj 628 222 - 1;
#X msg 628 154 stop;
#X obj 628 199 poly 10;
#X obj 521 97 tabread pitches;
#X floatatom 521 120 5 0 0 0 - - - 0;
#X obj 521 68 unpack f f;
#X listbox 521 220 7 0 0 0 - - - 0;
#X obj 771 181 pack f f;
#X obj 859 245 pack f f f;
#X obj 859 222 - 1;
#X msg 859 154 stop;
#X obj 771 97 tabread pitches;
#X floatatom 771 120 5 0 0 0 - - - 0;
#X obj 771 68 unpack f f;
#X listbox 771 204 7 0 0 0 - - - 0;
#X obj 859 274 clone raindroplet 20;
#X obj 859 199 poly 20;
#X obj 735 181 pack f f;
#X obj 842 245 pack f f f;
#X obj 842 222 - 1;
#X msg 842 154 stop;
#X obj 735 97 tabread pitches;
#X floatatom 735 120 5 0 0 0 - - - 0;
#X obj 735 68 unpack f f;
#X listbox 735 204 7 0 0 0 - - - 0;
#X obj 842 274 clone raindroplet 20;
#X obj 842 199 poly 20;
#X obj 702 413 tabwrite hands;
#X obj 702 344 unpack f f;
#X obj 702 390 f;
@ -510,21 +258,454 @@
#X connect 15 0 8 2;
#X restore 814 525 pd main output;
#X obj 21 142 - 12;
#X obj 271 142 - 12;
#X obj 235 142 - 12;
#X obj 521 142 - 12;
#X obj 771 142 - 12;
#X obj 109 303 throw~ front;
#X obj 359 303 throw~ front;
#X obj 609 303 throw~ right;
#X obj 859 303 throw~ right;
#X msg 526 508 2.4;
#X msg 473 508 4.8;
#X msg 632 508 2.4;
#X msg 579 508 1.8;
#X obj 735 142 - 12;
#X obj 128 303 throw~ front;
#X obj 342 303 throw~ front;
#X obj 628 303 throw~ right;
#X obj 842 303 throw~ right;
#N canvas 0 31 852 598 ringringrain_A 1;
#X obj 388 102 arduino-wifi;
#X msg 478 102 disconnect;
#X obj 457 139 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 388 165 route analog;
#X obj 182 336 t a a;
#X obj 182 359 / 10;
#X obj 182 382 int;
#X obj 227 359 mod 10;
#X obj 227 382 int;
#X obj 110 400 pack f f;
#X floatatom 108 278 5 0 0 1 interlaced - - 0;
#X listbox 110 423 7 0 0 0 midi-like - - 0;
#X obj 182 431 moses 28;
#X floatatom 182 454 5 0 0 0 - - - 0;
#X floatatom 385 445 5 0 0 0 - - - 0;
#X obj 385 500 pack f f;
#X listbox 385 523 7 0 0 1 synth(lower) - - 0;
#X obj 182 510 pack f f;
#X listbox 182 533 7 0 0 0 synth(upper) - - 0;
#X obj 385 472 - 28;
#X obj 108 250 expr if($f1 < 140 \, $f1 \, $f1+140);
#X obj 388 250 expr if($f1 < 140 \, $f1+140 \, $f1+280);
#N canvas 273 125 970 258 simulation 0;
#X obj 35 48 tgl 15 0 empty empty on/off\\\ (normal:z\\\ to\\\ i\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 48 tgl 15 0 empty empty on/off\\\ (+shift:Z\\\ to\\\ I\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 150 keyhands;
#X floatatom 515 173 5 0 0 0 - - - 0;
#X obj 562 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 49 69 loadbang;
#X msg 49 91 keys 122 \\\; 120 \\\; 99 \\\; 118 \\\; 98 \\\; 110 \\\;
109 \\\; 44 \\\; 46 \\\; 47 \\\; 97 \\\; 115 \\\; 100 \\\; 102 \\\;
103 \\\; 104 \\\; 106 \\\; 107 \\\; 108 \\\; 59 \\\; 113 \\\; 119 \\\;
101 \\\; 114 \\\; 116 \\\; 121 \\\; 117 \\\; 105 \\\;, f 66;
#X obj 866 19 key;
#X floatatom 866 42 5 0 0 0 - - - 0;
#X msg 529 91 keys 90 \\\; 88 \\\; 67 \\\; 86 \\\; 66 \\\; 78 \\\;
77 \\\; 60 \\\; 62 \\\; 63 \\\; 65 \\\; 83 \\\; 68 \\\; 70 \\\; 71
\\\; 72 \\\; 74 \\\; 75 \\\; 76 \\\; 58 \\\; 81 \\\; 87 \\\; 69 \\\;
82 \\\; 84 \\\; 89 \\\; 85 \\\; 73 \\\;, f 66;
#X obj 529 69 loadbang;
#X obj 35 150 keyhands;
#X floatatom 35 173 5 0 0 0 - - - 0;
#X obj 82 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000
#000000;
#X obj 35 211 outlet;
#X obj 515 211 outlet;
#X obj 272 9 inlet;
#X connect 0 0 11 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 15 0;
#X connect 5 0 6 0;
#X connect 6 0 11 0;
#X connect 7 0 8 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 14 0;
#X connect 16 0 0 0;
#X connect 16 0 1 0;
#X restore 650 234 pd simulation left right paper;
#X obj 650 214 tgl 15 0 empty empty on/off 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 102 arduino-wifi;
#X msg 198 102 disconnect;
#X obj 177 139 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 165 route analog;
#X obj 108 211 * 1023;
#X text 22 251 interlace ==>;
#X text 253 431 <== split: upper/lower;
#X obj 182 561 outlet;
#X obj 385 561 outlet;
#X obj 108 188 route 0 1, f 17;
#X floatatom 221 189 5 0 0 2 alivecounter - - 0;
#X obj 221 211 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 303 188 timer;
#X obj 303 165 t b b;
#X floatatom 303 211 5 0 0 0 - - - 0;
#X obj 308 346 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X msg 308 300 stop \, bang;
#X obj 157 211 * 1023;
#X obj 308 561 outlet;
#X obj 501 561 outlet;
#X obj 501 346 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X msg 501 300 stop \, bang;
#X obj 388 211 * 1023;
#X obj 388 188 route 0 1, f 17;
#X floatatom 501 189 5 0 0 2 alivecounter - - 0;
#X obj 501 211 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 583 188 timer;
#X obj 583 165 t b b;
#X floatatom 583 211 5 0 0 0 - - - 0;
#X obj 437 211 * 1023;
#X obj 110 464 swap;
#X obj 110 443 unpack f f;
#X obj 110 506 route 1;
#X obj 110 485 pack f f;
#X obj 273 13 tgl 15 0 empty ONOFF r:ONOFF 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 273 33 sel 1 0;
#X floatatom 182 316 5 0 0 0 - - - 0;
#X obj 308 323 del 1500;
#X obj 501 323 del 1500;
#X text 420 445 <== DEACTIVATED synth(lower);
#X obj 20 560 print noteonA;
#X msg 177 77 connect 192.168.221.111 27016;
#X msg 457 77 connect 192.168.221.112 27016;
#X connect 0 0 3 0;
#X connect 0 1 2 0;
#X connect 1 0 0 1;
#X connect 3 0 47 0;
#X connect 4 0 5 0;
#X connect 4 1 7 0;
#X connect 5 0 6 0;
#X connect 6 0 9 0;
#X connect 6 0 12 0;
#X connect 7 0 8 0;
#X connect 8 0 9 1;
#X connect 8 0 15 1;
#X connect 8 0 17 1;
#X connect 9 0 11 0;
#X connect 10 0 60 0;
#X connect 11 0 55 0;
#X connect 12 0 13 0;
#X connect 13 0 17 0;
#X connect 14 0 19 0;
#X connect 15 0 16 0;
#X connect 16 0 32 0;
#X connect 17 0 18 0;
#X connect 18 0 31 0;
#X connect 19 0 15 0;
#X connect 20 0 10 0;
#X connect 21 0 10 0;
#X connect 22 0 20 0;
#X connect 22 1 21 0;
#X connect 23 0 22 0;
#X connect 24 0 27 0;
#X connect 24 1 26 0;
#X connect 25 0 24 1;
#X connect 27 0 33 0;
#X connect 28 0 20 0;
#X connect 33 0 28 0;
#X connect 33 1 41 0;
#X connect 34 0 35 0;
#X connect 35 0 37 0;
#X connect 35 0 40 0;
#X connect 36 0 38 0;
#X connect 37 0 36 0;
#X connect 37 1 36 1;
#X connect 39 0 42 0;
#X connect 40 0 61 0;
#X connect 41 0 34 0;
#X connect 44 0 43 0;
#X connect 45 0 62 0;
#X connect 46 0 21 0;
#X connect 47 0 46 0;
#X connect 47 1 53 0;
#X connect 48 0 49 0;
#X connect 49 0 51 0;
#X connect 49 0 45 0;
#X connect 50 0 52 0;
#X connect 51 0 50 0;
#X connect 51 1 50 1;
#X connect 53 0 48 0;
#X connect 54 0 57 0;
#X connect 54 1 57 1;
#X connect 55 0 54 0;
#X connect 55 1 54 1;
#X connect 56 0 64 0;
#X connect 57 0 56 0;
#X connect 58 0 59 0;
#X connect 59 0 65 0;
#X connect 59 0 66 0;
#X connect 59 1 25 0;
#X connect 59 1 1 0;
#X connect 60 0 4 0;
#X connect 61 0 39 0;
#X connect 61 0 44 0;
#X connect 62 0 44 0;
#X connect 62 0 39 0;
#X connect 65 0 24 1;
#X connect 66 0 0 1;
#X restore 21 19 pd ringringrain_A ........ front wall;
#X f 54;
#N canvas 574 23 863 598 ringringrain_B 0;
#X obj 388 102 arduino-wifi;
#X msg 478 102 disconnect;
#X obj 457 139 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 388 165 route analog;
#X obj 182 326 t a a;
#X obj 182 349 / 10;
#X obj 182 372 int;
#X obj 227 349 mod 10;
#X obj 227 372 int;
#X obj 110 390 pack f f;
#X floatatom 182 298 5 0 0 1 interlaced - - 0;
#X listbox 110 413 7 0 0 0 midi-like - - 0;
#X obj 182 421 moses 28;
#X floatatom 182 444 5 0 0 0 - - - 0;
#X floatatom 385 445 5 0 0 0 - - - 0;
#X obj 385 500 pack f f;
#X listbox 385 523 7 0 0 1 synth(lower) - - 0;
#X obj 182 500 pack f f;
#X listbox 182 523 7 0 0 0 synth(upper) - - 0;
#X obj 385 472 - 28;
#X obj 108 250 expr if($f1 < 140 \, $f1 \, $f1+140);
#X obj 388 250 expr if($f1 < 140 \, $f1+140 \, $f1+280);
#N canvas 273 125 970 258 simulation 0;
#X obj 35 48 tgl 15 0 empty empty on/off\\\ (normal:z\\\ to\\\ i\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 48 tgl 15 0 empty empty on/off\\\ (+shift:Z\\\ to\\\ I\\\ 28keys)
17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 515 150 keyhands;
#X floatatom 515 173 5 0 0 0 - - - 0;
#X obj 562 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 49 69 loadbang;
#X msg 49 91 keys 122 \\\; 120 \\\; 99 \\\; 118 \\\; 98 \\\; 110 \\\;
109 \\\; 44 \\\; 46 \\\; 47 \\\; 97 \\\; 115 \\\; 100 \\\; 102 \\\;
103 \\\; 104 \\\; 106 \\\; 107 \\\; 108 \\\; 59 \\\; 113 \\\; 119 \\\;
101 \\\; 114 \\\; 116 \\\; 121 \\\; 117 \\\; 105 \\\;, f 66;
#X obj 866 19 key;
#X floatatom 866 42 5 0 0 0 - - - 0;
#X msg 529 91 keys 90 \\\; 88 \\\; 67 \\\; 86 \\\; 66 \\\; 78 \\\;
77 \\\; 60 \\\; 62 \\\; 63 \\\; 65 \\\; 83 \\\; 68 \\\; 70 \\\; 71
\\\; 72 \\\; 74 \\\; 75 \\\; 76 \\\; 58 \\\; 81 \\\; 87 \\\; 69 \\\;
82 \\\; 84 \\\; 89 \\\; 85 \\\; 73 \\\;, f 66;
#X obj 529 69 loadbang;
#X obj 35 150 keyhands;
#X floatatom 35 173 5 0 0 0 - - - 0;
#X obj 82 181 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000
#000000;
#X obj 35 211 outlet;
#X obj 515 211 outlet;
#X obj 272 9 inlet;
#X connect 0 0 11 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 15 0;
#X connect 5 0 6 0;
#X connect 6 0 11 0;
#X connect 7 0 8 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 11 0 13 0;
#X connect 12 0 14 0;
#X connect 16 0 0 0;
#X connect 16 0 1 0;
#X restore 650 234 pd simulation left right paper;
#X obj 650 214 tgl 15 0 empty empty on/off 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 102 arduino-wifi;
#X msg 198 102 disconnect;
#X obj 177 139 tgl 15 0 empty empty connected? 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 108 165 route analog;
#X text 22 251 interlace ==>;
#X text 253 421 <== split: upper/lower;
#X obj 182 561 outlet;
#X obj 385 561 outlet;
#X obj 108 211 * 1023;
#X obj 108 188 route 0 1, f 17;
#X floatatom 221 189 5 0 0 2 alivecounter - - 0;
#X obj 221 211 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 303 188 timer;
#X obj 303 165 t b b;
#X floatatom 303 211 5 0 0 0 - - - 0;
#X obj 308 346 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X msg 308 300 stop \, bang;
#X obj 157 211 * 1023;
#X obj 308 561 outlet;
#X obj 501 561 outlet;
#X obj 501 346 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X msg 501 300 stop \, bang;
#X obj 388 211 * 1023;
#X obj 388 188 route 0 1, f 17;
#X floatatom 501 189 5 0 0 2 alivecounter - - 0;
#X obj 501 211 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc
#000000 #000000;
#X obj 583 188 timer;
#X obj 583 165 t b b;
#X floatatom 583 211 5 0 0 0 - - - 0;
#X obj 437 211 * 1023;
#X obj 273 13 tgl 15 0 empty ONOFF r:ONOFF 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 273 33 sel 1 0;
#X obj 308 323 del 1500;
#X obj 501 323 del 1500;
#X obj 110 464 swap;
#X obj 110 443 unpack f f;
#X obj 110 506 route 1;
#X obj 110 485 pack f f;
#X text 420 445 <== DEACTIVATED synth(lower);
#X obj 20 560 print noteonB;
#X msg 177 77 connect 192.168.221.113 27016;
#X msg 457 77 connect 192.168.221.114 27016;
#X connect 0 0 3 0;
#X connect 0 1 2 0;
#X connect 1 0 0 1;
#X connect 3 0 47 0;
#X connect 4 0 5 0;
#X connect 4 1 7 0;
#X connect 5 0 6 0;
#X connect 6 0 9 0;
#X connect 6 0 12 0;
#X connect 7 0 8 0;
#X connect 8 0 9 1;
#X connect 8 0 15 1;
#X connect 8 0 17 1;
#X connect 9 0 11 0;
#X connect 10 0 4 0;
#X connect 11 0 59 0;
#X connect 12 0 13 0;
#X connect 13 0 17 0;
#X connect 14 0 19 0;
#X connect 15 0 16 0;
#X connect 16 0 31 0;
#X connect 17 0 18 0;
#X connect 18 0 30 0;
#X connect 19 0 15 0;
#X connect 20 0 10 0;
#X connect 21 0 10 0;
#X connect 22 0 20 0;
#X connect 22 1 21 0;
#X connect 23 0 22 0;
#X connect 24 0 27 0;
#X connect 24 1 26 0;
#X connect 25 0 24 1;
#X connect 27 0 33 0;
#X connect 32 0 20 0;
#X connect 33 0 32 0;
#X connect 33 1 41 0;
#X connect 34 0 35 0;
#X connect 35 0 37 0;
#X connect 35 0 40 0;
#X connect 36 0 38 0;
#X connect 37 0 36 0;
#X connect 37 1 36 1;
#X connect 39 0 42 0;
#X connect 40 0 56 0;
#X connect 41 0 34 0;
#X connect 44 0 43 0;
#X connect 45 0 57 0;
#X connect 46 0 21 0;
#X connect 47 0 46 0;
#X connect 47 1 53 0;
#X connect 48 0 49 0;
#X connect 49 0 51 0;
#X connect 49 0 45 0;
#X connect 50 0 52 0;
#X connect 51 0 50 0;
#X connect 51 1 50 1;
#X connect 53 0 48 0;
#X connect 54 0 55 0;
#X connect 55 0 64 0;
#X connect 55 0 65 0;
#X connect 55 1 25 0;
#X connect 55 1 1 0;
#X connect 56 0 39 0;
#X connect 56 0 44 0;
#X connect 57 0 44 0;
#X connect 57 0 39 0;
#X connect 58 0 61 0;
#X connect 58 1 61 1;
#X connect 59 0 58 0;
#X connect 59 1 58 1;
#X connect 60 0 63 0;
#X connect 61 0 60 0;
#X connect 64 0 24 1;
#X connect 65 0 0 1;
#X restore 521 19 pd ringringrain_B ........ right wall;
#X f 54;
#N canvas 531 237 553 436 timer 0;
#X obj 206 161 time, f 24;
#X obj 206 141 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X floatatom 206 182 5 0 0 0 - - - 0;
#X floatatom 253 182 5 0 0 0 - - - 0;
#X floatatom 300 182 5 0 0 0 - - - 0;
#X obj 206 120 metro 1000;
#X obj 206 100 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 66 19 loadbang;
#X msg 66 63 1;
#X obj 206 202 * 100;
#X obj 206 223 +;
#X floatatom 206 244 5 0 0 0 - - - 0;
#X floatatom 206 301 5 0 0 0 - - - 0;
#X obj 206 321 change;
#X floatatom 206 342 5 0 0 0 - - - 0;
#X obj 66 362 tgl 15 0 ONOFF empty s:ONOFF 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 206 280 expr if($f1 > 900 \, if($f1 < 1830 \, 1 \, 0) \, 0)
;
#X text 207 49 no openhours. always on.;
#X obj 66 42 del 30000;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 0 2 4 0;
#X connect 1 0 0 0;
#X connect 2 0 9 0;
#X connect 3 0 10 1;
#X connect 5 0 1 0;
#X connect 6 0 5 0;
#X connect 7 0 18 0;
#X connect 8 0 15 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 11 0 16 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 16 0 12 0;
#X connect 18 0 8 0;
#X restore 420 33 pd timer;
#X obj 411 131 tgl 25 0 ONOFF empty s:ONOFF 17 7 0 10 #ffc7c6 #000000
#000000 0 1;
#X msg 411 106 set \$1;
#X obj 411 85 r ONOFF;
#X connect 0 0 16 0;
#X connect 1 0 10 0;
#X connect 1 0 23 0;
#X connect 2 0 75 0;
#X connect 1 0 19 0;
#X connect 2 0 71 0;
#X connect 2 1 7 0;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
@ -539,76 +720,82 @@
#X connect 10 2 3 2;
#X connect 12 0 17 0;
#X connect 13 0 14 0;
#X connect 14 0 71 0;
#X connect 14 0 67 0;
#X connect 16 0 15 0;
#X connect 18 0 22 0;
#X connect 18 1 30 0;
#X connect 19 0 48 0;
#X connect 19 1 56 0;
#X connect 22 0 13 0;
#X connect 22 1 1 1;
#X connect 24 0 32 0;
#X connect 24 0 39 0;
#X connect 25 0 38 0;
#X connect 26 0 25 0;
#X connect 27 0 39 0;
#X connect 28 0 29 0;
#X connect 29 0 72 0;
#X connect 30 0 28 0;
#X connect 30 1 24 1;
#X connect 34 0 36 0;
#X connect 34 1 35 1;
#X connect 35 0 33 0;
#X connect 36 0 35 0;
#X connect 36 1 37 0;
#X connect 37 0 33 1;
#X connect 38 0 76 0;
#X connect 38 1 34 0;
#X connect 39 0 26 0;
#X connect 39 1 25 1;
#X connect 39 2 25 2;
#X connect 40 0 45 0;
#X connect 40 0 49 0;
#X connect 41 0 77 0;
#X connect 41 1 61 0;
#X connect 42 0 41 0;
#X connect 43 0 42 0;
#X connect 44 0 45 0;
#X connect 45 0 43 0;
#X connect 45 1 42 1;
#X connect 45 2 42 2;
#X connect 46 0 47 0;
#X connect 47 0 73 0;
#X connect 48 0 46 0;
#X connect 48 1 40 1;
#X connect 50 0 57 0;
#X connect 50 0 59 0;
#X connect 51 0 58 0;
#X connect 52 0 51 0;
#X connect 53 0 59 0;
#X connect 54 0 55 0;
#X connect 55 0 74 0;
#X connect 56 0 54 0;
#X connect 56 1 50 1;
#X connect 58 0 78 0;
#X connect 58 1 66 0;
#X connect 59 0 52 0;
#X connect 59 1 51 1;
#X connect 59 2 51 2;
#X connect 61 0 63 0;
#X connect 61 1 62 1;
#X connect 62 0 60 0;
#X connect 63 0 62 0;
#X connect 63 1 64 0;
#X connect 64 0 60 1;
#X connect 66 0 68 0;
#X connect 66 1 67 1;
#X connect 67 0 65 0;
#X connect 68 0 67 0;
#X connect 68 1 69 0;
#X connect 69 0 65 1;
#X connect 71 0 1 0;
#X connect 72 0 24 0;
#X connect 73 0 40 0;
#X connect 74 0 50 0;
#X connect 18 0 13 0;
#X connect 18 1 1 1;
#X connect 20 0 28 0;
#X connect 20 0 35 0;
#X connect 21 0 34 0;
#X connect 22 0 21 0;
#X connect 23 0 35 0;
#X connect 24 0 25 0;
#X connect 25 0 68 0;
#X connect 26 0 24 0;
#X connect 26 1 20 1;
#X connect 30 0 32 0;
#X connect 30 1 31 1;
#X connect 31 0 29 0;
#X connect 32 0 31 0;
#X connect 32 1 33 0;
#X connect 33 0 29 1;
#X connect 34 0 72 0;
#X connect 34 1 30 0;
#X connect 35 0 22 0;
#X connect 35 1 21 1;
#X connect 35 2 21 2;
#X connect 36 0 41 0;
#X connect 36 0 45 0;
#X connect 37 0 73 0;
#X connect 37 1 57 0;
#X connect 38 0 37 0;
#X connect 39 0 38 0;
#X connect 40 0 41 0;
#X connect 41 0 39 0;
#X connect 41 1 38 1;
#X connect 41 2 38 2;
#X connect 42 0 43 0;
#X connect 43 0 69 0;
#X connect 44 0 42 0;
#X connect 44 1 36 1;
#X connect 46 0 53 0;
#X connect 46 0 55 0;
#X connect 47 0 54 0;
#X connect 48 0 47 0;
#X connect 49 0 55 0;
#X connect 50 0 51 0;
#X connect 51 0 70 0;
#X connect 52 0 50 0;
#X connect 52 1 46 1;
#X connect 54 0 74 0;
#X connect 54 1 62 0;
#X connect 55 0 48 0;
#X connect 55 1 47 1;
#X connect 55 2 47 2;
#X connect 57 0 59 0;
#X connect 57 1 58 1;
#X connect 58 0 56 0;
#X connect 59 0 58 0;
#X connect 59 1 60 0;
#X connect 60 0 56 1;
#X connect 62 0 64 0;
#X connect 62 1 63 1;
#X connect 63 0 61 0;
#X connect 64 0 63 0;
#X connect 64 1 65 0;
#X connect 65 0 61 1;
#X connect 67 0 1 0;
#X connect 68 0 20 0;
#X connect 69 0 36 0;
#X connect 70 0 46 0;
#X connect 75 0 18 0;
#X connect 75 1 5 0;
#X connect 75 2 26 0;
#X connect 75 3 23 0;
#X connect 76 0 44 0;
#X connect 76 1 40 0;
#X connect 76 2 52 0;
#X connect 76 3 49 0;
#X connect 79 0 78 0;
#X connect 80 0 79 0;
#X coords 0 0 1 1 85 60 0;