basic MOD GUI -- work in progress
|
@ -1,6 +1,7 @@
|
|||
/build
|
||||
/x42
|
||||
/fftw-3.3.4
|
||||
/tools/gen_image
|
||||
*.dSYM
|
||||
|
||||
*.swp
|
||||
|
|
31
Makefile
|
@ -36,6 +36,19 @@ targets=
|
|||
STRIPFLAGS=-s
|
||||
GLUICFLAGS=-I.
|
||||
|
||||
ifneq ($(MOD),)
|
||||
INLINEDISPLAY=no
|
||||
BUILDOPENGL=no
|
||||
BUILDJACKAPP=no
|
||||
MODLABEL1=mod:label \"x42-eq mono\";
|
||||
MODLABEL2=mod:label \"x42-eq stereo\";
|
||||
MODBRAND=mod:brand \"x42\";
|
||||
else
|
||||
MODLABEL1=
|
||||
MODLABEL2=
|
||||
MODBRAND=
|
||||
endif
|
||||
|
||||
UNAME=$(shell uname)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
LV2LDFLAGS=-dynamiclib
|
||||
|
@ -87,6 +100,9 @@ targets+=$(BUILDDIR)$(LV2NAME)$(LIB_EXT)
|
|||
ifneq ($(BUILDOPENGL), no)
|
||||
targets+=$(BUILDDIR)$(LV2GUI)$(LIB_EXT)
|
||||
endif
|
||||
ifneq ($(MOD),)
|
||||
targets+=$(BUILDDIR)modgui
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# extract versions
|
||||
|
@ -236,16 +252,22 @@ $(BUILDDIR)manifest.ttl: lv2ttl/manifest.ttl.in Makefile
|
|||
@mkdir -p $(BUILDDIR)
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/g;s/@LIB_EXT@/$(LIB_EXT)/;s/@UI_TYPE@/$(UI_TYPE)/;s/@LV2GUI@/$(LV2GUI)/g" \
|
||||
lv2ttl/manifest.ttl.in > $(BUILDDIR)manifest.ttl
|
||||
ifneq ($(MOD),)
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/;s/@URISUFFIX@/mono/;s/@NAMESUFFIX@/ Mono/" \
|
||||
lv2ttl/manifest.modgui.in >> $(BUILDDIR)manifest.ttl
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/;s/@URISUFFIX@/stereo/;s/@NAMESUFFIX@/ Stereo/" \
|
||||
lv2ttl/manifest.modgui.in >> $(BUILDDIR)manifest.ttl
|
||||
endif
|
||||
|
||||
$(BUILDDIR)$(LV2NAME).ttl: Makefile lv2ttl/$(LV2NAME).ttl.in \
|
||||
lv2ttl/$(LV2NAME).ports.ttl.in lv2ttl/$(LV2NAME).mono.ttl.in lv2ttl/$(LV2NAME).stereo.ttl.in
|
||||
@mkdir -p $(BUILDDIR)
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/g;s/@UI_TYPE@/$(UI_TYPE)/;s/@UI_REQ@/$(LV2UIREQ)/" \
|
||||
lv2ttl/$(LV2NAME).ttl.in > $(BUILDDIR)$(LV2NAME).ttl
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/g;s/@URISUFFIX@/mono/;s/@NAMESUFFIX@/ Mono/;s/@CTLSIZE@/65888/;s/@SIGNATURE@/$(SIGNATURE)/;s/@VERSION@/lv2:microVersion $(LV2MIC) ;lv2:minorVersion $(LV2MIN) ;/g" \
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/g;s/@URISUFFIX@/mono/;s/@NAMESUFFIX@/ Mono/;s/@CTLSIZE@/65888/;s/@SIGNATURE@/$(SIGNATURE)/;s/@VERSION@/lv2:microVersion $(LV2MIC) ;lv2:minorVersion $(LV2MIN) ;/g;s/@MODBRAND@/$(MODBRAND)/;s/@MODLABEL@/$(MODLABEL1)/" \
|
||||
lv2ttl/$(LV2NAME).ports.ttl.in >> $(BUILDDIR)$(LV2NAME).ttl
|
||||
cat lv2ttl/$(LV2NAME).mono.ttl.in >> $(BUILDDIR)$(LV2NAME).ttl
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/g;s/@URISUFFIX@/stereo/;s/@NAMESUFFIX@/ Stereo/;s/@CTLSIZE@/131424/;s/@SIGNATURE@/$(SIGNATURE)/;s/@VERSION@/lv2:microVersion $(LV2MIC) ;lv2:minorVersion $(LV2MIN) ;/g" \
|
||||
sed "s/@LV2NAME@/$(LV2NAME)/g;s/@URISUFFIX@/stereo/;s/@NAMESUFFIX@/ Stereo/;s/@CTLSIZE@/131424/;s/@SIGNATURE@/$(SIGNATURE)/;s/@VERSION@/lv2:microVersion $(LV2MIC) ;lv2:minorVersion $(LV2MIN) ;/g;s/@MODBRAND@/$(MODBRAND)/;s/@MODLABEL@/$(MODLABEL2)/" \
|
||||
lv2ttl/$(LV2NAME).ports.ttl.in >> $(BUILDDIR)$(LV2NAME).ttl
|
||||
cat lv2ttl/$(LV2NAME).stereo.ttl.in >> $(BUILDDIR)$(LV2NAME).ttl
|
||||
|
||||
|
@ -273,6 +295,10 @@ $(APPBLD)x42-fil4$(EXE_EXT): $(DSP_DEPS) $(GUI_DEPS) \
|
|||
|
||||
$(BUILDDIR)$(LV2GUI)$(LIB_EXT): gui/fil4.c
|
||||
|
||||
$(BUILDDIR)modgui:
|
||||
@mkdir -p $(BUILDDIR)/modgui
|
||||
cp -r modgui/* $(BUILDDIR)modgui/
|
||||
|
||||
###############################################################################
|
||||
# install/uninstall/clean target definitions
|
||||
|
||||
|
@ -320,6 +346,7 @@ clean:
|
|||
$(BUILDDIR)$(LV2GUI)$(LIB_EXT)
|
||||
rm -rf $(BUILDDIR)*.dSYM
|
||||
rm -rf $(APPBLD)x42-*
|
||||
rm -rf $(BUILDDIR)modgui
|
||||
-test -d $(APPBLD) && rmdir $(APPBLD) || true
|
||||
-test -d $(BUILDDIR) && rmdir $(BUILDDIR) || true
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
lv2:extensionData state:interface @SIGNATURE@;
|
||||
lv2:optionalFeature lv2:hardRTCapable ;
|
||||
ui:ui @LV2NAME@:ui_gl ;
|
||||
@MODBRAND@
|
||||
@MODLABEL@
|
||||
lv2:port [
|
||||
a atom:AtomPort ,
|
||||
lv2:InputPort ;
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
|
||||
@prefix doap: <http://usefulinc.com/ns/doap#> .
|
||||
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
||||
@prefix kx: <http://kxstudio.sf.net/ns/lv2ext/external-ui#> .
|
||||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
|
||||
@prefix mod: <http://moddevices.com/ns/mod#> .
|
||||
@prefix pprop: <http://lv2plug.in/ns/ext/port-props#> .
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
|
||||
@prefix pprop: <http://lv2plug.in/ns/ext/port-props#> .
|
||||
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
|
||||
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
|
||||
@prefix rsz: <http://lv2plug.in/ns/ext/resize-port#> .
|
||||
@prefix state: <http://lv2plug.in/ns/ext/state#> .
|
||||
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
|
||||
@prefix kx: <http://kxstudio.sf.net/ns/lv2ext/external-ui#> .
|
||||
@prefix rsz: <http://lv2plug.in/ns/ext/resize-port#> .
|
||||
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
|
||||
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
|
||||
|
||||
@prefix @LV2NAME@: <http://gareus.org/oss/lv2/@LV2NAME@#> .
|
||||
|
||||
<http://gareus.org/rgareus#me>
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
@LV2NAME@:@URISUFFIX@
|
||||
modgui:gui [
|
||||
modgui:resourcesDirectory <modgui> ;
|
||||
modgui:iconTemplate <modgui/icon-x42-eq.html> ;
|
||||
modgui:stylesheet <modgui/stylesheet-x42-eq.css> ;
|
||||
modgui:screenshot <modgui/screenshot-x42-eq.png> ;
|
||||
modgui:thumbnail <modgui/thumbnail-x42-eq.png> ;
|
||||
modgui:brand "x42" ;
|
||||
modgui:label "x42-eq@NAMESUFFIX@" ;
|
||||
modgui:port [
|
||||
lv2:index 0 ;
|
||||
lv2:symbol "enable" ;
|
||||
lv2:name "Enable" ;
|
||||
] , [
|
||||
lv2:index 1 ;
|
||||
lv2:symbol "gain" ;
|
||||
lv2:name "Gain" ;
|
||||
] , [
|
||||
lv2:index 2 ;
|
||||
lv2:symbol "HighPass" ;
|
||||
lv2:name "Highpass Enable" ;
|
||||
] , [
|
||||
lv2:index 3 ;
|
||||
lv2:symbol "HPfreq" ;
|
||||
lv2:name "Highpass Frequency" ;
|
||||
] , [
|
||||
lv2:index 4 ;
|
||||
lv2:symbol "HPQ" ;
|
||||
lv2:name "HighPass Resonance" ;
|
||||
] , [
|
||||
lv2:index 5 ;
|
||||
lv2:symbol "LSfreq" ;
|
||||
lv2:name "LowShelf Frequency" ;
|
||||
] , [
|
||||
lv2:index 6 ;
|
||||
lv2:symbol "LSq" ;
|
||||
lv2:name "LowShelf Bandwidth" ;
|
||||
] , [
|
||||
lv2:index 7 ;
|
||||
lv2:symbol "LSgain" ;
|
||||
lv2:name "LowShelf Gain" ;
|
||||
] , [
|
||||
lv2:index 8 ;
|
||||
lv2:symbol "freq1" ;
|
||||
lv2:name "Band 1 Frequency" ;
|
||||
] , [
|
||||
lv2:index 9 ;
|
||||
lv2:symbol "q1" ;
|
||||
lv2:name "Band 1 Bandwidth" ;
|
||||
] , [
|
||||
lv2:index 10 ;
|
||||
lv2:symbol "gain1" ;
|
||||
lv2:name "Band 1 Gain" ;
|
||||
] , [
|
||||
lv2:index 11 ;
|
||||
lv2:symbol "freq2" ;
|
||||
lv2:name "Band 2 Frequency" ;
|
||||
] , [
|
||||
lv2:index 12 ;
|
||||
lv2:symbol "q2" ;
|
||||
lv2:name "Band 2 Bandwidth" ;
|
||||
] , [
|
||||
lv2:index 13 ;
|
||||
lv2:symbol "gain2" ;
|
||||
lv2:name "Band 2 Gain" ;
|
||||
] , [
|
||||
lv2:index 14 ;
|
||||
lv2:symbol "freq3" ;
|
||||
lv2:name "Band 3 Frequency" ;
|
||||
] , [
|
||||
lv2:index 15 ;
|
||||
lv2:symbol "q3" ;
|
||||
lv2:name "Band 3 Bandwidth" ;
|
||||
] , [
|
||||
lv2:index 16 ;
|
||||
lv2:symbol "gain1" ;
|
||||
lv2:name "Band 3 Gain" ;
|
||||
] , [
|
||||
lv2:index 17 ;
|
||||
lv2:symbol "freq4" ;
|
||||
lv2:name "Band 4 Frequency" ;
|
||||
] , [
|
||||
lv2:index 18 ;
|
||||
lv2:symbol "q4" ;
|
||||
lv2:name "Band 1 Bandwidth" ;
|
||||
] , [
|
||||
lv2:index 19 ;
|
||||
lv2:symbol "gain4" ;
|
||||
lv2:name "Band 4 Gain" ;
|
||||
] , [
|
||||
lv2:index 20 ;
|
||||
lv2:symbol "HSfreq" ;
|
||||
lv2:name "HighShelf Frequency" ;
|
||||
] , [
|
||||
lv2:index 21 ;
|
||||
lv2:symbol "HSq" ;
|
||||
lv2:name "HighShelf Bandwidth" ;
|
||||
] , [
|
||||
lv2:index 22 ;
|
||||
lv2:symbol "HSgain" ;
|
||||
lv2:name "HighShelf Gain" ;
|
||||
] , [
|
||||
lv2:index 23 ;
|
||||
lv2:symbol "LowPass" ;
|
||||
lv2:name "Lowpass Enable" ;
|
||||
] , [
|
||||
lv2:index 24 ;
|
||||
lv2:symbol "LPfreq" ;
|
||||
lv2:name "LowPass Frequency" ;
|
||||
] , [
|
||||
lv2:index 25 ;
|
||||
lv2:symbol "LPQ" ;
|
||||
lv2:name "LowPass Resonance" ;
|
||||
]
|
||||
] .
|
|
@ -1,7 +1,9 @@
|
|||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix kx: <http://kxstudio.sf.net/ns/lv2ext/external-ui#> .
|
||||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
|
||||
@prefix modgui: <http://moddevices.com/ns/modgui#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
|
||||
@prefix kx: <http://kxstudio.sf.net/ns/lv2ext/external-ui#> .
|
||||
|
||||
@prefix @LV2NAME@: <http://gareus.org/oss/lv2/@LV2NAME@#> .
|
||||
|
||||
@LV2NAME@:mono
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-x42-eq">
|
||||
<div mod-role="drag-handle" class="mod-drag-handle"></div>
|
||||
|
||||
<div class="mod-control-group clearfix">
|
||||
<div class="x42-eq-band">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-gain">
|
||||
<div mod-port-symbol="LSgain" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-right x42-eq-bwls">
|
||||
<div mod-port-symbol="LSq" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-freq0">
|
||||
<div mod-port-symbol="LSfreq" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-band">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-gain">
|
||||
<div mod-port-symbol="gain1" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-right x42-eq-bw">
|
||||
<div mod-port-symbol="q1" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-freq1">
|
||||
<div mod-port-symbol="freq1" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-band">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-gain">
|
||||
<div mod-port-symbol="gain2" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-right x42-eq-bw">
|
||||
<div mod-port-symbol="q2" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-freq2">
|
||||
<div mod-port-symbol="freq2" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-band">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-gain">
|
||||
<div mod-port-symbol="gain3" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-right x42-eq-bw">
|
||||
<div mod-port-symbol="q3" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-freq3">
|
||||
<div mod-port-symbol="freq3" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-band">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-gain">
|
||||
<div mod-port-symbol="gain4" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-right x42-eq-bw">
|
||||
<div mod-port-symbol="q4" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-freq4">
|
||||
<div mod-port-symbol="freq4" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-band">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-gain">
|
||||
<div mod-port-symbol="HSgain" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-right x42-eq-bwhs">
|
||||
<div mod-port-symbol="HSq" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-left x42-eq-freq5">
|
||||
<div mod-port-symbol="HSfreq" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-hpf">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-freqh">
|
||||
<div mod-port-symbol="HPfreq" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-bwhp">
|
||||
<div mod-port-symbol="HPQ" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-toggle">
|
||||
<div mod-port-symbol="HighPass" mod-role="input-control-port" class="mod-toggle-image"></div>
|
||||
</div>
|
||||
<div class="x42-label"><h1>HighPass</h1></div>
|
||||
</div>
|
||||
<div class="x42-eq-global">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-gain">
|
||||
<div mod-port-symbol="gain" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-toggle">
|
||||
<div mod-port-symbol="enable" mod-role="input-control-port" class="mod-toggle-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x42-eq-lpf">
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-freql">
|
||||
<div mod-port-symbol="LPfreq" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-knob x42-eq-bwlp">
|
||||
<div mod-port-symbol="LPQ" mod-role="input-control-port" class="mod-knob-image"></div>
|
||||
</div>
|
||||
<div mod-button-type="knob" mod-role="icon-button" class="mod-toggle">
|
||||
<div mod-port-symbol="LowPass" mod-role="input-control-port" class="mod-toggle-image"></div>
|
||||
</div>
|
||||
<div class="x42-label"><h1>LowPass</h1></div>
|
||||
</div>
|
||||
<div class="x42-brand"><h1>{{brand}}</h1></div>
|
||||
</div>
|
||||
|
||||
<div class="mod-pedal-input">
|
||||
{{#effect.ports.audio.input}}
|
||||
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}">
|
||||
<div class="mod-pedal-input-image"></div>
|
||||
</div>
|
||||
{{/effect.ports.audio.input}}
|
||||
{{#effect.ports.midi.input}}
|
||||
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}">
|
||||
<div class="mod-pedal-input-image"></div>
|
||||
</div>
|
||||
{{/effect.ports.midi.input}}
|
||||
{{#effect.ports.cv.input}}
|
||||
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}">
|
||||
<div class="mod-pedal-input-image"></div>
|
||||
</div>
|
||||
{{/effect.ports.cv.input}}
|
||||
</div>
|
||||
<div class="mod-pedal-output">
|
||||
{{#effect.ports.audio.output}}
|
||||
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}">
|
||||
<div class="mod-pedal-output-image"></div>
|
||||
</div>
|
||||
{{/effect.ports.audio.output}}
|
||||
{{#effect.ports.midi.output}}
|
||||
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}">
|
||||
<div class="mod-pedal-output-image"></div>
|
||||
</div>
|
||||
{{/effect.ports.midi.output}}
|
||||
{{#effect.ports.cv.output}}
|
||||
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}">
|
||||
<div class="mod-pedal-output-image"></div>
|
||||
</div>
|
||||
{{/effect.ports.cv.output}}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,232 @@
|
|||
/* STYLES FOR THE BOXY PEDAL */
|
||||
|
||||
@import url(/fonts/nexa/stylesheet.css);
|
||||
@import url(/fonts/questrial/stylesheet.css);
|
||||
|
||||
|
||||
/* = CONTAINER
|
||||
================================================ */
|
||||
.mod-pedal-boxy{{{cns}}} {
|
||||
background-position:center center;
|
||||
background-repeat:no-repeat;
|
||||
position:absolute;
|
||||
border-radius: 21px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq {
|
||||
background-size:776px 451px;
|
||||
width:776px;
|
||||
height:451px;
|
||||
}
|
||||
|
||||
/* = Labels
|
||||
================================================ */
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .x42-brand {
|
||||
right:0px;
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
bottom:0px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .x42-brand h1 {
|
||||
font-family:"Nexa";
|
||||
font-size:28px;
|
||||
padding:0;
|
||||
margin:0;
|
||||
color:#aaa;
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}} .x42-label {
|
||||
left:30px;
|
||||
right:30px;
|
||||
bottom:28px;
|
||||
overflow:hidden;
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}} .x42-label h1 {
|
||||
font-family:"Questrial";
|
||||
font-size:16px;
|
||||
line-height:1;
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
/* = KNOBS
|
||||
================================================ */
|
||||
.mod-pedal-boxy{{{cns}}} .mod-control-group {
|
||||
margin:20px !important;
|
||||
position:relative;
|
||||
text-align:center;
|
||||
z-index:30;
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}} .top {
|
||||
margin-top:0px !important;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}} .mod-control-group .mod-knob {
|
||||
overflow:hidden;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}} .mod-control-group .mod-knob > span.mod-knob-title {
|
||||
bottom:0px;
|
||||
display:block;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
height:12px;
|
||||
left:0;
|
||||
line-height:1;
|
||||
margin:0;
|
||||
overflow:hidden;
|
||||
padding:0;
|
||||
position:absolute;
|
||||
right:0;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .mod-knob .mod-knob-image {
|
||||
background-image:url(/resources/x42-eq-knob.png{{{ns}}});
|
||||
background-repeat:no-repeat;
|
||||
background-size:auto 60px;
|
||||
height:60px;
|
||||
width:60px;
|
||||
margin:12px auto 0 auto;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-right .mod-knob-image {
|
||||
margin-top:2px !important;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .mod-toggle .mod-toggle-image {
|
||||
background-image:url(/resources/x42-eq-switch.png{{{ns}}});
|
||||
background-position:left center ;
|
||||
background-repeat:no-repeat;
|
||||
background-size:180px 35px;
|
||||
height:35px;
|
||||
width:90px;
|
||||
margin:0px auto 0 auto;
|
||||
cursor:pointer !important;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .mod-toggle {
|
||||
display:inline-block;
|
||||
width:90px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .mod-knob {
|
||||
display:inline-block;
|
||||
height:85px;
|
||||
width:95px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band {
|
||||
display:inline-block;
|
||||
width:120px;
|
||||
border: 1px solid #666;
|
||||
border-radius: 7px;
|
||||
padding: 5px 0 0 2px;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-hpf,
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-lpf {
|
||||
position:relative;
|
||||
display:inline-block;
|
||||
text-align:center;
|
||||
width:198px;
|
||||
border: 1px solid #666;
|
||||
border-radius: 7px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-global {
|
||||
position:relative;
|
||||
display:inline-block;
|
||||
border: 1px solid #666;
|
||||
border-radius: 7px;
|
||||
display:inline-block;
|
||||
width:100px;
|
||||
margin: 0 70px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-left {
|
||||
margin-right: 20px;
|
||||
background-position:left center ;
|
||||
background-repeat:no-repeat;
|
||||
background-size:93px 85px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-right {
|
||||
margin-left: 30px;
|
||||
background-position:left center ;
|
||||
background-repeat:no-repeat;
|
||||
background-size:93px 75px;
|
||||
height:75px;
|
||||
}
|
||||
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-global .mod-knob,
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-lpf .mod-knob,
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-hpf .mod-knob {
|
||||
background-position:left center ;
|
||||
background-repeat:no-repeat;
|
||||
background-size:93px 85px;
|
||||
}
|
||||
|
||||
/* = Knob faceplates
|
||||
================================================ */
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-global .x42-eq-gain,
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-gain {
|
||||
background-image:url(/resources/x42-eq-gain.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-bw {
|
||||
background-image:url(/resources/x42-eq-bw.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-bwhs {
|
||||
background-image:url(/resources/x42-eq-bwhs.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-bwls {
|
||||
background-image:url(/resources/x42-eq-bwls.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-freq0 {
|
||||
background-image:url(/resources/x42-eq-f0.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-freq1 {
|
||||
background-image:url(/resources/x42-eq-f1.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-freq2 {
|
||||
background-image:url(/resources/x42-eq-f2.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-freq3 {
|
||||
background-image:url(/resources/x42-eq-f3.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-freq4 {
|
||||
background-image:url(/resources/x42-eq-f4.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-band .x42-eq-freq5 {
|
||||
background-image:url(/resources/x42-eq-f5.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-lpf .x42-eq-freql {
|
||||
background-image:url(/resources/x42-eq-fl.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-lpf .x42-eq-bwlp {
|
||||
background-image:url(/resources/x42-eq-bwlp.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-hpf .x42-eq-freqh {
|
||||
background-image:url(/resources/x42-eq-fh.png{{{ns}}});
|
||||
}
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq .mod-control-group .x42-eq-hpf .x42-eq-bwhp {
|
||||
background-image:url(/resources/x42-eq-bwhp.png{{{ns}}});
|
||||
}
|
||||
|
||||
/* = BACKGROUND IMAGES - Color of the pedal
|
||||
================================================ */
|
||||
.mod-pedal-boxy{{{cns}}}.mod-x42-eq {
|
||||
/* background-image:url(/resources/background.png{{{ns}}}); TODO */
|
||||
background-color:#222;
|
||||
}
|
After Width: | Height: | Size: 652 B |
After Width: | Height: | Size: 650 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 578 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 870 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1006 B |
After Width: | Height: | Size: 954 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 856 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 250 KiB |
After Width: | Height: | Size: 10 KiB |
|
@ -0,0 +1,4 @@
|
|||
CFLAGS+=`pkg-config --cflags cairo pango pangocairo` -Wall
|
||||
LOADLIBES+=`pkg-config --libs cairo pango pangocairo` -lm
|
||||
|
||||
gen_image: gen_image.c
|
|
@ -0,0 +1,459 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <cairo/cairo.h>
|
||||
#include <pango/pango.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
/* colors */
|
||||
static const float c_blk[4] = {0.0, 0.0, 0.0, 1.0};
|
||||
static const float c_wht[4] = {1.0, 1.0, 1.0, 1.0};
|
||||
static const float c_dlf[4] = {0.8, 0.8, 0.8, 1.0};
|
||||
static const float c_ann[4] = {0.5, 0.5, 0.5, 1.0}; // text annotation color
|
||||
|
||||
/* filter parameters */
|
||||
typedef struct {
|
||||
float min;
|
||||
float max;
|
||||
float dflt;
|
||||
float warp;
|
||||
} FilterFreq;
|
||||
|
||||
/* frequency mapping */
|
||||
static const FilterFreq freqs[] = {
|
||||
/*min max dflt*/
|
||||
{ 25, 400, 80, 16}, // LS
|
||||
{ 20, 2000, 160, 100},
|
||||
{ 40, 4000, 397, 100},
|
||||
{ 100, 10000, 1250, 100},
|
||||
{ 200, 20000, 2500, 100},
|
||||
{1000, 16000, 8000, 16}, // HS
|
||||
};
|
||||
|
||||
static const FilterFreq lphp[2] = {
|
||||
{ 10, 1000, 20, 100}, // HP
|
||||
{ 630, 20000, 20000, 32}, // LP
|
||||
};
|
||||
|
||||
static const double GED_CX = 47;
|
||||
static const double GED_CY = 43.5;
|
||||
static const double GED_RADIUS = 28;
|
||||
static const double GED_WIDTH = 93;
|
||||
static const double GZLINE = 75 - 10;
|
||||
static const double SF_W = 93;
|
||||
static const double SF_H = 85;
|
||||
|
||||
static float dial_to_freq (const FilterFreq *m, float f) {
|
||||
return m->min + (m->max - m->min) * (pow((1. + m->warp), f) - 1.) / m->warp;
|
||||
}
|
||||
|
||||
static float bw_to_dial (float v) {
|
||||
if (v < .0625) return 0.f;
|
||||
if (v > 4.0) return 1.f;
|
||||
return log2f (16.f * v) / 6.f;
|
||||
}
|
||||
|
||||
|
||||
static float hplp_to_dial (const float v) {
|
||||
#if 1
|
||||
float rv = 0.525561 - 0.387896 * atan(4.5601 - 5.2275 * v);
|
||||
if (rv < 0) return 0;
|
||||
if (rv > 1.0) return 1.0;
|
||||
return rv;
|
||||
#else
|
||||
return v / 1.4;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void print_hz (char *t, float hz) {
|
||||
//printf("%f ", hz);
|
||||
hz = 5 * rintf(hz / 5.f);
|
||||
if (hz >= 990) {
|
||||
int dec = ((int)rintf (hz / 100.f)) % 10;
|
||||
if (dec != 0) {
|
||||
snprintf(t, 8, "%.0fK%d", floor(hz / 1000.f), dec);
|
||||
} else {
|
||||
snprintf(t, 8, "%.0fK", hz / 1000.f);
|
||||
}
|
||||
} else {
|
||||
snprintf(t, 8, "%.0f", hz);
|
||||
}
|
||||
//printf("-> %f -> %s\n", hz, t);
|
||||
}
|
||||
|
||||
|
||||
static void write_text_full (
|
||||
cairo_t* cr,
|
||||
const char *txt,
|
||||
PangoFontDescription *font,
|
||||
const float x, const float y,
|
||||
const float ang, const int align,
|
||||
const float * const col) {
|
||||
int tw, th;
|
||||
cairo_save(cr);
|
||||
|
||||
PangoLayout * pl = pango_cairo_create_layout(cr);
|
||||
pango_layout_set_font_description(pl, font);
|
||||
if (strncmp(txt, "<markup>", 8)) {
|
||||
pango_layout_set_text(pl, txt, -1);
|
||||
} else {
|
||||
pango_layout_set_markup(pl, txt, -1);
|
||||
}
|
||||
pango_layout_get_pixel_size(pl, &tw, &th);
|
||||
cairo_translate (cr, rintf(x), rintf(y));
|
||||
if (ang != 0) { cairo_rotate (cr, ang); }
|
||||
switch(abs(align)) {
|
||||
case 1:
|
||||
cairo_translate (cr, -tw, ceil(th/-2.0));
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_RIGHT);
|
||||
break;
|
||||
case 2:
|
||||
cairo_translate (cr, ceil(tw/-2.0), ceil(th/-2.0));
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_CENTER);
|
||||
break;
|
||||
case 3:
|
||||
cairo_translate (cr, 0, ceil(th/-2.0));
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_LEFT);
|
||||
break;
|
||||
case 4:
|
||||
cairo_translate (cr, -tw, -th);
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_RIGHT);
|
||||
break;
|
||||
case 5:
|
||||
cairo_translate (cr, ceil(tw/-2.0), -th);
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_CENTER);
|
||||
break;
|
||||
case 6:
|
||||
cairo_translate (cr, 0, -th);
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_LEFT);
|
||||
break;
|
||||
case 7:
|
||||
cairo_translate (cr, -tw, 0);
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_RIGHT);
|
||||
break;
|
||||
case 8:
|
||||
cairo_translate (cr, ceil(tw/-2.0), 0);
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_CENTER);
|
||||
break;
|
||||
case 9:
|
||||
cairo_translate (cr, 0, 0);
|
||||
pango_layout_set_alignment (pl, PANGO_ALIGN_LEFT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (align < 0) {
|
||||
cairo_set_source_rgba (cr, .0, .0, .0, .5);
|
||||
cairo_rectangle (cr, 0, 0, tw, th);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
#if 1
|
||||
cairo_set_source_rgba (cr, col[0], col[1], col[2], col[3]);
|
||||
pango_cairo_show_layout(cr, pl);
|
||||
#else
|
||||
cairo_set_source_rgba (cr, col[0], col[1], col[2], col[3]);
|
||||
pango_cairo_layout_path(cr, pl);
|
||||
cairo_fill(cr);
|
||||
#endif
|
||||
g_object_unref(pl);
|
||||
cairo_restore(cr);
|
||||
cairo_new_path (cr);
|
||||
}
|
||||
|
||||
#define CairoSetSouerceRGBA(COL) \
|
||||
cairo_set_source_rgba (cr, (COL)[0], (COL)[1], (COL)[2], (COL)[3])
|
||||
|
||||
|
||||
#define DIALDOTS(V, XADD, YADD) \
|
||||
float ang = (-.75 * M_PI) + (1.5 * M_PI) * (V); \
|
||||
xlp = GED_CX + XADD + sinf (ang) * (GED_RADIUS); \
|
||||
ylp = GED_CY + YADD - cosf (ang) * (GED_RADIUS); \
|
||||
cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); \
|
||||
CairoSetSouerceRGBA(c_dlf); \
|
||||
cairo_set_line_width(cr, 2.5); \
|
||||
cairo_move_to(cr, rint(xlp)-.5, rint(ylp)-.5); \
|
||||
cairo_close_path(cr); \
|
||||
cairo_stroke(cr);
|
||||
|
||||
|
||||
#define RESPLABLEL(V) \
|
||||
{ \
|
||||
DIALDOTS(V, 0, 0) \
|
||||
xlp = GED_CX + sinf (ang) * (GED_RADIUS + 6.5); \
|
||||
ylp = GED_CY - cosf (ang) * (GED_RADIUS + 6.5); \
|
||||
}
|
||||
|
||||
|
||||
static void gain_knob (cairo_t* cr)
|
||||
{
|
||||
float xlp, ylp;
|
||||
PangoFontDescription* font = pango_font_description_from_string("Mono 9px");
|
||||
|
||||
RESPLABLEL(0.00);
|
||||
write_text_full(cr, "-18", font, xlp, ylp, 0, 1, c_dlf);
|
||||
RESPLABLEL(.16);
|
||||
write_text_full(cr, "-12", font, xlp, ylp, 0, 1, c_dlf);
|
||||
RESPLABLEL(.33);
|
||||
write_text_full(cr, "-6", font, xlp, ylp, 0, 1, c_dlf);
|
||||
RESPLABLEL(0.5);
|
||||
write_text_full(cr, "0dB", font, xlp-1, ylp-1, 0, 2, c_dlf);
|
||||
RESPLABLEL(.66);
|
||||
write_text_full(cr, "+6", font, xlp-3, ylp, 0, 3, c_dlf);
|
||||
RESPLABLEL(.83);
|
||||
write_text_full(cr, "+12", font, xlp-3, ylp, 0, 3, c_dlf);
|
||||
RESPLABLEL(1.0);
|
||||
write_text_full(cr, "+18", font, xlp-3, ylp, 0, 3, c_dlf);
|
||||
pango_font_description_free (font);
|
||||
}
|
||||
|
||||
#define BWX 10
|
||||
|
||||
static void bw_knob (cairo_t* cr)
|
||||
{
|
||||
const double GED_CY = 33.5;
|
||||
float xlp, ylp;
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
cairo_set_line_width(cr, 1.25);
|
||||
cairo_move_to (cr, 1 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 8 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 10 + BWX, GZLINE - 4);
|
||||
cairo_line_to (cr, 12 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 19 + BWX, GZLINE);
|
||||
cairo_move_to (cr, 12 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 10 + BWX, GZLINE + 4);
|
||||
cairo_line_to (cr, 8 + BWX, GZLINE);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, GED_WIDTH - BWX - 1, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 4, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 10, GZLINE - 4);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 16, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 19, GZLINE);
|
||||
cairo_move_to (cr, GED_WIDTH - BWX - 16, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 10, GZLINE + 4);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 4, GZLINE);
|
||||
cairo_stroke (cr);
|
||||
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, 4 / 2.f)), .0, .5) }
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, 2 / 2.f)), .0, .5) }
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, 0 / 2.f)), .0, .5) }
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, -2 / 2.f)), .0, .5) }
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, -4 / 2.f)), .0, .5) }
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, -6 / 2.f)), .0, .5) }
|
||||
{ DIALDOTS(bw_to_dial (powf(2.f, -8 / 2.f)), .0, .5) }
|
||||
}
|
||||
|
||||
static void bw_ls_knob (cairo_t* cr)
|
||||
{
|
||||
const double GED_CY = 33.5;
|
||||
float xlp, ylp;
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
cairo_set_line_width(cr, 1.25);
|
||||
cairo_move_to (cr, 1 + BWX, GZLINE - 3);
|
||||
cairo_line_to (cr, 4 + BWX, GZLINE - 3);
|
||||
cairo_line_to (cr, 14 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 18 + BWX, GZLINE);
|
||||
cairo_move_to (cr, 14 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 4 + BWX, GZLINE + 3);
|
||||
cairo_line_to (cr, 1 + BWX, GZLINE + 3);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, GED_WIDTH - BWX - 1, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 7, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 10, GZLINE - 3);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 18, GZLINE - 3);
|
||||
cairo_move_to (cr, GED_WIDTH - BWX - 7, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 10, GZLINE + 3);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 18, GZLINE + 3);
|
||||
cairo_stroke (cr);
|
||||
|
||||
CairoSetSouerceRGBA(c_ann);
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
cairo_arc (cr, GED_CX + 0, GED_CY, GED_RADIUS + 2.0, -.25 * M_PI, .25 * M_PI);
|
||||
cairo_stroke (cr);
|
||||
cairo_arc (cr, GED_CX - 1, GED_CY, GED_RADIUS + 2.0, 0.75 * M_PI, 1.25 * M_PI);
|
||||
cairo_stroke (cr);
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
|
||||
{ DIALDOTS( 0.0, .0, .5) }
|
||||
{ DIALDOTS(1/6.f, .0, .5) }
|
||||
{ DIALDOTS(2/6.f, .0, .5) }
|
||||
{ DIALDOTS(3/6.f, .0, .5) }
|
||||
{ DIALDOTS(4/6.f, .0, .5) }
|
||||
{ DIALDOTS(5/6.f, .0, .5) }
|
||||
{ DIALDOTS( 1.0, .0, .5) }
|
||||
}
|
||||
|
||||
static void bw_hs_knob (cairo_t* cr)
|
||||
{
|
||||
const double GED_CY = 33.5;
|
||||
float xlp, ylp;
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
cairo_set_line_width(cr, 1.25);
|
||||
cairo_move_to (cr, 18 + BWX, GZLINE - 3);
|
||||
cairo_line_to (cr, 15 + BWX, GZLINE - 3);
|
||||
cairo_line_to (cr, 5 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 1 + BWX, GZLINE);
|
||||
cairo_move_to (cr, 5 + BWX, GZLINE);
|
||||
cairo_line_to (cr, 15 + BWX, GZLINE + 3);
|
||||
cairo_line_to (cr, 18 + BWX, GZLINE + 3);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, GED_WIDTH - BWX - 18, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 12, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 8, GZLINE - 3);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 1, GZLINE - 3);
|
||||
cairo_move_to (cr, GED_WIDTH - BWX - 12, GZLINE);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 9, GZLINE + 3);
|
||||
cairo_line_to (cr, GED_WIDTH - BWX - 1, GZLINE + 3);
|
||||
cairo_stroke (cr);
|
||||
|
||||
CairoSetSouerceRGBA(c_ann);
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
cairo_arc (cr, GED_CX + 0, GED_CY, GED_RADIUS + 2.0, -.25 * M_PI, .25 * M_PI);
|
||||
cairo_stroke (cr);
|
||||
cairo_arc (cr, GED_CX - 1, GED_CY, GED_RADIUS + 2.0, 0.75 * M_PI, 1.25 * M_PI);
|
||||
cairo_stroke (cr);
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
|
||||
{ DIALDOTS( 0.0, .0, .5) }
|
||||
{ DIALDOTS(1/6.f, .0, .5) }
|
||||
{ DIALDOTS(2/6.f, .0, .5) }
|
||||
{ DIALDOTS(3/6.f, .0, .5) }
|
||||
{ DIALDOTS(4/6.f, .0, .5) }
|
||||
{ DIALDOTS(5/6.f, .0, .5) }
|
||||
{ DIALDOTS( 1.0, .0, .5) }
|
||||
}
|
||||
|
||||
|
||||
#define HLX 3 // Hi/Low pass icon x-offset
|
||||
|
||||
static void bw_hp_knob (cairo_t* cr)
|
||||
{
|
||||
float xlp, ylp;
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
cairo_set_line_width(cr, 1.25);
|
||||
|
||||
cairo_move_to (cr, 1 + HLX, GZLINE - 1);
|
||||
cairo_line_to (cr, 6 + HLX, GZLINE - 1);
|
||||
cairo_curve_to (cr, 8 + HLX, GZLINE - 1, 18 + HLX, GZLINE - 0, 18 + HLX, GZLINE + 3);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, GED_WIDTH - HLX - 18, GZLINE - 1);
|
||||
cairo_line_to (cr, GED_WIDTH - HLX - 12, GZLINE - 1);
|
||||
cairo_line_to (cr, GED_WIDTH - HLX - 8, GZLINE - 3);
|
||||
cairo_line_to (cr, GED_WIDTH - HLX - 1, GZLINE + 3);
|
||||
cairo_stroke (cr);
|
||||
|
||||
{ DIALDOTS( 0.0, .0, .5) }
|
||||
{ DIALDOTS(hplp_to_dial(.71), .0, .5) }
|
||||
{ DIALDOTS( 0.5, .0, .5) }
|
||||
{ DIALDOTS(hplp_to_dial(1.0), .0, .5) }
|
||||
{ DIALDOTS( 1.0, .0, .5) }
|
||||
}
|
||||
|
||||
static void bw_lp_knob (cairo_t* cr)
|
||||
{
|
||||
float xlp, ylp;
|
||||
CairoSetSouerceRGBA(c_dlf);
|
||||
cairo_set_line_width(cr, 1.25);
|
||||
cairo_move_to (cr, 1 + HLX, GZLINE + 3);
|
||||
cairo_curve_to (cr, 1 + HLX, GZLINE - 0, 11 + HLX, GZLINE - 1, 13 + HLX, GZLINE - 1);
|
||||
cairo_line_to (cr, 18 + HLX, GZLINE - 1);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, GED_WIDTH - HLX - 18, GZLINE + 3);
|
||||
cairo_line_to (cr, GED_WIDTH - HLX - 12, GZLINE - 3);
|
||||
cairo_line_to (cr, GED_WIDTH - HLX - 8, GZLINE - 1);
|
||||
cairo_line_to (cr, GED_WIDTH - HLX - 1, GZLINE - 1);
|
||||
cairo_stroke (cr);
|
||||
|
||||
{ DIALDOTS( 0.0, .0, .5) }
|
||||
{ DIALDOTS(hplp_to_dial(.71), .0, .5) }
|
||||
{ DIALDOTS( 0.5, .0, .5) }
|
||||
{ DIALDOTS(hplp_to_dial(1.0), .0, .5) }
|
||||
{ DIALDOTS( 1.0, .0, .5) }
|
||||
}
|
||||
|
||||
|
||||
static void freq_knob (cairo_t* cr, FilterFreq const * const f)
|
||||
{
|
||||
float xlp, ylp;
|
||||
char tfq[8];
|
||||
|
||||
PangoFontDescription* font = pango_font_description_from_string("Mono 9px");
|
||||
|
||||
print_hz(tfq, dial_to_freq(f, 0));
|
||||
RESPLABLEL(0.00); write_text_full(cr, tfq, font, xlp, ylp, 0, 1, c_dlf);
|
||||
|
||||
print_hz(tfq, dial_to_freq(f, .25));
|
||||
RESPLABLEL(0.25); write_text_full(cr, tfq, font, xlp, ylp, 0, 1, c_dlf);
|
||||
|
||||
print_hz(tfq, dial_to_freq(f, .50));
|
||||
RESPLABLEL(0.50); write_text_full(cr, tfq, font, xlp, ylp, 0, 2, c_dlf);
|
||||
|
||||
print_hz(tfq, dial_to_freq(f, .75));
|
||||
RESPLABLEL(0.75); write_text_full(cr, tfq, font, xlp-2, ylp, 0, 3, c_dlf);
|
||||
|
||||
print_hz(tfq, dial_to_freq(f, 1.0));
|
||||
RESPLABLEL(1.00); write_text_full(cr, tfq, font, xlp-2, ylp, 0, 3, c_dlf);
|
||||
|
||||
pango_font_description_free (font);
|
||||
}
|
||||
|
||||
#define SF_NEW(W,H) \
|
||||
cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, W, H); \
|
||||
cr = cairo_create(cs);
|
||||
|
||||
#define SF_END(NAME) \
|
||||
cairo_surface_write_to_png(cs, NAME); \
|
||||
cairo_destroy (cr); \
|
||||
cairo_surface_destroy (cs);
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
cairo_surface_t* cs;
|
||||
cairo_t* cr;
|
||||
|
||||
SF_NEW (SF_W, SF_H);
|
||||
gain_knob (cr);
|
||||
SF_END ("../modgui/x42-eq-gain.png");
|
||||
|
||||
SF_NEW (SF_W, SF_H - 10);
|
||||
bw_knob (cr);
|
||||
SF_END ("../modgui/x42-eq-bw.png");
|
||||
|
||||
SF_NEW (SF_W, SF_H - 10);
|
||||
bw_hs_knob (cr);
|
||||
SF_END ("../modgui/x42-eq-bwhs.png");
|
||||
|
||||
SF_NEW (SF_W, SF_H - 10);
|
||||
bw_ls_knob (cr);
|
||||
SF_END ("../modgui/x42-eq-bwls.png");
|
||||
|
||||
SF_NEW (SF_W, SF_H);
|
||||
bw_lp_knob (cr);
|
||||
SF_END ("../modgui/x42-eq-bwlp.png");
|
||||
|
||||
SF_NEW (SF_W, SF_H);
|
||||
bw_hp_knob (cr);
|
||||
SF_END ("../modgui/x42-eq-bwhp.png");
|
||||
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
char name[64];
|
||||
sprintf(name, "../modgui/x42-eq-f%d.png",i);
|
||||
SF_NEW (SF_W, SF_H);
|
||||
freq_knob (cr, &freqs[i]);
|
||||
SF_END (name);
|
||||
}
|
||||
|
||||
SF_NEW (SF_W, SF_H);
|
||||
freq_knob (cr, &lphp[0]);
|
||||
SF_END ("../modgui/x42-eq-fh.png");
|
||||
|
||||
SF_NEW (SF_W, SF_H);
|
||||
freq_knob (cr, &lphp[1]);
|
||||
SF_END ("../modgui/x42-eq-fl.png");
|
||||
|
||||
return 0;
|
||||
}
|