mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Lounge (https://www.mersenneforum.org/forumdisplay.php?f=7)
-   -   Prime music (https://www.mersenneforum.org/showthread.php?t=26260)

Viliam Furik 2020-12-02 11:42

Prime music
 
Recently I have started transforming Mersenne primes into music. I wanted to start with M1398269, the first prime GIMPS discovered, but it turned out to be too long for me to turn into music because it would be about 38 hours long and I couldn't find any online tool that could render MIDI file that long. So I went for the largest prime I could safely "musify" - M44497. [URL="https://drive.google.com/file/d/1h40zeJzjR2kqNn0KGSC9YXIgNoFPeWGX/view?usp=sharing"]HERE[/URL] is a link to my personal Google Drive, where you can find 1 hour, 14 minutes and 24 seconds of prime music.

"Musification" was done by mapping the decimal digits onto the consecutive piano keys, creating a CSV file that was turned into MIDI by a special tool I found. Then I used online renderer to render MIDI into WAV.

As I was writing, I realised I can shorten the number of notes, and herby time, by converting the number into a higher base.

After a short calculation, using all 88 keys of the piano, I can only shorten it to about 20 hours... Does anybody have an idea, how to shorten the big numbers? Or does anybody know of some tool or method that can musify arbitrarily big numbers?

kruoli 2020-12-02 12:26

If you convert the number to base 2[SUP]88[/SUP], then each "digit" represents a [I]combination[/I] of pressed keys.

Viliam Furik 2020-12-02 12:44

[QUOTE=kruoli;565042]If you convert the number to base 2[SUP]88[/SUP], then each "digit" represents a [I]combination[/I] of pressed keys.[/QUOTE]

Hehe, got ya! Mersenne numbers, expressed in power-of-2 bases are repdigits. It would be pretty monotonic song... Except for the beginning (that would be the single different digit - or rather symbol in base 2[SUP]88[/SUP]).

kruoli 2020-12-02 12:50

You are totally correct! :groan: My error was, that a base-2 repdigit is a near repdigit in base 2[SUP]n[/SUP]...

Dr Sardonicus 2020-12-02 13:13

If you're just using a series of single notes, I suppose you could convert to base 12*k and let the digits represent the notes in a range of k octaves.

(In a piano octave, there are 7 white keys (A, B, C, D, E, F, G) and 5 black keys - C sharp (D flat), D sharp (E flat), F sharp (G flat), G sharp (A flat), and A sharp (B flat).)

sweety439 2020-12-02 14:27

[QUOTE=Viliam Furik;565038]Recently I have started transforming Mersenne primes into music. I wanted to start with M1398269, the first prime GIMPS discovered, but it turned out to be too long for me to turn into music because it would be about 38 hours long and I couldn't find any online tool that could render MIDI file that long. So I went for the largest prime I could safely "musify" - M44497. [URL="https://drive.google.com/file/d/1h40zeJzjR2kqNn0KGSC9YXIgNoFPeWGX/view?usp=sharing"]HERE[/URL] is a link to my personal Google Drive, where you can find 1 hour, 14 minutes and 24 seconds of prime music.

"Musification" was done by mapping the decimal digits onto the consecutive piano keys, creating a CSV file that was turned into MIDI by a special tool I found. Then I used online renderer to render MIDI into WAV.

As I was writing, I realised I can shorten the number of notes, and herby time, by converting the number into a higher base.

After a short calculation, using all 88 keys of the piano, I can only shorten it to about 20 hours... Does anybody have an idea, how to shorten the big numbers? Or does anybody know of some tool or method that can musify arbitrarily big numbers?[/QUOTE]

You can convert to base 88, with A0=0, Bb0=1, B0=2, C1=3, C#1=4, D1=5, ..., B7=86, C8=87

Uncwilly 2020-12-02 14:51

1 Attachment(s)
.
[attach]23904[/attach]

Viliam Furik 2020-12-02 16:53

[QUOTE=sweety439;565055]You can convert to base 88, with A0=0, Bb0=1, B0=2, C1=3, C#1=4, D1=5, ..., B7=86, C8=87[/QUOTE]

I said (maybe not in the clearest way) that I did that. I was talking about using all 88 keys, but that still wasn't enough, as it only shortened the time to about half, which is still 20 hours.

Dr Sardonicus 2020-12-02 19:26

Hmm. The 88 keys on a piano make about 7 octaves.

The range of human hearing is usually stated as around 20 to 20,000 Hz which is about 10 octaves. So, at 12 notes per octave, that would be about 120 notes, give or take.

Using the digits in a base around 120 (assuming the base isn't a power of 2 like 128, of course!) would give you as many notes as you could possibly use, but the number of base-120 digits would only be something like 6% less than the number of base-88 digits.

kriesel 2020-12-02 19:49

[QUOTE=kruoli;565042]If you convert the number to base 2[SUP]88[/SUP], then each "digit" represents a [I]combination[/I] of pressed keys.[/QUOTE]
You're going to run out of fingers, even in a duet with an identical twin with bilateral polydactyly.

Rough draft from faded memories of the basics from school days music class long ago
88 keys
10 fingers usually
2 hands usually
code left pinkie finger position offset from leftmost key as ~7 bits to have more than enough symbols for possible positions on the piano keyboard, 6 might not do it, 7 overflows the keyboard, so remap linearly. Code actions of other fingers of same hand as 2-3 bits cumulative offset each and one each for struck or not, so ~12 bits there;
code force of key strikes as 3 bits (0=not struck, 7=hardest), code hold time as 3 bits. 25 bits to here.
(I think equal force and duration among the digits of a hand is a reasonable simplification. Do skilled players modulate force or duration of each finger on a hand individually? If so add a few bits each times 4 digits)

Assume arms do not cross or hands overlap. Might need still 7 bits for coding offset of right thumb, then code the rest of the hand as for the left above.

throw in 3 bits for the possible foot pedal activations assuming 3 pedals.
That's 53 bits; 2^53=9,007,199,254,740,992. Round up to 10^16.
Consider the decimal representation of a Mersenne number as a base 10^16 score.
Start from the MSD, or the LSD? Discard partial note code at the end.

Remap the nearly 10% of possible 16-decimal-digit codes that exceed 53 bits somehow. Perhaps accumulating ten such into a sum mod 2^53 and then playing that note.
I suspect how will not matter much, as the tune will probably sound awful regardless. And unplayable by humans, due to much larger hand excursions between notes than is usual.

Someone who actually played could probably come up with something much more plausible.

I suggest trying out some encodings with something simpler, like M4253 or a thousand digits of pi, to see how they sound.
[URL]https://youtu.be/z6ijiD-iUKw[/URL]

Recasting it as a duet does not double the number of bits per unit time. It's still going to be much too long. Maybe need a whole orchestra. But that may sound like the chaotic tuning up before a performance, while they're all doing different things, not playing in some sort of harmonious whole.

LaurV 2020-12-03 07:19

[QUOTE=kriesel;565082]You're going to run out of fingers, even in a duet with an identical twin with bilateral polydactyly.[/QUOTE]
Nope, all you need is a long stick/brush to press all keys at once, as you will only have all keys pressed, always (all digits wil be 111111 in base 2, therefore same in base 2^k, except first digit, but that also has no "gaps").

Or... if you are[URL="https://www.youtube.com/watch?v=93JiXloIhn4"] Rachmaninov, who had very big hands[/URL]... :razz:


All times are UTC. The time now is 22:58.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.