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.

Monday, July 10, 2017

New music and challenges

Now that the way too hot summer is here (we've had about a week of days with the daily high in the 35 to 38C (95 to 100F) range, I've been finding more time to work on some musical pursuits.

I'm relearning the piano accordion. I used to play this when I was in my early teens and, as I recall, I was pretty darned good. Fifty years later I'm not nearly as accomplished on technique ... but I'm a much better musician.  I understand chords, rhythm and melody. So, it's a bit of saw-off. A flute playing friend and I are hoping to put together some French and Latin music. Should be fun.

Of course, I'm still playing lots of saxophone. But, that's not what this blog entry is about.

Learning new music in today's world is so much fun! I've gone though old music books which were getting more than musty. Songs that I never played before I can now look up on YouTube and discover how they really should sound. Then, I create a little MMA file and have a wonderful practice tool.

MMA was originally created for PRACTICE, not performance. And it still does this job amazingly well. But, one can now perform with the MMA MIDI tracks. They really do sound good. MMA really is a great tool.

Let me know what you're doing with MMA. I'd appreciate it.

Saturday, May 6, 2017

Neat use of the AFTER command

I wanted to play a nice little song "Maria Bonita" written in the 1940s by Agustin Lara. Copied out a chart from a fake book and then transfered this to MMA. Simple ... until I realized that the time signature was 6/8. Ouch ... and this is not really the "normal" duple time; it's a waltz. So, each bar sounds like 2 bars of 3/4.

What to do?

A first I was going to write a new LatinWaltz groove. But, I'm feeling a bit lazy today and figured there should be an easier way. Yeah, right.

The LatinWaltz groove really doesn't work for 6/8. The timing is just wrong. Hmmm, off to work:

1. In the MMA file split each bar in two. Essentially, we now have a 3/4 file. A minor result of this is that I now have bars which look like:

1  Am
    Fm
2  Gm
    Am
 
I don't like un-numbered bars, but going with 1,2,3,etc. isn't right either. So, we'll leave the un-numbered alone.

The 3/4 groove works okay. But, it's not quite right. So, a bit of playing around.

2. To make the difference between the first and second bars in each pair I created a little sequence which sounds a triangle at the start of the odd numbered bars:

Begin Drum-Solo-Triangle
     Sticky On
     Tone OpenTriangle
     Volume m
     Sequence D1 z
End
Cool, that was easy.

3.  Now, I found the bass beats at the start of each bar needed to lighten up on the even numbered bars. So, right before bar one I did:
Begin After Repeat=2   // for bars 3,5,7...
   Bass Accent    /// no accent
   Walk Accent
End
and, right after bar one (right before the original 2nd half of the bar):

Begin After Repeat=2   // This is done on bars 2,4,6
   Bass Accent 1 -40
   Walk Accent 1 -40
End
And ... that's it.

Only problem is that bar 1/2 still has the original accents. I could play around and fix that, but it's not worthwhile.

I did learn something: AFTER is really neat and powerful!

Thursday, April 27, 2017

On Line Docs

I've had requests over the years for on-line docs for MMA. Always just ignored them because ... well, the main reason was that the web host I was using wasn't giving me a lot of bandwidth. And, with the crappy internet I was used to out here in the boonies I didn't understand why anyone would prefer something on-line when I was already supplying the "real thing" in the distro.

Well that time is no more. I still have fairly crappy internet, but it's better that it was (my package here is 5 mps up and down). And my current web host says I have unlimited bandwidth and more storage space than I'll ever need. The docs are already all in web form. So, it's just a matter of a few links and it's up.

In the MMA pages there is now a "on line documentation" item in the left hand navigation panel.

Let me know what you think about this. Hope it's useful.

One little point: This currently reflects the version of MMA I have on MY computer, not the current distro. I'll fix that up for the next release! Promise.

Edit: Here's the standard MMA url:  http://mellowood.ca/mma/index.html

Thursday, March 23, 2017

Arias

Don't know how many of you have fooled around with Aria tracks. I certainly have not, other than some examples after I created the beast.

But, I decided to play a bit today. What fun. And, I figured a way to use them in a more creative way (I'll have to add this to the example stuff). Pretty simple:

At the top of a song file, create an Aria (or more than one if you can wrap your brain around this). Something like this:

   Begin Aria
       Voice JazzGuitar
        Volume ..
        Sequence ..
        etc. SEE THE MANUAL
        Off
    End

The important thing to notice is the OFF as the final command.

Now, in the song you just need to insert "Aria On" and "Aria Off" where you want/don't want your solo crap.

If you want my song and a larger example, send me a mail!




Wednesday, March 1, 2017

MMA on Mac

I had a note the other day from a prospective user who had a Mac system. He was having some problems with installing MMA using the instructions at:

   http://mellowood.ca/mma/mac.html

I don't have a Mac, so really can't contribute much to the conversation. But, I'm sure one of my delightful readers can help. Please let me know if that page needs help or needs updating.

Saturday, January 21, 2017

MMA in Debian

Got a note earlier today from Anthony Fok the maintainer for MMA in the Debian repositories. He has uploaded version 16.06 and it should be working it's way though in the next short (long?) while.

In the meantime, I checked my repository for Ubuntu 16.10 and, YEAH!!!, MMA 15.12 is there. About a year old, but current enough.

Now, I honestly have no idea how many MMA users there are out there. Looking over my download history from my web site there are more than 200 downloads per month. And via distribution apt's? Who knows. But, all is pretty good as far as I can see.

Now, all you downloaders (and I assume users): Please share what you are doing with the greater community. Send me new grooves. Patches. Ideas.


Tuesday, January 17, 2017

Random chords

One of my friends did a little song in which he created the chord sequence by rolling dice. He then assigned different chords to the bars based on the results. Cool, I thought (even though he is using BiaB and not MMA to create his music). But, dice? Oh, so primitive! I figured a little python program would be much easier!

For the discussion and the song, jump over to the Kara-Moon forum.

So, here is a quick program (this listing was created using pygments, a very useful program).

To use, just create a sequence and then cut/paste the result into a text file. Add some groove names, tempo, etc. and you've got an original song. If only life had been this easy for guys like Bach and Beethoven.

Here's the code (you should be able to cut/paste this to your computer and run it with python):

#!/usr/bin/env python

# This program will generate a mma compatible
# set of chords generated at "random".

# The chords are generated based on a major scale in Ionian mode.
# Using roman numeral results permits easy key changes, but different
# chord tables can be used. 

import sys, os, random


def error(m):
    """ Abort on error with message. """
    print(m)
    sys.exit(1)

def usage():
    """ Print usage message and exit. """

    print("""
Mma-rndchords, (c) Bob van der Poel
USAGE: mma-rndchords  nn
  nn == the number of chords to generate.
""")
    sys.exit(1)



##########################

if len(sys.argv[1:]) != 1:
    print("mma-rndchords: number of requested bars.")
    usage()

bcount = int(sys.argv[1])

# This is the weighted table.
# Using roman numerals
#chords={ "i": 4, "ii7": 2, "iii7": 3, "IV": 3, "V7": 4, "vi7": 2, "viiO": 1 }
# Using traditional chord names. Feel free to roll your own.
chords={ "C": 3, "Dm7":2,  "Em7": 3,  "F":4,   "G":5,   "Am7":2,  "Bdim7": 1}
# Convert to an expanded list. It'll look like ["i", "i", "i", ...]
chords = [k for k in chords for _ in range(chords[k])]

for a in range(bcount):
    print "%s %s" % (a+1, random.choice(chords)) 
 
Simple enough? If you need more options, etc. feel free to add to the program or contact me here via comments and I'll see what I can do.

 I've been pretty neglectful in keeping this blog up-to-date. Lots of excuses ... but, I'll try to do a bit better! There is a new b...