Switch polyrhythms in staffs

2008-05-24 Thread Hajo Dezelski
Hello,

there is one problem which I can not resolve:

On a Pianostaff I have an upper voice with \time 18/16 which I coded:
\score ...
 \new Staff = upper {
  ...
\time 3/4
\set Staff.timeSignatureFraction = #'(18 . 16)
\compressMusic #'(4 . 6)
\soprano  }

and  a lower staff:
\new Staff = lower  { ...  \time 3/4 \bass }
...
}

This works fine until I have to switch the measure to 3/4 in the upper and
18/16 in the lower staff. And I have to do that a lot of times.

Where and how can I perform these changes.

Thanks in advance for your advice.

  All the best  Hajo

-- 
---
... indessen wandelt harmlos droben das Gestirn
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


tempo mark too far on the left side

2008-05-24 Thread Stefan Thomas
Dear lilypond-users,
in my opinion the tempo-mark-text is to much on the left side. Is there a
possibilitiy to change it?
Here the example:
%% begin %%
tempoMark =
#(define-music-function (parser location prependText notevalue
appendText) (string? string? string?)
#{
\mark \markup
{ \line { $prependText  ( \fontsize #-2 \general-align #Y
#DOWN \note #$notevalue #1 $appendText ) } }
#})
dreiviertel = {
\time 3/4
#(override-auto-beam-setting '(end * * 3 4) 1 4 'Score)
#(override-auto-beam-setting '(end * * 3 4) 2 4 'Score)
#(override-auto-beam-setting '(end * * 3 4) 3 4 'Score)
}
fourtoms = {  \override Staff.StaffSymbol #'line-positions = #'(-3 -1 1 3) }
\layout{

  \context { %hier wird ein neuer Kontext mit Namen
timesig geschaffen
\type Engraver_group

\consists Text_spanner_engraver
\consists Text_engraver
\consists Dynamic_engraver
\consists Axis_group_engraver
\name TimeSig



  }
  \context {
\Score \accepts TimeSig}





 \context { \RemoveEmptyStaffContext }

} %Ende des Layoutblocks!!!

global = { \time 2/4 s2 \dreiviertel \grace {s32 s s}   \tempoMark
subito piu mosso 4 = 112   s2. }

\score {

\new TimeSig  { \override Score.TimeSignature #'style = #'( ) \global }
\new Staff
\relative { \fourtoms \clef percussion  b8 b8 d4 |
\grace { g,32\f\ [ b d\!] } g,2. \p | }

}
% END 
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


can't beam in a quintuplet

2008-05-24 Thread Stefan Thomas
Dear lilypond-users,
I have another strange problem:
in the below quoted example, I can't have the notes in the quintuplet under
one beam.
How can I solve the problem?
\version 2.11.43
\relative {
\time 3/4 r2 \times 2/3 {  r8 g b } |
\time 4/4
\times 4/5 { d16 [ b f'8. ] }  r4 r2 }
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: can't beam in a quintuplet

2008-05-24 Thread Neil Puttock
Hi Stefan,

2008/5/24 Stefan Thomas [EMAIL PROTECTED]:
 Dear lilypond-users,
 I have another strange problem:
 in the below quoted example, I can't have the notes in the quintuplet under
 one beam.
 How can I solve the problem?
 \version 2.11.43
 \relative {
 \time 3/4 r2 \times 2/3 {  r8 g b } |
 \time 4/4
 \times 4/5 { d16 [ b f'8. ] }  r4 r2 }

Autobeaming in tuplets is a bit broken, unfortunately.

For this example, the simplest fix is to set the beat length for the
quintuplet; place this override before the \times block:

\once \set beatLength = #(ly:make-moment 1 20)

Regards,
Neil


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


Re: can't beam in a quintuplet

2008-05-24 Thread Stefan Thomas
Dear Neil,
thanks! I've made a shortcut
quintolbeam = { \once \set beatLength = #(ly:make-moment 1 20) }. I must
say, it's the first time I had this problem with tuplet and beams.

2008/5/24 Neil Puttock [EMAIL PROTECTED]:

 Hi Stefan,

 2008/5/24 Stefan Thomas [EMAIL PROTECTED]:
  Dear lilypond-users,
  I have another strange problem:
  in the below quoted example, I can't have the notes in the quintuplet
 under
  one beam.
  How can I solve the problem?
  \version 2.11.43
  \relative {
  \time 3/4 r2 \times 2/3 {  r8 g b } |
  \time 4/4
  \times 4/5 { d16 [ b f'8. ] }  r4 r2 }

 Autobeaming in tuplets is a bit broken, unfortunately.

 For this example, the simplest fix is to set the beat length for the
 quintuplet; place this override before the \times block:

 \once \set beatLength = #(ly:make-moment 1 20)

 Regards,
 Neil

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


Re: OS X, lyqi and rumor?

2008-05-24 Thread Christopher Suckling
On Fri, May 23, 2008 at 06:49:17PM +0200, Nicolas Sceaux wrote:

 Le 23 mai 08 à 15:36, Christopher Suckling a écrit :


 I use this modified source code:
   http://nicolas.sceaux.free.fr/lilypond/lyqi-osx.zip
 with this app for audio feedback:
   http://nicolas.sceaux.free.fr/lilypond/MidiScript.zip

 and the following settings in .emacs:

 (custom-set-variables
  '(LilyPond-pdf-command open)
  '(LilyPond-midi-command open)
  '(lyqi-default-language 'italiano)
  '(lyqi-midi-enabled-default t)
  '(lyqi-force-duration nil)
  ;; ...
 )

 (eval-after-load lilypond-mode
   '(progn
  (load-library lyqi-mode)
  (define-key LilyPond-mode-map \C-cq 'lyqi-mode)))


Thanks. Very kind of you. I look forward to playing with it this week.

Best wishes,

Christopher


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


Re: can't beam in a quintuplet

2008-05-24 Thread James E. Bailey


Am 24.05.2008 um 23:26 schrieb Neil Puttock:


Hi Stefan,

2008/5/24 Stefan Thomas [EMAIL PROTECTED]:

Dear lilypond-users,
I have another strange problem:
in the below quoted example, I can't have the notes in the  
quintuplet under

one beam.
How can I solve the problem?
\version 2.11.43
\relative {
   \time 3/4 r2 \times 2/3 {  r8 g b } |
   \time 4/4
   \times 4/5 { d16 [ b f'8. ] }  r4 r2 }


Autobeaming in tuplets is a bit broken, unfortunately.

For this example, the simplest fix is to set the beat length for the
quintuplet; place this override before the \times block:

\once \set beatLength = #(ly:make-moment 1 20)

Regards,
Neil


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


Wow thanks, I had this problem a while back, but never bothered to fix  
it, I just left it as lilypond had it: it wasn't *too* important to me.




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


Re: tempo mark too far on the left side

2008-05-24 Thread Neil Puttock
Hi Stefan,

2008/5/24 Stefan Thomas [EMAIL PROTECTED]:
 Dear lilypond-users,
 in my opinion the tempo-mark-text is to much on the left side. Is there a
 possibilitiy to change it?

You might consider using the newish snippet in LSR, 'Integrating text
indications in metronome marks'
(http://lsr.dsi.unimi.it/LSR/Item?id=444). Since it uses the metronome
mark object rather than a rehearsal mark, it's automatically aligned
with the note it precedes, and will set the MIDI tempo too.

Regards,
Neil


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


Re: rhythm template function

2008-05-24 Thread Jay Anderson
Whoops, you're right. I should have tested that. I'm betting that
there is an easier way to do this (Something more like the staccato
snippet http://lsr.dsi.unimi.it/LSR/Snippet?id=82). I'll hopefully get
a chance to mess with it a bit more this weekend (Memorial day on
Monday here in the US). Thanks.

-Jay

On Thu, May 22, 2008 at 5:28 AM, Alard de Boer [EMAIL PROTECTED] wrote:
 On Thu, May 22, 2008 at 5:09 AM, Jay Anderson [EMAIL PROTECTED] wrote:
 Easy Rhythm Template Creation added to the lsr. Thanks.

 -Jay

 Hi Jay,

 I had some trouble getting tuplets to work with your snippet. Here's a 
 modified
 version that checks whether a tuplet (TimeScaledMusic) is used in the 
 template,
 and handles that case separately; see function make-chord-or-tuplet. I'm not
 very good with Scheme, perhaps there is an easier way to do this?

 Thanks again,
 Alard.

 ---
 \version 2.11.46

 %Rhythm template stuff
 #(define (create-note pitch duration)
  (make-music 'NoteEvent
'duration duration
'pitch pitch))

 #(define (make-chord chord-pitches chordevent)
  (let* ((skip (car (ly:music-property chordevent 'elements)))
(rest (cdr (ly:music-property chordevent 'elements)))
(duration (ly:music-property skip 'duration)))
   (if (eq? (ly:music-property skip 'name) 'SkipEvent)
 (make-music 'EventChord
   'elements (append
   (map (lambda (x) (create-note x duration)) chord-pitches)
   rest))
 chordevent)))

 #(define (make-chord-or-tuplet pitches event)
  (if (eq? (ly:music-property event 'name) 'TimeScaledMusic)
   (make-music
'TimeScaledMusic
'denominator (ly:music-property event 'denominator)
'numerator (ly:music-property event 'numerator)
'element (make-music
  'SequentialMusic
  'elements (make-rhythm
 pitches
 (ly:music-property
  (ly:music-property event 'element) 'elements
   (make-chord pitches event)))

 #(define (make-rhythm pitches template)
  (cond ((null? template) '())
   ((ly:pitch? (car pitches))
 (cons
   (make-chord-or-tuplet pitches (car template))
   (make-rhythm pitches (cdr template
   (else
 (cons
   (make-chord-or-tuplet (car pitches) (car template))
   (make-rhythm (cadr pitches) (cdr template))

 % Returns two pitches from the input:
 %  ( The original pitch(es)
 %The pitch(es) in octave '-1' )
 % This makes the function work in \relative sections
 % To make it work outside of \relative only return p.
 #(define (get-pitches mus)
  (let* ((p (map
 (lambda (x) (ly:music-property x 'pitch))
 (ly:music-property mus 'elements)))
(first-p (car p))
(pitch (ly:pitch-notename first-p))
(alteration (ly:pitch-alteration first-p))
(octave -1)
(px (ly:make-pitch octave pitch alteration)))
   (list p (cons px (cdr p)

 #(define (rhythm-template template)
  (define-music-function (parser location mus) (ly:music?)
   (make-music
 'SequentialMusic
 'elements (make-rhythm
 (get-pitches mus)
 (ly:music-property template 'elements)

 %Example usage:
 %These methods should only be used within a \relative section.
 rhya = #(rhythm-template #{s8.- s16 s8#} )
 rhyb = #(rhythm-template #{s8[ r16 s16 s8]#} )
 rhyc = #(rhythm-template #{s16 s~ s4#} )

 rhyd = #(rhythm-template #{ \times 2/3 { s8 s8 s8 } s4 s4 s8 s8 s4 #} )
 rhye = #(rhythm-template #{
\times 2/3 { s8---\pp s8-- s8-- } s4-- s4-- s8-- s8-- s4-- #} )

 \score
 {
  \new Staff \relative c'
  {
   \time 6/8
   \rhya c \rhyb c |
   \rhya c e \rhyb c f |
   \rhyc c e \rhyc c d |
   \time 5/4
   \rhyd c
   \rhyd e
   \rhye c e g
  }
 }


 --
 Groeten,
 Alard.

 Ceterum censeo MS Word esse delendam.



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


Re: rhythm template function

2008-05-24 Thread Jay Anderson
Ok, I played with it a bit more. I still don't like the relative hack,
but I think the code below is slightly cleaner.

#(define (nondestructive-music-map fn mus)
  (music-map fn (ly:music-deep-copy mus)))

#(define (create-note pitch duration)
  (make-music 'NoteEvent
'duration duration
'pitch pitch))

#(define (make-chord chord-pitches chordevent)
  (let* ((skip (car (ly:music-property chordevent 'elements)))
 (rest (cdr (ly:music-property chordevent 'elements)))
 (duration (ly:music-property skip 'duration)))
(if (eq? (ly:music-property skip 'name) 'SkipEvent)
  (make-music 'EventChord
'elements (append
(map (lambda (x) (create-note x duration))
(pick-pitches chord-pitches))
rest))
  chordevent)))

#(define (apply-chord mus pitches)
  (if (eq? (ly:music-property mus 'name) 'EventChord)
(make-chord pitches mus)
mus))

% Returns two pitches from the input:
%  The original pitch(es)
%  The pitch(es) in octave '-1'
% This makes the function work in \relative sections.
% A flag is included to mark which marks if the first pitches need to be used or
% not.
#(define (get-pitches mus)
 (let* ((p (map
 (lambda (x) (ly:music-property x 'pitch))
 (ly:music-property mus 'elements)))
(first-p (car p))
(pitch (ly:pitch-notename first-p))
(alteration (ly:pitch-alteration first-p))
(octave -1)
(px (ly:make-pitch octave pitch alteration)))
   (list #t p (cons px (cdr p)

% Return the first set of pitches if the flag is true else return the second
% set. Always set the flag to false before returning.
#(define (pick-pitches pitches)
  (let* ((first (car pitches))
 (native-octave (cadr pitches))
 (relative-octave (caddr pitches))
 (return (if first native-octave relative-octave)))
(set-car! pitches #f)
return))

#(define (rhythm-template template)
  (define-music-function (parser location mus) (ly:music?)
(let ((pitches (get-pitches mus)))
  (nondestructive-music-map (lambda (mus) (apply-chord mus
pitches)) template

%Example usage:
%These methods should only be used within a \relative section.
rhya = #(rhythm-template #{s8.- s16 s8#} )
rhyb = #(rhythm-template #{s8[ r16 s16 s8]#} )
rhyc = #(rhythm-template #{s16 s~ s4#} )

rhyd = #(rhythm-template #{ \times 2/3 { s8 s8 s8 } s4 s4 s8 s8 s4 #} )
rhye = #(rhythm-template #{ \times 2/3 { s8---\pp s8-- s8-- } s4--
s4-- s8-- s8-- s4-- #} )
rhyf = #(rhythm-template #{ \times 2/3 { s4 \times 2/3 { s8 s- s } s4 } #} )

\score
{
 \new Staff \relative c'
 {
   \time 6/8
   \rhya c \rhyb c' |
   \rhya c, e \rhyb c f |
   \rhyc c e \rhyc c d |
   \time 5/4
   \rhyd c
   \rhyd e
   \rhye c e g
   \time 4/4
   \rhyf c \rhyf d
 }
}


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