How much of the audio remains to be played when you issue a noteoff to trigger the release?
I think it would be best if you posted code which illustrates the problem, preferably using one of the...