Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: sciurius on December 05, 2019, 12:51:17 PM



Title: On/Off
Post by: sciurius on December 05, 2019, 12:51:17 PM
If I understand the docs correctly, On/Off are supposed to enable/disable MIDI generation for a track.
So if I have Drum-Kick and Drum-HH I have one single MIDI drum track, and Drum Off will silence both.

Apparently this is not the case and I need explicit statements

    Drum-Kick off
    Drum-HH off


Is that intended behaviour?


Title: Re: On/Off
Post by: bvdp on December 05, 2019, 04:40:03 PM
Yes, it's correct. From the docs:

   OFF - To disable the generation of MIDI output on a specific track:

Remember, please, a MMA track is NOT a MIDI channel :)

Also, like the docs state, this is just a shortcut to disabling a track via a sequence change.


Title: Re: On/Off
Post by: sciurius on December 05, 2019, 06:06:41 PM
A MMA track is not a MIDI track is not a MIDI channel. Three very different things...

   OFF - To disable the generation of MIDI output on a specific track

Seeing the words MIDI and track so close together caused me to associate track with MIDI track, not MMA track. Also, although I'm not a native english speaker, the wording "generation of MIDI output on a specific track" hints to track as being a destination (i.e. MIDI track). Would it be better to write "generation of MIDI output for a specific track"?


Title: Re: On/Off
Post by: bvdp on December 05, 2019, 07:06:51 PM
Yes, this whole TRACK versus CHANNEL is confusing. I think that in this case I should add a note in the on/off section. Okay, done: "Note: this applies to the generation of MIDI only on
the specified \mma track." added to both sections.


Title: Re: On/Off
Post by: sciurius on December 10, 2019, 09:50:56 AM
The attached patch implements track commands for subtracks. To do this, append an asterisk to the track type. For example:

    Drum* Off

invokes the OFF command for all existing tracks DRUM, DRUM-HIGHHAT, DRUM-KICK, and so on.


Title: Re: On/Off
Post by: bvdp on December 10, 2019, 04:20:04 PM
That looks good. Let me test in the next few days and I'll probably add it.

Just one question :) Should it be Drum* (as per patch) or Drum-* to keep consistency with existing syntax? ... probably not since Chord-* is a valid track name (which is unfortunate). So, Drum* it will have to be.

Chasing the rabbit: Does this mean we will need a Drum* Volume pp, etc? :)


Title: Re: On/Off
Post by: sciurius on December 10, 2019, 05:50:20 PM
Actually, TRACK* command will execute command for all existing TRACK, TRACK-...

So it should work for any command already.


Title: Re: On/Off
Post by: bvdp on December 10, 2019, 06:43:25 PM
Of course this is what your patch does ... I need to learn to read code :)

I'll install later and see if I can break it! Well done.


Title: Re: On/Off
Post by: bvdp on December 10, 2019, 10:39:55 PM
Ummm ... but, actually this ability is already in MMA. And I apologize for not pointing it out earlier!

    AllTracks Drum OFF

etc. See the fine manual for details :)


Title: Re: On/Off
Post by: bvdp on December 10, 2019, 10:58:37 PM
In a similar vein, also see AllGrooves.


Title: Re: On/Off
Post by: sciurius on December 11, 2019, 08:41:34 AM
Well, if it escaped you that this functionality is already there you can hardly blame me :).

In the docs, you may want to add PLECTRUM to the list of track types that may be specified.

In the case of AllGrooves, is it a track modifier (as documented), or a track type modifier (as with AllTracks)?


Title: Re: On/Off
Post by: bvdp on December 12, 2019, 12:29:53 AM
Well, if it escaped you that this functionality is already there you can hardly blame me :).

Yeah, but if you look in the example songs supplied with MMA you will see both AllGrooves and AllTracks used a lot. Honestly, I have no idea why I didn't suggest this when you first asked!

Quote
In the docs, you may want to add PLECTRUM to the list of track types that may be specified.

Done. Thanks.

Quote
In the case of AllGrooves, is it a track modifier (as documented), or a track type modifier (as with AllTracks)?

Not sure where you are reading, but assuming that it is the section "Command Summary" I think it should read "Apply command to..", in the singular. The error message in AllTracks is wrong/misleading. I've just changed it to "AllTracks: Requires a Track name or Type and a command." And, the doc string for the command is silly ... fixed.

Does that get it all?


Title: Re: On/Off
Post by: sciurius on December 12, 2019, 08:41:43 AM
I read it in section 'Grooves':

   The ALLGROOVES command operates by applying its arguments to each GROOVE currently defined. This includes the environment you are currently in, even if this is not a defined GROOVE.

   You can use the command with or without a track modifier:

   AllGrooves Volume p

   or

   AllGrooves Chord Octave 5

2nd para, "with or without a track modifier".


Title: Re: On/Off
Post by: bvdp on December 12, 2019, 04:32:52 PM
Assuming that being too wordy is better than being vague ... I've changed the line in the docs to:

   
    You can use the command with or without a track modifier as the second
    argument (depending, of course, on the command):


Thanks.


Title: Re: On/Off
Post by: sciurius on December 12, 2019, 05:08:56 PM
The point is: what is a track modifier? Even with the modified wording I would still be thinking I must use track names while you seem to mean track types.


Title: Re: On/Off
Post by: bvdp on December 12, 2019, 05:52:39 PM
The way I see it is that it is confusing :)

Firstly, we have track names. A name can be DRUM or DRUM-FOO. If I could go back in time, apart from solving world peace, I would have done this differently. But, for now we have to accept that a name can be DRUM or DRUM-FOO.

Secondly, we get into types. The types are DRUM, CHORD, etc. and they should not be confused with names.

So, gettng back to the docs ... Probably having the line read:

 You can use the command with or without a track modifier/name (depending on the context) as the second
    argument:


But, thinking more I'm thinking that the section should be replaced with:

Everything after AllGrooves is interpreted as a legitimate MMA  command.

  AllGrooves Volume p

or

  AllGrooves Chord Octave 5

  A warning message will be displayed if the command had no
effect.


  


Title: Re: On/Off
Post by: sciurius on December 12, 2019, 06:30:10 PM
Actually this looks clear to me:

Everything after AllGrooves is interpreted as a legitimate MMA  command.

The syntax definition is AllGrooves MMA-Command. So the command

AllGrooves Chord Octave 5

sets the octave to 5 for track Chord (and only Chord, not Chord-Foo etc) in all grooves.

So this is different from AllTracks, that has the definition AllTracks OptionalChordType MMACommand.

AllTracks Chord Octave 5

affects tracks Chord, Chord-Foo and so on.

So, if desired, you can write

AllGrooves AllTracks Chord Octave 5

to set octave to 5 for tracks Chord, Chord-Foo and so on.


Title: Re: On/Off
Post by: bvdp on December 13, 2019, 02:08:46 AM
It would never occur to me to use Alltracks inside of a Allgrooves ... but it works :) Here is my, hopefully final cut of manual section:
Code:
 The ALLGROOVES command operates by applying its arguments to each GROOVE currently defined. This includes the environment you are currently in, even if this is not a defined GROOVE.

Everything after ALLGROOVES is interpreted as a legitimate MMA command. The syntax definition for ALLGROOVES is “Allgrooves MMA-Command”, so

AllGrooves Chord Octave 5

sets the OCTAVE to 5 for track Chord (and only Chord, not Chord-Foo etc) in all grooves.

Note: this is different from the ALLTRACKS, here, command which lets you specify tracks for track types. Or course, there is nothing to stop you from combining these with something like:

ALLGROOVES ALLTRACKS CHORD OCTAVE 5

the results of which are left as an exercise for the reader.


Title: Re: On/Off
Post by: sciurius on December 13, 2019, 07:34:03 AM
Looks good!

Nitpick: AllGrooves doesn't accept any valid command. This is refused:

    AllGrooves AllGrooves Volume -10

 :) :) :)


Title: Re: On/Off
Post by: bvdp on December 13, 2019, 04:41:37 PM
well, at least there is a nice error message :)