Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: sciurius on August 02, 2019, 09:54:13 AM



Title: MIDIInc
Post by: sciurius on August 02, 2019, 09:54:13 AM
According to the docs, MIDIInc requires a complete filename (whatever that may mean).

The midi-inc examples use a simple, relative filename. E.g. egs/midi-inc/frankie2.mma has "MidiInc File=rec1.mid ...".

If this is acceptible, it should be documented. Also, shouldn't the filename be interpreted relative to the including mma file?


Title: Re: MIDIInc
Post by: bvdp on August 02, 2019, 03:59:29 PM
I *think* it means that you need the filename extension. But, memory cells ... etc.

I think the path is relative to that of the shell path starting mma in the first place.

Doc update in the next version :)


Title: Re: MIDIInc
Post by: bvdp on August 05, 2019, 02:17:12 AM
Just had a look at code and did some tests :) Yes, the docs are confusing. I think just taking the words "This must be a
  complete filename" out will make it more clear. And adding "If the filename starts with a tilde, the name will be expanded ...". Also, add just plain "test.mid" to the examples.

Good?



Title: Re: MIDIInc
Post by: sciurius on August 07, 2019, 12:11:33 PM
So if relative filenames are allowed, should they be interpreted relative to the current directory? $_LibPath? The name of the including file?

Currently it is not possible to run e.g.

   mma $MMAPATH/egs/midi-inc/frankie3.mma

since it cannot find rec1.mid .

Note that this is not very important, however, the behaviour should be documented.


Title: Re: MIDIInc
Post by: bvdp on August 07, 2019, 04:12:57 PM
I don't think so. In the case of MidiInc the current directory is where the file you are processing is, nothing to do with libpath, etc. If you are using midiinc to include a midi file into a library file ... I'd suggest you'd be much better off to do it by processing the midi into some riffs and then insert them into the lib file.

I'll look at the docs again.