mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2020-12-02, 11:42   #1
Viliam Furik
 
"Viliam Furík"
Jul 2018
Martin, Slovakia

7·47 Posts
Default 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. HERE 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?
Viliam Furik is online now   Reply With Quote
Old 2020-12-02, 12:26   #2
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

1100101102 Posts
Default

If you convert the number to base 288, then each "digit" represents a combination of pressed keys.
kruoli is online now   Reply With Quote
Old 2020-12-02, 12:44   #3
Viliam Furik
 
"Viliam Furík"
Jul 2018
Martin, Slovakia

14916 Posts
Default

Quote:
Originally Posted by kruoli View Post
If you convert the number to base 288, then each "digit" represents a combination of pressed keys.
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 288).
Viliam Furik is online now   Reply With Quote
Old 2020-12-02, 12:50   #4
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

2·7·29 Posts
Default

You are totally correct! My error was, that a base-2 repdigit is a near repdigit in base 2n...
kruoli is online now   Reply With Quote
Old 2020-12-02, 13:13   #5
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

32×463 Posts
Default

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).)
Dr Sardonicus is offline   Reply With Quote
Old 2020-12-02, 14:27   #6
sweety439
 
Nov 2016

276410 Posts
Default

Quote:
Originally Posted by Viliam Furik View Post
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. HERE 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?
You can convert to base 88, with A0=0, Bb0=1, B0=2, C1=3, C#1=4, D1=5, ..., B7=86, C8=87
sweety439 is offline   Reply With Quote
Old 2020-12-02, 14:51   #7
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

2×4,597 Posts
Default

.
Click image for larger version

Name:	song-of-my-people.png
Views:	61
Size:	580.3 KB
ID:	23904
Uncwilly is online now   Reply With Quote
Old 2020-12-02, 16:53   #8
Viliam Furik
 
"Viliam Furík"
Jul 2018
Martin, Slovakia

32910 Posts
Default

Quote:
Originally Posted by sweety439 View Post
You can convert to base 88, with A0=0, Bb0=1, B0=2, C1=3, C#1=4, D1=5, ..., B7=86, C8=87
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.
Viliam Furik is online now   Reply With Quote
Old 2020-12-02, 19:26   #9
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

32·463 Posts
Default

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.
Dr Sardonicus is offline   Reply With Quote
Old 2020-12-02, 19:49   #10
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

29·167 Posts
Default

Quote:
Originally Posted by kruoli View Post
If you convert the number to base 288, then each "digit" represents a combination of pressed keys.
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.
https://youtu.be/z6ijiD-iUKw

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.

Last fiddled with by kriesel on 2020-12-02 at 20:00
kriesel is online now   Reply With Quote
Old 2020-12-03, 07:19   #11
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

914710 Posts
Default

Quote:
Originally Posted by kriesel View Post
You're going to run out of fingers, even in a duet with an identical twin with bilateral polydactyly.
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 Rachmaninov, who had very big hands...
LaurV is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
disk died, prime work lost forever? where to put prime? on SSD or HDD? emily PrimeNet 3 2013-03-01 05:49
End of the world as we know it (in music) firejuggler Lounge 3 2012-12-22 01:43
Pandora voyeurism(the music service) jasong jasong 0 2011-08-08 06:17
I make music Orgasmic Troll Hobbies 9 2010-06-19 04:34
Music and Maths davieddy Lounge 39 2007-04-07 07:35

All times are UTC. The time now is 16:04.

Tue Jan 19 16:04:56 UTC 2021 up 47 days, 12:16, 0 users, load averages: 1.96, 2.00, 1.88

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.