SynthMaker

Fractions display (readout)

Archive · 2010 5 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Matthieu ·

I'd like to have a value displayed as fractions.... Like, 1.25=1+1/4 or 5/4 or "1 and 1/4" ... It would be meant to have something that gives me the simplest possible fraction on any float values 🙂

I'd like to use this to count quarters and quarter quarters, half quarter quarters and so on 🙂

I'll try to figure out something while waiting for progresses in this thread 🙂

Thanx

trogluddite ·

I'm guessing from your post that it's something like note lengths that you're going to use this for? I only ask, because that would mean that all the denominators would then be powers of two... i.e. 1/2, 1/4, 1/8, 1/16 etc... I'm just thinking that those might be the easiest ones to do as they would be the values of bits after the point in binary, so you might be able to use some sort of bitwise masking to find out what the denominator should be.

Matthieu ·

I'd like to use differant fractions too, any frac possible or round to the nearest fraction.... like 3/7, 9/23 1250/11200 ... Having a growth like " 1/16 > 1/8 > 3/16 > 1/4 > 5/16 > 3/8 > 7/16 > 1/2 " and so on 🙂 and having halves of any half in behind every halves too... And other fractions like " 1/6 > 1/3 > 1/2 > 2/3 > 5/6 > 1 "

I just whish i won't have to build a heavy fractions table XD

I don't understand everyhing that you tell as mayby i learned French Mathematics and am a bit unfamiliar with english maths vocabulary :P I guess that wikipedia should be my ally on that :P Do you belive that you could extend the ideas?

I guess i'll have to refresh the old learned stuff... First to concider that i have to output a numerator and a denominator ehmmm....

To simplify a fraction it has to be divided by a comon numera and denomi that ends in plain numbers.... I wonder how i could have a chain that could find the comon divider..

Yet i could round values and get them rounded near all multiplicators of 0.0125 or 0.0625 .... And to have a selector with string values for every fracs as "3/8" for .375 ...

But it would only be able to display x^2 values

trogluddite ·

Matthieu wrote: am a bit unfamiliar with english maths vocabulary

I'm certain that your English is much better than my French! 🙂 The English vocabulary is that the top of the fraction is called the numerator and the bottom part is called the denominator (many English people find this hard to learn too!)

Matthieu wrote: " 1/16 > 1/8 > 3/16 > 1/4 > 5/16 > 3/8 > 7/16 > 1/2 "

This example is the easiest to do because the computer already represents numbers in a very similar way inside, and the 2/4/8/16/32 sequence is easiest to compute.

The difficult part for using ANY fraction is to calculate what the denominator should be - It might need a lot of CPU power to test many possible numbers until the correct one is found, and SM is not very suited to making these kind of structures. If you can limit the bottom number to only a few choices, then it becomes a little easier. For the fastest calculation and lowest CPU, a table would be the simplest solution (but hard work to make 🙁 )

trogluddite ·

Ooops. Sorry to repeat things there - we were both typing at the same time I think!

Here's a very simple example of using a table to get the sequence as small as 1/32...

I've used a string array 'Get At' as it is much simpler than using a selector - you can edit all of the text in one box.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.