Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post fully complete "how to" guides and tutorials here. This is a great place to get feedback on stuff you might put in the wiki.

Moderators: MattKingUSA, khz

Post Reply
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post by Pablo »

What we show:

- Use of tempomaps to reflect song structures, in a simple text file that klick and musicians can easily read.

- Tempo (including ramps) and time signature changes in a hydrogen song.

- Sincronization of hydrogen and ardour in non-fixed tempo (including ramps) and non-fixed time signature songs.


What we take for granted: Jack works stable

The software we need: klick, klick2ardour

http://das.nasophon.de/

Please, read the klick manual. (BTW, gtklick is a wonderful metronome with an intuitive GUI)

We will use klick as the jack master transport (-T option). We don't want volume and pattern changes in the tempo maps for this. The Example Tempo Map in the klick manual, with not needed stuff removed:

###########################################################
intro: 8 120 # play 8 measures at 120 bpm (4/4)
verse1: 12 120 # 12 measures at 120 bpm
4 120-140 # gradually increase tempo to 140 bpm
chorus1: 16 140
bridge: 8 3/4 140 # change to 3/4 time
8 3/4 140
verse2: 12 120 # back to 4/4 (implied)
chorus2: 16 140 # jump to 140 bpm
outro: 6 140
2 140-80 # ritardando over the last 2 bars
#Number of bars: 40 4/4 + 16 3/4 + 36 4/4 = 92 bars
#############################################################

Now we have defined the structure of the song, we can have a hydrogen song with 92 squares... too much?

If the "one bar, one pattern" approach for writing drums seems awkward, we can also define "double" bars in the tempomap. So, one 8/4 counts for two 4/4 bars, one 6/4 for two 3/4 bars and so on. Following with the same example, now we will have:

###################################
intro: 4 8/4 120
verse1: 6 8/4 120
2 8/4 120-140
chorus1: 8 8/4 140
bridge: 4 6/4 140
4 6/4 140
verse2: 6 8/4 120
chorus2: 8 8/4 140
outro: 3 8/4 140
1 8/4 140-80
#Number of bars: 20 8/4 + 8 6/4 + 18 8/4 = 46 "double" bars
######################################################

Let's copy the above to a text file that we can name... tempomap.

In hydrogen, each square in the song editor will correspond to patterns of the following sizes:

From square 1st to 20th: size 16
From 21st to 28th: size 12
From 29th to 46th: size 16

For starters, let's try with just two simple patterns. The song editor looks like this (o means void):

pattern1(s16): xxxxxxxxxxxxxxxxxxxxooooooooxxxxxxxxxxxxxxxxxx
pattern2(s12): ooooooooooooooooooooxxxxxxxxoooooooooooooooooo

In hydrogen, select jack transport (no jack master) and song mode. Do in the terminal:

Code: Select all

klick -T -f /path/to/tempomap
Then press play in whatever jack transport (hydrogen, qjackctl)... Yes, Hydrogen with tempo changes.

You can also export a tempomap to ardour with 'klick2ardour' and then use ardour as the jack master to drive a "non-fixed-tempo, non-fixed-time-signature" hydrogen, without further need of klick. In adition, intro, verse1, etc, markers will be created in the right locations. :)

Thanks a lot to Dominic and Hydrogen and Ardour developers for making this posible. You rock!
User avatar
Yeri
Established Member
Posts: 158
Joined: Tue Dec 09, 2008 6:33 pm
Location: Spain

Re: Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post by Yeri »

Thanks! :D
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post by raboof »

Sounds good - however, it looks like Hydrogen currently doesn't listen to BBT/BPM (i'm running 0.9.3).

Klick only seems to emit BPM/BBT information in non-interactive mode, that's too bad. Still, great tool.
studio32

Re: Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post by studio32 »

It does work with the latest Hydrogen at least.

One question though. It doesn't seems to be possible to do this with Klick in an interactive mode, so you can change the tempo in realtime/live manually. Is this true? Should this be technically possible?
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post by raboof »

studio32 wrote:It doesn't seems to be possible to do this with Klick in an interactive mode, so you can change the tempo in realtime/live manually. Is this true?
As I said above, Klick doesn't emit BBT information in realtime mode, so indeed clients will not see tempo changes.
Should this be technically possible?
I don't see why not.
domi
Posts: 1
Joined: Mon Jan 04, 2010 10:06 am
Location: Dortmund, DE
Contact:

Re: Tempo changes in hydrogen and ardour: Klick and tempomaps.

Post by domi »

Well, I guess klick could emit BPM information in interactive mode. But for most purposes you'd also need the BBT and/or frame position, and that's where things get a little tricky.

When running klick in interactive mode (or gtklick for that matter), it has absolutely no notion of bar numbers. It just plays one bar after another, using whatever tempo/meter is currently set. To emit any meaningful BBT information, you'd have to not only count the bars played (which would be easy), but also offer a way for the user to change the current position.
It gets even worse when you consider the issue of mapping BBT to audio frames. At which position does a tempo change take effect? Do you recalculate positions from the start of the timeline, or just from the current position? The solution to this is called tempo maps. ;)

By the way, even when playing a fixed tempo map, klick never starts/stops/relocates the transport. Of course it could, but I'm not sure how useful that would be. There are many other apps to do this, including most sequencers, qjackctl, jack_transport, etc.
User avatar
zwenny
Established Member
Posts: 84
Joined: Mon May 17, 2010 12:42 pm

Re: Tempo changes in hydrogen and ardour: Klick and tempomap

Post by zwenny »

Many thanks for this, Pablo! I'm working with a similar method derived from your post here.

If everyone care: I've written a blog article about using klick2ardour.py in one's workflow.
It could be interesting for the German-speaking linux musicians among us.
Looking forward to look back what happens now

Listen to my music at:
https://www.jamendo.com/artist/373939/zwenny
User avatar
zwenny
Established Member
Posts: 84
Joined: Mon May 17, 2010 12:42 pm

Re: Tempo changes in hydrogen and ardour: Klick and tempomap

Post by zwenny »

zwenny wrote:Many thanks for this, Pablo! I'm working with a similar method derived from your post here.

If everyone care: I've written a blog article about using klick2ardour.py in one's workflow.
It could be interesting for the German-speaking linux musicians among us.
The article was deleted, as i was relaunching my blog.

Although this topic is from 2009. Has anybody managed to use klick2ardour.py with ardour 3.x?
Looking forward to look back what happens now

Listen to my music at:
https://www.jamendo.com/artist/373939/zwenny
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Tempo changes in hydrogen and ardour: Klick and tempomap

Post by Pablo »

Has anybody managed to use klick2ardour.py with ardour 3.x?
I guess the script needs to be changed. We should ask Dominic about it. If he doesn't do it I will try in the summer and let you know
Post Reply