Re: Suppressing a voice in the midi output

2023-09-27 Thread Sandro Santilli
Karsten, a new answer to your question arrived 5 years later,
thanks to Stephen. I thought it would be useful to share back
in the mailing list :)

Ref:
https://lists.gnu.org/archive/html/lilypond-user/2019-12/msg00276.html

On Sun, Sep 24, 2023 at 03:16:59PM -0700, Stephen Riddle wrote:
> Hi Sandro
> 
> I'm not a member of the news list where you posted this (five years ago)
> 
> but this is what I would have answered,
> 
> I have found  either all on or all off midi settings kind of awkward myself.
> 
> Use the \with command when you start a new voice or staff or chordNames or
> whatever: chordProgression = \chordmode { c1:sus2  \(  c1 c1:sus2 c1 \) }
> 
>  \new ChordNames \with { \remove "Staff_performer"  }{ \chordProgression }
>  \new Staff \with {  \remove "Staff_performer" } { \chordProgression }
> \new Staff { c'4 d' e' c'' b' c'' b' e'' d'' c'' d'' c''1 }
> 
> which shuts down midi output for a single context.
> 
> 
> Stephen



Re: Remote Ensemble Playing

2020-03-30 Thread Sandro Santilli
On Sat, Mar 28, 2020 at 11:00:56AM -, Peter Gentry wrote:
> I appreciate this is off topic but in these times of social isolation does
> anyone have any tips. Clearly latency is the main issue - I wonder could
> this be reduced by say hosting a Zoom meeting on a private router - maybe
> only one video for a conductor. Experience suggests that a latency of 25ms
> is not low enough.

The best experience I had with online playing was with ninjam:
https://www.cockos.com/ninjam/

It's an open protocol and free software implementation of a server
and a few clients (text, console, gui) for online jamming.

The idea is that everyone play on a tick (Beats Per Minute) and
everyone is ensured to always hear some previous recording of
anyone else on a defined cycle/interval (Beats Per Interval).

Depending on how the server is configured (easy to setup) the
BPM and BPI values can be fixed or driven by votes. Protocol
includes a chat and is text based for commands (like: "!vote bpm 60").

Some public servers do exist, which also support automatic recording
of resulting sessions ("autosong", the software doing this, is also
part of the main ninjam source code repository).

See http://ninbot.com/pubservers for a community curated list of
public servers. See top-level page for recordings of jams played
on ninbot.com servers.

An easy to setup QT based free software client is http://jamtaba.com

--strk;




Re: printing a tiny pianostaff at the beginning of a score

2020-02-18 Thread Sandro Santilli
On Tue, Feb 18, 2020 at 03:51:39PM +0100, Robin Bannister wrote:

> Here is an example (Mo' better Blues) using top-level markup.

Thanks, the \scale hint was very useful.
Doing it before the \score block isn't convenient as I'd have
to repeat the insertion in every book. Using markup
in header seems ok for now, I'd only need some proper alignment,
as I'm currently doing this wild thing:

  piece = \markup {
\italic "  With a beat  "
\scale #(cons 0.8 0.8)
\score {
  ...
}
  }

The spaces I'm using to move the tiny score more or less at
the center of the sheet, but is fragile. Also the "With a beat"
text position is too high, it would be nice to have better
control over it.

--strk;




Re: printing a tiny pianostaff at the beginning of a score

2020-02-18 Thread Sandro Santilli
On Tue, Feb 18, 2020 at 02:55:44PM +0100, David Kastrup wrote:

> \new Staff \with { \override StaffSymbol.line-count = #1
>  \omit Clef
>  \omit KeySignature
>  \omit TimeSignature
>  \omit LedgerLineSpanner
>  \omit BarLine
>  instrumentName = \markup \column { Gtr Bas }
>}
> << { \stemUp r4 r r d'' } \\ { \stemDown g'4 r8 g' g'4 r } >>
> 
> would appear to do the trick.  You can use that inside of a \score
> markup if necessary.  You have to see just which of the omitted material
> you'd rather have.

What happens if I prepend that staff to the rest of the lead sheet,
which starts with:

  leadSheet = {
<<
  \new ChordNames {
\harmony
  }
  .

Is that the new Staff continues instead of being interrupted.
I'd want it completely detached instead (and smaller).
Nice one, line-count, but I think I can deal with full staff as well.

--strk;



Re: printing a tiny pianostaff at the beginning of a score

2020-02-18 Thread Sandro Santilli
On Tue, Feb 18, 2020 at 12:46:46PM +0100, Lukas-Fabian Moser wrote:
> Hi Sandro,
> 
> > I'd like to leave some indications (rythmic, mostly)
> > for bass and guitar at the start of a piece. Right now
> > I'm doing this with a pencil, but I'm wondering how
> > to do it with lilypond. It could be a smaller PianoStaff,
> > on a line by itself. How could this be done ?
> 
> Can you provide a small image of what you want to achieve? Then I'm sure
> some of the helpful folks on this list will be able to lend you a hand.

Here's a picture: http://strk.kbt.io/tmp/IMG_20200218_123321.jpg

--strk;



printing a tiny pianostaff at the beginning of a score

2020-02-18 Thread Sandro Santilli
I'd like to leave some indications (rythmic, mostly)
for bass and guitar at the start of a piece. Right now
I'm doing this with a pencil, but I'm wondering how
to do it with lilypond. It could be a smaller PianoStaff,
on a line by itself. How could this be done ?

Thanks in advance

--strk; 



Re: hiding chord symbols while keeping them in midi

2020-02-05 Thread Sandro Santilli
On Wed, Feb 05, 2020 at 10:02:15AM -0500, Kieren MacMillan wrote:
> Hi Sandro,
> 
> > When a chord is repeated in next measure I'd like it NOT to be printed
> > but still be played in midi. What options do I have to do this ?
> 
> Have you read 
> ?
> In particular, the first item in the "Snippets" section…  ;)

Chord changes ! Great, thanks a lot !

--strk;



hiding chord symbols while keeping them in midi

2020-02-05 Thread Sandro Santilli
When a chord is repeated in next measure I'd like it NOT to be printed
but still be played in midi. What options do I have to do this ?

--strk; 



Re: Specifying \language for a single book

2020-01-21 Thread Sandro Santilli
On Mon, Jan 20, 2020 at 01:45:41PM -0800, Aaron Hill wrote:

> \layout is your friend:

Thanks! Great stAff! :)

> \book {
>   \bookOutputSuffix "G"
>   \score {
> \transpose c b,
> \leadSheet
>   }
> }
> 
> \book {
>   \bookOutputSuffix "F-ita"
>   \score {
> \transpose c a,
> \leadSheet
> \layout { \context { \ChordNames \italianChords } }
>   }
> }



Re: Specifying \language for a single book

2020-01-20 Thread Sandro Santilli
On Sat, Jan 18, 2020 at 11:33:15AM -0700, Klaus Blum wrote:

> <<
>   \new ChordNames \chordmode { c1 a:m f g }
>   \new ChordNames \chordmode { \italianChords c1 a:m f g }
>   \new Staff { \clef bass c1 a f g }
> >>
> 
> Does that help?

Yes, but I would ideally use an \override so to keep the existing
definition of my leadSheet. Here's what I have:

  \book {
\bookOutputSuffix "G"
\header { subtitle = "(G)" }
\score {
  \transpose c b
  \leadSheet
}
  }

  \book {
\bookOutputSuffix "F"
\header { subtitle = "(F)" }
\score {
  \transpose c a
  \leadSheet
}
  }

And what I'd like to add is something like this:

  \book {
\bookOutputSuffix "F-ita"
\header { subtitle = "(F)" }
\italianChords % <-- but doesn't work here
\score {
  \transpose c a
  \leadSheet
}
  }

--strk;



Specifying \language for a single book

2020-01-18 Thread Sandro Santilli
One musician I play with prefers reading DO RE MI FA
as chord symbols, but the rest of use still want C D E F...

Is it possible, and how, to specify \language only for
a specific /book section ?

--strk;



Re: Suppressing a voice in the midi output

2019-12-20 Thread Sandro Santilli
On Fri, Dec 20, 2019 at 10:41:26AM +0100, Sandro Santilli wrote:
> On Sun, Dec 15, 2019 at 12:56:22PM +0100, Karsten Reincke wrote:
> > Dear friends;
> > 
> > In the LilyPOnd tutorial I found the explanation how to assign each a voice 
> > a
> > separate midi channel = instrument 
> > 
> > http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files
> > 
> > Unfortunately, I have to prevent one / some voice(s) from being ingrated 
> > into the
> > midi file (because it only contains meta information which shall not be 
> > played).
> > 
> > Does anyone know how I can say that voice X shall not be converted into the 
> > midi
> > file? Or does any know how I could assign this voice 'a silent instrument'?
> 
> Would setting volume to zero be ok for your use case ? If so, try
> something like the following:
> 
> \new Staff \with {
>   midiInstrument = "muted trumpet"
>   midiMinimumVolume = #0.0
>   midiMaximumVolume = #0.0
> } {
>   \new Voice = "vocal" { \melody }
> }

Or simply create a different "book" for the midi, and only include
the voices you want... I often do this also because I want to
\unfoldRepeats and maybe add a \tripletFeel and most significantly
because I'm using transposed instruments which then need to be
transposed for the sake of MIDI output but not for reading...

--strk;



Re: Suppressing a voice in the midi output

2019-12-20 Thread Sandro Santilli
On Sun, Dec 15, 2019 at 12:56:22PM +0100, Karsten Reincke wrote:
> Dear friends;
> 
> In the LilyPOnd tutorial I found the explanation how to assign each a voice a
> separate midi channel = instrument 
> 
> http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files
> 
> Unfortunately, I have to prevent one / some voice(s) from being ingrated into 
> the
> midi file (because it only contains meta information which shall not be 
> played).
> 
> Does anyone know how I can say that voice X shall not be converted into the 
> midi
> file? Or does any know how I could assign this voice 'a silent instrument'?

Would setting volume to zero be ok for your use case ? If so, try
something like the following:

\new Staff \with {
  midiInstrument = "muted trumpet"
  midiMinimumVolume = #0.0
  midiMaximumVolume = #0.0
} {
  \new Voice = "vocal" { \melody }
}

--strk;



Re: programming error: note column without heads and stem

2019-12-02 Thread Sandro Santilli
On Sat, Nov 30, 2019 at 05:25:28PM +0100, Thomas Morley wrote:
> Am Fr., 29. Nov. 2019 um 12:11 Uhr schrieb Sandro Santilli :
> >
> > When using \partcombine I'm getting 3 of these errors:
> >
> >   programming error: note column without heads and stem
> >   continuing, cross fingers
> >
> > The errors doesn't tell which line/column they come from.
> > How can I debug it ?
>
> Took me 20 min to boil it down to a three lines minimal. That's _your_ task.
> No time left for searching a sollution ;)

Ok, sorry. The problem was this block:

  \layout {
\context { \Voice
  \consists "Ambitus_engraver"
}
  }

It looks like using an "Ambitus_engraver" with a \partcombine
results in that warning. I tried a \remove "Ambitus_engraver"
in the part-combined score but didn't work so I ended up moving
the \consist in each score in which I wanted the Ambitus engraver.

--strk;



programming error: note column without heads and stem

2019-11-29 Thread Sandro Santilli
When using \partcombine I'm getting 3 of these errors:

  programming error: note column without heads and stem
  continuing, cross fingers

The errors doesn't tell which line/column they come from.
How can I debug it ?

The source code is attached

--strk;

\version "2.18.2"

#(load "../lilylib/swing.scm")
\include "../lilylib/range.ly"
\include "../lilylib/parenthesis.ly"

\header {
title = "Sidewinder"
%year = "1935"

%poet = "DuBose Hayward"
    composer = "Lee Morgan"
%arranger = "arranged by Sandro Santilli"

%piece = "Funk (Pseudo Bossa)"

tagline = \markup {
  \column {
"Lilypond typesetting by Sandro Santilli  - https://strk.kbt.io - November 2019"
  }
}
}

% Giorgio Gadotti capabilities
giorgioGadottiRange = { d' b'' }
altoRange = \highlightPitches outside \giorgioGadottiRange

% Sandro Santilli capabilities as of 2019
sandroSantilliRange = { c' g'' }
trumpetRange = \highlightPitches outside \sandroSantilliRange

% Desy Vaselli capabilities (just a guess)
desyVaselliRange = { a g'' }
voiceRange = \highlightPitches outside \desyVaselliRange

bassRange = \highlightPitches outside \doubleBassDesignedWrittenRange

%#(set-global-staff-size 21)

\paper {
%indent = 0\cm
}

\layout {
  \override Glissando #'style = #'zigzag
  \set Score.markFormatter = #format-mark-box-alphabet
  \context { \Voice
\consists "Ambitus_engraver"
  }
}

% Available range: c' -- b''
melody_alto =  \relative c' {
  \clef "treble"
  \key c \major
  \numericTimeSignature
  \time 4/4

  r1 |

  \repeat volta 2 {

\repeat percent 2 { r4 dis-^ r8 e8-^ r4 | }
  r8 a,8 bes4 c d | a8 bes a g~ g2 |

% 6
\repeat percent 2 { r4 dis'-^ r8 e8-^ r4 | }
  r8 a,8 bes4 c d | dis8 e c bes r8 fis8 r4 |

% 10
\parenthesize
f4-- gis'-^ r8 a-^ r4 | r4 gis-^ r8 a-^ r4 |
  r8 d, ees f g f ees d | f c d ees~ ees \glissando g, f g |

% 14
c4-- dis-^ r8 e-^ r4 | r4 dis-^ r8 e-^ r4 |
  r8 g,8 a[ bes] c d4. | r8 e f[ fis] g a4. |

% 18
\repeat percent 2 { r4 f-^ r8 g-^ r4 | }
  r8 d e4 f fis | fis8 g f cis r cis g[ cis] |

% 22
c?4-- dis-^ r8 e-^ r4 | r4 dis-^ r8 e-^ r4 \bar "||"
  r4 r8 g,16 bes c8 c c16 g bes8 | c4-^ r8 bes~ bes g f g |
  }
}

melody_trp =  \relative c'' {
  \clef "treble"
  \key c \major
  \numericTimeSignature
  \time 4/4

  r1 |

  \repeat volta 2 {

\repeat percent 2 { r4 a-^ r8 bes-^ r4 | }
  r8 a bes4 c d | a8 bes a g~ g2 |

\repeat percent 2 { r4 a-^ r8 bes-^ r4 | }
  r8 a bes4 c d | dis8 e c bes r8 fis8 r4 |

% 10
\parenthesize
f4-- d'-^ r8 ees8-^ r4 | r4 d-^ r8 ees-^ r4 |
  r8 d ees f g f ees d |
  f c d ees~ ees \glissando g, f g |

% 14
c,4-- a'-^ r8 bes-^ r4 | r4 a-^ r8 bes8-^ r4 |
  r8 g a[ bes] c d4. | r8 e f[ fis] g a4. |

% 18
\repeat percent 2 { r4 d,-^ r8 e-^ r4 | }
  r8 d e4 f fis | fis8 g f cis r8 cis? g[ cis?] |

% 22
c?4-- a-^ r8 bes-^ r4 | r4 a-^ r8 bes-^ r4 \bar "||"
  r4 r8 g16 bes c8 c c16 g bes?8 | c4-^ r8 bes8~ bes g f g |
  }
}

melody_bass = \relative c' {
  \bassRange
  \clef "bass"
  \key c \major
  \numericTimeSignature
  \time 4/4

  r4 r8 g r f cis4 |

  \repeat volta 2 {

\repeat percent 4 { c4 r8 c g4 bes | }
% TODO: change notehead to slash
\repeat percent 4 { r4 b r8 c8 r4 | }

% TODO: change notehead to slash
\repeat percent 4 { r4 b r8 c8 r4 | }
\repeat percent 4 { r4 b r8 c8 r4 | }

% TODO: change notehead to slash
\repeat percent 4 { r4 b r8 c8 r4 | }
\repeat percent 2 { r4 b r8 c8 r4 | }

%TODO: change notehead to X
c4 r4 r2 | r1 |
  }
}



harmony_realbook =  \chords \with {
\consists Percent_repeat_engraver
\override PercentRepeat.Y-offset = 1
} {

  r1 |

  \repeat volta 2 {

\repeat percent 4 { b2:7 c:7 | }

\break

\repeat percent 4 { b2:7 c:7 | }

\bar "||"
\break

\repeat percent 4 { e2:7 f:7 | }

\break

\repeat percent 3 { b2:7 c:7 | }
e:m7.5- c:7.9- |

\bar "||"
\break

\repeat percent 4 { d2:m7 g:7 | }

\break

\repeat percent 2 { b2:7 c:7 | }
  \bar "||"
  c4:7 r2. | r1 |
  }

}

harmony = \harmony_realbook

% The alto sax part
altoSheet = {
<<
  \context ChordNames {
\harmony
  }

  \new Staff \with {
instrumentName = #"Alto"
  } {
\new Voice = "alto" { \melody_alto }
  }

>>
}

% The trumpet part
trumpetSheet = {
<<
  \context ChordNames {
\harmony
  }

  \new Staff \with {
instrumentName = #"Trumpet"
  } {
\new Voice = "trp" { \melody_trp }
  }

>>
}

% The full score
fullScore = {
<<
  

Re: drawing a range reguardless of transposition

2019-11-29 Thread Sandro Santilli
On Fri, Nov 29, 2019 at 10:28:04AM +0100, Sandro Santilli wrote:

> Uhm, I might be still not getting the 2.18.2 compatibility, as this
> is what I get:
> 
>   warning: type check for `color' failed; value `# Music((origin . #) (void . #t))((name .  Music) 
> (types general-music)) > ' must be of type `color'
> 
> When using:
> 
>   altoRange = \override NoteHead.color = \highlightPitches outside 
> \altoDesignedWrittenRange

Ok, I was misusing it. Had to be (and it works):

  altoRange = \highlightPitches outside \altoDesignedWrittenRange

--strk;



Re: drawing a range reguardless of transposition

2019-11-29 Thread Sandro Santilli
On Thu, Nov 28, 2019 at 10:40:17AM -0800, Aaron Hill wrote:
> On 2019-11-28 9:27 am, Sandro Santilli wrote:
> > On Mon, Nov 25, 2019 at 04:40:12AM -0800, Aaron Hill wrote:
> > > On 2019-11-25 2:26 am, Sandro Santilli wrote:
> > > > I'm trying, for backward compatibility, to keep that
> > > > highlightOutOfRange function, is that possible ?
> > > 
> > > What compatibility are you needing?
> > 
> > As I've used the old function in existing scores, I'd like
> > to avoid changing them all to use the new function. That's
> > the kind of compatibility I'd be needing.
> 
> Forgive me, but did I not invent that function only two weeks ago?  How busy
> have you been to have used it in so many scores?!  (:

$ git grep -c highlightOutOfRange
Sidewinder/sidewinder.ly:4
SoDancoSamba/sodancosamba.ly:4
Summertime/summertime.ly:4

> But, really, it should involve little more than a find-and-replace to
> convert the older usage to the newer.  Here's a bash script to do the work:

Uhm, I might be still not getting the 2.18.2 compatibility, as this
is what I get:

  warning: type check for `color' failed; value `#) (void . #t))((name .  Music) 
(types general-music)) > ' must be of type `color'

When using:

  altoRange = \override NoteHead.color = \highlightPitches outside 
\altoDesignedWrittenRange

Top lines of the highlightPitches are:

  highlightPitches = #(define-music-function
(parser location color method music)
((color? red) symbol? ly:music?)

--strk;



Re: drawing a range reguardless of transposition

2019-11-28 Thread Sandro Santilli
On Mon, Nov 25, 2019 at 04:40:12AM -0800, Aaron Hill wrote:
> On 2019-11-25 2:26 am, Sandro Santilli wrote:
> > I'm trying, for backward compatibility, to keep that
> > highlightOutOfRange function, is that possible ?
> 
> What compatibility are you needing?

As I've used the old function in existing scores, I'd like
to avoid changing them all to use the new function. That's
the kind of compatibility I'd be needing.

> Please let me know if I am overlooking a critical detail in your use case
> where my newer function would not be fit for purpose.

My new use case is perfectly served by the new function

--strk;



Re: drawing a range reguardless of transposition

2019-11-24 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:42:46PM +0100, Sandro Santilli wrote:
> On Fri, Nov 15, 2019 at 12:20:51PM +0100, Michael Käppler wrote:
> >
> > melodyRange = \override NoteHead.color = \highlightOutOfRange e' b'
> 
> And this is great to build that library, thanks !

I'm building that library, using info from
http://www.orchestralibrary.com/reftables/rang.html
and wondering how I could (scheme question, I guess) define the 2
parameters passed to "highlightOutOfRange" function as variables.

Like, the following does _not_ work:

  altoDesignedWrittenRange = bes g'''
  \override NoteHead.color = \highlightOutOfRange \altoDesignedWrittenRange

--strk;



\repeat percent not working for chordmode ?

2019-11-20 Thread Sandro Santilli
I'd like to use percent signs for chord repeats but
in a \chordmode block the repeats seem to end up being
just not rendered (nothing printed for the repetition
measures).

Is there a way to get those percent signs ?

--strk; 



repeat in alternative

2019-11-15 Thread Sandro Santilli
Is there a way to obtain what I'm finding in this paper sheet ?
http://strk.kbt.io/tmp/repeat-in-alternative.png

It's basically a repating section starting within an alternative
section...

--strk; 



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:20:51PM +0100, Michael Käppler wrote:
> Why not put it in the underlying "input" then?
> 
> melody = {
>     \override NoteHead.color = \highlightOutOfRange e' b'
>    \relative c' {  c4 d e f }
> }

Yep, that works

> You could even define a shortcut for this:
> 
> melodyRange = \override NoteHead.color = \highlightOutOfRange e' b'

And this is great to build that library, thanks !

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:09:27PM +0100, Sandro Santilli wrote:
> 
> The thing is I'm writing multiple scores with the same parts
> replicated (some with all 3 voices, some with just 2 voices)
> so I'd like to avoid the duplication of ranges. A range is
> specific to an instrument so I'd like to specify that in the
> header for each instrument, reguardless of score...

Actually, I'm thinking I'd build a database of available ranges
for instruments and players / singers, so that when a score
is intended for playing by known people I'd just reference
their names in the score...

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:00:09PM +0100, Michael Käppler wrote:

> \score {
>   <<
>     \new Staff \with {
>   instrumentName = #"Voice"
> 
>     } {
>   \new Voice = "vocal" \with {
>     \override NoteHead.color = \highlightOutOfRange e' b'
>   } { \notes }
> 
>     }
> 
>     \new Staff \with {
>   instrumentName = #"Alto"
>     } {
>   \new Voice = "sax" \with {
>     \override NoteHead.color = \highlightOutOfRange a e'
>   } { \transpose c g, \notes }
>     }
> 
>     \new Staff \with {
>   instrumentName = #"Trumpet"
>     } {
>   \new Voice = "trp" \with {
>     \override NoteHead.color = \highlightOutOfRange g' f''
>   } { \transpose c b \notes }
>     }
>   >>

The thing is I'm writing multiple scores with the same parts
replicated (some with all 3 voices, some with just 2 voices)
so I'd like to avoid the duplication of ranges. A range is
specific to an instrument so I'd like to specify that in the
header for each instrument, reguardless of score...

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 10:45:45AM +0100, Michael Käppler wrote:
> While I would strongly suggest that you update to the latest development
> version, which can regarded
> as very stable, this would work with 2.18.2:

Thanks, this works!
Can I specify a different override for different
voices by name ? Ie: I have these voices:

  \new Staff \with {
instrumentName = #"Voice"
  } {
\new Voice = "vocal" { \melody }
  }

  \new Staff \with {
instrumentName = #"Alto"
  } {
\transpose c a
\new Voice = "sax" { \melody_alto }
  }

  \new Staff \with {
instrumentName = #"Trumpet"
  } {
\transpose c d
\new Voice = "trp" { \melody_trp }
  }

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Thu, Nov 14, 2019 at 06:02:40PM +0100, k...@aspodata.se wrote:
> Sandro:
> > In order to determine if I'm writing something that can
> > be played by an instrument, is there a way to display
> > on the score the supported range by that instrument ?
> > 
> > I'd like to have something that doesn't change when I
> > transpose, so to know if transpositions are possible
> > at all...
> 
> The other way around, search for "ambitus" in the manual to see how to 
> make lilypond print out the range used.

Thanks, "ambitus" works great for a start.
Next step would be automatic checking if the ambitus is within
an instrument capability, which the coloring hint by Aaron should
help with, if I handle to make it work :)

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Thu, Nov 14, 2019 at 09:09:16AM -0800, Aaron Hill wrote:

> \layout {
>   \context { \Voice
> \override NoteHead.color = \highlightOutOfRange c' c''
>   }
> }

I like the highlighting idea! Is it compatible at all with 2.18.2 ?

It seems not to be: http://lilybin.com/166vv7/1

  Parsing.../usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: In 
expression (apply (ly:music-function-extract fun) parser ...):
  /usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: Wrong number 
of arguments to #

--strk;



drawing a range reguardless of transposition

2019-11-14 Thread Sandro Santilli
In order to determine if I'm writing something that can
be played by an instrument, is there a way to display
on the score the supported range by that instrument ?

I'd like to have something that doesn't change when I
transpose, so to know if transpositions are possible
at all...

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   https://strk.kbt.io/services.html



Re: m7.5- transposed to sus#4 b3 ??

2019-11-12 Thread Sandro Santilli
On Mon, Nov 11, 2019 at 10:08:07PM +0100, Thomas Morley wrote:
> Am Mo., 11. Nov. 2019 um 21:38 Uhr schrieb Sandro Santilli :
> >
> > I transcribed an A major song with this chords snippet:
> >
> >   ees:m7.5- | aes:7 | aes:m7.5- | des:7 |
> >
> > When transposing it to Eb major it is rendered as:
> >
> >   Bbbø | Ebb7 | Ebb7sus#4 b3 | Abb7

> If you transpose the note eeses down an augmented 4th the note beseses 
> results.

I did not transpose eeses, but ees.

> If you let the chords display in \new Staff you get a warning:
> 2.18.2:
> warning: Transposing eeses'' by ges makes alteration larger than double

Indeed I do get that warning, but I was not transposing eeses ??
Where does 'eeses' come from ?

> To circumvent, you could do \transpose a dis instead.

Yup, this one fixes the warning and the weird rendering.
Still uses double-alterations (double-sharps) but that's a
separate issue (does lilypond have any support to automatically
simpmlify those notes and/or chords?).

> Though, tbh I doubt chords based on ees, aes, des _in_ a-major are
> correct at all.
> Probably some modulation/key-change before? Or copy from a weird source?

It's "The Shadow Of Your Smile" from the Real Book. I'm not sure
what's going on there, harmonically.

--strk;



m7.5- transposed to sus#4 b3 ??

2019-11-11 Thread Sandro Santilli
I transcribed an A major song with this chords snippet:

  ees:m7.5- | aes:7 | aes:m7.5- | des:7 |

When transposing it to Eb major it is rendered as:

  Bbbø | Ebb7 | Ebb7sus#4 b3 | Abb7

I don't understand why the third chord (m7.5-)
gets rendered as a "7sus#4 b3" chord, very hard
to read ...

Ideally I'd also like to avoid the double flats,
but what strikes me is the "sus#4 b3" part, is it
a bug ? I'm using GNU LilyPond 2.18.2 and the
.ly file has a \version "2.18.2" header.

--strk; 



Re: midi instrument for ChordNames

2019-10-22 Thread Sandro Santilli
On Mon, Oct 21, 2019 at 12:15:47PM +0200, Thomas Morley wrote:

> please always provide a MWE, with the lily-version in it.

What's MWE ?

> Anyway, I assume you're at 2.18.2 (it would have worked out of the box
> with 2.19.83)

Yes, it's 2.18.2

> For _Staff_ you do _Staff_.midiInstrument.
> Why not _ChordNames_.midiInstrument for ChordNames then?
> Even better to use a \with for it, p.e.
> \new ChordNames \with { midiInstrument = "flute" }

Thank you, both work!

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


midi instrument for ChordNames

2019-10-21 Thread Sandro Santilli
I can't get anything but a piano rendering of ChordNames staff,
can other instruments be used ? If so, how ?

This is my sheet snippet:

  <<
\new ChordNames {
  \set midiInstrument = "flute" % does not work here
  \harmony
}
\new Staff
{
  \set Staff.midiInstrument = "flute" % works fine here
  \new Voice = "vocal" { \melody }
}
  >>

Thanks in advance

--strk; 

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Template management for LilyPond

2019-04-25 Thread Sandro Santilli
On Wed, Apr 24, 2019 at 05:32:43PM -0400, markjulie.com wrote:
> I am a new user to LilyPond 2.18.2 and Frescobaldi 2.20.0 having previously
> used Finale on MacOS. I would like to save some of the templates from the
> LilyPond documentation. I would like them to be available in the cloud
> (Google, Dropbox, or iCloud) for access on several of my devices.
> 
> Is there a folder in Application Support that I have not found? I could save
> the templates as .ly files or .txt files to a folder, but it is preferable
> to use New From Template -> then have the same templates available to
> multiple devices.

I don't know how Google, Dropbox or iCloud work but NextCloud
(http://nextcloud.org) has client apps that let you keep a local
folder in sync with the server (and thus all the other connected clients).

All the chain (server and client) is open source.

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Turn lead sheet into a blank staff

2019-04-24 Thread Sandro Santilli
On Wed, Apr 24, 2019 at 11:45:11AM +1000, pe...@chubb.wattle.id.au wrote:
> 
> 
> Sandro> I'm producing lead sheets with lyrics, melody and chords
> Sandro> and would like to extract from them som blank sheets with
> Sandro> just lyrics and chords so that players can take their notes
> Sandro>  (for solos or arrangements).
> 
> You could always just put an empty stave in parallel with the one
> with the tune on it.

Thanks, but that would double the size of my sheet, which would then
hardly fit a single A4 page. Rather I was thinking it could be nice
to print the notes of the melody of a very bright gray so that I can
read them but not make them clash too much with what I write with
pencil on them...

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Open glissando

2019-04-10 Thread Sandro Santilli
On Wed, Apr 10, 2019 at 10:47:14PM +0200, Thomas Morley wrote:

> Part of the problem is Glissando needs NoteHeads at start/end to go
> from one pitch to another.
> Thus a glissando is not possible from a note-event (or rest) to a rest.
> 
> This is quite reasonable at first thought, though I think it should be
> possible to draw a glissando bounded by _pitched_ rests.
> Why not?

Another aspect is that you may want to just instruct the player to
do a glissando up or down to unspecified pitch for the time it is
otherwise represented as rests (with glissando sign possibly
overlapping the rests)

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Open glissando

2019-04-10 Thread Sandro Santilli
On Wed, Apr 10, 2019 at 06:19:59AM -0700, Aaron Hill wrote:

> Here's my take using scaled durations and some additional tweaks:
> 
> 
> \version "2.19.82"
> \paper { ragged-right = ##t }
> \fixed c' {
>   \time 3/4
>   | c'4 c'
> c'4*1/2-\tweak style #'zigzag \glissando
> \single \hideNotes
> \tweak X-offset #2 \tweak X-extent #'(0 . 0)
> c4*1/2
> \break
>   | c'4 c' c
> }
> 

Great, I didn't know about scaled durations! Thank you !

It's almost exactly the same as the original,
but in the original the glissando drawing ends on the bar,
while using this code it ends in the hidden note which
is still a bit before the bar, is that what the X-extent
is aimed at fixing ?

> The issue with the unterminated tie can be resolved by being explicit about
> voice creation:
> 
> 
> \version "2.19.82"
> \paper { ragged-right = ##t }
> \new Voice = "foo" \fixed e' {
>   | e8 [ e8 e8 d8 ] g4 ^^ e4 ~ \bar ":|."
>   <<
> \context Voice = "foo" { | e4 b4\rest b2\rest }
> \new Voice {
>   \voiceTwo \hideNotes
>   | \tweak X-offset #-1.5 e2 -\tweak style #'zigzag \glissando e,2
> }
>   >>
> }
> 

Thanks, this also worked, although the X-offset tweak here
results in a segmentation fault with GNU LilyPond 2.18.2

Here's the snippet:


<<
  \context Voice = "main"
  { e4 b'4\rest b2\rest }
  \\
  {
\tweak X-offset #2
%\hideNotes
e,2 -\tweak style #'zigzag \glissando e,
  }
>>

NOTE: it doesn't segfault if I uncomment \hideNotes, but
since the X-offset seems to have NO effect I wanted to see
those notes...

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Open glissando

2019-04-10 Thread Sandro Santilli
On Wed, Apr 10, 2019 at 07:42:33AM -0500, Stanton Sanderson wrote:
> 
> 
> > On Apr 10, 2019, at 6:52 AM, Sandro Santilli  wrote:
> > 
> >  \once \override Glissando #'style = #'zigzag
> >e4
> >\glissando
> >r4 r2 
> 
> one way...
> 
> { 
> << {  e'4  b'4\rest b'2\rest }
>  \\
>  {\once \override Glissando #'style = #'zigzag \hideNotes e'4 \glissando s s 
> e4}
> >>
> }

Neat. But then I'm missing the end of the tie on previous measure 

  warning: unterminated tie

Snippet is now:

e8 [ e8 e8 d8 ] g4 ^^ e4 ~ } | % 13
\mark #1
{ <<
  { e4 b'4\rest b2\rest }
  \\
  {
\once \override Glissando #'style = #'zigzag
\hideNotes e,4 \glissando \hideNotes e, s2 \hideNotes
  }
>> }
| % 14

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Open glissando

2019-04-10 Thread Sandro Santilli
On Wed, Apr 10, 2019 at 10:18:43PM +1000, Andrew Bernard wrote:
> Hi Sandro,
> 
> LSR 184.

Hi Andrew, that snippet only works if the bar is not followed
by a break, otherwise I get:

  warning: forced break was overridden by some other event, should you be using 
bar checks?

And the break does NOT occur.

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Open glissando

2019-04-10 Thread Sandro Santilli
I'm trying to emulate the output in the attached image, but failing to
do so. It is basically a glissando to an unspecified note (hidden?)
during an otherwise rest period of time.

What I tried:


\once \override Glissando #'style = #'zigzag
e4
\glissando
r4 r2 

But the glissando symbol does NOT come out.
It would if I replaced the first r4 with an actual note,
but I still do want the rest printed...

--strk;
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Turn lead sheet into a blank staff

2019-04-04 Thread Sandro Santilli
On Wed, Apr 03, 2019 at 11:06:37PM +0200, Lukas-Fabian Moser wrote:
> The corresponding objects are Script and AccidentalCautionary.

Thanks!

> But your syntax is quite old (really ancient!) - which Lilypond version are
> you using?

GNU LilyPond 2.18.2, but my files are tagged with \version "2.10.33"
(just my habit of trying to be compatible with old versions)

> In recent versions you should write \override Dots.transparent = ##t and you
> might even write \hide Dots (which is a shorthand).

Thank you but will keep what I have as far as it keeps working.

Rather, now that I have everything hidden there's still an issue
I have with placement: the chords, on some lines (not all) are stil
way too distance from the staff, as if some (now invisible) element
is taking space. Is there maybe another way to simplify this task of
blanking a sheet for use with pencil ?

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Turn lead sheet into a blank staff

2019-04-03 Thread Sandro Santilli
I'm producing lead sheets with lyrics, melody and chords
and would like to extract from them som blank sheets with
just lyrics and chords so that players can take their notes
onto (for solos or arrangements).

My first attempt has been with using \hideNotes but that one
still keeps some elements (courtesy accidentals, ties, slurs,
tuplet indications, fermata sign).

I'm trying with a custom \hide command, defined as follows:

  hide = {
\override NoteHead #'transparent = ##t
\override Stem #'transparent = ##t
\override TupletBracket #'bracket-visibility = ##f
\override TupletNumber #'stencil = ##f
\override Accidental #'transparent = ##t
\override Tie #'transparent = ##t
\override Slur #'transparent = ##t
\override Dots #'transparent = ##t
\override Staff.LedgerLineSpanner #'transparent = ##t
\override Beam #'transparent = ##t
\override Rest #'transparent = ##t
  }

but with it I'm still having fermata and courtesy accidentals.
Idea how to override them to be also transparent ?

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond.org Productions page

2018-12-05 Thread Sandro Santilli
On Mon, Dec 03, 2018 at 11:12:31AM +0100, Henning Hraban Ramm wrote:
> Am 2018-12-03 um 09:22 schrieb Urs Liska :
> 
> > I think we should rather try to do a general collection among users (but 
> > this should reach more channels than just this list) to get a number of new 
> > entries for the page that makes it a little more impressive.
> 
> My only publicly available LilyPond work is 
> http://www.vorwaertsbuchverlag.de/buecher/das-vorwärts-liederbuch
> LilyPond isn’t mentioned, and the layout is not by me.

I've some lilypond files in https://strk.kbt.io/poetry/music

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Not Nice Review of the LilyPond

2018-12-02 Thread Sandro Santilli
On Sun, Dec 02, 2018 at 04:53:58PM +0100, Thomas Morley wrote:
> 
> The proposed _ly-syntax_ is
> \parenthesize 
> \parenthesize #'left 
> \parenthesize #'right 
> No parens.

To be honest I still find that syntax hard to understand.
Replace the 3  with A B and C, how would the
above code render those chords ?

I'm guessing it would be:

A ( B C )

But if that's the case, what is the initial \parenthesize for ?

Note I used code found in 
http://lists.gnu.org/archive/html/lilypond-user/2016-10/msg00574.html
which has similar hard-to-understand syntax, I used as such:

| g2:6 \leftParen bes2:dim5 |
a4:m7 \rightParen d2:7

Guess how it is rendered ?
For obscure reason, the right paren goes _after_
the d2:7 (which is what I want, but looks weird
in the source code).

Please note: I love the lilypond and even more the _community_ around
it, so don't take my observations as destructive as they really don't
want to be :)

--strk;



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Not Nice Review of the LilyPond

2018-12-02 Thread Sandro Santilli
On Sun, Dec 02, 2018 at 03:26:44PM +0100, Thomas Morley wrote:
> Am So., 2. Dez. 2018 um 14:01 Uhr schrieb Sandro Santilli :
> >
> > Very obscure way to put chords
> > in parenthesis (I asked yesterday).
> 
> I beg to differ.

Really ? And right after this statement you post a 36 lines
snippet of code full of parens ? :P

I know Lilypond is powerful, that's why I still use it, but
it's hard not to notice how obscure its code is (what is it,
scheme?)

--strk; 

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Not Nice Review of the LilyPond

2018-12-02 Thread Sandro Santilli
On Sun, Dec 02, 2018 at 11:01:36AM +, J Martin Rushton wrote:

> "LilyPond source files appear to be written in a custom programming
> language whose grammar is never discussed."
> - I'm afraid this one is bang on target.

Hey, I have the exact same feeling. Very obscure way to put chords
in parenthesis (I asked yesterday). On the bright side, asking on
this list gets you an answer pretty quickly :)

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


parenthesized chord symbols

2018-12-01 Thread Sandro Santilli
How do I put chord symbols in parenthesis, across
two measures ?

Like in (fixed-width fonts needed):

Em7  ( D7 A   A7 )
  ||   ||


--strk;


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Setting staff size for a single book

2018-01-30 Thread Sandro Santilli
According to the manual [1] you can use #(set-global-staff-size 14)
in a book block, but when I try (using lilypond 2.18.2) the output
does not change. Example:

  \version "2.18.2"
  \book {
#(set-global-staff-size 48)
\header { instrument = "Bass" }
\score {
  \new Staff { \absolute c' }
}
  }

Moving the #(set-global-staff-size 48) line *outside*
of the `\book` block works fine. Is it a bug in the manual
or in the code ?

[1] http://lilypond.org/doc/v2.18/Documentation/notation/setting-the-staff-size

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: aligning lyrics to hidden notes

2018-01-29 Thread Sandro Santilli
On Mon, Jan 29, 2018 at 09:51:59AM -0700, Torsten Hämmerle wrote:

> In 2.18.2, you can set \override Rest.staff-position = #0 to force the rests
> back, or use a development version.

Thanks, the override works !

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: aligning lyrics to hidden notes

2018-01-29 Thread Sandro Santilli
On Mon, Jan 29, 2018 at 03:31:42PM -, Phil Holmes wrote:

> 1. Are you really using LilyPond 2.10.33?  If so it's staggeringly out of
> date and you should upgrade to the latest stable or development version.

Uhm, it looks like no, I'm using GNU LilyPond 2.18.2
You mean that the \version specified in .ly can change these behaviors ?

> 2. Have you read http://lilypond.org/tiny-examples.html?  Simplifying your
> problem may lead to a solution.

Here's a minimal version:

  \version "2.10.33"
  bass = \relative c' { e8 r8 r4 }
  aligner = \relative { c4 c }
  words = \lyricmode { la la }
  \new Staff { <<
\new Voice = "bass" { \bass }
\new NullVoice = "aligner" { \aligner }
\new Lyrics \lyricsto "aligner" \words
  >> }

See on lilybin: http://lilybin.com/tnik8y/1

Commenting out the NullVoice line results in rests being where they
should be. Setting \version to "2.18.2" makes no difference.

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


aligning lyrics to hidden notes

2018-01-29 Thread Sandro Santilli
I've been trying for some time now to align lyrics
to an hidden melody but when I try that all the rests
end up attached to the bottom line of the pentagram,
which looks like a bug in lilypond itself, can anyone
see if that's the case (a bug) or I'm doing something
wrong ?

Here's the .ly file:
http://strk.kbt.io/tmp/quizas-broken-basspart.ly

This is a summary of offending section (look for
"bassPart" in the .ly above for the actual section):

bassPart = {
<<

  \new Staff {
<<

% UNCOMMENTING THE LINE BELOW
% MOVES ALL RESTS TO THE BOTTOM !!
%\new NullVoice = "vocal" { \melody }

\new Voice = "bass" { \bassline }
>>
  }

  %\new Lyrics \lyricsto "vocal" \words_line_one
>>
}

I cannot attach "words_line_one" to "vocal" NullVoice
unless I define it...

Can anyone help me making my bass player aware of lyrics ? :)

Thanks in advance !

--strk;

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user