daviddekleer / EasyMIDI

A simple, easy to use algorithmic composition MIDI creator for Python, based on midiutil.
Other
4 stars 2 forks source link

fixed multi-tracks unsupported bug #3

Closed acttmer closed 4 years ago

acttmer commented 4 years ago

The library at the moment has a serious bug that will cause multi-tracks not working. There is a simple solution, which requires the user to provide the number of tracks explicitly.

daviddekleer commented 4 years ago

Hi, sorry for my extremely late response, I missed the notification because it was sent on an old mail address! The reason I did it like this was because I got kind of confused when checking out tracks vs channels in MIDI (channels can have lots of tracks). In the end I went just for a single track on each channel, but for true channel support tracks and channels should probably be isolated. I know it's limited because you only get 16 channels/tracks, but at that time it was a choice to keep it simple.

So addTrack is more like addChannel I guess.

acttmer commented 4 years ago

Hi, sorry for my extremely late response, I missed the notification because it was sent on an old mail address! The reason I did it like this was because I got kind of confused when checking out tracks vs channels in MIDI (channels can have lots of tracks). In the end I went just for a single track on each channel, but for true channel support tracks and channels should probably be isolated. I know it's limited because you only get 16 channels/tracks, but at that time it was a choice to keep it simple.

So addTrack is more like addChannel I guess.

Gotcha. Maybe we should replace addTrack with addChannel to avoid such a confusion.