I have a big curiosity on how we can use OSC or MIDI to send message from one app to another app, potentially to generate (realtime) synth sound, visualization, and animation.
This is especially a fun area and environment when we wanted to use CODE for CREATIVITY.
Sonic Pi (by Sam Aaron) is one app I really love to use when dealing with Synth and Sonic generator. I remember using ChucK in the past by Ge Wang, ChucK is also cool, but Sonic Pi is a lot more friendly.
http://sonic-pi.net
Sonic Pi multi-threaded ness and LIVE LOOP is really something new for me. But Sam made it easy enough so that we could generate "listener" very easily.
Sonic Pi RUBY language documentation is really in depth and a full on programming guides. As a bonus, if you are into music creation, you will learn a thing or two about digital music creation.
Then, I started to have interest in OSC and MIDI, basically we can control Sonic Pi from the outside! (from other app, or other machine within the same network).
https://github.com/gkvoelkl/python-sonic
Anyways, I am using Mac and really enjoy this feature!
If you manage to setup the OSC address, etc you will be controlling Sonic Pi using Touch OSC in no time. OSC is probably simpler than setting up MIDI.
What cool about Sonic Pi is that once we setup the OSC address, we can see "Cues" of message coming in.
For me, setting up MIDI seems a little bit more tricky. Well although MIDI actually gives you cool Note On, Note Off and many handy features, especially when you are doing ANIMATION, once you get a hang of MIDI input and controls, you can trigger action using MIDI ON OFF.
If you are on Mac, get familiar with "Audio MIDI Setup" app. With this little app, you can connect iPhone MIDI app (TouchOSC, etc) with your computer for sending MIDI message into... Sonic Pi!
OSC actually can open up a lot of possibilities, especially if you want almost realtime interaction of user. So far, I am only touching the surface using Blender Game Engine to trigger sound via collision, for example.
With Mido, we can very, very easily send MIDI message and if Sonic Pi "Live Loop" running to listen to MIDI message, we will be able to generate sound easily.
What really cool about MIDI as control is that we have A LOT of MIDI format library somewhere out there on the Internet. Free or not free MIDI are out there if you search song title and MIDI, you are very likely can find it.
My other favourite tools are Blender and Processing. For 3D and Visual. Processing language is often my biggest issue, but I do know Processing teach algorithm and interactivity.
Blender however, is Pythonic and I cannot emphasis more: Blender 3D is the coolest open source tool out there. I am using Blender with NODE add-on like Sverchok and Animation Nodes, and that is basically a lot of tools to try.
This is especially a fun area and environment when we wanted to use CODE for CREATIVITY.
Sonic Pi (by Sam Aaron) is one app I really love to use when dealing with Synth and Sonic generator. I remember using ChucK in the past by Ge Wang, ChucK is also cool, but Sonic Pi is a lot more friendly.
http://sonic-pi.net
Sonic Pi multi-threaded ness and LIVE LOOP is really something new for me. But Sam made it easy enough so that we could generate "listener" very easily.
MAKING SOUND WITH CODE
There are plenty of ways we can "trigger" Sonic Pi to generate sound. Obviously we can just use the built in RUBY language inside Sonic Pi app. Fairly simple and fun language to use and you can generate some noise in no time!Sonic Pi RUBY language documentation is really in depth and a full on programming guides. As a bonus, if you are into music creation, you will learn a thing or two about digital music creation.
Then, I started to have interest in OSC and MIDI, basically we can control Sonic Pi from the outside! (from other app, or other machine within the same network).
PYTHON SONIC FOR SONIC PI
The first tool I found is Python-Sonic module which I actually use a bit because I use Python often, especially with my Blender Sushi 3D project, of everything Blender with Nodes. You can download Python Sonic here:https://github.com/gkvoelkl/python-sonic
SONIC PI 3 = OSC and MIDI
I think, Sonic Pi 3 is special in particular, because it supports MIDI and OSC. This is the IO version of Sonic Pi. For Mac, you can get this app with MIDI and OSC feature. For Windows, you please do support Sam Aaron at his Patreon.Anyways, I am using Mac and really enjoy this feature!
OSC TO SONIC PI
With OSC, I have tested few different tools. If you have iOS devices like iPad and iPhone, I highly recommend TOUCH OSC app. It provides Editor allowing you to create your own custom interface buttons, sliders, etc for OSC message.If you manage to setup the OSC address, etc you will be controlling Sonic Pi using Touch OSC in no time. OSC is probably simpler than setting up MIDI.
What cool about Sonic Pi is that once we setup the OSC address, we can see "Cues" of message coming in.
MIDI TO SONIC PI
For me, setting up MIDI seems a little bit more tricky. Well although MIDI actually gives you cool Note On, Note Off and many handy features, especially when you are doing ANIMATION, once you get a hang of MIDI input and controls, you can trigger action using MIDI ON OFF.
If you are on Mac, get familiar with "Audio MIDI Setup" app. With this little app, you can connect iPhone MIDI app (TouchOSC, etc) with your computer for sending MIDI message into... Sonic Pi!
OSC actually can open up a lot of possibilities, especially if you want almost realtime interaction of user. So far, I am only touching the surface using Blender Game Engine to trigger sound via collision, for example.
MIDO MODULE MIDI
If you want to follow my experiment, I am using Python module called MIDO to actually send MIDI message in realtime into Sonic Pi.With Mido, we can very, very easily send MIDI message and if Sonic Pi "Live Loop" running to listen to MIDI message, we will be able to generate sound easily.
What really cool about MIDI as control is that we have A LOT of MIDI format library somewhere out there on the Internet. Free or not free MIDI are out there if you search song title and MIDI, you are very likely can find it.
Here I am using Pineapple for writing snippet of Python codes. Mido module allows me to easily talk to Sonic Pi. |
CONCLUSION
As a self-taught programmer, I found Sonic Pi to be my favourite app to explore coding, especially since we can listen to the code, generating noise, it is A LOT OF FUN.My other favourite tools are Blender and Processing. For 3D and Visual. Processing language is often my biggest issue, but I do know Processing teach algorithm and interactivity.
Blender however, is Pythonic and I cannot emphasis more: Blender 3D is the coolest open source tool out there. I am using Blender with NODE add-on like Sverchok and Animation Nodes, and that is basically a lot of tools to try.
Comments
Post a Comment