so, here we go..
after getting a ladspa (to vst) wrapper working, i wanted to add dssi support too.. it was/is pretty simple, as dssi is more or less 'just' a ladspa plugin with some additional functionality for passing in (midi) events, and handling presets (programs).. at the moment, i totally ignore the gui aspect.. so.. my wrapper seems to be working as espected, except for one thing - i can't get any sound out of it!
i load the .so file, find the 'dssi_descriptor' function, and call it to get the descriptor.. from this dssi descriptor i find the ladspa descriptor, which i use for the basic things like instantiating and activating the plugin, just like i would normally do with a ladspa plugin.. then, i prepare some midi events. and pass these to the plugin when i call run_synth().. but no sound is coming out of the plugin... and i don't know where to start hunting for errors/bugs.. i don't know if it is because i haven't initialized/setup the plugin properly, of if my midi events are illformed, or whatever..
i have checked if the pointers in the ladspa and dssi descriptors are not NULL, and i send events like this (removed a lot of code in an effort to make it more understandable):
in my (vst) plugin class, i have
Code: Select all
uint32 MNumMidiEvents;
snd_seq_event_t MMidiEvents[S3_DSSI_MAX_MIDI_EVENTS];
then, when my vst plugin receives a midi event, i do something like this:
Code: Select all
if (MNumMidiEvents < S3_DSSI_MAX_MIDI_EVENTS) {
uint32 chan = AMsg1 & 0x0f;
uint32 msg = AMsg1 & 0xf0;
switch(msg) {
case 0x80: // note off
MMidiEvents[MNumMidiEvents].type = SND_SEQ_EVENT_NOTEOFF;
MMidiEvents[MNumMidiEvents].time.tick = AOffset;
MMidiEvents[MNumMidiEvents].data.note.channel = chan;
MMidiEvents[MNumMidiEvents].data.note.note = AMsg2;
MMidiEvents[MNumMidiEvents].data.note.velocity = AMsg3;
break;
case...
...
}
MNumMidiEvents++;
}
Code: Select all
MDssiDescriptor->run_synth(MLadspaHandle,ANumSamples,MMidiEvents,MNumMidiEvents);
MNumMidiEvents = 0;
does anybody know of a simple example dssi host? the more minimal, the better.. no gui or osc stuff.. just loading the plugin, instantiating and activating it, sending a few midi events through it, and capturing or playing the resulting audio? or even better, a simplistic dssi plugin that just prints out some info..
- tor-helge
if i ever get the dssi hosting sorted out, i plan to take the next step, and look at lv2.. then, if that works, i could potentially look at the gui mess..