On 17.12.2024 17:47, Will Godfrey wrote:
On Tue, 17 Dec 2024 09:28:29 +0100
Kristian Amlie <krist...@amlie.name> wrote:
I recently bought myself a Zynthian (Open Synth Platform with a
Raspberry Pi inside), and I'm trying to integrate Yoshimi with it. So
far it's going pretty well (you saw my LV2 fix the other day, Will), and
things are working and playing fine.
But one issue I've bumped into is with channels. The way that the
platform works is that you load LV2 presets (a Yoshimi state file,
basically) for each instrument you load in their Zynthian UI [1]. This
works well as long as I'm playing on channel 1. But each track that I
add on the device (they are called "chains"), uses a new channel by
default, and if I load Yoshimi on a track which is not set to channel 1,
then the MIDI messages will go to a disabled Yoshimi part, since the
state file will only contain the instrument in the first part.
There are several ways that this could be handled, but I'm a bit unsure
which one is the best.
1. Make an exception in the Zynthian software to always convert to
channel 1 before sending to the plugin. Zynthian already has such hacks
for some plugins, so such exceptions are not unheard of. Still, I don't
really like this approach; it feels nonstandard, and I also think it
will be difficult to maintain because of [2].
2. Load the same instrument into all 16 parts, and save that in the
state file, so that at least one of them will play after loading it.
This uses 16 times the memory, which is especially bad for Padsynth
patches. It's also bad because if you bring up the UI to actually edit
the patch (possible by using remote connection), then it's very
confusing which one you have to edit. And if you save it, it won't even
be loaded correctly if you add it to a track with a different channel
next time! To fix that you'd have to manually copy it 15 times!
3. Make a special "Omni" mode for Yoshimi, where the part that has it
enabled reacts to messages from all channels (for example it could be
channel 0). I think this is the one I like the best.
4. Something else I'm overlooking? I have a quite poor understanding of
the Solo mode in the Mixer, for example. Is there anything to harvest here?
Footnotes:
[1] You can't load an instrument directly, it has to be a state file.
I'm planning to make a script to quickly convert the existing banks into
state files. Alternatively, you can load the instruments using the
regular Yoshimi UI, and save it as a preset on the device, but this will
take ages for all the banks.
[2] Even if I finish all this, I don't think I will aim for integrating
Yoshimi into their platform as an offering. There isn't enough value for
them since they already have ZynAddSubFX, and there are very few Yoshimi
instruments that are truly Yoshimi-only. So I'm simply aiming for
"possible to install" support, for people such as myself who prefer
Yoshimi despite ZynAddSubFX being available. This means that adding
Yoshimi specific code fixes is something they will probably be reluctant
to do, and I don't blame them. More likely I will aim for having an
install layer somewhere, which gives you simple instructions on how to
install it yourself, if you already have one of their units.
My first thought is that you should be able to set part 1 to look at channel
2 (or any other), and this would be saved in the state file. I use this
frequently when running standalone. Have you tried that?
Yes, that works, but the problem is that I don't know upfront which
channel to set it to. Each state file acts as a preset, and can be added
to any channel, so it only works if it matches the one you first saved
with, whether that's 1 or 2 or anything else. Next time you use that
preset, you might be on a different channel.
Also I'm wonder what affect all of this will have on Vectors or MIDI-Learn.
I need to look into this in more detail, but my gut feeling is that "it
will act as if all the messages came from one channel".
I've never tried either with LV2.
This would not be in the LV2 specific part of the code. In fact, there
is nothing you can configure specifically for LV2, and I think it should
be kept that way.
If an 'Omni' option is the way to go, then I think an extension to Solo would be
the simplest route - it already does quite a bit of channel/part manipulation.
Alright, I'll take a look at that section if Omni sounds like the best
idea, and no one has any other suggestions.
Finally, are you running the basic Yoshimi LV2 or Yoshimi multi? Andrew and I
had quite a lot of discussion about that, but I'm afraid I've almost completely
forgotten it all, so can't say if it's relevant :(
The basic one.
But this is an interesting question, because their integration with
ZynAddSubFX is completely different: It launches it as a standalone
application with 16 stereo Jack ports, and then internally keeps track
of which port to connect to, using OSC to change patches on each
channel. One instance can then span several of the so-called chains,
where they will appear as separate instances, but they're really not.
But keeping track of all this requires a huge beast of a manager in a
python file tailored specifically for ZynAddSubFX. I'd really like to
leverage the fact that Yoshimi has LV2 support and do it in a much more
standard way.
Therefore I feel quite confident in saying that that we cannot (or maybe
rather "should not") use the Yoshimi-multi LV2 plugin, since the LV2
manager expects exactly one stereo pair of output ports. For more
advanced setups you probably could use it, but then you'd anyway have to
use the remote desktop connection and the Yoshimi UI to set up multiple
patches and their routing in one instance, so I consider this an
advanced use case, not the "easy" case which I'm aiming for in this
discussion.
--
Kristian
_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel