[RDP] MIDI switcher (it's sorta done, and it works!)
Ferdinand O. Tempel
pw at linuxops.net
Fri Jan 21 17:09:08 EST 2011
On Tue, 2011-01-18 at 23:39 +0100, Frederick Henderson wrote:
> Hi Ferdinand O. Tempel!
> Do I understand you patch correctly. Is this only for GPI (General Purpose
> Inputs)? In other words sensing when a button has been pushed or a switch
You're right in your understanding :)
> Have you thought to extend it to GPO (General Purpose Outputs)? In other
> words to push a button? With something like this:
> This would be an alternative to using a measurement computing board and
> needing to compile the modules. Which does not seem to work on all linux
Actually, I didn't have a need to extend it to GPO myself, my goal was
to use a MIDI controller to operate rdairplay using buttons and faders.
Which works like charm, really. Being able to also use GPO using a
device such as the above might actually be useful. Stuff like "On Air"
lights and such is what I assume you have in mind with this. GPOs would
also come in handy to create bi-directional communication with the MIDI
controller which I use for input. For example, I'm able to press a
button on the MIDI controller which executes a macro cart to set On/Off
Air. But if I reset this through the software, the controller should
also be updated with this new status...yeah, I definitely see a use.
I won't promise anything, but I'll have a look at how hard it is to
modify for GPO.
> Thanks for your time and help!
> On Sun, 01 Aug 2010 15:26:22 +0200, Ferdinand O. Tempel <pw at linuxops.net>
> > Hi,
> > After a bit of work I managed to get a switcher built which is able to
> > receive MIDI commands from a Jack MIDI source. It handles both CC and
> > MCC commands. It translates the former into "on" and "off" events,
> > emulating a simple GPIO. The MMC commands get (where it makes sense)
> > translated into stop/start/next RML commands for the Main log engine.
> > Using this switcher I've been able to use my MIDI controller for fader
> > start, use buttons to start and stop the log machine, and also fire off
> > carts from the panel for effects by pressing a button on a MIDI button
> > matrix. In other words, it's pretty usable for me, and hopefully also
> > for anyone else needing similar functionality.
> > I've attached a patch against Rivendell 1.7.2.
> > A quick FAQ:
> > Q: What do I do to make this work?
> > A: First, apply this patch into a Rivendell 1.7.2 source tree and
> > rebuild. Then start up your Rivendell system. Start rdadmin, go to
> > "Manage Hosts", open your host and click on the "Switchers GPIO" button.
> > Click on "Add" to add a new matrix. The Matrix number represents the
> > MIDI channel that particular switcher will respond to. Select "MIDI Jack
> > port" as Switcher Type and click "OK". Now, edit the newly created
> > switcher and click on the "Configure GPIs" button. For each of the (128)
> > possible CC's you can define an "on" and "off" cart to be started at the
> > appropriate moments. MMC commands are channel and cart independant and
> > will always do the expected (or unexpected) operation of starting,
> > stopping and nexting the Main log.
> > Q: How do I check if the code actually receives MIDI input?
> > A: start ripcd with the "-d" parameter, connect a MIDI output to the
> > standard Rivendell\MidiControl port and wiggle a controller or press a
> > button.
> > Q: Your code is ugly
> > A: Pay me and I'll try and make it better. Also, I'm not a developer.
> > Q: Why not reuse the Jack code already present in Rivendell's caed?
> > A: Because I like to think separation of control data from audio data is
> > better. Besides, all switcher code concentrates itself around ripcd, so
> > I decided to keep it all there.
> > Q: Hey, I know something to make this better!
> > A: Let me know, I'll see what I can do.
> > Enjoy.
> > Regards,
> > Ferdinand O. Tempel
More information about the Rivendell-prog