Kara-Moon Forum
March 28, 2024, 09:52:38 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: Slash chord with arbitrary notes  (Read 1813 times)
infojunkie
Jr. Member
*
Posts: 13


WWW
« on: April 06, 2022, 06:34:01 AM »

In my attempt to convert lead sheets from iReal Pro and various MusicXML files to MMA, I encounter many cases of slash chords whose bass note does not exist within the chord scale. This is typical of chromatic bass runs over a static chord, for example. Very common in Brazilian music which is of special interest to me.

Whereas I understand the rationale for the current behaviour of only accepting scale tones in the bass note, I would still like to attempt to accommodate my use case. As I see it, the big difference is that my code generates MMA scripts from source sheets over which the user has no control - therefore the slash chord handling should not fail (even by silently ignoring the bass note), since the original sheet is assumed to be correct.

My question is: how do you suggest tackling this issue? I thought of the following approach:

- Write a new plugin with a custom command, instead of trying to modify the existing slash chord parser
- The plugin would output a regular slash chord if the slash note belongs to the chord scale
- Otherwise, the plugin generates a new chord with the added bass note instead of the lowest note, and specifying (0, 0, 0, 0, 0, 0, 0) as the scale tones
- It might also be a good idea to convert the chord to the closest type that does contain the bass note, e.g. C/Bb => C7/Bb but I'm not sure how to do that reliably

Thanks for your thoughts!
Logged

bvdp
Kara-Moon Master
****
Posts: 1436


WWW
« Reply #1 on: April 06, 2022, 04:00:16 PM »

The problem is not so much accepting the slash note since MMA already does that, but to do something with it. So, if you have something like this:

    Bass Sequence {1 4 1 90; 1 4 3 90; 1 4 5 90; 1 4 1 90}

to play a bass note on each beat and the chord:

     C/F#

the F# will be accepted with a warning, but never played. Not what you want.

I think the "easier" route would be to extract the 'F#' and put it into a SOLO pattern where it can be handled properly. Since you are auto-generating the code it might be easiest to do it at this time. The logic here is that if you are trying to duplicate bass runs then something like:

     C   C/B  C/A#  C/A  /// chromatic bass run

just won't work Smiley

Note: even if the notes are all "valid" it still won't necessarily work since you might not have a pattern event on each beat Smiley
 
So, convert it to a normal bass pattern and a solo (this assumes you have set up a solo block):

    C   {4c+; b; a#; a;}

This should be easy enough to parse out. Just duplicate the root note if no slash.

Now you can control the pitches PLUS the articulation/volume of the notes.

Helpful?

     

Logged

My online life: http://www.mellowood.ca
infojunkie
Jr. Member
*
Posts: 13


WWW
« Reply #2 on: April 06, 2022, 04:09:44 PM »

Thanks! Very helpful. I'll make experiments and feedback here.
Logged

bvdp
Kara-Moon Master
****
Posts: 1436


WWW
« Reply #3 on: April 06, 2022, 06:25:19 PM »

I think that "solo" tracks are probably one of the most misunderstood thing in MMA.  You can also set up sequences in a solo track and have it automatically adjust notes based on the chords. Some examples are supplied with the distro in egs/solo.

You could do this in a Bass track as well, but that would mean using odd offsets in the spec. Solo is probably the way to go.
Logged

My online life: http://www.mellowood.ca
infojunkie
Jr. Member
*
Posts: 13


WWW
« Reply #4 on: April 28, 2022, 08:05:42 PM »

Hello,

I'd like to give an update on my progress here: after trying a number of approaches, including the ones suggested in this thread, I've found a simple solution but that unfortunately requires patching MMA code. Here is the relevant code https://github.com/infojunkie/musicxml-mma/pull/17, and I'll try to explain here:

- I wrote a "Slash" plugin which, given a slash chord, defines a new MMA chord (via DefChord) where the bass note is explicitly set below the tonic (i.e., a negative interval)
- For this to work, I had to patch MMA to accept negative intervals in the chord / scale definition
- The XSL transformation that converts MusicXML to MMA detects slash chords and does 2 things:
  - Invokes Slash plugin with found slash chords
  - Replaces slash chords with their redefined name so that MMA uses the desired voicing

The reason I am not using a SOLO track is because
a) my converter already converts the melody to the SOLO track, and I need to differentiate between those tracks (e.g. for muting / eq purposes, etc.)
b) the regular CHORD / BASS tracks would be playing the regular tonic bass over the bass defined in the SOLO track

I can imagine there are workarounds for those limitations, but I was wondering if there's a specific reason why negative intervals are not allowed in chord definitions.

Thanks!
« Last Edit: April 28, 2022, 08:11:20 PM by infojunkie » Logged

bvdp
Kara-Moon Master
****
Posts: 1436


WWW
« Reply #5 on: April 28, 2022, 11:05:23 PM »

I will have a look at the patch over the next day or so. But:

- You can have an unlimited number of SOLO (or any other track). Just just need a "creative" name. So, you have SOLO for the melody, you have have Solo-Bass for the bass line, etc. And, have completely different voicing, instruments, etc. for Solo-Bass.

- The reason for not permitting negative offsets was that I just never thought they would be needed Smiley Like I said, let me look at the code and see what it is that it is achieving.

As always, thanks for contributing to MMA!!!!
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.039 seconds with 19 queries.