Topic: Trying to modulate parameters with velocity

In an experimental mood, I've been trying to use Pianoteq in Mulab, setting up what that program calls a "mux," which lets the user modulate the parameters of a vsti with velocity.

I'm not succeeding. When I assign velocity to control, for example, Unison Width, the Unison Width slider moves on the Pianoteq vsti interface, changing the settings, but the sound is not affected. Because the slider does move, however, the next note is instead affected by the new setting. In other words, with Vel set to make the unisons go wider, if I strike a note hard, the slider shoots to the top, as it should, but the  sound is not affected. If then play a soft note, it has its unisons widely detuned. (The effect can be made better if you are careful to avoid extreme settings and sudden changes in dynamics, but it is obviously sometimes unpredictable.)

The problem may be that it is not a solvable problem: Pianoteq is of course physical modelling, so the parameter settings may be calculated before the note is produced. Unlike a filter or other often modulated effect, that occurs later in the signal chain. On the other hand, part of me doesn't understand. If the parameter change reaches the vsti and intercepts the signal before the partials are generated, it seems that the change in parameters should still affect the note, just as it affects the note if the user manually changes it on the interface before playing the note.

Re: Trying to modulate parameters with velocity

Hi Jake

What a coincidence... I'm playing with my newly acquired Bluethner (amazing!), and listened to some Petrucciani recordings and noticed that when he hits the higher octaves fiercely, the notes really stand out,
as if the spectrum profile shifts towards the higher overtones...
and I wondered exactly about that: it would be cool if I could change the character of some note ranges for some velocity ranges. E.g. change the spectrum profile for the Fortissimos of some of the higher octaves.

So I think this would be a nice feature request for Pianoteq Pro users:
We have one dimension today of customizing parameters - and it is the per-note editing. It's already a lot.
For one parameter, hammer hardness, we have another dimension: velocity, where for each note we can control
three velocity zones independently.

So... if we could have a generalized feature where for each control, we could have not just a constant value per note, but rather a function of the velocity == *velocity-curve*, which determines what values the control have per velocity.

The hammer hardness control per three velocity zones might as well go away, and give place for hammer hardness per 127 velocities... and other controls will get the same level of tweaking.

Regarding the GUI for entering different velocity curves for different note ranges, two velocity curves might be
interpolated gradually between two (yellow) control points, exactly as is done today in the per-note spectrum profile editing ...

Now.. there is only the GUI problem editing per-note, per-velocity spectrum profile, because it is somewhat
three dimensional... I guess if the wonderful guys at Modartt are motivated enough to give Pro users this extra control, they will find an adequate solution for this specific corner.
They've already been doing an amazing job so far ...

Can anyone else sympathize with it?

--Eran

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Trying to modulate parameters with velocity

Well, my impression is that many of the parameters are of course already dependent on velocity, so just the sliders can be used.

So my first goal was to try to modulate the Unison detune inversely with velocity. In other words, to make the unisons come more into tune with harder strikes, thus trying to replicate their coupling. 

But I also started thinking along the same lines that you have been thinking. I don't know if the partials in a real piano, or in the spectrum profile, all react linearly to velocity. Obviously, the higher partials become louder with harder strikes, as we all know, but I'm not sure I've seen a study about the relative amplitude of partials at low strikes and at hard strikes.  If a soft strike produces, among many, many partials, a fundamental and a 4th partial that are, say, at a ratio of 6:1 in amplitude (a wildly chosen ratio), does that ratio remain constant on a hard strike? I imagine that the answer is, roughly, yes. In any event, the hard strikes in Pianoteq sound very realistic to me. 

But of course, regardless of what the reality is, I wanted to try the experiment, both to hear the sound with partials having a different ratio to velocity and to see what kind of strangeness I could create.   (What would happen if the Q-factor increased with velocity, for example? If the Soundboard Cutoff was modulated with a subtle LFO? If the Strike point varied a little with hard strikes, or if the Stereo width parameter on the mics page increased slightly with harder strikes? The electric pianos might offer more fun with modulations.) On the other hand, the possibilities are a little frightening.

Last edited by Jake Johnson (24-02-2013 22:44)

Re: Trying to modulate parameters with velocity

Wow, neat stuff with WEIRD possibilities.
That it doesn't take effect until the next note SEEMS like a bug (to me), though I think I understand some of the processing priorities and difficulties in getting things to happen for THIS note.

Is it worth submitting this as a shortcoming/bug/unexpected_feature ?
or as a feature request ?

Re: Trying to modulate parameters with velocity

tractor_music wrote:

Wow, neat stuff with WEIRD possibilities.
That it doesn't take effect until the next note SEEMS like a bug (to me), though I think I understand some of the processing priorities and difficulties in getting things to happen for THIS note.

Is it worth submitting this as a shortcoming/bug/unexpected_feature ?
or as a feature request ?

I've had some time to think about this situation. My impression is probably the same as yours--that the construction of the program and the demands on the cpu prevent modulating some of the parameters with velocity. Of course, some of the variables, such as the hammer hardness, are already modulated by velocity. But for the others, when we move a slider, we change variables--numbers--in tables that are referenced in the long non-linear equation that is Pianoteq. When we play, the sound is produced based on those variables. The cpu just can't keep up with the thousands of calculations that would have to be made if the variable changed with velocity, since almost every other parameter would be affected. In addition, if several of the parameters were modulated by velocity, which then changed the force applied in real time playing to other parameters which are themselves already modulated by velocity, I would imagine that the calculations and cpu load would be tremendous. The situation with a sample-based player is much simpler. Each parameter is isolated, so that a filter can be modulated with velocity, for example, without requiring new calculations for the amplitude envelope.

It's a pity if my guess is correct. I would love to be able to modulate the unison detuning inversely with velocity, or the reverb mix. And like Eran, to map the loudness of a given partial to velocity.

But I do sometimes wonder if some of the parameters could be coded so that they could be mapped this way to respond in real-time without causing a crash. Some might almost guarantee a crash when a few notes are played--such as the soundboard impedance. Some might be easier than others--such as the amplitude of single partials. Would require a lot of trial and error and guesswork. Philippe and Julien?

Last edited by Jake Johnson (10-05-2013 18:19)

Re: Trying to modulate parameters with velocity

Ummm, as in;
To save compute cycles in real time lets pre-calculate a lot of this stuff and have some HUGE multi-dimensional arrays and throw n indexes (each with a range of what ? 0-127 ?) at them ?   
Contents calculated "recently".
User specified sets of such arrays, as well as factory only sets... perhaps.

With Pianoteq hovering around 28Meg (180 Meg when loaded and running) and modern laptops boasting 4, 6, or 8 Gig of Ram - maybe.

I think it may be acceptable to take some time calculating table contents when switching pre-sets, there is usually a mood change and a pause is appropriate for that.

Last edited by tractor_music (11-05-2013 20:38)

Re: Trying to modulate parameters with velocity

tractor_music wrote:

Ummm, as in;
To save compute cycles in real time lets pre-calculate a lot of this stuff and have some HUGE multi-dimensional arrays and throw n indexes (each with a range of what ? 0-127 ?) at them ?   
Contents calculated "recently".
User specified sets of such arrays, as well as factory only sets... perhaps.

With Pianoteq hovering around 28Meg (180 Meg when loaded and running) and modern laptops boasting 4, 6, or 8 Gig of Ram - maybe.

I think it may be acceptable to take some time calculating table contents when switching pre-sets, there is usually a mood change and a pause is appropriate for that.


But the problem is calculating the modulation by velocity in real-time, while playing many notes at once Which may not be as cpu intensive as I fear for some parameters. I hope not.