<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Sun, Oct 27, 2013 at 2:25 PM, Aurélien Leblond <span dir="ltr"><<a href="mailto:blablack@gmail.com" target="_blank">blablack@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi everyone,<br>
<br>
In my lv2 plugin, I need to communicate information from the DSP to<br>
the UI, but I don't want to break the DSP/UI separation principle (no<br>
Instance or Data access). On top of that, I'm using LVTK.<br>
<br>
The type of data I'm trying to move is a Vector of Float (buffer type<br>
Sound in the ttl) - but even basic information on how to transfer a<br>
Float from the DSP to the UI would be valuable.<br></blockquote><div><br></div><div>he, he, yeah it can get a little confusing... maybe this will help.</div><div> </div><div>    // you're sending things in an atom sequence so get the size information</div>
<div>    // from the port buffer</div><div><br></div><div>    LV2_Atom_Sequence* aseq = (LV2_Atom_Sequence*) p (p_notify);</div><div>    m_forge->set_buffer ((uint8_t*) aseq, aseq->atom.size);</div><div><br>    m_forge->sequence_head (m_notify_frame, 0);<br>
<br>    // sequences need a timestamp for each event added</div><div>    m_forge->frame_time (0);</div><div><br></div><div><br></div><div>    m_forge->write_float (1604); //test data i'm trying to move<br><br><br>
<br>In my UI, I just want to see if I receive this data<br>In the port_event method, at the moment the only thing I'm doing is:<br>    std::cout << port << " - " << format << std::endl;<br>
<br><br><br>The port is defined in the TTL as follows:<br>    a lv2:OutputPort, atom:AtomPort ;<br>    atom:bufferType atom:Float ;<br>    atom:supports <<a href="http://lv2plug.in/ns/ext/patch#Message" target="_blank">http://lv2plug.in/ns/ext/patch#Message</a>> ;<br>
    lv2:index 1 ;<br>    lv2:symbol "notify" ;<br>    lv2:name "Notify" ;<br></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
What I have do so far in the DSP (run method)<br>
    m_forge->set_buffer((uint8_t*)p(p_notify), sizeof(float));<br>
//p_notify being the atom port<br>
    m_forge->sequence_head(m_notify_frame, 0);<br>
<br>
    ForgeFrame p_frame;<br>
    Atom p_msg = m_forge->write_blank(p_frame, 1, urids.atom_Float);<br>
    m_forge->property_head(urids.atom_value, 0);<br>
    m_forge->write_float(1604); //test data i'm trying to move<br>
    m_forge->pop(p_frame);<br>
<br>
<br>
<br>
In my UI, I just want to see if I receive this data<br>
In the port_event method, at the moment the only thing I'm doing is:<br>
    std::cout << port << " - " << format << std::endl;<br>
<br>
<br>
<br>
The port is defined in the TTL as follows:<br>
    a lv2:OutputPort, atom:AtomPort ;<br>
    atom:bufferType atom:Float ;<br>
    atom:supports <<a href="http://lv2plug.in/ns/ext/patch#Message" target="_blank">http://lv2plug.in/ns/ext/patch#Message</a>> ;<br>
    lv2:index 1 ;<br>
    lv2:symbol "notify" ;<br>
    lv2:name "Notify" ;<br>
<br>
<br>
<br>
At the moment, the code compiles and runs without crashing (yeah!),<br>
but nothing happens (boo!).<br>
Would you guys have any ideas?<br>
<br>
Thanks in advance,<br>
Aurélien<br>
</blockquote></div><br></div></div>