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: Johannes Rohrer
Subject: Re: \hideNotes and MIDI Note_performer
Date: Mon, 7 Jan 2013 09:30:10 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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.

>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

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?

Best regards,

Johannes




reply via email to

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