|
From: Holger M. <ho...@ma...> - 2014-06-27 12:57:24
|
On Fri, 27 Jun 2014, Christian Schoenebeck wrote:
> seq_* opcodes seems to define "round robin" selection for regions in the SFZ
> format. I just had a short look at current SFZ code, and as far as I could see
> it right now, round robin selection in the SFZ engine could indeed be buggy.
>
> bool Region::OnKey(const Query& q) [src/engines/sfz/sfz.cpp]
>
> is called by the SFZ engine on each region, when a new note was triggered, to
> check which region shall be used and played. However that method ATM assumes
> to be called only once and due to this increments the round robin counter at
> the end of its call. The SFZ engine however calls this in a while loop:
>
> while (::sfz::Region* region = q.next()) {
> [src/engines/sfz/Engine.cpp, line 110]
>
> which seems to cause the misbehavior you encountered. That is, that it falsely
> also triggers the 2nd region you have there at the same time.
I made a soundfont with 2 different (in frequency) samples, so I could
hear if both samples are played together instead alternating. It didn't
happen. They were never played together. So this bug candidate doesn't
seem to be one.
I investigated the sound font some more. The clicking sample was
different compared to the others: it lacked loop information in the
wav-header. Since there wasn't any loop_start/loop_end in the sfz-file
linuxsampler probably used the defaults 0/0. Could be a reason for the
occasional klicks.
Another "bug" in the soundfont could be the release sound:
ampeg_decay=37
loop_mode=one_shot
trigger=release
One_shot mode together with a very long decay could possibly lead to
voice-stealing, another possible source of occasional klicks.
TL;DR
-----
After fixing the soundfont I have now much better results.
|