|
From: Vladimir S. <ha...@so...> - 2004-02-08 18:51:33
Attachments:
voice_stealing.gz
|
Hi Everybody, I've been thinking about note stealing or as i'd like to call it "voice stealing". So far the following comes to mind: 1) When number of voices reaches max there will not be any time to release them, so we have to start releasing them earlier. I'm 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. 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 b) if that didn't yeld any results, go thru all keys and try same c) if that didn't work either, try same as above but be more aggressive i.e. free the last voice as well. What do you guys think? Any better ideas? I've been playing around with it and it seems to work OK. With max voices set to 64 i've set the threshold to 48 and it seems to take care of most situations. Depending on how long the release phase is, it may need to be set to something lower (or max voices will have to be increased). At some point we could add a clever algorithm to calculate the threshold automatically based on how long the release phase is (average release time for all samples?) I'm including a patch against latest CVS. This patch also includes some command line and EG changes. Christian will likely review those (but not the voice stealing part) next weekend and it might make it in some shape of form into the CVS, so please give it some testing also, if you have time. If you have trouble with voice stealing and just want to play around with the EG you can turn off voice stealing by setting AUDIO_VOICES_THRESHOLD to be same as MAX_AUDIO_VOICES in audiothread.h. Regards, Vladimir. |
|
From: Marek P. <ma...@na...> - 2004-02-08 22:38:42
|
Hi Vladimir & all, just wanted to ask, is there any reason why linuxsampler can't have just one voice per note? For example suppose i've got a huge lib loaded with long samples that need to be streamed from disk, currently AFAIK if i press a note and then press the same note again, i end up with 2 streams. But if you imagine an instrument such as a piano, a hammer which hits a string at a given time is going to completely dampen the previous string resonance at that time while causing a new resonance. That seems like dismissing the old stream completely at the time i hit a note and starting a new one hence you end up with a nice 1 voice per note optimisation. Perhaps i'm wrong, just my imagination... Marek On Sun, 2004-02-08 at 19:50, Vladimir Senkov wrote: > Hi Everybody, > > I've been thinking about note stealing or as i'd like to call it "voice > stealing". > So far the following comes to mind: > 1) When number of voices reaches max there will not be any time to > release them, so we have to start releasing them earlier. I'm > 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. > 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 > b) if that didn't yeld any results, go thru all keys and try same > c) if that didn't work either, try same as above but be more aggressive > i.e. free the last voice as well. > > What do you guys think? Any better ideas? > I've been playing around with it and it seems to work OK. With max > voices set to 64 i've set the threshold to 48 and it seems to take care > of most situations. Depending on how long the release phase is, it may > need to be set to something lower (or max voices will have to be > increased). At some point we could add a clever algorithm to calculate > the threshold automatically based on how long the release phase is > (average release time for all samples?) > > I'm including a patch against latest CVS. This patch also includes some > command line and EG changes. Christian will likely review those (but not > the voice stealing part) next weekend and it might make it in some shape > of form into the CVS, so please give it some testing also, if you have > time. If you have trouble with voice stealing and just want to play > around with the EG you can turn off voice stealing by setting > AUDIO_VOICES_THRESHOLD to be same as MAX_AUDIO_VOICES in audiothread.h. > > Regards, > Vladimir. > |
|
From: Peter E. R. <pet...@de...> - 2004-02-08 22:45:25
|
In any case the sustain pedal should bypass such an optimization ;-) I have read that GigaStudio has such an approach, but only when the velocity of the second note is louder than the first, thus assuming it will mask the disappearance of the first note. Otherwise, with some instrument, it may give a weird ending to the first note. Peter Roos -----Original Message----- From: lin...@li... [mailto:lin...@li...] On Behalf Of Marek Peteraj Sent: Monday, February 09, 2004 1:43 To: lin...@li... Subject: Re: [Linuxsampler-devel] voice stealing Hi Vladimir & all, just wanted to ask, is there any reason why linuxsampler can't have just one voice per note? For example suppose i've got a huge lib loaded with long samples that need to be streamed from disk, currently AFAIK if i press a note and then press the same note again, i end up with 2 streams. But if you imagine an instrument such as a piano, a hammer which hits a string at a given time is going to completely dampen the previous string resonance at that time while causing a new resonance. That seems like dismissing the old stream completely at the time i hit a note and starting a new one hence you end up with a nice 1 voice per note optimisation. Perhaps i'm wrong, just my imagination... Marek On Sun, 2004-02-08 at 19:50, Vladimir Senkov wrote: > Hi Everybody, > > I've been thinking about note stealing or as i'd like to call it "voice > stealing". > So far the following comes to mind: > 1) When number of voices reaches max there will not be any time to > release them, so we have to start releasing them earlier. I'm > 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. > 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 > b) if that didn't yeld any results, go thru all keys and try same > c) if that didn't work either, try same as above but be more aggressive > i.e. free the last voice as well. > > What do you guys think? Any better ideas? > I've been playing around with it and it seems to work OK. With max > voices set to 64 i've set the threshold to 48 and it seems to take care > of most situations. Depending on how long the release phase is, it may > need to be set to something lower (or max voices will have to be > increased). At some point we could add a clever algorithm to calculate > the threshold automatically based on how long the release phase is > (average release time for all samples?) > > I'm including a patch against latest CVS. This patch also includes some > command line and EG changes. Christian will likely review those (but not > the voice stealing part) next weekend and it might make it in some shape > of form into the CVS, so please give it some testing also, if you have > time. If you have trouble with voice stealing and just want to play > around with the EG you can turn off voice stealing by setting > AUDIO_VOICES_THRESHOLD to be same as MAX_AUDIO_VOICES in audiothread.h. > > Regards, > Vladimir. > ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linuxsampler-devel mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel |
|
From: Marek P. <ma...@na...> - 2004-02-08 22:58:02
|
On Sun, 2004-02-08 at 23:45, Peter E. Roos wrote: > In any case the sustain pedal should bypass such an optimization ;-) Not if you're hitting the same note twice. There's no bypass happening on that note in any case, whether pedal down or not. > > I have read that GigaStudio has such an approach, but only when the > velocity of the second note is louder than the first, That might be an idea, suppose that the energy of the resonance which has been dampened somehow carries over the next resonance thus it makes the note sound louder. Still talking about the piano though, well i'm not a physicist but anyway... :) > thus assuming it > will mask the disappearance of the first note. Which instrument would need more than one voice per note? Marek > Otherwise, with some > instrument, it may give a weird ending to the first note. > > Peter Roos > > -----Original Message----- > From: lin...@li... > [mailto:lin...@li...] On Behalf Of > Marek Peteraj > Sent: Monday, February 09, 2004 1:43 > To: lin...@li... > Subject: Re: [Linuxsampler-devel] voice stealing > > > Hi Vladimir & all, > > just wanted to ask, is there any reason why linuxsampler can't have just > one voice per note? For example suppose i've got a huge lib loaded with > long samples that need to be streamed from disk, currently AFAIK if i > press a note and then press the same note again, i end up with 2 > streams. But if you imagine an instrument such as a piano, a hammer > which hits a string at a given time is going to completely dampen the > previous string resonance at that time while causing a new resonance. > That seems like dismissing the old stream completely at the time i hit a > note and starting a new one hence you end up with a nice 1 voice per > note optimisation. Perhaps i'm wrong, just my imagination... > > Marek > > On Sun, 2004-02-08 at 19:50, Vladimir Senkov wrote: > > Hi Everybody, > > > > I've been thinking about note stealing or as i'd like to call it > "voice > > stealing". > > So far the following comes to mind: > > 1) When number of voices reaches max there will not be any time to > > release them, so we have to start releasing them earlier. I'm > > 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. > > 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 > > b) if that didn't yeld any results, go thru all keys and try same > > c) if that didn't work either, try same as above but be more > aggressive > > i.e. free the last voice as well. > > > > What do you guys think? Any better ideas? > > I've been playing around with it and it seems to work OK. With max > > voices set to 64 i've set the threshold to 48 and it seems to take > care > > of most situations. Depending on how long the release phase is, it may > > > need to be set to something lower (or max voices will have to be > > increased). At some point we could add a clever algorithm to calculate > > > the threshold automatically based on how long the release phase is > > (average release time for all samples?) > > > > I'm including a patch against latest CVS. This patch also includes > some > > command line and EG changes. Christian will likely review those (but > not > > the voice stealing part) next weekend and it might make it in some > shape > > of form into the CVS, so please give it some testing also, if you have > > > time. If you have trouble with voice stealing and just want to play > > around with the EG you can turn off voice stealing by setting > > AUDIO_VOICES_THRESHOLD to be same as MAX_AUDIO_VOICES in > audiothread.h. > > > > Regards, > > Vladimir. > > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Linuxsampler-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Linuxsampler-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > |
|
From: Peter E. R. <pet...@de...> - 2004-02-08 23:05:17
|
Hi Marek, If you play a loud piano note with the sustain pedal down, and then a soft note, the loud note will have to continue ringing, the second softer note should not chop off this louder note. Another important example is: with non-looped sounds, people often use the sustain pedal and hit the note again, as a trick to make the note longer (short doubling), before the first note reaches its normal end. I know this is about note/voice stealing, when we are running out of available voices. So this may be a non-issue. But just to mention some typical effects/tricks that people use with samplers. Regards, Peter Roos -----Original Message----- From: Marek Peteraj [mailto:ma...@na...] Sent: Monday, February 09, 2004 2:02 To: pet...@de... Cc: lin...@li... Subject: RE: [Linuxsampler-devel] voice stealing On Sun, 2004-02-08 at 23:45, Peter E. Roos wrote: > In any case the sustain pedal should bypass such an optimization ;-) Not if you're hitting the same note twice. There's no bypass happening on that note in any case, whether pedal down or not. > > I have read that GigaStudio has such an approach, but only when the > velocity of the second note is louder than the first, That might be an idea, suppose that the energy of the resonance which has been dampened somehow carries over the next resonance thus it makes the note sound louder. Still talking about the piano though, well i'm not a physicist but anyway... :) > thus assuming it > will mask the disappearance of the first note. Which instrument would need more than one voice per note? Marek > Otherwise, with some > instrument, it may give a weird ending to the first note. > > Peter Roos > > -----Original Message----- > From: lin...@li... > [mailto:lin...@li...] On Behalf Of > Marek Peteraj > Sent: Monday, February 09, 2004 1:43 > To: lin...@li... > Subject: Re: [Linuxsampler-devel] voice stealing > > > Hi Vladimir & all, > > just wanted to ask, is there any reason why linuxsampler can't have just > one voice per note? For example suppose i've got a huge lib loaded with > long samples that need to be streamed from disk, currently AFAIK if i > press a note and then press the same note again, i end up with 2 > streams. But if you imagine an instrument such as a piano, a hammer > which hits a string at a given time is going to completely dampen the > previous string resonance at that time while causing a new resonance. > That seems like dismissing the old stream completely at the time i hit a > note and starting a new one hence you end up with a nice 1 voice per > note optimisation. Perhaps i'm wrong, just my imagination... > > Marek > > On Sun, 2004-02-08 at 19:50, Vladimir Senkov wrote: > > Hi Everybody, > > > > I've been thinking about note stealing or as i'd like to call it > "voice > > stealing". > > So far the following comes to mind: > > 1) When number of voices reaches max there will not be any time to > > release them, so we have to start releasing them earlier. I'm > > 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. > > 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 > > b) if that didn't yeld any results, go thru all keys and try same > > c) if that didn't work either, try same as above but be more > aggressive > > i.e. free the last voice as well. > > > > What do you guys think? Any better ideas? > > I've been playing around with it and it seems to work OK. With max > > voices set to 64 i've set the threshold to 48 and it seems to take > care > > of most situations. Depending on how long the release phase is, it may > > > need to be set to something lower (or max voices will have to be > > increased). At some point we could add a clever algorithm to calculate > > > the threshold automatically based on how long the release phase is > > (average release time for all samples?) > > > > I'm including a patch against latest CVS. This patch also includes > some > > command line and EG changes. Christian will likely review those (but > not > > the voice stealing part) next weekend and it might make it in some > shape > > of form into the CVS, so please give it some testing also, if you have > > > time. If you have trouble with voice stealing and just want to play > > around with the EG you can turn off voice stealing by setting > > AUDIO_VOICES_THRESHOLD to be same as MAX_AUDIO_VOICES in > audiothread.h. > > > > Regards, > > Vladimir. > > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Linuxsampler-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Linuxsampler-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > |
|
From: Marek P. <ma...@na...> - 2004-02-08 23:17:18
|
Hi Peter, On Mon, 2004-02-09 at 00:05, Peter E. Roos wrote: > Hi Marek, > > If you play a loud piano note with the sustain pedal down, and then a > soft note, the loud note will have to continue ringing, the second > softer note should not chop off this louder note. But there's still dampening happening if you hit a note twice, perhaps it's not going to dampen that note entirely if you hit a loud note and a soft note afterwards, but it's still happening, it seems to me that it's more the energy making the second note a bit louder. Take an arbitrary string instrument, a guitar, violin, viola, cello, harp - seems to me that they fit the 1 voice per note model. Marek > > Another important example is: with non-looped sounds, people often use > the sustain pedal and hit the note again, as a trick to make the note > longer (short doubling), before the first note reaches its normal end. > > I know this is about note/voice stealing, when we are running out of > available voices. So this may be a non-issue. But just to mention some > typical effects/tricks that people use with samplers. > > Regards, > > Peter Roos > > -----Original Message----- > From: Marek Peteraj [mailto:ma...@na...] > Sent: Monday, February 09, 2004 2:02 > To: pet...@de... > Cc: lin...@li... > Subject: RE: [Linuxsampler-devel] voice stealing > > > On Sun, 2004-02-08 at 23:45, Peter E. Roos wrote: > > In any case the sustain pedal should bypass such an optimization ;-) > > Not if you're hitting the same note twice. There's no bypass happening > on that note in any case, whether pedal down or not. > > > > > I have read that GigaStudio has such an approach, but only when the > > velocity of the second note is louder than the first, > > That might be an idea, suppose that the energy of the resonance which > has been dampened somehow carries over the next resonance thus it makes > the note sound louder. Still talking about the piano though, > well i'm not a physicist but anyway... :) > > > thus assuming it > > will mask the disappearance of the first note. > > Which instrument would need more than one voice per note? > > Marek > > > Otherwise, with some > > instrument, it may give a weird ending to the first note. > > > > Peter Roos > > > > -----Original Message----- > > From: lin...@li... > > [mailto:lin...@li...] On Behalf Of > > Marek Peteraj > > Sent: Monday, February 09, 2004 1:43 > > To: lin...@li... > > Subject: Re: [Linuxsampler-devel] voice stealing > > > > > > Hi Vladimir & all, > > > > just wanted to ask, is there any reason why linuxsampler can't have > just > > one voice per note? For example suppose i've got a huge lib loaded > with > > long samples that need to be streamed from disk, currently AFAIK if i > > press a note and then press the same note again, i end up with 2 > > streams. But if you imagine an instrument such as a piano, a hammer > > which hits a string at a given time is going to completely dampen the > > previous string resonance at that time while causing a new resonance. > > That seems like dismissing the old stream completely at the time i hit > a > > note and starting a new one hence you end up with a nice 1 voice per > > note optimisation. Perhaps i'm wrong, just my imagination... > > > > Marek > > > > On Sun, 2004-02-08 at 19:50, Vladimir Senkov wrote: > > > Hi Everybody, > > > > > > I've been thinking about note stealing or as i'd like to call it > > "voice > > > stealing". > > > So far the following comes to mind: > > > 1) When number of voices reaches max there will not be any time to > > > release them, so we have to start releasing them earlier. I'm > > > 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. > > > 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 > > > b) if that didn't yeld any results, go thru all keys and try same > > > c) if that didn't work either, try same as above but be more > > aggressive > > > i.e. free the last voice as well. > > > > > > What do you guys think? Any better ideas? > > > I've been playing around with it and it seems to work OK. With max > > > voices set to 64 i've set the threshold to 48 and it seems to take > > care > > > of most situations. Depending on how long the release phase is, it > may > > > > > need to be set to something lower (or max voices will have to be > > > increased). At some point we could add a clever algorithm to > calculate > > > > > the threshold automatically based on how long the release phase is > > > (average release time for all samples?) > > > > > > I'm including a patch against latest CVS. This patch also includes > > some > > > command line and EG changes. Christian will likely review those (but > > not > > > the voice stealing part) next weekend and it might make it in some > > shape > > > of form into the CVS, so please give it some testing also, if you > have > > > > > time. If you have trouble with voice stealing and just want to play > > > around with the EG you can turn off voice stealing by setting > > > AUDIO_VOICES_THRESHOLD to be same as MAX_AUDIO_VOICES in > > audiothread.h. > > > > > > Regards, > > > Vladimir. > > > > > > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Linuxsampler-devel mailing list > > Lin...@li... > > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > > > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Linuxsampler-devel mailing list > > Lin...@li... > > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Linuxsampler-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel > |
|
From: Christian S. <chr...@ep...> - 2004-02-11 19:14:37
|
Es geschah am Sonntag, 8. Februar 2004 19:50 als Vladimir Senkov schrieb: > Hi Everybody, > > I've been thinking about note stealing or as i'd like to call it "voice > stealing". > So far the following comes to mind: > 1) When number of voices reaches max there will not be any time to > release them, so we have to start releasing them earlier. I'm > 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. > 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. 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. Doubts? Other suggestions? CU Christian |
|
From: Mark K. <mar...@co...> - 2004-02-11 20:16:43
|
On Wed, 2004-02-11 at 12:13, Christian Schoenebeck wrote: > No, you can't simply release all voices on a key. I agree with this. > > 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. > > 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) I wonder if the concept of the SelfMask bit could be extended in some way to LS overall, as a command line option, or later on a gig by gig option in the GUI? I'm thinking I'd like the option to never have more than 1 piano note being played on middle C even if the normal operation of the gig file doesn't work that way. (And most of mine do not.) Just an idea. It might make a good tool to study how the actual audio is changed, or it could help a lot if one MIDI track was using a lot of voices and not allowing other gigs to get their fair share. > > 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. > > Doubts? Other suggestions? > Only that, in the spirit of pressing forward, we need to consider how this will work when we get the ability to use multiple gigs at the same time. If I have 8-12 gigs loaded (typical of my use of GSt) then how many voices can be used by each gig? I'd like some control that says the piano always gets a minimum 20 voices should it need them, the horns always get 3 voices, a synth pad get 6, etc. This sort of control could go a long way toward LS doing what the user wants instead of what it thinks is the best, and masking could take over only when one gig is using more than the allocated voice count more intelligently. GSt offers nothing like this. Just a thought. Thanks, Mark |
|
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. |