Adding setting for custom ticks per bar

Hi!

I was going to write a longer post, but when pressing preview it wanted me to log in again, and I lost my progress :'( So here's a short summary:

---

Currently, the number of ticks per bar is fixed at 192. This is fine for most people who compose in divisions of 1/4, 1/8, 1/6 etc, or even 1/3, 1/6, 1/2 etc, but it is not flexible enough for users require more precision, or who wish to compose in odd quantizations, such as 1/5 or 1/7.

It would be beneficial if users could go to the settings and change the ticks per bar for that project. That way, if you need extra precision, you could change it from 192 to, say, 786. Or if you want to compose in 1/5ths, you could set it to 320. Or any other combination of factors.

---

There are a few things which would need to be done to implement this:

  1. Fix any gui (or core) components which do not support dynamic ticks per bar.

    • This mostly amounts to setting the ticksPerBar to something random in the code, and fixing everything which breaks.

  2. Add a project-specific setting to change the ticks per bar (Project-specific settings are implemented in https://github.com/LMMS/lmms/pull/7865)

    • The setting has to be per-project, since otherwise opening projects from other people who use a different ticks per bar would load incorrectly.

  3. Add a way to update all note/clip positions when the ticks per bar are changed, in order to not break everything.

    • This is not always reversible. When going from 192 to 64 ticks per bar, precision is lost, so some note positions may have to be rounded. Should we have a warning?

I would love to hear any comments or feedback. I know some users have brought up the idea of getting rid of integer ticks and simply using floats. Of course, then there's the discussion about precision and everything.

regulus wrote:
Wed May 28, 2025 7:40 pm

go to the settings and change the ticks per bar for that project.

It would, but it is not possible. 1/192 is the limit, and atm there are also no possibilities to make 'odd' setups.