Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: noidd on February 06, 2007, 06:50:14 PM



Title: Performing with MMA live.
Post by: noidd on February 06, 2007, 06:50:14 PM
Greetings!

By day I am a UNIX developer, by night I am an improv comedian.

As an improviser I really want to be able to do musical improv.  One of the huge problems that all improv groups have is that finding an improv pianist / band is notoriously difficult.  Improv doesn't pay its players or musicians so its hard to find a musician who is willing to give up their Friday or Saturday nights. 

Given my technical bend I figured that if I can't find one.  Build one.

MMA is awesome and does 85% of what we need.  While reading the docs I noticed the author say approximately "I don't know why anyone would want to use MMA live, if you do let me know".

I do and would have to given the nature of the improvised beast.

Because improvised musicals can go in any direction, start, stop, change key, chorus, bridge, change tempo, style etc all on the fly and unpredictably the person wielding MMA live would need to be able to change these parameters on demand.

The ideal way for me to do this would be via a midi-controller (I started building a midibox (http://www.midibox.org/) specifically for this project!)
:
(http://www.unixfu.com/Photo_012607_001.jpg)

I'm flooding with ideas and am hoping that MMA is the right tool for this job and look forward to hopefully working with ya'll.

How can I help ya'll.

Regards,


Red


Title: Re: Performing with MMA live.
Post by: kara on February 06, 2007, 07:31:05 PM
Well, you'll need Bob ideas on this....

But as one of the beta testers i know MMA pretty well.
So I can easily state that there would be quit some programming work involved to use MMA live.
The fact is that MMA in this current state, creates a MIDI file which then has to be played by a MIDI player or imported in a MIDI sequencer.
I'm allso pretty sure that there are a couple of tricks where MMA needs to read the whole file to be able to do some things.

You could allso start your proper project and reuse some code from MMA, that's after all the goal of open source projects.


So it would be quit some work to change that all... but nothing is impossible of course
I'll let Bob chime in here, but a way to help could be to programm, if you know something about the Python language, after all MMA IS open source. And I'm sure you could get all the advice you need  from Bob.


Title: Re: Performing with MMA live.
Post by: bvdp on February 07, 2007, 02:30:33 AM
Okay, it's Bob :)

A few comments and thoughts on this...

First off, MMA was never designed to be an on-the-fly player. Not to say that it can't be done, but this just wasn't a MMA design item.

Now, can it be used in real-time? Maybe :)

If you want to use MMA in a "more real time" method, here are a few ideas (and if they take more programming/changes in MMA that is probably not an issue).

MMA really does need to process a complete file and then generate a MIDI file. A number of reasons for this, but to start let's assume that most MIDI players need a complete file to play. The way that MMA works is that it processes the entire input file and generates MIDI code as it goes. Then, when the file is complete, the MIDI data is sorted into tracks and written to a file.

But, when working in a performance environment just what do you want to change? Assume we have a song file which MMA can read ... You might want to make changes in the song like:

 - tempo
 - number of times a repeat/ending is done
 - transposition

So, here's the easy way: just use macros for these in the song file. And then call MMA to process the file with the appropriate defs on the command line. So, you end up with stuff like this in the MMA file:

   if ndef TEMPO
     set TEMPO 140
  endif
  Tempo $Tempo

  if def Transpose
    transpose $transpose
 endif

And run:

   $  mma some-song -S tempo=120 -S transpose=-3


Heck, this could even be done with some kind of gui or hardware "switch". Then compile and play. MMA generates files pretty fast (much less than a second on my system which isn't exactly a speed demon). Certainly an acceptable delay before playing in realtime on a stage.

Am I even close on this or are my ideas just plain wrong/dumb.

Let me know.



Title: Re: Performing with MMA live.
Post by: kara on February 07, 2007, 06:30:39 AM
The idea is not bad Bob, but don't you forget something ?
MMA doesn't "play" the song, it just generates a midi-file !
So, to use in a live environment MMA would at least need a MIDI output, which would be a known MIDI port on the PC.
I could very wel imagine MMA playing his midi-file trough a virtual MIDI YOKE which is connected to a modular host like Console or Energy-XT that is hosting the different VSTi's. That way you could tweak the controls of your VSTi live while MMA is playing.


Title: Re: Performing with MMA live.
Post by: Moon on February 07, 2007, 10:06:39 AM
Well, the fact that MMA doesn't play midi is perhaps not an issue: just image that you build a VSTi that execute the macros in MMA and plays the returned midi phrases. Well, you could even create a tool that beats Korg's famous Karma !

I would like this idea: you then integrate the Vsti in Sonar's Project 5 or Ableton Live and of you go...

Yes, great idea... or perhaps I'm dreaming  ::)


Title: Re: Performing with MMA live.
Post by: noidd on February 07, 2007, 02:02:21 PM
I'm also pretty sure that there are a couple of tricks where MMA needs to read the whole file to be able to do some things.

That was actually my main concern.  There are a few cases I could see where this would be useful.

Quote
You could also start your proper project and reuse some code from MMA, that's after all the goal of open source projects.

I could, but I would consider doing that without first trying to assist the existing best-in-field project rude.

Thanks for your reply.

Regards,



Red



Title: Re: Performing with MMA live.
Post by: kara on February 07, 2007, 04:54:59 PM
Well, I'm sure Bob would be happy to share some ideas with you... :)


Title: Re: Performing with MMA live.
Post by: bvdp on February 07, 2007, 05:01:32 PM
I hadn't forgotten about MMA not being able to play midi files. Not sure is this is a + or - ... probably in keeping MMA independent of OSes it's probably a good thing. And, certainly, from my initial design goals it's not important.

I like the idea of bouncing params back and forth between a player, interface and MMA. I do wonder if the delays might get too much for it to be performable?

I was thinking that MMA could be tweaked somehow to output chucks of the file (a bar at a time??) as it is generated. But, where/how to output is a question. And, what do you do with command like BeatAdjust which actually moves the midi-file pointer?

I've not used BiaB beyond a few demos, but I don't think it is any better at this than MMA is (well, it does have a built-in player ... but does that really help?).