Topic: ASIO settings and Piano sound quality

There are 2 main ASIO settings to play around with in Pianoteq: sample frequency and buffer size. My question is which of these affect the 'sound' or 'tonal' quality of the Piano sound generated assuming there is sufficiently fast computer and a good quality USB audio interface.

My understanding is:
* Sample frequency can change the 'tonal' quality of the sound.
* Buffer size cannot change the 'tonal' quality of the sound being generated. But, it may/will change the delay perceived.

Is this correct? If not, please correct.

Note that by 'tonal' quality - I mean how the instrument sounds and not the delay or other considerations (such as dropped notes or pops etc.). I am assuming that there is a really fast computer and a really good sound card so these issues are not present.

Thanks,
Osho

Re: ASIO settings and Piano sound quality

That's correct.

Hard work and guts!

Re: ASIO settings and Piano sound quality

Thanks!

Osho

Re: ASIO settings and Piano sound quality

As how I read this here is that Buffer size has no effect on the quality of the sound?
If so, why is it a setting then? Why would you be interested in increasing the buffer size then? Lower is better, no?

oshogg wrote:

There are 2 main ASIO settings to play around with in Pianoteq: sample frequency and buffer size. My question is which of these affect the 'sound' or 'tonal' quality of the Piano sound generated assuming there is sufficiently fast computer and a good quality USB audio interface.

My understanding is:
* Sample frequency can change the 'tonal' quality of the sound.
* Buffer size cannot change the 'tonal' quality of the sound being generated. But, it may/will change the delay perceived.

Is this correct? If not, please correct.

Note that by 'tonal' quality - I mean how the instrument sounds and not the delay or other considerations (such as dropped notes or pops etc.). I am assuming that there is a really fast computer and a really good sound card so these issues are not present.

Thanks,
Osho

Re: ASIO settings and Piano sound quality

paulvanbladel wrote:

Why would you be interested in increasing the buffer size then? Lower is better, no?

Increasing buffer may be better, or worse depending on requirements.

I like a higher buffer (128, 256 - even 1024 or more depending on piano/preset/piece).

On my system 128 is fast yet stable (rest of the latency loop is good) - but.. some may like 64 as a buffer size if the rest of their latency loop is very sluggish.

In a real piano, from the time your muscles twitch, your finger strikes, the key depresses, the hammer swings, the sound bounces off the strings/harp/cabinet to our ears - that's the "realism" I aim for, when adjusting my buffer.

On my system, 256 or even 1028 gives me a more exact sense of sitting at a real piano than some notion of "minimal" latency with a shorter buffer.

Zero latency is not a perfect goal for piano IMO~!

The upside is, that a higher buffer also gives us more stability (allows processing audio with less audio glitching etc.).

Hope that helps - to me, buffer size is not about "how short can I make my latency", at least with piano. (long time synth guy.. most of my life has been about very short latency times.. but with 'realism' and 'piano'.. a little latency is some strong medicine!)

Cheers.

Pianoteq Studio Bundle (Pro plus all instruments)  - Kawai MP11 digital piano - Yamaha HS8 monitors

Re: ASIO settings and Piano sound quality

Thanks a lot for your reply.
Trying to better understand,
A very simple question:
1. I'm interested in the best sound possible (for recording purposes)
2. I don't mind to put the audio buffer size on the highest possible value.
Given 1 and 2, will the sound quality be better (given the higher amount of samples) compared to a very low audio buffer size (and thus lower amount of samples).
cheers
paul.

Qexl wrote:
paulvanbladel wrote:

Why would you be interested in increasing the buffer size then? Lower is better, no?

Increasing buffer may be better, or worse depending on requirements.

I like a higher buffer (128, 256 - even 1024 or more depending on piano/preset/piece).

On my system 128 is fast yet stable (rest of the latency loop is good) - but.. some may like 64 as a buffer size if the rest of their latency loop is very sluggish.

In a real piano, from the time your muscles twitch, your finger strikes, the key depresses, the hammer swings, the sound bounces off the strings/harp/cabinet to our ears - that's the "realism" I aim for, when adjusting my buffer.

On my system, 256 or even 1028 gives me a more exact sense of sitting at a real piano than some notion of "minimal" latency with a shorter buffer.

Zero latency is not a perfect goal for piano IMO~!

The upside is, that a higher buffer also gives us more stability (allows processing audio with less audio glitching etc.).

Hope that helps - to me, buffer size is not about "how short can I make my latency", at least with piano. (long time synth guy.. most of my life has been about very short latency times.. but with 'realism' and 'piano'.. a little latency is some strong medicine!)

Cheers.

Re: ASIO settings and Piano sound quality

All the Digital/AnalogConverter (DAC) needs in the digital domain, is a constant stream of bits and a jitterless clock. It is meaningless, in which chunks (32, 64, 128,...) the digital samples are processed prior to that.

Re: ASIO settings and Piano sound quality

Good question Paul..

groovy is certainly right about being meaningless regarding the overall quality.

buffer size will not effect audio quality per se, just latency (processing time) during playing/recording & playback. The same amount of overall info is parsed.

paulvanbladel wrote:

I'm interested in the best sound possible (for recording purposes)

I'll add some ideas and things hopefully worth your time in seeking your 'best sound'


If you have a bunch of instruments and FX running, then it's possible you'd like to increase the buffer if your PC can't keep pace (pops or clicks and glitches).

Depending on PC, OS, sound card, drivers and connected cables, there will always be slightly different capabilities and latency is introduced by more things than just buffer size - but it's a really good surface tool for immediately getting a sweet spot for our audio purposes as they may change (like going from playing piano to mixing a multi-track project).

In a perfect world, an audio stream would not need buffers - but until then, it's going to be somewhere between 32 and 2048 for current equipment in general I think. The audio stream is processed 'stop/start' over and over.. and depending on multi-core CPU and other things relative to any given PC's architecture, one may do better of worse than another.

With longer length buffers, the CPU will have more buffer to read (time to process!) while parsing the next buffer or jumping threads in that tiny window between packets.. so, introduce more/faster packets (by lowering buffer to 64 or 32 if capable) and it's way more likely the current hardware/software will spit errors and "drop frames" as they say in film/TV or "make popcorn" in some circles.

This is a sweet simple lay explanation about buffers..

https://www.youtube.com/watch?v=94VRFrisKLw

This is a nice outline of how an Android developer sees latency..

https://www.youtube.com/watch?v=PnDK17zP9BI


Working in 48kHz at 24bit in DAW projects is my personal sweet spot with 256 buffer.

That seems to allow CPU to cope with playing and fairly complex multi-tracking without having to change settings too much. Different systems would give different performance and different numbers of course would be needed. If really maxing out the processor in a complex project, certainly raising buffer is valuable.

Using higher sample rates like 96kHz can be good too - but at the cost of more resources - and the main caveat also, that it might not give too much extra quality to final audio and may hold some pitfalls (Inter-modulation causing high-frequency spillage.. or just poor charred results when down-sampling for release at 44.1kHz sample rate that a lot of players/services want).

Things in that vein is an enormous topic but just saying, be a little careful of thinking 'bigger sample rate numbers = better' because sometimes, it will depend on pretty arcane factors and for all the trouble of longer buffer size to give CPU more time to process the audio, you can end up with marginally better audio, or way worse

https://www.youtube.com/watch?v=-jCwIsT0X8M

At this point in history, I feel like modern PCs are doing OK for pretty high quality audio production without having to resort to too much extra gear, or going beyond even 44100kHz sample rate to be honest. I like 48 for some edge-case reasons in my techniques.. but for so much that I do, 44.1Hz would be fine.

Most people are going to listen to our music on some online service or telephone/earbuds and the fussy ones with majestic stereo systems may believe our audio made on a PC is just fine at 44.1kHz (as long as it's not too overheated by pushing it too loud, or conversely too soft, EQ'd harshly / timidly etc.)

Hope that's some useful info

Pianoteq Studio Bundle (Pro plus all instruments)  - Kawai MP11 digital piano - Yamaha HS8 monitors

Re: ASIO settings and Piano sound quality

paulvanbladel wrote:

Thanks a lot for your reply.
Trying to better understand,
A very simple question:
1. I'm interested in the best sound possible (for recording purposes)
2. I don't mind to put the audio buffer size on the highest possible value.
Given 1 and 2, will the sound quality be better (given the higher amount of samples) compared to a very low audio buffer size (and thus lower amount of samples).

The simple, literal answer to your question is "no" -- the buffer size won't make any difference -- but... there are some complications.

Since you're asking about recording rather than performance, it matters how you are recording and which stage of recording is under consideration. The buffer size is irrelevant to "offline" rendering, but critical for performance. So if you follow a typical workflow of recording a performance to MIDI, making any corrections or changes to the MIDI, possibly making changes to the Pianoteq settings and/or adding other VST effects in a DAW, then rendering offline to an audio file, the considerations at each stage are different.

Performance: The buffer size determines the latency, which affects your ability to play well. Most people would want the latency (and hence the buffer size) to be as low as possible without generating audible faults. Since you're recording the MIDI and not the audio, the quality and latency of the audio are irrelevant to the recording -- but not to your ability to play. Use whatever buffer size makes it easiest to play your best, balancing latency against audio faults.

Mixing/mastering: When working in your DAW latency is not important, but you need to be able to hear what you're creating. There's no need to increase the buffer size if there are no glitches; but if there are, increasing it at this stage will help you judge what you're doing and won't affect anything in the final result.

Rendering: Unless you have external physical equipment processing the audio, you'll render offline. ASIO settings are irrelevant to this process, since it's all digital and doesn't use the sound card.

Re: ASIO settings and Piano sound quality

In my experience, there is a correlation between sample rate and buffer size for audio interfaces. With the same latency, higher sampling rates will automatically increase the minimum buffer you can set. So I like to use a higher internal sampling rate(96K) and have the DAC/audio interface work in alignment or integer multiples rates(192K).
Then I can get both high quality and low latency output.

Re: ASIO settings and Piano sound quality

A related question (perhaps someone from Modartt can give a definitive answer):

Do we know for a fact that during online (real-time) rendering, Pianoteq does not adjust the quality/complexity of its algorithm to compensate when the computer is over-taxed -- specifically, that setting a lower ASIO buffer size will never cause Pianoteq to decrease the quality of its sound generation to minimize buffer underflows?

Re: ASIO settings and Piano sound quality

Unlike sampled VSTs, PTQ is a completely native digital audio source, so the so-called sampling rate only applies to digital to analog conversion during output. But the method of converting to analogue audio signals ultimately affects the quality of the sound output, whether we end up listening with headphones or a monitor.
The 44.1/16 or 24-bit standard, which was introduced in the 1980s, was originally designed to accommodate CD storage. This restriction is long gone today. A DAC or audio interface, ranging from $200 to $2000, can perform very differently at high sampling rates. So thanks to Modartt, we have the option to have a higher internal output sampling rate, which in combination with better monitoring spks and audio interface, can achieve better sound quality.
But the buffer size does not correlate with sound quality.

------------------
In my understanding, if we use the image producing for example, PTQ is equivalent to a vector graphics software, we can choose the 1K, 2K or 4K resolution of the bitmap output, then the audio interface and stereo is equivalent to the monitor screen.
So that, for analog output of digital audio, a higher sampling rate means a smoother conversion.
Of course, we have to listen to Modartt's expert explanation of this.

Last edited by robinlb (11-04-2021 04:28)

Re: ASIO settings and Piano sound quality

Qexl wrote:

Hope that helps - to me, buffer size is not about "how short can I make my latency", at least with piano. (long time synth guy.. most of my life has been about very short latency times.. but with 'realism' and 'piano'.. a little latency is some strong medicine!)

I once tried to establish the most realistic buffer setting on my silent piano (Kawai K300 ATX3), comparing digital and acoustic output by recording them in parallel and comparing latency differences. This is of course going to depend a lot on specific hardware, but in my case, on an i5 laptop with focusrite scarlett 2i2 audio device @44kHz, buffer size 128 in Pianoteq overall seemed to fit the best.

The internal Kawai sound engine was a bit too fast as compared to the acoustic.

Such latency differences depend on hammer velocity. For very low velocities, playing pp, latencies on the acoustic are considerably longer than on the digital part. I didn't measure this exhaustively, but it would perhaps be nice to do so at some point.

Last edited by gabe (11-04-2021 13:47)

Re: ASIO settings and Piano sound quality

Cheers gabe - glad you found a good latency timing

This is insightful thinking..

gabe wrote:

Such latency differences depend on hammer velocity. For very low velocities, playing pp, latencies on the acoustic are considerably longer than on the digital part. I didn't measure this exhaustively, but it would perhaps be nice to do so at some point.

Yes, I'd definitely recommend anyone to trial/choose different latency for different keyboard actions for playing piano, also the types of music being played and even the different pianos in Pianoteq factor in.

For example, lower latency using the era pianos for baroque style playing helps low velocity range in a tactile way, vs. higher latency for 'concert grand' playing with perhaps generally more dynamic range and physicality.

Measuring somewhat scientifically would be an interesting exercise indeed! (not sure how with many of parameters and personal preferences. I tend to go with what feels right. But certainly would be very interested in any measures you make!

Great food for thought


[Edit to add]...


@robinlb,

I've been considering what to write about the sample rates as my opinions have evolved over the years - it really isn't straightforward - and kind of getting it all typed out seems like just so much text - but the video below sums up my ideals pretty well.. and I decided to also dump this text here as well, in case it contains anything interesting or useful.. addressed to generally anyone reading about or searching for ideas about sample rates.

Definitely agree!, with excellent hardware (good/expensive DAC converters) at higher sample rates, and esp. good earphones/speakers, it all can produce most excellent sound.

Also, certainly with higher sample rate, you can get lower buffer numbers (like 32) if that's valuable to workflow or enjoyment.

This is another informational video re bit depth, Nyquist theorem etc, which is worth challenging our intuition regarding higher res audio (before I go on about similar stuff like I've done here before, hoping the below is more nuanced and maybe even more logical than I've put it in the past)..

https://www.youtube.com/watch?v=hs1On87Ixe4

A lot of people may think doubling the sample rate means doubling the information or resolution (like twice the number of film frames), but doubling the sample rate does not double 'resolution' or generally improve decoding, particularly within human hearing range.. and many DAC routines in cheap sound cards might not do a great job of converting/handling it (esp. if source causes noisy intermodulation) either unless using great hardware (even then, a 48kHz file or even 44.1kHz file could sound identical and have no extra noise, esp. with multi-tracking).

YMMV - and just for Pianoteq in standalone mode (sending nothing much above 20kHz itself), higher rates can sound the same, or better than 44.1 or 48kHz (and some hardware, DAC routines, speakers and what they handle, all differ).

However certainly if using Pianoteq and/or other instrumentation in multiple track mixes in a DAW (and mixing in various extra things like shared FX send/return loops and percussion with high hats sizzling in the same reverb return etc.), higher sample rates can then really begin to require workarounds for compounding 'noise' from intermodulation issues, if fussy (audible distortion spikes or a whole floor in hearing range). Plugins with up-sampling is ideal (if you have for example an "HQ" button in a reverb plugin, chances are that plugin upsamples the 44kHz data with 'no noise above hearing range', processes, then sends back a clean downsampled signal, still better than if working entirely at 192kHz.. and so on - many other such things could be important if best audio is a goal.

That video above does a great job of outlining things. It's worth giving some time to it esp. when considering upgrading or trying to get the best audio possible (could save thousands). For an example, I was going to get external audio server to cope with working at 192kHz - but now, will instead stick with a normal PC, current OS and plugins with latest versions of my old plugins/DAWs, most have upsampled processing.. staying at 48kHz in the DAW is golden! Saves me nearly $10,000 and I'll have the same capability and quality output at 48kHz 24bit audio (which is the foreseeable required format for good online delivery services).

If I believed 192kHz was better for playing/recording/mastering, I'd have spent $10,000 more. But because I know my 48kHz at 24bit depth is ideal for playing/recording/mastering, I'm saving that sizable $ amount and losing nothing.

I believe genuinely the sweet spot for a good many years to come (playing/recording/playback) is 48kHz at 24bit (for many reasons), not just because most generic equipment handles it well or online services are standardising on it.

Never ruling out that some new sampling system (outside Nyquist's limits) might be a game-changer - but until then, I honestly can't recommend people spend more on a higher than 44.1kHz or 48kHz (for better DAW work esp. at 24bit resolution - I also don't use 32bit float fwiw) sample-rate audio setup for standalone Pianoteq and most DAW applications.

I've 'artistically' used intermodulation distortion in modern music - like 8bit glitch artists might use that old 'chipset' sound.. using higher sample rates to crank up intermodulation artefacts and amplify those in audible range, compounding it by 'bouncing' with 'incorrect' dither routines, then exporting to 24bit MP3 also 'incorrectly' dithered with particular types of dither routines.. the result is very "unnerving" or raw nerve-grating and practically irritating "tape-hiss" but with an electronic awfulness to it esp. coupled with specific 'related' low frequency bass notes which seem to increase the uneasiness of the sound, esp. the way speakers generate them with some difficulty I suppose too.. that's art for art's sake but it's using a phenomenon as a 'tool' and I suppose doing that artwork at the time was to help myself finally 'get rid' of the last vestige of my old, what I now consider, misconceptions about sample rates

Hope that's fun for someone to grok and not too repetitive or hideously man-splainy - just not easy to write this out in a better way.

Also - really would be happy to find I'm wrong about any of that too! Please don't feel it wrong to utterly destroy my thinking on that! I'd be grateful

Last edited by Qexl (11-04-2021 17:27)
Pianoteq Studio Bundle (Pro plus all instruments)  - Kawai MP11 digital piano - Yamaha HS8 monitors

Re: ASIO settings and Piano sound quality

The old sample rate argument is interesting, personally i like 96khz better than 44.1khz.
You can tell me I’m delusional but it just sounds better to me. Pianoteq does for sure.

If i had the money (which I dont) I definitely buy a 192khz rig.