|
From: Vladimir S. <ha...@so...> - 2004-02-11 22:09:48
|
Hi, >> introducing AUDIO_VOICES_THRESHOLD. It should be set to be a certain >> percentage of MAX_AUDIO_VOICES depending on how long the release phase >> is. If it's set to the same value as MAX_AUDIO_VOICES or higher, then >> voice stealing will be disabled. >I don't think that's a good idea. We would waste a big amount of voices. Agreed, but it takes time to release a voice and if we make a decision to do so at the time when we need another (new voice) we'll not be able to get a new voice unless there was some sort of reserve left. The reserve will then have to be at least as large as the largest accord you can take (10 for piano?!). That's if we are single instrument only. >> 2) When number of voices reaches the threshold and a new key is >> pressed, ls will try the following: >> a) locate voices on that same key and release all but the last one of >> them >No, you can't simply release all voices on a key. >In case of .gig files there is flag called "SelfMask". If this flag is set and >a key is triggered while there's still a voice active on that specific key >and if the new voice is louder than the old one, then the old voice should be >released. In case of this flag this should always be done, not only if the >amount of free voices is low. That's cool. I didn't know about this flag. This could work for some cases. I could try to code that and see how that works. But as far as I understand we still need a reserve of voices to be able to release them (if that's going to be real release). >If SelfMask is not set, I think we'll better use the whole amount of voices >instead of your suggested threshold and if we then come into voice shorteness >we could: > a) either pick the oldest voice (on that key / channel wide) or > b) pick the most silent voice (on that key / channel wide) > >and then without going into a release stage just take over this voice object >and make a crossfade from the old to the new sample stream. That would be >more friendly regarding polyphony and avoids click sounds. That's an interesting idea. I'm sure we can come up with good ways on how to pick a voice (maybe even make that configurable as Mark suggests) but I'm not sure how crossfading will help. As far as I understand crossfading, it involves a time interval and during that time interval we'll have to have both old and new voices "alive". So that's similar to playing old voice in release and playing new voice in attack then and we'll have to have reserves again. On the other hand, if we don't want the reserves and don't want the time interval we could get the level from old voice and set it as preattack for the new one and get rid of the old one without any time interval. IF the level of the old voice was close to 0 that would actually sound OK. But as the level of the old voice grows it will sound terrible as attack stage of the new voice gets smaller and smaller and eventually disappears. Could we then take a % of the old level then? If that % is not large enough we will get clicks. If it's too big we'll get no attack on new voice. I don't think this will work. How is all this going to change when we actually play the release samples? It will probably be best if we consider that now as well. Regards, Vladimir. |