lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \hideNotes and MIDI Note_performer


From: Adam Spiers
Subject: Re: \hideNotes and MIDI Note_performer
Date: Mon, 7 Jan 2013 12:18:06 +0000

On Mon, Jan 7, 2013 at 9:30 AM, Johannes Rohrer <address@hidden> wrote:
> Adam Spiers <lilypond-user <at> adamspiers.org> writes:
>
>> I've noticed that MIDI generation doesn't honour transparent notes,
>> e.g. in
>>
>>   f8( \hideNotes \grace {  c16 \glissando } \unHideNotes f8)
>>
>> a NoteOn event is generated for the c16.  Hopefully I should be able
>> to address this if someone gives me a few pointers.  My first guess
>> was to tweak Note_performer::process_music() by adding something like:
>>
>>         if (to_boolean(n->get_property ("transparent")))
>>                 break;
>
> It won't be that simple I'm afraid. "transparent" is not an event property 
> that
> you can read here, but a grob property. \hideNotes presets it for various
> graphical objects (Dots, NoteHead, Stem, Beam, Accidental, Rest, TabNoteHead),
> using override commands like this:
>
>   \override NoteHead.transparent = ##t
>
> But during MIDI generation, no such objects are ever created.

Ah, of course.

> From a note event, Note_performer creates an AudioNote object, a type of
> AudioElement, and those are formally analogue to grobs. It would be nice if 
> you
> could override a property again, like this:
>
>   \override AudioNote.mute = ##t

That would be ideal, yes!

> Unfortunately, the AudioElement class, which is rather primitive compared to
> Grob, does not currently provide any scheme property interface. (Changing this
> is an item on my imaginary LilyPond project list, but I am still learning
> myself.)
>
> For now, working around the problem with tags might be more productive?

OK, but I'm not sure how tags could be used for this.  Are they
available to Note_performer, or did you mean something else?

Thanks a lot!
Adam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]