Retrieve context properties

2023-07-22 Thread Rip _Mus
Good morning, is it possible to retrieve the name of the Voice and Staff contexts during the insertion of the music (as if I wanted to use it to automatically print the name of these contexts on a markup of a note)? Thank you Rip_mus

Re: Retrieve context properties

2023-07-23 Thread Valentin Petzel
Hello Rip_Mus, you can obtain the name of a context using ly::context-id, and the type of a context using ly:context-name. The problem is that you can only really use these only during the translation step. So I thing the easiest way would be to create an engraver that adds this information:

Re: Retrieve context properties

2023-07-23 Thread Rip _Mus
Thank you Valentin, this is very helpful! The situation is that I always create a custom context, named "Tactus", that creates bars for proportional notation (it's a Dynamics alias, that accepts Voice and some overrides, transparent noteheads, offset, etc.). During the insertion of notes, if I want

Re: Retrieve context properties

2023-07-23 Thread Thomas Morley
Am So., 23. Juli 2023 um 10:03 Uhr schrieb Rip _Mus : > > Thank you Valentin, > this is very helpful! > The situation is that I always create a custom context, named "Tactus", that > creates bars for proportional notation (it's a Dynamics alias, that accepts > Voice and some overrides, transparen