Topic: Temperament changes on the fly

In the music I'm working on I need to change temperament presets frequently while playing, using MIDI messages, such as MIDI note switches. The temperaments themselves, as far as I can see, cannot be chosen via MIDI, so my solution is saving a number of full presets, each with a different temperament but the other parameters intact, and then call those with Program Change messages. I've also freezed every parameter except Temperament.
How can I accomplish this without glitches or cuts in the sound? I haven't been able to.
Ideally, the Temperament change should take place only when a new MIDI On message is sent after the Program Change (i.e. change of temperament) so that if the temperament is changed while a note is held (sounding), there should be no tuning change yet, nor any glitch or disturbance.
At least the patch change should be instantaneous and without a pause or glitch. These do occur.

Is what I'm asking for possible in Pianoteq?

Re: Temperament changes on the fly

Patch changes will always have a bit of a pause because the model completely changes, so it needs to be reinitialized. You can use A/B switch but that only covers two presets (however it is a smooth transition then).


BTW you CAN assign MIDI events to temperament changes... Right-click the preset management button to view mini-presets, then select Tuning. You can assign MIDI events here, just like you assing Program Changes to particular full presets. Also it does seem that temperament changes on next played note in case you do change them via MIDI events.

Last edited by EvilDragon (08-06-2018 23:23)
Hard work and guts!

Re: Temperament changes on the fly

Thank you, EvilDragon, that was very useful! Assigning MIDI events to temperament changes gives a rather good result, but not perfect. A held note is affected by the temperament change but the sound itself is continuous, if not absolutely even. But the note does sometimes stop sounding altogether, so there's a little pause. It seems that this happens when the new temperament tunes that note too far from the original tuning.
In fact, this is the same behavior as in my earlier test - sometimes there are little glitches and sometimes a pause. I think my way of changing patches, with *everything* except the one single parameter - the temperament preset - freezed, is in effect the same parameter change as the MIDI-event-controlled Temperament selection.

So it seems that Pianoteq is not able to perform the way I'd need it to, which makes this post a feature request.

Re: Temperament changes on the fly

This is some extremely useful information EvilDragon!

Extrapolating on what you've shown here, it appears that one could easily save a directory of custom Tuning presets into AppData\Roaming\Modartt\Pianoteq\Presets\My Presets, with any conceivable combination of Scala SCL/KBM files, then use the MIDI Events of choice to modulate the microtunings as needed.

In a very quick test here, I was able to switch between intonation systems with MIDI Notes assigned to specific tunings saved to the My Presets directory, with only minimal interruption of the sound on the change.

It does appear though that it would be critical to switch the tuning during a rest to avoid any glitching, otherwise it changes very quickly and one could probably compositionally and dynamically switch intonations during a rest as short as a 1/16th note.

FYI/FWIW: The best dynamic microtuning I've seen though is with MTS, and sending MTS from the timeline of REAPER to instruments that support it, where one can even hold down chords and have them be retuned as the instruments receive the transmission. Many lament that MTS never caught on sufficiently, which leaves us with the generally inferior tuning-table microtuning paradigm, but alas, such is life.

Thanks a bunch for this revelatory information. I'm going to integrate this into my Pianoteq workflow immediately. This is yet another area where Pianoteq excels in its integration of the Scala SCL/KBM format, and what you've revealed here is the fastest way to switch tuning-tables I've seen in any virtual instrument.

Re: Temperament changes on the fly

Yes, I tested it too, and indeed changing Temperament presets with MIDI notes works rather well, and it's quite handy to be able to change tunings independently of Instrument patches. However, the small glitches and interruptions are still there and it's true that MTS would allow smooth changes even when notes are sounding.

But one would think the tuning implementation of Pianoteq could be improved to make any Temperament changes instantaneous and smooth, and not affect simultaneously sounding, held notes.

Re: Temperament changes on the fly

.. and in reality, to change the temperament, you need to interrupt for at least an hour and a half .. until the tuner reconfigures all 88 notes. In Pianoteq this happens for how much? A quarter of a second? In life, it takes more time just to get from one piano to another, with a different temperament) (oh these rates of modern life) :-)

Re: Temperament changes on the fly

Technically it should not be a big problem to make temperament changes not be real-time but applied on next played note. However it would still impact previously sounding notes (i.e. sympathetic resonance, or if sustain pedal is depressed), because the model runs in realtime... It's like, literally detuning all the strings at the same time with the piano tuning wrench. Of course you'd need absolute silence if you want to change temperaments without ANY sort of artifacting or messing with existing output.

At this point, just use multiple instances in a DAW and switch between them? That is going to be guaranteed glitch-free transitions.

Last edited by EvilDragon (09-06-2018 09:46)
Hard work and guts!

Re: Temperament changes on the fly

yes - multiple instances within a DAW - THE solution

Lanny

Re: Temperament changes on the fly

"Technically it should not be a big problem to make temperament changes not be real-time but applied on next played note. However it would still impact previously sounding notes."
Yes, that makes sense. But assuming no sustain pedal, most of the Temperament changes I tested were in fact instantaneous; I just would prefer Pianoteq to wait for NoteOff for all sounding notes before making the change. I can live with this, though. However, sometimes there is an interruption in the sound and some noise. I am not 100% sure why this occurs but as I wrote above, I believe it happens when the new tuning is too distant from the old one.

Switching between multiple instances within a DAW works, sure, but it's not a good solution in my case, as this is for performing, and there are tens of Temperaments that the player keeps changing via MIDI. One possibility would be to have only two instances of Pianoteq and change the Temperament in the one that's not being played, in advance, and then change the MIDI Channel at the point of the required Temperament change in the music, then change the Temperament in the mute instance again, and so on,  but this seems complicated.

Last edited by nylonius (09-06-2018 13:09)

Re: Temperament changes on the fly

nylonius wrote:

One possibility would be to have only two instances of Pianoteq and change the Temperament in the one that's not being played, in advance, and then change the MIDI Channel at the point of the required Temperament change in the music, then change the Temperament in the mute instance again, and so on,  but this seems complicated.

When there's a will, there's a way

Hard work and guts!

Re: Temperament changes on the fly

Do you have a suggestion? I was thinking that a program could be made in Max/MSP that follows what midi notes the pianist is playing, and changes the tuning of the mute channel in advance, while the pianist would still make the channel changes. But a much simpler solution would be to use some other instrument for the piano sounds than Pianoteq, one that does the tuning changes without glitches - Kontakt, for example.

Re: Temperament changes on the fly

Yes but you don't get the awesome modeling capabilities of Pianoteq in any Kontakt sampled piano.

I think, if you know what the repertoire is and when the changes are supposed to occur, you can simply program all the changes in advance on MIDI items in the DAW project, automate track mutes, etc.

Hard work and guts!

Re: Temperament changes on the fly

Sure, I do want to use Pianoteq.
This is for live performance, preferably without DAW, perhaps with a softsynth host like MainStage. In a DAW project (recording), there is no problem, everything can be handled the way you suggest.

Re: Temperament changes on the fly

I can use Reaper pretty much exactly how you'd use Mainstage, but with the benefit of having a timeline and placing events on it. And Reaper is rock solid, stability-wise, very light install, and very light on CPU/RAM.

Think about it.

Hard work and guts!

Re: Temperament changes on the fly

EvilDragon wrote:

You can use A/B switch but that only covers two presets.

Can we assign A/B switch via midi events ?

Re: Temperament changes on the fly

Of course.

Hard work and guts!

Re: Temperament changes on the fly

If you haven't found an ideal solution to this yet, look into GigPerformer, it can do what you want. Its "patch persist" function is what you'll need to use.

I use it for switching between many different instruments seamlessly, and it works very nicely.

Re: Temperament changes on the fly

As a Pianoteq registered user you qualify for a 10% discount off the Gig Performer retail price.

You log into your user area.

Pianoteq 8 Studio Bundle, Pearl malletSTATION EM1, Roland (DRUM SOUND MODULE TD-30, HandSonic 10, AX-1), Akai EWI USB, Yamaha DIGITAL PIANO P-95, M-Audio STUDIOPHILE BX5, Focusrite Saffire PRO 24 DSP.

Re: Temperament changes on the fly

And thanks again for pointing me to this software Amen Ptah Ra--using it with Pianoteq for a performance this weekend.