\version "2.14.2"
diamond = \override NoteHead #'style = #'diamond
\relative c' {
<<
\voiceOne { d2~\( d8[es] as16[f g8]\) }
\new Voice {\voiceTwo \diamond d2~ d2 }
>> \oneVoice
}
example of code without macro (this is the appropriate result, but with messy code):
\version "2.14.2"
<<
\voiceOne { d2~\( d8[es] as16[f g8]\) }
\new Voice {\voiceTwo \override NoteHead #'style = #'diamond d2~ d2
>> \oneVoice
}
Any clues why there is a difference in output? Thank you!
Greetings, Gagi
On 23 October 2012 19:56, Marc Hohl
<address@hidden> wrote:
Am 23.10.2012 11:20, schrieb Gagi Petrovic:
Ah yes, that's the info i was looking for. Thank you Marc!
First i just wanted to turn the red color off, and use it in voiceTwo (to have diamond heads in one voice, while having regular heads in the other). I tried using my macro
diamond = \override NoteHead #'style = #'diamond
in voiceTwo, but I noticed this didn't work. Somehow, both voices get diamond heads. Now I see the override does work as long as i don't use it via my macro.
Could I change something in my macro so i could use it in this case?
Could you send a small example of your current code, please?
This would make it much more easy to try to help you.
Regards,
Marc
Kind regards, Gagi
ps. thank you for pointing me to ly/property-init.ly <http://property-init.ly>, this is really helpful!