So I wrote a library to help me compose music

Pedro Maciel
Pedro Maciel
Published in
3 min readMay 7, 2017
John Coltrane. Probably calculating chords, scales and changes?

Music is art, but the music theory has deadly mathematical concepts, covered by an array of specific jargon. That makes it a quite hard to understand and specially to apply.

Musicians spend hours, days, years and their lives on the effort of learning their muscles into keys, scales, chords, progressions and intervals. It requires an insane amount of brain work if you really wanna dig into the core of it.

However, what if computer could help us on these difficult tasks?

I’ve been working on a album for some time. In this journey, I’ve done multiple music theory courses in order to better comprehend how I could wrote rich and quality song pieces.

And I took an hiatus.

And I came back into the job and realized I didn’t remember all the concepts so well anymore. The greek modes, the tonalities, the chords, everything was kinda blank in my mind.

So said to myself: that can’t happen. I’ve got to have those things written somewhere, so that I can’t never lost it again. But I’m not good on annotating things.

So i’ve started this library called Coltrane.

And after some (a lot) of sketches and fidgetting…

… I’ve got this:

Coltrane, what are the notes for the BM7?

Alright, but could you point me them on the guitar?

Ok, I’ll start my song with it. What scales do include this chord?

Nice. What are the tertians of this scale?

And the seventh chords?

Excellent. I think i’ll do ’em on the piano. Could you help me?

Next version should definitely include the chord together as well

Alright. I think I want now visual guide to solo with a blues scale

Cool, but I think that knowing to which degree of the scale each note belong would help me a lot!

Ok, now for some weird reason, I need to know which 5-note chords does B Major shares with the B whole note scale.

Conclusions

So there’s a lot more I could do. I’ve wrote some guitar chord finding which is surprisingly slow, specially because of the complex logic into combining notes in a possible way to strum in the guitar…

… I’m not very happy with it. Too slow, too many chords, not very image-ish. Frankly, I think that plotting the notes visually is far more appealing for a composer.

You can find the project here:
https://github.com/pedrozath/coltrane

--

--