@@ -0,0 +1,56 @@ | |||
@prefix mod: <http://moddevices.com/ns/mod#> . | |||
@prefix modgui: <http://moddevices.com/ns/modgui#> . | |||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |||
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> . | |||
<http://distrho.sf.net/plugins/MVerb> | |||
mod:brand "DISTRHO" ; | |||
mod:label "MVerb" ; | |||
modgui:gui [ | |||
modgui:resourcesDirectory <modgui> ; | |||
modgui:iconTemplate <modgui/icon-mverb.html> ; | |||
modgui:stylesheet <modgui/stylesheet-mverb.css> ; | |||
modgui:screenshot <modgui/screenshot-mverb.png> ; | |||
modgui:thumbnail <modgui/thumbnail-mverb.png> ; | |||
modgui:brand "Martin Eastwood" ; | |||
modgui:label "MVerb" ; | |||
modgui:model "combo-model-001" ; | |||
modgui:panel "0930" ; | |||
modgui:port [ | |||
lv2:index 0 ; | |||
lv2:symbol "mix" ; | |||
lv2:name "MIX" ; | |||
] , [ | |||
lv2:index 1 ; | |||
lv2:symbol "predelay" ; | |||
lv2:name "PRE" ; | |||
] , [ | |||
lv2:index 2 ; | |||
lv2:symbol "earlymix" ; | |||
lv2:name "EL/MIX" ; | |||
] , [ | |||
lv2:index 3 ; | |||
lv2:symbol "size" ; | |||
lv2:name "SIZE" ; | |||
] , [ | |||
lv2:index 4 ; | |||
lv2:symbol "density" ; | |||
lv2:name "DENSITY" ; | |||
] , [ | |||
lv2:index 5 ; | |||
lv2:symbol "bandwidth" ; | |||
lv2:name "BAND" ; | |||
] , [ | |||
lv2:index 6 ; | |||
lv2:symbol "decay" ; | |||
lv2:name "DECAY" ; | |||
] , [ | |||
lv2:index 7 ; | |||
lv2:symbol "damping" ; | |||
lv2:name "DAMP" ; | |||
] , [ | |||
lv2:index 8 ; | |||
lv2:symbol "gain" ; | |||
lv2:name "GAIN" ; | |||
] ; | |||
] . |
@@ -0,0 +1,92 @@ | |||
<div class="mod-pedal mod-combo-model-001{{{cns}}} mod-combo-model-001-0930{{{cns}}}"> | |||
<div mod-role="drag-handle" class="mod-drag-handle"></div> | |||
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div> | |||
<div class="mod-plugin-name"><h1>{{label}}</h1></div> | |||
<div class="mod-control-group clearfix"> | |||
<div class="mod-switch" mod-role="bypass"> | |||
<div class="mod-switch-image" mod-role="bypass-light"></div> | |||
</div> | |||
<div class="mod-separator"></div> | |||
{{#controls.0}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.0}} | |||
<div class="mod-separator"></div> | |||
{{#controls.1}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.1}} | |||
{{#controls.2}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.2}} | |||
<div class="mod-separator"></div> | |||
{{#controls.3}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.3}} | |||
{{#controls.4}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.4}} | |||
{{#controls.5}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.5}} | |||
{{#controls.6}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.6}} | |||
{{#controls.7}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.7}} | |||
<div class="mod-separator"></div> | |||
{{#controls.8}} | |||
<div class="mod-chicken-head"> | |||
<div class="mod-chicken-head-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-chicken-head-title">{{name}}</span> | |||
</div> | |||
{{/controls.8}} | |||
</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}} | |||
</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}} | |||
</div> | |||
</div> |
@@ -0,0 +1,220 @@ | |||
/* SKINS */ | |||
.mod-combo-model-001{{{cns}}} { | |||
border-radius: 20px; | |||
} | |||
.mod-combo-model-001-0550{{{cns}}} { | |||
background-image: url(/resources/combos/model-001/model-0550.png{{{ns}}}); | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
height: 200px; | |||
position: relative; | |||
width: 550px; | |||
} | |||
.mod-combo-model-001-0625{{{cns}}} { | |||
background-image: url(/resources/combos/model-001/model-0625.png{{{ns}}}); | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
height: 200px; | |||
position: relative; | |||
width: 625px; | |||
} | |||
.mod-combo-model-001-0778{{{cns}}} { | |||
background-image: url(/resources/combos/model-001/model-0778.png{{{ns}}}); | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
height: 200px; | |||
position: relative; | |||
width: 778px; | |||
} | |||
.mod-combo-model-001-0930{{{cns}}} { | |||
background-image: url(/resources/combos/model-001/model-0930.png{{{ns}}}); | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
height: 200px; | |||
position: relative; | |||
width: 930px; | |||
} | |||
/* THE AUTHOR */ | |||
.mod-combo-model-001{{{cns}}} .mod-plugin-brand h1 { | |||
color: #333; | |||
font-size: 18px; | |||
font-weight: bold; | |||
left: 80px; | |||
line-height: 1; | |||
margin: 0; | |||
position: absolute; | |||
top: 23px; | |||
} | |||
/* PLUGIN'S NAME */ | |||
.mod-combo-model-001{{{cns}}} .mod-plugin-name h1 { | |||
color: #333; | |||
font-size: 18px; | |||
font-weight: bold; | |||
line-height: 1; | |||
margin: 0; | |||
position: absolute; | |||
right: 80px; | |||
top: 23px; | |||
} | |||
/* CONTROLS */ | |||
.mod-combo-model-001{{{cns}}} .mod-control-group { | |||
border-color: #000; | |||
border-style: solid; | |||
border-width: 1px 0 0 0; | |||
bottom: 149px; | |||
color: #000; | |||
font-size: 10px; | |||
font-weight: bold; | |||
height: 71px; | |||
left: 58px; | |||
position: absolute; | |||
right: 58px; | |||
top: 47px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-control-group > div { | |||
margin-right: 2px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-pedal-input, | |||
.mod-combo-model-001{{{cns}}} .mod-pedal-output { | |||
top: 30px; | |||
} | |||
/* SWITCH ON/OFF GENERAL */ | |||
.mod-combo-model-001{{{cns}}} .mod-switch { | |||
cursor: pointer; | |||
float: left; | |||
height: 71px; | |||
position: relative; | |||
width: 130px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-switch-image { | |||
background-image: url(/resources/switches/switch-001.png{{{ns}}}); | |||
background-position: -9px 0px; | |||
background-repeat: no-repeat; | |||
background-size: auto 71px; | |||
height: 71px; | |||
width: 71px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-switch-image.on { | |||
background-position: -80px 0px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-switch-image.off { | |||
background-position: -9px 0px; | |||
} | |||
/* CHICKEN HEAD */ | |||
.mod-combo-model-001{{{cns}}} .mod-chicken-head { | |||
float: left; | |||
height: 71px; | |||
overflow: hidden; | |||
position: relative; | |||
text-align: center; | |||
width: 71px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-chicken-head .mod-chicken-head-image { | |||
background-image: url(/resources/knobs/chicken-head/_strip.png{{{ns}}}); | |||
background-position: left 0px; | |||
background-repeat: no-repeat; | |||
background-size: auto 71px; | |||
height: 71px; | |||
margin-top: 3px; | |||
position: relative; | |||
width: 71px; | |||
z-index: 2; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-chicken-head .mod-chicken-head-title { | |||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; | |||
font-size: 10px; | |||
font-weight: bold; | |||
height:18px; | |||
left: 0; | |||
overflow:hidden; | |||
position: absolute; | |||
right: 0; | |||
text-transform: uppercase; | |||
top: 0; | |||
z-index: 1; | |||
} | |||
/* ENUMERATED LIST */ | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated { | |||
color:#fff; | |||
display:inline-block; | |||
left:132px; | |||
overflow:hidden; | |||
position:absolute; | |||
top:-27px; | |||
width:240px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated .mod-enumerated-selected { | |||
background-color:rgba(0,0,0,.8); | |||
background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}}); | |||
background-position:right center; | |||
background-repeat:no-repeat; | |||
border-radius:4px; | |||
box-shadow:inset 1px 1px 5px #000; | |||
color:#fff; | |||
font-size:12px; | |||
height:24px; | |||
line-height:2; | |||
margin-right:8px; | |||
overflow:hidden; | |||
padding:0 9px; | |||
} | |||
/* WHEN IS HOVER */ | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated:hover .mod-enumerated-selected { | |||
border-radius:4px 4px 0 0; | |||
} | |||
/* THE LIST OF OPTIONS */ | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated .mod-enumerated-list { | |||
display:none; | |||
font-weight:bold; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated .mod-enumerated-list > div { | |||
padding:3px 9px; | |||
} | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated .mod-enumerated-list > div:hover { | |||
background:rgba(255,255,255,.2); | |||
cursor:pointer; | |||
} | |||
/* WHEN THE LIST IS SHOWING */ | |||
.mod-combo-model-001{{{cns}}} .mod-enumerated .mod-enumerated-list { | |||
background:rgba(0,0,0,.9); | |||
display:none; | |||
height:85px; | |||
overflow:auto; | |||
position:relative; | |||
width:232px; | |||
z-index:3; | |||
} | |||
/* SEPARATOR */ | |||
.mod-combo-model-001{{{cns}}} .mod-separator { | |||
background: #000; | |||
display: inline-block; | |||
float: left; | |||
height: 69px; | |||
margin-top: 2px; | |||
width: 1px; | |||
} |
@@ -0,0 +1,46 @@ | |||
@prefix modgui: <http://moddevices.com/ns/modgui#> . | |||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |||
<http://distrho.sf.net/plugins/Modulay> | |||
modgui:gui [ | |||
modgui:resourcesDirectory <modgui> ; | |||
modgui:iconTemplate <modgui/icon-modulay.html> ; | |||
modgui:stylesheet <modgui/stylesheet-modulay.css> ; | |||
modgui:screenshot <modgui/screenshot-modulay.png> ; | |||
modgui:thumbnail <modgui/thumbnail-modulay.png> ; | |||
modgui:brand "Shiro" ; | |||
modgui:label "Modulay" ; | |||
modgui:model "boxy" ; | |||
modgui:panel "7-knobs" ; | |||
modgui:color "racing" ; | |||
modgui:knob "black" ; | |||
modgui:port [ | |||
lv2:index 0 ; | |||
lv2:symbol "time" ; | |||
lv2:name "time" ; | |||
] , [ | |||
lv2:index 1 ; | |||
lv2:symbol "repeats" ; | |||
lv2:name "repeats" ; | |||
] , [ | |||
lv2:index 2 ; | |||
lv2:symbol "cutoff" ; | |||
lv2:name "cutoff" ; | |||
] , [ | |||
lv2:index 3 ; | |||
lv2:symbol "mix" ; | |||
lv2:name "mix" ; | |||
] , [ | |||
lv2:index 4 ; | |||
lv2:symbol "depth" ; | |||
lv2:name "depth" ; | |||
] , [ | |||
lv2:index 5 ; | |||
lv2:symbol "rate" ; | |||
lv2:name "rate" ; | |||
] , [ | |||
lv2:index 6 ; | |||
lv2:symbol "delay" ; | |||
lv2:name "delay" ; | |||
] ; | |||
] . |
@@ -0,0 +1,49 @@ | |||
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-seven-knobs mod-boxy75 mod-{{color}} {{color}}"> | |||
<div mod-role="drag-handle" class="mod-drag-handle"></div> | |||
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div> | |||
<div class="mod-plugin-name"><h1>{{label}}</h1></div> | |||
<div class="mod-light on" mod-role="bypass-light"></div> | |||
<div class="mod-control-group mod-{{knob}} clearfix"> | |||
{{#controls}} | |||
<div class="mod-knob"> | |||
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-knob-title">{{name}}</span> | |||
</div> | |||
{{/controls}} | |||
</div> | |||
<div class="mod-footswitch" mod-role="bypass"></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,13 @@ | |||
@prefix mod: <http://moddevices.com/ns/mod#>. | |||
@prefix modgui: <http://moddevices.com/ns/modgui#>. | |||
<http://distrho.sf.net/plugins/PingPongPan> | |||
mod:brand "DISTRHO"; | |||
mod:label "PingPongPan"; | |||
modgui:gui [ | |||
modgui:resourcesDirectory <modgui>; | |||
modgui:iconTemplate <modgui/icon-ppp.html>; | |||
modgui:stylesheet <modgui/stylesheet-ppp.css>; | |||
modgui:screenshot <modgui/screenshot-ppp.png>; | |||
modgui:thumbnail <modgui/thumb-ppp.png>; | |||
]. |
@@ -0,0 +1,41 @@ | |||
<div class="pingpongpan mod-pedal mod-pedal-boxy{{{cns}}}"> | |||
<div mod-role="drag-handle" class="mod-drag-handle"></div> | |||
<div class="mod-light on" mod-role="bypass-light"></div> | |||
<div class="mod-control-group clearfix"> | |||
<div class="mod-knob pingpongpan-knob_freq"> | |||
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="freq"></div> | |||
</div> | |||
<div class="mod-knob pingpongpan-knob_width"> | |||
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="width"></div> | |||
</div> | |||
</div> | |||
<div class="mod-footswitch" mod-role="bypass"></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}} | |||
</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-input-image"></div> | |||
</div> | |||
{{/effect.ports.midi.output}} | |||
</div> | |||
</div> |
@@ -0,0 +1,228 @@ | |||
/* 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; | |||
background-size:230px 431px; | |||
height:431px; | |||
position:absolute; | |||
width:230px; | |||
border-radius: 26px; | |||
} | |||
/* = PLUGIN'S AUTHOR | |||
================================================ */ | |||
.mod-pedal-boxy{{{cns}}} .mod-plugin-brand { | |||
left:0; | |||
position:absolute; | |||
right:0; | |||
text-align:center; | |||
text-transform:uppercase; | |||
top:160px; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-plugin-brand h1 { | |||
border-color:#000; | |||
border-radius:12px; | |||
border-style:solid; | |||
border-width:4px; | |||
display:inline-block; | |||
font-family:"Nexa"; | |||
font-size:32px; | |||
padding:3px 9px 0; | |||
} | |||
/* = PLUGIN'S NAME | |||
================================================ */ | |||
.mod-pedal-boxy{{{cns}}} .mod-plugin-name { | |||
left:30px; | |||
overflow:hidden; | |||
position:absolute; | |||
right:30px; | |||
text-align:center; | |||
top:340px; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-plugin-name h1 { | |||
font-family:"Questrial"; | |||
font-size:21px; | |||
line-height:1; | |||
} | |||
/* = LIGHT ON/OFF | |||
================================================ */ | |||
.mod-pedal-boxy{{{cns}}} .mod-light { | |||
background-position:center center; | |||
background-repeat:no-repeat; | |||
height:32px; | |||
left:10px; | |||
position:absolute; | |||
right:10px; | |||
top:235px; | |||
} | |||
/* = KNOBS | |||
================================================ */ | |||
.mod-pedal-boxy{{{cns}}} .mod-control-group { | |||
margin:20px; | |||
position:relative; | |||
text-align:center; | |||
z-index:30; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-control-group .mod-knob { | |||
overflow:hidden; | |||
position:relative; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-control-group .mod-knob { | |||
height:110px; | |||
} | |||
.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; | |||
} | |||
/* = ENUMERATED LIST | |||
================================================ */ | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated-group { | |||
height:31px; | |||
margin:20px auto 0 !important; | |||
position:relative; | |||
width:190px; | |||
z-index:35; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated { | |||
background-position:right center; | |||
background-repeat:no-repeat; | |||
font-size:11px; | |||
font-weight:bold; | |||
left:0; | |||
line-height:2; | |||
overflow:hidden; | |||
position:absolute; | |||
right:0; | |||
text-align:left; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated .mod-enumerated-selected { | |||
background-color:rgba(0,0,0,.3); | |||
box-shadow:inset 0 0 4px rgba(0,0,0,.3); | |||
border-radius:4px; | |||
padding:3px 9px; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated .mod-enumerated-selected { | |||
border-radius:4px 4px 0 0; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated .mod-enumerated-list { | |||
display:none; | |||
color:#fff; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated .mod-enumerated-list { | |||
background-color:rgba(0,0,0,.9); | |||
display:none; | |||
height:115px; | |||
overflow:auto; | |||
position:relative; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated .mod-enumerated-list > div { | |||
padding:3px 9px; | |||
} | |||
.mod-pedal-boxy{{{cns}}} .mod-enumerated .mod-enumerated-list > div:hover { | |||
background-color:rgba(255,255,255,.2); | |||
cursor:pointer; | |||
} | |||
/* STYLES FOR THE PLUGIN */ | |||
.pingpongpan * { | |||
color:black !important; | |||
} | |||
.pingpongpan { | |||
background-image:url(/resources/background.png{{{ns}}}) !important; | |||
background-size:615px 344px; | |||
width:615px; | |||
height:344px; | |||
border-radius: 0; | |||
} | |||
.pingpongpan .mod-control-group { | |||
width:500px; | |||
height:220px; | |||
} | |||
.pingpongpan .mod-control-group .mod-knob { | |||
height:220px !important; | |||
} | |||
.pingpongpan .mod-control-group .mod-knob .mod-knob-image { | |||
background-image:url(/resources/knob.png{{{ns}}}); | |||
background-position:left center; | |||
background-repeat:no-repeat; | |||
background-size:auto 220px; | |||
height:220px; | |||
width:220px; | |||
margin:0 auto; | |||
cursor:pointer; | |||
position:relative; | |||
overflow:hidden; | |||
} | |||
.pingpongpan .mod-control-group .pingpongpan-knob_freq { | |||
top:55px; | |||
left:58px; | |||
position:absolute; | |||
} | |||
.pingpongpan .mod-control-group .pingpongpan-knob_width { | |||
top:55px; | |||
left:302px; | |||
position:absolute; | |||
} | |||
.pingpongpan .mod-light { | |||
top:32px; | |||
left:320px; | |||
} | |||
.pingpongpan .mod-footswitch { | |||
background-image:url(/resources/footswitch.png{{{ns}}}); | |||
background-position:top center; | |||
background-repeat:no-repeat; | |||
background-size:auto 132px; | |||
top:15px; | |||
right:55px; | |||
cursor:pointer; | |||
height:66px; | |||
width: 66px; | |||
position:absolute; | |||
} | |||
.pingpongpan .mod-footswitch.on { | |||
background-position:top center; | |||
} | |||
.pingpongpan .mod-footswitch.off { | |||
background-position:bottom center; | |||
} | |||
.pingpongpan .mod-pedal-input , .pingpongpan .mod-pedal-output { | |||
top: 60px; | |||
} | |||
.pingpongpan .mod-pedal-input .mod-input , .pingpongpan .mod-pedal-output .mod-output { | |||
margin-bottom: 40px !important | |||
} |
@@ -0,0 +1,42 @@ | |||
@prefix modgui: <http://moddevices.com/ns/modgui#> . | |||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |||
<http://distrho.sf.net/plugins/Pitchotto> | |||
modgui:gui [ | |||
modgui:resourcesDirectory <modgui> ; | |||
modgui:iconTemplate <modgui/icon-pitchotto.html> ; | |||
modgui:stylesheet <modgui/stylesheet-pitchotto.css> ; | |||
modgui:screenshot <modgui/screenshot-pitchotto.png> ; | |||
modgui:thumbnail <modgui/thumbnail-pitchotto.png> ; | |||
modgui:brand "Shiro" ; | |||
modgui:label "Pitchotto" ; | |||
modgui:model "boxy" ; | |||
modgui:panel "6-knobs" ; | |||
modgui:color "red" ; | |||
modgui:knob "black" ; | |||
modgui:port [ | |||
lv2:index 0 ; | |||
lv2:symbol "ratio1" ; | |||
lv2:name "ratio1" ; | |||
] , [ | |||
lv2:index 1 ; | |||
lv2:symbol "ratio2" ; | |||
lv2:name "ratio2" ; | |||
] , [ | |||
lv2:index 2 ; | |||
lv2:symbol "mix" ; | |||
lv2:name "mix" ; | |||
] , [ | |||
lv2:index 3 ; | |||
lv2:symbol "delay1" ; | |||
lv2:name "delay1" ; | |||
] , [ | |||
lv2:index 4 ; | |||
lv2:symbol "delay2" ; | |||
lv2:name "delay2" ; | |||
] , [ | |||
lv2:index 5 ; | |||
lv2:symbol "cutoff" ; | |||
lv2:name "cutoff" ; | |||
] ; | |||
] . |
@@ -0,0 +1,49 @@ | |||
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-six-knobs mod-{{color}} {{color}}"> | |||
<div mod-role="drag-handle" class="mod-drag-handle"></div> | |||
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div> | |||
<div class="mod-plugin-name"><h1>{{label}}</h1></div> | |||
<div class="mod-light on" mod-role="bypass-light"></div> | |||
<div class="mod-control-group mod-{{knob}} clearfix"> | |||
{{#controls}} | |||
<div class="mod-knob"> | |||
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-knob-title">{{name}}</span> | |||
</div> | |||
{{/controls}} | |||
</div> | |||
<div class="mod-footswitch" mod-role="bypass"></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,50 @@ | |||
@prefix modgui: <http://moddevices.com/ns/modgui#> . | |||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |||
<http://distrho.sf.net/plugins/Shiroverb> | |||
modgui:gui [ | |||
modgui:resourcesDirectory <modgui> ; | |||
modgui:iconTemplate <modgui/icon-shiroverb.html> ; | |||
modgui:stylesheet <modgui/stylesheet-shiroverb.css> ; | |||
modgui:screenshot <modgui/screenshot-shiroverb.png> ; | |||
modgui:thumbnail <modgui/thumbnail-shiroverb.png> ; | |||
modgui:brand "Shiro" ; | |||
modgui:label "Shiroverb" ; | |||
modgui:model "boxy" ; | |||
modgui:panel "8-knobs" ; | |||
modgui:color "petrol" ; | |||
modgui:knob "black" ; | |||
modgui:port [ | |||
lv2:index 0 ; | |||
lv2:symbol "decay" ; | |||
lv2:name "decay" ; | |||
] , [ | |||
lv2:index 1 ; | |||
lv2:symbol "tail" ; | |||
lv2:name "tail" ; | |||
] , [ | |||
lv2:index 2 ; | |||
lv2:symbol "damping" ; | |||
lv2:name "damping" ; | |||
] , [ | |||
lv2:index 3 ; | |||
lv2:symbol "mix" ; | |||
lv2:name "mix" ; | |||
] , [ | |||
lv2:index 4 ; | |||
lv2:symbol "roomsize" ; | |||
lv2:name "roomsize" ; | |||
] , [ | |||
lv2:index 5 ; | |||
lv2:symbol "ratio" ; | |||
lv2:name "ratio" ; | |||
] , [ | |||
lv2:index 6 ; | |||
lv2:symbol "cutoff" ; | |||
lv2:name "cutoff" ; | |||
] , [ | |||
lv2:index 7 ; | |||
lv2:symbol "shimmer" ; | |||
lv2:name "shimmer" ; | |||
] ; | |||
] . |
@@ -0,0 +1,49 @@ | |||
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-eight-knobs mod-boxy75 mod-{{color}} {{color}}"> | |||
<div mod-role="drag-handle" class="mod-drag-handle"></div> | |||
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div> | |||
<div class="mod-plugin-name"><h1>{{label}}</h1></div> | |||
<div class="mod-light on" mod-role="bypass-light"></div> | |||
<div class="mod-control-group mod-{{knob}} clearfix"> | |||
{{#controls}} | |||
<div class="mod-knob"> | |||
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> | |||
<span class="mod-knob-title">{{name}}</span> | |||
</div> | |||
{{/controls}} | |||
</div> | |||
<div class="mod-footswitch" mod-role="bypass"></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,40 @@ | |||
/* (Auto-generated binary data file). */ | |||
#ifndef BINARY_DISTRHOARTWORK3BANDEQ_HPP | |||
#define BINARY_DISTRHOARTWORK3BANDEQ_HPP | |||
namespace DistrhoArtwork3BandEQ | |||
{ | |||
extern const char* aboutData; | |||
const unsigned int aboutDataSize = 172710; | |||
const unsigned int aboutWidth = 303; | |||
const unsigned int aboutHeight = 190; | |||
extern const char* aboutButtonHoverData; | |||
const unsigned int aboutButtonHoverDataSize = 5888; | |||
const unsigned int aboutButtonHoverWidth = 92; | |||
const unsigned int aboutButtonHoverHeight = 16; | |||
extern const char* aboutButtonNormalData; | |||
const unsigned int aboutButtonNormalDataSize = 5888; | |||
const unsigned int aboutButtonNormalWidth = 92; | |||
const unsigned int aboutButtonNormalHeight = 16; | |||
extern const char* backgroundData; | |||
const unsigned int backgroundDataSize = 437472; | |||
const unsigned int backgroundWidth = 392; | |||
const unsigned int backgroundHeight = 372; | |||
extern const char* knobData; | |||
const unsigned int knobDataSize = 15376; | |||
const unsigned int knobWidth = 62; | |||
const unsigned int knobHeight = 62; | |||
extern const char* sliderData; | |||
const unsigned int sliderDataSize = 6000; | |||
const unsigned int sliderWidth = 50; | |||
const unsigned int sliderHeight = 30; | |||
} | |||
#endif // BINARY_DISTRHOARTWORK3BANDEQ_HPP | |||
@@ -0,0 +1,264 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#include "DistrhoPlugin3BandEQ.hpp" | |||
#include <cmath> | |||
static const float kAMP_DB = 8.656170245f; | |||
static const float kDC_ADD = 1e-30f; | |||
static const float kPI = 3.141592654f; | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
DistrhoPlugin3BandEQ::DistrhoPlugin3BandEQ() | |||
: Plugin(paramCount, 1, 0) // 1 program, 0 states | |||
{ | |||
// set default values | |||
loadProgram(0); | |||
// reset | |||
deactivate(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Init | |||
void DistrhoPlugin3BandEQ::initParameter(uint32_t index, Parameter& parameter) | |||
{ | |||
switch (index) | |||
{ | |||
case paramLow: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Low"; | |||
parameter.symbol = "low"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramMid: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Mid"; | |||
parameter.symbol = "mid"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramHigh: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "High"; | |||
parameter.symbol = "high"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramMaster: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Master"; | |||
parameter.symbol = "master"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramLowMidFreq: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Low-Mid Freq"; | |||
parameter.symbol = "low_mid"; | |||
parameter.unit = "Hz"; | |||
parameter.ranges.def = 440.0f; | |||
parameter.ranges.min = 0.0f; | |||
parameter.ranges.max = 1000.0f; | |||
break; | |||
case paramMidHighFreq: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Mid-High Freq"; | |||
parameter.symbol = "mid_high"; | |||
parameter.unit = "Hz"; | |||
parameter.ranges.def = 1000.0f; | |||
parameter.ranges.min = 1000.0f; | |||
parameter.ranges.max = 20000.0f; | |||
break; | |||
} | |||
} | |||
void DistrhoPlugin3BandEQ::initProgramName(uint32_t index, String& programName) | |||
{ | |||
if (index != 0) | |||
return; | |||
programName = "Default"; | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Internal data | |||
float DistrhoPlugin3BandEQ::getParameterValue(uint32_t index) const | |||
{ | |||
switch (index) | |||
{ | |||
case paramLow: | |||
return fLow; | |||
case paramMid: | |||
return fMid; | |||
case paramHigh: | |||
return fHigh; | |||
case paramMaster: | |||
return fMaster; | |||
case paramLowMidFreq: | |||
return fLowMidFreq; | |||
case paramMidHighFreq: | |||
return fMidHighFreq; | |||
default: | |||
return 0.0f; | |||
} | |||
} | |||
void DistrhoPlugin3BandEQ::setParameterValue(uint32_t index, float value) | |||
{ | |||
if (getSampleRate() <= 0.0) | |||
return; | |||
switch (index) | |||
{ | |||
case paramLow: | |||
fLow = value; | |||
lowVol = std::exp( (fLow/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramMid: | |||
fMid = value; | |||
midVol = std::exp( (fMid/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramHigh: | |||
fHigh = value; | |||
highVol = std::exp( (fHigh/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramMaster: | |||
fMaster = value; | |||
outVol = std::exp( (fMaster/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramLowMidFreq: | |||
fLowMidFreq = std::fmin(value, fMidHighFreq); | |||
freqLP = fLowMidFreq; | |||
xLP = std::exp(-2.0f * kPI * freqLP / (float)getSampleRate()); | |||
a0LP = 1.0f - xLP; | |||
b1LP = -xLP; | |||
break; | |||
case paramMidHighFreq: | |||
fMidHighFreq = std::fmax(value, fLowMidFreq); | |||
freqHP = fMidHighFreq; | |||
xHP = std::exp(-2.0f * kPI * freqHP / (float)getSampleRate()); | |||
a0HP = 1.0f - xHP; | |||
b1HP = -xHP; | |||
break; | |||
} | |||
} | |||
void DistrhoPlugin3BandEQ::loadProgram(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
// Default values | |||
fLow = 0.0f; | |||
fMid = 0.0f; | |||
fHigh = 0.0f; | |||
fMaster = 0.0f; | |||
fLowMidFreq = 220.0f; | |||
fMidHighFreq = 2000.0f; | |||
// Internal stuff | |||
lowVol = midVol = highVol = outVol = 1.0f; | |||
freqLP = 200.0f; | |||
freqHP = 2000.0f; | |||
// reset filter values | |||
activate(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Process | |||
void DistrhoPlugin3BandEQ::activate() | |||
{ | |||
const float sr = (float)getSampleRate(); | |||
xLP = std::exp(-2.0f * kPI * freqLP / sr); | |||
#ifdef DISTRHO_OS_WINDOWS | |||
// don't ask me why, but this fixes a crash/exception below on windows... | |||
printf("%f\n", -xLP); | |||
#endif | |||
a0LP = 1.0f - xLP; | |||
b1LP = -xLP; | |||
xHP = std::exp(-2.0f * kPI * freqHP / sr); | |||
a0HP = 1.0f - xHP; | |||
b1HP = -xHP; | |||
} | |||
void DistrhoPlugin3BandEQ::deactivate() | |||
{ | |||
out1LP = out2LP = out1HP = out2HP = 0.0f; | |||
tmp1LP = tmp2LP = tmp1HP = tmp2HP = 0.0f; | |||
} | |||
void DistrhoPlugin3BandEQ::run(const float** inputs, float** outputs, uint32_t frames) | |||
{ | |||
const float* in1 = inputs[0]; | |||
const float* in2 = inputs[1]; | |||
float* out1 = outputs[0]; | |||
float* out2 = outputs[1]; | |||
for (uint32_t i=0; i < frames; ++i) | |||
{ | |||
tmp1LP = a0LP * in1[i] - b1LP * tmp1LP + kDC_ADD; | |||
tmp2LP = a0LP * in2[i] - b1LP * tmp2LP + kDC_ADD; | |||
out1LP = tmp1LP - kDC_ADD; | |||
out2LP = tmp2LP - kDC_ADD; | |||
tmp1HP = a0HP * in1[i] - b1HP * tmp1HP + kDC_ADD; | |||
tmp2HP = a0HP * in2[i] - b1HP * tmp2HP + kDC_ADD; | |||
out1HP = in1[i] - tmp1HP - kDC_ADD; | |||
out2HP = in2[i] - tmp2HP - kDC_ADD; | |||
out1[i] = (out1LP*lowVol + (in1[i] - out1LP - out1HP)*midVol + out1HP*highVol) * outVol; | |||
out2[i] = (out2LP*lowVol + (in2[i] - out2LP - out2HP)*midVol + out2HP*highVol) * outVol; | |||
} | |||
} | |||
// ----------------------------------------------------------------------- | |||
Plugin* createPlugin() | |||
{ | |||
return new DistrhoPlugin3BandEQ(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,123 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_3BANDEQ_HPP_INCLUDED | |||
#define DISTRHO_PLUGIN_3BANDEQ_HPP_INCLUDED | |||
#include "DistrhoPlugin.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoPlugin3BandEQ : public Plugin | |||
{ | |||
public: | |||
enum Parameters | |||
{ | |||
paramLow = 0, | |||
paramMid, | |||
paramHigh, | |||
paramMaster, | |||
paramLowMidFreq, | |||
paramMidHighFreq, | |||
paramCount | |||
}; | |||
DistrhoPlugin3BandEQ(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// Information | |||
const char* getLabel() const noexcept override | |||
{ | |||
return "3BandEQ"; | |||
} | |||
const char* getDescription() const override | |||
{ | |||
return "3 Band Equalizer, stereo version."; | |||
} | |||
const char* getMaker() const noexcept override | |||
{ | |||
return "DISTRHO"; | |||
} | |||
const char* getHomePage() const override | |||
{ | |||
return "https://github.com/DISTRHO/Mini-Series"; | |||
} | |||
const char* getLicense() const noexcept override | |||
{ | |||
return "LGPL"; | |||
} | |||
uint32_t getVersion() const noexcept override | |||
{ | |||
return d_version(1, 0, 0); | |||
} | |||
int64_t getUniqueId() const noexcept override | |||
{ | |||
return d_cconst('D', '3', 'E', 'Q'); | |||
} | |||
// ------------------------------------------------------------------- | |||
// Init | |||
void initParameter(uint32_t index, Parameter& parameter) override; | |||
void initProgramName(uint32_t index, String& programName) override; | |||
// ------------------------------------------------------------------- | |||
// Internal data | |||
float getParameterValue(uint32_t index) const override; | |||
void setParameterValue(uint32_t index, float value) override; | |||
void loadProgram(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Process | |||
void activate() override; | |||
void deactivate() override; | |||
void run(const float** inputs, float** outputs, uint32_t frames) override; | |||
// ------------------------------------------------------------------- | |||
private: | |||
float fLow, fMid, fHigh, fMaster, fLowMidFreq, fMidHighFreq; | |||
float lowVol, midVol, highVol, outVol; | |||
float freqLP, freqHP; | |||
float xLP, a0LP, b1LP; | |||
float xHP, a0HP, b1HP; | |||
float out1LP, out2LP, out1HP, out2HP; | |||
float tmp1LP, tmp2LP, tmp1HP, tmp2HP; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPlugin3BandEQ) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_PLUGIN_3BANDEQ_HPP_INCLUDED |
@@ -0,0 +1,32 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_BRAND "DISTRHO" | |||
#define DISTRHO_PLUGIN_NAME "3 Band EQ" | |||
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/3BandEQ" | |||
#define DISTRHO_PLUGIN_HAS_UI 1 | |||
#define DISTRHO_PLUGIN_IS_RT_SAFE 1 | |||
#define DISTRHO_PLUGIN_NUM_INPUTS 2 | |||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2 | |||
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1 | |||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin" | |||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -0,0 +1,211 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#include "DistrhoPlugin3BandEQ.hpp" | |||
#include "DistrhoUI3BandEQ.hpp" | |||
START_NAMESPACE_DISTRHO | |||
namespace Art = DistrhoArtwork3BandEQ; | |||
// ----------------------------------------------------------------------- | |||
DistrhoUI3BandEQ::DistrhoUI3BandEQ() | |||
: UI(Art::backgroundWidth, Art::backgroundHeight), | |||
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR), | |||
fAboutWindow(this) | |||
{ | |||
// about | |||
Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR); | |||
fAboutWindow.setImage(aboutImage); | |||
// sliders | |||
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight); | |||
Point<int> sliderPosStart(57, 43); | |||
Point<int> sliderPosEnd(57, 43 + 160); | |||
// slider Low | |||
fSliderLow = new ImageSlider(this, sliderImage); | |||
fSliderLow->setId(DistrhoPlugin3BandEQ::paramLow); | |||
fSliderLow->setInverted(true); | |||
fSliderLow->setStartPos(sliderPosStart); | |||
fSliderLow->setEndPos(sliderPosEnd); | |||
fSliderLow->setRange(-24.0f, 24.0f); | |||
fSliderLow->setCallback(this); | |||
// slider Mid | |||
sliderPosStart.setX(120); | |||
sliderPosEnd.setX(120); | |||
fSliderMid = new ImageSlider(this, sliderImage); | |||
fSliderMid->setId(DistrhoPlugin3BandEQ::paramMid); | |||
fSliderMid->setInverted(true); | |||
fSliderMid->setStartPos(sliderPosStart); | |||
fSliderMid->setEndPos(sliderPosEnd); | |||
fSliderMid->setRange(-24.0f, 24.0f); | |||
fSliderMid->setCallback(this); | |||
// slider High | |||
sliderPosStart.setX(183); | |||
sliderPosEnd.setX(183); | |||
fSliderHigh = new ImageSlider(this, sliderImage); | |||
fSliderHigh->setId(DistrhoPlugin3BandEQ::paramHigh); | |||
fSliderHigh->setInverted(true); | |||
fSliderHigh->setStartPos(sliderPosStart); | |||
fSliderHigh->setEndPos(sliderPosEnd); | |||
fSliderHigh->setRange(-24.0f, 24.0f); | |||
fSliderHigh->setCallback(this); | |||
// slider Master | |||
sliderPosStart.setX(287); | |||
sliderPosEnd.setX(287); | |||
fSliderMaster = new ImageSlider(this, sliderImage); | |||
fSliderMaster->setId(DistrhoPlugin3BandEQ::paramMaster); | |||
fSliderMaster->setInverted(true); | |||
fSliderMaster->setStartPos(sliderPosStart); | |||
fSliderMaster->setEndPos(sliderPosEnd); | |||
fSliderMaster->setRange(-24.0f, 24.0f); | |||
fSliderMaster->setCallback(this); | |||
// knobs | |||
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight); | |||
// knob Low-Mid | |||
fKnobLowMid = new ImageKnob(this, knobImage, ImageKnob::Vertical); | |||
fKnobLowMid->setId(DistrhoPlugin3BandEQ::paramLowMidFreq); | |||
fKnobLowMid->setAbsolutePos(65, 269); | |||
fKnobLowMid->setRange(0.0f, 1000.0f); | |||
fKnobLowMid->setDefault(440.0f); | |||
fKnobLowMid->setRotationAngle(270); | |||
fKnobLowMid->setCallback(this); | |||
// knob Mid-High | |||
fKnobMidHigh = new ImageKnob(this, knobImage, ImageKnob::Vertical); | |||
fKnobMidHigh->setId(DistrhoPlugin3BandEQ::paramMidHighFreq); | |||
fKnobMidHigh->setAbsolutePos(159, 269); | |||
fKnobMidHigh->setRange(1000.0f, 20000.0f); | |||
fKnobMidHigh->setDefault(1000.0f); | |||
fKnobMidHigh->setRotationAngle(270); | |||
fKnobMidHigh->setCallback(this); | |||
// about button | |||
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight); | |||
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight); | |||
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover); | |||
fButtonAbout->setAbsolutePos(264, 300); | |||
fButtonAbout->setCallback(this); | |||
// set default values | |||
programLoaded(0); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void DistrhoUI3BandEQ::parameterChanged(uint32_t index, float value) | |||
{ | |||
switch (index) | |||
{ | |||
case DistrhoPlugin3BandEQ::paramLow: | |||
fSliderLow->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandEQ::paramMid: | |||
fSliderMid->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandEQ::paramHigh: | |||
fSliderHigh->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandEQ::paramMaster: | |||
fSliderMaster->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandEQ::paramLowMidFreq: | |||
fKnobLowMid->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandEQ::paramMidHighFreq: | |||
fKnobMidHigh->setValue(value); | |||
break; | |||
} | |||
} | |||
void DistrhoUI3BandEQ::programLoaded(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
// Default values | |||
fSliderLow->setValue(0.0f); | |||
fSliderMid->setValue(0.0f); | |||
fSliderHigh->setValue(0.0f); | |||
fSliderMaster->setValue(0.0f); | |||
fKnobLowMid->setValue(220.0f); | |||
fKnobMidHigh->setValue(2000.0f); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void DistrhoUI3BandEQ::imageButtonClicked(ImageButton* button, int) | |||
{ | |||
if (button != fButtonAbout) | |||
return; | |||
fAboutWindow.exec(); | |||
} | |||
void DistrhoUI3BandEQ::imageKnobDragStarted(ImageKnob* knob) | |||
{ | |||
editParameter(knob->getId(), true); | |||
} | |||
void DistrhoUI3BandEQ::imageKnobDragFinished(ImageKnob* knob) | |||
{ | |||
editParameter(knob->getId(), false); | |||
} | |||
void DistrhoUI3BandEQ::imageKnobValueChanged(ImageKnob* knob, float value) | |||
{ | |||
setParameterValue(knob->getId(), value); | |||
} | |||
void DistrhoUI3BandEQ::imageSliderDragStarted(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), true); | |||
} | |||
void DistrhoUI3BandEQ::imageSliderDragFinished(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), false); | |||
} | |||
void DistrhoUI3BandEQ::imageSliderValueChanged(ImageSlider* slider, float value) | |||
{ | |||
setParameterValue(slider->getId(), value); | |||
} | |||
void DistrhoUI3BandEQ::onDisplay() | |||
{ | |||
fImgBackground.draw(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
UI* createUI() | |||
{ | |||
return new DistrhoUI3BandEQ(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,72 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#ifndef DISTRHO_UI_3BANDEQ_HPP_INCLUDED | |||
#define DISTRHO_UI_3BANDEQ_HPP_INCLUDED | |||
#include "DistrhoUI.hpp" | |||
#include "ImageWidgets.hpp" | |||
#include "DistrhoArtwork3BandEQ.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoUI3BandEQ : public UI, | |||
public ImageButton::Callback, | |||
public ImageKnob::Callback, | |||
public ImageSlider::Callback | |||
{ | |||
public: | |||
DistrhoUI3BandEQ(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void parameterChanged(uint32_t index, float value) override; | |||
void programLoaded(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void imageButtonClicked(ImageButton* button, int) override; | |||
void imageKnobDragStarted(ImageKnob* knob) override; | |||
void imageKnobDragFinished(ImageKnob* knob) override; | |||
void imageKnobValueChanged(ImageKnob* knob, float value) override; | |||
void imageSliderDragStarted(ImageSlider* slider) override; | |||
void imageSliderDragFinished(ImageSlider* slider) override; | |||
void imageSliderValueChanged(ImageSlider* slider, float value) override; | |||
void onDisplay() override; | |||
private: | |||
Image fImgBackground; | |||
ImageAboutWindow fAboutWindow; | |||
ScopedPointer<ImageButton> fButtonAbout; | |||
ScopedPointer<ImageKnob> fKnobLowMid, fKnobMidHigh; | |||
ScopedPointer<ImageSlider> fSliderLow, fSliderMid, fSliderHigh, fSliderMaster; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUI3BandEQ) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_UI_3BANDEQ_HPP_INCLUDED |
@@ -0,0 +1,55 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for DISTRHO Plugins # | |||
# ---------------------------- # | |||
# Created by falkTX | |||
# | |||
# -------------------------------------------------------------- | |||
# Project name, used for binaries | |||
NAME = 3BandEQ | |||
# -------------------------------------------------------------- | |||
# Files to build | |||
OBJS_DSP = \ | |||
DistrhoPlugin3BandEQ.cpp.o | |||
OBJS_UI = \ | |||
DistrhoArtwork3BandEQ.cpp.o \ | |||
DistrhoUI3BandEQ.cpp.o | |||
# -------------------------------------------------------------- | |||
# Do some magic | |||
include ../Makefile.Mini-Series.mk | |||
# -------------------------------------------------------------- | |||
# Enable all possible plugin types | |||
ifeq ($(HAVE_DGL),true) | |||
ifeq ($(HAVE_JACK),true) | |||
TARGETS += jack | |||
endif | |||
endif | |||
ifeq ($(LINUX),true) | |||
TARGETS += ladspa | |||
ifeq ($(HAVE_DGL),true) | |||
ifeq ($(HAVE_LIBLO),true) | |||
TARGETS += dssi | |||
endif | |||
endif | |||
endif | |||
ifeq ($(HAVE_DGL),true) | |||
TARGETS += lv2_sep | |||
else | |||
TARGETS += lv2_dsp | |||
endif | |||
TARGETS += vst | |||
all: $(TARGETS) | |||
# -------------------------------------------------------------- |
@@ -0,0 +1,40 @@ | |||
/* (Auto-generated binary data file). */ | |||
#ifndef BINARY_DISTRHOARTWORK3BANDSPLITTER_HPP | |||
#define BINARY_DISTRHOARTWORK3BANDSPLITTER_HPP | |||
namespace DistrhoArtwork3BandSplitter | |||
{ | |||
extern const char* aboutData; | |||
const unsigned int aboutDataSize = 172710; | |||
const unsigned int aboutWidth = 303; | |||
const unsigned int aboutHeight = 190; | |||
extern const char* aboutButtonHoverData; | |||
const unsigned int aboutButtonHoverDataSize = 5888; | |||
const unsigned int aboutButtonHoverWidth = 92; | |||
const unsigned int aboutButtonHoverHeight = 16; | |||
extern const char* aboutButtonNormalData; | |||
const unsigned int aboutButtonNormalDataSize = 5888; | |||
const unsigned int aboutButtonNormalWidth = 92; | |||
const unsigned int aboutButtonNormalHeight = 16; | |||
extern const char* backgroundData; | |||
const unsigned int backgroundDataSize = 437472; | |||
const unsigned int backgroundWidth = 392; | |||
const unsigned int backgroundHeight = 372; | |||
extern const char* knobData; | |||
const unsigned int knobDataSize = 15376; | |||
const unsigned int knobWidth = 62; | |||
const unsigned int knobHeight = 62; | |||
extern const char* sliderData; | |||
const unsigned int sliderDataSize = 6000; | |||
const unsigned int sliderWidth = 50; | |||
const unsigned int sliderHeight = 30; | |||
} | |||
#endif // BINARY_DISTRHOARTWORK3BANDSPLITTER_HPP | |||
@@ -0,0 +1,272 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#include "DistrhoPlugin3BandSplitter.hpp" | |||
#include <cmath> | |||
static const float kAMP_DB = 8.656170245f; | |||
static const float kDC_ADD = 1e-30f; | |||
static const float kPI = 3.141592654f; | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
DistrhoPlugin3BandSplitter::DistrhoPlugin3BandSplitter() | |||
: Plugin(paramCount, 1, 0) // 1 program, 0 states | |||
{ | |||
// set default values | |||
loadProgram(0); | |||
// reset | |||
deactivate(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Init | |||
void DistrhoPlugin3BandSplitter::initParameter(uint32_t index, Parameter& parameter) | |||
{ | |||
switch (index) | |||
{ | |||
case paramLow: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Low"; | |||
parameter.symbol = "low"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramMid: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Mid"; | |||
parameter.symbol = "mid"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramHigh: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "High"; | |||
parameter.symbol = "high"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramMaster: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Master"; | |||
parameter.symbol = "master"; | |||
parameter.unit = "dB"; | |||
parameter.ranges.def = 0.0f; | |||
parameter.ranges.min = -24.0f; | |||
parameter.ranges.max = 24.0f; | |||
break; | |||
case paramLowMidFreq: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Low-Mid Freq"; | |||
parameter.symbol = "low_mid"; | |||
parameter.unit = "Hz"; | |||
parameter.ranges.def = 440.0f; | |||
parameter.ranges.min = 0.0f; | |||
parameter.ranges.max = 1000.0f; | |||
break; | |||
case paramMidHighFreq: | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.name = "Mid-High Freq"; | |||
parameter.symbol = "mid_high"; | |||
parameter.unit = "Hz"; | |||
parameter.ranges.def = 1000.0f; | |||
parameter.ranges.min = 1000.0f; | |||
parameter.ranges.max = 20000.0f; | |||
break; | |||
} | |||
} | |||
void DistrhoPlugin3BandSplitter::initProgramName(uint32_t index, String& programName) | |||
{ | |||
if (index != 0) | |||
return; | |||
programName = "Default"; | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Internal data | |||
float DistrhoPlugin3BandSplitter::getParameterValue(uint32_t index) const | |||
{ | |||
switch (index) | |||
{ | |||
case paramLow: | |||
return fLow; | |||
case paramMid: | |||
return fMid; | |||
case paramHigh: | |||
return fHigh; | |||
case paramMaster: | |||
return fMaster; | |||
case paramLowMidFreq: | |||
return fLowMidFreq; | |||
case paramMidHighFreq: | |||
return fMidHighFreq; | |||
default: | |||
return 0.0f; | |||
} | |||
} | |||
void DistrhoPlugin3BandSplitter::setParameterValue(uint32_t index, float value) | |||
{ | |||
if (getSampleRate() <= 0.0) | |||
return; | |||
switch (index) | |||
{ | |||
case paramLow: | |||
fLow = value; | |||
lowVol = std::exp( (fLow/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramMid: | |||
fMid = value; | |||
midVol = std::exp( (fMid/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramHigh: | |||
fHigh = value; | |||
highVol = std::exp( (fHigh/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramMaster: | |||
fMaster = value; | |||
outVol = std::exp( (fMaster/48.0f) * 48.0f / kAMP_DB); | |||
break; | |||
case paramLowMidFreq: | |||
fLowMidFreq = std::fmin(value, fMidHighFreq); | |||
freqLP = fLowMidFreq; | |||
xLP = std::exp(-2.0f * kPI * freqLP / (float)getSampleRate()); | |||
a0LP = 1.0f - xLP; | |||
b1LP = -xLP; | |||
break; | |||
case paramMidHighFreq: | |||
fMidHighFreq = std::fmax(value, fLowMidFreq); | |||
freqHP = fMidHighFreq; | |||
xHP = std::exp(-2.0f * kPI * freqHP / (float)getSampleRate()); | |||
a0HP = 1.0f - xHP; | |||
b1HP = -xHP; | |||
break; | |||
} | |||
} | |||
void DistrhoPlugin3BandSplitter::loadProgram(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
// Default values | |||
fLow = 0.0f; | |||
fMid = 0.0f; | |||
fHigh = 0.0f; | |||
fMaster = 0.0f; | |||
fLowMidFreq = 220.0f; | |||
fMidHighFreq = 2000.0f; | |||
// Internal stuff | |||
lowVol = midVol = highVol = outVol = 1.0f; | |||
freqLP = 200.0f; | |||
freqHP = 2000.0f; | |||
// reset filter values | |||
activate(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Process | |||
void DistrhoPlugin3BandSplitter::activate() | |||
{ | |||
const float sr = (float)getSampleRate(); | |||
xLP = std::exp(-2.0f * kPI * freqLP / sr); | |||
#ifdef DISTRHO_OS_WINDOWS | |||
// don't ask me why, but this fixes a crash/exception below on windows... | |||
printf("%f\n", -xLP); | |||
#endif | |||
a0LP = 1.0f - xLP; | |||
b1LP = -xLP; | |||
xHP = std::exp(-2.0f * kPI * freqHP / sr); | |||
a0HP = 1.0f - xHP; | |||
b1HP = -xHP; | |||
} | |||
void DistrhoPlugin3BandSplitter::deactivate() | |||
{ | |||
out1LP = out2LP = out1HP = out2HP = 0.0f; | |||
tmp1LP = tmp2LP = tmp1HP = tmp2HP = 0.0f; | |||
} | |||
void DistrhoPlugin3BandSplitter::run(const float** inputs, float** outputs, uint32_t frames) | |||
{ | |||
const float* in1 = inputs[0]; | |||
const float* in2 = inputs[1]; | |||
float* out1 = outputs[0]; | |||
float* out2 = outputs[1]; | |||
float* out3 = outputs[2]; | |||
float* out4 = outputs[3]; | |||
float* out5 = outputs[4]; | |||
float* out6 = outputs[5]; | |||
for (uint32_t i=0; i < frames; ++i) | |||
{ | |||
tmp1LP = a0LP * in1[i] - b1LP * tmp1LP + kDC_ADD; | |||
tmp2LP = a0LP * in2[i] - b1LP * tmp2LP + kDC_ADD; | |||
out1LP = tmp1LP - kDC_ADD; | |||
out2LP = tmp2LP - kDC_ADD; | |||
tmp1HP = a0HP * in1[i] - b1HP * tmp1HP + kDC_ADD; | |||
tmp2HP = a0HP * in2[i] - b1HP * tmp2HP + kDC_ADD; | |||
out1HP = in1[i] - tmp1HP - kDC_ADD; | |||
out2HP = in2[i] - tmp2HP - kDC_ADD; | |||
out6[i] = out2HP*highVol * outVol; | |||
out5[i] = out1HP*highVol * outVol; | |||
out4[i] = (in2[i] - out2LP - out2HP)*midVol * outVol; | |||
out3[i] = (in1[i] - out1LP - out1HP)*midVol * outVol; | |||
out2[i] = out2LP*lowVol * outVol; | |||
out1[i] = out1LP*lowVol * outVol; | |||
} | |||
} | |||
// ----------------------------------------------------------------------- | |||
Plugin* createPlugin() | |||
{ | |||
return new DistrhoPlugin3BandSplitter(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,123 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_3BANDSPLITTER_HPP_INCLUDED | |||
#define DISTRHO_PLUGIN_3BANDSPLITTER_HPP_INCLUDED | |||
#include "DistrhoPlugin.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoPlugin3BandSplitter : public Plugin | |||
{ | |||
public: | |||
enum Parameters | |||
{ | |||
paramLow = 0, | |||
paramMid, | |||
paramHigh, | |||
paramMaster, | |||
paramLowMidFreq, | |||
paramMidHighFreq, | |||
paramCount | |||
}; | |||
DistrhoPlugin3BandSplitter(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// Information | |||
const char* getLabel() const noexcept override | |||
{ | |||
return "3BandSplitter"; | |||
} | |||
const char* getDescription() const override | |||
{ | |||
return "3 Band Equalizer, splitted output version."; | |||
} | |||
const char* getMaker() const noexcept override | |||
{ | |||
return "DISTRHO"; | |||
} | |||
const char* getHomePage() const override | |||
{ | |||
return "https://github.com/DISTRHO/Mini-Series"; | |||
} | |||
const char* getLicense() const noexcept override | |||
{ | |||
return "LGPL"; | |||
} | |||
uint32_t getVersion() const noexcept override | |||
{ | |||
return d_version(1, 0, 0); | |||
} | |||
int64_t getUniqueId() const noexcept override | |||
{ | |||
return d_cconst('D', '3', 'E', 'S'); | |||
} | |||
// ------------------------------------------------------------------- | |||
// Init | |||
void initParameter(uint32_t index, Parameter& parameter) override; | |||
void initProgramName(uint32_t index, String& programName) override; | |||
// ------------------------------------------------------------------- | |||
// Internal data | |||
float getParameterValue(uint32_t index) const override; | |||
void setParameterValue(uint32_t index, float value) override; | |||
void loadProgram(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Process | |||
void activate() override; | |||
void deactivate() override; | |||
void run(const float** inputs, float** outputs, uint32_t frames) override; | |||
// ------------------------------------------------------------------- | |||
private: | |||
float fLow, fMid, fHigh, fMaster, fLowMidFreq, fMidHighFreq; | |||
float lowVol, midVol, highVol, outVol; | |||
float freqLP, freqHP; | |||
float xLP, a0LP, b1LP; | |||
float xHP, a0HP, b1HP; | |||
float out1LP, out2LP, out1HP, out2HP; | |||
float tmp1LP, tmp2LP, tmp1HP, tmp2HP; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPlugin3BandSplitter) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_PLUGIN_3BANDSPLITTER_HPP_INCLUDED |
@@ -0,0 +1,32 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_BRAND "DISTRHO" | |||
#define DISTRHO_PLUGIN_NAME "3 Band Splitter" | |||
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/3BandSplitter" | |||
#define DISTRHO_PLUGIN_HAS_UI 1 | |||
#define DISTRHO_PLUGIN_IS_RT_SAFE 1 | |||
#define DISTRHO_PLUGIN_NUM_INPUTS 2 | |||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 6 | |||
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1 | |||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin" | |||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -0,0 +1,213 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#include "DistrhoPlugin3BandSplitter.hpp" | |||
#include "DistrhoUI3BandSplitter.hpp" | |||
using DGL::Point; | |||
START_NAMESPACE_DISTRHO | |||
namespace Art = DistrhoArtwork3BandSplitter; | |||
// ----------------------------------------------------------------------- | |||
DistrhoUI3BandSplitter::DistrhoUI3BandSplitter() | |||
: UI(Art::backgroundWidth, Art::backgroundHeight), | |||
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR), | |||
fAboutWindow(this) | |||
{ | |||
// about | |||
Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR); | |||
fAboutWindow.setImage(aboutImage); | |||
// sliders | |||
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight); | |||
Point<int> sliderPosStart(57, 43); | |||
Point<int> sliderPosEnd(57, 43 + 160); | |||
// slider Low | |||
fSliderLow = new ImageSlider(this, sliderImage); | |||
fSliderLow->setId(DistrhoPlugin3BandSplitter::paramLow); | |||
fSliderLow->setInverted(true); | |||
fSliderLow->setStartPos(sliderPosStart); | |||
fSliderLow->setEndPos(sliderPosEnd); | |||
fSliderLow->setRange(-24.0f, 24.0f); | |||
fSliderLow->setCallback(this); | |||
// slider Mid | |||
sliderPosStart.setX(120); | |||
sliderPosEnd.setX(120); | |||
fSliderMid = new ImageSlider(this, sliderImage); | |||
fSliderMid->setId(DistrhoPlugin3BandSplitter::paramMid); | |||
fSliderMid->setInverted(true); | |||
fSliderMid->setStartPos(sliderPosStart); | |||
fSliderMid->setEndPos(sliderPosEnd); | |||
fSliderMid->setRange(-24.0f, 24.0f); | |||
fSliderMid->setCallback(this); | |||
// slider High | |||
sliderPosStart.setX(183); | |||
sliderPosEnd.setX(183); | |||
fSliderHigh = new ImageSlider(this, sliderImage); | |||
fSliderHigh->setId(DistrhoPlugin3BandSplitter::paramHigh); | |||
fSliderHigh->setInverted(true); | |||
fSliderHigh->setStartPos(sliderPosStart); | |||
fSliderHigh->setEndPos(sliderPosEnd); | |||
fSliderHigh->setRange(-24.0f, 24.0f); | |||
fSliderHigh->setCallback(this); | |||
// slider Master | |||
sliderPosStart.setX(287); | |||
sliderPosEnd.setX(287); | |||
fSliderMaster = new ImageSlider(this, sliderImage); | |||
fSliderMaster->setId(DistrhoPlugin3BandSplitter::paramMaster); | |||
fSliderMaster->setInverted(true); | |||
fSliderMaster->setStartPos(sliderPosStart); | |||
fSliderMaster->setEndPos(sliderPosEnd); | |||
fSliderMaster->setRange(-24.0f, 24.0f); | |||
fSliderMaster->setCallback(this); | |||
// knobs | |||
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight); | |||
// knob Low-Mid | |||
fKnobLowMid = new ImageKnob(this, knobImage, ImageKnob::Vertical); | |||
fKnobLowMid->setId(DistrhoPlugin3BandSplitter::paramLowMidFreq); | |||
fKnobLowMid->setAbsolutePos(65, 269); | |||
fKnobLowMid->setRange(0.0f, 1000.0f); | |||
fKnobLowMid->setDefault(440.0f); | |||
fKnobLowMid->setRotationAngle(270); | |||
fKnobLowMid->setCallback(this); | |||
// knob Mid-High | |||
fKnobMidHigh = new ImageKnob(this, knobImage, ImageKnob::Vertical); | |||
fKnobMidHigh->setId(DistrhoPlugin3BandSplitter::paramMidHighFreq); | |||
fKnobMidHigh->setAbsolutePos(159, 269); | |||
fKnobMidHigh->setRange(1000.0f, 20000.0f); | |||
fKnobMidHigh->setDefault(1000.0f); | |||
fKnobMidHigh->setRotationAngle(270); | |||
fKnobMidHigh->setCallback(this); | |||
// about button | |||
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight); | |||
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight); | |||
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover); | |||
fButtonAbout->setAbsolutePos(264, 300); | |||
fButtonAbout->setCallback(this); | |||
// set default values | |||
programLoaded(0); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void DistrhoUI3BandSplitter::parameterChanged(uint32_t index, float value) | |||
{ | |||
switch (index) | |||
{ | |||
case DistrhoPlugin3BandSplitter::paramLow: | |||
fSliderLow->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandSplitter::paramMid: | |||
fSliderMid->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandSplitter::paramHigh: | |||
fSliderHigh->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandSplitter::paramMaster: | |||
fSliderMaster->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandSplitter::paramLowMidFreq: | |||
fKnobLowMid->setValue(value); | |||
break; | |||
case DistrhoPlugin3BandSplitter::paramMidHighFreq: | |||
fKnobMidHigh->setValue(value); | |||
break; | |||
} | |||
} | |||
void DistrhoUI3BandSplitter::programLoaded(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
// Default values | |||
fSliderLow->setValue(0.0f); | |||
fSliderMid->setValue(0.0f); | |||
fSliderHigh->setValue(0.0f); | |||
fSliderMaster->setValue(0.0f); | |||
fKnobLowMid->setValue(220.0f); | |||
fKnobMidHigh->setValue(2000.0f); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void DistrhoUI3BandSplitter::imageButtonClicked(ImageButton* button, int) | |||
{ | |||
if (button != fButtonAbout) | |||
return; | |||
fAboutWindow.exec(); | |||
} | |||
void DistrhoUI3BandSplitter::imageKnobDragStarted(ImageKnob* knob) | |||
{ | |||
editParameter(knob->getId(), true); | |||
} | |||
void DistrhoUI3BandSplitter::imageKnobDragFinished(ImageKnob* knob) | |||
{ | |||
editParameter(knob->getId(), false); | |||
} | |||
void DistrhoUI3BandSplitter::imageKnobValueChanged(ImageKnob* knob, float value) | |||
{ | |||
setParameterValue(knob->getId(), value); | |||
} | |||
void DistrhoUI3BandSplitter::imageSliderDragStarted(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), true); | |||
} | |||
void DistrhoUI3BandSplitter::imageSliderDragFinished(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), false); | |||
} | |||
void DistrhoUI3BandSplitter::imageSliderValueChanged(ImageSlider* slider, float value) | |||
{ | |||
setParameterValue(slider->getId(), value); | |||
} | |||
void DistrhoUI3BandSplitter::onDisplay() | |||
{ | |||
fImgBackground.draw(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
UI* createUI() | |||
{ | |||
return new DistrhoUI3BandSplitter(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,72 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Lesser General Public License for more details. | |||
* | |||
* For a full copy of the license see the LICENSE file. | |||
*/ | |||
#ifndef DISTRHO_UI_3BANDSPLITTER_HPP_INCLUDED | |||
#define DISTRHO_UI_3BANDSPLITTER_HPP_INCLUDED | |||
#include "DistrhoUI.hpp" | |||
#include "ImageWidgets.hpp" | |||
#include "DistrhoArtwork3BandSplitter.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoUI3BandSplitter : public UI, | |||
public ImageButton::Callback, | |||
public ImageKnob::Callback, | |||
public ImageSlider::Callback | |||
{ | |||
public: | |||
DistrhoUI3BandSplitter(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void parameterChanged(uint32_t index, float value) override; | |||
void programLoaded(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void imageButtonClicked(ImageButton* button, int) override; | |||
void imageKnobDragStarted(ImageKnob* knob) override; | |||
void imageKnobDragFinished(ImageKnob* knob) override; | |||
void imageKnobValueChanged(ImageKnob* knob, float value) override; | |||
void imageSliderDragStarted(ImageSlider* slider) override; | |||
void imageSliderDragFinished(ImageSlider* slider) override; | |||
void imageSliderValueChanged(ImageSlider* slider, float value) override; | |||
void onDisplay() override; | |||
private: | |||
Image fImgBackground; | |||
ImageAboutWindow fAboutWindow; | |||
ScopedPointer<ImageButton> fButtonAbout; | |||
ScopedPointer<ImageKnob> fKnobLowMid, fKnobMidHigh; | |||
ScopedPointer<ImageSlider> fSliderLow, fSliderMid, fSliderHigh, fSliderMaster; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUI3BandSplitter) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_UI_3BANDSPLITTER_HPP_INCLUDED |
@@ -0,0 +1,55 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for DISTRHO Plugins # | |||
# ---------------------------- # | |||
# Created by falkTX | |||
# | |||
# -------------------------------------------------------------- | |||
# Project name, used for binaries | |||
NAME = 3BandSplitter | |||
# -------------------------------------------------------------- | |||
# Files to build | |||
OBJS_DSP = \ | |||
DistrhoPlugin3BandSplitter.cpp.o | |||
OBJS_UI = \ | |||
DistrhoArtwork3BandSplitter.cpp.o \ | |||
DistrhoUI3BandSplitter.cpp.o | |||
# -------------------------------------------------------------- | |||
# Do some magic | |||
include ../Makefile.Mini-Series.mk | |||
# -------------------------------------------------------------- | |||
# Enable all possible plugin types | |||
ifeq ($(HAVE_DGL),true) | |||
ifeq ($(HAVE_JACK),true) | |||
TARGETS += jack | |||
endif | |||
endif | |||
ifeq ($(LINUX),true) | |||
TARGETS += ladspa | |||
ifeq ($(HAVE_DGL),true) | |||
ifeq ($(HAVE_LIBLO),true) | |||
TARGETS += dssi | |||
endif | |||
endif | |||
endif | |||
ifeq ($(HAVE_DGL),true) | |||
TARGETS += lv2_sep | |||
else | |||
TARGETS += lv2_dsp | |||
endif | |||
TARGETS += vst | |||
all: $(TARGETS) | |||
# -------------------------------------------------------------- |
@@ -0,0 +1,20 @@ | |||
/* (Auto-generated binary data file). */ | |||
#ifndef BINARY_DISTRHOARTWORKAMPLITUDEIMPOSER_HPP | |||
#define BINARY_DISTRHOARTWORKAMPLITUDEIMPOSER_HPP | |||
namespace DistrhoArtworkAmplitudeImposer | |||
{ | |||
extern const char* backData; | |||
const unsigned int backDataSize = 90000; | |||
const unsigned int backWidth = 300; | |||
const unsigned int backHeight = 150; | |||
extern const char* sliderData; | |||
const unsigned int sliderDataSize = 512; | |||
const unsigned int sliderWidth = 16; | |||
const unsigned int sliderHeight = 16; | |||
} | |||
#endif // BINARY_DISTRHOARTWORKAMPLITUDEIMPOSER_HPP | |||
@@ -0,0 +1,270 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#include "DistrhoPluginAmplitudeImposer.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
struct twofloats { | |||
float left; | |||
float right; | |||
}; | |||
// ----------------------------------------------------------------------- | |||
DistrhoPluginAmplitudeImposer::DistrhoPluginAmplitudeImposer() | |||
: Plugin(kParameterCount, 1, 0), // 1 program, 0 states | |||
fDepth(1.0f), | |||
fThreshold(0.5f), | |||
ampEnvelope_l(0.0f), | |||
ampEnvelope_r(0.0f), | |||
audioEnvelope_l(0.0f), | |||
audioEnvelope_r(0.0f), | |||
envDecay(0.0001f) {} | |||
// ----------------------------------------------------------------------- | |||
// Init | |||
void DistrhoPluginAmplitudeImposer::initAudioPort(bool input, uint32_t index, AudioPort& port) | |||
{ | |||
port.hints = 0x0; | |||
if (input) | |||
{ | |||
switch (index) | |||
{ | |||
case 0: | |||
port.name = "Input Left (Amp Env)"; | |||
port.symbol = "in_left_amp"; | |||
break; | |||
case 1: | |||
port.name = "Input Right (Amp Env)"; | |||
port.symbol = "in_right_amp"; | |||
break; | |||
case 2: | |||
port.name = "Input Left (Audio)"; | |||
port.symbol = "in_left_audio"; | |||
break; | |||
case 3: | |||
port.name = "Input Right (Audio)"; | |||
port.symbol = "in_right_audio"; | |||
break; | |||
} | |||
} | |||
else | |||
{ | |||
switch (index) | |||
{ | |||
case 0: | |||
port.name = "Output Left"; | |||
port.symbol = "out_left"; | |||
break; | |||
case 1: | |||
port.name = "Output Right"; | |||
port.symbol = "out_right"; | |||
break; | |||
} | |||
} | |||
} | |||
void DistrhoPluginAmplitudeImposer::initParameter(uint32_t index, Parameter& parameter) | |||
{ | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.ranges.min = 0.0f; | |||
parameter.ranges.max = 1.0f; | |||
switch (index) | |||
{ | |||
case kParameterDepth: | |||
parameter.name = "Depth"; | |||
parameter.symbol = "depth"; | |||
parameter.ranges.def = 1.0f; | |||
break; | |||
case kParameterThreshold: | |||
parameter.name = "Thres"; | |||
parameter.symbol = "thres"; | |||
parameter.ranges.def = 0.5f; | |||
break; | |||
} | |||
} | |||
void DistrhoPluginAmplitudeImposer::initProgramName(uint32_t index, String& programName) | |||
{ | |||
if (index != 0) | |||
return; | |||
programName = "Default"; | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Internal data | |||
float DistrhoPluginAmplitudeImposer::getParameterValue(uint32_t index) const | |||
{ | |||
switch(index) | |||
{ | |||
case kParameterDepth: | |||
return fDepth; | |||
case kParameterThreshold: | |||
return fThreshold; | |||
default: | |||
return 0.0f; | |||
} | |||
} | |||
void DistrhoPluginAmplitudeImposer::setParameterValue(uint32_t index, float value) | |||
{ | |||
switch(index) | |||
{ | |||
case kParameterDepth: | |||
fDepth = value; | |||
break; | |||
case kParameterThreshold: | |||
fThreshold = value; | |||
break; | |||
} | |||
} | |||
void DistrhoPluginAmplitudeImposer::loadProgram(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
fDepth = 1.0f; | |||
fThreshold = 0.5f; | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Process | |||
void DistrhoPluginAmplitudeImposer::activate() | |||
{ | |||
ampEnvelope_l = 0.0f; | |||
ampEnvelope_r = 0.0f; | |||
audioEnvelope_l = 0.0f; | |||
audioEnvelope_r = 0.0f; | |||
envDecay = 0.0001f; | |||
} | |||
void DistrhoPluginAmplitudeImposer::run(const float** inputs, float** outputs, uint32_t frames) | |||
{ | |||
const float* const in1 = inputs[0]; | |||
const float* const in2 = inputs[1]; | |||
const float* const in3 = inputs[2]; | |||
const float* const in4 = inputs[3]; | |||
/* */ float* const out1 = outputs[0]; | |||
/* */ float* const out2 = outputs[1]; | |||
float tmp; | |||
twofloats tempf; | |||
twofloats tempin; | |||
for (uint32_t i=0; i<frames; ++i) | |||
{ | |||
// calculate envelope from 1st two inputs | |||
tmp = std::abs(in1[i]); | |||
/**/ if (tmp > ampEnvelope_l) | |||
ampEnvelope_l = tmp; | |||
else if (tmp < ampEnvelope_l) | |||
ampEnvelope_l -= envDecay; | |||
tmp = std::abs(in2[i]); | |||
/**/ if (tmp > ampEnvelope_r) | |||
ampEnvelope_r = tmp; | |||
else if (tmp < ampEnvelope_r) | |||
ampEnvelope_r -= envDecay; | |||
// calculate envelope from 2nd two inputs | |||
tmp = std::abs(in3[i]); | |||
/**/ if (tmp > audioEnvelope_l) | |||
audioEnvelope_l = tmp; | |||
else if (tmp < audioEnvelope_l) | |||
audioEnvelope_l -= envDecay; | |||
tmp = std::abs(in4[i]); | |||
/**/ if (tmp > audioEnvelope_r) | |||
audioEnvelope_r = tmp; | |||
else if (tmp < audioEnvelope_r) | |||
audioEnvelope_r -= envDecay; | |||
// make sure we're not multiplying by a negative number | |||
if (ampEnvelope_l < 0.0f) | |||
ampEnvelope_l = 0.0f; | |||
if (ampEnvelope_r < 0.0f) | |||
ampEnvelope_r = 0.0f; | |||
if (audioEnvelope_l < 0.0f) | |||
audioEnvelope_l = 0.0f; | |||
if (audioEnvelope_r < 0.0f) | |||
audioEnvelope_r = 0.0f; | |||
// work out whether we need to multiply audio input | |||
if (audioEnvelope_l > fThreshold) | |||
{ | |||
tempin.left = in3[i]; | |||
} | |||
else | |||
{ | |||
if (audioEnvelope_l > 0.001f) | |||
tempin.left = in3[i] * (fThreshold/audioEnvelope_l); | |||
else | |||
tempin.left = in3[i] * (fThreshold/0.001f); //so it'll decay away smoothly | |||
} | |||
if (audioEnvelope_r > fThreshold) | |||
{ | |||
tempin.right = in4[i]; | |||
} | |||
else | |||
{ | |||
if (audioEnvelope_r > 0.001f) | |||
tempin.right = in4[i] * (fThreshold/audioEnvelope_r); | |||
else | |||
tempin.right = in4[i] * (fThreshold/0.001f); | |||
} | |||
// calculate output | |||
tempf.left = tempin.left * ampEnvelope_l; | |||
tempf.left *= fDepth; | |||
tempf.left = tempf.left + ((1.0f-fDepth)*tempin.left); | |||
tempf.right = tempin.right * ampEnvelope_r; | |||
tempf.right *= fDepth; | |||
tempf.right = tempf.right + ((1.0f-fDepth)*tempin.right); | |||
out1[i] = tempf.left; | |||
out2[i] = tempf.right; | |||
} | |||
} | |||
// ----------------------------------------------------------------------- | |||
Plugin* createPlugin() | |||
{ | |||
return new DistrhoPluginAmplitudeImposer(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,127 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_AMPLITUDE_IMPOSER_HPP_INCLUDED | |||
#define DISTRHO_PLUGIN_AMPLITUDE_IMPOSER_HPP_INCLUDED | |||
#include "DistrhoPlugin.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoPluginAmplitudeImposer : public Plugin | |||
{ | |||
public: | |||
enum Parameters { | |||
kParameterDepth, | |||
kParameterThreshold, | |||
kParameterCount | |||
}; | |||
DistrhoPluginAmplitudeImposer(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// Information | |||
const char* getName() const noexcept override | |||
{ | |||
return "Amplitude Imposer"; | |||
} | |||
const char* getLabel() const noexcept override | |||
{ | |||
return "AmplitudeImposer"; | |||
} | |||
const char* getDescription() const override | |||
{ | |||
return "Takes 2 stereo inputs and imposes the amplitude envelope of the first one on the second one.\n\ | |||
Also has a threshold level for the second input, so that when the signal falls below it, it is amplified up to the threshold, to give a greater signal to be amplitude modulated."; | |||
} | |||
const char* getMaker() const noexcept override | |||
{ | |||
return "ndc Plugs"; | |||
} | |||
const char* getHomePage() const override | |||
{ | |||
return "https://github.com/DISTRHO/ndc-Plugs"; | |||
} | |||
const char* getLicense() const noexcept override | |||
{ | |||
return "MIT"; | |||
} | |||
uint32_t getVersion() const noexcept override | |||
{ | |||
return d_version(0, 1, 0); | |||
} | |||
int64_t getUniqueId() const noexcept override | |||
{ | |||
return d_cconst('A', 'm', 'I', 'm'); | |||
} | |||
// ------------------------------------------------------------------- | |||
// Init | |||
void initAudioPort(bool input, uint32_t index, AudioPort& port) override; | |||
void initParameter(uint32_t index, Parameter& parameter) override; | |||
void initProgramName(uint32_t index, String& programName) override; | |||
// ------------------------------------------------------------------- | |||
// Internal data | |||
float getParameterValue(uint32_t index) const override; | |||
void setParameterValue(uint32_t index, float value) override; | |||
void loadProgram(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Process | |||
void activate() override; | |||
void run(const float** inputs, float** outputs, uint32_t frames) override; | |||
// ------------------------------------------------------------------- | |||
private: | |||
float fDepth; | |||
float fThreshold; | |||
float ampEnvelope_l, ampEnvelope_r; | |||
float audioEnvelope_l, audioEnvelope_r; | |||
float envDecay; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginAmplitudeImposer) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_PLUGIN_AMPLITUDE_IMPOSER_HPP_INCLUDED |
@@ -0,0 +1,40 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_BRAND "DISTRHO" | |||
#define DISTRHO_PLUGIN_NAME "Amplitude Imposr" | |||
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/ampimposer.htm" | |||
#define DISTRHO_PLUGIN_HAS_UI 1 | |||
#define DISTRHO_PLUGIN_IS_RT_SAFE 1 | |||
#define DISTRHO_PLUGIN_NUM_INPUTS 4 | |||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2 | |||
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1 | |||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AmplifierPlugin" | |||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -0,0 +1,116 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#include "DistrhoUIAmplitudeImposer.hpp" | |||
#include "DistrhoPluginAmplitudeImposer.hpp" | |||
START_NAMESPACE_DISTRHO | |||
namespace Art = DistrhoArtworkAmplitudeImposer; | |||
// ----------------------------------------------------------------------- | |||
DistrhoUIAmplitudeImposer::DistrhoUIAmplitudeImposer() | |||
: UI(Art::backWidth, Art::backHeight), | |||
fImgBackground(Art::backData, Art::backWidth, Art::backHeight, GL_LUMINANCE) | |||
{ | |||
// sliders | |||
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight, GL_LUMINANCE); | |||
fSliderDepth = new ImageSlider(this, sliderImage); | |||
fSliderDepth->setId(DistrhoPluginAmplitudeImposer::kParameterDepth); | |||
fSliderDepth->setStartPos(108, 71); | |||
fSliderDepth->setEndPos(268, 71); | |||
fSliderDepth->setRange(0.0f, 1.0f); | |||
fSliderDepth->setCallback(this); | |||
fSliderThres = new ImageSlider(this, sliderImage); | |||
fSliderThres->setId(DistrhoPluginAmplitudeImposer::kParameterThreshold); | |||
fSliderThres->setStartPos(108, 110); | |||
fSliderThres->setEndPos(268, 110); | |||
fSliderThres->setRange(0.0f, 1.0f); | |||
fSliderThres->setCallback(this); | |||
// set initial values | |||
programLoaded(0); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void DistrhoUIAmplitudeImposer::parameterChanged(uint32_t index, float value) | |||
{ | |||
switch (index) | |||
{ | |||
case DistrhoPluginAmplitudeImposer::kParameterDepth: | |||
fSliderDepth->setValue(value); | |||
break; | |||
case DistrhoPluginAmplitudeImposer::kParameterThreshold: | |||
fSliderThres->setValue(value); | |||
break; | |||
} | |||
} | |||
void DistrhoUIAmplitudeImposer::programLoaded(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
fSliderDepth->setValue(1.0f); | |||
fSliderThres->setValue(0.5f); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void DistrhoUIAmplitudeImposer::imageSliderDragStarted(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), true); | |||
} | |||
void DistrhoUIAmplitudeImposer::imageSliderDragFinished(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), false); | |||
} | |||
void DistrhoUIAmplitudeImposer::imageSliderValueChanged(ImageSlider* slider, float value) | |||
{ | |||
setParameterValue(slider->getId(), value); | |||
} | |||
void DistrhoUIAmplitudeImposer::onDisplay() | |||
{ | |||
fImgBackground.draw(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
UI* createUI() | |||
{ | |||
return new DistrhoUIAmplitudeImposer(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,70 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#ifndef DISTRHO_UI_AMPLITUDE_IMPOSER_HPP_INCLUDED | |||
#define DISTRHO_UI_AMPLITUDE_IMPOSER_HPP_INCLUDED | |||
#include "DistrhoUI.hpp" | |||
#include "ImageWidgets.hpp" | |||
#include "DistrhoArtworkAmplitudeImposer.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoUIAmplitudeImposer : public UI, | |||
public ImageSlider::Callback | |||
{ | |||
public: | |||
DistrhoUIAmplitudeImposer(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void parameterChanged(uint32_t index, float value) override; | |||
void programLoaded(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void imageSliderDragStarted(ImageSlider* slider) override; | |||
void imageSliderDragFinished(ImageSlider* slider) override; | |||
void imageSliderValueChanged(ImageSlider* slider, float value) override; | |||
void onDisplay() override; | |||
private: | |||
Image fImgBackground; | |||
ScopedPointer<ImageSlider> fSliderDepth, fSliderThres; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIAmplitudeImposer) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_UI_AMPLITUDE_IMPOSER_HPP_INCLUDED |
@@ -0,0 +1,53 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for DISTRHO Plugins # | |||
# ---------------------------- # | |||
# Created by falkTX | |||
# | |||
# -------------------------------------------------------------- | |||
# Project name, used for binaries | |||
NAME = AmplitudeImposer | |||
# -------------------------------------------------------------- | |||
# Files to build | |||
OBJS_DSP = \ | |||
DistrhoPluginAmplitudeImposer.cpp.o | |||
OBJS_UI = \ | |||
DistrhoArtworkAmplitudeImposer.cpp.o \ | |||
DistrhoUIAmplitudeImposer.cpp.o | |||
# -------------------------------------------------------------- | |||
# Do some magic | |||
include ../Makefile.ndc-Plugs.mk | |||
# -------------------------------------------------------------- | |||
# Enable all possible plugin types | |||
ifeq ($(HAVE_JACK),true) | |||
TARGETS += jack | |||
endif | |||
ifeq ($(LINUX),true) | |||
TARGETS += ladspa | |||
ifeq ($(HAVE_DGL),true) | |||
ifeq ($(HAVE_LIBLO),true) | |||
TARGETS += dssi | |||
endif | |||
endif | |||
endif | |||
ifeq ($(HAVE_DGL),true) | |||
TARGETS += lv2_sep | |||
else | |||
TARGETS += lv2_dsp | |||
endif | |||
TARGETS += vst | |||
all: $(TARGETS) | |||
# -------------------------------------------------------------- |
@@ -0,0 +1,20 @@ | |||
/* (Auto-generated binary data file). */ | |||
#ifndef BINARY_DISTRHOARTWORKCYCLESHIFTER_HPP | |||
#define BINARY_DISTRHOARTWORKCYCLESHIFTER_HPP | |||
namespace DistrhoArtworkCycleShifter | |||
{ | |||
extern const char* backData; | |||
const unsigned int backDataSize = 57352; | |||
const unsigned int backWidth = 268; | |||
const unsigned int backHeight = 107; | |||
extern const char* sliderData; | |||
const unsigned int sliderDataSize = 392; | |||
const unsigned int sliderWidth = 14; | |||
const unsigned int sliderHeight = 14; | |||
} | |||
#endif // BINARY_DISTRHOARTWORKCYCLESHIFTER_HPP | |||
@@ -0,0 +1,193 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#include "DistrhoPluginCycleShifter.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
DistrhoPluginCycleShifter::DistrhoPluginCycleShifter() | |||
: Plugin(kParameterCount, 1, 0), // 1 program, 0 states | |||
fNewCycleVolume(1.0f), | |||
fInputVolume(1.0f), | |||
OutIndex(0), | |||
InCount(0), | |||
ReadWrite(false), | |||
EnvOld(0.0f) | |||
{ | |||
std::memset(CycleBuffer, 0, sizeof(float)*BUFFER_SIZE); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Init | |||
void DistrhoPluginCycleShifter::initParameter(uint32_t index, Parameter& parameter) | |||
{ | |||
parameter.hints = kParameterIsAutomable; | |||
parameter.ranges.min = 0.0f; | |||
parameter.ranges.max = 1.0f; | |||
switch (index) | |||
{ | |||
case kParameterNewCycleVolume: | |||
parameter.name = "New Cycle Vol"; | |||
parameter.symbol = "ncvolume"; | |||
parameter.ranges.def = 1.0f; | |||
break; | |||
case kParameterInputVolume: | |||
parameter.name = "Input Vol"; | |||
parameter.symbol = "ipvolume"; | |||
parameter.ranges.def = 1.0f; | |||
break; | |||
} | |||
} | |||
void DistrhoPluginCycleShifter::initProgramName(uint32_t index, String& programName) | |||
{ | |||
if (index != 0) | |||
return; | |||
programName = "Default"; | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Internal data | |||
float DistrhoPluginCycleShifter::getParameterValue(uint32_t index) const | |||
{ | |||
switch(index) | |||
{ | |||
case kParameterNewCycleVolume: | |||
return fNewCycleVolume; | |||
case kParameterInputVolume: | |||
return fInputVolume; | |||
default: | |||
return 0.0f; | |||
} | |||
} | |||
void DistrhoPluginCycleShifter::setParameterValue(uint32_t index, float value) | |||
{ | |||
switch(index) | |||
{ | |||
case kParameterNewCycleVolume: | |||
fNewCycleVolume = value; | |||
break; | |||
case kParameterInputVolume: | |||
fInputVolume = value; | |||
break; | |||
} | |||
} | |||
void DistrhoPluginCycleShifter::loadProgram(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
fNewCycleVolume = 1.0f; | |||
fInputVolume = 1.0f; | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Process | |||
void DistrhoPluginCycleShifter::activate() | |||
{ | |||
std::memset(CycleBuffer, 0, sizeof(float)*BUFFER_SIZE); | |||
OutIndex = 0; | |||
InCount = 0; | |||
ReadWrite = false; | |||
EnvOld = 0.0f; | |||
} | |||
void DistrhoPluginCycleShifter::run(const float** inputs, float** outputs, uint32_t frames) | |||
{ | |||
const float* in = inputs[0]; | |||
/**/ float* out = outputs[0]; | |||
for (uint32_t i=0; i<frames; ++i) | |||
*out++ = DoProcess(*in++); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Borrowed this from Toby Bear's Delphi template - it maybe adds a bit to cpu | |||
// usage, but it makes things simpler... | |||
// ----------------------------------------------------------------------- | |||
float DistrhoPluginCycleShifter::DoProcess(float a) | |||
{ | |||
const float tempval = a; | |||
if (! ReadWrite) // if we're in read mode | |||
{ | |||
if (InCount == 0) // if we're waiting for the start of a new cycle to read | |||
{ | |||
if (EnvOld < 0.0f && tempval >= 0.0f) // as soon as the input goes past 0 we start reading | |||
{ | |||
CycleBuffer[InCount++] = tempval; | |||
} | |||
} | |||
else if (! (EnvOld < 0.0f && tempval >= 0.0f)) // if we've not reached the end of the cycle yet | |||
{ | |||
CycleBuffer[InCount] = tempval; | |||
if (++InCount >= BUFFER_SIZE) // if we've reached the end of the buffer | |||
{ | |||
InCount = BUFFER_SIZE; | |||
ReadWrite = true; // we're in write mode now | |||
} | |||
} | |||
else // we've reached the end of the cycle | |||
{ | |||
CycleBuffer[InCount++] = 0.0f; | |||
ReadWrite = true; | |||
} | |||
a *= fInputVolume; | |||
} | |||
else // we're in write mode | |||
{ | |||
a = (a*fInputVolume) + (CycleBuffer[OutIndex]*fNewCycleVolume); | |||
if (++OutIndex == InCount) // we've reached the end of our stored cycle | |||
{ | |||
InCount = 0; | |||
OutIndex = 0; | |||
ReadWrite = false; | |||
} | |||
} | |||
EnvOld = tempval; | |||
return a; | |||
} | |||
// ----------------------------------------------------------------------- | |||
Plugin* createPlugin() | |||
{ | |||
return new DistrhoPluginCycleShifter(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,127 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_CYCLE_SHIFTER_HPP_INCLUDED | |||
#define DISTRHO_PLUGIN_CYCLE_SHIFTER_HPP_INCLUDED | |||
#include "DistrhoPlugin.hpp" | |||
#define BUFFER_SIZE 11025 | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoPluginCycleShifter : public Plugin | |||
{ | |||
public: | |||
enum Parameters { | |||
kParameterNewCycleVolume, | |||
kParameterInputVolume, | |||
kParameterCount | |||
}; | |||
DistrhoPluginCycleShifter(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// Information | |||
const char* getLabel() const noexcept override | |||
{ | |||
return "CycleShifter"; | |||
} | |||
const char* getDescription() const override | |||
{ | |||
return "Reads in a cycle's-worth of the input signal, then (once the whole cycle's been read in) outputs it again, on top of the current output.\n\ | |||
Works best with long/sustained sounds (e.g. strings, pads etc.), sounds like a weird kind of gentle distortion."; | |||
} | |||
const char* getMaker() const noexcept override | |||
{ | |||
return "ndc Plugs"; | |||
} | |||
const char* getHomePage() const override | |||
{ | |||
return "https://github.com/DISTRHO/ndc-Plugs"; | |||
} | |||
const char* getLicense() const noexcept override | |||
{ | |||
return "MIT"; | |||
} | |||
uint32_t getVersion() const noexcept override | |||
{ | |||
return d_version(0, 1, 0); | |||
} | |||
int64_t getUniqueId() const noexcept override | |||
{ | |||
return d_cconst('C', 'S', 'f', 't'); | |||
} | |||
// ------------------------------------------------------------------- | |||
// Init | |||
void initParameter(uint32_t index, Parameter& parameter) override; | |||
void initProgramName(uint32_t index, String& programName) override; | |||
// ------------------------------------------------------------------- | |||
// Internal data | |||
float getParameterValue(uint32_t index) const override; | |||
void setParameterValue(uint32_t index, float value) override; | |||
void loadProgram(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Process | |||
void activate() override; | |||
void run(const float** inputs, float** outputs, uint32_t frames) override; | |||
// ------------------------------------------------------------------- | |||
private: | |||
float fNewCycleVolume; | |||
float fInputVolume; | |||
float CycleBuffer[BUFFER_SIZE]; // buffer to store the cycle in | |||
int OutIndex; // index for playing the buffer | |||
int InCount; // counts how many samples we've recorded | |||
bool ReadWrite; // 0=read, 1=write | |||
float EnvOld; // last (input) sample - used to determine zero-crossings | |||
float DoProcess(float a); | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginCycleShifter) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_PLUGIN_CYCLE_SHIFTER_HPP_INCLUDED |
@@ -0,0 +1,38 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
#define DISTRHO_PLUGIN_BRAND "DISTRHO" | |||
#define DISTRHO_PLUGIN_NAME "Cycle Shifter" | |||
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/cycleshifter.htm" | |||
#define DISTRHO_PLUGIN_HAS_UI 1 | |||
#define DISTRHO_PLUGIN_IS_RT_SAFE 1 | |||
#define DISTRHO_PLUGIN_NUM_INPUTS 1 | |||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1 | |||
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1 | |||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -0,0 +1,116 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#include "DistrhoUICycleShifter.hpp" | |||
#include "DistrhoPluginCycleShifter.hpp" | |||
START_NAMESPACE_DISTRHO | |||
namespace Art = DistrhoArtworkCycleShifter; | |||
// ----------------------------------------------------------------------- | |||
DistrhoUICycleShifter::DistrhoUICycleShifter() | |||
: UI(Art::backWidth, Art::backHeight), | |||
fImgBackground(Art::backData, Art::backWidth, Art::backHeight, GL_LUMINANCE) | |||
{ | |||
// sliders | |||
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight, GL_LUMINANCE); | |||
fSliderNewCycleVol = new ImageSlider(this, sliderImage); | |||
fSliderNewCycleVol->setId(DistrhoPluginCycleShifter::kParameterNewCycleVolume); | |||
fSliderNewCycleVol->setStartPos(6, 49); | |||
fSliderNewCycleVol->setEndPos(247, 49); | |||
fSliderNewCycleVol->setRange(0.0f, 1.0f); | |||
fSliderNewCycleVol->setCallback(this); | |||
fSliderInputVol = new ImageSlider(this, sliderImage); | |||
fSliderInputVol->setId(DistrhoPluginCycleShifter::kParameterInputVolume); | |||
fSliderInputVol->setStartPos(6, 80); | |||
fSliderInputVol->setEndPos(247, 80); | |||
fSliderInputVol->setRange(0.0f, 1.0f); | |||
fSliderInputVol->setCallback(this); | |||
// set initial values | |||
programLoaded(0); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void DistrhoUICycleShifter::parameterChanged(uint32_t index, float value) | |||
{ | |||
switch (index) | |||
{ | |||
case DistrhoPluginCycleShifter::kParameterNewCycleVolume: | |||
fSliderNewCycleVol->setValue(value); | |||
break; | |||
case DistrhoPluginCycleShifter::kParameterInputVolume: | |||
fSliderInputVol->setValue(value); | |||
break; | |||
} | |||
} | |||
void DistrhoUICycleShifter::programLoaded(uint32_t index) | |||
{ | |||
if (index != 0) | |||
return; | |||
fSliderNewCycleVol->setValue(1.0f); | |||
fSliderInputVol->setValue(1.0f); | |||
} | |||
// ----------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void DistrhoUICycleShifter::imageSliderDragStarted(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), true); | |||
} | |||
void DistrhoUICycleShifter::imageSliderDragFinished(ImageSlider* slider) | |||
{ | |||
editParameter(slider->getId(), false); | |||
} | |||
void DistrhoUICycleShifter::imageSliderValueChanged(ImageSlider* slider, float value) | |||
{ | |||
setParameterValue(slider->getId(), value); | |||
} | |||
void DistrhoUICycleShifter::onDisplay() | |||
{ | |||
fImgBackground.draw(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
UI* createUI() | |||
{ | |||
return new DistrhoUICycleShifter(); | |||
} | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO |
@@ -0,0 +1,70 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
* to deal in the Software without restriction, including without limitation | |||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||
* and/or sell copies of the Software, and to permit persons to whom the | |||
* Software is furnished to do so, subject to the following conditions: | |||
* | |||
* The above copyright notice and this permission notice shall be included in | |||
* all copies or substantial portions of the Software. | |||
* | |||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||
* DEALINGS IN THE SOFTWARE. | |||
*/ | |||
#ifndef DISTRHO_UI_CYCLE_SHIFTER_HPP_INCLUDED | |||
#define DISTRHO_UI_CYCLE_SHIFTER_HPP_INCLUDED | |||
#include "DistrhoUI.hpp" | |||
#include "ImageWidgets.hpp" | |||
#include "DistrhoArtworkCycleShifter.hpp" | |||
START_NAMESPACE_DISTRHO | |||
// ----------------------------------------------------------------------- | |||
class DistrhoUICycleShifter : public UI, | |||
public ImageSlider::Callback | |||
{ | |||
public: | |||
DistrhoUICycleShifter(); | |||
protected: | |||
// ------------------------------------------------------------------- | |||
// DSP Callbacks | |||
void parameterChanged(uint32_t index, float value) override; | |||
void programLoaded(uint32_t index) override; | |||
// ------------------------------------------------------------------- | |||
// Widget Callbacks | |||
void imageSliderDragStarted(ImageSlider* slider) override; | |||
void imageSliderDragFinished(ImageSlider* slider) override; | |||
void imageSliderValueChanged(ImageSlider* slider, float value) override; | |||
void onDisplay() override; | |||
private: | |||
Image fImgBackground; | |||
ScopedPointer<ImageSlider> fSliderNewCycleVol, fSliderInputVol; | |||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUICycleShifter) | |||
}; | |||
// ----------------------------------------------------------------------- | |||
END_NAMESPACE_DISTRHO | |||
#endif // DISTRHO_UI_CYCLE_SHIFTER_HPP_INCLUDED |
@@ -0,0 +1,53 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for DISTRHO Plugins # | |||
# ---------------------------- # | |||
# Created by falkTX | |||
# | |||
# -------------------------------------------------------------- | |||
# Project name, used for binaries | |||
NAME = CycleShifter | |||
# -------------------------------------------------------------- | |||
# Files to build | |||
OBJS_DSP = \ | |||
DistrhoPluginCycleShifter.cpp.o | |||
OBJS_UI = \ | |||
DistrhoArtworkCycleShifter.cpp.o \ | |||
DistrhoUICycleShifter.cpp.o | |||
# -------------------------------------------------------------- | |||
# Do some magic | |||
include ../Makefile.ndc-Plugs.mk | |||
# -------------------------------------------------------------- | |||
# Enable all possible plugin types | |||
ifeq ($(HAVE_JACK),true) | |||
TARGETS += jack | |||
endif | |||
ifeq ($(LINUX),true) | |||
TARGETS += ladspa | |||
ifeq ($(HAVE_DGL),true) | |||
ifeq ($(HAVE_LIBLO),true) | |||
TARGETS += dssi | |||
endif | |||
endif | |||
endif | |||
ifeq ($(HAVE_DGL),true) | |||
TARGETS += lv2_sep | |||
else | |||
TARGETS += lv2_dsp | |||
endif | |||
TARGETS += vst | |||
all: $(TARGETS) | |||
# -------------------------------------------------------------- |
@@ -22,7 +22,7 @@ OBJS_UI = \ | |||
# -------------------------------------------------------------- | |||
# Do some magic | |||
include ../Makefile.mk | |||
include ../Makefile.Kars.mk | |||
# -------------------------------------------------------------- | |||
# Enable all possible plugin types | |||