<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 02/10/2014 16:42, Harry van Haaren
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKudYbOJwScNYKiCQv2x75BJ9_n-VhmAjte5gMZE2rSJLuxbEg@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi,

When replying, please be careful to reply to the list, as well as the
person: otherwise 1/2 a conversation gets lost ;) I've included
<a class="moz-txt-link-abbreviated" href="mailto:linux-audio-dev@lists.linuxaudio.org">linux-audio-dev@lists.linuxaudio.org</a>  again.

On Thu, Oct 2, 2014 at 4:13 PM, Phil CM <a class="moz-txt-link-rfc2396E" href="mailto:philcm@gnu.org"><philcm@gnu.org></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
On 02/10/2014 14:13, Harry van Haaren wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">
On Thu, Oct 2, 2014 at 1:14 PM, Phil CM <a class="moz-txt-link-rfc2396E" href="mailto:philcm@gnu.org"><philcm@gnu.org></a> wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">
I need a synth with a pitch control. A synth that can be controlled to
produce all tones between one note and another, say from a2 to c3 in an
anti-aliased way, like what you would get in pd by altering the pitch of
a
sine wave.
</pre>
          </blockquote>
          <pre wrap="">
Hi Phil,

To start, welcome to LV2 programming: audio plugins are fun and complex
area!
</pre>
        </blockquote>
        <pre wrap="">
Thanks :)
</pre>
        <blockquote type="cite">
          <pre wrap="">

If you haven't already, I suggest you checkout the "plugins" directory
in the lv2 repository. It provides the best example code you'll find,
and accompanying <a class="moz-txt-link-freetext" href="http://lv2plug.in/book/">http://lv2plug.in/book/</a>  provides detailed
explainations and best-practices.
</pre>
        </blockquote>
        <pre wrap="">
This is my bedside reading for the next days to come ; Too bad the examples
do not include a simple synth :(
</pre>
      </blockquote>
      <pre wrap="">That's what I thought too, so I wrote a sin-generator a few years ago:
it apparently hasn't been included in the lv2 source yet. I'll CC
David Robillard, and see if that's an option :)

<a class="moz-txt-link-freetext" href="https://github.com/harryhaaren/lv2/tree/master/plugins/eg-sinsynth.lv2">https://github.com/harryhaaren/lv2/tree/master/plugins/eg-sinsynth.lv2</a>

I remember now that it doesn't accept MIDI input yet: which means it
doesn't handle notes, or pitch bend. These can be added quite
trivially, and is something that I'd be willing to collaborate on?
You'd learn how to "manually" use MIDI, and we'd have a better
resource.</pre>
    </blockquote>
    Then how do you make it sound? I'm curious.<br>
    Your proposition is precious, Harry. Thank you very much for your
    help.<br>
    <blockquote
cite="mid:CAKudYbOJwScNYKiCQv2x75BJ9_n-VhmAjte5gMZE2rSJLuxbEg@mail.gmail.com"
      type="cite">
      <pre wrap="">

Please note that the GUI code is NOT something to learn from: its not
advised to use GTK for plugin UI's.
That said, the code is pretty short, and does actually work: perhaps
learn from it, and then use a more lightweight UI framework ( NTK
being my / OpenAV's favorite: <a class="moz-txt-link-freetext" href="http://non.tuxfamily.org/wiki/NTK">http://non.tuxfamily.org/wiki/NTK</a> )
</pre>
    </blockquote>
    Funny, I was just reading <a
href="http://harryhaaren.blogspot.com/2012/07/writing-lv2-guis-making-it-look-snazzy.html">your
      blog post</a> about it :)<br>
    <br>
    But I cannot get it to build because of a gtkmm error:<br>
    <br>
    <tt>Waf: Entering directory `/home/px/.kituu/bin/src/lv2/build'</tt><tt><br>
    </tt><tt>[37/44] cxx: plugins/eg-sinsynth.lv2/widget.cpp ->
      build/plugins/eg-sinsynth.lv2/widget.cpp.4.o</tt><tt><br>
    </tt><tt>[38/44] cxx: plugins/eg-sinsynth.lv2/sinsynth_gui.cpp ->
      build/plugins/eg-sinsynth.lv2/sinsynth_gui.cpp.4.o</tt><tt><br>
    </tt><tt>[42/44] cshlib: build/plugins/eg-amp.lv2/amp.c.3.o ->
      build/plugins/eg-amp.lv2/eg-amp.lv2/amp.so</tt><tt><br>
    </tt><tt>[43/44] subst: lv2.pc.in -> build/lv2.pc</tt><tt><br>
    </tt><tt>In file included from
      ../plugins/eg-sinsynth.lv2/widget.cpp:4:0:</tt><tt><br>
    </tt><tt>../plugins/eg-sinsynth.lv2/widget.h:9:31: fatal error:
      gtkmm/drawingarea.h: No such file or directory</tt><tt><br>
    </tt><tt> #include <gtkmm/drawingarea.h></tt><tt><br>
    </tt><tt>                               ^</tt><tt><br>
    </tt><tt>compilation terminated.</tt><tt><br>
    </tt><tt>../plugins/eg-sinsynth.lv2/sinsynth_gui.cpp:9:19: fatal
      error: gtkmm.h: No such file or directory</tt><tt><br>
    </tt><tt> #include <gtkmm.h></tt><tt><br>
    </tt><tt>                   ^</tt><tt><br>
    </tt><tt>compilation terminated.</tt><tt><br>
    </tt><tt>Waf: Leaving directory `/home/px/.kituu/bin/src/lv2/build'</tt><tt><br>
    </tt><tt>Build failed</tt><tt><br>
    </tt><tt> -> task in 'sinsynth_gui' failed (exit status 1): </tt><tt><br>
    </tt><tt>        {task 3066761580L: cxx widget.cpp ->
      widget.cpp.4.o}</tt><tt><br>
    </tt><tt>['/usr/bin/g++', '-I/home/px/.kituu/bin/src/lv2',
      '-DNDEBUG', '-fshow-column',
      '-I/home/px/.kituu/bin/src/lv2/build',
      '-I/home/px/.kituu/bin/src/lv2',
      '-I/home/px/.kituu/bin/src/lv2/build', '-DHAVE_SNDFILE=1',
      '-DHAVE_GTK2=1', '../plugins/eg-sinsynth.lv2/widget.cpp', '-c',
      '-o', 'plugins/eg-sinsynth.lv2/widget.cpp.4.o']</tt><tt><br>
    </tt><tt> -> task in 'sinsynth_gui' failed (exit status 1): </tt><tt><br>
    </tt><tt>        {task 3066761772L: cxx sinsynth_gui.cpp ->
      sinsynth_gui.cpp.4.o}</tt><tt><br>
    </tt><tt>['/usr/bin/g++', '-I/home/px/.kituu/bin/src/lv2',
      '-DNDEBUG', '-fshow-column',
      '-I/home/px/.kituu/bin/src/lv2/build',
      '-I/home/px/.kituu/bin/src/lv2',
      '-I/home/px/.kituu/bin/src/lv2/build', '-DHAVE_SNDFILE=1',
      '-DHAVE_GTK2=1', '../plugins/eg-sinsynth.lv2/sinsynth_gui.cpp',
      '-c', '-o', 'plugins/eg-sinsynth.lv2/sinsynth_gui.cpp.4.o']</tt><tt><br>
    </tt><br>
    Although I do have both<br>
    <br>
    <tt>libgtkmm-2.4-dev: /usr/include/gtkmm-2.4/gtkmm.h</tt><tt><br>
    </tt><tt>libgtkmm-3.0-dev: /usr/include/gtkmm-3.0/gtkmm.h</tt><tt><br>
    </tt><br>
    installed... I too find NTK really nice and lightweight, BTW. I know
    it because it's used by Fabla, Sorcer, NSM etc. A simple
    sine-generating synth plugin with a NTK GUI would be a cool place to
    start, I must say.<br>
    <br>
    About this pitch-bend thing, I discovered So-404 and it does exactly
    what I want in a way I had not though about :<br>
    <br>
    "If two notes are played together the pitch will slide according to
    the
    portamento time" I guess that's exactly what I want. Plus an attack
    time setting ;)<br>
    <br>
    <blockquote
cite="mid:CAKudYbOJwScNYKiCQv2x75BJ9_n-VhmAjte5gMZE2rSJLuxbEg@mail.gmail.com"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">OK, so I'm going to get back once I managed to make a basic synth to get to
this pitch bending special case.
</pre>
      </blockquote>
      <pre wrap="">Sure, good plan.


</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">I do strongly advise to checkout the plugins: they are a brilliant
reference to make LV2 plugins.
</pre>
        </blockquote>
        <pre wrap="">
Again, it's really a shame that there is no sound synthesis plugin
demonstrated... I'm going to study them all anyway.
</pre>
        <blockquote type="cite">
          <pre wrap="">
Ok, that's quite a lot of info already I think!

LV2 specific development:
#lv2 on irc.freenode.net  (I'm "HarryHaaren", say Hi if/when you're on)
Mailing list (low-traffic):
<a class="moz-txt-link-freetext" href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a>

Cheers, -Harry

</pre>
        </blockquote>
        <pre wrap="">Thanks a bunch, Harry
</pre>
      </blockquote>
      <pre wrap="">
You're welcome. I like LV2, its the way forward: if I can help out
somewhat (apart from developing stuff myself) its also a pleasure, I
know LV2 can be a touch daunting, and a helping hand does make it a
lot easier there!

Cheers, -Harry



</pre>
    </blockquote>
    <br>
  </body>
</html>