grame-cncm / guidolib

Guido project - music score layout engine - music description language

Home Page:http://guido.grame.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Relative dx (offset) tag parameter

arshiacont opened this issue · comments

This is a proposal for a useful addition to currently supported Tag Parameters in GuidoLib.

The idea is to extend dx to support a positive or negative duration value (same syntax as note durations elsewhere). To make things simple: The duration, set by user, must be limited to the span of the current measure in question.

Why is this extension useful? Some tags can only be positioned relatively in the score. Take the following screenshot. The Harmonies can currently be positioned in GuidoLib using (e.g.) dx=-5hs. But setting non-relative values will make the Guido Score dependent of Layout. This new feature will preserve GuidoLib ability to render dynamically and adapt to context (unique in its domain).

image

Potential Naïve Implementation? GuidoLib engine can take the relative dx value, take its current voice position and simply use the rational offset with current measure length to convert that value to an absolute offset, at the last minute of rendering?!

Good idea! Implies to introduce a new unit: e.g. 'qn' (for quarter note). What might be complicated is that the value (in space) of a qn should always be available. I'll have a look.