I got it working by creating two note blocks -  one for the bending and one
for midi - I added an extra score for the midi

This works but isn't ideal as I have duplicate notes.  At least it gives me
the score I want and the midi notes with no grace notes.

If there is a better way to do this i'm all ears.

Best

Lee

On Sun, 12 Oct 2025 at 10:54, Lee <[email protected]> wrote:

> Hi Tina,
>
> Your right - it was the grace note confusing me.   I assumed logical time
> was wall time :-)
>
>
> https://lilypond.org/doc/v2.25/Documentation/notation/special-rhythmic-concerns.html
>
> This gives me the durations I expect in midi.  8th note triplets 1/3.
>
>   \tuplet 3/2 { d8\3  e\2 a\1 }
>   \tuplet 3/2 { c8\1  a\1 e\2 }
>   \tuplet 3/2 { g8\2  a8\1 e8\2 }
>   \tuplet 3/2 { d8\3 c\3 a\4s }
>
> This is what I'm looking to  see on the score - is there a way to show
> bends without using grace notes?
>
> Best
>
> Lee
>
> [image: riff with bends.png]
>
>
>
>
>
> On Sat, 11 Oct 2025 at 14:32, Tina Petzel <[email protected]> wrote:
>
>> Hi Lee,
>>
>> I am not sure what issue you have. Am I correct that you have an issue
>> with
>> MIDI output?
>>
>> > I'm using a hidden grace note to do this - I assume that is valid.  I
>> > expected  to see rhythm of 1/3 for all 3 notes.   It's very close but
>> the
>> > first two triplets seem wrong.  The third is correct and that was a
>> whole
>> > note bend.  The 4th triplet is correct too.
>> >
>> > I'm pretty sure grace notes don't form part of rythym - I'm using grace
>> > note for full note bend, 1/4 note bend.   You'll see the midi I
>> collected
>> > below the ly file.
>>
>> Grace notes are played back before the beat in MIDI, and will thus
>> shorten the
>> played duration of the previous note. Also I am not sure what you mean by
>> `0.2516th`. Would that be a note of roughly 4 whole bars? Also do you not
>> find
>> the grace notes in the MIDI output?
>>
>> Best regards,
>> Tina
>
>
\version "2.24.4"


\language "english"


\language "english"
\header {
  title = "Riff test"
  composer = "Nelly"
}

\paper {
  #(set-paper-size "a4landscape")
}

global = {
  \time 4/4
  \key c \major

}

electricGuitar = \relative c' {
  \override NoteHead.extra-spacing-width = #'(-2 . 2)
  \tempo 1 = 20
  \unHideNotes
  \tuplet 3/2 { d8\^\3 \once \hideNotes \grace e8\3 e\2 a\1 }
  \tuplet 3/2 { c8\^\1 \once \hideNotes \grace cqs\3 a e\2 }
  \tuplet 3/2 { g8\^\2 \once \hideNotes \grace a16\1 a8\1 e8\2 }
  \tuplet 3/2 { d8\3 c\3 a\4s }
  \unHideNotes

}

midiscore = \relative c' {
  \tuplet 3/2 { d8\3 e\2 a\1 }
  \tuplet 3/2 { c8\1 a\1 e\2 }
  \tuplet 3/2 { g8\2 a8\1 e8\2 }
  \tuplet 3/2 { d8\3 c\3 a\4s }

}



\score {
  \new StaffGroup \with {
    \consists "Instrument_name_engraver"
    instrumentName = "Electric guitar"
  } <<
    \new Staff \with {
      midiInstrument = "overdriven guitar"
      \override StaffSymbol.staff-space = #(magstep 2)
    } { \clef "treble_8" \electricGuitar }
    \new TabStaff \with {
      stringTunings = #guitar-tuning
    } \electricGuitar
  >>
  \layout {
    #(layout-set-staff-size 25)
    \omit StringNumber


  }

}



\score {
  \new Staff {
    \set Staff.midiInstrument = #"overdriven guitar"
    \midiscore
  }
  \midi {
    \tempo 1 = 20
  }
}





Reply via email to