OSC Control Stuff

January 30, 2009
This is a collection of OSC control stuff I've worked on.


I printed a very simple board with a PIC16F877A, a simple voltage regulator power supply (along with a 9V 800mA wall adapter from radio shack), an RS-232 level convertor chip that uses the PIC's USART. There are 2 LEDs on the board wired to PORTD.2 and PORTD.3. A dual row connector has been soldered to PORTB such that the PORTB pin is on one side and ground is on the other. I made some LED wires with a resister soldered in series and a plug that allows the LED to be plugged into this connector. I made a big mistake on the board design by getting the serial connector backwards but luckily I had a terminatable end that I could cross-wire. There is also a thermistor wired to one of the analogue inputs but it's not currently being used. I program the PIC using an external programmer. Unfortunately I don't have schematics for this board.


picdev.tar.gzThis is the code that runs on the PIC. It is written in C and compiled using SDCC.
osc-serial-server.cThis is a simple program that receives UDP messages and forwards them directly onto the serial port.
osc-joystick.cThis program reads the joystick input (the rockband 2 drumset is recognized on linux as a joystick) and sends OSC messages over UDP (to the osc-serial-server). The joystick reading code is based on the rbd2midi.cpp program.
osc-send.plThis perl script sends an OSC message based on the arguments given. It requires the Net::OpenSoundControl perl module.
rbd2midi.cppI found this program on the Hydrogen Forums posted by gigadude. I based the joystick reading code for osc-joystick.c on it. It creates a virtual MIDI output device with ALSA and uses the joystick input to create the MIDI output.



In the video, the rockband 2 wireless drum dongle is connected to a linux computer running the osc-joystick program. The target of that program is another computer on the local network running the osc-serial-server program. The board is connected by serial to the second computer.
Video (MOV 11.4MB)
Video (YouTube)