On 2024-10-13 14:41, Eef Weenink wrote:

Wish you all a very good day to start with.

I am working on an arrangement, what has a lot of broken chords in the bassline). Something like this:

Now I want to give this another rhythm: 3 quarters in stead of 6 eights.
First measure would then be: c4 bes f

I am wondering if there is a trick, tool, tip to make this a bit easier, Now I have to all manually. Best I can think of is to make something with regex find replace.

Yet another option (in case you haven't already entered the full piece with 8th notes) is to define a macro and just switch the definition of the macro to obtain the other rhythm. The following shows how to obtain the first bars. Just uncomment the second definition to get the alternative rhythm. Please note that this solution doesn't work out of the box if you want to enter the pitches using relative mode, therefore I used \fixed in this example. I also changed where the diminuendo starts, just to illustrate how to do it in the middle of a pattern.

\version "2.24.2"

% Slurred pattern with 8th notes:
patI = #(define-music-function (p1 p2 p3) (ly:pitch? ly:pitch? ly:pitch? )
  #{ $p1 8 ( $p2 $p3 $p2 $p1 $p2 ) #} )

%% Uncomment next lines for pattern with quarter notes:
%patI = #(define-music-function (p1 p2 p3) (ly:pitch? ly:pitch? ly:pitch? )
%  #{ $p1 4 ( $p2 $p3 ) #} )

% The corresponding staccato version:
patII = #(define-music-function (p1 p2 p3) (ly:pitch? ly:pitch? ly:pitch? )
  #{ $p1 8-.  $p2 -. $p3 -. $p2 -. $p1 -. $p2 -. #} )

%% Uncomment next lines for pattern with quarter notes:
%patII = #(define-music-function (p1 p2 p3) (ly:pitch? ly:pitch? ly:pitch? )
 % #{ $p1 4-.  $p2 -. $p3 -. #} )


\fixed c {
  \clef bass
  \key f \major
  \time 3/4
 
  \patI c bes f' |
  \patI c bes es' |
  \patI c a f' |
  \after 4 \dim \patI c a f' |
  <> \> \patI c bes f' |
  \patI c bes es' |
  <>\p \patII c, as, es |
}


   /Mats

Reply via email to