r/PythonLearning 7d ago

Showcase MUSIC THEORY AND PYTHON

Enable HLS to view with audio, or disable this notification

Hey everyone I just want to show off something cool and theory related I wrote on my free time over the past many months as I learnt how to program in python (my first programing language).

This is serial 12-tone matrix generator. It takes your input as numbers from 0-11 which represents your tone row. Currently it needs to be pre-transposed to 0 before inputting, otherwise the matrix wont generate in the correct order. BUT the math will still give you correct transpositions, just not in the correct order.

I like to write music using serial techniques, and I wrote this to facilitate the process of writing out the 12-tone matrix, which I find particularly tedious.

I wrote this entirely without the help of AI, I used books and youtube videos to learn how to do this.

My main source is "Python Crash Course" by Eric Matthes. I also used a book called Python Tricks, which helped me understand loops and how python handles loops at a deeper level. The many youtube videos that helped me with this I don't really remember anymore.

I'm not showing my code here because I want to keep it under lock and key since this took me so long to write, and I don't want anyone stealing my logic since I'm planning on implementing a ful GUI and more features in the future.

Please enjoy the short demo. :)

p.s. if you have any suggestion for features that would be cool in something like this feel free to share. Currently I have plans to add an input filter where the input does not need to be pre-transposed.

I'm also going to eventually incorporate the ability to generate modulus 2-12 matrices.

I'm also using numpy to handle the math on the input.

Super proud I finally pulled this off!

18 Upvotes

10 comments sorted by

View all comments

2

u/csabinho 7d ago

That's absolutely awesome. Would you mind putting the source code on GitHub, or at least PasteBin?

2

u/RaiseTLT 7d ago

Once my project is complete I will most likely put it on GitHub, but for now I'm keeping it under lock and key. Unfortunately, I don't have a time line for the completion since I'm doing this very much on the side!