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