Re: [LAD] LV2: Communicate from the DSP to the UI

From: Michael Fisher <mfisher31@email-addr-hidden>
Date: Mon Oct 28 2013 - 22:30:09 EET

On Mon, Oct 28, 2013 at 11:58 AM, Michael Fisher <mfisher31@email-addr-hiddenwrote:

> On Mon, Oct 28, 2013 at 10:24 AM, Aurélien Leblond <blablack@email-addr-hidden>wrote:
>
>> > The map object is 'just there' for when you need it, like creating new
>> > forges ;) I've always wondered if it made more sense to provide a
>> accessor
>> > method to it for clarity Plugin::get_urid_map() const or something
>> like
>> > that.
>> >
>> > That looks right for creating a forge, AtomForge's ctor will call
>> > lv2_atom_forge_init
>> > when the map is passed in (just like you do above)
>> >
>> >>
>> >> void Scope::run(uint32_t nframes)
>> >> {
>> >> // you're sending things in an atom sequence so get the size
>> >> information
>> >> // from the port buffer
>> >>
>> >> LV2_Atom_Sequence* aseq = (LV2_Atom_Sequence*) p (p_notify);
>> >> m_forge->set_buffer ((uint8_t*) aseq, aseq->atom.size);
>> >>
>> >> m_forge->sequence_head(m_notify_frame, 0);
>> >>
>> >> // sequences need a timestamp for each event added
>> >> m_forge->frame_time(0);
>> >>
>> >> m_forge->write_float(1604);
>> >> }
>> >>
>> >
>> > Still nothing happening on the GUI end ay? Could I just have a link to
>> the
>> > full source code? I'm better debugging hands on. Sorry, I can't
>> recall the
>> > git address to your plugin set.
>> >
>> > Forging atoms (in a way that actually works) isn't by any means a
>> straight
>> > forward process.
>>
>> Thanks for checking, I really have the feeling I'm missing something
>> small here :)
>>
>
> Yep, missing something small seems to happen to me frequently. I'm
> jumping over to my Linux machine and will give it a go.
>
>
>>
>> The SVN is here:
>> svn checkout svn://svn.code.sf.net/p/avwlv2/code/trunk avw.lv2
>>
>> (Ingen is the host I use to test them)
>>
>
>
First things first. Your plugin, after modifying ttl files, works fine in
Jalv. For ingen support, your best bet might be to add a Trac ticket on
drobilla.net.

Ok, so I figured out the problem... the GUI ttl file should look
something like this (with a portNotification setting)

<http://avwlv2.sourceforge.net/plugins/avw/scope/gui>

        a guiext:GtkUI ;

        guiext:binary <scope_gui.so> ;

        guiext:portNotification [

            guiext:plugin <http://avwlv2.sourceforge.net/plugins/avw/scope> ;

            lv2:symbol "notify" ;

            guiext:notifyType atom:Float

        ] .

the Port definition in the plugin's turtle :

          ... [

                a lv2:OutputPort, atom:AtomPort ;

                atom:bufferType atom:Sequence ;

                atom:supports atom:Float ; # <<<<<< NEED THIS (i think)

                lv2:index 1 ;

                lv2:symbol "notify" ;

                lv2:name "Notify" ;

              ] .

I also added more debug output to the GUI... all relevant changes
were committed in a git mirror on Github (its just easier for me to do
that) The only files I modified were scope*.* files

You'll want to look at the GUI code, because I also show you how to
'un-package' the atom in the port_event method.

https://github.com/axetota/avwlv2/tree/devel

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Oct 29 00:15:09 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 29 2013 - 00:15:09 EET