Re: Arpeggios from chordmode?

2011-08-01 Thread Gilles



Is there as simple way to get chord mode to return:

c4 e g

instead of

4



Is something like that what you wanted ?


#(use-modules (ice-9 receive))
%% see http://www.gnu.org/software/guile/manual/guile.html#Multiple-Values

#(define (chords-list->seq-list lst)
(receive (notes others)
 (partition (lambda(x) (ly:duration? (ly:music-property x
'duration)))
lst)
 (map (lambda(x)
(let ((elts (list x)))
  (if (pair? others)(begin
 (set! elts (append elts others))
 (set! others '(
  (make-music 'EventChord 'elements elts)))
   notes)))

chordsToSeq = #(define-music-function (parser location music)(ly:music?)
(music-map
(lambda (x)
  (if (eq? 'EventChord (ly:music-property x 'name))
(make-music 'SequentialMusic 'elements
(chords-list->seq-list (ly:music-property x 'elements)))
x))
music))


music = \chordmode {d4:min7\f g:7 c:maj7}

\new Voice \chordsToSeq \music
%%

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


Re: Arpeggios from chordmode?

2011-08-02 Thread Basso Ridiculoso
HA!!

Yes! That is very close indeed.

Now I can enter in chord changes, and with just a very simple search/replace
make an arpeggio sheet for them.

See enclosed file for example (requires Giles code below as an \include)

 To get the chord changes and the arps, I just double the chord progression
with a longer duration. It still is less typing than what I was doing.

And can I just say, this list is *always* helpful. I wish some software that
I have paid for had people as responsive as this list has. Every time I have
asked a question it has been answered!

Thank you Giles!

Daniel

>
> --
>
> Message: 8
> Date: Mon, 01 Aug 2011 17:00:29 +0200
> From: Gilles 
> To: lilypond-user@gnu.org
> Subject: Re: Arpeggios from chordmode?
> Message-ID: 
> Content-Type: text/plain; charset="iso-8859-15"; Format="flowed";
>DelSp="yes"
>
>
> > Is there as simple way to get chord mode to return:
> >
> > c4 e g
> >
> > instead of
> >
> > 4
> >
>
> Is something like that what you wanted ?
>
> 
> #(use-modules (ice-9 receive))
> %% see http://www.gnu.org/software/guile/manual/guile.html#Multiple-Values
>
> #(define (chords-list->seq-list lst)
> (receive (notes others)
>  (partition (lambda(x) (ly:duration? (ly:music-property x
> 'duration)))
> lst)
>  (map (lambda(x)
> (let ((elts (list x)))
>   (if (pair? others)(begin
>  (set! elts (append elts others))
>  (set! others '(
>   (make-music 'EventChord 'elements elts)))
>notes)))
>
> chordsToSeq = #(define-music-function (parser location music)(ly:music?)
> (music-map
> (lambda (x)
>   (if (eq? 'EventChord (ly:music-property x 'name))
> (make-music 'SequentialMusic 'elements
> (chords-list->seq-list (ly:music-property x 'elements)))
> x))
> music))
>
>
> music = \chordmode {d4:min7\f g:7 c:maj7}
>
> \new Voice \chordsToSeq \music
> %%
>
> Gilles
> -- next part --
> A non-text attachment was scrubbed...
> Name: chordsToSeq.png
> Type: image/png
> Size: 906 bytes
> Desc: not available
> URL:
> 
>
> --
>
>


Arpblueschart.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Arpeggios from chordmode?

2011-08-03 Thread Gilles
Le Wed, 03 Aug 2011 05:10:11 +0200, Basso Ridiculoso  
 a écrit:




See enclosed file for example (requires Giles code below as an \include)


Just 2 comments.
1-You can use in your example \shiftDurations (well not a lot documented).  
It will divise all whole notes by 4

Your code becomes :

%%
JazzBluesChords =  {
\chordmode {
c1:7   | %1
f1:7   | %2
c1:7   | %3

g2:min7  c2:7   | %4

f1:7   | %5
f1:min7   | %6
e1:min7   | %7
a1:7  | %8
d1:min7 | %9
g1:7   | %10
c1:7   | %11

d2:min7  g2:7   | %12
\bar ":|"

}
}
JazzBluesProgression =  \shiftDurations #2 #0 \JazzBluesChords



2- It still remains problems if a chord has 3 or 5 notes !
Well if you think it can be useful for people, i can try later to find a  
way to fix that.


Gilles



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