The Musical Potential of Sine Waves

Using Simple Algorithms to Overcome Creative Blocks

Pedro Quintas
3 min readJan 28, 2021

Creativity is hard. Let’s say you want to make an instrumental album. When you’re starting out a new project, staring at a blank slate, it’s easy to get crushed under the weight of the possibilities. Overcoming this is an essential part of the creative process, but I’m a computer scientist — I’d rather write some code that would automate this for me. Once this idea hits you, it’s easy to get caught up in the idea that the computer should be creative in the same way you are creative. But creativity is mysterious. No one really knows how it works, it feels like some sort of magic. You expose yourself to ideas, and when you least expect it, your brain just comes up with new ideas, seemingly out of nothing. There are models that try to explain this process, but they’re imperfect. You can try to capture the process using complicated AI techniques, such as Neural Networks, Genetic Algorithms, maybe combine the two and try to do something with Neuroevolution, or maybe you use something completely different. This is a lot of fun, but it’s easy to lose perspective and to never actually create the album that started it all.

An alternative to this is to abandon the idea that the computer needs to be creative. You’re creative, the computer just needs to give you some suggestions — fill the blank slate with something. You can take care of the rest. This is actually a really fun way of creating art, if you like programming. First you come up with some algorithmic process capable of generating ideas — melodies, chord progressions, color schemes, shapes, or anything else. Then you take the ideas generated by your algorithm and build from there. The art created like this is often called Generative Art, and people have created a lot of awesome things by relinquishing some control to the computer.

For this project I decided to use sine waves to control the properties of a melody. This process yields melodic ideas that have a natural flow and momentum. Each melody is controlled by three sine waves: the first sine controls the pitch of the notes; the second the duration; and the third controls the velocity or volume of the notes. Each sine wave has a different frequency and phase, and maps to different values. The pitch wave is mapped to an ascending list of pitches. The duration wave is mapped to an ascending list of note values. Finally the velocity wave is mapped to velocity values between 50 and 127.

I used this process to create 100 melodic excerpts, which I then used as a starting point for six different compositions. These compositions make up Sinusoidal, a partially generative album that explores the potential of sine waves for creating melodies, textures, and harmonies. I tried to explore different styles and created some other musical elements to complement the machine-created melodies. Humility aside, I think the album turned out really great, and encourage you to give it a listen. If you find yourself in a creative rut, I would also encourage you to try out creating generative art, and exploring computational processes with artistic potential instead of the final result.

--

--

Pedro Quintas
Pedro Quintas

Written by Pedro Quintas

0 Followers

I'm a researcher and professor from Lisbon working on Computational Creativity.

No responses yet