tuning shouldn’t be an issue. you can place the tunings rations into a table, or an array, and then work from there. For example, just intonation,
-
Tonic © : 1/1=1.0001/1 = 1.0001/1=1.000
-
Minor Second (C# / Db) : 16/15=1.06716/15 = 1.06716/15=1.067
-
Major Second (D) : 9/8=1.1259/8 = 1.1259/8=1.125
-
Minor Third (D# / Eb) : 6/5=1.2006/5 = 1.2006/5=1.200
-
Major Third (E) : 5/4=1.2505/4 = 1.2505/4=1.250
-
Perfect Fourth (F) : 4/3=1.3334/3 = 1.3334/3=1.333
-
Tritone (F# / Gb) : 45/32=1.40645/32 = 1.40645/32=1.406
-
Perfect Fifth (G) : 3/2=1.5003/2 = 1.5003/2=1.500
-
Minor Sixth (G# / Ab) : 8/5=1.6008/5 = 1.6008/5=1.600
-
Major Sixth (A) : 5/3=1.6675/3 = 1.6675/3=1.667
-
Minor Seventh (A# / Bb) : 9/5=1.8009/5 = 1.8009/5=1.800
-
Major Seventh (B) : 15/8=1.87515/8 = 1.87515/8=1.875
-
Octave © : 2/1=2.0002/1 = 2.0002/1=2.000
Here’s some untested Csound code that would convert standard MIDI from the DAW to just intonation.
instr 1
iJustIntonation[] fullarray 1.000, 1.067, 1.125, 1.200, 1.250, 1.333, 1.406, 1.500, 1.600, 1.667, 1.800, 1.875, 2.000
iNote = cpsmidinn(p4)
iIndex = iNote % 12
iFreq = p4*iJustIntonation[iIndex]
a1 oscili .8, iFreq
outs a1, a1
endin
FWIW, I’m sure there exists a scala plugin that will pitch bend notes to twist them to various tunings. In which case you might only need add the pitch-bend amount to p4?