Ardour / Hydrogen syncronization with tempo changes

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

Post Reply
baconature
Established Member
Posts: 171
Joined: Wed Dec 18, 2013 9:15 pm
Location: Idaho
Has thanked: 25 times
Been thanked: 22 times
Contact:

Ardour / Hydrogen syncronization with tempo changes

Post by baconature »

Hi folks,
I am trying to resolve an issue in recording a song that has a ramped tempo change using Ardour and Hydrogen in tandem.

I have been using hydrogen for simulating drums in my music recordings for many years now. I like the results for the most part. It took many years to figure out drumming because I have never payed much attention to drumming beyond superficially, in knowing how percussion compliments music. Timing and where beats fit properly in musical score was quite surprising to my brain, and eventually I figured it out.

The software Hydrogen does straight forward patterns quite easily, but I have found that it faults when the rhythm shifts, ie changes in tempo. I use Hydrogen in tandem with Ardour allowing Ardour’s button Int. "external positional sync" to control timing /transport. I know nothing really of how either of these two programs function or how and if they are truly compatible in all instances. I have succeeded in some workarounds that I sort of invented to make it through to recording one of my songs, having two distinct and separate tempo changes, like beginning at 100 Beats Per Minute (BPM), with a duration of 20 measures, then switching to 130 BPM, for 10 measures, then returning to 100 for the duration of the song. It took a long time to figure a work through, but eventually I succeeded.

Now I am doing a different tune that should have a ramped tempo change over a period of 10 measures. In this case I have not figured out a methodology that brings success. I have also attempted bumping the tempo up x units per measure, which also fails. But I really don’t know what the issue is in this instance that causes the synchronization of these two programs to fail, but it does.

And so here I am asking for a solution, if such is even possible. In real life I don’t know any drummers, and the times of pandemic actually prohibits my will to do such an interface in any case. That would be preferred but, not going to happen in my little bubble, far away from civilization. I don’t know very much about software, or how it works.

Any hint toward how to overcome would be greatly appreciated.

Thanks for reading.
Tom ~ Idaho USA

UbuntuStudio 20.04, Intel i5 3.30GHz 6600, Asus Q170Mc MotherBoard, 32Gb ram

My Music
CraigPid
Established Member
Posts: 197
Joined: Fri Mar 13, 2015 10:52 pm
Has thanked: 10 times
Been thanked: 19 times

Re: Ardour / Hydrogen syncronization with tempo changes

Post by CraigPid »

I tried to do something like this before and had no luck with Hydrogen. What I ended up doing was using the AVLDrums.lv2 in a midi track and writing the beats on the midi track.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Ardour / Hydrogen syncronization with tempo changes

Post by j_e_f_f_g »

I second Craig's answer. You should try to replace hydrogen with a "drum sampler" plugin you can load directly into Ardour. And then have an Ardour midi track play the drum part (instead of hydrogen). That will definitively remove any tempo irregularities between the drums, and other, tracks.

An example of a possible choice would be LinuxSampler, loaded up with an SFZ file of a kit you like.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

baconature
Established Member
Posts: 171
Joined: Wed Dec 18, 2013 9:15 pm
Location: Idaho
Has thanked: 25 times
Been thanked: 22 times
Contact:

Re: Ardour / Hydrogen syncronization with tempo changes

Post by baconature »

Hey,
Thank you both for the suggestions. I will investigate the technique and see if I can figure out how to do it a new way. I will have to try it out before further comment. Often my lack of knowledge gets in the way. I have loaded/added these kinds of things (plugins) before that I was fully unable to implement, due to a lack of understandable (to me) instructions, tutorials or a lack there in. I always try, and want to continue making progress at recording(s).

The "drum sampler" suggested within Ardour seems like it could be a simple solution. Hopefully it will be an easier process to get through, producing result rather the a wall of mystery. I tried using LinuxSampler a few times in the past, no luck at that time. That was several years ago.

Thank you very much. I will report back on any results after attempts have been made.
Tom ~ Idaho USA

UbuntuStudio 20.04, Intel i5 3.30GHz 6600, Asus Q170Mc MotherBoard, 32Gb ram

My Music
baconature
Established Member
Posts: 171
Joined: Wed Dec 18, 2013 9:15 pm
Location: Idaho
Has thanked: 25 times
Been thanked: 22 times
Contact:

Re: Ardour / Hydrogen syncronization with tempo changes

Post by baconature »

Again, the same with LinuxSampler! I can load up linuxsampler as an instrument, in Ardour, but it does nothing, there are no sounds there in, and I know of no way to incorporate a sound via its gui or otherwise cause sound to occur there in.

I looked at some of the documentation from linuxsampler.org which to me is like reading tea leaves. I see the leaves, the leaves say nothing in an audible language that I am able to understand. To quote lyric of a Harry Belafonte song, It was as clear as mud, but it covers the ground, and the confusion makes me brain go round.

I did find the LinuxSampler forum, kind of like this LinuxMusicians forum, which may shed more light upon use. I shall see what comes of looking there.

I'm far from done researching this, just checking in with an initial observation.
Tom ~ Idaho USA

UbuntuStudio 20.04, Intel i5 3.30GHz 6600, Asus Q170Mc MotherBoard, 32Gb ram

My Music
baconature
Established Member
Posts: 171
Joined: Wed Dec 18, 2013 9:15 pm
Location: Idaho
Has thanked: 25 times
Been thanked: 22 times
Contact:

Re: Ardour / Hydrogen syncronization with tempo changes

Post by baconature »

I did find a couple of LV2 plugins that will likely work for this project, "Black Pearl," and "Red Zeppelin." It won't be a fun interface to work with and I don't much care for either of their sound fonts, but it will likely work. Also, I am aware that there are other drumkit type plugins available. At this time I only have 3 more songs with tempo changes to deal with so I will try to be content with them.

Again Thanks for the input. I appreciate the assistance.
Tom ~ Idaho USA

UbuntuStudio 20.04, Intel i5 3.30GHz 6600, Asus Q170Mc MotherBoard, 32Gb ram

My Music
User avatar
Bella
Established Member
Posts: 50
Joined: Thu Apr 02, 2020 10:46 pm
Location: PacNW
Has thanked: 7 times
Been thanked: 1 time

Re: Ardour / Hydrogen syncronization with tempo changes

Post by Bella »

baconature wrote: Thu Jan 27, 2022 11:42 pm Any hint toward how to overcome would be greatly appreciated.
If you like working with Hydrogen you can still achieve what you want with ramped tempo and tempo changes in general.

Instead of syncing Ardour and Hydrogen, you can have Ardour play your MIDI drum file and trigger your drum kit in Hydrogen. Basically you’d be using it like a standalone audio app. Export your drum file from Hydrogen and import it into Ardour. Remove any instrument plugins Ardour adds to the MIDI track and set the track’s output to Hydrogen’s MIDI In.

You can either have Hydrogen’s audio outputs routed directly to system playback, or if you want to use LV2/VST plugins on your drums or want to record* the audio direct into Ardour, you can instead have Hydrogen’s stereo audio output routed into a stereo audio bus in Ardour. If you do this, make sure Hydrogen isn’t also connected to system playback, or you’ll get doubled output. Once you have Hydrogen’s audio routed through a bus in Ardour, you can add plugins to the bus if desired and you won’t be limited to just LADSPA format plugins.

Alternatively, for more flexible routing and mixing you can also setup Hydrogen to create ‘per instrument’ channels instead of just a stereo output. This will allow your to route individual drum instruments/sounds to specific buses (that’d you’d need to create first) within Ardour. You can have a separate bus for each drum sound or you can route groups of drum sounds to specific buses (for instance you can route all your overheads/cymbals to one stereo bus in Ardour, then, say, toms to their own bus in Ardour, and so on).

*keep in mind that you can't record on a bus, but any audio routed into Ardour through a bus can then be sent to an audio track for recording.

**Instead of buses you could also do the same thing using audio tracks in Ardour, but you’d need to make sure that "Monitor Input" is selected in the audio track’s mixer strip or you probably won't hear anything.
User avatar
Bella
Established Member
Posts: 50
Joined: Thu Apr 02, 2020 10:46 pm
Location: PacNW
Has thanked: 7 times
Been thanked: 1 time

Re: Ardour / Hydrogen syncronization with tempo changes

Post by Bella »

baconature wrote: Fri Jan 28, 2022 6:06 pm Again, the same with LinuxSampler! I can load up linuxsampler as an instrument, in Ardour, but it does nothing, there are no sounds there in, and I know of no way to incorporate a sound via its gui or otherwise cause sound to occur there in.
What graphical front-end are you using with Linuxsampler? Qsampler is a popular one. I use Fantasia for my setup.
User avatar
Bella
Established Member
Posts: 50
Joined: Thu Apr 02, 2020 10:46 pm
Location: PacNW
Has thanked: 7 times
Been thanked: 1 time

Re: Ardour / Hydrogen syncronization with tempo changes

Post by Bella »

baconature wrote: Fri Jan 28, 2022 9:51 pm I did find a couple of LV2 plugins that will likely work for this project, "Black Pearl," and "Red Zeppelin." It won't be a fun interface to work with and I don't much care for either of their sound fonts, but it will likely work. Also, I am aware that there are other drumkit type plugins available. At this time I only have 3 more songs with tempo changes to deal with so I will try to be content with them.

Again Thanks for the input. I appreciate the assistance.
Check out Drumgizmo if you haven't already. It's the only drum sample player I really use any more. It may be overkill for your needs depending on the style of music you are working on or what you want out of a drum kit, but worth checking out. Drumgizmo can be used as a plugin or via CLI. I still use and appreciate Hydrogen, but primarily use it as a glorified metronome while practicing or to quickly get down a percussive idea without firing up Ardour.

If you don't care for the official Drumgizmo drum kits, you can create your own if you have existing sample libraries you want to use. Creating your own kits for DG isn't exactly for the faint of heart, but a program like DG Patchmaker can really help simplify the process.
baconature
Established Member
Posts: 171
Joined: Wed Dec 18, 2013 9:15 pm
Location: Idaho
Has thanked: 25 times
Been thanked: 22 times
Contact:

Re: Ardour / Hydrogen syncronization with tempo changes

Post by baconature »

Bella,
Thanks for the input. I had not checked back in on the forum since I last posted in this thread.

As to LinuxSampler. I don't know how to align a front end, or even what that means, honestly. As stated, I am quite ignorant about tech in general. I am but an old musician, attempting to record my life's musical work before I expire myself. As to what you said about importing a hydrogen track into Ardour, I can and will investigate that idea further before attempting to rewrite that track as a midi track with one of the plugins I found the other day. I am not actually sure that I understand how to import a hydrogen file at this point. I have imported individual .wav files and midi tracks into an Ardour file, so if that process is equally as simple I can succeed, yet I am thinking it shall be more complex than that. I think I will leave this song alone for a while (weeks or months) before trying to continue in this process to reduce personal frustration in fighting within technology.

None the less I appreciate the assistance you have provided. And again I apologize for the delayed response.

Cheers,
Tom ~ Idaho USA

UbuntuStudio 20.04, Intel i5 3.30GHz 6600, Asus Q170Mc MotherBoard, 32Gb ram

My Music
User avatar
Bella
Established Member
Posts: 50
Joined: Thu Apr 02, 2020 10:46 pm
Location: PacNW
Has thanked: 7 times
Been thanked: 1 time

Re: Ardour / Hydrogen syncronization with tempo changes

Post by Bella »

baconature wrote: Sun Jan 30, 2022 10:47 pm Bella,
Thanks for the input. I had not checked back in on the forum since I last posted in this thread.
No problem!
As to LinuxSampler. I don't know how to align a front end, or even what that means, honestly. As stated, I am quite ignorant about tech in general. I am but an old musician, attempting to record my life's musical work before I expire myself.
Linuxsampler doesn't come with it's own GUI (it's 'headless') but there are graphical front-ends that have been developed to make Linuxsampler easier to use, load banks, setting MIDI channels, etc. When you add the Linuxsampler plugin in Ardour, it doesn't have a GUI so you cant load anything into Linuxsampler from within Ardour. A graphical front end, like Qsampler, runs outside of Ardour, while still communicating with it's plugin counterpart. That's a whole other ball of yarn, so let's focus on Hydrogen and Ardour for now.
As to what you said about importing a hydrogen track into Ardour, I can and will investigate that idea further before attempting to rewrite that track as a midi track with one of the plugins I found the other day. I am not actually sure that I understand how to import a hydrogen file at this point. I have imported individual .wav files and midi tracks into an Ardour file, so if that process is equally as simple I can succeed, yet I am thinking it shall be more complex than that.
I think you will be happy to find it's as easy as opening Hydrogen, loading your Hydrogen file and then choosing export MIDI file from the Projects tab. Then you can just import that exported file into Ardour like any other MIDI file. :)
I think I will leave this song alone for a while (weeks or months) before trying to continue in this process to reduce personal frustration in fighting within technology.
I understand! If you decide to dig in deeper when you are ready, here's some info that may help get you through with less frustration - hopefully I didn't miss something important.
  • Export your drum track as a MIDI file from Hydrogen
  • In Hydrogen: Options/Preferences/Audio System tab, set Hydrogen's Audio Output to JACK
  • Also make sure Connect to default JACK output ports is selected. This will connect Hydrogen's audio outs to system_playback. Later on I'll explain how to route the audio out to Ardour instead, but for now, stick with system_playback
  • Set Hydrogen's MIDI System to ALSA (if not already set)
  • Start Ardour and create a new project (or open an existing one if you’ve already got one set up)
  • Make sure your Ardour project’s Audio Output is set to use JACK and its MIDI output is set to ALSA
*If JACK is already running, Ardour will probably skip its Audio/MIDI setup window and load a project based on JACK's current settings. If that's the case and you're using using QJACKCTL, make sure ALSA is set as the Audio driver in the settings tab. For MIDI driver, I have 'None' set on mine.
  • In Ardour, go to Session>Import, and import the MIDI file. When importing MIDI files, Ardour requires you to choose an instrument plugin, even if you don’t need one, so just leave it as default.
  • Once imported, close out the import dialog and remove the plugin that Ardour added to the MIDI track.
  • Set the track's MIDI Output in Ardour to Hydrogen's MIDI In (Hydrogen’s audio output should hopefully already be connected to system_playback.
Simplified, the routing looks something like this:

Ardour MIDI Track Out → Hydrogen MIDI In / Hydrogen Audio Out → System_Playback

Assuming you still have your Hydrogen project open with the correct drum kit loaded, playing back the MIDI track in Ardour should trigger Hydrogen. In this setup you are bypassing Hydrogen's own sequencer. You won’t need to sync Hydrogen and Ardour this way, and it will respect the ramp tempo feature in Ardour.

Alternative Routing
Preface: While I refer to audio 'buses’ in the info below, you can do the same thing with audio 'tracks' instead. In the case of the latter, you will need to select ‘Monitor Input’ (located below the “pan” feature on the track’s mixer strip in Ardour) in order to hear the audio from Hydrogen.

Hydrogen only supports LADSPA plugins, so if you want to use LV2 or VST, you will either need to use a dedicated plugin host or, perhaps more conveniently, route Hydrogen’s audio output through Ardour instead of having it routed directly to system_playback.

You can do this by creating a new audio bus in Ardour. If you just want to work with Hydrogen’s stereo output, then make sure the audio bus is in stereo and that Hydrogen isn’t setup for ‘per instrument outputs’ on the Audio System tab under Preferences - you can still use stereo output even if this option is checked, but it will be more confusing if all you really want is one stereo output (more on multi-outputs later).

If Connect to default JACK output ports* is checked in Hydrogen's Options/Preferences/Audio System tab, it will probably automatically connect to system_playback. You don't want that to happen, since you will get doubled output if the plan is to route Hydrogen's audio to Ardour. In the event that Hydrogen is connected to system_playback you can use QJACKCTL to disconnect Hydrogen from system_playback or you can uncheck the 'Connect to default JACK output ports' in Hydrogen and restart it. When restarted, Hydrogen's audio outputs will not be (or should not be, at least) connected to anything - until, of course, you connect them to an Ardour bus - which will be done within Ardour as follows:

In Ardour, right-click on the bus track’s header in the Editor view and choose Inputs... from the pop-up context menu Select Hydrogen Out_L and Out_R from the ‘Other’ tab in the Inputs dialog window. That should be it. If you don't hear any sound when playing, right click on the bus header again and choose Outputs... and in the Ardour Buses tab, make sure the Master In L & R channels are selected. Now that Hydrogen's audio is routed through Ardour, you should then be able to add plugins to the audio bus in Ardour that Hydrogen’s audio output is being routed to.

*Depending on your version of Hydrogen, Connect to default JACK output ports might be called Connect to default pair.

Multiple Outputs
For more advance routing, you can set Hydrogen to create an output for each drum sound (Kick, Snare, Hi Hat, etc.) by selecting the ‘per instrument outputs’ option in Hydrogen's Options/Preferences/Audio System tab. You can route each output into individual audio buses in Ardour – or you can feed groups of them into a more limited number of Ardour buses (let's say you want all your cymbals routed to one stereo Bus in Ardour - you could create the stereo Bus, call it Overheads or something, and for the input of that Bus, choose the audio outputs from Hydrogen that correspond to your cymbals. Likewise, you can do something similar for the Hi Hats, Toms, and so on). This gives you a lot of flexibility for mixing.
None the less I appreciate the assistance you have provided. And again I apologize for the delayed response.
No apology necessary - I hope the info I have provided is helpful in getting you where you want to go with your recording workflow. Write back how things are going if you decide to try any of the above methods, and if you run into any snags maybe we can suss them out!

Take care!
baconature
Established Member
Posts: 171
Joined: Wed Dec 18, 2013 9:15 pm
Location: Idaho
Has thanked: 25 times
Been thanked: 22 times
Contact:

Re: Ardour / Hydrogen syncronization with tempo changes

Post by baconature »

Bella,
Again Thank you. It is like a fountain of information that you've presented, that I can pretty much easily understand. I had no idea how to make LinuxSampler work before today. The first time I tried was likely back in 2014 of so. It seems that its absent front end is supposed to be known via osmosis or something.

Anyhow, I have yet to look into applying the information you have provided. It will still be a rather complex process to go through, via use of Hydrogen, my current preferred option. Once I get through the ramped section, to realize it works, I'll then go back to the drawing board to compose the next section of the song's drum track. I got into it last week, spending more than a day, 8 - 10 hours, trying to resolve that section, to finally surrender in being ignorant. It seems to me that I'll be able to figure it out with the information you provided. As you said, when I get back to this one, I'll let you know how the process goes, if I can get through it or need further assistance. I do so appreciate your time here with this issue :mrgreen: .
Tom ~ Idaho USA

UbuntuStudio 20.04, Intel i5 3.30GHz 6600, Asus Q170Mc MotherBoard, 32Gb ram

My Music
User avatar
Bella
Established Member
Posts: 50
Joined: Thu Apr 02, 2020 10:46 pm
Location: PacNW
Has thanked: 7 times
Been thanked: 1 time

Re: Ardour / Hydrogen syncronization with tempo changes

Post by Bella »

Cheers!
Post Reply