Re: Note names are causing text marks to be duplicated
On Fri, 26 Apr 2024 at 16:46, Eric Benson wrote: > > I see. How hard would it be to write a Scheme function that would copy a melody variable and remove the text marks, or in fact everything other than the note values, which are all I want in the NoteNames variable? That would be preferable to entering a separate sequence containing only the text marks in my application. Hello, Do you want your text marks to be above the staff or above the upper NoteNames context? The following just keep the text marks above the staff. \layout { \context { \Score \remove Text_mark_engraver } \context { \Staff \consists Text_mark_engraver } } Kind regards, Xavier
Re: Note names are causing text marks to be duplicated
True, I was using \mark instead of \textMark. I just switched to \textMark, which is definitely more correct, and I am also using \textEndMark, so I can have one at the end of one system and the other at the beginning of the next system in the same spot in the score. It does seem to me that if you are using NoteNames in addition to regular notation you would not want to include anything other than those note labels. Perhaps this could be added as an option. I don't suppose NoteNames gets very much use, but I do have some users who need the help! I was unaware of tags in LilyPond until now. I might have some other uses for them. On Fri, Apr 26, 2024 at 8:15 AM David Wright wrote: > On Fri 26 Apr 2024 at 07:59:09 (-0700), Aaron Hill wrote: > > On 2024-04-26 7:44 am, Eric Benson wrote: > > > I see. How hard would it be to write a Scheme function that would > > > copy a > > > melody variable and remove the text marks, or in fact everything > > > other than > > > the note values, which are all I want in the NoteNames variable? > > > That would > > > be preferable to entering a separate sequence containing only the text > > > marks in my application. > > > > > > \tagging your \textMarks would let you apply them only where you intend: > > > > > > \version "2.24.3" > > > > textMark = \tag textMark \textMark \etc > > withTextMarks = \keepWithTag textMark \etc > > withoutTextMarks = \removeWithTag textMark \etc > > > > melody = { b'4 4 \textMark "Hey!" 2 } > > > > << \withTextMarks \melody \\ \withoutTextMarks \melody >> > > > > Ironically, replacing \textMark with \mark would achieve much the > same thing in the MWE provided. But I suppose it all depends on > the purpose of including the text mark in melody itself. > > Cheers, > David. >
Re: Note names are causing text marks to be duplicated
On Fri 26 Apr 2024 at 07:59:09 (-0700), Aaron Hill wrote: > On 2024-04-26 7:44 am, Eric Benson wrote: > > I see. How hard would it be to write a Scheme function that would > > copy a > > melody variable and remove the text marks, or in fact everything > > other than > > the note values, which are all I want in the NoteNames variable? > > That would > > be preferable to entering a separate sequence containing only the text > > marks in my application. > > > \tagging your \textMarks would let you apply them only where you intend: > > > \version "2.24.3" > > textMark = \tag textMark \textMark \etc > withTextMarks = \keepWithTag textMark \etc > withoutTextMarks = \removeWithTag textMark \etc > > melody = { b'4 4 \textMark "Hey!" 2 } > > << \withTextMarks \melody \\ \withoutTextMarks \melody >> > Ironically, replacing \textMark with \mark would achieve much the same thing in the MWE provided. But I suppose it all depends on the purpose of including the text mark in melody itself. Cheers, David.
Re: Note names are causing text marks to be duplicated
On 2024-04-26 7:44 am, Eric Benson wrote: I see. How hard would it be to write a Scheme function that would copy a melody variable and remove the text marks, or in fact everything other than the note values, which are all I want in the NoteNames variable? That would be preferable to entering a separate sequence containing only the text marks in my application. \tagging your \textMarks would let you apply them only where you intend: \version "2.24.3" textMark = \tag textMark \textMark \etc withTextMarks = \keepWithTag textMark \etc withoutTextMarks = \removeWithTag textMark \etc melody = { b'4 4 \textMark "Hey!" 2 } << \withTextMarks \melody \\ \withoutTextMarks \melody >> -- Aaron Hill
Re: Note names are causing text marks to be duplicated
I see. How hard would it be to write a Scheme function that would copy a melody variable and remove the text marks, or in fact everything other than the note values, which are all I want in the NoteNames variable? That would be preferable to entering a separate sequence containing only the text marks in my application. On Fri, Apr 26, 2024 at 6:48 AM David Wright wrote: > On Thu 25 Apr 2024 at 22:16:21 (-0700), Eric Benson wrote: > > Is this intentional or desired? > > AIUI this is one of the reasons \textMark was invented, so that > multiple text marks could be placed at the same point: > > "Note: Older LilyPond versions used the \mark command for text marks, > even though it is primarily intended for rehearsal marks (see > [Rehearsal marks], page 127). The \textMark and \textEndMark > commands are better suited for text marks with regard to their de- > fault settings as well as the ability to have several text marks at > the same moment. It is therefore recommended to use \textMark and > \textEndMark instead of \mark "Text" or \mark \markup Note that > if converting code that uses \mark for text marks, overrides using > RehearsalMark should be changed to TextMark." > > > If so, is there a way to prevent this from happening? > > Treat the text mark as you would lyrics or dynamics, defined in a > separate variable, which you interpret inside your << >> only once. > > Cheers, > David. >
Re: Note names are causing text marks to be duplicated
On Thu 25 Apr 2024 at 22:16:21 (-0700), Eric Benson wrote: > Is this intentional or desired? AIUI this is one of the reasons \textMark was invented, so that multiple text marks could be placed at the same point: "Note: Older LilyPond versions used the \mark command for text marks, even though it is primarily intended for rehearsal marks (see [Rehearsal marks], page 127). The \textMark and \textEndMark commands are better suited for text marks with regard to their de- fault settings as well as the ability to have several text marks at the same moment. It is therefore recommended to use \textMark and \textEndMark instead of \mark "Text" or \mark \markup Note that if converting code that uses \mark for text marks, overrides using RehearsalMark should be changed to TextMark." > If so, is there a way to prevent this from happening? Treat the text mark as you would lyrics or dynamics, defined in a separate variable, which you interpret inside your << >> only once. Cheers, David.
Re: Note names are causing text marks to be duplicated
Is this intentional or desired? If so, is there a way to prevent this from happening? On Thu, Apr 25, 2024 at 10:09 PM Aaron Hill wrote: > On 2024-04-25 9:43 pm, Eric Benson wrote: > > I took one of the NoteName examples from the documentation and dropped > > a > > \textMark in the middle of it, and there is an extra copy of that text > > mark > > for each NoteName staff. > > > This makes sense, since the \textMark command is within the \melody > music variable, which gets used three times. The same behavior occurs > without NoteNames: > > > \version "2.24.3" > > melody = { b'4 4 \textMark Hey 2 } > > << \melody \\ \melody >> > > > > -- Aaron Hill >
Re: Note names are causing text marks to be duplicated
On 2024-04-25 9:43 pm, Eric Benson wrote: I took one of the NoteName examples from the documentation and dropped a \textMark in the middle of it, and there is an extra copy of that text mark for each NoteName staff. This makes sense, since the \textMark command is within the \melody music variable, which gets used three times. The same behavior occurs without NoteNames: \version "2.24.3" melody = { b'4 4 \textMark Hey 2 } << \melody \\ \melody >> -- Aaron Hill
Note names are causing text marks to be duplicated
I took one of the NoteName examples from the documentation and dropped a \textMark in the middle of it, and there is an extra copy of that text mark for each NoteName staff. nntest.ly Description: Binary data nntest.pdf Description: Adobe PDF document