[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: converting svg glyph to path data for use in scheme
From: |
David Kastrup |
Subject: |
Re: converting svg glyph to path data for use in scheme |
Date: |
Mon, 14 Dec 2015 13:07:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
"Trevor Daniels" <address@hidden> writes:
> David Kastrup wrote Monday, December 14, 2015 11:32 AM
>
>
>> Urs Liska <address@hidden> writes:
>>
>>> Am 13.12.2015 um 14:09 schrieb Graham Breed:
>>>> On 13/12/15 12:48, N. Andrew Walsh wrote:
>>>>> Take a look at conversions.ly (sorry; mround is the equivalend
>>>>> function in
>>>>> the spreadsheet I use to do the same thing). Those functions will
>>>>> convert
>>>>> the input (given as a fraction comprising two integers) into Lily's
>>>>> semitone values. That should allow you to convert between
>>>>> just-intonation
>>>>> ratios an the nearest note name. Urs has some comments in there
>>>>> explaining
>>>>> a bit how it works.
>>>>
>>>> Converting from ratios to cents is easy. Converting between ratios
>>>> and cents requires a function from cents to ratios. That's a lot more
>>>> difficult because information is lost. You got us excited by
>>>> suggesting that had been solved.
>>>
>>> Well, this is because conversion from cent to ratio isn't part of the
>>> objective currently.
>>
>> Guile has
>>
>> (rationalize (inexact->exact (atan 0 -1)) #e1e-6)
>>
>> so you can try converting irrational numbers to ratios. However,
>> figuring out the precision to use may be tricky and there is no "prefer
>> simple ratios" option. All you have to work with is the eps argument.
>
> One way to approach this would be via continued fractions.
Well, that's what `rationalize' does.
--
David Kastrup
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), Graham Breed, 2015/12/13
- Re: converting svg glyph to path data for use in scheme, Simon Albrecht, 2015/12/13
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), N. Andrew Walsh, 2015/12/13
- Message not available
- Re: converting svg glyph to path data for use in scheme, N. Andrew Walsh, 2015/12/13
- Re: converting svg glyph to path data for use in scheme, Graham Breed, 2015/12/13
- Re: converting svg glyph to path data for use in scheme, mskala, 2015/12/13
- Re: converting svg glyph to path data for use in scheme, Urs Liska, 2015/12/14
- Re: converting svg glyph to path data for use in scheme, David Kastrup, 2015/12/14
- Re: converting svg glyph to path data for use in scheme, Trevor Daniels, 2015/12/14
- Re: converting svg glyph to path data for use in scheme,
David Kastrup <=
- Re: converting svg glyph to path data for use in scheme, N. Andrew Walsh, 2015/12/14
- Re: converting svg glyph to path data for use in scheme, Urs Liska, 2015/12/14