Topic: MIDI - Gaining use of Aftertouch and variable Note-Off?

I use a QRS PNOscan II laser reader looking at my keybed to input MIDI to Pianoteq.  I have been trying to make sure that Aftertouch works (I started the QRS program WinNessie which showed that it did, and then I found that it interfaced well with Pianoteq, with the Clavichord, that utilizes aftertouch to modify the notes after they are plucked/struck).  Synthesizers frequently can use aftertouch to modify the volume up and down as you depress and release the key.  Other than the Clavichord, I don't think the Pianoteq instruments utilize this function.

Pianos do not utilize aftertouch...except for damper control, and here is where I don't know if the function that I am looking for should be enabled in WinNessie for the QRS drivers, or in Pianoteq.  Let me explain:

When you depress a key, the key causes the damper to lift from the string, essentially enabling the string to vibrate.  Next, the hammer is 'thrown' at the string.  Once the throw happens, the hammer loses its connection to the key - if the key velocity was low, the throw will have low force, and the note will be soft.  If the velocity of the key was high, the throw will have high force and the note will be loud. 

What happens next is often overlooked by most people who interface MIDI keyboards with pianos:  As you release the key, the damper is returned to stop the vibrating string and thus silence the note.  But this does not need to be a binary event - if you release slowly, then the damper will return slowly, gradually quieting the note.  If you release quickly, then the damper will return quickly, rapidly silencing the note.  In Pianoteq, this damper return function happens as a "Note-Off" event.  On my system currently, it appears to be binary, returning a value of zero, with the cessation of sound.  How quickly or slowly I release the key makes no difference.  Manipulating the Note-Off curve on the graphical display allows me to soften or harden the note-off function, but only in the Y-axis - the Note-Off event always shows up in the middle of the X-axis at about 63.  Shouldn't there be a way to make the Note-Off event variable of the X-axis as well, with velocity or position in the upgoing direction of the key, much as the note-playing volume is dictated by the velocity of the downgoing key?

I know that the damper control ability is within Pianoteq, as my sustain pedal works as a continuous function, raising and lowering the dampers gradually.  Essentially each key press should do the same thing, on a note-by-note basis.

Does anyone know how to enable this continuous Note-Off effect?  Are there changes to be made in my MIDI controller via the WinNessie program, or within Pianoteq itself?

- David

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

I think you're right, many people probably don't ever think about note-off velocities. I hadn't given them much thought, until you started this thread! It's a surprise to me that QRS PNOscan doesn't seem to transmit note-off velocity. On my Roland FP-30 I get a good range of values for note-off - in fact, I think I need to have a careful look at the lower end of my note-off curve. With the very lowest note-off values enabled (about 0-4), if I play a note loudly and then release very gently it can sound as if the dampers are defective!

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

dklein wrote:

Synthesizers frequently can use aftertouch to modify the volume up and down as you depress and release the key.  Other than the Clavichord, I don't think the Pianoteq instruments utilize this function.

PIANOTEQ Vibes do.  When I connected my Pearl malletSTATION right out of the box it was shipped into an iMac via USB and selected one of the vibraphone instruments, the MIDI controller sent after touch messages received by PIANOTEQ.  So, whenever with a little pressure I placed a mallet on a synthetic bar on the controller after it was struck with its corresponding vibraphone note still suspended (ringing), my gesture resulted in the note dampening.  PIANOTEQ instruments will utilize indeed after touch messages.

What happens next is often overlooked by most people who interface MIDI keyboards with pianos:  As you release the key, the damper is returned to stop the vibrating string and thus silence the note.  But this does not need to be a binary event - if you release slowly, then the damper will return slowly, gradually quieting the note.  If you release quickly, then the damper will return quickly, rapidly silencing the note.  In Pianoteq, this damper return function happens as a "Note-Off" event.  On my system currently, it appears to be binary, returning a value of zero, with the cessation of sound.  How quickly or slowly I release the key makes no difference.

My keyboard a YAMAHA DIGITAL PIANO P-95 also sends zero (0) as a MIDI note-off message exclusively, without any velocity variation to the total note-off MIDI messages transmitted.  Although, PIANOTEQ seemingly reinterprets the zeros and displays an indicator somewhere approximately between 1 and 127 on the interface.

Manipulating the Note-Off curve on the graphical display allows me to soften or harden the note-off function, but only in the Y-axis - the Note-Off event always shows up in the middle of the X-axis at about 63.

I made a mention of this recently in another post.  You may want to check a few bottom paragraphs of that: https://forum.modartt.com/viewtopic.php...38#p972938.  But, note-offs maybe were earlier discussed in detail inside an altogether different topic: Make key release noise softer on softer Note On value.

Shouldn't there be a way to make the Note-Off event variable of the X-axis as well, with velocity or position in the upgoing direction of the key, much as the note-playing volume is dictated by the velocity of the downgoing key?

Many from a Roland line up of keyboards transmit variable note-off velocities to the software.  Presently if anyone is going to see a cluster of vertical lines drawn along both axes he has to have either some sort of a MIDI controller transmitting various note-off velocities or a MIDI file recorded previously via one of the keyboards equipped with variable note-off capabilities.  Currently, an alternative is a DAW since it allows individual note edits, if you’re certainly willing to edit very laboriously every single note out of your entire piano performance.

Does anyone know how to enable this continuous Note-Off effect?  Are there changes to be made in my MIDI controller via the WinNessie program, or within Pianoteq itself?

Personally I’d like to see changes made in the piano software...

If developers could augment a fixed note-off velocity based on the duration of the note played that’s something I’d like to both see and hear!  Whether you choose to label the velocity augmented or humanized, to me that is less important than an authentic note-off one got from the standpoint of an acoustic instrument. 

(Honestly if it’s really all that important to me, perhaps I ought to just save some of my income and get a much better keyboard.)

However, any keyboard that can utilize the maximum benefit today offered in PIANOTEQ including high resolution MIDI and variable note-off functionality costs well over two thousand dollars ($2,000.00 U.S.).  Several are even as high as four thousand ($4,000.00 U.S.) and a whole lot more.  (Say maybe ten or a Disklavier.)

I was surprised too to learn a QRS PNOscan II is totally incapable of any variable note-off transmissions!  You get the one recommended by MODARTT?  Please, tell me you got maybe at the very least Hi-res CC#88 MIDI!

Last edited by Amen Ptah Ra (15-01-2021 06:45)
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: MIDI - Gaining use of Aftertouch and variable Note-Off?

I don't know if the PNOscan II is capable or not of variable Note-Off values, and that's why I wrote this thread.  I would think that it is capable, since all of the key positions (including the sustain pedal) transmit continuous position indications, which also allows calculation of speed of key travel (velocity).  I just haven't figured out how to manipulate Note-Off values, or how to tell Pianoteq to accept them.  I did get my continuous sustain pedal working just fine, and that's a joy.

I am finding other documents on the PNOscan controls, and have just started a 'ticket' with QRS and have another email communication that I just started with the designer.  More to come, no doubt.

- David

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

It turns out to be surprisingly hard to find a midi implementation table for the QRS PNOscan II. But it would seem strange for such a costly device to not be able to register note-off velocity (also because apparently it is measuring the position of the keys/pedals a respectable thousand times per second!)
The specification list in the link below actually says the PNOscan II should return note-off velocity, so perhaps you might want to contact the manufacturer for instructions or clarification.

http://www.tasteundtechnik.de/117101.html

Last edited by thiesdewaard (15-01-2021 12:11)

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

dklein wrote:

I just haven't figured out how to manipulate Note-Off values, or how to tell Pianoteq to accept them.

Was writing my previous answer while you published yours - hope the manufacturer will be able to help you! If your piano only feeds fixed note-off values to Pianoteq, then PT cannot really do anything else but return that value (at most it will convert a 0 to a fixed 64). You can test what values your piano is delivering for note-off velocity (fixed of continuous) by recording (in PT) a short random bit of playing, and then check which values are shown by PT under Options --> Midi. You'll see all the values listed there (you can scroll back in the list after the piece has finished playing).

Last edited by thiesdewaard (15-01-2021 12:28)

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

As far as I can tell, Pianoteq just accepts note-off values automatically if your controller is capable of transmitting them. And the note-off velocity curve can be manipulated in just the same way as note-on.

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

dklein wrote:

Do you have any insights on variable Note-Off Velocities?  I have been trying to get my QRS PNOscan II to output Note-Off velocities, as I believe that things will sound different for slow and gentle stuff especially.

Dear David,

Thank you for writing to me directly and I'm sorry for your frustration...

     I can't find a MIDI implementation chart for the PNOscan II strip, so I can't confirm if note-off velocities are being output. What I can suggest is that you download the free MIDI-OX application and record what is being received from the strip to the computer - you will then see exactly what is being output and what can or can't be manipulated to achieve what you're after. You can also confirm if note-off data is being received by PianoTeq by looking at [Options] -> [MIDI] and checking the MIDI event list there.

     From what I can see, and this is an 'educated' guess, the strip will record the position of the key over time... So, in theory you should be able get note-on and note-off events along with the speed that each occurs. There are also different 'modes' I believe available and if it is not possible to have note-off velocities directly from mode 2 (used for external tone generators) then it might be possible to map the QRS performance mode (mode 1) to get this data?

     With regard to using aftertouch or any other CC controller event as a means to estimate key-off velocities, this simply cannot be done, for one reason the type of control data would not be compatible nor will it be synchronised to the actual key-off event.

     Key-on and Key-off events are a one-time event, aftertouch is a continuous event and is used by PianoTeq to control the manual movement of a single key on the clavichord for example which alters the volume of the note. This event occurs after the note is struck (key-on) and before the note is released (key-off). You can simulate this on PianoTeq itself by moving the mouse up and down once you've clicked a note and before you release it on the small keyboard at the bottom of the PianoTeq screen.

So, my advice is:

  1. to check what's being sent out via MIDI - through either MIDI-OX or the PianoTeq -> Options -> Midi event list in all modes available to you on your PNOscan II.

  2. to contact QRS to confirm whether your device actually outputs note-off velocities and to make sure you're using the correct mode (more on modes in the installation manual) - if it should but does not - to get a firmware update or replacement?

Hope that is of use to you. It's my initial thoughts as I don't have an acoustic instrument with QRS PNOscan II fitted.


Smilie

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

Thanks, Smilie.

From the MIDI data through PNOscan's WinNessie program as well as though the MIDI data window in Pianoteq, I do not see evidence for variable note-off velocities, though Pianoteq appears set up to accept such information for keyboards that transmit it (and the Note-off curve is modifiable in Pianoteq).

Note-on is when the hammer strikes the string - this can only happen once for each keypress.  Note-off is more complicated, as it is the beginning of a process that allows the dampers to recontact the vibrating strings, and it does not have to be an abrupt event, even though it has been defined as such in the MIDI world to correspond to the ceasing of an electrical tone.

I don't understand why aftertouch is incompatible with damper control, as that is what we are trying to do with a real live acoustic piano - aftertouch allows the damper to come back into contact with the strings, effectively damping the vibrations.  If it happens abruptly, the sound ceases nearly instantly.  If it happens slowly, the sound slowly ends.  An if you linger on the key at the right altitude, then the damping action can be very gradual indeed, letting the sound linger, as if you are partial-pedalling the sustain pedal, which both PNOscan and Pianoteq both easily accept.

There must be some way to use aftertouch values to control the dampers, so that each key, via aftertouch, can function as its own localized damper pedal, just like on a real piano.  In fact, variable sustain application through release techniques on the keys of a real acoustic piano is even called "finger pedalling."

- David

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

dklein wrote:

Note-on is when the hammer strikes the string - this can only happen once for each keypress.

Yes, nobody disputes this.

dklein wrote:

Note-off is more complicated, as it is the beginning of a process that allows the dampers to recontact the vibrating strings, and it does not have to be an abrupt event, even though it has been defined as such in the MIDI world to correspond to the ceasing of an electrical tone.

There's the rub - you're dealing with MIDI...

Also, the note-off event isn't sent until the note is off. So if you start the note and immediately take a full 2 seconds to gradually release the key, the note off event and it's velocity is sent at the end of the two seconds. What PianoTeq does with this during live performance is keep the note going until the full two seconds and then applies the gradual dampening so you get a longer sounding note! This cannot be changed - perhaps during playback but then there's no way of measuring exactly how long it took to ease off the key - so an arbitrary delay is added.

dklein wrote:

I don't understand why aftertouch is incompatible with damper control

Aftertouch is a continuous controller that can both decrease and increase dependant on the pressure applied to a given note. There are two types of aftertouch, channel and polyphonic. The first (channel) will apply to all keys whilst held and the later to just the one key, pressure is applied to and results in huge data transmission and is, therefore, impractical!

The easiest solution is perhaps to use the damper pedal to control the speed of the dampers as it is 'live' and those of us who use key-off run the risk of asynchronous performances. There simply isn't an ideal solution at the moment that I'm aware of.

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

Hello dklein,

Just to let you know that other strips like adSilent (which I own) outputs directly Note-off variable velocity and PianoTeq recognizes it without any additional setup.
So, unless you are able to activate a specific "variable note-off" option in the QRS settings, then I think you can't have what you are looking for.
The only "non optimal" solution would be to process your MIDI events thru a MIDI FX trying to guess what the note-off velocity could be, according to note-on velocity, note duration, etc => by the way, I think this could be an option proposed by Modartt in their future improvements as it could be valuable to many users.

Just a side remark : on an acoustic piano, you can depress a key, hear the string vibrating, release slowly the key half way up, hear the string dampening but still vibrating, then depress again the key without the hammer hitting the string again but release completly the string from the damper to let the it terminate its natural vibrating.
In order to reproduce such a phenomenon in PianoTeq, we would need to have PianoTeq handling string dampening based on aftertouch and not (or not only) upon note-off event. In today's world, it is very impracticable because most of the keyboards don't implement aftertouch, especially when they are already weighted.

Best regards !

dklein wrote:

I don't know if the PNOscan II is capable or not of variable Note-Off values, and that's why I wrote this thread.  I would think that it is capable, since all of the key positions (including the sustain pedal) transmit continuous position indications, which also allows calculation of speed of key travel (velocity).  I just haven't figured out how to manipulate Note-Off values, or how to tell Pianoteq to accept them.  I did get my continuous sustain pedal working just fine, and that's a joy.

I am finding other documents on the PNOscan controls, and have just started a 'ticket' with QRS and have another email communication that I just started with the designer.  More to come, no doubt.

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

Paulo164 wrote:

Just a side remark : on an acoustic piano, you can depress a key, hear the string vibrating, release slowly the key half way up, hear the string dampening but still vibrating, then depress again the key without the hammer hitting the string again but release completly the string from the damper to let the it terminate its natural vibrating.
In order to reproduce such a phenomenon in PianoTeq, we would need to have PianoTeq handling string dampening based on aftertouch and not (or not only) upon note-off event. In today's world, it is very impracticable because most of the keyboards don't implement aftertouch, especially when they are already weighted.

I question the use of the word "impractical", but I agree with you.

In more detail, I think utilizing the aftertouch to properly model the dampers would be easy for Pianoteq's developers to implement. In fact they already do this with the damper pedal. They'd just need to modify that code slightly to make it note-by-note based on the aftertouch value.

On the other hand, as you and other point out, most keyboards and digital pianos do not have aftertouch at all. The vast majority of the keyboards that do, do **not** have the polyphonic version, making it completely useless for this purpose. The very few that have polyphonic aftertouch are not weighted keyboards (with one exception, see below). Moreover, even assuming one forgo the need/desire for a weighted keyboard and goes for one of these polyphonic aftertouch keyboards, their implementation of aftertouch is based on ADDITIONAL PRESSURE after the key has been already pressed (which would work for clavichord) and not on PARTIAL RELEASE which is what is needed for damper modelling. So rather than "impractical" this is basically impossible, for the lack of adequate hardware.

The only one exception is Yamaha AvantGrands and perhaps https://github.com/jkominek/piano-conversion/ which do send polyphonic aftertouch, and even better, they send it based on PARTIAL RELEASE. However the former are a very expensive niche and the latter is still experimental. As such, I don't think Pianoteq is motivated enough to add this feature.

That said, I hope that piano-conversion gains popularity (I am planning to put it myself in my instrument) and when that happens I will put a feature request to Modartt. Meanwhile, if you want to put such a feature request now, I'd be happy to join you, but on what instrument are you going to use it???

Where do I find a list of all posts I upvoted? :(

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

dv wrote:
Paulo164 wrote:

Just a side remark : on an acoustic piano, you can depress a key, hear the string vibrating, release slowly the key half way up, hear the string dampening but still vibrating, then depress again the key without the hammer hitting the string again but release completly the string from the damper to let the it terminate its natural vibrating.
In order to reproduce such a phenomenon in PianoTeq, we would need to have PianoTeq handling string dampening based on aftertouch and not (or not only) upon note-off event. In today's world, it is very impracticable because most of the keyboards don't implement aftertouch, especially when they are already weighted.

I question the use of the word "impractical", but I agree with you.

In more detail, I think utilizing the aftertouch to properly model the dampers would be easy for Pianoteq's developers to implement. In fact they already do this with the damper pedal. They'd just need to modify that code slightly to make it note-by-note based on the aftertouch value.

On the other hand, as you and other point out, most keyboards and digital pianos do not have aftertouch at all. The vast majority of the keyboards that do, do **not** have the polyphonic version, making it completely useless for this purpose. The very few that have polyphonic aftertouch are not weighted keyboards (with one exception, see below). Moreover, even assuming one forgo the need/desire for a weighted keyboard and goes for one of these polyphonic aftertouch keyboards, their implementation of aftertouch is based on ADDITIONAL PRESSURE after the key has been already pressed (which would work for clavichord) and not on PARTIAL RELEASE which is what is needed for damper modelling. So rather than "impractical" this is basically impossible, for the lack of adequate hardware.

The only one exception is Yamaha AvantGrands and perhaps https://github.com/jkominek/piano-conversion/ which do send polyphonic aftertouch, and even better, they send it based on PARTIAL RELEASE. However the former are a very expensive niche and the latter is still experimental. As such, I don't think Pianoteq is motivated enough to add this feature.

That said, I hope that piano-conversion gains popularity (I am planning to put it myself in my instrument) and when that happens I will put a feature request to Modartt. Meanwhile, if you want to put such a feature request now, I'd be happy to join you, but on what instrument are you going to use it???

Fully agreed…
Additionally, if aftertouch had to be correctly implemented for this specifically piano-oriented purpose, I think only optical sensors could do the job because they can measure the distance when the key lifts to its resting position - as opposed to measuring additional downward pressure like you mentioned. So it ends up that providers of silent systems like QRS, adSilent, Feurich, etc. are maybe our best bet to see one day poly-aftertouch on weighted keyboards.

Last edited by Paulo164 (03-06-2022 23:33)

Re: MIDI - Gaining use of Aftertouch and variable Note-Off?

see here :

https://forum.modartt.com/viewtopic.php...59#p983159

Last edited by Olivier W (24-06-2022 20:56)