Kara-Moon Forum
April 23, 2024, 08:42:14 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: A develloper's question  (Read 6783 times)
drautzburg
Jr. Member
*
Posts: 22


« on: October 21, 2010, 06:25:31 AM »

This is about the inner workings of mma.

For things like swing mode, mma needs to change the times of even eights or sixteens. In the source mma file these can easily be spotted, because they end with .5 (eighths) or 0.25 0.75 (sixteenths).

But what if you also apply rtime? This will change the times so a .5 may turn into a .51. I suppose the swing mode would have trouble when applied after rtime.

What concept do you use to overcome these issues? E.g. do you make sure rtime is always applied last? But then, how difficult would it be to add another "time-changing-function"? You would have to find the proper place in the chain of transformations and there may be none, making two such functions mutually exclusive. Or do you keep a reference to the original time, such that swing mode would know that a note, which at this stage of processing starts at x.51 originally was a x.5?
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: October 21, 2010, 04:30:20 PM »

Swingmode is applied in two areas: when patterns are defined and when solo bars are parsed. Simply, when a pattern is defined -- and this can be in the form "Define .." or "Sequence {....}" -- the text is parsed and MMA figures out the durations and timing in ticks. After that, it checks the value of swingmode and adjusts the values if needed. And the algo for that is pretty simple ... it just checks successive notes and adjusts any pairs when the 1st is on-the-beat and 2nd off. For solos it's pretty much the same routine, but needs a different function due to the fact that the internal structure is quite different.

Note that the fact that MMA does swing when a pattern is defined means that you can't just insert swingmode commands at any place in a song file. If the pattern has already been defined (compiled) the command has no effect ... and that can be disconcerting.


Now, additional time modifications ... pretty much the only one is RTIME (we don't have an RDURATION ... maybe we should?). This is done as the file is parsed and midi generated. We just call a function JUST before the midi is generated to do adjustments. Same time as volume changes, accents, RSKIP, etc.

Umm, no we don't remember that a note was adjusted by swing. At this time I'm not aware of any overpowering reason to do so.

I'm not completely satisfied with the random stuff. It'd be nice to be able to apply it more selectively. But, with that desire comes more complexity. I'm afraid to add too much to the command set in fears that things become overly obfuscated.

Best.
Logged

My online life: http://www.mellowood.ca
drautzburg
Jr. Member
*
Posts: 22


« Reply #2 on: October 21, 2010, 07:14:09 PM »

Thanks. So the solution is to have only two time-varying transformations and always apply one before the other.

Remembering the original on-time: I don't see why you would need this either. I was thinking along the lines of: what if we want 8th and 16th swing at the same time? If you apply 8th swing first, then the 16th swing would have trouble to detect the on-the-beat 8ths, because some of them would already be delayed by the 8th swing. But even that does not require remembering the original time, you just have to apply 16th swing first as it only alters notes which are of no interest to the 8th swing.

RTIME: I too have the feeling that it does not really mimic a sloppy player. There is only a small range between "no effect" and "too much". I believe it could be more "musical", but I don't know exactly how to do this. My current best guess is that it should favor delays over advances and it should randomize heavy notes (on-beats ...) less than the light ones.

But here you run exactly into the problem described above. If such randomization is applied after swing mode, it will have trouble to tell heavy notes from light ones. You would have to keep track of the original notes.



 

Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: October 21, 2010, 09:08:48 PM »

Thanks. So the solution is to have only two time-varying transformations and always apply one before the other. \

I suppose ... but I'm not sure what the problem is. Nice, though, to have solutions Smiley

Quote

Remembering the original on-time: I don't see why you would need this either. I was thinking along the lines of: what if we want 8th and 16th swing at the same time? If you apply 8th swing first, then the 16th swing would have trouble to detect the on-the-beat 8ths, because some of them would already be delayed by the 8th swing. But even that does not require remembering the original time, you just have to apply 16th swing first as it only alters notes which are of no interest to the 8th swing.

Well if you really want to have both 16th and 8th (or different skew rates, etc) it's pretty simple.

set swing to whatever
define some patterns
set swing to something else
define more patterns

I can almost guaranty that it'll sound unmusical. In most cases you want all the instruments/players doing the same swing manipulations. Mind you, my sense of "musical" may be quite different from yours Smiley

Quote

RTIME: I too have the feeling that it does not really mimic a sloppy player. There is only a small range between "no effect" and "too much". I believe it could be more "musical", but I don't know exactly how to do this. My current best guess is that it should favor delays over advances and it should randomize heavy notes (on-beats ...) less than the light ones.

The new rtime option which lets you set a min/max (ie Rtime 5,10) should help. In which case it never delays. Or you could do "rtime -5,10" or something like that. I think this helps.

Quote
But here you run exactly into the problem described above. If such randomization is applied after swing mode, it will have trouble to tell heavy notes from light ones. You would have to keep track of the original notes.

And now we have a definition problem: what is a "light" or "heavy" note? Duration? Place in the bar/beat? Volume?

I think we'll have humans playing for a few more years Smiley

Logged

My online life: http://www.mellowood.ca
drautzburg
Jr. Member
*
Posts: 22


« Reply #4 on: October 22, 2010, 05:47:47 AM »

Quote
The new rtime option which lets you set a min/max (ie Rtime 5,10) should help. In which case it never delays. Or you could do "rtime -5,10" or something like that. I think this helps.
Silly me, this has slipped my attention. Will try it out.

Quote
And now we have a definition problem: what is a "light" or "heavy" note? Duration? Place in the bar/beat? Volume?

What I meant is place in the bar: 1 and 3 are heavier then 2 and 4, 2 is heavier than 2.5 which is again heavier than 2.25 etc.
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: October 22, 2010, 04:21:23 PM »

"Heaviness" (the state of being heavy) depends, IMHO, more on style than on bar position. In lots of latin and eastern music the off beats are emphasized.

Please let us know if the new randomization helps.

Bob.
Logged

My online life: http://www.mellowood.ca
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #6 on: October 22, 2010, 05:14:09 PM »

I should add that the ACCENT command will let you emphasize certain beats on a per track basis. It only effects volume/velocity, but if you are doing drum tracks that's about the only thing you can change since the duration of most drums is set by the synth, not the midi file.
Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.054 seconds with 19 queries.