Re: Lilypond and digital readers

2024-02-29 Thread Laurie Savage
Likewise, my setup includes \paper{} and \layout{} for printing and screen
display.

Laurie Savage
https://www.queensofthewest.com/

On Fri, 1 Mar 2024 at 00:18, Kevin Cole  wrote:

> This is similar to something I learned to do from this list. Thank you,
> list wizards.
>
> I generate scores for both printing (paginated PDFs) and displaying on a
> website generated by the Sphinx documentation system (unpaginated SVGs).
> Sometimes, I want to regenerate ALL the scores. So I have a Bash script to
> do the work and a command-line argument that determines which type  (PDF or
> SVG) will be generated. I have two include scripts: svg.ily and pdf.ily
> (which I keep in ~/.local/lib/lilypond/). In all of my Frescobaldi
> templates, I have the lines:
>
> 
> % Use environment variable to decide if discrete pagination (PDF) or
> % continuous pagination (SVG). Default to SVG if not defined.
> %
> pageBreaking = #(string-append (getenv "HOME") "/.local/lib/lilypond/" (if
> (getenv "PAGE_BREAKING") (getenv "PAGE_BREAKING") "svg") ".ily")
> \include \pageBreaking
> 
>
> Then, in my Bash scripts, I can have code like:
>
> ###
> for source in $(find . -name "*.ly")
> do
>   PAGE_BREAKING=svg lilypond --svg $source
>   # ... generate MP3 from MIDI, reduce SVG size, etc.
> done
> ###
>
> The two include files:
>
> pdf.ily:
> %
> % PDF
> % 8.5" x 11" (Letter) page size
> %
>
> \paper {
>   #(include-special-characters)
>   #(set-paper-size "letter")
>   print-page-number = ##f
>   ragged-last-bottom = ##t
> }
> %
>
> svg.ily:
> %%%
> % Web SVG (Sphinx Cloud theme):
> % One long continuous page
> %
>
> #(ly:set-option 'backend 'cairo)
> \paper {
>   #(include-special-characters)
>   oddHeaderMarkup = \markup \null
>   evenHeaderMarkup = \markup \null
>   page-breaking = #ly:one-page-breaking
>
>   #(define fonts
>  (set-global-fonts
>   #:roman "Open Sans"
>   #:sans "Open Sans"
>   #:typewriter "DejaVu Sans Mono"
>   ; unnecessary if the staff size is default
>   #:factor (/ staff-height pt 20)
>   ))
> }
> %%%
>
>


Re: Lilypond and digital readers

2024-02-29 Thread Kevin Cole
This is similar to something I learned to do from this list. Thank you,
list wizards.

I generate scores for both printing (paginated PDFs) and displaying on a
website generated by the Sphinx documentation system (unpaginated SVGs).
Sometimes, I want to regenerate ALL the scores. So I have a Bash script to
do the work and a command-line argument that determines which type  (PDF or
SVG) will be generated. I have two include scripts: svg.ily and pdf.ily
(which I keep in ~/.local/lib/lilypond/). In all of my Frescobaldi
templates, I have the lines:


% Use environment variable to decide if discrete pagination (PDF) or
% continuous pagination (SVG). Default to SVG if not defined.
%
pageBreaking = #(string-append (getenv "HOME") "/.local/lib/lilypond/" (if
(getenv "PAGE_BREAKING") (getenv "PAGE_BREAKING") "svg") ".ily")
\include \pageBreaking


Then, in my Bash scripts, I can have code like:

###
for source in $(find . -name "*.ly")
do
  PAGE_BREAKING=svg lilypond --svg $source
  # ... generate MP3 from MIDI, reduce SVG size, etc.
done
###

The two include files:

pdf.ily:
%
% PDF
% 8.5" x 11" (Letter) page size
%

\paper {
  #(include-special-characters)
  #(set-paper-size "letter")
  print-page-number = ##f
  ragged-last-bottom = ##t
}
%

svg.ily:
%%%
% Web SVG (Sphinx Cloud theme):
% One long continuous page
%

#(ly:set-option 'backend 'cairo)
\paper {
  #(include-special-characters)
  oddHeaderMarkup = \markup \null
  evenHeaderMarkup = \markup \null
  page-breaking = #ly:one-page-breaking

  #(define fonts
 (set-global-fonts
  #:roman "Open Sans"
  #:sans "Open Sans"
  #:typewriter "DejaVu Sans Mono"
  ; unnecessary if the staff size is default
  #:factor (/ staff-height pt 20)
  ))
}
%%%


Re: Lilypond and digital readers

2024-02-29 Thread Robert Garrigos
Thanks, Laurie. I never thought of having an adapted PDF for my reader (a 
remarkable), but based on your example, here it is what I’m doing right now. 
This is a different approach because I want to have also a normal PDF for 
printing, I have two book entries on my lilypond file, something like this:


%
%% REMARKABLE %%%
%

\book {
 \bookOutputSuffix "remarkable"
 \header {
   % titles
 }
 \score {
 % music score
   \layout {
 % layout settings
   }
 }

 \paper {
   #(set-paper-size '(cons (* 155 mm) (* 210 mm)))
   indent = 0\mm
   top-margin = #10
   bottom-margin = #0
   left-margin = #0
   right-margin = #0
   % other size settings
 }
}

%%%
% PDF %%%
%%%

\book {
 \header {
  % titles
 }
 \score {
   % music
   \layout {
 % layout settings
   }
 }
 \paper {
   set-paper-size = "a4"
   top-margin = 10
   left-margin = 15
   indent = 10
   % other size settings
 }
}

Of course, I use variables to add the music to the \score scope, so I don’t 
have to make changes in both books. 

Hope I might help someone.

Robert Garrigos

> El 24 febr. 2024, a les 1:51, Laurie Savage  va 
> escriure:
> 
> Hi,
> 
> I use a tablet for storing my lead sheets, most of which I prepare in 
> Lilypond. I have just stumbled on a trick I thought I'd share with you - 
> although it might be obvious to you, it wasn't to me. (Tip to Jamie Anderson 
> of the Get your sax together Youtube channel)
> 
> I use a Samsung Galaxy Tab A 10.1 and Mobile Sheets Pro. I use a paper block 
> that I store as "tabA" in an include file called "digital.ily"
> It looks like this:
> 
> tabA = \paper {
> %set the paper size to the screen dimensions 
> #(set-paper-size '(cons (* 13.5 cm) (* 21.7 cm)))
> 
> % Adjust according to taste   
> indent = 0\mm
> top-margin = #0
> bottom-margin = #0
> left-margin = #0
> right-margin = #0
> }
> 
> voila, combined with a sensible staff size I have a legible score that I 
> don't need reading glasses for.
> 
> Laurie Savage




Re: Lilypond and digital readers

2024-02-25 Thread Laurie Savage
Glad you liked it!
Laurie Savage
https://www.queensofthewest.com/

The Latest Queens of The West clips
https://www.youtube.com/playlist?list=PLgkDbfgWIb8_tQgEZRKeRWVSukoM2xoC_


On Mon, 26 Feb 2024 at 05:16, Ernie Braganza 
wrote:

> I love this. That hadn't occurred to me.
>
> On Fri, Feb 23, 2024 at 7:52 PM Laurie Savage 
> wrote:
>
>> Hi,
>>
>> I use a tablet for storing my lead sheets, most of which I prepare in
>> Lilypond. I have just stumbled on a trick I thought I'd share with you -
>> although it might be obvious to you, it wasn't to me. (Tip to Jamie
>> Anderson of the Get your sax together Youtube channel)
>>
>> I use a Samsung Galaxy Tab A 10.1 and Mobile Sheets Pro. I use a paper
>> block that I store as "tabA" in an include file called "digital.ily"
>> It looks like this:
>>
>> tabA = \paper {
>> %set the paper size to the screen dimensions
>> #(set-paper-size '(cons (* 13.5 cm) (* 21.7 cm)))
>>
>> % Adjust according to taste
>> indent = 0\mm
>> top-margin = #0
>> bottom-margin = #0
>> left-margin = #0
>> right-margin = #0
>> }
>>
>> voila, combined with a sensible staff size I have a legible score that I
>> don't need reading glasses for.
>>
>> Laurie Savage
>>
>


Re: Lilypond and digital readers

2024-02-25 Thread Ernie Braganza
I love this. That hadn't occurred to me.

On Fri, Feb 23, 2024 at 7:52 PM Laurie Savage 
wrote:

> Hi,
>
> I use a tablet for storing my lead sheets, most of which I prepare in
> Lilypond. I have just stumbled on a trick I thought I'd share with you -
> although it might be obvious to you, it wasn't to me. (Tip to Jamie
> Anderson of the Get your sax together Youtube channel)
>
> I use a Samsung Galaxy Tab A 10.1 and Mobile Sheets Pro. I use a paper
> block that I store as "tabA" in an include file called "digital.ily"
> It looks like this:
>
> tabA = \paper {
> %set the paper size to the screen dimensions
> #(set-paper-size '(cons (* 13.5 cm) (* 21.7 cm)))
>
> % Adjust according to taste
> indent = 0\mm
> top-margin = #0
> bottom-margin = #0
> left-margin = #0
> right-margin = #0
> }
>
> voila, combined with a sensible staff size I have a legible score that I
> don't need reading glasses for.
>
> Laurie Savage
>


Re: Lilypond and digital readers

2024-02-23 Thread Colin Campbell
Shamelessly copying the tip for my own use! I also use MobileSheets Pro, 
and absolutely depend on it for my choral stuff. Your tip gives me some 
ideas for stuff I know I'll be singing: things like highlighting my bass 
part (NR 1.7.1ff), colouring key and time changes . . . Dude, I'm going 
to have some fun indeed!


Cheers,

Colin

On 2024-02-23 17:51, Laurie Savage wrote:

Hi,

I use a tablet for storing my lead sheets, most of which I prepare in 
Lilypond. I have just stumbled on a trick I thought I'd share with you 
- although it might be obvious to you, it wasn't to me. (Tip to Jamie 
Anderson of the Get your sax together Youtube channel)


I use a Samsung Galaxy Tab A 10.1 and Mobile Sheets Pro. I use a paper 
block that I store as "tabA" in an include file called "digital.ily"

It looks like this:

tabA = \paper {
%set the paper size to the screen dimensions
#(set-paper-size '(cons (* 13.5 cm) (* 21.7 cm)))

% Adjust according to taste
indent = 0\mm
top-margin = #0
bottom-margin = #0
left-margin = #0
right-margin = #0
}

voila, combined with a sensible staff size I have a legible score that 
I don't need reading glasses for.


Laurie Savage