Closed chipweinberger closed 2 weeks ago
Hi 😊
Let me confirm a few things.
TimGM6mb.sf2
?Yes. Dart port.
soundfont: akai_steinway.sf2 (https://musical-artifacts.com/artifacts/1876)
maximumPolyphony: 192
midi file
Thanks for your help @sinshu :)
I counted the notes, and it is only about ~50 notes before artifact. So maybe not maximum polyphony.
But I noticed it happens when:
I haven't pinpointed the cause yet, but I remember dealing with a similar issue in the past. https://github.com/sinshu/meltysynth/issues/20
It seems that the commit for the C# version hasn't been brought into the Dart version. https://github.com/sinshu/meltysynth/commit/a8fcf2fc86b73da114b8acf106650ca047afccf3
It might help to port this commit to Dart. Could you please give it a try?
yes this sounds like the exact same issue!
I will port it!!
what should I do if "low" is null? for if (voice.voiceLength() > low.voiceLength()) {
I think it should be if (low == null || voice.voiceLength() > low.voiceLength()) {
dart commit: https://github.com/chipweinberger/dart_melty_soundfont/commit/cf7792cfa8a53bc5336c614f06e82b3b4c7f3c04
I will test it later today.
thanks for your help so much.
yes. this changed fixed it!
@chipweinberger Glad to hear it got resolved 😁
Regarding the issue where low
might become null
:
low
will not be null
if priority < lowestPriority
occurs even once.lowestPriority
is maxFinite
.low
to remain null
while entering the path where priority == lowestPriority
, voice.priority()
must be maxFinite
.voice.priority()
will never return such a large value.Thus, low
will never be null
. In fact, there has never been a null pointer issue in this code path.
https://github.com/sinshu/meltysynth/assets/1863934/187e63cd-7b65-4b17-91bf-7cf15c8f91b9
Hey @sinshu , hello again :)
At 00:11 & 00:24 in the video, you can hear weird artifacts.I think it is due to maximum polyphony. But it still sounds not as expected.
I am playing the same note many times, and the first notes should note be loud anymore. Why is the artifact so large?