Hi,
I just discovered that ardour is controllable via OSC in pd! In the past, I have used midi keys to sync my pd patches and ardour, but this was always a little painful. So, as I hadn't seen any other reference of this, I thought I would post what commands are available here.
First, you have to turn on OSC within ardour (2.2 or up), which is in options->misc options. Then, if this is your first time, a file will be written to .ardour2/osc_url that contains what udp port ardour communicates osc messages. This is connectable in pd with, in my case:
| connect localhost 3819 ( | [sendOSC]
Then you have these commands available within pd (this is taken directly out of ardour-2.4.1/src/libs/ardour/osc.cc). The message you would type in pd would be something like "send /ardour/add_marker". I haven't tried any of these but start and stop yet, but here they are:
REGISTER_CALLBACK (serv, "/ardour/add_marker", "", add_marker); REGISTER_CALLBACK (serv, "/ardour/loop_toggle", "", loop_toggle); REGISTER_CALLBACK (serv, "/ardour/goto_start", "", goto_start); REGISTER_CALLBACK (serv, "/ardour/goto_end", "", goto_end); REGISTER_CALLBACK (serv, "/ardour/rewind", "", rewind); REGISTER_CALLBACK (serv, "/ardour/ffwd", "", ffwd); REGISTER_CALLBACK (serv, "/ardour/transport_stop", "", transport_stop); REGISTER_CALLBACK (serv, "/ardour/transport_play", "", transport_play); REGISTER_CALLBACK (serv, "/ardour/set_transport_speed", "f", set_transport_speed); REGISTER_CALLBACK (serv, "/ardour/save_state", "", save_state); REGISTER_CALLBACK (serv, "/ardour/prev_marker", "", prev_marker); REGISTER_CALLBACK (serv, "/ardour/next_marker", "", next_marker); REGISTER_CALLBACK (serv, "/ardour/undo", "", undo); REGISTER_CALLBACK (serv, "/ardour/redo", "", redo); REGISTER_CALLBACK (serv, "/ardour/toggle_punch_in", "", toggle_punch_in); REGISTER_CALLBACK (serv, "/ardour/toggle_punch_out", "", toggle_punch_out); REGISTER_CALLBACK (serv, "/ardour/rec_enable_toggle", "", rec_enable_toggle); REGISTER_CALLBACK (serv, "/ardour/toggle_all_rec_enables", "", toggle_all_rec_enables);
#if 0 REGISTER_CALLBACK (serv, "/ardour/*/#current_value", "", current_value); REGISTER_CALLBACK (serv, "/ardour/set", "", set); #endif
#if 0 // un/register_update args= s:ctrl s:returl s:retpath lo_server_add_method(serv, "/register_update", "sss", OSC::global_register_update_handler, this); lo_server_add_method(serv, "/unregister_update", "sss", OSC::global_unregister_update_handler, this); lo_server_add_method(serv, "/register_auto_update", "siss", OSC::global_register_auto_update_handler, this); lo_server_add_method(serv, "/unregister_auto_update", "sss", OSC::_global_unregister_auto_update_handler, this);
-rich