tags:

views:

164

answers:

1

I have been trying to follow the steps in the book Ruby Practical Project - making music with ruby and was trying to get CoreMIDI and output some notes using SimpleSynth. I can connect to the destination but when i do something like
midi = LiveMIDI.new midi.note_on(0, 60, 100) I get no output from the sound system. Has anyone tried the code and faced similar situation?? And also What are the better libraries for music programming in Ruby?

+1  A: 

Sadly I am in the same situation. No breakthroughs yet. Any luck on your end?

EDIT: AHA!

OK apparently CoreMIDI's method mIDIPacketListAdd changed from Leopard to Snow Leopard.

See change here: http://github.com/evhan/tmdas/commit/0e642ba65d7cf326ac6fb1983ef28b53e29628d1

Note these guys are using FFI instead of the dl stuff.

Here's my working version of the code from the book:

http://pastie.textmate.org/private/zqnhfmbr3yhonljngvmbzw

Note the nasty conditionals for mIDIPacketListAdd for SnowLeopard.

zackola