< Back to IRCAM Forum

Diatonic transposition

Hello fellow OM-users,

I wanted to ask if someone could help me with the challenge of a diatonic transposition-algorithm.

I’m writing variations based on a simple and very strictly diatonic C-major idea, that slowly evolve into complex harmony… but the first bit of the piece should stay diatonic…

Now, I’m stuck in my effort to create a ‘diatonic transposition’ function… e.g. a function that ‘snaps’ the transposed result to a C-major grid…

So I wanted to ask if somebody could give me a clue in the right programming direction how to solve this… should I think ‘positionally’, should I define a ‘C-major-framework’ beforehand?
I went through most existing libraries but couldn’t find something which comes close… maybe I overlooked?

Thanks so much in advance,
all the best,
Joost

Here’s a pretty hasty sketch of what you might be after. This patch uses functions from OMRuben and OMTristan and will only produce correct results with diatonic collections. (Although you can redefine what “diatonic” means to accommodate different scales).

I’m sure that some of the more experienced users here will come up with more elegant and economical solutions.

diatonic_transposition.omp (17.2 KB)

Hi Bartlebooth,

which version of OMRuben are you using? Everything works, except the OMRuben-function “Find positions of closest numbers in list”, which gives a death box (skull icon)…
I updated on Ruben’s page to library version 0.96, the latest, but it remains death… where did you find this function?

OK, switched to older OM-version and now it works!
Thank you so much!

1 Like