Re: new feature: accordion registers update

2021-01-18 Thread Davide Bonetti
 \stdBassSq "SAC" "\stdBassSq \"SAC\""
  \vspace #1
  \stdBassSq "SAT" "\stdBassSq \"SAT\""
  \vspace #1
  \stdBassSq "SAB" "\stdBassSq \"SAB\""
  \vspace #1
  \stdBassSq "SCT" "\stdBassSq \"SCT\""
  \vspace #1
  \stdBassSq "SCB" "\stdBassSq \"SCB\""
  \vspace #1
  \stdBassSq "STB" "\stdBassSq \"STB\""
  \vspace #1
  \stdBassSq "ACT" "\stdBassSq \"ACT\""
  \vspace #1
  \stdBassSq "ACB" "\stdBassSq \"ACB\""
  \vspace #1
  \stdBassSq "ATB" "\stdBassSq \"ATB\""
  \vspace #1
  \stdBassSq "CTB" "\stdBassSq \"CTB\""
}
\hspace #3
\center-column {
  \stdBassSq "SACT" "\stdBassSq \"SACT\""
  \vspace #1
  \stdBassSq "SACB" "\stdBassSq \"SACB\""
  \vspace #1
  \stdBassSq "SATB" "\stdBassSq \"SATB\""
  \vspace #1
  \stdBassSq "SCTB" "\stdBassSq \"SCTB\""
  \vspace #1
  \stdBassSq "ACTB" "\stdBassSq \"ACTB\""
}
\hspace #3
\center-column {
  \stdBassSq "SACTB" "\stdBassSq \"SACTB\""
}
  }
}

\markup
\column{
  \bold "Accordion Registers: Standard Bass IV"
  \vspace #1
  \line{
\center-column {
  \stdBassIV "S" "\stdBassIV \"S\""
  \vspace #1
  \stdBassIV "A" "\stdBassIV \"A\""
  \vspace #1
  \stdBassIV "T" "\stdBassIV \"T\""
  \vspace #1
  \stdBassIV "B" "\stdBassIV \"B\""
}
\hspace #3
\center-column {
  \stdBassIV "SA" "\stdBassIV \"SA\""
  \vspace #1
  \stdBassIV "ST" "\stdBassIV \"ST\""
  \vspace #1
  \stdBassIV "SB" "\stdBassIV \"SB\""
  \vspace #1
  \stdBassIV "AT" "\stdBassIV \"AT\""
  \vspace #1
  \stdBassIV "AB" "\stdBassIV \"AB\""
  \vspace #1
  \stdBassIV "TB" "\stdBassIV \"TB\""
}
\hspace #3
\center-column {
  \stdBassIV "SAT" "\stdBassIV \"SAT\""
  \vspace #1
  \stdBassIV "SAB" "\stdBassIV \"SAB\""
  \vspace #1
  \stdBassIV "STB" "\stdBassIV \"STB\""
  \vspace #1
  \stdBassIV "ATB" "\stdBassIV \"ATB\""
}
\hspace #3
\center-column {
  \stdBassIV "SATB" "\stdBassIV \"SATB\""
}
  }
}


\markup
\column{
  \vspace #1
  \bold "Accordion Registers: Standard Bass IV - square symbol"
  \vspace #1
  \line{
\center-column {
  \stdBassIVSq "S" "\stdBassIVSq \"S\""
  \vspace #1
  \stdBassIVSq "A" "\stdBassIVSq \"A\""
  \vspace #1
  \stdBassIVSq "T" "\stdBassIVSq \"T\""
  \vspace #1
  \stdBassIVSq "B" "\stdBassIVSq \"B\""
}
\hspace #3
\center-column {
  \stdBassIVSq "SA" "\stdBassIVSq \"SA\""
  \vspace #1
  \stdBassIVSq "ST" "\stdBassIVSq \"ST\""
  \vspace #1
  \stdBassIVSq "SB" "\stdBassIVSq \"SB\""
  \vspace #1
  \stdBassIVSq "AT" "\stdBassIVSq \"AT\""
  \vspace #1
  \stdBassIVSq "AB" "\stdBassIVSq \"AB\""
  \vspace #1
  \stdBassIVSq "TB" "\stdBassIVSq \"TB\""
}
\hspace #3
\center-column {
  \stdBassIVSq "SAT" "\stdBassIVSq \"SAT\""
  \vspace #1
  \stdBassIVSq "SAB" "\stdBassIVSq \"SAB\""
  \vspace #1
  \stdBassIVSq "STB" "\stdBassIVSq \"STB\""
  \vspace #1
  \stdBassIVSq "ATB" "\stdBassIVSq \"ATB\""
}
\hspace #3
\center-column {
  \stdBassIVSq "SATB" "\stdBassIVSq \"SATB\""
}
  }
}

\markup
\column{
  \vspace #1
  \bold "Accordion Registers: Free Bass"
  \vspace #1
  \line{
\center-column{
  \freeBass "1" "\freeBass \"1\""
}
\hspace #3
\center-column {
  \freeBass "10" "\freeBass \"10\""
}
\hspace #3
\center-colum

Re: new feature: accordion registers update

2021-01-17 Thread Davide Bonetti



Il 18/01/2021 00:49, David Kastrup ha scritto:

Davide Bonetti  writes:

At first glance, it would appear that all of those changes are intended
to be upwards-compatible.  As such it would not make a lot of sense to
place them in a separate, different file rather than extend the existing
one.  Or am I overlooking something?


Hi!

I placed them on a different file just to mantain the original file in
my version of lilypond.

If the changes are approved, the best thing is to place them in accreg.scm

Davide


--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus




new feature: accordion registers update

2021-01-17 Thread Davide Bonetti

Hello to everyone.

I have updated the accordion registers that are in accreg.scm.

I modified accreg.scm and renamed in "accregtwo.scm". This file must be 
placed in lilypond usr/share/lilypond/current/scm directory in order to 
make it work.


also, at the top of a input file is necessary to put:

#(use-modules (scm accregtwo))

Here attached also accreg.ly and accreg.pdf that demonstates the new 
registers.


List of changes

- \discant
    - added common names for registers, such as "bassoon", "musette", 
"organ", etc.
    - added new positions available for accordions with double bassoon 
or double piccolo, every combination is now possible


- \stdBass
    - added a method to choose every combination possible, based on the 
first letter of the reed banks: S A C T B


- \stdBassIV
    - added a method to choose every combination possible, based on the 
first letter of the reed banks: S A T B


- the feta font did not contain any square symbol for standard bass 
accordion registers, so I create this symbol with a markup command, 
named \accordionStdBassSq.
    The new symbol have the same dimensions of \stdBass round symbol, 
and is scalable (it responds at fontsize modifications in the same way 
of a glyph).
    Maybe is possible to create a new glyph for the feta font, but I'm 
not able to do it.
    In accregtwo.scm the code of accreg.scm is modified so it can 
accept the new markup command.


- \stdBassSq
    - new markup command, same of stdBass with square symbol, as 
commonly used in accordion notation.

    based on \accordionStdBassSq

- \stdBassIVSq
    - new markup command, same of stdBassIV with square symbol, as 
commonly used in accordion notation.

    based on \accordionStdBassSq

- \freeBassIII
    - new markup command for accordions with free bass in III, using 
the feta font accordion.bayanbass


- updated the documentation included in the file.

Everything seems to work well.

Testers are welcome!

Question: is there a way to make it work without putting the new file in 
lilypond /scm directory?


Question 2: it is possible that this will become part of an official 
release?


Thaks to all and best regards

Davide Bonetti



--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
;;;; based on accreg.scm
 modified by Davide Bonetti
 d...@davidebonetti.it


 This file is part of LilyPond, the GNU music typesetter.

 Copyright (C) 2013--2020 David Kastrup 

 LilyPond is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 LilyPond is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.


;; Accordion registration is tricky, partly because no two instruments
;; offer the same registers.  In particular bass registers are not
;; standardized at all and often left unspecified (orchestra scores
;; don't use bass notes anyway).
;;
;; registration is indicated by using a control sequence name
;; indicating the register set as either a markup function or a music
;; function, taking a string as argument.  The music function is a
;; standalone music event since register changes usually occur before
;; note onset.  It is currently implemented as a text superscript on
;; an empty chord but could conceivably become some kind of per-staff
;; rehearsal mark at one point of time.

(define-module (scm accregtwo))

(use-modules (lily) (srfi srfi-1) (ice-9 optargs))

(define-markup-command (accordionStdBassSq layout props) ()
  #:category accordion-registers
  "New markup command to have a square symbol for standard bass registers"
  (interpret-markup layout props
#{
  \markup
  \override #'(box-padding . 0)
  \translate-scaled #'(-2 . .1)
  \combine
  \combine
  \combine
  \box \combine
  \null
  \translate-scaled #'(3.9 . .9) \null
  \translate-scaled #'(0 . 1)
  \box \combine
  \null
  \translate-scaled #'(3.9 . .9) \null
  \translate-scaled #'(0 . 2)
  \box \combine
  \null
  \translate-scaled #'(3.9 . .9) \null
  \translate-scaled #'(0 . 3)
  \box \combine
  \null
  \translate-scaled #'(3.9 . .9) \null
#}))

(defmacro* define-register-set (set-symbol doc #:optional definition)
  "Defines markup command named with @var{set-symbol} for creating
accordion register markups as well as a music function of the same
name.

@var{doc} is the optional docum

Re: split chord in two staves, split multiple voices in two staves

2021-01-07 Thread Davide Bonetti

Thank you Thomas,

I'll test your code.

Cheers

Davide

Il 07/01/2021 11:55, Thomas Morley ha scritto:


Am Do., 7. Jan. 2021 um 11:28 Uhr schrieb Davide Bonetti 
:

Hi,

I am working on accordion left-hand educational scores;

I need to split chords (entered with chordmode) in two staves, and I
also need to split multiple voices (4 or more) in two staves.

I am trying to find a way to do this automatically, because I have much
material to work with.

I have tried \autochange, but the result is not what I am searching.

Attached is a minimal example, just to have an idea.

\version "2.20.0"

% autochange example with a chord
\markup "autochange example with a chord"
\score {
\new PianoStaff
\with {instrumentName = #"1"}
\autochange
\chordmode {c:/g}
}

% autochange example with multiple voices
\markup "autochange example with multiple voices"
\score {
\new PianoStaff
\with {instrumentName = #"2"}
\autochange
<<
  \autochange {e'}
  \\
  \autochange {g}
  \\
  \autochange {c'}
>>
}

% desidered result
\markup "desidered result"
\score{
\new PianoStaff
\with {instrumentName = #"3"}
\autochange
<<
  \autochange 
  \\
  \autochange {g}
>>
}

Thank you and best regards.

Davide Bonetti



--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus

Here
https://lists.gnu.org/archive/html/lilypond-user/2020-12/msg00186.html
I posted some code, with the request for testers. No reply so far.

You may be the first tester then ...

Cheers,
   Harm


--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus




split chord in two staves, split multiple voices in two staves

2021-01-07 Thread Davide Bonetti

Hi,

I am working on accordion left-hand educational scores;

I need to split chords (entered with chordmode) in two staves, and I 
also need to split multiple voices (4 or more) in two staves.


I am trying to find a way to do this automatically, because I have much 
material to work with.


I have tried \autochange, but the result is not what I am searching.

Attached is a minimal example, just to have an idea.

\version "2.20.0"

% autochange example with a chord
\markup "autochange example with a chord"
\score {
  \new PianoStaff
  \with {instrumentName = #"1"}
  \autochange
  \chordmode {c:/g}
}

% autochange example with multiple voices
\markup "autochange example with multiple voices"
\score {
  \new PianoStaff
  \with {instrumentName = #"2"}
  \autochange
  <<
    \autochange {e'}
    \\
    \autochange {g}
    \\
    \autochange {c'}
  >>
}

% desidered result
\markup "desidered result"
\score{
  \new PianoStaff
  \with {instrumentName = #"3"}
  \autochange
  <<
    \autochange 
    \\
    \autochange {g}
  >>
}

Thank you and best regards.

Davide Bonetti



--
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
\version "2.20.0"


% autochange example with a chord
\markup "autochange example with a chord"
\score {
  \new PianoStaff
  \with {instrumentName = #"1"}
  \autochange 
  \chordmode {c:/g}
}

% autochange example with multiple voices
\markup "autochange example with multiple voices"
\score {
  \new PianoStaff
  \with {instrumentName = #"2"}
  \autochange
  <<
\autochange {e'}
\\
\autochange {g}
\\
\autochange {c'}
  >>
}

% desidered result
\markup "desidered result"
\score{
  \new PianoStaff
  \with {instrumentName = #"3"}
  \autochange 
  <<
\autochange 
\\
\autochange {g}
  >>
}

autochange minimal example.pdf
Description: Adobe PDF document


Ukulele fretboards

2019-01-06 Thread Davide Bonetti

Hello everyone.
I worked on ukulele fretboards, fixing errors and adding new predefined
fretboards.
Here the result of my work.
Regards
Davide



---
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
\version "2.18.0"
\include "predefined-ukulele-fretboards.ly"


mychords = \chordmode {
  c1 c:m c:aug c:dim c:7 c:maj7 c:m7 c:6 c:m6 \break
  c:m6- c:m7+ c:m7.5- c:dim7 c:sus2 c:sus4 c:7sus4 c:9 c:7.9- \break
}

chordsline = {
  \mychords
  \transpose c cis {
\mychords
  }
  \transpose c des {
\mychords
  }
  \transpose c d {
\mychords
  }
  \transpose c dis {
\mychords
  }
  \transpose c ees {
\mychords
  }
  \transpose c e {
\mychords
  }
  \transpose c f {
\mychords
  }
  \transpose c fis {
\mychords
  }
  \transpose c ges {
\mychords
  }
  \transpose c g {
\mychords
  }
  \transpose c gis {
\mychords
  }
  \transpose c aes {
\mychords
  }
  \transpose c a {
\mychords
  }
  \transpose c ais {
\mychords
  }
  \transpose c bes {
\mychords
  }
  \transpose c b {
\mychords
  }
}

\score {
  <<
\new ChordNames {
  \chordsline
}
\new FretBoards {
  \set Staff.stringTunings = #ukulele-tuning
  \chordsline
}
  >>
  \layout {
indent = 0
\context {
  \Score
  \remove "Bar_number_engraver"
}
  }
} This file is part of LilyPond, the GNU music typesetter.

 Copyright (C) 2009--2015 Matt Corks 

 LilyPond is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 LilyPond is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with LilyPond.  If not, see .

\version "2.18.0"

 sources:
   ukulele hall of fame museum website (http://www.ukulele.org/),
   kiwi ukulele website (http://www.kiwiukulele.co.nz/)

% chord definitions require default pitchnames
\languageSaveAndChange #default-language

%%% a chords

\storePredefinedDiagram #default-fret-table \chordmode {a}
#ukulele-tuning
#"2-2;1-1;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:m}
#ukulele-tuning
#"2-2;o;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:7}
#ukulele-tuning
#"o;1-1;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:m7}
#ukulele-tuning
#"o;o;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:dim7}
#ukulele-tuning
#"2-1;3-3;2-2;3-4;"

\storePredefinedDiagram #default-fret-table \chordmode {a:maj7}
#ukulele-tuning
#"1-1;1-2;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:6}
#ukulele-tuning
#"2-1;4-3;2-2;4-4;"

\storePredefinedDiagram #default-fret-table \chordmode {a:sus2}
#ukulele-tuning
#"2-1;4-3;o;2-2;"

\storePredefinedDiagram #default-fret-table \chordmode {a:sus4}
#ukulele-tuning
#"2-1;2-2;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:aug}
#ukulele-tuning
#"2-3;1-1;1-2;O;"

\storePredefinedDiagram #default-fret-table \chordmode {a:9}
#ukulele-tuning
#"o;1-1;o;2-2;"

\storePredefinedDiagram #default-fret-table \chordmode {a:dim}
#ukulele-tuning
#"2-1;3-2;5-4;3-4;"

\storePredefinedDiagram #default-fret-table \chordmode {a:m6}
#ukulele-tuning
#"2-1-(;4-3;2-1-);3-2;"

\storePredefinedDiagram #default-fret-table \chordmode {a:m6-}
#ukulele-tuning
#"2-2;4-4;1-1;3-3;"

\storePredefinedDiagram #default-fret-table \chordmode {a:m7.5-}
#ukulele-tuning
#"2-1;3-2-(;3-2;3-2-);"

\storePredefinedDiagram #default-fret-table \chordmode {a:m7+}
#ukulele-tuning
#"1-1;o;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:7sus4}
#ukulele-tuning
#"o;2-2;o;o;"

\storePredefinedDiagram #default-fret-table \chordmode {a:7.9-}
#ukulele-tuning