[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using other NoteHeads with \harmonicByFret?
From: |
Peter Crighton |
Subject: |
Re: Using other NoteHeads with \harmonicByFret? |
Date: |
Sun, 12 Feb 2012 19:18:56 +0100 |
Sorry for the delay. It now works beautifully!
I also think this should be the default. I'd expect harmonics to have
a diamond shaped notehead, but otherwise look exactly like normal
notes… with dots enabled and all but whole and half notes having black
noteheads. I don't have a clue how this is handled in common notation,
but to me it is the most obvious way… the notehead's shape should be
sufficient as an indication for harmonics.
--
Peter Crighton | (mainly) Progressive Rock musician based in
Mainz/Wiesbaden, Germany
http://www.petercrighton.de
2012/2/3 Thomas Morley <address@hidden>:
> Hi Peter,
>
> 2012/2/3 Peter Crighton <address@hidden>:
>> Thanks, that fixed the issue with the accidentals, but it's now
>> harmonic again and not harmonic-mixed… the "\override NoteHead" line
>> seems to just be ignored. (I also don't see how overriding
>> after-line-breaking should alter the noteheads…)
>
> sorry, I concentrated on accidentals and dots and I simply overlooked
> that the NoteHeads were'nt changed any more.
>
> Try:
>
> \version "2.14.2"
>
> \paper {
> ragged-right = ##t
> }
>
> mixedHarmonicByFret = #(define-music-function (parser location fret
> music) (number? ly:music?)
> (_i "Convert @var{music} into mixed harmonics; the resulting notes resemble
> harmonics played on a fretted instrument by touching the strings above
> @var{fret
> }.")
> (let* ((fret (number->string fret))
> (pitch (fret->pitch fret)))
> (make-sequential-music
> (list
> #{
> \override TabNoteHead #'stencil =
> #(tab-note-head::print-custom-fret-label $fret)
> \override NoteHead #'minimum-Y-extent = #'(-0.1 . 0.1)
> \override NoteHead #'stencil = #(lambda (grob)
> (ly:grob-set-property! grob 'style 'harmonic-mixed)
> (ly:note-head::print grob))
> #}
> (make-harmonic
> (calc-harmonic-pitch pitch music))
> #{
> \revert TabNoteHead #'stencil
> \revert NoteHead #'stencil
> \revert NoteHead #'minimum-Y-extent
> #}))))
>
> music = {
> \override StringNumber #'transparent = ##t
> \set harmonicDots = ##t
> \ottava #1
> \mixedHarmonicByFret #12 <e,\6>8
> \mixedHarmonicByFret #12 <e g\3 b\2 e'\1>8.
> \mixedHarmonicByFret #7 <g\3 b\2 e'\1>
> \mixedHarmonicByFret #5 <g\3 b\2 e'\1>
> \mixedHarmonicByFret #7 <g\3 b\2 e'\1>
> \mixedHarmonicByFret #12 <g\3 b\2 e'\1>8 |
> c'4 d' e' f' g'1
> }
> \score {
> <<
> \new Staff { \clef "G_8" \key e\major \music }
> \new TabStaff { \tabFullNotation \music }
> >>
> }
>
> Cheers,
> Harm
- Re: Using other NoteHeads with \harmonicByFret?, (continued)
- Re: Using other NoteHeads with \harmonicByFret?, Peter Crighton, 2012/02/02
- Re: Using other NoteHeads with \harmonicByFret?, Thomas Morley, 2012/02/02
- Re: Using other NoteHeads with \harmonicByFret?, Peter Crighton, 2012/02/02
- Re: Using other NoteHeads with \harmonicByFret?, Thomas Morley, 2012/02/03
- Re: Using other NoteHeads with \harmonicByFret?, Marc Hohl, 2012/02/03
- Re: Using other NoteHeads with \harmonicByFret?, Thomas Morley, 2012/02/03
- Re: Using other NoteHeads with \harmonicByFret?, Nick Payne, 2012/02/03
- Re: Using other NoteHeads with \harmonicByFret?, Marc Hohl, 2012/02/14
- Re: Using other NoteHeads with \harmonicByFret?, Thomas Morley, 2012/02/16
- Re: Using other NoteHeads with \harmonicByFret?, Marc Hohl, 2012/02/17
- Re: Using other NoteHeads with \harmonicByFret?,
Peter Crighton <=