x42 / avldrums.lv2

Dedicated AVLDrumkits LV2 Plugin
http://x42-plugins.com/x42/x42-avldrums
GNU General Public License v2.0
39 stars 11 forks source link

AVL Drums LV2 plugin not responding at all in MusE #9

Closed terminator356 closed 5 years ago

terminator356 commented 5 years ago

Hello! Tim from the MusE sequencer project here. I am reaching out for help on some bizarre issues. I am trying to figure out where the problem lies. Normally I'm very tenacious but I'm spending way too much time with individual plugins ;-) Help!

AVLD's ui opens, but does not seem to respond to left-clicks at all.

Right-click works (Text vs. Tips etc.) and mouse wheel volume works.

There is no animation at all of the drum 'hits' in MusE. Yet in QTractor it works fine. On my machine it will not even play the notes we send to it from our pianoroll editor, drum editor, or piano keyboard or drum list. But another user says that last bit does work for him but he also does not get the animations !

I verified that lilv_instance_activate() is called, and that lilv_instance_deactivate() is not, too soon.

Is it my understanding that we should be receiving something on the plugin's midi out port? I get absolutely nothing. I verified lilv_instance_connect_port() is called on the output port. I examined the actual memory buffer that we connect the midi out port to. Seems absolutely nothing being sent to us on that midi out port.

And on receiving such an event, are we to send it to the UI or something? Could that be why the animations aren't triggered? (I know that for example, with DSSI we had to send them back to the UI, but with DSSI-VST it was a very different, very complicated ballgame since the plugin did that by itself.)

The other user that I mentioned said this, maybe it means something:

It may be a very remote chance that your version of mesa or libinput may have an issue if you're building it with the latest qt 5.12 on an Ubuntu LTS, I had a similar issue a while back in Ubuntu 16.04 after compiling Qtractor and not being able to get sound out of certain plugins when using qt 5.9.

Appreciate any help. Thanks.

x42 commented 5 years ago

Does your host provide a LV2 idle_interface to the plugin UI? If not that might explain the missing animations. For most host-toolkits the libsuil wrapper provides this.

Another possibility: Messaging between DSP and GUI isn't set up correctly. Is DSP's output Atom port is not connected to the GUI and vice versa?

I suggest to compare to the reference host jalv, where this plugin also works. Check the messages being sent:

jalv.gtk -d http://gareus.org/oss/lv2/avldrums#BlackPearl

PS. The plugin does not have a MIDI output, the GUI is only provided to audition (create audio).

terminator356 commented 5 years ago

Quick checks: Yes we support idleInterface. Verified this section is called, over and over again: //call ui idle callback if any if(_state->uiIdleIface != NULL) { int iRet = _state->uiIdleIface->idle(_state->uiInst); if(iRet != 0) // ui don't want us to call it's idle callback any more _state->uiIdleIface = NULL; } Not sure about second answer, the Atom <> GUI thing, it should be OK, Andrew D. wrote it and many other plugins work. I will try to verify.

About the midi out, what is this for in avldrums.ttl ?

 ] , [
      a lv2:OutputPort, atom:AtomPort ;
      atom:bufferType atom:Sequence ;
      lv2:designation lv2:control ;
      lv2:index 1 ;
      lv2:symbol "notify" ;
      lv2:name "UI Notifications" ;
  ] , [

Thanks.

x42 commented 5 years ago

About the midi out, what is this for in avldrums.ttl ?

It's a message port, that is intended for the DSP to send notifications to the plugin's GUI.

x42 commented 5 years ago

Do other plugins that use message ports for plugin <> UI communication work? e.g. https://github.com/x42/sisco.lv2/ or the multi-sampler from https://github.com/sadko4u/lsp-plugins

terminator356 commented 5 years ago

Ah, so we don't receive anything on that port? Hm, it's published, so we just dutifully count it as a valid port. Should we exclude such ports?

x42 commented 5 years ago

It's up to the host to pass on any messages from the DSP to the plugin's GUI and vice-versa. Usually two ringbuffers, one for each direction.

The host may or may not also react to those messages. However in case of avldrums they're opaque and meaningless to the host (all custom URIs).

terminator356 commented 5 years ago

Yes that's what we have, ring buffers and all. That's why I say I'm not getting anything on that port that I can even relay back to the GUI. Not even on the raw data memory pointed to by the port. (And we are continuously calling the run function of the plugin btw.) Tested SimpleScope: No go. (afaict, and I know how to use a scope.) Hmm...

terminator356 commented 5 years ago

Maybe it's the other way around, that we're not getting events from the GUI when I click, to send to the DSP. I'll try to check some more...

terminator356 commented 5 years ago

Hi! Some good news here. Yep, it was our fault. AVL Drums LV2 now works just fine in MusE :-) Major rewrites and debugging found several problems. Thanks. Tim.