Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: sciurius on January 22, 2019, 08:48:10 AM



Title: Randomizing
Post by: sciurius on January 22, 2019, 08:48:10 AM
Some thoughts...

RDuration 10 means a random, max 10% change in the duration. As always, MMA uses percentages.

However, according to the docs, RTime 10 means a random change of max 10 ticks. Really? Or should this have been percentage as well?

With RDuration and RTime (and Articulation set to 100 (percent?)), is it possible that notes will overlap?

Have you considered RTempo to make small changes to the tempo, as normal musicians do?


Title: Re: Randomizing
Post by: bvdp on January 22, 2019, 04:10:44 PM
Some thoughts...

RDuration 10 means a random, max 10% change in the duration. As always, MMA uses percentages.

However, according to the docs, RTime 10 means a random change of max 10 ticks. Really? Or should this have been percentage as well?

Using a % here makes little sense to me. A % of what would be the question. At this point MMA has no idea of the note duration, just a start and end point in tick offsets.

Quote
With RDuration and RTime (and Articulation set to 100 (percent?)), is it possible that notes will overlap?

Absolutely. Proceed with caution.

Have you considered RTempo to make small changes to the tempo, as normal musicians do?
[/quote]

Actually had it running in an early test. IIRC, it reminded me too much of a grade school band :)

Where would the variance be applied? On each bar, note, or? Tempo is a value inserted in the META track and used by the player. The individual tracks don't have a concept of Tempo. So, it's possible to insert a bunch of timing values that the player can follow, and that's what things like "Tempo +20 4" (increase tempo by 20 BPM over 4 bars) does ... again, IIRC this command inserts a new tempo value on every beat.


Title: Re: Randomizing
Post by: sciurius on January 22, 2019, 10:26:07 PM
Actually had it running in an early test. IIRC, it reminded me too much of a grade school band :)

This may depend on how much and where the variance is applied.

Quote
Where would the variance be applied? On each bar, note, or?

I was thinking of what happens during a normal performance of normal musicians. Given a tempo of 100, in practice it will vary between say 98 and 102. So after 4-5 measures 100->99, another 6 bars 99->98, after some 5 bars back to 99 and so on. I was wondering whether that would be perceived as 'natural' (or 'human'). Or as a 'dweilorkest' :) .


Title: Re: Randomizing
Post by: bvdp on January 22, 2019, 11:58:36 PM
Might be an interesting project for a plugin? Or, if wanted for every bar one could set up an AFTER rule to trigger on each bar and have it adjust the tempo?


Title: Re: Randomizing
Post by: folderol on January 23, 2019, 03:04:57 PM
Definitely 'here be dragons' country!
What exactly are you trying to emulate. My experience is that there are two types of timing 'wiggle' in real playing.
The first is note-by-note and depending on the musical style can be anything up to +- 50mS.
The other is a slow longtime drift and per bar might only be a few microseconds so that even an eventual change of (say) 60BPM to 70BPM is barely noticed by most people,.

However, someone very sensitive to timing (like a good drummer) would be highly irritated by whole BPM steps.


Title: Re: Randomizing
Post by: bvdp on January 23, 2019, 04:32:59 PM
Using the builtin accelerando/dec it's not on the beat. From the fine manual:

  Tempo +20 5.5
      tells MMA to increase the tempo by 20 beats per minute and to step the
      increase over the next five and a half bars. Assuming a start tempo of 100
      and 4 beats/bar, the meta track will have a tempo settings of 101, 102,
      103 ... 120. This will occur over 22 beats (5.5 bars * 4 beats) of music.

So, the changes are not falling on the beat, but wherever the number of ticks from here to there divided by the number of changes needed falls.

I've never met a drummer who can sense 1 bpm differences, let alone micro-changes :) I'm sure they exist, just not in my circles!



Title: Re: Randomizing
Post by: bvdp on January 26, 2019, 05:44:37 PM
If someone wants to play with some randomizing, I've made a modification to the parser so that you can do this.

1. In the module safe_eval.py insert line 27:
     from random import randint

2. In safe_eval.py extend 35 so that it reads:
     'int', 'in', '.join', 'str', '.split', 'for', 'randint' ]

We have now enabled a new command :) It will be in the next release.

To use it you can do things like:

   Tempo $( 100 + randint(-2,2) )

This could be wrapped in an AFTER command to get random tempo stuff, etc. Please let me know if it's useful.


Title: Re: Randomizing
Post by: sciurius on January 27, 2019, 08:34:13 PM
Cute... I'll have a play with it. Thanks.