MIDIator v0.3.0 released!
November 23rd, 2008
I’ve just released MIDIator v0.3.0. This release brings some new features that I’m told are exciting :)
- CC, Aftertouch, Channel Aftertouch, and Pitch Bend messages, contributed by Jeremy Voorhis.
- A driver for OSX that talks directly to the system’s synthesizer… no more routing nonsense required! Contributed by Adam Murray with help from Jeremy Voorhis.
Note that at least for the short-term, the CoreMIDI driver will remain the default for OSX. That means that #autodetect_driver will pick the CoreMIDI driver on OSX. If you want to use Adam’s driver, you must call #use, like so:
1 2 |
@midi = MIDIator::Interface.new @midi.use :dls_synth |
At some point in the future, both direct-to-synth and indirect MIDI message modes will be supported on all three platforms. I’ll also be adding a nicer way to specify which mode you want, so you don’t have to distribute code with hard-coded drivers.
You can install or update MIDIator from RubyForge:
$ sudo gem install midiator
Plz to enjoy!
You got MIDIator in my Archaeopteryx!
October 28th, 2008
As you are no doubt aware, mad scientist Giles Bowkett’s has a rad drum machine/crazy MIDI thing called Archaeopteryx. A common complaint with Archaeopteryx (hereafter “arkx”) is that it only runs on OSX.
The cool thing is that Giles used Topher Cyll’s code from Practical Ruby Projects. You may recall that I recently published a little library called MIDIator that also uses Topher’s code to provide easy access to MIDI on the major operating systems.
I’ve never really said this in public, but the real reason I wrote MIDIator in the first place was to become e-famous by making arkx work on Windows and Linux. So, it is with extreme hope for e-fame pleasure that I have pushed my branch of arkx that converts it to use MIDIator for MIDI interaction.
You can find the branch over here on GitHub. Please to enjoy.
Announcing MIDIator
October 20th, 2008
I was just looking at my FeedBurner statistics and noticed that my feed readership has gone up by approximately 100 in the past year. Then I looked at my blog and realized I hadn’t posted anything Ruby-related in 2008. Then I remembered that I’m a Ruby programmer and decided to release some software for the express purpose of blogging an announcement.
Okay, not really. Well. The last part is mostly a lie. I guess. On to the point.
Background
Earlier this year a small publishing concern called Apress (that you may have heard of!) published a most interesting book. It was Practical Ruby Projects, by the lovely and talented Topher Cyll. There’s a link on his page if you want to get it.
Practical Ruby Projects is the book that I have always wanted to write. I would have called it Stupid Ruby Tricks myself, but that’s neither here nor there. The subtitle is “Ideas for the Eclectic Programmer”, and that really gives you an idea of the flavor of what’s inside.
The second chapter is entitled “Making Music with Ruby”, and is a gentle introduction into writing code that can play music. The chapter is based around building an app that can play songs written in simple notation. One of the really awesome things that Topher did, though, was to supply code to interface with the MIDI subsystems on Windows, Linux, and OSX.
Around this same time, Giles Bowkett’s sweet project Archaeopteryx was starting to take off. Giles had also taken both code and inspiration from Practical Ruby Projects, but he had only grabbed the OSX parts. That’s fine, I thought, because I’m on a mac and it works for me.
Then, people started complaining. Not really complaining, but definitely whinging about wanting to play with Archaeopteryx but being stuck on inferior platforms. There was also an issue with the fact that Giles demos Archaeopteryx hooked up to Reason, and Reason costs like $500. You don’t have to use Reason, though, as Shay Arnett so deftly demonstrated at the Hoedown. I have more to say about this, but you’re going to have to wait for RubyConf.
Aaaaaanyway, I decided that I was going to take Topher’s code and bundle it up for you, the masses, to consume. This was made possible in large part by Apress’s total awesomeness in releasing all the code from Practical Ruby Projects under the MIT license. I took his code, refactored it a little bit, wrote some specs and examples, and published it as MIDIator.
How Can
First, install as normal:
$ sudo gem install midiator
Next, do this:
1 2 3 4 5 6 |
require 'rubygems' require 'midiator' midi = MIDIator::Interface.new midi.autodetect_driver midi.play( 84, 0.5 ) |
Thanks to Tobi Reif for pointing out the error in the above example!
You should hear a half-second of middle C. Now, to be fair, I’m leaving out all the information about how to get a working MIDI setup on your machine. I’ll be blogging about that later, though, so if you don’t know how just keep your eyes peeled.
Where Can I…
You can get MIDIator at GitHub or RubyForge, or install it via gems as shown above.
Future blog posts about MIDIator will be tagged, so you can use this link to get all the news that’s fit to blag.
You can read the RDoc at RubyForge.
Stay Tuned!
There’s more coming. In the next few days I’ll be showing you how to get MIDI working on your system. Then I’ll be speaking at RubyConf with Giles and Yossef Mendelssohn. I’ll definitely post some stuff related to my talk around the conference, but you’re going to have to wait for the really fun stuff.