Topic: Mystery solved!
When you have eliminated the impossible, whatever remains,
however improbable, must be the truth.
Sherlock Holmes
It has been a while since my last post in https://www.forum-pianoteq.com/viewtopic.php?id=6849 .
Somehow this topic is closed so I will post my final post in this new topic, hoping it will serve somebody when encountering the same strange problems as i did.
To summarize the previous topic, I encountered strange latencies.
Sometimes a chord was delayed, sometimes a single note, sometimes I could play for hours without any issues.
After months of trying I could not find the answer so I was ready to sell my license.
But as soon as I posted that my license was for sale, this helpful community reached out with numerous ideas to fix my problems. This made me realize it was worth an other try. You can read the whole story in the post mentioned before.
One important clue was that when running on windows my cpu frequency was at max when selecting the "performance" powersetting. I was running Pianoteq on Linux and my cpu never kept running at max, it was just spiking to max sometimes.
The fix for this problem came from Groovy: cpupower set --perf-bias 0.
Now i had my cpu running at max and Pianoteq was running with real-time priorities, but still the problems keep bugging me.
Tired off trying i decided to go for a quick solution and see how to fix my Pianoteq problems later. I friend of mine was very happy with his Ipad and Ravenscroft piano,
so i decided to try this on a Ipod. The setup on the Ipod was tested extensively in combination with his Nord Stage. I took the Ipod home and connected it to my Numa Compact2. After just a little while i was shocked to hear exactly the same delays that i heard with Pianoteq. Now things got really interesting...
The only thing from my setup that hasn't been replaced is the piano.
But...I replayed the midi files that I recorded with this piano and they were fine. Also, there were no problems to be found in the Pianoteq midi events screen too.
I decided to run a midi monitor(Streambyter) on the Ipod and see if i could find any anomalies.
After a while i encountered my usual delays and started to browse the received midi data. Suddenly something caught my eye:
Ch:01 Note On A1 Vel:081
23:13:45:080Ch:01 Note On E3 Vel:079
23:13:45:080Ch:01 Note On A2 Vel:070
23:13:45:080
Whats this? Midi is a sequential protocol (note after note)...
Notes should never arrive at exactly the same time. Even if this was correct,
I'm not a pro... my timing isn't that good... I will never be able to play 3 notes, with 2 hands, at exactly the same time.
But why didn't I saw this with the Pianoteq midi viewer?
It seems that Pianoteq is showing the midi time-stamp, but Streambyter is showing the system-receive time-stamp. Why does this makes a difference?
Well, my recordings played back fine, so the midi time-stamp is correct.
But, when playing live, the timing is wrong. So the events were sent with the right
midi time-stamp, but at the wrong time! This is called midi-jitter.
Fortunately I have a Emu Longboard lying around, so i connected this to the Ipod and started testing... No matter how hard I tried, I could not make it fail.
I confronted Studiologic (Fatar) with this behavior and after a few days i got a reply,
in short: "All our instruments are tested extensively and we never encountered problems like the one you mention, also no other customers complaint about this"
Off course I wasn't satisfied with this answer and after a few mails back and forward I received a email containing this line:
Please let me know if you find the same jitter with any sound selected, as (for instance) the Organ sounds are based on an additional DSP modeling, very demanding (time wise).
Eureka! My preset that I always used was made of a layer with a pad and a 888 organ. I use a Korg Nanocontrol to select which layer should be active, the pad, the organ, Pianoteq, or a combination of the sounds.
I started playing and as soon as the jitter occurred i changed the organ to a Piano (sampled). Within 10 minutes the jitter was gone. I selected the organ again and low and behold... the jitter came back. I repeated my previous steps and was able to reproduce the results time after time...
So... the Numa Compact has a cpu that is in fact not fitted for the job.
At least if you want to use it to play an organ and use midi at the same time.
For now I removed the organ from my preset and everything seems to run stable.
I tested the modified preset with both Pianoteq and the Ravenscroft piano on the Ipod.
Where does this leaves me?
The Ipod performs very well, so this is a nice addition to my setup.
There are a number of organ apps for Ios so I'll use one of those instead of the
888 from the Numa Compact.
Thanks for all efforts to help me out!