r/Python • u/Atiriko It works on my machine • Oct 28 '24
Showcase Algorithmic Music Generation with Python
Hi, all. I've been building this Python program on the side when I find time from my full time job for the last month or so. It's nowhere near finished but I wanted to share what I'm building with you guys just to get some feedback. I will keep posting updates about this project as I itterate.
Finally this project got to a point where the output sounds pleasant to me so I wanted to see If I'm the only one or am I on the right track. There is still a lot that doesn't work with this project as I can't find a lot of time to work on it.
There are some example videos on the Github page. UI on the videos are from an older version, so if you decide to run it for yourself (Which I don't recommand. Its really not worth the hastle right now.) you're gonna see a different UI with correct keys on the animations as opposed to the ones on the videos.
What works:
It picks a starting note. Based on the starting note and the defined scale, It picks 4 chords. It picks a way of playing those chords in terms of their timings. It picks random notes in the correct scale to generate a melody. It adds a very very simple drum loop on top of all. It shows what is being played on the screen as it plays. if you press f on terminal, it allows you to play freely with your pc keyboard using fl studio key bindings.
What I'm working on:
- UI with buttons for start, stop freeplay, output midi, record screen.
- More instruments, especially bass.
- More drum patterns.
- More complex melody algorithm to create intro verse chorus.
Please let me know what other features whould you expect from a program like this. I'm open to any kind of feedback. Let me know what you think.
- What My Project Does: It algorithmically generates music.
- Target Audience: just a toy project.
- Comparison: Compared to other music generation libraries this one doesn't use AI to generate the music so it gives you complete control over the output.
View all comments
Show parent comment
1
u/Atiriko It works on my machine Oct 29 '24
I love your ideas, I'll think about how I could implement them. Its really interesting to have a weighted graph and make it change the likelihood of a note being played again. I was thinking of making it generate a bar of melody, repeat it 3 times, and change it slightly for the 4th bar. Creating 2-3 of those 4 bar sections with slight variations like adding and removing instruments should make it sound like actual songs.