|
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 > |