Colour notes according to their position in the bar

We are looking for a (semi-)automatic means to solve the following problem:
We want to give the notes of a bar a different colour, according to its temporal position in the bar. For example, in 4/4:

  • beat 1 is in colour 0/255/255
  • beat 2 is in colour 64/255/255
  • beat 3 is in colour 128/255/255
  • beat 4 is in colour 192/255/255

If the bar is filled with 16 double quavers, then the colour of note n would be
(n-1)*16/255/255. If filled with 32nd notes, then the colour of the nth note would be

The exact colour scheme is not important. What is important: does anybody know a method to automatically give the notes on the same temporal position the same colour? In practice, it would mean that all note heads (and rests) on the same vertical line in Galley view of the score have the same colour, and that the colour reflects in a consistent way the temporal position in the bar.

We have been looking around, and found nothing so far. In Filtering, we don’t find a method to filter on a specific position within a bar. Would a LUA script bring a solution?


I don’t think this is possible using Lua as things stand. We do plan to add a feature to filter notes by position, but I’m afraid this isn’t possible at the moment.