[yoshimi] Re: segfault on program change - progress :)

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Thu, 12 Oct 2017 19:24:46 +0100

Suspicions confirmed, and those two instruments were a good clue. Not only does
Florian produce some quite intense instruments, but he also heavily uses
effects. The significance is that the effects are the last things to be
processed by the audio loop and changing them juggles pointers.

The larger the period size, the greater this time between processing a part and
adding in its effects. It was possible to change a part half-way through this
process.

Previously two things stopped this being a problem. First, there were mutex
locks all over the place. These prevented some of the half-way states - at the
expense of Xruns. The other was that all through the audio loop the part on/off
status was re-checked. This is why you sometimes got odd squeaks on a part
change as things weren't entirely consistent for that period.

Program changes are getting quite long in the tooth. Several years ago we
started buffering them, then more-or-less forgot about them as they were 'done'.
Well, one thing not done was synchronising the part status. The part that is
going to change is supposed to be disabled at the start of the loop so that
nothing tries to read it, and a while ago I made a small change to ensure that
as far as the loop was concerned it stayed off for the entire period. However,
because it wasn't in sync it also meant that it stayed *on* if a part change
began part way through.

What proved it beyond all doubt was that if I disabled the part before each
change ( but had enabpble on part change checked) it never faulted, while I
could easily make it do so otherwise with a particular sequence of changes.


I've just run a modifed Yoshimi jumping around all over the place in the
instrument bank window while playing quite rapid chords. I'm now trying to
sweep away the cobwebs, so it might take a little while.


-- 
Will J Godfrey
http://www.musically.me.uk
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:

  • » [yoshimi] Re: segfault on program change - progress :) - Will Godfrey