[yoshimi] Re: Potential fix for LV2 envelopes

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Wed, 31 Mar 2021 19:20:26 +0100

On Wed, 31 Mar 2021 18:44:56 +0200
Kristian Amlie <kristian@xxxxxxxxxx> wrote:

On 31.03.2021 17:37, Will Godfrey wrote:
<snip>
It's very much dependent on buffer size. Less that 256 frames, and there is 
no
noticeable problem. By the time to get to 1024 frames it's really bad. But 
that
has to be be *both* Yoshimi's internal buffer size and the Jack buffer size. 
 

By this you mean that you also set Yoshimi's buffer size (in
configuration) to 1024 and higher? Did my patch introduce that problem,
or was it always like that?

It's not quite as simple as that :P
Although you can't change the internal buffer size in lV2, it is still
effective and takes whatever value was set standalone. If it is smaller it
just loops until the source buffer has been completed, but this of course
changes the envelope characteristics - well it did! Your patch fixes this.
However, in doing so it makes the warbly bit very obvious (only really bad at
1024 frames and above).

If the buffer size is set larger than the Jack one, you're just wasting memory -
so no real loss. With LV2 or an all jack setup there was generally no benefit
in a smaller buffer, apart from fixing both the envelope size issue, and
getting rid of the funky stuff. Having said that, some filter effects sound
better with smaller buffers, and maybe that's related to the warbles.

With Alsa MIDI and Jack audio, you can get better granularity with note, and CC
timings while not overworking the Jack graph.

You could also try with the updated patch in the PR. As discussed
privately there was a small... ahem.. mistake, in the first patch! With
the debug prints it was adding this could have adverse effects on the
real time performance. Though I would expect this problem to be worse at
lower buffer sizes, not higher...

Well I will anyway, but I don't think it's relevant to this - as I said I don't
think your patch is making an existing problem worse - just more noticeable.

Admittedly there was one part of the existing algorithm I did not quite
understand, but I suspect it is related to big buffer sizes. I thought
my patch didn't change that, but I can dig deeper into this if my patch
is causing problems in this area.

I've attached the file here if you want to give it a try.
It makes bank and program changes so you have to do the following for it to
match:
Disable bank root change.
In the current bank Will_Godfrey_Collection must be bank 105
and Will_Godfrey_Companion must be bank 110  

Which host were you running, Ardour?

Yes. I don't use Ardour generally, but I do have it set up for tests - it
seems to be the most 'difficult' :(

Carla definitely uses variable buffer sizes a lot, so I expect it would show 
up
on that too.  

Yes, and Carla is the one I use all the time. But the thing is that I
think Carla only mirrors what the actual host uses (I host Yoshimi
inside Carla hosted inside Renoise), and for some reason I can't
reproduce it anymore, even though I could before.

Again, I only use Carla for occasional testing.

-- 
Will J Godfrey
http://www.musically.me.uk
http://yoshimi.github.io
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: 
https://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: