Project

microtuning converter

Started by Phil999 on .

Sign in or create an account to join the conversation.

9 posts

Topic starter
I'm in the progress of creating a mictotuning converter for monophonic synths.

I would like to send pitchbend data with scripts, but it looks like this is only possible with Custom MIDI.

Is it possible to send pitchbend data with scripts (midiout)?
thank you Macizza, that is good news.

According to this table http://www.midi.org/techspecs/midimessages.php the status byte is E0 (for pitchbend channel 1), followed by two data bytes (LSB and MSB). My intention is to control the pitchbend with 12 Knob objects (independently for each key respectively their octaves).

What I had so far is

midiout(target, {0xE0, pitch1.p})

pitch1.p is the first Knob object's floor(x*16838) resulting in a value between 0 and 16838.

That didn't work so well, so I replaced pitch1.p with two values (LSB and MSB), coming from two different knobs. Both values are floor(x*127). This works quite well, although the pitchbend doesn't go to an octave anymore, only to a fifth. And the first knob (LSB) doesn't do nothing.

How can I do the pitchbend message with only one knob, and that it goes to the maximum pitchbend range?
correction: the pitchbend range is alright. It was the synthesiser that had the wrong pb range.

The whole thing actually works fairly well. I could set the first data byte to an arbitrary number between 0 and 127, and use a knob for the second data byte. I just wonder about the resolution. If values between 0 and 127 are used for pitchbend, the higher resolution (values between 0 and 16838) probably gets lost. Although I admit I couldn't hear that loss of resolution yet.

A problem is when more than one key is pressed. When one key is held and the next key is repeatedly pressed. Then the pitchbend data goes wrong. So this microtuning converter that converts incoming notes from a physical keyboard to microtonal scales is a bit limited. So far. Maybe there is a solution, but at the moment I'm not so sure.

Actually I want to replicate in Lemur what the software Scala is doing. With Scala and its Relay function, I can play all microtonal scales with a normal keyboard, to monophonic synthesisers.
...to monophonic synths..
Thats the giveaway, this pitch bend is channel based so all notes respond . . .
You would need to be sending on separate channels for polytonality . .

The other option would be sending tuning data if the synth will deal with it . ..

And yeah other things like PB range of the sound/synth etc come into it as well . .

Let me have a look and have a think . .
I want to send on one MIDI channel, and Scala demonstrates that this is not a problem. Each of the twelve notes (and their octaves) with a quickly changed pitchbend. What I have now functions not too bad, it is just this problem with the held notes and the next note. I'm on the track of a solution, but haven't found a working solution so far. The main idea is to store the last held key number, and after the next key is pressed and released, send the appropriate pitchbend to the last held key. This has proven not to be easy, I tried for more than an hour with different methods. You're right, in general pitchbend is sent to all notes, and I try to prevent that. :)

What I still don't understand is how to tell Lemur "not equal". Comparison operators don't do this, and the logical operator "!" I don't get how it works. I understand that "!" gives a 0 (false) or a 1 (true), but haven't found a way to implement it yet. Maybe the a?b:c conditional statement is better. Yeah it's been an interesting afternoon, but now I'm making a pause.

I intend to play iVCS3 with this converter, and other synths that can be set to monophonic, like Thor (iPad). And of course also hardware.

microtuning converter10.jzml
Phil999 wrote:What I still don't understand is how to tell Lemur "not equal". Comparison operators don't do this, and the logical operator "!" I don't get how it works. I understand that "!" gives a 0 (false) or a 1 (true), but haven't found a way to implement it yet. Maybe the a?b:c conditional statement is better. Yeah it's been an interesting afternoon, but now I'm making a pause.
!= is the construct for not equal. If that's not working for you, something else is at fault.

if (myNote != 60) {
// do stuff
} else {
// myNote is 60, so I do nothing
}
Phil
that second fader is working, it will just have very small effect even at very large pitch bend ranges +/-2 oct. - but by then it is noticeable
Pitchbend is 14 bit data ordered LSB,MSB (pretty sure) - and if the device is recognising it then you would want to use it or else set the LSB to 63 (i think) for 7 bit tuning accuracy
Try something like this for a knob named switch - {floor(pitch.x*16383)%127,floor(pitch.x*16383)>>7} in your bend script, or in a Monitor to see the values,

Remember that the amount of eventual actual pitch change is dependent on the settings of the receiving device . . .