lilypond-user
[Top][All Lists]
Advanced

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

Re: convert relative to absolute...


From: Rick Hansen (aka RickH)
Subject: Re: convert relative to absolute...
Date: Tue, 31 Oct 2006 10:06:14 -0800 (PST)



Julian Peterson wrote:
> 
> I have a project in which I am training a computer to improvise in the 
> same style as an example piece of music.
> I wrote a little program in supercollider to take a sequence of lilypond 
> notes, learn patterns from them and then generate
> output for lilypond to render into a score.
> The material I would like to feed it is written using /relative , but 
> for my script to work I need it to be in absolute pitches.  Is there a 
> script or method for doing this?
> 
> In other words, I would like to convert:
> 
> /relative c'' { c d e f g f e d c g c g c}
> to
> {c'' d'' e'' f'' g'' f'' e'' d'' c'' g' c'' g' c''}
> 
> Any ideas?
> 
> Thanks,
> Julian Peterson
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 


No ideas, but I have also wanted the "opposite" of \relative when I want to
re-use my note-based chord names in various relative/absolute contexts.  I
have each chord assigned to a variable (in key of C) in a .ly file that I
designate as my "chord library", when I want to generate chord names (on a
ChordNames staff) I simply specify the variables I want (enclosed in a
\transpose to get the root name).  The problem arises is that my chord
library variables are coded in "absolute terms" with octave marks, so that
means if I try to use those variables in a \relative context, I wind up with
some pretty weird chord names with tension numbers like 16's 24's 34's etc. 
It would be handy to have a wrapper function that will allow you to re-use
absolute coded notes in a relative context or relative coded notes in an
absolute context.  For now I've just made sure my ChordNames staff never
specifies \relative, so I certainly have no pressing need.  I live with this
because I like my chord names to be derived from the note stacks as opposed
to using the built in chord naming fragments, as this makes more musical
sense to me, then I use an exceptions list to get the names exact.


-- 
View this message in context: 
http://www.nabble.com/convert-relative-to-absolute...-tf2546920.html#a7099145
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.





reply via email to

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