lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function to add a drone staff?


From: Sven Axelsson
Subject: Re: Function to add a drone staff?
Date: Thu, 9 Apr 2015 17:35:53 +0200

On 9 April 2015 at 17:27, Paul Morris <address@hidden> wrote:
> Gilles Sadowski wrote
>> Is there a way (i.e. a function) to automatically add a staff for a
>> bagpipe's drone note(s)?
>
> Hi, Here's a start, a function to change all the pitches of a melody to a
> given pitch.  Not tested on real music... (Since you only want the drone
> notes in midi maybe you don't need to deal with chords, which makes the
> coding simpler.)
>
> HTH,
> -Paul
>
> Hat tip to David Kastrup for this example:
> https://lists.gnu.org/archive/html/lilypond-user/2012-03/msg00621.html
>
> %%%%%%%%%%%%%%%
>
> dronify =
> #(define-music-function (parser location drone melody)
>    (ly:pitch? ly:music?)
>    (map-some-music
>     (lambda (m)
>       (and (ly:pitch? (ly:music-property m 'pitch))
>            (begin
>             (set! (ly:music-property m 'pitch) drone)
>             m)))
>     melody)
>    melody)
>
> melody = \relative f' {
>   c4 r c8 d8 r4
>   g2 r4 b4
> }
>
> <<
>   \melody
>   \dronify g' \melody
>   \dronify g \melody
>>>
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/Function-to-add-a-drone-staff-tp174261p174278.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Intersting. I have never tried to generate midi output for bagpipe
music. I suspect grace notes are not handled well. But in regards to
the dronification, all of the music, both melody and drone, should be
played legato. Is that also something that could be set up easily with
a music function?

I'm the maintainer of Lilypond's bagpipe mode, by the way.

-- 
Sven Axelsson
++++++++++[>++++++++++>+++++++++++>++++++++++>++++++
>++++<<<<<-]>++++.+.++++.>+++++.>+.<<-.>>+.>++++.<<.
+++.>-.<<++.>>----.<++.>>>++++++.<<<<.>>++++.<----.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]