[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: input code
From: |
Hans Åberg |
Subject: |
Re: input code |
Date: |
Fri, 13 Dec 2019 21:02:10 +0100 |
> On 13 Dec 2019, at 19:51, Freeman Gilmore <address@hidden> wrote:
>
>> LilyPond lack a way to indicate intervals,
> I am aware of this part:
>> and accidentals are merely intervals of relative scale degree zero. A 5th
>> has a relative scale degres 4, changes the position on the staff 4 steps,
>> and similar for other intervals. The accidentals do not change the position
>> on the staff.
>>
>> In addition to ly:make-pitch, you might have ly:make-interval. Then one
>> should be able to add and subtract intervals, add then to pitches, and the
>> difference two pitches is an interval.
>
> I would have to write the function, ly:make-interval. That would work for
> the common intervals, 2:3 and 4:5, in ET: but when you get up it the higher
> harmonic ratio intervals, different people define the intervals differently.
> It can be referenced to ET or Pythagorean and the number or what notes used
> in your system. For a simple example 4:7, (969¢) meantone is an Aug 6th in
> ET it is min 7th. The ratio 8:11, (551¢) can go either way based on you
> reference.
I wrote C++ code that can do that:
https://web2.storegate.com/share/IfU1q6i
But currently the limitation retuning the MIDI into ET by using the file
regular.ly.
It might be easier to just focus the accidentals first, which are represented
by a rational number where the flat is 1/2. Say a function ly:make-accidental,
with the same properties as intervals, only that it just changes this rational
number.
It looks as though note names are just symbols names, and can be a sequence of
ASCII letters, - or _, or a Unicode non-ASCII letter.
So one can have note names such as e♭. One possibility is to process symbols
into two parts, note and accidental, either by processing the name, or changing
the syntax so that they become syntactically separate. The latter has the
drawback that one cannot write merely e♭ anymore.
- Re: input code, (continued)
- Re: input code, Andrew Bernard, 2019/12/12
- Re: input code, Freeman Gilmore, 2019/12/12
- Re: input code, Aaron Hill, 2019/12/12
- Re: input code, Freeman Gilmore, 2019/12/13
- Re: input code, Hans Åberg, 2019/12/13
- Re: input code, Freeman Gilmore, 2019/12/13
- Re: input code,
Hans Åberg <=
Re: input code, Noeck, 2019/12/12
Re: input code, Freeman Gilmore, 2019/12/12