Skip to content

Syncing hydrogen with other applications

thijs edited this page Feb 12, 2014 · 2 revisions

by Alexandre Prokoudine, v0.2, 20th, March 2005

While proprietary software for musicians tends to become all-in-one swiss army knife, open source software follows the so called UNIX way, when one application does one thing, but does it well, so that execution of a task requires just to line up several tools. Can it be still efficient for a musician with either Windows or Mac OS background? Is it worth trying to do drum section in a separate application like Hydrogen and all the rest tracks in a sequencer or a DAW? The answer is “yes”, if the musician knows how to use JACK transport -- the magic glue between JACK clients.

If you have ever worked with ReWire? based applications, you might not need thorough explanations about JACK transport’s nature. However it is still worth to know, what JACK transport can and what it cannot do. So let’s deep our toes into theory waters for a while.

JACK transport provides simple transport interfaces for starting, stopping and repositioning a set of clients. It means that if you have two JACK capable applications which play anything, you can start playback in one application and the other one will immediately start playback as well. Thus you will not need to desperately switch between them.

Current implementation of JACK transport allows following transport controls:

  • play
    
  • pause
    
  • stop
    
  • fast
    
  • forward
    
  • rewind
    
  • jump to start
    
  • jump to end 
    

Future versions of JACK will feature variable speed, reverse play and looping. Hydrogen provides controls to play, pause, stop, rewind, fast forward and seek:

JACK transport consists of two parts: timebase master and transport control. The timebase master continuously updates extended position information, counting beats, timecode, etc. The first started application that can use JACK transport becomes timebase master. Any other application can be a transport control, which means that it can tell timebase master to e.g. rewind playback position of all clients to some point. Let’s practice now a little bit.

Start JACK server, e.g.: jackd -R -d alsa -r 48000 -p 4096 Start Hydrogen. Make sure that it uses JACK audio driver (File - Preferences - Audio System - Audio driver). If it doesn’t, choose JACK in the combobox and click Restart driver button. As soon as H2 starts using JACK audio driver you will notice blue indicator with a label “JACK TRANSP.” in the bottom of Hydrogen’s song editor. It means that Hydrogen has successfully registered at least as transport control. Open a demo song (File - Open Demo) called GM_kit_demo1.h2song. Start MIDI-sequencer MusE. Open a demo composition, e.g. trio_2.med. Open a demo song (File - Open Demo) called GM_kit_demo1.h2song. Go back to Hydrogen and click on the timeline of the song editor just to the right of the zero (0) mark. Now look at MusE’s main window: nothing has changed, its red playback cursor is at start zero position: Go back to Hydrogen and click on the timeline of the song editor just to the right of the mark “4”. You will see that position of the red playback cursor in MusE’s main window has changed: Go back to Hydrogen and click on the timeline of the song editor just to the right of the mark “8”. You will see that position of the red playback cursor in MusE’s main window has changed again:

You will surely notice that if values of BPM in Hydrogen and MusE are different, these applications will go out of sync at once as soon as you start playback. At the time of writing this tutorial MusE cannot read BPM from timebase master, so you have to fix it manually.

Because timebase master always counts current position of playback, anytime you launch another JACK transport capable application, its playback cursor will immediately go the appropriate position in its opened project.

In many cases drums don’t start playing immediately in a song. You might like perfoming some nice piano or guitar intro with drums joining it later. You can’t tell Hydrogen go out of sync and play drum section after that intro with JACK transport enabled and used. In this case you need to start playback with transport enabled and start filling cells in Hydrogen’s song editor only when the intro is over. Of course, a fair amount of cells in the beginnning will stay empty. This is also the case whenyou will most likely desire to unify measures in your sequencer and Hydrogen. {ELABORATE HERE WITH SCREENSHOTS}