[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [iiwusynth-devel] polyphony woes
From: |
M. Nentwig |
Subject: |
Re: [iiwusynth-devel] polyphony woes |
Date: |
Wed, 18 Dec 2002 16:20:48 +0200 |
OK, the current scheme does not put a very high priority on voice 'age'.
The note-ID difference is scaled by 1, but the amplitude envelope is
scaled by 1000. We could increase that factor (see the code at the end
of the mail).
The scenario I had in mind is that a non-decaying sound (for example
organ or synth pad) is held over a very long time - say the length of a
chorus. As long as its amp envelope is high, the current scheme will
kill a quieter, newer note instead.
It may be possible, that there is not one single compromise that
satisfies all demands. We could introduce more sophisticated polyphony
management (to start with, the option to set a guaranteed number of
voices per channel).
-Markus
> -----Original Message-----
> From: ext Tim Goetze [mailto:address@hidden
> Sent: 18 December 2002 16:07
> To: M. Nentwig
> Cc: address@hidden
> Subject: Re: [iiwusynth-devel] polyphony woes
>
>
> M. Nentwig wrote:
>
> >That was probably me. What's the problem?
>
> even if i set polyphony to ten voices, it's not killing
> the right notes when i play two- or threefold polyphony
> manually, ie. it seems to kill newer notes, too.
>
> i haven't looked at the new code in detail, just saw it
> has been changed.
>
> >> somebody has been messing with the voice killing algorithm
> >> since i sent my patch, and it's broken in current cvs.
>
> tim
>
Here is the code in question, from iiwu_voice.c:
/* We are not enthusiastic about releasing voices, which have just been
started.
* Otherwise hitting a chord may result in killing notes belonging
to that very same
* chord.
* So subtract the age of the voice from the priority - an older
voice is just a little
* bit less important than a younger voice.
* This is a number between roughly 0 and 100.*/
this_voice_prio-=(synth->noteid-iiwu_voice_query_ID(voice));