Convert note tuning to MIDI pitch bend?

• Nov 6, 2020 - 22:32


I have a score with 4 monophonic voices in just intonation, which I would like to export as a MIDI file. However, the tuning values are of course not preserved when exporting. Is there any way to convert the tuning values to pitch bend events so that the MIDI will play back in just intonation? Currently it seems like the most straightforward thing would be to write my own script for it, but it would be nice to know if there is a shortcut.



In reply to by rahulpeter

Off topic!
I have 2 minor issues with your negative harmony plugin:
1. If I want Scale C (which is already highlighted) and click Apply without clicking a scale,nothing happens.
2. For the chord voicings (see attached) I ran the plugin, clicked scale C, and Apply to a copy of measures 1-4. I see you use the nearest new note, but this leads to a ‘wrong’ succession of notes (see measures 5-8). The desired voicings: see measures 9-12. This result is obtained if you build the new chord going down from the root of the old chord & push up the resulting chord an octave.
EDIT I fixed issue 2. See attached.
I also noticed that several of your console.log statements do not show, because you have no quotes around strings
EDIT2: My fix only works if the selection is 1 chord. To generalize it you need to iterate through the selection in a different way (e.g. as in the New retrograde plugin) so that you know at all times whether you are in a chord or not.
EDIT3: I attach a new version which implements what was said in EDIT2. Now works for notes and chords.

Attachment Size
NHtest.mscz 11.43 KB
negativeharmonygenerator.qml 11.81 KB
NewNegativeHarmony.qml 15.08 KB

Do you still have an unanswered question? Please log in first to post your question.