1

Topic: Pianoteq commandline WAV output - identical files?

Hi all,

Just wondering if rendering a MIDI with Pianoteq to WAV should always produce the same file?

Running the following in Linux, Ubuntu Studio 17.04 amd64. Pianoteq 6.0.1:

Pianoteq\ 6 --preset "Steinway B Cosmic" --bit-depth 32 --rate 48000 --midi mypiano.mid --wav ./output0.wav &
Pianoteq\ 6 --preset "Steinway B Cosmic" --bit-depth 32 --rate 48000 --midi mypiano.mid --wav ./output1.wav &
Pianoteq\ 6 --preset "Steinway B Cosmic" --bit-depth 32 --rate 48000 --midi mypiano.mid --wav ./output2.wav &
Pianoteq\ 6 --preset "Steinway B Cosmic" --bit-depth 32 --rate 48000 --midi mypiano.mid --wav ./output3.wav &
Pianoteq\ 6 --preset "Steinway B Cosmic" --bit-depth 32 --rate 48000 --midi mypiano.mid --wav ./output4.wav &
Pianoteq\ 6 --preset "Steinway B Cosmic" --bit-depth 32 --rate 48000 --midi mypiano.mid --wav ./output5.wav &

(Why six instances? Because I'm testing a Ryzen 1600X 6c/12t, seeing how Ryzen's SMT performs)

then doing:

md5sum /tmp/*.wav

c84b040e7d55e798d7211f3457fbc245  /tmp/output0.wav
71a605ee463e040084176bbb2e226b29  /tmp/output1.wav
33017432413fa39add96380f6b79a517  /tmp/output2.wav
33c2c09f6a4548fc0390cb642aa333a0  /tmp/output3.wav
2bf570449196f3105157e969bbf93207  /tmp/output4.wav
744b6da010d5ff3e5fbe8ecf1e7f7383  /tmp/output5.wav

Notice how all of the md5sums are different? They'll change with every run too, even when I'm not running 6 copies of Ptq at once.

I'm guessing the calculations are floating point and will vary slightly with each run, therefore producing different waveform data, and therefore a different md5 sum.

Just checking.

Thanks smile

2

Re: Pianoteq commandline WAV output - identical files?

I generated two files using your setup and that preset and indeed got differences (with the Unix diff command under OSX). Then I noticed the length of the two files were very different, so I removed all effects that can stretch the tail of the recording and got identical length but still differences. I had also taken away the slight humanization of the key release noise, any randomness is of course a probable cause.

Finally I tried subtracting the two wav files, and there are indeed very small (max -60 to -40 dB) differences left, and those seem to happen more frequently towards the end of my test, so I guess there is some slight temporal variation between file generation. This is of course quite inaudible, and could be the result of some randomization process in the engine that we do not have access to, or the accumulation of small rounding errors...

Last edited by Gilles (24-09-2017 14:47)

3

Re: Pianoteq commandline WAV output - identical files?

Thanks very much for your deeper analysis Gilles. Yes I forgot to mention that my files were all the same length. I had tried other presets at other times and got different md5s as well. I didn't think of subtracting the files, I'll try that so I can listen to exactly what the differences are. Very interesting!

I suppose it doesn't matter if the files are different.. I guess it's an expectation in general that repeating a test with identical conditions should produce the same output.

4

Re: Pianoteq commandline WAV output - identical files?

Seems worrisome. Do you hear a difference in the recordings? Is one better, or does it sound substantially different?

5

Re: Pianoteq commandline WAV output - identical files?

lem18 wrote:

I guess it's an expectation in general that repeating a test with identical conditions should produce the same output.

If you repeatedly use the same file as input to a program that uses the same randomizing algorithm every time it is invoked, won't it produce a different output each time? smile

Last edited by Stephen_Doonan (24-09-2017 22:35)

6

Re: Pianoteq commandline WAV output - identical files?

Jake Johnson wrote:

Seems worrisome. Do you hear a difference in the recordings? Is one better, or does it sound substantially different?

I listened to a few and they seemed to sound the same, but I wasn't listening extremely closely. I'll check them later today, and I'll try Gilles' suggestion of subtracting the files (if I recall correctly .. open up the two files in something like Audacity, invert one of them, then mix them. The result should be the differences between them?).

After reading what Gilles said, it does make sense that there's likely heaps of things in the modelling that results in slightly different sound each time (subtle humanisation/randomisation), and while should sound basically the same each time, will always produce different binary data.

edit: Stephen, yep .. makes sense smile  Interesting how we have expectations..

Last edited by lem18 (24-09-2017 22:42)