Monday, July 23, 2018

Truncate

I just found a minor bug in the TRUNCATE code. It didn't accept an integer argument for the Side= option. The underlying code all worked, but the test to see if the argument was legit was wrong. Fixed.

While looking at this, I wondered if we could expand the code and permit the lengthening of a bar ... for example, I had a song in 4/4 time which had a couple of 5/4 bars. I had been using Truncate to generate a 1/4 bar, followed by a 4/4 to create it.

Well, the short story is that I can't really figure out how to do it and make it useful. Here are some of the problems I ran into:
  • Expanding to a single multiple (4/4 to 8/4) isn't too bad. But, if the code is to be robust, it should work for goofy stuff like 10/4 as well. I could limit to doubling, but read on.
  • When selecting which patterns to re-create and move into the new slots it becomes difficult to decide which ones to use. A facile implementation might take (for my 4/4 to 5/4 case) patterns in the first beat and copy them to the fifth .... and this is the exact opposite of using Truncate with a 1/4, 4/4 pattern. So, should we copy an existing sequence and insert at the left? Insert what?
  • It becomes even sillier when patterns not-on-the-beat are involved.  

 So, unless someone smarter than me can come up with a algorithm for this, I'm going to continue to suggest "use a single short bar followed by a long one" advice.

Got a great idea? Let me know.

Tuesday, April 24, 2018

Mea Culpa

Isn't it just plain annoying when you end up wasting most of an afternoon trying to find a bug in your code when there is no bug? Just happened to me ... and the really annoying part is that I've don't something very similar in the past! Guess we don't always learn from past mistakes?

I was trying to import a MIDI file into a MMA file using MidiInc and a START offset. At first it all seemed to work just fine, but the imported stuff was starting at the wrong point. How come?

The funny thing is that if I didn't use the offset and had the creator of the Midi file adjust things to what I needed, it worked.

Well, to make a long story short enough to blog about:
  • I have a .mmarc file which initializes my keyboard to a known state,
  • The initialize includes a "beatadjust 1" after doing a bunch of ChannelInits,
  •  I, next, imported the MMA generated Midi file into graphical notation programs.
Are you seeing the problem? Things are out of sync! Bar lines are in the wrong location!

But, I'd forgotten about the initialization and figured it was deeply buried bug in my beautiful MMA code. The upside is that I did find a bug when using a START offset, and that is now fixed.

The solution was pretty simple: In my directory which had the test MMA and Midi files in it I just created an empty file called "mmarc". And all worked. Maybe I've created too many options? Too late to change it all now....

Hey, if there are no bugs we'd never have to do new releases!





Friday, March 30, 2018

French Translation

Christian, one of our French speaking users, has been busy the last while translating the MMA manual to his native language. And, in true open source style, is sharing his work with all of us. 

It is free to download from his archive at:

    http://linuxmao.org//tiki-list_file_gallery.php?galleryId=29 

Christian is asking for you help. If you can do some proof reading it would be a great help. Please contact him directly via: cg.clarinette35@laposte.net

Tuesday, March 20, 2018

MMA is over 15 years old

I was just looking at some files and noticed that the first beta release of MMA was posted in February 2003. That means that we missed celebrating the birthday of our adolescent program.  But, considering that this is the first day or spring, please raise a glass of your favorite fruit wine to our friend.

Friday, March 9, 2018

New developer version 16.06.b available

Harmonies are done! And a new developer version is now available. Get it at:

    https://mellowood.ca/mma/downloads.html#developer

The biggest change is the addition of interval harmonies. These can be quite useful, but be careful ... they can be quite ugly as well.

I've changed the syntax a bit from the discussions here by forcing all interval harmonies to include a single ":" in their name. See the fine documentation for details.

In addition, there are a number of bug fixes (as always) and a number of documentation improvements.

Have fun. And don't forget to let me know if any of this is useful, your suggestions for improvement, neat grooves you have written, and any bugs you might find.

Saturday, March 3, 2018

Harmony, revisited

One of these days I will learn to leave things alone :) But what would the fun in that be?

I have dumped the Perfect4 harmony out.

And replaced it with a comprehensive set of interval harmonies. So, now, in addition to the OpenAbove, etc. chord based harmonies that have been in MMA just about forever, we now have an interval notation:

      S[octave]Interval

The octave modifier can be any value between -4 and 4.

The interval can be any of Unison, MinorSecond ... PerfectFourth ... etc. And, of course, these can be shorten to Min2 ... Per4, etc.

The leading S is supposed to signify that this is an interval, not chord based. I'm not sure I like S, but using an I is just ugly and confusing with the digit 1. So, I'm suggesting S for "scalar".

I think I might also include a "C" option: just indicate the exact number of half steps to use. Again, I'm not sure about "C" since someone might think that it means "chord". Hmmm, maybe "H" for halfsteps?

I've run a few tests and the harmonies generated this way really don't sound as bad as I thought they would ... some, of course, are awful. But, some are quite pleasing.

A beta release is coming soon. Promise :)

Wednesday, February 28, 2018

CopyTo is gone ...

Got COPYTO all working and even wrote up some docs.

But, then I decided that we really didn't need yet-another-command! So, it's gone.

But, don't despair. The functionality is still there. Instead of a new command COPY has been enhanced with a TO keyword. And, to keep things consistent, a redundant FROM keyword as well. So, now we have:

    Track Copy Other-track   ... copies Other-track over Track
    Track Copy From Other-track ... same
    Track Copy To Other-track   ... copies Track over Other-track

And, my tests here in Western Canada (where the snow just never seems to end) indicate that it all works.

Back to the documentation cellar when the whips and chains await. Standby for the announcement of a new beta!

Truncate

I just found a minor bug in the TRUNCATE code. It didn't accept an integer argument for the Side= option. The underlying code all worked...