As per Bug 22, Yoshimi doesn't notify the host (in my case, Qtractor) when changes are made in the plugin, but I've been working around this for quite some time by making a manual change in Qtractor before saving the session, which worked fine. However, since a few months ago, Yoshimi hasn't been restoring correctly regardless of whether I've made a change in Qtractor or not. By this I mean:
1) Start Qtractor and add Yoshimi LV2 plugin
2) Change bank/patch in Yoshimi, then close plugin
3) Make random change in Qtractor, then save/exit
4) Upon re-loading Qtractor session and opening Yoshimi plugin, patch will have reset to default (Bank 1/Patch 1)
This only seems to happen with certain tracks in certain sessions and I haven't been able to isolate the cause, but to illustrate I've attached a Qtractor qtz (session archive) file. The track TESTS_YOSH has an LV2 instance of Yoshimi, set to the patch Fantasy/Emptyness1. You can check this in the qts file, in the line: <string name="name">Emptyness</string>. However, upon loading this session in Qtractor and opening Yoshimi, the patch will reset to Arpeggios/Arpeggio1 (i.e. Bank 1/Patch 1).
I'd be very grateful if you could take a look at this, as it makes the LV2 plugin almost unusable (as you need to restore everything manually when re-loading a session). Or if you have any ideas about how I could track the cause down better to give you more information, please let me know and I'd be glad to assist.
FYI, I'm running Yoshimi 1.5.1 (built from git), a recent Qtractor (qtractor.0.8.1.21git.5c0044, built from git) and openSUSE Leap 42.2. As I say, though, the problem has been around for several months.
Thanks very much in advance.
I can confirm the problem exists also on V 1.4.1 (haven't gone back further).
Investigating...
OK, got some idea what's going on. If your files don't have program changes within the tracks you can temporarily get round the problem by disabling program changes in Settings->MIDI
The issue is caused by the fact there are two mechanisms for program changes. State loading directly reinstates all program data at the time it was saved, but it seems qtractor's mechanisim can also includes discrete bank/program change commands as presets, and this file has these.
At the time of V 1.4.1 we changed the way we handled bank/program changes because extremely big patches could cause storms of Xruns. It seems this is the cause of the problem, and these are now being applied after the state data is loaded.
None of my test files use qtractor's presets!
Don't know how to resolve this properly yet :(
Thanks very much for the swift reply and also for your dedicated work on Yoshimi. It's much appreciated.
The workaround would be fine for me as I don't use program changes. It seems generally to work, but when adding new instances in other tracks I encountered patches reverting. One thing I noticed is that, rather than selecting the patch straight after disabling program changes, it seems better to:
1) Add new Yoshimi instance; open Yoshimi [patch will default to Arpeggio1]; disable program changes
2) Re-load session; open Yoshimi [patch will now have changed to Simple Sound] and select desired patch
3) Make change in Qtractor; save/re-load session and check results
If you're not sure how to fix the underlying issue I'll carry on like this and see how things go. At least, restoring patches only after adding new instances is much less trouble than redoing everything every time. It may also be worth readying many tracks from the start of a project, rather than adding them one by one, as once everything's "settled down" things seem to stick. Will see how it goes.
Thanks again.
Some further thoughts. I see you are starting fresh instances of Yoshimi per track. While this is perfectly valid and should 'just work' (tm) it's not the most efficient way to use Yoshimi. I prefer to use qtractor's mixer window and install a single instance in the 'master' column and then allocate chanels/instruments as required.
I suspect that walks round the problem by not actually initialising program changes per track.
There is another factor to consider. Yoshimi's state file contains every detail of the set of patches at the time it was saved. If for some reason the instrument banks on your setup change or get corrupted, reloading this state file will still get back what you saved, but if a program change is performed afterwards, that will overwrite with whatever is in the banks now.
Thanks very much for the tips. That looks a much cleaner way of arranging things.
I've also now removed all Program/Bank settings info from my standard Qtractor template (I had default info in there, which I think is what was throwing things off in the first place) so this issue hopefully shouldn't happen again.
I imagine you can close this now, as it seems it might be covered by Bug 22? In any case, I'll leave that to you.
Thanks again.
Glad it's resolved. I'll leave it open for a wile in case anone else is watching.