[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get the pitch as number
From: |
Henrik Frisk |
Subject: |
Re: Get the pitch as number |
Date: |
Mon, 14 Feb 2011 15:39:43 +0100 |
On Fri, Feb 11, 2011 at 3:10 PM, Gilles THIBAULT
<address@hidden> wrote:
>
>> 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 ...
>
>
> 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 ?
>
Thanks Gilles,
I see now what the problem was. however, I'm not quite sure yet how to
avoid doing similar mistakes in the future, but maybe I'll get used to
it (For example, how do I know that I should start looking for
EventChord rather than NoteEvents?)
I'm not sure I understand your comment about using ly:pitch-notename
instead, but the method for getting the pitch is not necessarily
important. What I want to do is to map a 43-tone scale (octave divided
in 43-tones) to the first 43 tones of the chromatic scale so it is
important that I can tell middle C from C in the first octave.
ly:pitch-semitones seemed to be an appropriate method.
best,
/Henrik