trying to understand "Chords" in musicutil

I am just trying to seek clarification on how musicutil.CHORDS is supposed to work… as I see the examples within musicutil | monome/docs has you specifying “major” or “minor” etc … am I right in thinking therefore that this utility is NOT “scale degreeaware” when is comes to chord building…

let me try and explain what i mean…

If I am using musicutil.SCALES for individual notes and i choose C major ( for example simplicity) … I would obviously get “the white keys” C to C ( no sharps or flats)…

But when working with Chords (from the example within the norns studies) I seem to have to specify a “chord type” i.e. major… but obviously , as in my example, not all chords within a scale are major ( for instance you get A minor, E minor and D minor here…)

…so…long story short…is… are the chords in musicutil “scale aware” and thus will change to the correct minor when faced with such a situation, or are they more like “rave chords” where the major intervals are fixed and would there for give an A major in this example, even when a minor would be desirable from a scailic point of view?

1 Like

The chord util has no notion of what key you are in. If you ask for a C major chord, it will give you C major. If you ask for a D major chord, it will give you a D major chord. You must always specify the chord type when asking for a chord, so there’s never ambiguity anyway. I.e., there’s no way to ask for a “D” chord, you have to ask for a “D diminished 7” chord, so even if it did somehow know you were in a C major context, you still asked for Ddim7 so it’ll give you a Ddim7

I think if you write out the precise code you were attempting and post it here, and point out where you were unsure, that’d be a lot more concrete and possible to answer. Because as it is, given the inputs to the function, I’m not clear how it could work the way you’re asking about. Apologies I’m not able to understand!

thank you, I was misunderstanding the whole concept of the Chords function… thank you for a concise clarifier.

(I am a TOTAL LUA beginner noob, so at this stage I really don’t even know what I don’t know …)

I am now understanding correctly, that , in this above usage case, each button would need to be defined on its own as to if it was a button that sent a "C minor " or “A major” etc…

whereas, I was previously misunderstanding that the chords function was going to work more or less the same as “notes” … but adding in multiple “right notes” t make up a full chord that could then be assigned to a location such a a set of grid buttons which would then be dynamically altered to fit within the correct scale.

thakn you for clarifying.

The musicutil library does have a capability that I think might accomplish what you were asking about – the generate_chord_scale_degree function (docs).

For example, if you want to generate additional notes to extend a F note into a 7th chord that would be “right” (in western common practice) for a C major scale, you could call it like this (F is the 4th degree of the C major scale) to get the note numbers for a Fmaj7 chord. If you asked for degree 3, you’d get the notes for Emin7.

MusicUtil = require "musicutil"
<ok>
tab.print(MusicUtil.generate_chord_scale_degree(36, "major", 4, true))
1	41
2	45
3	48
4	52 

(apologies for the long-delayed response, I somehow missed this last year, but it came up in Suggested Posts!)

4 Likes

Oh woah cool! I didn’t see that documented in the main docs norns/docs :thinking:

@dewb , thank you so much for taking the time to add to this subject… the original idea behind my question is very much still an ongoing project , but thankfully, I have been handing over all of the scary complicated stuff to the wonderful human that is @illges …however, I have tagged him in this just incase this is of use to extend some of the functionality that we have “in the can”

thanks again

Phill

3 Likes