Where Everybody's Crazy

I'm a missionary in Japan. The name of my mission agency is WEC International. That's supposedly Worldwide Evangelisation for Christ, but I think I have a better idea about what it stands for...

2008-05-10

Casio Privia and OS X - Sometimes I amaze myself

If Google took you to this page because you have one of these keyboards and a Mac, and you don't know what to do with it, skip to where it says "The short version." Meanwhile, here's the long version.

On Thursday I took delivery of a new (well, second hand) MIDI keyboard. It's a very nice piano, with a great weighted-key feel and a nice bank of sounds. I'd not normally trust Casio for this kind of thing, but my boss had a look around and said it was one of the best on the market.

It also has a couple of MIDI ports on the back, and a USB socket. Excited at the idea of being able to compose songs straight onto my computer again, I hooked it all up, and then read the instructions. (You know how it goes.) And I found those magic words: "Macintosh not supported." I tried it anyway, and really, it wasn't supported.

At this point, I had two options - buy another USB to MIDI convertor (I think I have one in the UK somewhere, but very few people sell them these days) or reverse-engineer the protocol and write my own driver. I should note at this point I have no idea whatsoever how to write device drivers, for any OS, least of all OS X, but I still fancy myself as a bit of a reverse engineer, so I set to work.

Imagine my disappointment when, after a few hours of fiddling, I found that the protocol was just plain old MIDI over USB. Absolutely nothing special about it at all. Apart from the fact that the keyboard's USB interface, for some inane reason, didn't announce itself as an ordinary MIDI-class device, and so the operating system had no idea what to do with it.

But after breaking the protocol (such as it was), I still had no device driver. Thankfully, the standard OS X Developer package includes an example of a USB MIDI device driver. All I needed to do was plug in the manufacturer and device ID, and recompile, and I had a working driver. Depressingly easy, really.

The short version

You can download the device driver here. Put it into the directory it specifies, which if my packaging skills don't work properly, should be /Library/Audio/MIDI Drivers.

There is one slight annoyance. OS X loads its MIDI drivers once it wants to use them. The Casio keyboard, on the other hand, wants to talk with the computer on the USB interface as soon as it's turned on, so that it can determine whether or not to use USB or the MIDI ports. To convince the keyboard to talk on the right interface, you need to (a) turn it off, (b) open a Terminal, (c) type /System/Library/Frameworks/CoreMIDIServer.framework/MIDIServer and hit return, (d) turn on the keyboard. It should now happily report that the active port is USB. Then you're good to go.


Posted at 15:42:56 in programming midi os-x | # | G | P | 0 Comments
Language
Japanese English
Links

Tags and Tools
« 2008-08
S M TWTFS
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

RSS


I am...

lathos: Going from iPod 1.x to 2.x and severely regretting it.


Photoblog

castle1_filtered.jpg

gosanpai_filtered.jpg

ichibangai2_filtered.jpg

machinaga_filtered.jpg

mizu.jpg


Speedblog

http://glosoli.blogspot.com/2005/09/encrypted-thumb-drive-and-autoplay.html # it's my blog: Encrypted thumb drive and autoplay howto

http://daiyainn.gooside.com/ # 京都だいや旅館 京へおこしやす

http://www.e-chords.com/guitartab.asp?idmusica=96629&keyb=true # Where Could I go Tab by Ben Harper - E-Chords

http://www.inmamaskitchen.com/RECIPES/RECIPES/Soups/vegetable_stock.html # Moosewood's Vegetable Stock Recipe

http://www.foodnetwork.com/food/recipes/recipe/0,,FOOD_9936_8389,00.html # Good Eats Roast Turkey Recipe: Recipes: Food Network

http://www.reallivepreacher.com/node/203 # You Ain't Jesus, PreacherPart Two: Losing The Language of Love

http://leiterreports.typepad.com/blog/2005/06/95_theses_on_th.html # Leiter Reports: A Philosophy Blog: 95 Theses on the Religious Right

http://cbae.nmsu.edu/~dboje/teaching/338/traits.htm # TRAITS

http://jweb.kokken.go.jp/gitaigo/index.html # 擬音語・擬態語 - 日本語を楽しもう! -

http://www.nanzan-u.ac.jp/SHUBUNKEN/publications/jjrs/jjrs_cumulative_list.htm # Japanese Journal of Religious Studies: Cumulative list of Essays & Book Reviews

http://www.myspace.com/chloecfrancis # www.myspace.com/chloecfrancis

http://www.solar.ifa.hawaii.edu/cgi-bin/StrikeProb?latitude=+35.38&longitude=-136.26&location=Nagahama,+Japan # Tropical Cyclone Strike Probabilities for Nagahama, Japan

http://www.missionjapan.org/mission/jmissionorg.html # Japan Mission Organization List

http://www.aquasapone.com.au/soapmaking/showergel_soap.html # AquaSapone - How to make shower gel from natural handmade soap

http://www.ultimate-guitar.com/tabs/d/danilo_montero/la_unica_razon_crd.htm # La Unica Razon Chords by Danilo Montero @ Ultimate-Guitar.Com


Musicblog

Bonobo – Transmission94 (Parts 1 & 2)

Sia – Rewrite

Thievery Corporation – Thievery Corporation - Revolut

Powered by Glob!
Search: