Hydrogen: drum pattern plays short when in song playback

Created on 4 Nov 2020  路  17Comments  路  Source: hydrogen-music/hydrogen

Hydrogen version * :
Operating system + version :
Audio driver + version :


< describe your issue or feature request here ** >


  • H2 version : see 'Info - About', or in case you build Hydrogen from source use 'git rev-parse HEAD'
    ** if you are reporting a bug, please describe how the bug can be reproduced

Most helpful comment

The result looks a little like this at the moment:

image

It's not entirely obvious what's happening just by looking, but when watching the playhead pass over the pattern editor while playing the song, I think it communicates what's going on quite well.

All 17 comments

@snakedad we need more information. Please update you initial message.

one of my tracks will begin playing a pattern (that plays perfectly in pattern mode) and when it reaches the second beat restarts the pattern (when playing in song mode). So in essence, a 4 measure pattern plays 3.25 measures. I thought it was a BPM change issue, because it occurred later in the song just before a BPM change, but it also happens earlier in the song when no change is present.

Please, fill the asked info in the your first message (hydrogen version, operating system + version, audio driver + version).

@snakedad We'll need to reproduce this in order to understand it. Is there any way that you could share the 2hsong file with us by attaching it here?

If you don't want to share your actual beats, you could maybe try taking a copy of it, and stripping out notes until the bare minimum that reproduces the issue is left?

Thanks

I think I may have just figured it out. I had some fill and cymbal tag patterns occurring simultaneously that were a different measure count (ie: only 1 measure since it was just a cymbal tag or a short fill), and it seems like the program was trying to satisfy both durations of patterns. instead of playing the short pattern aligned to the longer pattern, it shortened the longer pattern.

i corrected it by making ALL patterns the same number of beats and measures.

It is a known limitation of Hydrogen.

The Song Editor GUI probably ought to provide some feedback on that, at least. There's been at least one other PR on the same issue, and I do keep occasionally running into this myself (usually when thinking "I didn't think this pattern was meant to be so sparse.... oh")

691 would probably be something great to be worked on.

@cme: do you know someone with coding skills, hydrogen interest, and ability to work with Hydrogen current codebase?

_(/me whistle :eyes: )_

691 would probably be something great to be worked on.

Hmm. I'm not convinced that's the right way to go.

Changing the size of patterns shown in the song editor grid works for cases where pattern lengths have a common denominator, but fails for tunes where time signatures change part way through. Eg from a pattern length of 8 to pattern length of 15 (yes, that's an important use case ;)

Some sort of flexible layout would be needed to represent it visually and would be a major reworking of the song editor, and the representation in the core would need to change to support it too.

Currently the behaviour of Hydrogen when there's a length mismatch is to consider the group's length to be the length of the "first" pattern in the group (which I think might just be the first pattern the user clicked to make active) which means an almost arbitrary choice between truncating the pattern, or playing the longer pattern all the way through.

So, as a counter-proposal, I would like to suggest:

  • defining the behaviour as taking the longest duration (easy core change)
  • when multiple length patterns are active in a group (column in song editor), the shorter patterns should render as narrower rectangles.

This makes the appearance of the song editor consistent with the behaviour of the song, which should help a user understand what's happening.

It's also a halfway point to the more substantial core change of perhaps looping the shorter pattern instead.

How would a smaller pattern look like? Maybe like one of these? (or maybe even a different color)
smaller_pattern

It's also a halfway point to the more substantial core change of perhaps looping the shorter pattern instead.

And in the 15/8 situation the shorter pattern would be played back 1.5 times? Maybe this could be optional per overall pattern

I was thinking that representing the shorter patterns with a full-height but half-width rectangle (or rather, proportionally sized). That would extend naturally to subdivided rectangles for repeated patterns.

Also, agreed, looping shorter patterns would definitely have to be an option, and off by default I think.

Ah, nice. Encoding information about the length and whether the shorter pattern is loop in its visual representation this way is a good idea! I like it.

The result looks a little like this at the moment:

image

It's not entirely obvious what's happening just by looking, but when watching the playhead pass over the pattern editor while playing the song, I think it communicates what's going on quite well.

i just want to say, thank you all for looking into this and discussing / attempting solutions. it's great to see a team trying to resolve an issue for a user.

@snakedad do you think the above visual representation would have been enough for you to figure out what Hydrogen was doing if you'd seen it in the Song Editor while editing your sequence?

Closing as #984 is on master, aiming for release with 1.1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

38github picture 38github  路  6Comments

elpescado picture elpescado  路  8Comments

Porrumentzio picture Porrumentzio  路  13Comments

simonvanderveldt picture simonvanderveldt  路  11Comments

mauser picture mauser  路  7Comments