On 11 January 2018 at 11:25, Sebastian Menge <s.me...@gmx.de> wrote:

> Thanks Gianmaria, thanks for this. VerY interesting! The output looks
> good, but I would to change it a bit. I have to learn a little scheme for
> this as it seems.
>
> Btw: I have frequent challenges when writing for accordion and wonder if I
> am the only one. Examples are:
>
> - Registers (current module can be improved)
> - Stradella bass
> - Specific signs for bellows related stuff like signs for changing
> pull/push (like breathing), Vibrato, Bellowsshake
>
> Are there instrument specific sub communities ??
>
> Thanks, Sebastian!
>

Ciao Sebastian,

I have very modest competence in lilypond. I have rewritten many pieces for
accordion with lilypond but just for my personal use (well, not really for
me, for my daughter). My first interest is about midi output and this is
surely not the first lilypond goal. Anyway, regarding your questions: I
wrote something to make easier writing using "standard" bass accordion
notation for stradella bass system. It is in the attached file
AccordionStandardBass.ly.

The file test2.ly is an example.

The basic idea was write just one command to generate the "standard" bass
accordion notation for chords and also generate the corresponding midi
output.
For example this code:

  \xco \xcM \removeWithTag #'chordLetter {\xcM \xcM }

will render this:

[image: Inline images 1]

and at the same time generate this midi output

[image: Inline images 2]

My solution has a lot of limitations but it works for what I need. And
today I could probably improve it. Sorry also for the naming (xco, xcM etc.
etc.). These should also be refactored.

Try it, if you're interested I will be happy to explain more and better,
how to use it.

Best regards, g.
P.S. Sorry if I put the image "in the email" and I didn't attached them.
Let me know if this is always a bad netiquette. I found it much more
practical for the readers having text and related image near each other.
\version "2.19.49"


% Accordion Standard Bass library
% Last change: 2016 Nov 9

\tagGroup #'(screenOut midiOut)
% These definitions are to use when need "chord type letter" on chord
% majorChordLetter = -\tag#'chordLetter _\tweak #'direction #UP _\markup {M}
% minorChordLetter = -\tag#'chordLetter _\tweak #'direction #UP _\markup {m}
% dominantSeventhChordLetter = -\tag#'chordLetter _\tweak #'direction #UP _\markup {7}
% diminishedSeventhChordLetter = -\tag#'chordLetter _\tweak #'direction #UP _\markup {d}

% These definitions are to use when need "chord type letter" on note
majorChordLetter = -\tag#'chordLetter ^\markup {M}
minorChordLetter = -\tag#'chordLetter ^\markup {m}
dominantSeventhChordLetter = -\tag#'chordLetter ^\markup {7}
diminishedSeventhChordLetter = -\tag#'chordLetter ^\markup {d}

majorChord = \chordmode {a}
minorChord = \chordmode {a:m}
dominantSeventhChord = \chordmode {a:7^5}
diminishedSeventhChord = \chordmode {a:m7^5}

%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = bes,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xbeso = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xbesM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xbesm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xbess = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xbesd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xbesr = {<<\xbeso \xbesM>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = b,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xbo = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xbM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xbm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xbs = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xbd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xbr = {<<\xbo \xbM>>}
xbrs = {<<\xbo \xbs>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = c

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xco = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xcM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xcm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xcs = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xcd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xcr = {<<\xco \xcM>>}
xcrs = {<<\xco \xcs>>}


%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = cis

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xciso = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xcisM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xcism = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xciss = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xcisd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xcisr = {<<\xco \xcM>>}
xcisrs = {<<\xco \xcs>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = d,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xdo = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xdM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xdm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xds = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xdd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xdr = {<<\xdo \xdM>>}

xdrs = {<<\xdo \xds>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = e,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xeo = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xeM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xem = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xes = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xed = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xer = {<<\xeo \xeM>>}
xerm = {<<\xeo \xem>>}
xers = {<<\xeo \xes>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = f,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xfo = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xfM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xfm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xfs = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xfd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xfr = {<<\xfo \xfM>>}
xfrs = {<<\xfo \xfs>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = fis,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xfiso = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xfisM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xfism = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xfiss = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xfisd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xfisr = {<<\xfo \xfM>>}

%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = g,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xgo = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xgM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xgm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xgs = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xgd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xgr = {<<\xgo \xgM>>}

xgrs = {<<\xgo \xgs>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = a,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xao = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xaM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xam = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xas = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xad = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xar = {<<\xao \xaM>>}

xarm = {<<\xao \xam>>}

xars = {<<\xao \xas>>}

%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = g,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xgo = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xgM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xgm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xgs = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xgd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xgr = {<<\xgo \xgM>>}

xgrs = {<<\xgo \xgs>>}
%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = aes,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xaeso = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xaesM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xaesm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xaess = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xaesd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xaesr = {<<\xao \xaM>>}

xaesrm = {<<\xao \xam>>}

xaesrs = {<<\xao \xas>>}


%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = ees,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xeeso = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xeesM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xeesm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xeess = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xeesd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xeesr = {<<\xao \xaM>>}

xeesrm = {<<\xao \xam>>}

xeesrs = {<<\xao \xas>>}


%%% *** %%% *** %%% *** %%% *** %%% *** %%% *** %%%
rootNote = ges,

rootNoteExp = { \rootNote} 
rootNoteDouble = {<\rootNote' \rootNote>}
midiMajorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \majorChord}
midiMinorChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \minorChord}
midiDominantSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \dominantSeventhChord}
midiDiminishedSeventhChord = \chordmode {\transpose a #(car (event-chord-pitches rootNoteExp)) \diminishedSeventhChord}

screenMajorChord = {\rootNote' \majorChordLetter}
screenMinorChord = {\rootNote' \minorChordLetter}
screenDominantSeventhChord = {\rootNote' \dominantSeventhChordLetter}
screenDiminishedSeventhChord = {\rootNote' \diminishedSeventhChordLetter}

xgeso = {\tag #'midiOut \rootNoteDouble 
      \tag #'screenOut \rootNoteExp }

xgesM = {\tag #'midiOut \midiMajorChord 
       \tag #'screenOut \screenMajorChord }

xgesm = {\tag #'midiOut \midiMinorChord
       \tag #'screenOut \screenMinorChord}

xgess = {\tag #'midiOut \midiDominantSeventhChord
       \tag #'screenOut \screenDominantSeventhChord}

xgesd = {\tag #'midiOut \midiDiminishedSeventhChord
       \tag #'screenOut \screenDiminishedSeventhChord}

xgesr = {<<\xao \xaM>>}

xgesrm = {<<\xao \xam>>}

xgesrs = {<<\xao \xas>>}
%%%%%
% Counter-bass Finger: create the "\cf number" command to put a dash under the finger number
cf = 
#(define-event-function (arg) (number-or-markup?)
  #{ _\markup \underline \finger
     #(if (number? arg) (number->string arg) arg)
  #})
\version "2.19.80"
\include "AccordionStandardBass.ly"


rh = \fixed c' {
  \time 3/4
  \tempo 4=150
  \repeat unfold 10 r2.
}

lh = \fixed c {
  \clef bass\
  <>4_4 \xco <>4_3 \xcM \removeWithTag #'chordLetter \xcM
  <>4 \cf 4 \xeo <>4_3 \xcM \removeWithTag #'chordLetter \xcM
  <>4 \cf 4 \xeo <>4_3 \xcM \removeWithTag #'chordLetter \xcM
  <>4_4 \xco <>4_3 \xcM \removeWithTag #'chordLetter \xcM
  <>4_3 \xdo <>4_2 \xgs \removeWithTag #'chordLetter \xgs
  <>4_4 \xgo <>4_2 \xgs \removeWithTag #'chordLetter \xgs
  <>4 \cf 4 \xbo <>4_2 \xgs \removeWithTag #'chordLetter \xgs
  <>4_4 \xgo <>4_2 \xgs \removeWithTag #'chordLetter \xgs
  <>4_4 \xco <>4_3 \xcM \removeWithTag #'chordLetter \xcM
  <>4_2 \xgo <>4_3 \xcM \removeWithTag #'chordLetter \xcM
}


\score 
{  
  \new PianoStaff 
  <<
    \new Staff = "right" {\rh}    
    \new Staff = "left"  {\keepWithTag #'screenOut \lh}
  >>
  \layout { }
}

\score {
  \new PianoStaff 
  <<
    \new Staff = "right" \with { midiInstrument = "accordion"} {\rh}
    \new Staff = "left" \with { midiInstrument = "accordion"} {\keepWithTag #'midiOut \lh}
  >>
  \midi { }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to