initial commit of algomom

master
Rob Canning 2023-01-26 10:36:56 +01:00
commit 0a3e9f3806
26 changed files with 188569 additions and 0 deletions

4
INSTALL 100644
View File

@ -0,0 +1,4 @@
net-tools git
processing
oscp5

View File

@ -0,0 +1,76 @@
<!DOCTYPE patchbay>
<patchbay version="0.9.1" name="live_jackpatchbay">
<output-sockets>
<socket client="system" name="system 1" type="jack-audio" exclusive="on">
<plug>capture_1</plug>
<plug>capture_2</plug>
<plug>capture_3</plug>
<plug>capture_4</plug>
</socket>
<socket client="ardour" name="ardour 1" type="jack-audio" exclusive="off">
<plug>Master\/audio_out\ 1</plug>
<plug>Master\/audio_out\ 2</plug>
</socket>
<socket client="ardour" name="ardour sc4ch" type="jack-audio" exclusive="off">
<plug>SC\ 4CHAN\/audio_out\ 1</plug>
<plug>SC\ 4CHAN\/audio_out\ 2</plug>
<plug>SC\ 4CHAN\/audio_out\ 3</plug>
<plug>SC\ 4CHAN\/audio_out\ 4</plug>
</socket>
<socket client="gx_head_amp" name="gx_head_amp 1" type="jack-audio" exclusive="off">
<plug>out_0</plug>
</socket>
<socket client="gx_head_fx" name="gx_head_fx" type="jack-audio" exclusive="off">
<plug>out_0</plug>
<plug>out_1</plug>
</socket>
<socket client="SuperCollider" name="SC2CH" type="jack-audio" exclusive="off">
<plug>out_1</plug>
<plug>out_2</plug>
</socket>
<socket client="SuperCollider" name="SC 3-4" type="jack-audio" exclusive="off">
<plug>out_3</plug>
<plug>out_4</plug>
</socket>
<socket client="SuperCollider" name="SuperCollider 4ch" type="jack-audio" exclusive="off">
<plug>out_1</plug>
<plug>out_2</plug>
<plug>out_3</plug>
<plug>out_4</plug>
</socket>
</output-sockets>
<input-sockets>
<socket client="gx_head_amp" name="gx_head_amp" type="jack-audio" exclusive="off">
<plug>in_0</plug>
</socket>
<socket client="gx_head_fx" name="gx_head_fx 1" type="jack-audio" exclusive="off">
<plug>in_0</plug>
</socket>
<socket client="SuperCollider" name="SC 4CH" type="jack-audio" exclusive="off">
<plug>in_1</plug>
<plug>in_2</plug>
<plug>in_3</plug>
<plug>in_4</plug>
</socket>
<socket client="ardour" name="sc2chan" type="jack-audio" exclusive="off">
<plug>SUPERCOLLIDER\/audio_in\ 1</plug>
<plug>SUPERCOLLIDER\/audio_in\ 2</plug>
</socket>
<socket client="system" name="system 1" type="jack-audio" exclusive="off">
<plug>playback_1</plug>
<plug>playback_2</plug>
<plug>playback_3</plug>
<plug>playback_4</plug>
</socket>
</input-sockets>
<slots/>
<cables>
<cable input="gx_head_amp" type="jack-audio" output="system 1"/>
<cable input="SC 4CH" type="jack-audio" output="gx_head_fx"/>
<cable input="system 1" type="jack-audio" output="SC 3-4"/>
<cable input="system 1" type="jack-audio" output="SuperCollider 4ch"/>
<cable input="system 1" type="jack-audio" output="ardour 1"/>
<cable input="gx_head_fx 1" type="jack-audio" output="gx_head_amp 1"/>
</cables>
</patchbay>

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,147 @@
import oscP5.*;
import netP5.*;
import http.requests.*;
OscP5 oscP5;
float x; // global variable
float y;
float z;
float ry;
int[] r = {3,5,8,13,21};
PShape chickenfoot;
//String urosC02;
import http.requests.*;
JSONObject json; // this is the full json object including the headers
JSONArray totalData; // this is the array in the feeds part
JSONObject record; // this is each one of the small json objects in the array
int id; // this is just a counter provided by Thingspeak that increments with each new posted data point. It is an int
String timeStamp; // this is the full time stamp provided by Thingspeak. It could be parsed to extract specific information for visualization
int temp; // this is the data point that I uploaded from my arduino
// (a TMP36 analog temperature sensor --> Arduino Uno --> Ethernet Shield --> Thingspeak) using a standard arduino upload program
int co2;
float humidity;
PFont liberation;
// https://api.thingspeak.com/channels/1724587/fields/3.json?results=1
void setup() {
// UROS DATA FROM THINGSPEAK
json = loadJSONObject("https://api.thingspeak.com/channels/1724587/feeds.json");
totalData = json.getJSONArray("feeds");
for (int i = 0; i < totalData.size(); i++) { // step through the array, one record at a time
record = totalData.getJSONObject(i); // remember the items in the array are also JSON objects
id = record.getInt("entry_id"); // the key "entry_id" is given by Thingspeak. This is essentially a counter
timeStamp = record.getString("created_at"); // the key "created_at" is also given by Thingspeak. I will write a parser to unpack it into a Date class soon.
temp = int(record.getString("field1")); // Thingspeak stored this as a string so I have to convert it to an int for visualisation
co2 = int(record.getString("field3")); // Thingspeak stored this as a string so I have to convert it to an int for visualisation
humidity = int(record.getString("field4"));
println(id + ", " + timeStamp + ", " + temp +", co2 level ppm: " + co2); // Just checking that it is all there.
}
liberation = createFont("LiberationMono-Bold.ttf", 45);
chickenfoot = loadShape("chicken.obj");
fullScreen(P3D);
//size(400, 300);
frameRate(24);
//background(0);
smooth();
OscProperties properties = new OscProperties();
properties.setListeningPort(47120); // osc receive port (from sc)
oscP5 = new OscP5(this, properties);
}
void oscEvent(OscMessage msg) {
if (msg.checkAddrPattern("/sc3p5")) {
x = msg.get(0).floatValue(); // receive floats from sc
}
if (msg.checkAddrPattern("/mother2")) {
y = msg.get(0).floatValue(); // receive floats from sc
}
if (msg.checkAddrPattern("/rotation")) {
z = msg.get(0).floatValue(); // receive floats from sc
}
}
void drawTarget(float xloc, float yloc, float size, float num) {
float grayvalues = 255/num;
float steps = size/num;
ellipseMode(CENTER);
for (int i = 0; i < num; i++) {
fill(i*grayvalues);
ellipse(xloc, yloc, size - i*steps, size - i*steps);
}
}
//https://forum.processing.org/two/discussion/4448/downloading-data-from-thingspeak.html
void draw() {
if (y == 3){
background(0);
} else { background(255); }
// DISPLAY UROS DATA /////////////////
textSize(22);
fill(0, 111);
textFont(liberation);
text("Time: " + timeStamp, width*0.5, height/4);
text("Temperature (Celsius): " + temp, width*0.5, height/5);
text("CO2 PPM: " + co2, width*0.5, height/6);
text("Humidity (%rel): " + humidity, width*0.5, height/7);
/////////////////
lights();
println("rotation: ", z);
//rectMode(CORNERS);
drawTarget(width/6 , (height/8) *-y + random(0,10) +height*0.7 , random(60, 1200), (y%8)+2);
//scale(7.5);
//rotateX(PI*z/6);
//drawTarget(width/12 * x, height/2, 222, x);
//drawTarget(width*0.75, y, 120, 6);
//background(x, x, x);
println("POST: ", x);
// draw rect
//stroke(256-x/2, 256-x*abs(sin(x)), 256-x/4);
//sdtkeWeight(random(12));
fill(256-x/2, 256-x, 256-x*abs(sin(x)));
//translate(width/2, height/2);
//rotate(-x); //make recieve osc
//rect(x%64, x%64, x*abs(sin(x))%128, x*abs(sin(x))%128, 6);
//fill(random(255));
rect(width/12 * x, 0, r[int(random(2))], height, 6);
//translate(width/2, 0);
if (y == 4){
rotateX(PI*z/2);
} else {
rotateX(0);
}
//rotateX(0.5);
fill(255);
rect(0, (height/8) *-y +height*0.7 , width, random(0, 22), 6);
translate(width/2, height/2 + 100, -200);
rotateZ(PI);
rotateY(ry);
scale(8);
fill(255, 255,0);
shape(chickenfoot);
ry += 0.03;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,151 @@
import oscP5.*;
import netP5.*;
import http.requests.*;
import peasy.*;
PeasyCam cam;
OscP5 oscP5;
float x; // global variable
float y;
float z;
int col;
float rot;
float rx;
float ry;
float rz;
int[] r = {3,5,8,13,21,34,55,89};
PShape chickenfoot;
//String urosC02;
JSONObject json;
JSONObject jsonchannel;
JSONArray totalData;
JSONArray nameData;
JSONArray chnameData;
JSONObject record;
int id;
String name;
String timeStamp;
int temp;
int co2;
float humidity;
int s; // seconds counter
PFont liberation;
PGraphics urosBuffer;
boolean urosDisplayed;
void setup() {
fullScreen(P3D);
colorMode(HSB, 255);
liberation = createFont("LiberationMono-Bold.ttf", 30);
frameRate(24);
smooth();
// SET OSC LISTEN FROM SUPERCOLLIDER
OscProperties properties = new OscProperties();
properties.setListeningPort(47120); // osc receive port (from sc)
oscP5 = new OscP5(this, properties);
}
// SET OSC RECEIVE HANDLES (FROM SUPERCOLLIDER PATTERNS)
void oscEvent(OscMessage msg) {
println("message: " + msg);
if (msg.checkAddrPattern("/mother1")) {
x = msg.get(0).floatValue(); // receive floats from sc
println("xxxx: " + x);
}
if (msg.checkAddrPattern("/mother2")) {
y = msg.get(0).floatValue(); // receive floats from sc
}
if (msg.checkAddrPattern("/rotation1")) {
z = msg.get(0).floatValue(); // receive floats from sc
}
}
////////////////////////////////////////////////////////
void draw() {
if (y < 5 ){
background(255, 0, 0);
stroke(0);
//background(123,44,234);
//background(0);
} else {
background(0);
stroke(255); }
// UROS
int s = second();
s = s - 60; // countdown timer
if (s==-1) { // every minute
thread("getUROS"); // threaded pull of UROS data from thingspeak
}
// scale(3);
//urosDrawData(); // draw the data into a imagebuffer
//if(urosDisplayed) { // use boolean to draw or not
//image(urosBuffer,0,0); // display the imageBuffer
// }
//////////////////////////////////////
//lights();
strokeWeight(2);
fill(255);
pushMatrix();
//translate(width/2, 0);
//rotateX(radians(22));
rect(width/12 * x, 0, r[int(random(8))], height, 6); // MOTHER 1 VERTICAL
popMatrix();
// if (y == 4){
//rotateX(PI*z/2);
// } else {
// rotateX(0);
//}
// VERTICAL SCALE DEGREE TRACKER
fill(255);
pushMatrix();
//rotateY(radians(45));
strokeWeight(2);
rect(0, (height/8) *-y +height*0.7 , width, r[int(random(8))], 6);
popMatrix();
// SPHERE //////////////////////////
pushMatrix();
translate(width *0.5, height * 0.5, 0);
rotateX(radians( ry ));
rotateY(radians( ry ));
rotateZ(radians( ry ));
strokeWeight(col % 2000 / 10);
noFill();
stroke(col%255, 100, 200);
sphereDetail(5);
sphere((col%1000 /10) * 150);
popMatrix();
// COUNTERS
ry += 0.06;
rx += 0.025;
rz += 0.5;
col += 4;
rot += 0.5;
}
// END //////////////////////////
////////////////////////////////////////////////////

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,198 @@
import oscP5.*;
import netP5.*;
import http.requests.*;
import peasy.*;
PeasyCam cam;
OscP5 oscP5;
float x; // global variable
float y;
float z;
float rx;
float ry;
float rz;
int[] r = {3,5,8,13,21};
PShape chickenfoot;
//String urosC02;
JSONObject json;
JSONObject jsonchannel;
JSONArray totalData;
JSONArray nameData;
JSONArray chnameData;
JSONObject record;
int id;
String name;
String timeStamp;
int temp;
int co2;
float humidity;
int s; // seconds counter
PFont liberation;
PGraphics urosBuffer;
boolean urosDisplayed;
void setup() {
fullScreen(P3D);
//cam = new PeasyCam(this, 100);
//cam.setMinimumDistance(50);
//cam.setMaximumDistance(500);
//// CREATE GRAPHICS BUFFER FOR UROS DATA
urosBuffer = createGraphics(600,300);
chickenfoot = loadShape("chicken.obj");
chickenfoot.setFill(color(200, 0, 0));
liberation = createFont("LiberationMono-Bold.ttf", 30);
frameRate(24);
smooth();
// SET OSC LISTEN FROM SUPERCOLLIDER
OscProperties properties = new OscProperties();
properties.setListeningPort(47120); // osc receive port (from sc)
oscP5 = new OscP5(this, properties);
}
// SET OSC RECEIVE HANDLES (FROM SUPERCOLLIDER PATTERNS)
void oscEvent(OscMessage msg) {
if (msg.checkAddrPattern("/sc3p5")) {
x = msg.get(0).floatValue(); // receive floats from sc
}
if (msg.checkAddrPattern("/mother2")) {
y = msg.get(0).floatValue(); // receive floats from sc
}
if (msg.checkAddrPattern("/rotation")) {
z = msg.get(0).floatValue(); // receive floats from sc
}
}
// UROS DATA ////////////////////////////////////////
void getUROS() {
// UROS DATA FROM THINGSPEAK
json = loadJSONObject("https://api.thingspeak.com/channels/1724587/feeds.json");
jsonchannel = loadJSONObject("https://api.thingspeak.com/channels/1724587channel.json");
totalData = json.getJSONArray("feeds");
for (int i = 0; i < totalData.size(); i++) {
record = totalData.getJSONObject(i);
id = record.getInt("entry_id");
timeStamp = record.getString("created_at");
temp = int(record.getString("field1"));
co2 = int(record.getString("field3"));
humidity = int(record.getString("field4")); }
}
void urosDrawData() {
//draw data direct to the buffer
//urosBuffer.scale(2);
urosBuffer.beginDraw();
urosBuffer.clear();
//size(222,111);
urosBuffer.background(0,0,0, 0.5);
urosBuffer.noFill();
//urosBuffer.fill(111);
//urosBuffer.rect(0,0, width/5, height/5);
urosBuffer.fill(0);
urosBuffer.textFont(liberation);
urosBuffer.text("Location: " + name, 30, 50);
urosBuffer.text("Time: " + timeStamp, 30, 100);
urosBuffer.text("Temperature (Celsius): " + temp, 30, 150);
urosBuffer.text("CO2 PPM: " + co2, 30, 200);
urosBuffer.text("Humidity (%rel): " + humidity, 30, 250);
urosBuffer.endDraw();
}
void drawTarget(float xloc, float yloc, float size, float num) {
float grayvalues = 255/num;
float steps = size/num;
ellipseMode(CENTER);
for (int i = 0; i < num; i++) {
fill(i*grayvalues);
ellipse(xloc, yloc, size - i*steps, size - i*steps);
}
}
////////////////////////////////////////////////////////
void draw() {
if (y == 3){
background(0);
} else {
background(255);
}
// UROS
int s = second();
s = s - 60; // countdown timer
if (s==-1) { // every minute
thread("getUROS"); // threaded pull of UROS data from thingspeak
}
// scale(3);
urosDrawData(); // draw the data into a imagebuffer
//if(urosDisplayed) { // use boolean to draw or not
image(urosBuffer,0,0); // display the imageBuffer
// }
//////////////////////////////////////
//scale(-3);
lights();
//println("rotation: ", z);
//rectMode(CORNERS);
//drawTarget(width/6 , (height/8) *-y + random(0,10) +height*0.7 , random(60, 1200), (y%8)+2);
//scale(7.5);
//rotateX(PI*z/6);
//drawTarget(width/12 * x, height/2, 222, x);
//drawTarget(width*0.75, y, 120, 6);
//background(x, x, x);
//println("POST: ", x);
// draw rect
//stroke(256-x/2, 256-x*abs(sin(x)), 256-x/4);
//sdtkeWeight(random(12));
fill(256-x/2, 256-x, 256-x*abs(sin(x)));
//translate(width/2, height/2);
//rotate(-x); //make recieve osc
//rect(x%64, x%64, x*abs(sin(x))%128, x*abs(sin(x))%128, 6);
//fill(random(255));
//rect(width/12 * x, 0, r[int(random(2))], height, 6);
//translate(width/2, 0);
if (y == 4){
rotateX(PI*z/2);
} else {
rotateX(0);
}
//rotateX(0.5);
fill(255);
//rect(0, (height/8) *-y +height*0.7 , width, random(0, 22), 6);
translate(width/2, height/2 + 100, -200);
rotateX(radians(rz));
rotateY(ry);
//rotateZ(rz);
scale(8);
fill(255, 255,0);
shape(chickenfoot);
ry += 0.02;
rx += 0.025;
rz += 0.15;
}

View File

@ -0,0 +1,168 @@
<!DOCTYPE patchbay>
<patchbay name="recording_jackpatchbay" version="0.9.1">
<output-sockets>
<socket name="system 1" client="system" type="jack-audio" exclusive="on">
<plug>capture_1</plug>
<plug>capture_2</plug>
<plug>capture_3</plug>
<plug>capture_4</plug>
</socket>
<socket name="system 3 4" client="system" type="jack-audio" exclusive="off">
<plug>capture_3</plug>
<plug>capture_4</plug>
</socket>
<socket name="system 2 3 4" client="system" type="jack-audio" exclusive="off">
<plug>capture_2</plug>
<plug>capture_3</plug>
<plug>capture_4</plug>
</socket>
<socket name="ardour sc4ch" client="ardour" type="jack-audio" exclusive="off">
<plug>SC\ 4CHAN\/audio_out\ 1</plug>
<plug>SC\ 4CHAN\/audio_out\ 2</plug>
<plug>SC\ 4CHAN\/audio_out\ 3</plug>
<plug>SC\ 4CHAN\/audio_out\ 4</plug>
</socket>
<socket name="gx_head_amp 1" client="gx_head_amp" type="jack-audio" exclusive="off">
<plug>out_0</plug>
</socket>
<socket name="gx_head_fx" client="gx_head_fx" type="jack-audio" exclusive="off">
<plug>out_0</plug>
<plug>out_1</plug>
</socket>
<socket name="SC2CH" client="SuperCollider" type="jack-audio" exclusive="off">
<plug>out_1</plug>
<plug>out_2</plug>
</socket>
<socket name="SC 3-4" client="SuperCollider" type="jack-audio" exclusive="off">
<plug>out_3</plug>
<plug>out_4</plug>
</socket>
<socket name="SuperCollider 4ch" client="SuperCollider" type="jack-audio" exclusive="off">
<plug>out_1</plug>
<plug>out_2</plug>
<plug>out_3</plug>
<plug>out_4</plug>
</socket>
<socket name="ardour master out" client="ardour" type="jack-audio" exclusive="off">
<plug>Master\/audio_out\ 1</plug>
<plug>Master\/audio_out\ 2</plug>
</socket>
<socket name="ardour sc stereo" client="ardour" type="jack-audio" exclusive="off">
<plug>SUPERCOLLIDER\/audio_out\ 1</plug>
<plug>SUPERCOLLIDER\/audio_out\ 2</plug>
<plug>SC\ GTR\/audio_out\ 1</plug>
<plug>SC\ GTR\/audio_out\ 2</plug>
</socket>
<socket name="ardour sc gtr" client="ardour" type="jack-audio" exclusive="off">
<plug>SC\ GTR\/audio_out\ 1</plug>
<plug>SC\ GTR\/audio_out\ 2</plug>
</socket>
<socket name="ardour MOTHER32 TOP" client="ardour" type="jack-audio" exclusive="off">
<plug>MOTHER32\ TOP\/audio_out\ 1</plug>
<plug>MOTHER32\ TOP\/audio_out\ 2</plug>
</socket>
<socket name="MOTHER32 BOTTOM" client="ardour" type="jack-audio" exclusive="off">
<plug>MOTHER32\ BOTTOM\/audio_out\ 1</plug>
<plug>MOTHER32\ BOTTOM\/audio_out\ 2</plug>
</socket>
<socket name="ardour metronome" client="ardour" type="jack-audio" exclusive="off">
<plug>Click\/audio_out\ 1</plug>
<plug>Click\/audio_out\ 2</plug>
</socket>
<socket name="SuperCollider MIDI 0" client="SuperCollider" type="alsa-midi" exclusive="off">
<plug>out0</plug>
<plug>out1</plug>
<plug>out2</plug>
<plug>out3</plug>
</socket>
<socket name="ardour fx bus 1" client="ardour" type="jack-audio" exclusive="off">
<plug>delay\/audio_out\ 1</plug>
<plug>delay\/audio_out\ 2</plug>
</socket>
</output-sockets>
<input-sockets>
<socket name="gx_head_amp" client="gx_head_amp" type="jack-audio" exclusive="off">
<plug>in_0</plug>
</socket>
<socket name="SuperCollider 2 3 4" client="SuperCollider" type="jack-audio" exclusive="off">
<plug>in_2</plug>
<plug>in_3</plug>
<plug>in_4</plug>
</socket>
<socket name="gx_head_fx 1" client="gx_head_fx" type="jack-audio" exclusive="off">
<plug>in_0</plug>
</socket>
<socket name="SC 4CH" client="SuperCollider" type="jack-audio" exclusive="off">
<plug>in_1</plug>
<plug>in_2</plug>
<plug>in_3</plug>
<plug>in_4</plug>
</socket>
<socket name="ardour gtrx input" client="ardour" type="jack-audio" exclusive="off">
<plug>\ GuitarX\/audio_in\ 1</plug>
<plug>\ GuitarX\/audio_in\ 2</plug>
</socket>
<socket name="ardour SC2CH IN" client="ardour" type="jack-audio" exclusive="off">
<plug>SUPERCOLLIDER\/audio_in\ 1</plug>
<plug>SUPERCOLLIDER\/audio_in\ 2</plug>
</socket>
<socket name="ardour SC GTR" client="ardour" type="jack-audio" exclusive="off">
<plug>SC\ GTR\/audio_in\ 1</plug>
<plug>SC\ GTR\/audio_in\ 2</plug>
</socket>
<socket name="ardour mother32s" client="ardour" type="jack-audio" exclusive="off">
<plug>MOTHER32\ TOP\/audio_in\ 1</plug>
<plug>MOTHER32\ BOTTOM\/audio_in\ 1</plug>
</socket>
<socket name="sc2chan" client="ardour" type="jack-audio" exclusive="off">
<plug>SUPERCOLLIDER\/audio_in\ 1</plug>
<plug>SUPERCOLLIDER\/audio_in\ 2</plug>
</socket>
<socket name="ardour sc4ch" client="ardour" type="jack-audio" exclusive="off">
<plug>SC\ 4CHAN\/audio_in\ 1</plug>
<plug>SC\ 4CHAN\/audio_in\ 2</plug>
<plug>SC\ 4CHAN\/audio_in\ 3</plug>
<plug>SC\ 4CHAN\/audio_in\ 4</plug>
</socket>
<socket name="ardour master in" client="ardour" type="jack-audio" exclusive="off">
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
</socket>
<socket name="system 1" client="system" type="jack-audio" exclusive="off">
<plug>playback_1</plug>
<plug>playback_2</plug>
<plug>playback_3</plug>
<plug>playback_4</plug>
</socket>
<socket name="UMC404HD\ 192k 1" client="UMC404HD\ 192k" type="alsa-midi" exclusive="off">
<plug>UMC404HD\ 192k\ UMC404HD\ 192k\ MID</plug>
</socket>
<socket name="MidiSport\ 4x 1" client="MidiSport\ 4x4" type="alsa-midi" exclusive="off">
<plug>MidiSport\ 4x4\ MIDI\ 1</plug>
<plug>MidiSport\ 4x4\ MIDI\ 2</plug>
<plug>MidiSport\ 4x4\ MIDI\ 3</plug>
<plug>MidiSport\ 4x4\ MIDI\ 4</plug>
</socket>
</input-sockets>
<slots/>
<cables>
<cable type="jack-audio" input="gx_head_amp" output="system 1"/>
<cable type="jack-audio" input="ardour mother32s" output="system 3 4"/>
<cable type="jack-audio" input="SuperCollider 2 3 4" output="system 2 3 4"/>
<cable type="jack-audio" input="gx_head_fx 1" output="gx_head_amp 1"/>
<cable type="jack-audio" input="SC 4CH" output="gx_head_fx"/>
<cable type="jack-audio" input="ardour gtrx input" output="gx_head_fx"/>
<cable type="jack-audio" input="ardour SC2CH IN" output="SC2CH"/>
<cable type="jack-audio" input="ardour SC GTR" output="SC 3-4"/>
<cable type="jack-audio" input="ardour sc4ch" output="SuperCollider 4ch"/>
<cable type="jack-audio" input="system 1" output="ardour master out"/>
<cable type="jack-audio" input="ardour master in" output="ardour sc stereo"/>
<cable type="jack-audio" input="ardour master in" output="ardour sc gtr"/>
<cable type="jack-audio" input="ardour master in" output="ardour MOTHER32 TOP"/>
<cable type="jack-audio" input="ardour master in" output="MOTHER32 BOTTOM"/>
<cable type="jack-audio" input="system 1" output="ardour metronome"/>
<cable type="alsa-midi" input="MidiSport\ 4x 1" output="SuperCollider MIDI 0"/>
<cable type="jack-audio" input="ardour master in" output="ardour fx bus 1"/>
</cables>
</patchbay>

61
sc/midimother.scd 100644
View File

@ -0,0 +1,61 @@
"/home/rob/gtr/motherMIDISetup.scd".load;
TempoClock.default.tempo = 60/60;
~host = NetAddr("localhost", 4859); // address de PROCESSING
Pfunc
~xx = (
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_1_CC).play(quant:4); // CC 1
Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
Pdef(\m_2_CC).play(quant:4); // CC 1
)
Pdef(\m_1).stop; // NOTEON
Pdef(\m_1_CC).stop;
Pdef(\m_2).stop; // NOTEON
Pdef(\m_2_CC).stop;
////////////////////////////////////////
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_1_CC).play(quant:4); // CC 1
Pdef(\m_1).stop; // NOTEON
Pdef(\m_1_CC).stop;
// --------------- /
Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
Pdef(\m_2_CC).play(quant:4); // CC 1
Pdef(\m_2).stop; // NOTEON
Pdef(\m_2_CC).stop;
//////////////////////////////
Pbindef(\m_1,\scale,~s1,\degree,~d4,\dur,~r1,\octave,~o2, \mtranspose,0);
Pbindef(\m_2,\scale,~s1,\degree,~d4,\dur,~r2,\octave,~o2, \mtranspose,0);
// indiviudal controls //////////////
Pbindef(\m_1, \root, 4); Pbindef(\m_2, \root, 4);
Pbindef(\m_1, \mtranspose, 0); Pbindef(\m_2, \mtranspose, 0);
Pbindef(\m_1, \scale, ~s1 ); Pbindef(\m_2, \scale, ~s1);
Pbindef(\m_1, \octave, ~o0); Pbindef(\m_2, \octave, 2);
Pbindef(\m_1, \dur, ~r4); Pbindef(\m_2, \dur, ~r0);
Pbindef(\m_1, \degree, ~ddd); Pbindef(\m_2, \degree, ~ddd);
(
var a;
a = Pfunc({
//exprand(0.1, 0.3) + #[1, 2, 3, 6, 7].choose
~host.sendMsg("/sc3p5", rrand(1,100).asFloat); // send OSC message to P5
}).asStream;
{
a.do { |val|
~host.sendMsg("/sc3p5", rrand(1,100).asFloat); // send OSC message to P5
//Synth(\help_sinegrain, [\freq, val * 100 + 300]);
0.02.wait;
}
}.fork;
)

View File

@ -0,0 +1,77 @@
/*RUN*/
"/home/rob/gtr/motherPatterns.scd".load;
MIDIClient.init;
~m32_1 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 1").latency_(Server.default.latency);
~m32_2 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 2").latency_(Server.default.latency);
// setup of mother 32 noteon events
Pdef(\m_1, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1)).play(quant: 4);
Pdef(\m_2, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2)).play(quant: 4);
// CC Control Message 1 ---> TOP Mother32 ASSIGN OUT
( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1,
\ctlNum, 1, \control, Pexprand(72,127, inf), \dur, ~r1)).play(quant:4));
// CC Control Message 1 ---> BOTTOM Mother32 ASSIGN OUT
Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(77,127, inf), \dur, 1/8 )).play(quant:4);
///////////////////////////////////
//Pdef(\processing, Pfunc { ~host.sendMsg("/sc3p5", rrand(1,256).asFloat);}).play(quant: 4);
//~host.sendMsg("/sc3p5", rrand(1,256).asFloat);
//https://sc-users.bham.ac.narkive.com/75iSw2f6/sending-osc-commands-instead-of-trigger-synths-with-patterns
n = NetAddr("127.0.0.1", 47120);
//{50.do {n.sendMsg("/test",200.rand,200.rand);0.2.wait;}}.fork;
( Event.addEventType(\processingOSC, { | server |
var processingOscServer = NetAddr("192.168.178.166", 47120);
//var processingOscServer = NetAddr("127.0.0.1", 47120);
var notes = [~degree.value, ~ctranspose.value, ~velocity.value,
~sustain.value, ~lag.value, ~timingOffset.value].flop;
var bndl;
var timeNoteOn, timeNoteOff;
//processingOscServer.sendMsg("/test",200.rand,200.rand);
//processingOscServer.sendMsg("/sc3p5",200.rand, 200.rand);
notes.do {|note|
processingOscServer.sendMsg("/sc3p5", note[0].asFloat); // send OSC message to P5
processingOscServer.sendMsg("/mother2", note[1].asFloat); // send OSC message to P5
//processingOscServer.sendMsg("/mother1", 1920.rand);
//processingOscServer.sendMsg("/mother2", 1080.rand);
//processingOscServer.sendMsg("/sc3p5", rrand(1,256).asFloat);
// sustain and timingOffset are in beats, lag is in seconds
//timeNoteOn = (thisThread.clock.tempo.reciprocal*note[5])+note[4];
//timeNoteOff =
//(thisThread.clock.tempo.reciprocal*(note[3]+note[5]))+note[4];
//{processingOscServer.sendMsg("/renoise/trigger/note_on", -1, -1,
//(note[0]+note[1]).asInt, note[2].asInt)}.defer(timeNoteOn);
//{processingOscServer.sendMsg("/renoise/trigger/note_off", -1, -1,
//(note[0]+note[1]).asInt)}.defer(timeNoteOff);
}
});
)
( Pdef(\processingA, Pbind(*[ type: \processingOSC,
dur: 1/8, degree: Pseq([2,5,12,200,600,900,1000], inf), ]); ))
( Pdef(\processingB, Pbind(*[ type: \processingOSC,
dur: 1/8, ctranspose: Pseq([2,5,12,300,600,900], inf), ]); ))
Pdef(\processingA).play(quant: 4); // TOP MOTHER
Pdef(\processingA).stop;
Pdef(\processingB).play(quant: 4); // TOP MOTHER
Pdef(\processingB).stop;

View File

@ -0,0 +1,192 @@
/*RUN*/
~s0 = Scale.harmonicMinor;
~s1 = Scale.melodicMinor;
~s2 = Scale.gong;
~s3 = Scale.whole;
~s4 = Scale.chromatic;
~d0 = Pn(Pseries(0, 1, 2), inf);
~d1 = Pn(Pseries(0, 1, 3), inf);
~d2 = Pn(Pseries(0, 4, 9), inf);
~d3 = Pn(Pseries(0, 1, 11), inf);
~d4 = (Pexprand(1, 8, inf) - 1).round;
~d5 = Pwrand([Pseries(0,1,inf)],[15,20,3,4,5].normalizeSum, inf);
// repeat patterns
~d6 = Pclutch(~d4, Pseq(#[0,0,0,0,0,0,0,0,1,1,1,1,1],inf));
~d7 = Pstutter(Prand([1, 2, 5], inf), Pwhite(-1.0, 1.0));
//c = Pstutter(3, Pxrand([1, 2, 3], inf) * 4 + 65);
~d8 = Pseq([0,6,2,4,1,3,3,7,5,11]); // ground bass
~d9 = Prand([1,3,5,7],8);
~d10 = Pseq([2,4,6,8],8);
~d11 = Prand([0,2,4,6],8);
~d12 = Pseq([3,5,7,9],8);
~ddd = Pseq([~d9, ~d10, ~d11, ~d12],inf);
/////////////////////////////////////////////////
~rx0 = Pwrand([1/8, 1/4, 1/2, 2],[80,50,20,20].normalizeSum, 1);
~rx1 = Pwrand([1/8, 1/4, 1/2, 2],[80,50,20,20].normalizeSum, 1);
~rx2 = Pwrand([1/8, 1/4, 1/2, 2],[80,50,20,20].normalizeSum, 1);
~rx3 = Pwrand([1/8, 1/4,],[90,30, 10, 0].normalizeSum, 1);
~rx3 = Pxrand([
1/8,
1/4,
1/2,
1/8,
1
],1);
///////////////////////
~r16 = Pseq([
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
1/16,
],1);
~r01 = Pseq([
1/8,
Rest(1/8),
Rest(1/8),
Rest(1/8),
Rest(1/8),
Rest(1/8),
Rest(1/8),
Rest(1/8),
],1);
~r02 = Pseq([
1/8,
Rest(1/8),
Rest(1/8),
Rest(1/8),
1/8,
Rest(1/8),
Rest(1/8),
Rest(1/8),
],1);
~r03 = Pseq([
1/8,
1/8,
1/8,
Rest(1/8),
1/8,
1/8,
1/8,
Rest(1/8),
],1);
~r04 = Pseq([
Rest(1/8),
1/8,
1/8,
1/8,
Rest(1/8),
1/8,
1/8,
1/8,
],1);
~rrr = PatternProxy.new;
~rr = PatternProxy.new;
~rr.source = Pxrand([~r01,~r02, ~r03, ~r04],inf);
~rrr.source = Pxrand([~r0,~r0, ~r0, ~r02],inf);
~rr.source = Prand([~r03,~r04, ~r0, ~r0],inf);
~rrr.source = Prand([~r03,~r03,~r02, ~r4],inf);
~rs = Pseq([
Pseq([~rx0],32),
Pseq([~rx1],32),
Pseq([~rx2],32),
Pseq([~rx3],32),
Pseq([~r03],8),
Pseq([~r04],8),
Pseq([~r0],8),
Pseq([~r0],8),
Pseq([~r04],8),
Pseq([~r16],8),
Pseq([~r0],inf),
],inf);
~rb = Pseq([
Pseq([~rx0],32),
Pseq([~rx1],32),
Pseq([~rx2],32),
Pseq([~rx3],32),
Pseq([~r03],8),
Pseq([~r04],8),
Pseq([~r0],8),
Pseq([~r0],8),
Pseq([~r04],8),
Pseq([~r16],8),
Pseq([~r0],inf),
],inf);
/////////////////////////////// OCTAVISATION PATTERNS
~oo = PatternProxy.new;
~ooo = PatternProxy.new;
~o0 = Prand([5], inf);
~o1 = Prand([2,3], inf);
~o2 = Prand([3,4,5], inf);
~o3 = Pwrand([3,4,5,6,7],[15,20,3,4,5].normalizeSum, inf);
~o = Pseq([
Pxrand([4,5,6], 32),
Pseq([5,6,7], 32),
Pseq([4,7], 32),
Pxrand([4,5,6,7], 32),
] , inf);
~oo.source = ~o;
~o = Pseq([
Pseq([8], 32),
] , inf);
/////////////////////////////////////////////////////
~r1 = 1/4;
~r2 = Pwrand([0.25, Rest(0.75), 1], [0.6, 0.2, 0.2], inf);
~r3 = Pwrand(#[0.25, 0.5, 0.75, 4], #[0.4, 0.3, 0.2, 0.1], inf);
~r4 = 8;
~r5 = Pwrand([Pseq([1/8,1/8,1/8,1/8,1/8, Rest(3/8), Rest(1)],2), 0.25, 0.5, 0.75, 4],
#[0.05, 0.4, 0.3, 0.2, 0.05], inf);
~r6 = Pwhite(1, 6, inf) * 0.125;
~triplet = Pseq([1,1,1,1,5] , 1) / 5 ;
~white = Pwhite(1, 6, 5) * 0.125;
~sync8th = Pseq([Rest(1/8), 1/8] , 4);
~sixteen = Pseq([1/Pwhite(5,10,Pwhite(4,7))], Pwhite(1,2));
~long = Pwhite(1,5,1) / 3;
~rest = Rest(2);
~phrase = Pxrand([~white, ~sync8th, ~sixteen, ~long, ~rest, ~rest+0.7], inf);
//////////////////////////////////////////////////////

View File

@ -0,0 +1,71 @@
// quasi-extended serialism
Pbindef(\m_1, \scale,~s4,\degree,~d6,\octave,~o3,\dur,~phrase);
Pbindef(\m_2, \scale,~s4,\degree,~d6,\octave,~o1,\dur,~phrase);
// chiptune minmalismo in melodic minor /////////////////////////////// r 0,1,3
~s1 = Scale.melodicMinor;
//c = Place(#[0, 0, [0, 4, 7], [1, 5, 8], [2, 6, 9]], inf) + 67;
~op1 = Scale.new(#[4,5,1,3,0,2,8,9,10,6,7,11], name: "op27_I");
Pbindef(\m_1, \scale,~s1,\degree,~d4,\octave,7,\dur,~rrr );
Pbindef(\m_2, \scale,~s1,\degree,~d4,\octave,~o3,\dur,~rrr );
(
p = Pn(Plazy {
Pbindef(\m_1, \scale,~s1,\degree,~d4,\octave,rrand(3,8),\dur,1/8 )
},3).play
)
( a = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\scale,~s1,\degree, Pseq([0,1,2,3,4,5], 4), \octave, 5, \dur,1/8)
).asStream;
( b = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\scale,~s1, \degree,Pseq([0,1,2,3,4,5,6,7,8], 4), \octave,3, \dur,1/8)
).asStream;
Prand([a,b],inf).play;
Ppar
//////////////////////////////////
~d = Pseq((0..7), inf);
~r = Place([1/8, 1/4, 1/8, 1/8, [1/4,1,2]], inf);
~op1 = Scale.new(#[4,5,1,3,0,2,8,9,10,6,7,11], name: "op27_I");
Pbindef(\m_1, \scale,~op1,
\degree,~d,
\octave,7,
\dur, ~r
);
Pbindef(\m_2, \scale,~op1,
\degree,~d,
\octave,~o3,
\dur, ~r
);
//////////////////////////////////////

View File

@ -0,0 +1,40 @@
// variation for piano webern op27 mvt3
// sustain ON - decay full
//~row0 = [3, 11, 10, 2, 1, 0, 6, 4, 7, 5, 9, 8];
~s3 = Scale.whole;
~s4 = Scale.chromatic;
TempoClock.default.tempo = 60/60;
~op = Scale.new(#[3, 11, 10, 2, 1, 0, 6, 4, 7, 5, 9, 8], name: "op27_III");
~op1 = Scale.new(#[4,5,1,3,0,2,8,9,10,6,7,11], name: "op27_I");
~vfp3 = Pseq(~row0, 4);
~vfp3_reverse = Pseq(~row0.reverse, 4);
~vfp2 = Pseq((0..11), 1);
~vfp2_reverse = Pseq((11..0), 1);
~fib = Pseq([2,3.5,8,13,21], 4); // four interations of fibonnaci duration sequence
~fibr = Pseq([2,3.5,8,13,21].reverse, 4); // counterpoint rhythmic inversion
// change from dur 8 to ~fib
Pbindef(\m_1, \dur, ~fib, \octave, 7, \scale,~op1, \degree,~vfp2, inf);
Pbindef(\m_2, \dur, ~fibr, \octave, 2, \scale,~op1, \degree,~vfp2_reverse, inf);
( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1,
\ctlNum, 1, \control, Pexprand(77,127, inf) ,\dur, 1/16)).play(quant:4));
Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(77,127, inf), \dur, 1/16 )).play(quant:4);
Pdef(\m_1).play(quant: 4); Pdef(\m_1_CC).play(quant:4); // TOP MOTHER
Pdef(\m_2).play(quant: 4); Pdef(\m_2_CC).play(quant:4); // BTM MOTHER NOTEON
Pdef(\m_1).stop; Pdef(\m_1_CC).stop;
Pdef(\m_2).stop; Pdef(\m_2_CC).stop;

View File

@ -0,0 +1,185 @@
//// MINIMAL BAROQUE GROOVE
~r0 = Pn(1/8, 16);
TempoClock.default.tempo = 60/60;
TempoClock.default.tempo = 30/60;
~rx0 = Pwrand([1/8, 1/4, 1/2, 4],[80,50,20,20].normalizeSum, 1);
~rx1 = Pwrand([1/8, 1/4, 1/2, 1],[80,50,20,20].normalizeSum, 1);
~rx2 = Pwrand([1/8, 1/4, 1/2],[80,50,20].normalizeSum, 1);
~rx3 = Pwrand([1/8, 1/4],[90,30].normalizeSum, 1);
~rs = Pseq([
/* Pconst(32, Pseq([~rx0],inf)),
Pconst(32, Pseq([~r3],inf)),
Pconst(32, Pseq([~r3],inf)),
Pconst(32, Pseq([~r04],inf)),*/
Pconst(64, Pseq([~r0],inf)),
/*Pconst(32, Pseq([~rx0],inf)),
Pseq([~rx2],32),
Pseq([~rx3],32),
Pseq([~r03],8),
Pseq([~r04],8),
Pseq([~r0],8),
Pseq([~r0],8),
Pseq([~r04],8),
//Pseq([~r16],8),
Pseq([~r0],inf),*/
],inf);
~rb = Pseq([
/* Pconst(32, Pseq([~rx0],inf)),
Pconst(32, Pseq([~r0],inf)),
Pconst(32, Pseq([~r04],inf)),
Pconst(32, Pseq([~r03],inf)),*/
Pconst(64, Pseq([~r0],inf)),
//
// Pseq([~rx0],32),
// Pseq([~rx1],32),
// Pseq([~rx2],32),
// Pseq([~rx3],32),
//
// Pseq([~r03],8),
// Pseq([~r04],8),
// Pseq([~r0],8),
// Pseq([~r0],8),
// Pseq([~r04],8),
// //Pseq([~r16],8),
// Pseq([~r0],inf),
],inf);
~s0 = Scale.harmonicMinor;
~s1 = Scale.melodicMinor;
~s2 = Scale.gong;
~s3 = Scale.whole;
~s4 = Scale.chromatic;
~bassroot = Pseq([0,4,2,3,1,4, 0],1);
~bassroot16 = Pdup(32, Pseq([0,4,2,3,1, 4,0],1));
~d0 = Pxrand([0,2,4,6],32);
~d1 = Pxrand([1,3,5,7], 32); // 1 bar
~d2 = Pseq([2,4,6,8], 8);
~d3 = Pseq([3,5,7,9],8);
~d4 = Pseq([4,6,8,10],8);
~dseq = Pseq([
Pn( ~d0, 1),
Pn( ~d4, 1),
Pn( ~d2, 1),
Pn( ~d3, 1),
Pn( ~d1, 1),
Pn( ~d4, 1),
Pn( ~d0, 1),
], 1);
Pbindef(\m_2, \octave, ~o1);
Pbindef(\m_2, \degree, ~bassroot16);
n = NetAddr("192.168.178.166", 47120);
n.sendMsg("/mother1", 200.rand.asFloat );
// e harmonic minor
Pbindef(\m_1, \root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o1, \dur,~rb,
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
postln(e[\degree]);
postln(e[\octave]);
},
);
Pbindef(\m_2, \root, 4, \scale,~s2, \degree, ~bassroot16, \octave, 3, \dur,~rb,
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
\rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat ); },
);
/// try
var a, b, r ,t, q , w;
a = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o1, \dur,~rb,
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
postln(e[\degree], e[\octave]);
},
);
b = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
\root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o3, \dur,~rb,
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
postln(e[\degree], e[\octave]);
},
);
q = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o1, \dur,~rb,
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
postln(e[\degree], e[\octave]);
},
);
w = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o3, \dur,~rb,
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
postln(e[\degree], e[\octave]);
},
);
r = Pseq( [a,b,a,b], 1);
t = Pseq( [w,q,w,q], 1);
z = Ppar( [r,t], inf ).play;
z.stop;
z.start;
z.pause;
z.resume;
///
Pbindef(\m_1, \degree, ~dseq);
Pbindef(\m_2, \degree, ~dseq);
Pbindef(\m_2, \degree, ~bassroot16);
Pbindef(\m_1, \octave, 3);
Pbindef(\m_1, \octave, ~o3);
Pbindef(\m_1, \scale, ~s0);
Pbindef(\m_2, \scale, ~s0);
Pbindef(\m_2, \octave, ~o1);
Pbindef(\m_2, \octave, ~o2);
Pbindef(\m_2, \octave, ~o1);
// CC Control Message 1 ---> TOP Mother32 ASSIGN OUT
( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1,
\ctlNum, 1, \control, Pexprand(50,127, inf),\dur, 1/16)).play(quant:4));
// CC Control Message 1 ---> BOTTOM Mother32 ASSIGN OUT
Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(77,127, inf), \dur, 1/8 )).play(quant:4);
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
Pdef(\m_1).stop;
Pdef(\m_2).stop;

View File

@ -0,0 +1,69 @@
//Pdup
// rhinosorous ///////////////////////////////////
TempoClock.default.tempo = 70/60;
~durs = [1/16,1/8, 3/16, 1/4, 1/3, 3/8, 1/2, 5/8, 2/3, 3/4, 7/8, 1, 5/4, 2]; //16 beats
~wdurs = Pwrand([1/8, 1/4, 1/3, 1/2, 2, 6, 10, Rest(1)],[50, 30, 20, 10, 35, 20 ,10, 30].normalizeSum, inf);
~wdurs1 = Pwrand([1/16, 1/8, 1/6, 1/4, 1],[50, 30, 20, 10, 20].normalizeSum, inf);
~drnd1 = Pconst(16, Pxrand(~durs, ~durs.size)); // 16 beats of rnd durs
~dgauss0 = Pfindur(16, Pgauss(0,1, inf) );
~op = Scale.new(#[3, 11, 10, 2, 1, 0, 6, 4, 7, 5, 9, 8], name: "op27_III");
~df = Pseq([1,1,3,1,1,1,5,1,2,1,8,1,13],1);
// Place([Pn(1/8, {[2,5,8,13].choose}), 1, [3,5,8,13], Rest(1) ], 4),
~durpat = Pseq([ // .sum to check
//1,1,3,1,1,1,5,1,2,1,8,1,13, // 13 events
//Pconst(32, ~wdurs), // 32 beats / 8 bars
//Ppatlace([
//Place([Pn(1/8, { [2,5,8,13].choose }), 1, [3,5,8,13], Rest(1) ], 4),
// INSTALL NEW SUPERCOLLIDER FOR PDUP
//Pdup(Pseq([2,3,5,8],inf), Pseq([1/8, 1/3, 1/5, 1/8],inf)),
Pdup(Pseq([2,3,5,8],inf),
Pseq([
Place([1/8, 1/3, 1/5, [1/8, 1/2, 1/16, 1/4] ], 4 ) ],inf )),
//Place([ Prand( [13,5], 3), 1/8, 1, [3,5,8,13], Rest(1) ] , 4).trace,
//1,1,3,1,1,1,5,1,2,1,8,1,13, // 13 events
//Pseq([1/2, 1/2, 1/2, 1/6, 1/6, 1/6, 5], 4), // 28
//Pseq([1/6,1/6,1/6,1/6,1/6,1/6, 3], 4), // 16
//Pconst(21, Pseq([5,3,5,8],1)),
Rest(8)
], 1);
~octptn = Pseq([
Pfin(13, Pn(4,inf)),
Pconst(32, Pn(6,inf)),
Pconst(32, Pn(3, inf)),
Pfin(13, Pn(4,inf)),
Pconst(28, Pn(7,inf)),
Pconst(16, Pn(5,inf)),
Pconst(21, Pn(4,inf)),
], inf);
~prime = Pseq( (0..11) , 1);
~retro = Pseq( (11..0) , 1);
~melodyA = Pseq([~prime, ~prime, ~retro], inf);
~melodyB = Pseq([~prime, ~retro, ~prime], inf);
Pbindef(\m_1, \dur, ~durpat, \octave, ~octptn, \scale, ~op, \degree,~melodyA);
Pbindef(\m_2, \dur, ~durpat, \octave, 3, \scale,~op, \degree,~melodyB);
//Pchain
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_2).play(quant: 4); // TOP MOTHER
Pdef(\m_1).stop;
Pdef(\m_2).stop;
////////////////////////////////////

View File

@ -0,0 +1,31 @@
/// SERIAL NOISE INJECTION
// VCF MOD 11oc SUS ON DECAY 9oc
// NOISE MIX UP
~d = Place([0,0,0,0,0,0,0,1,2,3, [0,1,2,3], [2,3,4], 5,6,7, [8,9,10,11], 11,11,11,11,11 ], inf);
~r = Place([1/8, 1/8, 1/8, 1/8, [1/4,1/2, 1, Pn(1/8, 16) ], [1/6, 6] ], inf);
~op1 = Scale.new(#[4,5,1,3,0,2,8,9,10,6,7,11], name: "op27_I");
Pbindef(\m_1, \scale,~op1,
\degree,~d,
\octave, 6,
\dur, ~r
);
Pbindef(\m_2, \scale,~op1,
\degree, ~d,
\octave, Pseq([
Pconst(32, Pn(2,inf)),
Pconst(32, Pn(3,inf))], inf),
\dur, ~r
);
( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1,
\ctlNum, 1, \control, Pexprand(77,127, inf) ,\dur, 1/16)).play(quant:4));
Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(90,127, inf), \dur, 1/16 )).play(quant:4);
//////////////////////////////////////

View File

@ -0,0 +1,67 @@
TempoClock.default.tempo = 30/60;
~drepeat = Pseq([
Pseq([0],16),
Pseq([7,8,9],4),
Pseq([9],16),
Pseq([1,3,5],5),
Pseq([2],16),
Pseq([8],16),
Pseq([10,9,4],6),
Pseq([10],16),
Pseq([10,11],8),
], 4);
~rp0 = 1/8;
~rp1 = Pseq([
1/8,
1/8,
1/16,
1/16,
1/16,
1/16,
1/8,
1/8,
1/16,
1/16,
1/16,
1/16 ], 1);
~rp2 = Pseq([
1/8,
1/8,
1/16,
1/16,
1/16,
1/16,
1/8,
1/8,
Rest(1)
],1);
~pr = Pseq([
Pseq([~rp0],16),
Pseq([~rp2],4),
Pseq([~rp0],16),
Pseq([~rp2],1),
Pseq([~rp1],4)],
4);
~pr2 = Pseq([
Pseq([~rp2],4),
Pseq([~rp0],16),
Pseq([~rp0],16),
Pseq([~rp2],1),
Pseq([~rp1],4)],
4);
Pbindef(\m_1, \scale,~s4,\degree,~drepeat,\octave, ~o1,\dur, ~pr );
Pbindef(\m_2, \scale,~s4,\degree,~drepeat,\octave, ~o3,\dur, ~pr2 );
Pbindef(\m_1, \octave, 4, \dur, ~r0 );
Pbindef(\m_2, \octave, 6, \dur, ~r0 );
/////////////////////////////////////////////////////

View File

@ -0,0 +1 @@
rfcomm bind 0 10:97:BD:36:D6:4E

View File

@ -0,0 +1 @@
node wavey-wind/server.js /dev/rfcomm0

View File

@ -0,0 +1,4 @@
# turn on bluetooth device
blueman-manager &
sleep 1;
killall blueman-manager blueman-applet;

46
setup/go.sh 100755
View File

@ -0,0 +1,46 @@
#! /bin/bash
BTDEV=/dev/rfcomm0;
# kill any exsisting jack ghosts
#killall -9 jackd qjackctl
# turn on bluetooth device
blueman-manager &
sleep 1;
killall blueman-manager;
## bind bluetooth to /dev/rfcomm0
## requires password / sudo
if test -e $BTDEV ; then
echo "BLUETOOTH ALREADY BOUND!"
else gnome-terminal --title=BLUDETOOTHBIND -- rfcomm bind 0 10:97:BD:36:D6:4E;
fi;
# start jackd
if [ $(pidof jackd) ] ; then
echo "jackd ALREADY RUNNING"
else echo "starting jackd"; gnome-terminal --title=JACKD SERVER -- su -c ./start_jackd.sh rob;
fi;
sleep 1;
# start node server
echo "starting wavey wind" ;
gnome-terminal --title=NODE SERVER -- node wavey-wind/server.js /dev/rfcomm0 &&
echo "starting supercollider" ;
sh -c 'su -c 'scide gtr.scd' rob &&' ;
# start guitarix
if [ $(pidof guitarix) ] ; then
echo "GUITARIX ALREADY RUNNING"
else echo "starting guitarix"; sh -c 'su -c "guitarix" rob' ;
fi;
echo "making jack connections" ;
su -c jack_connect system:capture_1 gx_head_amp:in_0 rob &&
su -c jack_connect gx_head_fx:out_0 SuperCollider:in_1 rob &&

29
start_all_apps.sh 100755
View File

@ -0,0 +1,29 @@
kill `pidof ardour-7.2.0~ds0`
killall -9 qjackctl jackd guitarix sclang scide;
/usr/bin/jackd -aa -u -dalsa -r44100 -p256 -n3 -D -Chw:U192k -Phw:U192k &
sleep 1;
guitarix &
# sclang -D gtr.scd &
scide gtr.scd &
gnome-terminal --title=NODE SERVER -- sh ./setup/comms_start.sh &
sleep 4;
rm recordings/ardour/gtr-2022-11-28-15-07-41/*.bak &
rm recordings/ardour/gtr-2022-11-28-15-07-41/*.history &
ardour recordings/ardour/gtr-2022-11-28-15-07-41/gtr-2022-11-28-15-07-41.ardour &
sleep 5;
qjackctl &