My name is Jacob, more commonly known as "Bauss" around different communities.
I'm 25 years old and been a professional software developer for about 6 years, but started coding back in like 2006.
I have been working with many different fields such as game development, networking, financial applications, housing applications, AI, UI, web and mobile apps etc.
I've never really written any blog posts, so I apologize if it's boring and not very well written.
This blog posts isn't so much technical as future blog posts will be and there is a lot more theory than coding.
Future blog posts may disclose more coding than theory to explain how Melodyc is going to work.
For some of my open-source projects see my Github: https://github.com/bausshf/
The attached image are a preview of what the chord/melody generator of Melodyc currently looks like.
What's my experience with music?
Around 2007 some friends and I were watching a lot of different YouTube channels and we stumbled across this guy who made his own music using FL Studio so we all decided to just try it out.
For a while it was just a toy to us and we didn't really use it much or understood all the aspects of it.
Then around 2008 we started getting an interest in making our own music so we started making some beats.
A couple years after I was the only one left from the group who still kept a liking to making music.
So for around a decade I've been a music producer on the side-line and only working with some private clients and friends from my network.
That's until around February 2018 when a friend of mine pitched an idea to me to go public with my business and so I've been working for the past year on setting up my record label and business.
It has finally come to a point where I can say that it's going to be finished around March.
I have never applied my technological knowledge to my music production until late 2018 where I started experiment with VST development, FL Studio plugins and lately an AI that can generate any type of music and that's what this post is all about. Using artificial intelligence to generate music.
Why I decided to make the project?
Around a week ago I was empty for motivation and inspiration to make music. Basically I had been trying for hours that day to come up with something and nothing that I liked came up after jamming on my MIDI keyboard.
I guess I was in the hole and had a hard time climbing out of it.
Then it came to me that I could try to just generate some random chords based on some different scales given.
And it happened ... it gave me some pretty good results and I decided to just take the project further and kept adding minor features to it.
Then after being satisfied with the prototype because it was anything but pretty then I pitched it to a private community of producers and there seemed to be an interest in the project.
After the interest I decided to make it a product that's part of my record label when its website opens. That also meant I had to rethink the whole product, the design and the process of it as what existed now was really just a quick mash-up but I had to make it better, much better. I had to make it something that would be unique, but prove itself useful.
After a lot of brainstorming and planning I started to develop it.
Since the website is written in The D Programming Language and uses my own web framework Diamond: https://diamondmvc.org/ then I decied to go with D for the implementation of the project because that would save me a lot of time when having to implement it on the website.
What's the purpose of the project?
The purpose of Melodyc (Yes, that's the name I gave it. It's a mash up of "Melody" and "Melodic".) is to generate music based on given options such as bars, progression, scales, moods, instruments and genres.
Of course that all sounds simple and it's not very hard to generate "random" music.
I didn't just want "random" music. I wanted good music, no... beautiful music is what I wanted.
That's why Melodyc will not just be a music generator, but an AI that teaches itself music theory and analyzes hit songs to figure out how the music should be generated.
What sets Melodyc apart from other similar services is how easy it is to use and configure and that it'll have a free plan!
Also its flexibility and that it's based on the input from actual producers around the world, so it's not just a theoretical product, it's a product based on factual needs of producers and it'll always expand that way.
Not only is the purpose to create a useful product for producers, but it's also a way for me to expand my technological experience and music theory knowledge.
Melodyc will not be an open-source project however, I want to keep the algorithms and in-depth technical details to myself since it's a product that I'm going sell commercially.
That doesn't mean I won't explain certain aspects of Melodyc's technical details though as I reckon there's a lot of learning for not just me, but also people reading these posts.
What are Melodyc's goals?
- To be user-friendly
- To always expand according to industry necessities of producers
- Generate beautiful music based on hit songs
- Completely configurable but without complexity
How does Melodyc work?
This is where we get a little technical, since this is meant to be a technical blog posts.
I apologize if it took a while until we got here.
The UI part of Melodyc lives on the website, but in the future it might have an offline version or even be a part of a VST.
Since Melodyc is a part of the website then the UI part is writte in D using Diamond as disclosed earlier.
The Chord/Melody Generator
Basically this is where you give the inputs on how the chords and melodies generated should progress.
You specify an octave/pitch which is the start octave/pitch of the chord/melody generated. It doesn't mean that all notes for the chord/melody will be within that octave because it depends on the progression.
Next you specify a maximum progression. The maximum progression decides how many semitones there maximum can be between the lowest and the highest note.
By default the maximum progression is 12, which means that the lowest and highest note can only be a single octave a way from each other.
Ex. if the lowest note is E5 then the highest note cannot be higher than E6.
After specifying a maximum progression the amount of bars to generate music for must be specified.
By default that's 4. Only a limited set of bars can be specified such as 1, 2, 4, 8, 16 and 32.
After that you gotta specify the chord options which are all the base for how the chord and melody progresses since the melody will be based on the chord and its scale.
First you specify the scales to be used.
Ex. "c,em,dm,a#" which tells Melodyc to use the C-major, E-minor, D-minor and A#-major scales.
Next you select an instrument and a genre.
This tells Melodyc to progress the chord and melody according to the given instrument and genre since each instrument and genre have different progressions.
Instead of specifying a range of scales then you can give it a specific mood.
Moods are basically some pre-selected scales based on two major/minor scales and a semitone space between them.
Ex. let's say you've selected the mood "M4m (Sad / Depressing / Emotional)."
Now you give Melodyc a note that it has to start at ex. "e"
What Melodyc does when creating the chord and melody now is to start with the e-major scale and then next after that it will do a g#-minor scale.
That's because between the first note of the e-major scale and the g#-minor scale there are exactly 4 semitones.
So basically "M4m" means start with a major scale, skip 4 semitones then end with a minor scale.
It's possible to use one of the preset moods, but you can also specify a custom mood say you want M4M for some reason then you just specify that.
After the basic chord options you have to specify the melody options which basically tells how the melody should progress.
You can specify up to 4 progressions, where 1 progression is used per bar specified.
The melody progressions basically selects what kind of algorithm will be used to generate the melody of the given scale.
Ex. if you select the "Swinging Upwards" progression then the melody will progress by start on a low note, then a high note, then another low note etc.
There are many possible progressions to choose from and each will generate different results.
What you select should all depend on what type of melody you're looking for.
When all your configurations are done then basically you just press the "Generate" button and it'll make an XHR call to the API which then generates a set of chords and melodies.
After that it returns the result as a set of piano-roll images and midi files that you can save and use.
Those are the basics of how Melodyc works, but there are going to be a lot more things to it such as presets, sequence generator (For drums, percussion etc.), instrument configurations, genre configuration, mood configuration and an archive (saved results etc.)
Those will all be explained in future blog posts.
The following song was created with the help of Melodyc:
Release of the project
The project will be opened along with the rest of Underground Rekordz website in March.
It's still in development and as of now there aren't much more than just basic chord/melody generating done.
The plan is to write more blog posts that are way more technical and goes in-depth with the development as the project progresses.
This means explaining how it generates the music and how the analysis of songs goes and how Melodyc will improve itself over time to create better chords and melodies without further development.
This blog post is merely an introduction to the project and what's in store.
When the project is finished you'll be able to find it here: https://undergroundrekordz.com/
You can read the second part here.