Re: Single bass notes in chordmode
> Am 24.06.2020 um 16:07 schrieb Henning Hraban Ramm : > > >> Am 24.06.2020 um 15:01 schrieb David Kastrup : >> >> Henning Hraban Ramm writes: >> >>> In some of my songbooks, the chord line (for guitar) is interrupted by >>> single bass notes, i.e. you are supposed to play only these strings. >>> >>> The notation is mostly a smallcaps letter with a bar above (or a small >>> x below), but a simple /G would be enough if it isn’t possible >>> otherwise. >>> >>> And I’d like to have that bass note also in MIDI output. >>> >>> Is this possible, and how? >>> >>> Preferred syntax: r/g or s/g >> >> Try . You'll still need to fiddle with the chord naming function. > > Ah, thanks for the hint. > > I found a snippet to add brackets to a chord: > ... > > Now, how can I use markup like \tiny or \circle within that (markup ...) ? Ok, I found http://lilypond.org/doc/v2.20/Documentation/extending/markup-construction-in-scheme That lead me to: #(define (bassNote grob) "mark chord as single bass note" (let* ( ; Get current text (currentText (ly:grob-property grob 'text)) (markedText (markup #:small #:fraction "" currentText ))) ; Store the marked text back (ly:grob-set-property! grob 'text markedText) ) ; and print it (ly:text-interface::print grob)) % bnC = bass note "chord" bnC = \once \override ChordNames.ChordName.stencil = #bassNote Now my syntax is: \bnC 4 \bnC A bit verbose, but since I need it only for a few songs, it’s good enough. Hraban
Re: Single bass notes in chordmode
> Am 24.06.2020 um 15:01 schrieb David Kastrup : > > Henning Hraban Ramm writes: > >> In some of my songbooks, the chord line (for guitar) is interrupted by >> single bass notes, i.e. you are supposed to play only these strings. >> >> The notation is mostly a smallcaps letter with a bar above (or a small >> x below), but a simple /G would be enough if it isn’t possible >> otherwise. >> >> And I’d like to have that bass note also in MIDI output. >> >> Is this possible, and how? >> >> Preferred syntax: r/g or s/g > > Try . You'll still need to fiddle with the chord naming function. Ah, thanks for the hint. I found a snippet to add brackets to a chord: #(define (addBrackets grob) "Place brackets around a text object." (let* ( ; Get current text (currentText (ly:grob-property grob 'text)) (bracketedText (markup "(" currentText ")"))) ; Store the bracketed text back (ly:grob-set-property! grob 'text bracketedText) ) ; and print it (ly:text-interface::print grob)) % opC = optional chord (in brackets) opC = \once \override ChordNames.ChordName.stencil = #addBrackets Now, how can I use markup like \tiny or \circle within that (markup ...) ? Best, Hraban
Re: Single bass notes in chordmode
Henning Hraban Ramm writes: > Hi, > this was already asked in 2012 (by me) and 2015 (by someone else), but > there was no answer. I hope it’ll work this time ;) > > In some of my songbooks, the chord line (for guitar) is interrupted by > single bass notes, i.e. you are supposed to play only these strings. > > The notation is mostly a smallcaps letter with a bar above (or a small > x below), but a simple /G would be enough if it isn’t possible > otherwise. > > And I’d like to have that bass note also in MIDI output. > > Is this possible, and how? > > > Preferred syntax: r/g or s/g Try . You'll still need to fiddle with the chord naming function. > Because a rest with a bass is only bass. > > E.g. > \chordmode { > a2:m r4/g r/f | > g2 a:m | > a:m r4/f r/g | > g2 f | > d:m f | > g r4/g r8/c r/b | > a2:m a:m | > } > > > Best regards, > Hraban > > > -- David Kastrup