Re: new feature: accordion registers update

2021-01-18 Thread Werner LEMBERG


> the rectangular boxes are vertically centered, at least on my
> screen.  Can you check it?

Yes, they are now, thanks!  I've checked with extreme magnification
using `gv`.


   Werner



Re: new feature: accordion registers update

2021-01-18 Thread Davide Bonetti


Il 18/01/2021 09:15, Werner LEMBERG ha scritto:

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?

Besides this I wonder whether it is intentional that the dots in the
rectangular boxes are not vertically centered.


 Werner

Thanks Werner and David.

Here the updated version:

the scm file is named accreg.scm,

the rectangular boxes are vertically centered, at least on my screen.
Can you check it?

Davide



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


#(use-modules (scm accreg))

\markup
{
  \column {
\bold "Accordion registers - Discant"
\vspace #1
\bold "Common register names"
\vspace #1
\line{
  \center-column{
\discant "bassoon" "\discant \"bassoon\""
\vspace #1
\discant "clarinet" "\discant \"clarinet\""
\vspace #1
\discant "piccolo" "\discant \"piccolo\""
\vspace #1
\discant "bandoneon" "\discant \"bandoneon\""
  } \hspace #3
  \center-column {
\discant "oboe" "\discant \"oboe\""
\vspace #1
\discant "organ" "\discant \"organ\""
\vspace #1
\discant "harmonium" "\discant \"harmonium\""
\vspace #1
\discant "violin" "\discant \"violin\""
  } \hspace #3
  \center-column {
\discant "celeste" "\discant \"celeste\""
\vspace #1
\discant "accordion" "\discant \"accordion\""
\vspace #1
\discant "false musette" "\discant \"false musette\""
\vspace #1
\discant "master IV" "\discant \"master IV\""
  } \hspace #3
  \center-column {
\discant "musette" "\discant \"musette\""
\vspace #1
\discant "master V" "\discant \"master V\""
\vspace #1
  }
}
\vspace #1
\bold "Basic system explanation"
\vspace #1
\line{
  \center-column{
\discant "1" "\discant \"1\""
\vspace #1
\discant "11" "\discant \"11\""
  } \hspace #3
  \center-column {
\discant "10" "\discant \"10\""
\vspace #1
\discant "110" "\discant \"110\""
  } \hspace #3
  \center-column {
\discant "100" "\discant \"100\""
\vspace #1
\discant "101" "\discant \"101\""
  } \hspace #3
  \center-column {
\discant "111" "\discant \"111\""
  }
}
\vspace #1
\line{
  \center-column{
\bold "units: low octave"
\vspace #1
\discant "1" "\discant \"1\""
\vspace #1
\discant "1+" "\discant \"1+\""
\vspace #1
\discant "1-" "\discant \"1-\""
\vspace #1
\discant "2" "\discant \"2\""
  } \hspace #3
  \center-column {
\bold "tens: mid octave"
\vspace #1
\discant "10" "\discant \"10\""
\vspace #1
\discant "1+0" "\discant \"1+0\""
\vspace #1
\discant "1-0" "\discant \"1-0\""
\vspace #1
\discant "20" "\discant \"20\""
\vspace #1
\discant "2+0" "\discant \"2+0\""
\vspace #1
\discant "2-0" "\discant \"2-0\""
\vspace #1
\discant "30" "\discant \"30\""
  } \hspace #3
  \center-column {
\bold "hundreds: high octave"
\vspace #1
\discant "100" "\discant \"100\""
\vspace #1
\discant "1+00" "\discant \"1+00\""
\vspace #1
\discant "1-00" "\discant \"1-00\""
\vspace #1
\discant "200" "\discant \"200\""
  }
}
\vspace #1
\bold "All combinations of units, tens and hundreds are possible"
  }
}

\pageBreak

\markup
{
  \column {
\bold "Accordion registers - Discant - page 2"
\vspace #1
\bold "IV accordion with piccolo"
\vspace #1
\line{
  \center-column{
\discant "1" "\discant \"1\""
\vspace #1
\discant "10" "\discant \"10\""
\vspace #1
\discant "1+0" "\discant \"1+0\""
\vspace #1
\discant "11" "\discant \"11\""
  } \hspace #3
  \center-column {
\discant "1+1" "\discant \"1+1\""
\vspace #1
\discant "2+0" "\discant \"2+0\""
\vspace #1
\discant "2+1" "\discant \"2+1\""
\vspace #1
\discant "100" "\discant \"100\""
  } \hspace #3
  \center-column {
\discant "101" "\discant \"101\""
\vspace #1
\discant "110" "\discant \"110\""
\vspace #1
\discant "11+0" "\discant \"11+0\""
\vspace #1
\discant "12+0" "\discant \"12+0\""
  } \hspace #3
  \center-column {
\discant "111" "\discant \"111\""
\vspace #1
\discant "11+1" "\discant \"11+1\""
\vspace #1
\discant "12+1" "\discant \"12+1\""
  }

Re: new feature: accordion registers update

2021-01-18 Thread Werner LEMBERG


>> I have updated the accordion registers that are in accreg.scm.
>> [...]
> 
> 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?

Besides this I wonder whether it is intentional that the dots in the
rectangular boxes are not vertically centered.


Werner



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




Re: new feature: accordion registers update

2021-01-17 Thread David Kastrup
Davide Bonetti  writes:

> 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.

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?

-- 
David Kastrup



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 .


;; 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 documentation string followed by the actual
@var{definition}.  See exist