Inspiration

The inspiration for this project came when I learned about generating random numbers on computers and how they are deterministic, where, given the same input seed, you will generate the same output. How can we generate random numbers in a non-deterministic way? Jazz music is inherently non-deterministic, as performers play what they feel in the moment, and not a set song. If we could use jazz music to generate random numbers, we could finally get non-deterministic random numbers.

What it does

RNJazzerator takes in an audio file, such as a recorded song, and detects the individual note frequencies. Once we have a list of note frequencies, we associate each note with a unique 6-digit binary value. Once we have 171 note values we can make a 1024-digit binary number, which we then use the wolfram one API to check if the number is prime. If the number is a prime, it can then be used for key generation in RSA cryptography. If it is not a prime, you still have generated a very large random number, which can be used for other purposes.

How we built it

Our project utilizes Django as a web framework, Python as our main language, html to load and format pages and output into a readable format, the wolfram one API to do primality and binary math, and JS to implement a piano app.

Challenges we ran into

There were a few roadblocks along the way in project development that stopped us. First off, none of our team members are familiar with JavaScript, therefore trying to implement a piano, where users can manually enter notes to generate numbers got stalled and set aside for another time. Another challenge we faced was finding a way to analyze audio files and differentiate notes. This was overcome by utilizing libraries that already exist and making changes to them because there wasn’t a proper library for doing exactly what we wanted. Once we had a finished program that functioned on our local dev-servers, we wanted to deploy it on google cloud, however, because it was 1:00am at that point, it seemed very far away and we couldn’t see ourselves finishing that part of the project.

Accomplishments that we're proud of

We are especially proud of implementing an API we had never used before (wolfram one), and actually making a consistent audio to binary converter. It was very surprising how quickly we actually managed to do that part of the project as it was functional within the first half of our development phase. We were also pleasantly surprised about how much time was saved using Bootstrap, since it made formatting the frontend pretty quick, and we could spend our time making sure the functionality actually worked as intended.

What we learned

Our team learned the basics of git, how to develop a basic Django application, how to use wolfram API, and the basics of JavaScript. We also learned that very large prime numbers are far and few, therefore very unlikely to generate.

What's next for RNJazzerator

One feature that is missing out of our demo is the manual piano number generation. We wanted people to be able to, if they were in a Jazzy mood, play their own random number songs. This could actually be implemented very easily; we just ran out of time as our piano does count for the required note amount and records key input. We also want to improve the UI to make it more interactive and user-friendly. There are also a few CSS changes we could make to make it more appealing to the eyes. Our program also only accepts .WAV files at the moment, and we would like to expand our program to allow all other audio file types such as mp3.

You won’t find a greater generator than RNjazzerator.

Share this project:

Updates