Transposing instrument playback incorrect pitches on

• Jul 4, 2019 - 18:56

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.

Attachment Size
saved-on-RPi4.ogg 284.91 KB
chromatic-scale-transposing.mscz 11.62 KB

Comments

I guess I should have posted in technology preview...but let me say this is a feature request to get transposing instruments working correctly on arm cpus.

My guess is this has to do with the requirement that "signed char" must be explicit.

In reply to by Jojo-Schmitz

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..

My first suspicion would be some signed vs. unsigned char issue or an 16bit int where others have 32bit ints.
Any compiler warnings to that effect?

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...

In reply to by ericfontainejazz

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...

In reply to by ericfontainejazz

root_pitch gets set in voice.cpp line 986 in Voice::update_param():

root_pitch = sample->origpitch * 100.0f - sample->pitchadj;

I'm noticing that sample->pitchadj is different on each computer...the incorrect RPi4 has it as 248, while x86 has it as -8.

Considering that 248 minus 256 equals -8, that seems to suggest the source of our problem...clearly a char issue.

Do you still have an unanswered question? Please log in first to post your question.