LFSaw added code 'MIDIFile player with CC capability'

Play a midi file and include CC value changes. Code taken from sc-users mailinglist.

http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/simpleMIDIfile-play-via-MIDIOut-including-CC-td7632193.html

julian.rohrhuber commented on 'Ambience Maker'

(sorry, bad layout, I don't know how to fix an existing comment)

julian.rohrhuber commented on 'Ambience Maker'

Btw we can write:

``` Ndef(\ambienceMaker).addSpec( \rWet, [-1, 1, \lin], \rateRedux, [0, 1], \bits, [1, 32, \lin], \bpWet, [0, 1, \lin], \bpFreq, \freq, \bpRq, [0, 2, \lin], \hpnoise, [-48, 0, \db], \white, [-48, 0, \db], \pink, [-48, 0, \db], \brown, [-48, 0, \db], \gray, [-48, 0, \db], \dust, [-48, 0, \db], \dustDensity, [1, s.sampleRate/2, \exp],

\drops, [-48, 0, \db],
\dropDensity, [1, s.sampleRate/2, \exp],
\dropDecay, [0.001, 1, \exp],
\dropFFreq, \freq,
\dropFRq, [0, 2, \lin]

); ```

Note on Azimuth #3 Concert : a new piece for 32 channels

Rough view of Azimuth #3 setup

Few months ago, I was invited to present a piece for 32 channel system of Azimuth foundation. Azimuth foundation(http://www.azimuthfoundation.net) is an organization of musicians/composers that organize concerts with their multichannel system that its configuration varies every edition. This time, they offered 32 channels: 8 circle outside, 4 quadra up and down at the corners of the hall, 8 circular center up, and down.

Then I thought I must write a new piece for it, although I didn’t have so much time left at the moment. I didn’t want to re-arrange an old piece that is written for a different system as this specific configuration can offer a number of interesting ideas to make a sound journey.

As I have been writing a lot for the WFS system (192 loudspeakers), my brain worked automatically the way I used to when writing for the WFS, which… could be described like : considering the whole space as an opened one, and creating my own ‘drawings.’

It wasn’t too long to realize that I was wrong in my approach, as this system is quite a different one. It is more like a ‘interwoven’ space that is made with a mixed up of different system(quad+multiple octa, and even stereos), accordingly different capacities. I couldn’t say that it is for a diffusion, nor for a spatialization. Rather a mixture of those two, especially with the setup in the center, speakers directing toward the audience, from up to down.

The speakers in the center, 8 up and 8 down toward the audience

The idea had to follow up of the ideal of the speaker setup. Then my composition should have to make sense as well. Then I thought it will be a good idea to have two specific ‘motions’ work together: 1. Some sound sources that are alive, moving, and having strong identities. 2. Clouds that are diffuse and support those main actors.

Previously, actually long time ago, I wrote a series of pieces for the WFS system, called ‘Enfolding Plane(I and II).’ Those are the pieces that I composed in order to study fully what the WFS could do with a variety of different spatial figures, of course with different sound materials. I thought it might be a good idea to add another piece into the series this time, so that I put ‘Enfolding Plane III’ title and gave a subtitle into it, which was ‘Punky Pulse Pool.’

I imagined a giant pool that several selfish pulse-character sounds are trying to occupy the space. It is rather a political fight than a violent one (as sometimes it could end up like that). I created a simple theme with pulse wave that has a small gesture, and started manipulate it into a variety of ways (I called it ‘variations’ in my program note). I had over 200 babies that came out from the theme. I was thinking of categorizing them first, then I thought, why not just trying to listen to them all together. Just out of curiosity.

I randomly placed (threw) all the sound files within 15 minutes time, listened to them, and then I hear a giant mass. (That was the moment that I made the title.) From there, without actually moving the sound files in time, I started cut them off. In other words, I started sculpting it, revealing what’s hidden, and sometimes hiding what’s representative. During this process, I also made decisions of where each sounds or parts of sounds should go and do. Are they staying? Moving? Diffuse? Heavy? Light? Slow? Fast? Overwhelming? Passing by? Supporting? Leading? Timid? And so on.

Localization of sounds is indicated with different colors

After that I moved the result into the WFS Collider, and then I gave them color marks based on my decisions in order to remember and to create the final tracks, and made note of it. This process took quite long. Longer than creating all the sounds.

The tricky part was the fact that I can’t test this in my studio. I wish I had 32 channels myself to try it out but well, I had to use fully my imagination.

Then I made a virtual setup that is similar to the original with the WFSCollider, the software for the WFS system, which, as I mentioned earlier, allows you to create your own space. Then I could have a bit of perspectives how it might sound.

Always very exciting to go for the first tryout with the actual system. This time wasn’t an exception. The most difficult part is to balance all the speakers as they are with different capacity/character. As it was the first time of listening, I spent most of the time making the balance.

Azimuth #3 Concert (22,Apr,2017)

The performance went well. A number of audience of course make the sound quite different, but it was alright. The difference between the WFS and this setup (or course there are many different aspects but if I mention as a biggest part of it) is how the chunk(mass) of sounds is heard; WFS is very good with a sound mass with vivid individuals, while this setup can’t give that amount of detail. However it forces you with much power. It moves you up and down, back and forth!

One of the interesting feedbacks from the audience: “I could feel that I am taking a shower at the giant water fall, but the water came from the bottom, not from the top!”

I feel grateful to have a wonderful experience, not only to compose but also to listen to the system. Multichannel exploration is never boring. There are still a lot to find, reveal. Discovering hidden spaces beyond our imagination.

f0led

here is another project built around the esp8266. it's a wireless osc controlled 100w led. as the led should act as a stroboscope and not be kept on for long durations of time, i could save space and cost using a smaller sized heatsink. via wifi (opensound control) the led can be turned on/off, the level, attack and release times adjusted etc. there is also a push button trigger input as well as a microphone input (both not connected in the picture). so the strobe can be triggered manually by the musician, by the sound of the nearby instrument or remotely by a computer.

the strobe also send out osc data from the button and mic so it can in turn be used to trigger additional sounds in the computer.

supercollider example code...

OSCFunc.trace(true)
OSCFunc.trace(false)

n= NetAddr("192.168.1.104", 15555);
n.sendMsg(\led, 0.5, 0.1)   //val, fade
n.sendMsg(\led, 0.0, 0.01)  //val, fade
n.sendMsg(\micMode, 1);  //mic on/off
n.sendMsg(\micFade, 1.0, 0.1);  //mic atk rel
n.sendMsg(\butFade, 1.0, 0.1);  //but atk rel

OSCdef(\oscin, {|msg| msg.postln}, \f0led, NetAddr("192.168.1.104", 15555));

f0led 1

the battery is a 12v sealed lead-acid and i measured up toward 8 amps current draw. it weights about 0.5kg.

f0led schematics

bill of material...

1       ESP8266-01
1       4x2 socket
1       heatsink
2       100uF cap
1       100 resistor
1       10k resistor
1       10k log pot     (reichelt ACP 6-L 10K)
1       regulator       (reichelt LF 33 CV)
1       mosfet          (reichelt IRLZ 34N)
1       mic             (reichelt MCE 101)
4       screwterminals  (reichelt AKL 101-02)
1       12v lead-acid   (pollin 94‑271194)
1       heatsink        (ebay 2.4x2.4inch Aluminum Alloy Heat Sink for 1W/3W/5W/10W LED Silver White)
1       dcdc            (ebay DC DC boost converter Constant Current Mobile Power supply 250W)
1       100w led        (ebay 100W Cool White High Power LED LIGHT SMD chip Panel 9000-10000LM)

thick wires
heat paste
screws and nuts

arduino code...

// * install OSC from https://github.com/CNMAT/OSC
// * edit where it says EDIT below
// * choose board: "Generic ESP8266 Module" 160 MHz

//TODO: gamma correction

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCData.h>

//pin3 (urxd) can do pwm out
//pin2 and pin0 can not do pwm
//pin2 and pin0 have to be 3v3 at powerup

#define PINMIC 0
#define PINBUT 2
#define PINPWM 3
#define PORT 15555
#define UPDATERATE 16
#define PINGRATE 600

const char *ssid = "f0led"; //EDIT your accessPoint network name
const char *password = "mypass";  //EDIT your password
const IPAddress outIp(192, 168, 1, 105);  //EDIT receiver ip (supercollider)
const unsigned int outPort = 57120;
float micFadeAtk = 1.0, micFadeRel = 0.1; //default fade times
float butFadeAtk = 1.0, butFadeRel = 0.1; //default fade times
float val = 0.0, valTarget = 0.0, fade = 1.0;
unsigned long nextTime;
byte micMode = 0;  //allow mic trigger led on/off
byte micState = 1;
byte butState = 1;
int cnt;
WiFiUDP Udp;
OSCMessage msgPing("/f0led");
OSCMessage msgMic("/f0led");

void setup() {
  delay(10);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
  }
  Udp.begin(PORT);
  Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
  pinMode(PINMIC, INPUT);
  pinMode(PINBUT, INPUT_PULLUP);
  pinMode(PINPWM, OUTPUT);
  msgMic.add("mic");
  msgPing.add("ping");
}

void oscLed(OSCMessage &msg) {
  valTarget = msg.getFloat(0);
  fade = msg.getFloat(1);
}
void oscMicMode(OSCMessage &msg) {
  micMode = msg.getInt(0);
}
void oscMicFade(OSCMessage &msg) {
  micFadeAtk = msg.getFloat(0);
  micFadeRel = msg.getFloat(1);
}
void oscButFade(OSCMessage &msg) {
  butFadeAtk = msg.getFloat(0);
  butFadeRel = msg.getFloat(1);
}
void sendOscBut(byte val) {
  OSCMessage msg("/f0led");
  msg.add("but");
  msg.add(val);
  Udp.beginPacket(outIp, outPort);
  msg.send(Udp);
  Udp.endPacket();
  msg.empty();
}
void sendOscMic() {
  Udp.beginPacket(outIp, outPort);
  msgMic.send(Udp);
  Udp.endPacket();
}
void sendOscPing() {
  Udp.beginPacket(outIp, outPort);
  msgPing.send(Udp);
  Udp.endPacket();
}

void loop() {

  //--osc input
  OSCMessage oscMsg;
  int packetSize = Udp.parsePacket();
  if (packetSize) {
    while (packetSize--) {
      oscMsg.fill(Udp.read());
    }
    if (!oscMsg.hasError()) {
      oscMsg.dispatch("/led", oscLed);
      oscMsg.dispatch("/micMode", oscMicMode);
      oscMsg.dispatch("/micFade", oscMicFade);
      oscMsg.dispatch("/butFade", oscButFade);
    }
  }

  //--mic input
  if (digitalRead(PINMIC) == 0) {
    if (micState == 0) {
      micState = 1;
    }
  }

  if (millis() >= nextTime) {
    nextTime = millis() + UPDATERATE;
    if (cnt % PINGRATE == 0) {
      sendOscPing();
    }
    cnt++;

    //--mic input2
    if (micState == 1) {
      micState = 2;
      sendOscMic();
      if (micMode == 1) {
        valTarget = 1.0;
        fade = micFadeAtk;
      }
    } else if (micState == 2) {
      if (digitalRead(PINMIC) == 1) {
        valTarget = 0.0;
        fade = micFadeRel;
        micState = 0;
      }
    }

    //--button input
    if (digitalRead(PINBUT) == 0) {
      if (butState == 0) {
        butState = 1;
        sendOscBut(1);
        valTarget = 1.0;
        fade = butFadeAtk;
      }
    } else {
      if (butState == 1) {
        butState = 0;
        sendOscBut(0);
        valTarget = 0.0;
        fade = butFadeRel;
      }
    }

    //--fade in/out
    if (val < valTarget) {
      val = val + fade;
      if (val > valTarget) {
        val = valTarget;
      }
    } else if (val > valTarget) {
      val = val - fade;
      if (val < valTarget) {
        val = valTarget;
      }
    }

    analogWrite(PINPWM, int(val * 1023));
  }
}

f0neo

here is how i build super cheap wireless osc controlled rgb ledstrips. the main components for these are an esp8266, a 5v powerbank, a voltage regulator and some leds. the leds i've used so far are the SK6812 RGBW, but it is easy to adapt the arduino code to work with other models like the WS2812B.

f0neo 1

f0neo 2

f0neo schematics

a basic version of the arduino code shown here below. when it starts it creates a soft access point. connect to it with a computer or phone, figure out the ip address of the esp8266 and start sending osc commands to it.

// * install OSC from https://github.com/CNMAT/OSC
// * install Adafruit_NeoPixel from library manager
// * edit where it says EDIT below
// * choose board: "Generic ESP8266 Module"
// * upload and connect to softap with laptop
// * try to send osc messages to ip 192.168.4.1 port 19999
//protocol: [\rgbw, index, red, green, blue, white] example red: [\rgbw, 0, 255, 0, 0, 0]

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCData.h>
#include <Adafruit_NeoPixel.h>

#define PORT 19999
#define NUMNEO 12  //EDIT number of neo pixels in use
#define PINNEO 2

const char *ssid = "f0neo"; //EDIT softAccessPoint network name
const char *password = "mypass";  //EDIT password

WiFiUDP Udp;

//EDIT to match type of leds (see example/Adafruit_NeoPixel/strandtest)
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMNEO, PINNEO, NEO_RGBW + NEO_KHZ800);

void setup() {
  pixels.begin();
  pixels.show();
  WiFi.softAP(ssid, password);
  Udp.begin(PORT);
}

void rgbw(OSCMessage &msg) {
  pixels.setPixelColor(msg.getInt(0), msg.getInt(2), msg.getInt(1), msg.getInt(3), msg.getInt(4));
  pixels.show();
}

void loop() {
  OSCMessage oscMsg;
  int packetSize = Udp.parsePacket();
  if (packetSize) {
    while (packetSize--) {
      oscMsg.fill(Udp.read());
    }
    if (!oscMsg.hasError()) {
      oscMsg.dispatch("/rgbw", rgbw);
    }
  }
}

attached (zip file) are more elaborate versions of this code - also including maxmsp and supercollider examples and kicad schematics.

AttachmentSize
Package icon f0neo.zip26.95 KB

p.dupuis commented on 'DFM & Greyhole dronin''

Sounds amazing!

p.dupuis recepted on 'DFM & Greyhole dronin''

awesome

LFSaw added code 'DFM & Greyhole dronin''

Exploring sonic possibilities of the DFM and Greyhole UGens.

f0dmx

here is how i built a wireless isolated dmx controller that takes osc input. the box uses an esp8266 to create a wifi access point that one can connect to with a laptop (or phone or whatever). opensound control messages sent to the box are converted into standard dmx commands. multiple clients can be connected and send dmx commands at the same time.

f0dmx 1

f0dmx 2

below is arduino code for the esp8266, the kicad schematics and some supercollider test code.

//Generic ESP8266 Module, 160 MHz

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCData.h>
#include <LXESP8266UARTDMX.h>

#define PORT 19999  //EDIT osc port
const char *ssid = "f0dmx"; //EDIT softAccessPoint network name
const char *password = "mypass";  //EDIT password

WiFiUDP Udp;

void setup() {
  WiFi.softAP(ssid, password);
  Udp.begin(PORT);
  //pinMode(BUILTIN_LED, OUTPUT);
  ESP8266DMX.startOutput();
}

void dmx(OSCMessage &msg) {
  int channel = msg.getInt(0);
  int value = msg.getInt(1);
  ESP8266DMX.setSlot(channel, value);
}

void start(OSCMessage &msg) {
  ESP8266DMX.startOutput();
}

void stop(OSCMessage &msg) {
  ESP8266DMX.stop();
}

void loop() {
  OSCMessage oscMsg;
  int packetSize = Udp.parsePacket();
  if (packetSize) {
    while (packetSize--) {
      oscMsg.fill(Udp.read());
    }
    if (!oscMsg.hasError()) {
      oscMsg.dispatch("/dmx", dmx);
      oscMsg.dispatch("/start", start);
      oscMsg.dispatch("/stop", stop);
    }
  }
}

bill of material...

1       dcdc            ROE-0505S       reichelt
1       xlr female      XLR 3KU         reichelt
1       optocoupler     6N 137          reichelt
1       ic              SN 75176BP      reichelt
1       box             BOPLA KS 420    reichelt
1       resistor        10K
1       resistor        470
3       resistor        10
1       resistor        120
2       cap             10uF
1       cap             100uF
1       regulator       LF 33 CV
1       micro           ESP8266-01
1       socket          4x2
1       usb cable

f0dmx kicad schematics

example of how to send osc from supercollider to the f0dmx box. make sure you send integers and not floats.

//make sure you are connected to the f0dmx wifi network
n= NetAddr("192.168.4.1", 19999);  //the ip and port of the f0dmx box
n.sendMsg(\dmx, 9, 255)  //dmx channel 9, value 255
n.sendMsg(\dmx, 9, 0)
n.sendMsg(\dmx, 7, 100)  //dmx channel 7, value 100
n.sendMsg(\dmx, 7, 0)

n.sendMsg(\stop)  //usually not needed
n.sendMsg(\start)

AttachmentSize
Package icon kicad schematics27.48 KB