Kara-Moon Forum
April 19, 2024, 02:19:56 PM *
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: Random voicing  (Read 5430 times)
sciurius
Sr. Member
****
Posts: 443



« on: December 26, 2018, 08:38:30 PM »

I'm pretty sure there must be a way to randomly select voicings for chords. I've tried

Begin Chord
  Voice      Organ2
  Octave   4
  Sequence   L1
  SeqRnd   On
  Articulate   100
  Voicing   Mode=Optimal RMove=30
  Volume   p
End


But all chords sound the same (i.e., use the same voicings).

Am I overlooking something?

-- Johan
   https://johan.vromans.org/seasons_greetings.html
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: December 26, 2018, 11:26:08 PM »


Honestly, the "optimal" code wasn't done by me and I really don't understand it Smiley

Not that that helps. The idea is that it supposed to compare the current chord to the last one played and attempt to move the new chord into a position that moves the least number of "fingers". Then, it's supposed to move things around a bit more depending on the various options.

The code is mostly in center1() in chords.py. I will try to insert some debugging code into this and have a look. It'll have to wait a few days.

Oh, one thing: the results of the mangling really depend a lot on the chord sequence. But, I can't see any difference either Smiley I'll get back to this. And, no, it's not you!

Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #2 on: December 27, 2018, 09:36:27 AM »

Do you happen to have the MMA sources in a (public) vcs (preferrably git)? That would make it easier to track development and contribute.
Logged
alexis
Jr. Member
*
Posts: 62


« Reply #3 on: December 27, 2018, 06:06:26 PM »

Do you happen to have the MMA sources in a (public) vcs (preferrably git)? That would make it easier to track development and contribute.
+1
Please, Bob, do it! Pleeeeeaaaase!

Github is a good place for this. So easy to use.
https://github.com/
Logged
folderol
Kara-Moon Master
****
Posts: 5306

Who? Me?


WWW
« Reply #4 on: December 28, 2018, 08:08:42 AM »

I can add my recommendation for hosting on github. It would give MMA some more exposure, and works well for our little synth project Wink
Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: December 28, 2018, 06:10:42 PM »

I did a little test and converted that to a PDF which is attached to this post (at the bottom, test-voicing.pdf).  

and, the mma source is:

Code:
Mset CD
C / D
E / F
G / A
B / C
EndMset

Begin Chord
  Voice      Organ2
  Octave   6
  Sequence   {1 1 90 * 2}
  Articulate   100
End

Chord Voicing mode=None
$CD

Chord Voicing mode=Optimal
$CD

Chord Voicing mode=Optimal Rmove=80 Move=5 Dir=-1
$CD

Chord Voicing mode=Optimal Rmove=80 Center=12
$CD

An other option to look at is RANGE.

The output definitely changes depending on the options. I guess the question is "just what are you expecting?" If it is dramatic changes between bars, it's not happening. And, probably for good reason ... MMA is pretty conservative when it comes to chord mangling and attempts to make things "nice sounding". If you want more changes between chords you can do manual inversions using the ">" chord modifier, change the chord's octave using  +/-, use slash chords to add notes, and other things that have slipped my mind.

I think the reason you are not hearing what you might be expecting is that there are safeguards which reduce the amount of movement ... and these might be to conservative. Do you think more is needed?

* test.pdf (22.46 KB - downloaded 209 times.)
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #6 on: December 28, 2018, 08:58:21 PM »

Thanks for the reply.

When I try your sample with the following CD definition:

Code:
MSet CD
C
C
C
C
End

I hear a series of identical chords. See attachment #1. I had hoped one of the voicing options would choose different voicings for the chords.

For example, attachment #2 shows how iRealPro renders the chord sequence
Code:
| Cm7 | Cm7 | Cm7 | Cm7 | Fm7 | Fm7 | Cm7 | Cm7 |


* scrot20181228220244.png (9.04 KB, 723x178 - viewed 448 times.)

* scrot20181228215533.png (7.19 KB, 698x291 - viewed 424 times.)
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #7 on: December 28, 2018, 10:50:43 PM »

I guess the question is: If you were playing piano or guitar would you change the chord inversion on every hit? I doubt that I would Smiley And, if you think it should change just do something like C C>1 C>2 C.

I suppose there could be a random voicing option or a "rotate the crap out of the chord" option ... but IMHO neither would not be "optimal". I could well be wrong Smiley
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #8 on: December 29, 2018, 04:15:28 PM »

Maybe I should have added that in this case the tempo is 56, so each chord lasts for more than 4 seconds. Four chords in a row would create the same sound for over 16 seconds. So I think it is definitely a good idea to make slight changes to the voicing.

I agree that in this case writing C C>1 C>2 C makes sense, except that I would like to randomly apply an inversion, and control it from the groove. Having random inversions would be a property of this particular groove.

This gives nice results:

Code:
Begin DefChord 
  m7-0 (0, 3, 7, 10, 12, 15) (0, 2, 3, 5, 7, 8, 10)
  m7-1 (0, 3, 7, 10, 12, 19) (0, 2, 3, 5, 7, 8, 10)
  m7-2 (0, 3, 7, 10, 15, 19) (0, 2, 3, 5, 7, 8, 10)
End

Groove MinorBlues1
1 Cm7-0
2 Cm7-1
3 Cm7-2
4 Cm7-1

I get the feeling that I'm going to need writing a plugin. Interesting... But as far as I can see a plugin can only transform its call line into zero or more input lines to be processed. There is no way to fetch a chord definition, and so on.
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #9 on: December 29, 2018, 06:45:21 PM »

If nothing else ... sounds like you are having fun!

I have added some DATE macros to my sources. Will do a . release this weekend.

Let me think some more about random mangling voicing stuff. For a start I might just add a random option to INVERT. We'll see Smiley
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #10 on: December 29, 2018, 08:02:05 PM »

If nothing else ... sounds like you are having fun!

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


WWW
« Reply #11 on: January 01, 2019, 02:21:39 AM »

I was looking just now at the INVERT code and think it'd be easy enough to add a random setting to it.

Right now, as you know, you set INVERT with a value (-1, -2, 2, etc) and every chord encountered is rotated to the same value. I think that I can add a setting pair option (eg: -2,2) and each and every time a chord needs to be inverted MMA can select a random number from a list -2...2. This won't break existing code, and is syntactically consistent with similar options for RVolume, etc.

This just applies, right now, to CHORD INVERT, not to the invert voicing option. Will need to look at that as well, if for no other reason than to be consistent.

Gotta go practice some horn right now, but I'll see if I can code it up tomorrow. Let you all know.
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.045 seconds with 19 queries.