Jack Director Code
Control Jack transport features using MIDI commands.
Brought to you by:
sergioatzori
- JackDirector - JackDirector is a GNU/Linux app that lets you control Jack Audio Connection Kit's transport play/pause using midi commands (noteon) and let you assign bpm changes and other commands to midi program changes. This program plays a metronome thru 2 audio outputs exposed in Jack. Features: - Control Jack Transport's play/pause using midi notes - Control Jack Transport's position - Metronome audio output - Assign different scenes to different program changes - Control bpm, mute metronome, song position, stop transport for every scene - Output a midi clock out for programs allowing external midi sync (eg. wine programs) To control its behavior you have to provide a configuration file named jack-directorrc. Here's a detailed description of all possible parameters (metronome is set to 120bpm until a program change changes it). For comments, use # at the start of the line Debug levels: 0 No output 1 stdout 2 stdout+stderr 3 stdout+verbose stderr 4 stdout+verbose stderr+midi dump Config file Syntax: optname=val optname=val1,val2,valN Options: PARAM DESCRIPTION DEFAULT debug Debug Level: 2 mfreq Metronome sound Frequency (in Hz, 20 - 20000) 900 mamplitude Metronome sound maximum amplitude (1 - 100) 1 mduration Metronome sound duration (in ms) 20 mattack Metronome sound attack (in percent of duration) 5 mdecay Metronome sound decay (in percent of duration) 5 ntrans Midi note triggering start/stop (0 - 127) 60 (C4) nstart Midi note triggering only start (0 - 127) 62 (D4) nstop Midi note triggering only stop (0 - 127) 64 (E4) nthres Minimum Velocity to trigger command (0 - 127) 0 bpm Bpm value at program start (10 - 400) 120 midich Default Midi Channel (0 - 15) 0 mcresyncdelay Midi clock output: delay between repos and continue (in msec) 300 notimebase Whether JackDirector shouldn't set as timebase master (0 - 1) 0 mcnotransport Midi clock output: if 1 don't send transport messages 0 mcnoposition Midi clock output: if 1 don't send position messages 0 name Name for jack client JackDirector prgX program change, where X is 0-127, see below for values Values for program change functions have to be defined like this (example): prg0=bpm:120,midich:0,stop Opts for program change: bpm=XXX beats per minute (10 - 400) midich=XX midi channel listening for this program change (0 - 16) Defaults to general midich values mute whether to mute the metronome's click (and let the user control jack transport) (0 - 1) stop whether to stop transport on program change (and let the user control jack transport) (0 - 1) ignore ignore prg command if we are already on this prg (eg. no retrigger) locate=NFRAME set transport to NFRAME (unsigned int) stopzero select whether the song's position must be set to zero at stop You can define multiple midich for the same prg value (example): prg0=bpm:120,midich:0 prg0=bpm:100,midich:1 If a program is defined 2 times (same midich), the latter will overwrite the former. Compile Instructions: You have to install libjack development files and qt development files. qmake && make