Index Installation Code Reference Source Code (Github) PyPi Page SOS

About

pyTuneGen is an automated music generator written in Python. (It can export them as MIDIs too!)

It can optionally be customized by picking scales, time signatures, bpms; or with some rather unorthodox variables (e.g. to control what ratio of bars you want to be repeated).

You may use this as a tool to get inspired -I sometimes do that myself-, or you can pick the good portions of a particular tune to use in your music. (No, I won't sue you.)
That being said, there is no artificial intelligence involved; so if you are a music creator, it might also be a good tool to clean up your plagiarist subconscious. If you've been doing that for long enough, you know what I'm talking about.

If you want to be a bit more adventurous, you can use it to make music for your video game, or something more creative such as
the melodic version of "godsays".

How It Works

I'm going to straight up tell you that this software (or script, or module, or generator, or whatever you call it) knows exactly NOTHING about music theory.
In fact, I coded it explicitly so that music theory will never ever become a part of this whole-

Okay, I'm being dramatic, I didn't actually go that far. But the point stands: This thing is MEANT TO BE as random as it is.
It is supposed to do a terrible job from time to time.

Anyway, what it does is that it generates music in bars, and these bars are populated with notes from the selected scale. The durations of these notes are picked according to the time signature, and playing speed is adjusted for correct bpm.

To be extra spicy, it can also add silences, or repeat some bars like human musicians do while creating human music.
Trust me, it often makes a big difference.