This is one of the topics I've been working on a lot lately.
My motivation was to make some rules accessible via TidalCycles using the system of western music theory that I am familiar with. However, I attach great importance to defining and transforming chord progressions and notes with patterns, in order to be able to use the strengths of TidalCycles flexibly here.
There are now a lot of ideas flowed in here and I have collected everything here once. To give you an idea, the usage in TidalCycles looks like this:
do
-- Define chord progressions with roman numerals
s1 = sheet {key = "c", mode "major", numerals = "<1 1 4 5>"}
-- The chord will be created on their elements like
-- root (1), major/minor third (3) and perfect fifth (5).
-- And the chord progressions is based on the sheet.
-- This will play <Cmaj Cmaj Fmaj Gmaj>
d1 $ s "superpiano" <| prog s1 "[1,3,5]" |- note 12
-- Create a melody with the chord changes but use
-- diatonic notes outside of the chord
d2 $ s "superpiano" <| prog s1 "1 5 7@2 3 6 8@2"
I addressed a lot of western harmony concepts like secondary dominants, tritone substitution, borrowed chords and inversions. And you can play a harmony in one scale (like major) and the melody in another scale (like minPent).
Personally, I'm able to code melodic sets much more specifically live with it. I also use it to write flexible backing tracks/loops for the guitar.
If you are interested in such stuff, here is the complete post: