Wednesday, August 16, 2017

Embedding play time in file

I was thinking the other day that it'd be cool to have a MIDI file program like "XPMIDI" (another fine Mellowood product) display the duration of a MIDI file before playing it. I didn't want to have to scan each file and do a test play to figure it out, and since MMA already does a running total which is fairly accurate it makes sense to add this information to the file when it's created.

The code was very simple: just a single line which adds a text field to the MIDI headers. At this point I'm adding "DURATION xxx" where "xxx" is the play time in seconds.

If there is a more standard way of doing this would someone please let me know! Without comments to the contrary, I'll leave it as it is. Now, I need to figure out what to do with xpmidi!


Friday, August 11, 2017

Personal Groove Libraries

Every once in awhile I a request about setting up MMA to use personal libraries without needing to become root to add them. It's pretty simple:

In your .mmarc file (create one in your home directory if it doesn't exist) add the following line:

    SetLibPath  your_directory  $_LibPath

That's it.

Assuming that you have your personal files in ./config/mma/grooves it'd look like:

    SetLibPath  ~/.config/mma/grooves  $_LibPath

Including the $_LibPath in the setting line lets MMA search your library files first and, if it doesn't find the requested file, check the files supplied in your distribution second.

Now, put your creations where they belong. Don't forget to update using the -g option!

Hope this helps! Let me know if there is a problem.

Python 2.x support

There will be one more (or two) python 2.x releases, probably this year or early 2020. I'm thinking we should remove 2.x support for MM...