Re: Two Hands "Snake"

2019-07-08 Thread Pierre Perol-Schneider
Andrew,
Are you talking about:
http://lilypond.1069038.n5.nabble.com/How-to-make-this-postscript-spanner-to-work-with-L-amp-R-bound-details-td204375.html#a204622
?
Cheers,
Pierre

Le lun. 8 juil. 2019 à 07:16, Andrew Bernard  a
écrit :

> Hi Marcos,
>
> There's code for this exact type of damped oscillation curve somewhere
> or other. Give me some time to find it later tonight! I used it in some
> guitar pieces. Stay tuned!
>
>
> Andrew
>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Two Hands "Snake"

2019-07-08 Thread Andrew Bernard

Hi Marcos,

Here is what I use. I hope you may find it useful. The vibrato function 
modifies the trill spanner.


Picture attached of real use in the piece I engraved (for 7 string 
guitar, but that's not really relevant).


I do not recall where I got this from, but the author is acknowledged. 
The example along with the function code gives you lots of inspiration. 
Highly parameterised.


Andrew

%==

%\version "2.19.44"

% vibrato.ly
% Author: Mark Witmer

% Sets the next trill spanner to draw a waveform with the provided 
wevelength

% and amplitudes. The waveform will go from one amplitude to the next in a
% linear fashion.

vibrato =
#(define-music-function (amplitudes wavelength)
   (list? number?)
   #{
 \once \override TrillSpanner #'after-line-breaking =
 $(lambda (grob)
    (ly:grob-set-property! grob 'stencil (makevib grob amplitudes 
wavelength)))

   #})

#(define adjustvib #t)

% Creates the postscript for one system of the vibrato marking
#(define (make_ps no-sib? lbound xspan span-so-far amplitude-vector 
wavelength)

   (if (or (= xspan -inf.0) (= xspan +inf.0))
   ""
   (let ((lbound
  (cond
   ((and (> span-so-far 0) adjustvib)
    (- lbound 18))
   (no-sib? (+ lbound 1))
   (else lbound)))
 (last
  (inexact->exact (floor (/ (+ span-so-far xspan) 
wavelength)

 (format
  #f "gsave currentpoint translate 0.15 setlinewidth newpath /x 
~a def\nx 0.0 moveto\n ~a ~a"

  lbound
  (let make-curve
    ((current (inexact->exact (floor (/ span-so-far wavelength)
    (cond
 ((= current (vector-length amplitude-vector)) "")
 ((< (vector-ref amplitude-vector current) 0) "")
 (else
  (let ((current-ps
 (format
  #f " x ~a add ~a x ~a add ~a x ~a add 0.0 
curveto\n/x x ~a add def\n"

  (exact->inexact (/ wavelength 3))
  (vector-ref amplitude-vector current)
  (exact->inexact (* 2 (/ wavelength 3)))
  (- (vector-ref amplitude-vector current))
  wavelength
  wavelength)))
    (if (= (+ current 1) last)
    current-ps
    (format #f "~a~a" current-ps
  (make-curve (+ 1 current
  "stroke grestore"

% Returns the width of a grob
#(define (grob-width grob)
   (if (or (= (car (ly:grob-property grob 'X-extent)) -inf.0)
   (= (car (ly:grob-property grob 'X-extent)) +inf.0))
   0
   (- (cdr (ly:grob-property grob 'X-extent))
 (car (ly:grob-property grob 'X-extent)

% Returns the number of ems already traversed by the grob's siblings in
% previous systems
#(define (width-up-to grob siblings count)
   (if (eq? (car siblings) grob)
   count
   (+ (+ count (width-up-to grob (cdr siblings) count))
 (grob-width (car siblings)

% Returns the total width of the individual grobs for each system that 
make up

% the original grob
#(define (calcfull siblings count)
   (if (eqv? (length siblings) 0)
   count
   (calcfull (cdr siblings) (+ count (grob-width (car siblings))

% Fills a vector of length len with linear interpolations between the values
% found in amplitudes
#(define (fill-amplitude-vector! amplitude-vector len current-index 
amplitudes)

   (if (> (length amplitudes) 1)
   (let ((start-amplitude (car amplitudes))
 (end-amplitude (cadr amplitudes))
 (start-index current-index)
 (end-index (+ current-index
  (inexact->exact
   (floor (/ (vector-length amplitude-vector)
    (- len 1)))
 (do ((n current-index (+ 1 n)))
   ((or (> n (+ start-index end-index))
    (>= n (vector-length amplitude-vector
   (vector-set! amplitude-vector n
 (exact->inexact
  (+ start-amplitude
    (* (/ (- n start-index) (- end-index start-index))
  (- end-amplitude start-amplitude))
 (fill-amplitude-vector!
  amplitude-vector len end-index (cdr amplitudes)

% Makes the vector of amplitudes for the vibrato marking
#(define (make-amplitude-vector amplitudes total-span wavelength)
   (let* ((current-start 0)
  (len (inexact->exact (floor (/ total-span wavelength
  (amplitude-vector (make-vector len)))
 (if (> (length amplitudes) 1)
 (fill-amplitude-vector!
  amplitude-vector (length amplitudes) 0 amplitudes)
 (vector-fill! amplitude-vector (car amplitudes)))
 amplitude-vector))

% Creates a stencil that draws a sine wave for vibrato based on the provided
% amplitudes and wavelength
#(define (makevib grob

Re: Two Hands "Snake"

2019-07-08 Thread Andrew Bernard

Hi Marcos,

Here is what I use. I hope you may find it useful. The vibrato function 
modifies the trill spanner.


Picture attached of real use in the piece I engraved (for 7 string 
guitar, but that's not really relevant).


I do not recall where I got this from, but the author is acknowledged. 
The example along with the function code gives you lots of inspiration. 
Highly parameterised.


Andrew

%==

%\version "2.19.44"

% vibrato.ly
% Author: Mark Witmer

% Sets the next trill spanner to draw a waveform with the provided 
wevelength

% and amplitudes. The waveform will go from one amplitude to the next in a
% linear fashion.

vibrato =
#(define-music-function (amplitudes wavelength)
   (list? number?)
   #{
 \once \override TrillSpanner #'after-line-breaking =
 $(lambda (grob)
    (ly:grob-set-property! grob 'stencil (makevib grob amplitudes 
wavelength)))

   #})

#(define adjustvib #t)

% Creates the postscript for one system of the vibrato marking
#(define (make_ps no-sib? lbound xspan span-so-far amplitude-vector 
wavelength)

   (if (or (= xspan -inf.0) (= xspan +inf.0))
   ""
   (let ((lbound
  (cond
   ((and (> span-so-far 0) adjustvib)
    (- lbound 18))
   (no-sib? (+ lbound 1))
   (else lbound)))
 (last
  (inexact->exact (floor (/ (+ span-so-far xspan) 
wavelength)

 (format
  #f "gsave currentpoint translate 0.15 setlinewidth newpath /x 
~a def\nx 0.0 moveto\n ~a ~a"

  lbound
  (let make-curve
    ((current (inexact->exact (floor (/ span-so-far wavelength)
    (cond
 ((= current (vector-length amplitude-vector)) "")
 ((< (vector-ref amplitude-vector current) 0) "")
 (else
  (let ((current-ps
 (format
  #f " x ~a add ~a x ~a add ~a x ~a add 0.0 
curveto\n/x x ~a add def\n"

  (exact->inexact (/ wavelength 3))
  (vector-ref amplitude-vector current)
  (exact->inexact (* 2 (/ wavelength 3)))
  (- (vector-ref amplitude-vector current))
  wavelength
  wavelength)))
    (if (= (+ current 1) last)
    current-ps
    (format #f "~a~a" current-ps
  (make-curve (+ 1 current
  "stroke grestore"

% Returns the width of a grob
#(define (grob-width grob)
   (if (or (= (car (ly:grob-property grob 'X-extent)) -inf.0)
   (= (car (ly:grob-property grob 'X-extent)) +inf.0))
   0
   (- (cdr (ly:grob-property grob 'X-extent))
 (car (ly:grob-property grob 'X-extent)

% Returns the number of ems already traversed by the grob's siblings in
% previous systems
#(define (width-up-to grob siblings count)
   (if (eq? (car siblings) grob)
   count
   (+ (+ count (width-up-to grob (cdr siblings) count))
 (grob-width (car siblings)

% Returns the total width of the individual grobs for each system that 
make up

% the original grob
#(define (calcfull siblings count)
   (if (eqv? (length siblings) 0)
   count
   (calcfull (cdr siblings) (+ count (grob-width (car siblings))

% Fills a vector of length len with linear interpolations between the values
% found in amplitudes
#(define (fill-amplitude-vector! amplitude-vector len current-index 
amplitudes)

   (if (> (length amplitudes) 1)
   (let ((start-amplitude (car amplitudes))
 (end-amplitude (cadr amplitudes))
 (start-index current-index)
 (end-index (+ current-index
  (inexact->exact
   (floor (/ (vector-length amplitude-vector)
    (- len 1)))
 (do ((n current-index (+ 1 n)))
   ((or (> n (+ start-index end-index))
    (>= n (vector-length amplitude-vector
   (vector-set! amplitude-vector n
 (exact->inexact
  (+ start-amplitude
    (* (/ (- n start-index) (- end-index start-index))
  (- end-amplitude start-amplitude))
 (fill-amplitude-vector!
  amplitude-vector len end-index (cdr amplitudes)

% Makes the vector of amplitudes for the vibrato marking
#(define (make-amplitude-vector amplitudes total-span wavelength)
   (let* ((current-start 0)
  (len (inexact->exact (floor (/ total-span wavelength
  (amplitude-vector (make-vector len)))
 (if (> (length amplitudes) 1)
 (fill-amplitude-vector!
  amplitude-vector (length amplitudes) 0 amplitudes)
 (vector-fill! amplitude-vector (car amplitudes)))
 amplitude-vector))

% Creates a stencil that draws a sine wave for vibrato based on the provided
% amplitudes and wavelength
#(define (makevib grob

Re: More font ligatures

2019-07-08 Thread Malte Meyn



Am 06.07.19 um 03:38 schrieb Vaughan McAlley:
Elam Rotam, of Early Music Sources fame, has created a font that 
recreates 16th century typesetting. It could be useful for doing quick, 
good looking incipits:


https://www.earlymusicsources.com/more/font-serenissima

https://youtu.be/HH1oUc4E1CA

The one issue is that it relies heavily on font ligatures. I'll have to 
try it on 2.19.83.


It doesn’t work for me in 2.19.83 but it does work in 2.21.0.

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


musikalische Funktionssymbole (music function symbols)

2019-07-08 Thread Werner LEMBERG

I've just stumbled upon this page

  https://tobiw.de/tbdm/funktionssymbole  ,

presenting a macro that helps with entering (German-style) music
function symbols.  The blogpost is in German, but a LaTeX user will
certainly understand the code easily.  It is also explained in English
at

  https://tex.stackexchange.com/questions/267615/latex-for-music

Examples:

  https://i.stack.imgur.com/YtzgO.png
  https://i.stack.imgur.com/lMMRy.png

Note sure whether this has been mentioned already on this list, but
for users of lilypond-book or lyluatex this seems like a very nice
addition.


Werner

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


Re: Two Hands "Snake"

2019-07-08 Thread tdy lists
Wow!
Thank

I'll try to make something of all these!
I think Pierre's answer to Andrew is where I find the most acurate answer,
now I'll extract the fragment needed (ifI can manage), and put it inside
the staff...
Let's start tweaking!!!

THANKS again!

El lun., 8 de jul. de 2019 a la(s) 05:54, Andrew Bernard (
andrew.bern...@gmail.com) escribió:

> Hi Marcos,
>
> Here is what I use. I hope you may find it useful. The vibrato function
> modifies the trill spanner.
>
> Picture attached of real use in the piece I engraved (for 7 string
> guitar, but that's not really relevant).
>
> I do not recall where I got this from, but the author is acknowledged.
> The example along with the function code gives you lots of inspiration.
> Highly parameterised.
>
> Andrew
>
> %==
>
> %\version "2.19.44"
>
> % vibrato.ly
> % Author: Mark Witmer
>
> % Sets the next trill spanner to draw a waveform with the provided
> wevelength
> % and amplitudes. The waveform will go from one amplitude to the next in a
> % linear fashion.
>
> vibrato =
> #(define-music-function (amplitudes wavelength)
> (list? number?)
> #{
>   \once \override TrillSpanner #'after-line-breaking =
>   $(lambda (grob)
>  (ly:grob-set-property! grob 'stencil (makevib grob amplitudes
> wavelength)))
> #})
>
> #(define adjustvib #t)
>
> % Creates the postscript for one system of the vibrato marking
> #(define (make_ps no-sib? lbound xspan span-so-far amplitude-vector
> wavelength)
> (if (or (= xspan -inf.0) (= xspan +inf.0))
> ""
> (let ((lbound
>(cond
> ((and (> span-so-far 0) adjustvib)
>  (- lbound 18))
> (no-sib? (+ lbound 1))
> (else lbound)))
>   (last
>(inexact->exact (floor (/ (+ span-so-far xspan)
> wavelength)
>   (format
>#f "gsave currentpoint translate 0.15 setlinewidth newpath /x
> ~a def\nx 0.0 moveto\n ~a ~a"
>lbound
>(let make-curve
>  ((current (inexact->exact (floor (/ span-so-far
> wavelength)
>  (cond
>   ((= current (vector-length amplitude-vector)) "")
>   ((< (vector-ref amplitude-vector current) 0) "")
>   (else
>(let ((current-ps
>   (format
>#f " x ~a add ~a x ~a add ~a x ~a add 0.0
> curveto\n/x x ~a add def\n"
>(exact->inexact (/ wavelength 3))
>(vector-ref amplitude-vector current)
>(exact->inexact (* 2 (/ wavelength 3)))
>(- (vector-ref amplitude-vector current))
>wavelength
>wavelength)))
>  (if (= (+ current 1) last)
>  current-ps
>  (format #f "~a~a" current-ps
>(make-curve (+ 1 current
>"stroke grestore"
>
> % Returns the width of a grob
> #(define (grob-width grob)
> (if (or (= (car (ly:grob-property grob 'X-extent)) -inf.0)
> (= (car (ly:grob-property grob 'X-extent)) +inf.0))
> 0
> (- (cdr (ly:grob-property grob 'X-extent))
>   (car (ly:grob-property grob 'X-extent)
>
> % Returns the number of ems already traversed by the grob's siblings in
> % previous systems
> #(define (width-up-to grob siblings count)
> (if (eq? (car siblings) grob)
> count
> (+ (+ count (width-up-to grob (cdr siblings) count))
>   (grob-width (car siblings)
>
> % Returns the total width of the individual grobs for each system that
> make up
> % the original grob
> #(define (calcfull siblings count)
> (if (eqv? (length siblings) 0)
> count
> (calcfull (cdr siblings) (+ count (grob-width (car siblings))
>
> % Fills a vector of length len with linear interpolations between the
> values
> % found in amplitudes
> #(define (fill-amplitude-vector! amplitude-vector len current-index
> amplitudes)
> (if (> (length amplitudes) 1)
> (let ((start-amplitude (car amplitudes))
>   (end-amplitude (cadr amplitudes))
>   (start-index current-index)
>   (end-index (+ current-index
>(inexact->exact
> (floor (/ (vector-length amplitude-vector)
>  (- len 1)))
>   (do ((n current-index (+ 1 n)))
> ((or (> n (+ start-index end-index))
>  (>= n (vector-length amplitude-vector
> (vector-set! amplitude-vector n
>   (exact->inexact
>(+ start-amplitude
>  (* (/ (- n start-index) (- end-index start-index))
>(- end-amplitude start-amplitude))
>   (fill-amplitude-vector!
>amplitude-vector len en

Re: Two Hands "Snake"

2019-07-08 Thread tdy lists
Thank you all for the help!
I manage to do quite what I was lookin to...

With the template of the vibrato:

%%
https://raw.githubusercontent.com/mwitmer/LyUtil/master/ly/expressive_markings/vibrato.ly
%% Original author: Mark Witmer
%% Rewritten version by Harm

I tweak the thiknes of the curve and I add a couple of lines to the
variable that I find in another question
%%%
https://music.stackexchange.com/questions/42775/move-a-trill-into-the-stave

so the Snake can get inside the staff.

The where a couple of things I couldn't do.

1 - I couldn't find the way to start de curve from up to down.
2 - When the spanner arrive to a line break it's stops and do not continue
as can be seen in the attached image.



El lun., 8 de jul. de 2019 a la(s) 11:15, tdy lists (tdy.li...@gmail.com)
escribió:

> Wow!
> Thank
>
> I'll try to make something of all these!
> I think Pierre's answer to Andrew is where I find the most acurate answer,
> now I'll extract the fragment needed (ifI can manage), and put it inside
> the staff...
> Let's start tweaking!!!
>
> THANKS again!
>
> El lun., 8 de jul. de 2019 a la(s) 05:54, Andrew Bernard (
> andrew.bern...@gmail.com) escribió:
>
>> Hi Marcos,
>>
>> Here is what I use. I hope you may find it useful. The vibrato function
>> modifies the trill spanner.
>>
>> Picture attached of real use in the piece I engraved (for 7 string
>> guitar, but that's not really relevant).
>>
>> I do not recall where I got this from, but the author is acknowledged.
>> The example along with the function code gives you lots of inspiration.
>> Highly parameterised.
>>
>> Andrew
>>
>> %==
>>
>> %\version "2.19.44"
>>
>> % vibrato.ly
>> % Author: Mark Witmer
>>
>> % Sets the next trill spanner to draw a waveform with the provided
>> wevelength
>> % and amplitudes. The waveform will go from one amplitude to the next in a
>> % linear fashion.
>>
>> vibrato =
>> #(define-music-function (amplitudes wavelength)
>> (list? number?)
>> #{
>>   \once \override TrillSpanner #'after-line-breaking =
>>   $(lambda (grob)
>>  (ly:grob-set-property! grob 'stencil (makevib grob amplitudes
>> wavelength)))
>> #})
>>
>> #(define adjustvib #t)
>>
>> % Creates the postscript for one system of the vibrato marking
>> #(define (make_ps no-sib? lbound xspan span-so-far amplitude-vector
>> wavelength)
>> (if (or (= xspan -inf.0) (= xspan +inf.0))
>> ""
>> (let ((lbound
>>(cond
>> ((and (> span-so-far 0) adjustvib)
>>  (- lbound 18))
>> (no-sib? (+ lbound 1))
>> (else lbound)))
>>   (last
>>(inexact->exact (floor (/ (+ span-so-far xspan)
>> wavelength)
>>   (format
>>#f "gsave currentpoint translate 0.15 setlinewidth newpath /x
>> ~a def\nx 0.0 moveto\n ~a ~a"
>>lbound
>>(let make-curve
>>  ((current (inexact->exact (floor (/ span-so-far
>> wavelength)
>>  (cond
>>   ((= current (vector-length amplitude-vector)) "")
>>   ((< (vector-ref amplitude-vector current) 0) "")
>>   (else
>>(let ((current-ps
>>   (format
>>#f " x ~a add ~a x ~a add ~a x ~a add 0.0
>> curveto\n/x x ~a add def\n"
>>(exact->inexact (/ wavelength 3))
>>(vector-ref amplitude-vector current)
>>(exact->inexact (* 2 (/ wavelength 3)))
>>(- (vector-ref amplitude-vector current))
>>wavelength
>>wavelength)))
>>  (if (= (+ current 1) last)
>>  current-ps
>>  (format #f "~a~a" current-ps
>>(make-curve (+ 1 current
>>"stroke grestore"
>>
>> % Returns the width of a grob
>> #(define (grob-width grob)
>> (if (or (= (car (ly:grob-property grob 'X-extent)) -inf.0)
>> (= (car (ly:grob-property grob 'X-extent)) +inf.0))
>> 0
>> (- (cdr (ly:grob-property grob 'X-extent))
>>   (car (ly:grob-property grob 'X-extent)
>>
>> % Returns the number of ems already traversed by the grob's siblings in
>> % previous systems
>> #(define (width-up-to grob siblings count)
>> (if (eq? (car siblings) grob)
>> count
>> (+ (+ count (width-up-to grob (cdr siblings) count))
>>   (grob-width (car siblings)
>>
>> % Returns the total width of the individual grobs for each system that
>> make up
>> % the original grob
>> #(define (calcfull siblings count)
>> (if (eqv? (length siblings) 0)
>> count
>> (calcfull (cdr siblings) (+ count (grob-width (car siblings))
>>
>> % Fills a vector of length len with linear interpolations between the
>> values
>> % found in amplitudes
>> #(define (fill-amp

Re: Two Hands "Snake"

2019-07-08 Thread Thomas Morley
Am Mo., 8. Juli 2019 um 23:35 Uhr schrieb tdy lists :

> With the template of the vibrato:
>
> %% 
> https://raw.githubusercontent.com/mwitmer/LyUtil/master/ly/expressive_markings/vibrato.ly
> %% Original author: Mark Witmer
> %% Rewritten version by Harm
>
> I tweak the thiknes of the curve and I add a couple of lines to the variable 
> that I find in another question
> %%% 
> https://music.stackexchange.com/questions/42775/move-a-trill-into-the-stave
>
> so the Snake can get inside the staff.
>
> The where a couple of things I couldn't do.
>
> 1 - I couldn't find the way to start de curve from up to down.
> 2 - When the spanner arrive to a line break it's stops and do not continue as 
> can be seen in the attached image.

Hi,

I assume you took my rewrite of Mark's code from
http://lilypond.1069038.n5.nabble.com/How-to-make-this-postscript-spanner-to-work-with-L-amp-R-bound-details-td204375.html#a204622

Ad 1.
The function 'wavyVibrato' is called with a list of numerical numbers.
Iiuc what you're after, try negative numbers.

Ad 2.
The original code does line-breaks as well as my rewrite.
I suspect you're additions to be the problem.
What exactly are these?

Cheers,
  Harm

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


Re: caesura or other ornamentation ?.

2019-07-08 Thread eby_km
 Hello Andrew,

This is by William Hine, before 1750, the title simply says Voluntary. I have 
read somewhere how to interpret English music written before 1750.

I'm not sure if inverted-mordent/trill were written like caesura in those days. 
If you look at the sample, there are turns and trill or pralls. Is there any 
online reference for these non-standard ornament shape ?.

eby
 On Sunday, 7 July, 2019, 9:58:30 PM IST, Andrew Bernard 
 wrote:  
 
 Hello eby_km,
Well they are definitely keyboard ornaments. It would be helpful if you could 
say what the piece is and who is the composer and date? There are countless 
non-standard ornaments in 18c - this was well before the stage of 
standardization of notation. Not caesura, that much is certain.
Andrew

On Mon, 8 Jul 2019 at 01:24,  wrote:

Hello all, i'm typesetting a handwritten score found on internet, it does have 
several marking similar to "caesura" and "fermata + caesura" above the note 
itself and many youtube recordings this is played with "prall" variants for 
those weird markings, can someone confirm whether these are indeed "caesura" or 
some other ornamentation in the attached example ?.


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


Re: Link to "A Complete List of Music Symbols With Their Meaning"

2019-07-08 Thread stephaniesu
This is just something similar that might help. 

half note

  



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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