Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 891 Bytes

2_06_simple_plugin_ui_xputty_2.md

File metadata and controls

29 lines (18 loc) · 891 Bytes

06 - Make A Simple Amp Plugin UI With XPutty II

See video: https://youtu.be/lXYyu7Ta7C4

We compile and optimize the Xputty-based plugin we made before.

Compile

Plugin DSP

gcc myAmp.c -fvisibility=hidden -fPIC -DPIC -shared -pthread `pkg-config --cflags lv2` -Wl,-Bstatic -lm `pkg-config --libs --static lv2` -Wl,-Bdynamic -o myAmp.so

User interface

g++ myAmp_Xputty.cpp -fvisibility=hidden -fPIC -DPIC -shared -pthread -Ilibxputty/libxputty/include `pkg-config --cflags lv2 cairo x11` -Llibxputty/libxputty -Wl,-Bstatic -lm `pkg-config --libs --static lv2` -Wl,-Bdynamic `pkg-config --libs cairo x11` -o myAmp_Xputty.so

Optimization

  • Load background image: widget_get_png_from_file ()
  • Visualize it in an expose event callback:
    • cairo_set_source_surface ()
    • cairo_paint ()