Re: Slur position : "catching" Llilypond values...
On 2/11/11, Xavier Scheuer wrote: > On 8 February 2011 22:56, David Nalesnik wrote: >> >> Hello, >> >> There probably is a better way to do this, but the function below >> seems to do the trick. It adds an offset to the Y-coordinate of >> either or both of the slur's attachment points. Setting one value of >> the pair to zero will leave one end-point as it is. (See attached >> files.) >> >> offsetPositions = >> #(define-music-function (parser location offsets) (pair?) >>#{ >> \once \override Slur #'positions = #(lambda (grob) >> `(,(+ (car $offsets) (cdar (ly:slur::calc-control-points grob))) . >> ,(+ (cdr $offsets) (cdr (cadddr (ly:slur::calc-control-points >> grob)) >>#}) > > Nice feature! Thanks! > Could you add it to the LSR? http://lsr.dsi.unimi.it/ Done: http://lsr.dsi.unimi.it/LSR/Snippet?id=748 I tried to make the code a little clearer by using "first" and "last," but apparently those procedures aren't defined within the #{ . . . #} construct. > Cheers, > Xavier Best, David ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: midi-output using one midi channel per string?
Am 10.02.2011 08:59, schrieb Ingo Glöckner: Hello, I am using Lilypond for writing guitar music. In this process, the generated midi output can be a useful control. In order to get a more realistic impression, I would like to send the notes for each guitar string to a separate midi channel so that it can trigger specific sound samples for each string. So far I have only found out how to assign distinct midi channels to distinct Lilypond voices, but I cannot enter the guitar music using one voice per string. My question is if is possible to split the midi output by strings. AFAIK, this is not possible. In case there is no simple way to achieve this: The association of the individual notes and corresponding strings is obviously known somewhere in the TabStaff code. Would this be a possible starting point for implementation? The performers are responsible for MIDI output, IIUC. So probably the note-performer has to take the string numbers into account. Or you'll have to create a kind of "string-channel-performer" which does the right thing. Performers are written in C++, but that's all I know about this stuff. Regards, Marc Thanks in advance for help! - Ingo ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Cross staff slur help
On Fri, Feb 11, 2011 at 05:23:20PM -, Phil Holmes wrote: > - Original Message - From: "David Kastrup" > >So that's probably a case for f4*1/4 in the input. > > Sorry - I don't understand. What does this mean? "draw an f crotchet (i.e. no beams), but consider that note to be a semiquaver (1/4 the duration of a crotchet) for internal lilypond timing" Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: fixing beaming
On Fri, Feb 11, 2011 at 10:40 AM, Phil Holmes wrote: > - Original Message - From: "Douglas Ridgway" > To: > Sent: Friday, February 11, 2011 5:22 PM > Subject: fixing beaming > > >> \relative c' { >> c8 c8 c8 c4 c4 c8~ | c8 r8 r2. >> } >> >> This beams the first three eighth notes together, but the third one >> should have a flag, to emphasize the syncopation. What's the right way >> to fix this? > > \relative c' { > c8[ c8] c8 c4 c4 c8~ | c8 r8 r2. > } > > I think this is what you want? Yep, exactly. I knew it ought to be easy :) Thanks! doug. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: fixing beaming
- Original Message - From: "Douglas Ridgway" To: Sent: Friday, February 11, 2011 5:22 PM Subject: fixing beaming \relative c' { c8 c8 c8 c4 c4 c8~ | c8 r8 r2. } This beams the first three eighth notes together, but the third one should have a flag, to emphasize the syncopation. What's the right way to fix this? Thanks! doug. \relative c' { c8[ c8] c8 c4 c4 c8~ | c8 r8 r2. } I think this is what you want? -- Phil Holmes ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Cross staff slur help
"Phil Holmes" writes: > I have a piece of piano music from the opening chorus of The > Gondoliers that I'm struggling to get my head round. A scan is > attached. It's a cross-staff slur, but my problem is that the music > in the left hand is still continuing (the crochet F) while the slur is > crossing the staves. I can't work out a) how to start setting this in > LilyPond or b) what it means in performance. > > Can anyone help? It's a rising melody line starting in the left hand and moving to the right. The "music in the left hand" is _not_ "still continuing" in the execution, but it would be silly to write an actual rest here while the sustain pedal is down. So that's probably a case for f4*1/4 in the input. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Get the pitch as number
It appears to me that I'm getting a list rather than an integer, but if I run (get-text texts (ly:pitch-semitones (ly:make-pitch 0 1 0))) So get-pitch was probably the culprit ... % #(define (make-text-script x) (make-music 'TextScriptEvent 'direction DOWN 'text (get-text texts x))) #(define (add-text-script m) (if (equal? (ly:music-property m 'name) 'EventChord) (ly:music-set-property! m 'elements (cons (make-text-script (get-pitch m)) (ly:music-property m 'elements))) (let ((es (ly:music-property m 'elements)) (e (ly:music-property m 'element))) (if (pair? es)(ly:music-set-property! m 'elements (map add-text-script es))) (if (ly:music? e)(ly:music-set-property! m 'element (add-text-script e) m) #(define (get-text ls n) (if (or (< n 0)(>= n (length ls))) "" (list-ref ls n))) #(define (get-pitch music) %% music as a eventChord (let* ((es (ly:music-property music 'elements)) (p (ly:music-property (car es) 'pitch))) ;(display "\npitch : ")(ly:pitch-semitones p)(newline) (if (ly:pitch? p)(ly:pitch-semitones p) -1))) %%(if (ly:pitch? p)(ly:pitch-notename p) -1))) #(define texts '("zero" "one" "two" "three" "four")) %%#(define texts '("zero" "one" "two" "three" "four"))%% with use of ly:pitch-notename addText = #(define-music-function(parser location m)(ly:music?) (add-text-script m)) music = \relative c' { b c cis d dis e f r} %% music = \relative c' { b c d e f g a r} %% with use of ly:pitch-notename \score { \new Staff \addText \music } NB You use : ly:pitch-semitones. You'll get first only a number from a note above the middle C, then your texts list will be very extensive. Are you sure you don't want ly:pitch-notename instead ? Gilles ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Can't use NoteNames twice in score block ??
On Fri, Feb 11, 2011 at 8:53 AM, Phil Holmes wrote: > > Michael, > > Did you make any progress with creating a Tiny example of this issue? > No. I tried for a while and then decided to let it sleep. It's not impacting the things I'm currently doing with LilyPond. Thanks for asking! If it's a real bug I'm sure it will come back to bite me again and I'll pursue it then. Cheers, Mike ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
FW: Scope of scheme defines in Lilypond projects
-Original Message- From: Simon Mackenzie [mailto:smac...@me.com] Sent: 11 February 2011 14:50 To: James Lowe Subject: Re: Scope of scheme defines in Lilypond projects Hi James, Thank you for the pointer. Booked out over the weekend time wise so will check this out early next week. Much appreciated... Here's hoping. Simon Mackenzie On 2011/02/11, at 16:43, James Lowe wrote: > Simon, > > )-Original Message- > )From: lilypond-user-bounces+james.lowe=datacore@gnu.org > )[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On > )Behalf Of Simon Mackenzie > )Sent: 11 February 2011 07:37 > )To: lilypond-de...@gnu.org > )Cc: lilypond-user@gnu.org > )Subject: Scope of scheme defines in Lilypond projects > ) > )Hi > )I'm wanting to write some globally accessible scheme functions / > )procedures (defines) for my lilypond project but the documentation on > )such seems a bit limited. I.e. Do \header, \page and other contexts > )introduce new variable scopes (assuming yes here)? If so, how can > )scheme functions and variables be defined globally for access in all > such )scopes within a lilypond project? > > I am not a scheme programmer but want to check that you have considered the > \include and \global settings? > > http://lilypond.org/doc/v2.13/Documentation/notation/working-with-inpu > t-files > > Simply put; have a single file with all your 'global' settings in and then > you can include other files that you need - for instance many of the mutopia > scores that are in LilyPond format are done like this with a single 'global' > file - the main score and all the various instrument files - the notes - > done separately. > > You can then add the scheme functions to the one file and then just include > that file in all your other .ly files as needed. > > Hope this helps. > > James > ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Cross staff slur help
- Original Message - From: "David Kastrup" To: Sent: Friday, February 11, 2011 2:44 PM Subject: Re: Cross staff slur help "Phil Holmes" writes: I have a piece of piano music from the opening chorus of The Gondoliers that I'm struggling to get my head round. A scan is attached. It's a cross-staff slur, but my problem is that the music in the left hand is still continuing (the crochet F) while the slur is crossing the staves. I can't work out a) how to start setting this in LilyPond or b) what it means in performance. Can anyone help? It's a rising melody line starting in the left hand and moving to the right. The "music in the left hand" is _not_ "still continuing" in the execution, but it would be silly to write an actual rest here while the sustain pedal is down. OK. Thanks. So that's probably a case for f4*1/4 in the input. Sorry - I don't understand. What does this mean? -- Phil Holmes ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Snippet does not work anymore
Am 11.02.2011 um 06:52 schrieb James Lowe: > > > For those that had trouble actually finding what the .ly code was.. > > % CODE %% > \markup { { \score {\new Staff \with { > \remove "Time_signature_engraver" > \remove "Clef_engraver" > \remove "Staff_symbol_engraver" > } { > d'8[ d'] > } \layout { ragged-right = ##t indent = 0} } \lower #3 { "=" } > \score {\new Staff \with { > \remove "Time_signature_engraver" > \remove "Clef_engraver" > \remove "Staff_symbol_engraver" > > } { > \times 2/3 { d'4 d'8 } > } \layout { ragged-right = ##t indent = 0} } > > } > } > > % to answer my own question: it can be done with \general-align #Y #DOWN the "=" sign is now a bit low, but I don't know how to raise it- I can live with that... ole % corrected Code \markup {\general-align #Y #DOWN { \score {\new Staff \with { \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Staff_symbol_engraver" } { d'8[ d'] } \layout { ragged-right = ##t indent = 0} } { "=" } \score {\new Staff \with { \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Staff_symbol_engraver" } { \times 2/3 { d'4 d'8 } } \layout { ragged-right = ##t indent = 0} } } } % ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Can't use NoteNames twice in score block ??
- Original Message - From: Michael Ellis I'm not having much luck reducing it down to a minimal example. I have family visiting for the next few days, so I'll try to pick it back up after Christmas. Cheers and happy holidays to all!, Mike Michael, Did you make any progress with creating a Tiny example of this issue? -- Phil Holmes ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
fixing beaming
\relative c' { c8 c8 c8 c4 c4 c8~ | c8 r8 r2. } This beams the first three eighth notes together, but the third one should have a flag, to emphasize the syncopation. What's the right way to fix this? Thanks! doug. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Cross staff slur help
I have a piece of piano music from the opening chorus of The Gondoliers that I'm struggling to get my head round. A scan is attached. It's a cross-staff slur, but my problem is that the music in the left hand is still continuing (the crochet F) while the slur is crossing the staves. I can't work out a) how to start setting this in LilyPond or b) what it means in performance. Can anyone help? -- Phil Holmes <>___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Slur position : "catching" Llilypond values...
On 8 February 2011 22:56, David Nalesnik wrote: > > Hello, > > There probably is a better way to do this, but the function below > seems to do the trick. It adds an offset to the Y-coordinate of > either or both of the slur's attachment points. Setting one value of > the pair to zero will leave one end-point as it is. (See attached > files.) > > offsetPositions = > #(define-music-function (parser location offsets) (pair?) >#{ > \once \override Slur #'positions = #(lambda (grob) > `(,(+ (car $offsets) (cdar (ly:slur::calc-control-points grob))) . > ,(+ (cdr $offsets) (cdr (cadddr (ly:slur::calc-control-points > grob)) >#}) Nice feature! Could you add it to the LSR? http://lsr.dsi.unimi.it/ Cheers, Xavier -- Xavier Scheuer ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
RE: Scope of scheme defines in Lilypond projects
Simon, )-Original Message- )From: lilypond-user-bounces+james.lowe=datacore@gnu.org )[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On )Behalf Of Simon Mackenzie )Sent: 11 February 2011 07:37 )To: lilypond-de...@gnu.org )Cc: lilypond-user@gnu.org )Subject: Scope of scheme defines in Lilypond projects ) )Hi )I'm wanting to write some globally accessible scheme functions / )procedures (defines) for my lilypond project but the documentation on )such seems a bit limited. I.e. Do \header, \page and other contexts )introduce new variable scopes (assuming yes here)? If so, how can )scheme functions and variables be defined globally for access in all such )scopes within a lilypond project? I am not a scheme programmer but want to check that you have considered the \include and \global settings? http://lilypond.org/doc/v2.13/Documentation/notation/working-with-input-files Simply put; have a single file with all your 'global' settings in and then you can include other files that you need - for instance many of the mutopia scores that are in LilyPond format are done like this with a single 'global' file - the main score and all the various instrument files - the notes - done separately. You can then add the scheme functions to the one file and then just include that file in all your other .ly files as needed. Hope this helps. James ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user