A downloadable game for Windows and macOS
MusicHelper – a procedural music generator
What is the MusicHelper
The MusicHelper is a funny tool I've created in order to help the musicians and composers to catch some fresh new musical ideas with the help of a procedural approach.
It generates melodies with 8bit-inspired notes and a retro interface. The notes freely move from left to right, pulse on each beat (and a bit more for each first beat of a bar) then disappear. The color and shape of the notes are totally random, only their pitch correspond to their height.
My two inspirations for this tool are :
- the recent Google Doodle about J.S. Bach with interesting machine-learning stuff (https://g.co/doodle/mq5877),
- and this video on Ableton that introduces random generation as a viable tool to compose a melody (https://www.youtube.com/watch?v=kz-dswnHIb4).
However, you can freely use the MusicHelper :
- as a helper for composition ;
- as a artistic tool to drive your neighbours mad with repetitive cheap sounds ;
- as a educational game to train yourself on rhythms (I don't recommand this though…).
How to use the MusicHelper
The basic way to use the MusicHelper is to setup your preferred params, then to hit the Play button.
Here is the interface of the MusicHelper:
From left to right, and top to bottom:
- Play/Stop button: begin or stop a new melody, or the loaded sound in playback mode ;
- Save button: save the last X seconds of the played melody.
- Seconds to save slider: how many seconds you wish to save. Lower values are usually better if you don't want to reconsider very ancient notes, especially on higher tempos.
- Load button: load the very last audio clip saved on your system (if available).
- Scale drop-down: set the scale and mode of your melody.
- Volume slider: self explanatory.
- BPM slider: Beat per minute. Corresponds to the global tempo of your melody.
- Chords slider: chances to trigger a triad/chord on each beat, from 0 (never) to 1 (always).
- Pitch variation slider: how much the melody varies from note pitches to others. Lower values give a more baroque-style melody, whereas higher values output a more fancy melody.
- Enable thirds checkbox: if enabled, the melody will only produce thirds (override the Chords slider).
- Rhythmic weight sliders: control how often the corresponding rhythmic patterns occur in the melody.
The playback mode allow you to save the last notes that played just a couple of seconds ago. You cannot save more that one audio clip at a time, the MusicHelper is not designed to have a huge load/save system, but for quick & simple inspiration.
The parameters are disabled in this mode, because you cannot affect the saved song. Moreover, some params like the scale cannot be included in realtime in the saved audioclip, because they currently force the engine to stop then play again a new melody, thus discarding the last one. It means that you cannot save a melody with a scale change in the middle. Sorry.
How it works
The note pitches are mapped to a Perlin noise value, read with a t parameter that roughly corresponds to the elapsed time. The pitch variation parameter controls the speed of t, so lower values mean less variation in the noise, thus less variation in the melody.
The melody itself is generated thanks to the Unity OnAudioFilterRead function, that allow to output procedural audio.
I realized the entire project as a student project in the IDE master at GOBELINS, l'école de l'image. I don't know how much time I'll be able to spend on this project, but feel free to suggest any improvement. What I think for now is:
- UX/UI improvement ;
- Multi language support ;
- WebGL support (currently not supported because of the procedural audio IMO, so I'm considering using audio assets for this platform) ;
- Improved import/export system to share your unique audio clips with the world
- Presets so you may go in and play with some cool stuff ;
- More content (rhythmic units/patterns, shapes?).
The code of the project is public and available on Github : https://github.com/bperraud/MusicHelper. Thank you for the (long) reading!
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.