|
From: Vladimir S. <ha...@so...> - 2004-01-12 06:56:08
|
Christian,
I've looked a bit more into this problem.
I think the root cause is in AudioThread::ProcessControlChange()
In particular, hSustainPtr can be set for a key that is still pressed.
In then becomes impossible for ProcessNoteOff() to do the right thing . . .
I tried to put these lines in AudioThread::ProcessControlChange():
SustainedKeyPool->free(pMIDIKeyInfo[*key].pSustainPoolNode);
pMIDIKeyInfo[*key].pSustainPoolNode = NULL;
pMIDIKeyInfo[*key].Sustained = false;
pMIDIKeyInfo[*key].hSustainPtr = NULL;
into the if statement just above:
if (!pMIDIKeyInfo[*key].KeyPressed) { // release the voices on the key,
if the key is not pressed anymore
so that it will not be done for keys that are still pressed.
I gave it a very quick test and it looks like it's working correctly.
Regards,
Vladimir.
PS: above is written at 2am in the morning under pressure to shut PC
down immediately therefore it can't be trusted :)
Vladimir Senkov wrote:
> Christian,
>
> Awesome!!!
> I can't hear any noises at all with that free Steinway sample and
> default settings.
>
> But . . . I think a bug got introduced in the process.
> Occasionally, some notes will not release completely. They'll get
> stuck in a state where i can still hear them but their volume is lower
> than usual.
> If i play the same note again it goes away.
> Kinda feels like a stuck key :) But it's not, because when i play the
> same thing with old ls (pre cvs update) i don't get into that state.
>
> After a while i found a way to reproduce: (other ways may exist also)
> 1) play and hold note. (voices: 1)
> 2) apply and hold sustain.
> 3) release the note (keeps playing on sustain)
> 4) play and hold the same note again (voices: 2)
> 4) release sustain
> 5) apply sustain (hold)
> 6) release the note
> 7) release sustain. (voices: 2!)
> Voices will still be allocated and playing at this point!
>
> I'd love to implement PADSDR but i hope it's not very urgent as i need
> to do a bit of reading first.
>
> Regards,
> Vladimir.
>
> Christian Schoenebeck wrote:
>
>> Changes:
>>
>> - There was still this annoying problem that some .gig
>> instruments were
>> detuned. I hope I have fixed this now. If you have still a
>> .gig that
>> sounds detuned, please let me know!
>>
>> - As promised I finished an initial version of the amplitude
>> envelope
>> generator (EG1), so far only a simple ASR one. Extending it to
>> a PADSDR
>> one (as used in Gigasampler) is quite easy. If anybody likes
>> to do this
>> task, you just have to improve the EG_VCA class
>> (src/eg_vca.cpp). Vladimir
>> perhaps?
>> The EG has a minimum release time, in case the release time
>> given by the
>> gig file is 0s for example. Without this min. release time we
>> would again
>> have the click problem in case of zero release times when the
>> voice will
>> be released before it's sample end. This min. release time is
>> defined in
>> line 32 of src/eg_vca.h and there's another #define which sets
>> the bottom
>> value limit of the Exp curve, thus also defines the end of the
>> EG curve in
>> general. These two #define values still have to be adjusted to
>> good values
>>
>> CU
>> Christian
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Perforce Software.
>> Perforce is the Fast Software Configuration Management System offering
>> advanced branching capabilities and atomic changes on 50+ platforms.
>> Free Eval! http://www.perforce.com/perforce/loadprog.html
>> _______________________________________________
>> Linuxsampler-devel mailing list
>> Lin...@li...
>> https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System offering
> advanced branching capabilities and atomic changes on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> _______________________________________________
> Linuxsampler-devel mailing list
> Lin...@li...
> https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
>
|