Languages

Breadcrumb

Transposing instrument playback incorrect pitches on

Comiple MuseScore 3.2.2 release on Raspberry Pi 4 running Raspbian Buster in qtcreator debug mode. I'm discovering that transpoing instruments are off...listen to this audio of concert C chromatic scale, first on piano correctly, then on alto sax with some incorrect pitches, then on tenor which is always off.

That would be a code refactor I'd support.
Here in dayjob having unspecified containers flags errors and all types need to have their bitsize included (so int32_t is required instead of int etc (going by 32-bit platforms)). Helps the portability if you still have to mix 16 and 32-bit processors..

there are so many compiler warnings that it would be too hard to search. I'm looking at transpose.cpp for anything suspicious...the only use of char here I see is for legitimate letters for note names. And I only see "int" but no int16 or something like it...but I'll keep searching.

So I'm begining to think the problem doesn't lie with score processing, but rather with sound production. Because I'm noticing that the F# in alto sax sounds somewhere between it's G# and A...almost a quarter step between. So I'm going to look at synthesizer code now...

the problem seems very much with the synthesizer. I've been comparing my x86_64 computer and RPi4 computer side by side and watching carefully the values changes. It seems for the problematic notes, the actual midi events seem correct...however the fluid synthesizer Voice::write function is indicating that for D#5 in Alto sax, while Voice's pitch value is correct at 6600, however root_pitch is different...the correct x86-64 computer has it as 6708 (542.73 Hz) while the incorrect RPi4 has it as 6452 (468 Hz). In other notes that sound correctly on the RPi, the value of root_pitch would be the same as on the x86_64 computer. So I'm going to check where that root_pitch gets set...