MTS-ESP Tuning Tool by Oddsound and Aphex Twin

Could also be something to do with the particular Kontakt script and sample set you’re using.

Here’s a little test…I resampled a 440Hz sine wave into Kontakt and mapped it with with root key A3. I set the pitch bend range in Kontakt to 1 semitone. As I advised in my post above I set the “Synth” bend range in the MIDI Client to match that in Kontakt and also set Retune Type to “Note+PB” (did you try these steps yet?). I loaded 7EDO in MTS-ESP Master and checked the retuning, you can see it lining up in the screenshot, Kontakt on the left.

1 Like

Thanks. I mentioned that I’m writing my own sequencer to implement microtuning, but I forgot that was in this other thread. I wrote it for my synth modules that support MTS, then I wanted to quickly try implementing the pitch bend trick for other synths and plugins. My implementation is tested with Spectrasonics Omnisphere and Trilian when I set a patch’s pitch bend range to 1 semitone, but for some reason setting the pitch bend range in Kontakt doesn’t produce the right frequencies. For Kontakt, I must halve the amount of pitch bend I send rather than halve Kontakt’s pitch bend range. I would expect those two methods to be equivalent, so I must have a bug.

I wouldn’t ask you, but MTS-ESP is open source. I’ve had a look at your code. Mine’s in Ruby, but I can see that figuring out what you’re doing in C is going to be rather a pain because I need a more “for dummies” style of code documentation, so I asked you instead. For example, I can’t even find the routine MTS_NoteToFrequency, which I’d really like to get a look at.

So it sounds like you want your sequencer to grab tuning data from MTS-ESP, i.e. to have it work as a client in the MTS-ESP system. There are two files you need for this, libMTSClient.h and libMTSClient.cpp. libMTSClient.h contains the function definitions and commented instructions on how to use them…that is where you’ll find the “dummies guide”, plus of course there’s the GitHub readme (GitHub - ODDSound/MTS-ESP: A simple but versatile C/C++ library for adding microtuning support to audio and MIDI plugins.). If you need any further info then I think I’ll need some more specifically focused questions. The function definitions are all in libMTSClient.cpp, that is where you will find the implementation of MTS_NoteToFrequency() and all other functions declared in libMTSClient.h. In reality you shouldn’t really need to go looking at them, unless you’re curious…or…are you planning on writing a Ruby port of the MTS-ESP Client API? Should be possible, Fiddle would be a help in that: GitHub - ruby/fiddle: A libffi wrapper for Ruby..

1 Like

No. I’ve already implemented MTS real-time retuning in my own sequencer. I was just curious to see how you do it compared to what I do. For example, I retune blocks of 16 notes at a time, creating and freeing up blocks as the sequencer plays so that the full 10+ octaves remain simultaneously available all the time. The 128 MIDI semitones cover about 320 notes in 31-EDO, so you have to dynamically allocate the re-tuning locations. I wonder how you do it.

Pitch bend has been an afterthought for me. Easy enough, but it’s weird that Kontakt won’t tune correctly unless I accept its default pitch bend range of 2. With Spectrasonics, Omnisphere and Trilian let me adjust pitch bend range, and then I have to compensate in my code. Keyscape doesn’t respond to pitch bend at all, so that’s also weird.

1 Like

MTS-ESP uses a single global tuning table of 128 frequencies. Dynamic tuning is up to a plug-in developer to implement and then they can update that frequency table accordingly, so that all connected clients will automatically follow along. That said, MTS-ESP does provide support for multi-channel mappings. Think of this as a table of up to 2048 frequencies, although with the concern that it requires a client to supply a MIDI channel when querying retuning for a given note. Some plug-ins may not be able to do this, so there always needs to be a table of 128 frequencies to fall back on in this case.

That’s quite a cool and inventive solution for getting more notes out of MIDI btw!

So you do bulk tuning dumps, not real-time?