| @@ -0,0 +1,21 @@ | |||
| @prefix modgui: <http://moddevices.com/ns/modgui#> . | |||
| @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |||
| <http://distrho.sf.net/plugins/Kars> | |||
| modgui:gui [ | |||
| modgui:resourcesDirectory <modgui> ; | |||
| modgui:iconTemplate <modgui/icon-kars.html> ; | |||
| modgui:stylesheet <modgui/stylesheet-kars.css> ; | |||
| modgui:screenshot <modgui/screenshot-kars.png> ; | |||
| modgui:thumbnail <modgui/thumbnail-kars.png> ; | |||
| modgui:brand "DISTRHO" ; | |||
| modgui:label "Kars" ; | |||
| modgui:model "boxy-small" ; | |||
| modgui:panel "1-footswitch" ; | |||
| modgui:color "yellow" ; | |||
| modgui:port [ | |||
| lv2:index 0 ; | |||
| lv2:symbol "sustain" ; | |||
| lv2:name "Sustain" ; | |||
| ] ; | |||
| ] . | |||
| @@ -0,0 +1,41 @@ | |||
| <div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-boxy50 mod-one-footswitch 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-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,677 @@ | |||
| /* 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: 21px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50 { | |||
| background-size:301px 315px; | |||
| height:315px; | |||
| width:301px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75 { | |||
| background-size:326px 431px; | |||
| width:326px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy85 { | |||
| background-size:364px 431px; | |||
| width:364px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy100 { | |||
| background-size:421px 431px; | |||
| width:421px; | |||
| } | |||
| /* = BACKGROUND IMAGES - Colour of the pedal | |||
| ================================================ */ | |||
| /* NORMAL */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-blue { | |||
| background-image:url(/resources/pedals/boxy/blue.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-brown { | |||
| background-image:url(/resources/pedals/boxy/brown.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-cream { | |||
| background-image:url(/resources/pedals/boxy/cream.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-darkblue { | |||
| background-image:url(/resources/pedals/boxy/darkblue.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-gray { | |||
| background-image:url(/resources/pedals/boxy/gray.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-green { | |||
| background-image:url(/resources/pedals/boxy/green.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-orange { | |||
| background-image:url(/resources/pedals/boxy/orange.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-purple { | |||
| background-image:url(/resources/pedals/boxy/purple.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-red { | |||
| background-image:url(/resources/pedals/boxy/red.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-white { | |||
| background-image:url(/resources/pedals/boxy/white.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-yellow { | |||
| background-image:url(/resources/pedals/boxy/yellow.png{{{ns}}}); | |||
| } | |||
| /* SMALL */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-blue { | |||
| background-image:url(/resources/pedals/boxy-small/blue.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-brown { | |||
| background-image:url(/resources/pedals/boxy-small/brown.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-cream { | |||
| background-image:url(/resources/pedals/boxy-small/cream.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-darkblue { | |||
| background-image:url(/resources/pedals/boxy-small/darkblue.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-gray { | |||
| background-image:url(/resources/pedals/boxy-small/gray.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-green { | |||
| background-image:url(/resources/pedals/boxy-small/green.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-orange { | |||
| background-image:url(/resources/pedals/boxy-small/orange.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-purple { | |||
| background-image:url(/resources/pedals/boxy-small/purple.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-red { | |||
| background-image:url(/resources/pedals/boxy-small/red.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.mod-white { | |||
| background-image:url(/resources/pedals/boxy-small/white.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50.yellow { | |||
| background-image:url(/resources/pedals/boxy-small/yellow.png{{{ns}}}); | |||
| } | |||
| /* LARGE */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-blue { | |||
| background-image:url(/resources/pedals/boxy75/blue.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-brown { | |||
| background-image:url(/resources/pedals/boxy75/brown.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-cream { | |||
| background-image:url(/resources/pedals/boxy75/cream.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-darkblue { | |||
| background-image:url(/resources/pedals/boxy75/darkblue.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-gray { | |||
| background-image:url(/resources/pedals/boxy75/gray.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-green { | |||
| background-image:url(/resources/pedals/boxy75/green.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-orange { | |||
| background-image:url(/resources/pedals/boxy75/orange.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-purple { | |||
| background-image:url(/resources/pedals/boxy75/purple.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-red { | |||
| background-image:url(/resources/pedals/boxy75/red.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.mod-white { | |||
| background-image:url(/resources/pedals/boxy75/white.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy75.yellow { | |||
| background-image:url(/resources/pedals/boxy75/yellow.png{{{ns}}}); | |||
| } | |||
| /* BIGGER */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy85.mod-yellow { | |||
| background-image:url(/resources/pedals/boxy85/yellow.png{{{ns}}}); | |||
| } | |||
| /* HUGE */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy100.mod-yellow { | |||
| background-image:url(/resources/pedals/boxy100/yellow.png{{{ns}}}); | |||
| } | |||
| /* = 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; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-plugin-brand, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-plugin-brand, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-plugin-brand, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-plugin-brand { | |||
| top:190px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50 .mod-plugin-brand { | |||
| top:16px; | |||
| } | |||
| /* = 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; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-plugin-name, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-plugin-name, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-plugin-name, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-plugin-name { | |||
| top:350px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50 .mod-plugin-name { | |||
| top:230px; | |||
| } | |||
| /* = PLUGIN'S AUTHO AND NAME COLOURS | |||
| ================================================ */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-blue .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-blue .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-brown .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-brown .mod-plugin-name h1 { | |||
| border-color:rgb(255,255,255); | |||
| color:rgb(255,255,255); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-cream .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-cream .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-darkblue .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-darkblue .mod-plugin-name h1 { | |||
| border-color:rgb(255,255,255); | |||
| color:rgb(255,255,255); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-gray .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-gray .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-green .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-green .mod-plugin-name h1 { | |||
| border-color:rgb(255,255,255); | |||
| color:rgb(255,255,255); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-orange .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-orange .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-purple .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-purple .mod-plugin-name h1 { | |||
| border-color:rgb(255,255,255); | |||
| color:rgb(255,255,255); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-red .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-red .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-white .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-white .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-yellow .mod-plugin-brand h1, | |||
| .mod-pedal-boxy{{{cns}}}.mod-yellow .mod-plugin-name h1 { | |||
| color:rgb(0,0,0); | |||
| } | |||
| /* = 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; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-light, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-light, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-light, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-light { | |||
| top:253px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50 .mod-light { | |||
| top:105px; | |||
| } | |||
| /* = FOOTSWITCH | |||
| ================================================ */ | |||
| .mod-pedal-boxy{{{cns}}} .mod-footswitch { | |||
| background-image:url(/resources/pedals/footswitch.png{{{ns}}}); | |||
| background-position:bottom center; | |||
| background-repeat:no-repeat; | |||
| background-size:auto 132px; | |||
| bottom: 95px; | |||
| left: 13px; | |||
| right: 13px; | |||
| cursor:pointer; | |||
| height:66px; | |||
| width: 66px; | |||
| margin: auto; | |||
| position:absolute !important; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}} .mod-footswitch.on { | |||
| background-position-y: top !important | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-footswitch, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-footswitch, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-footswitch, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-footswitch { | |||
| top:285px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-boxy50 .mod-footswitch { | |||
| top:140px; | |||
| } | |||
| /* = 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-three-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-four-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-control-group .mod-knob { | |||
| height:81px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}} .mod-control-group .mod-knob > span.mod-knob-title { | |||
| bottom:0px; | |||
| display:block; | |||
| font-size:11px; | |||
| font-weight:bold; | |||
| height:12px; | |||
| left:0; | |||
| line-height:1; | |||
| margin:0; | |||
| overflow:hidden; | |||
| padding:0; | |||
| position:absolute; | |||
| right:0; | |||
| text-transform:uppercase; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-blue .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-brown .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-cream .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-darkblue .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-gray .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-green .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-orange .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-purple .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-red .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-white .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-yellow .mod-control-group .mod-knob > span.mod-knob-title { | |||
| color:black; | |||
| } | |||
| /* ONE and TWO KNOBS */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-one-knob .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-two-knobs .mod-control-group .mod-knob .mod-knob-image { | |||
| background-image:url(/resources/knobs/boxy/boxy.png{{{ns}}}); | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-one-knob .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-two-knobs .mod-control-group .mod-knob .mod-knob-image { | |||
| height:100px; | |||
| margin:0 auto; | |||
| width:100px; | |||
| } | |||
| /* TWO KNOBS */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-two-knobs .mod-control-group { | |||
| margin:20px 10px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-two-knobs .mod-control-group .mod-knob { | |||
| float:left; | |||
| width:50%; | |||
| } | |||
| /* THREE AND HIGHER KNOBS */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-three-knobs .mod-control-group, | |||
| .mod-pedal-boxy{{{cns}}}.mod-four-knobs .mod-control-group, | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-control-group, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-control-group, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-control-group, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-control-group { | |||
| margin:20px 6px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-three-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-four-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-control-group .mod-knob, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-control-group .mod-knob { | |||
| display:inline-block; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-three-knobs .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-four-knobs .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-knobs .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-knobs .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-knobs .mod-control-group .mod-knob .mod-knob-image, | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-control-group .mod-knob .mod-knob-image { | |||
| background-image:url(/resources/knobs/lata/lata.png{{{ns}}}); | |||
| background-repeat:no-repeat; | |||
| background-size:auto 70px; | |||
| height:70px; | |||
| margin:0 -2px; | |||
| width:70px; | |||
| } | |||
| /* EIGTH KNOBS */ | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-knobs .mod-knob { | |||
| width:70px; | |||
| } | |||
| /* = 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-three-knobs .mod-enumerated-group { | |||
| margin-bottom:5px !important; | |||
| } | |||
| .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; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-blue .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-brown .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}}); | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-cream .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-darkblue .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}}); | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-gray .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-green .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}}); | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-orange .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-purple .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-white.png{{{ns}}}); | |||
| color:white; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-red .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-white .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-yellow .mod-enumerated { | |||
| background-image:url(/resources/utils/dropdown-arrow-black.png{{{ns}}}); | |||
| color:black; | |||
| } | |||
| /* SLIDER | |||
| ================================================ */ | |||
| .mod-pedal-boxy{{{cns}}} .mod-slider:first-child { | |||
| margin-left:8px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}} .mod-slider { | |||
| color:black; | |||
| float:left; | |||
| font-size:11px; | |||
| height:140px; | |||
| margin-bottom:2px; | |||
| margin-right:2px; | |||
| overflow:hidden; | |||
| position:relative; | |||
| text-align:center; | |||
| width:33px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}} .mod-slider .mod-slider-title { | |||
| display:block; | |||
| font-size:11px; | |||
| font-weight:bold; | |||
| height:7px; | |||
| line-height:1; | |||
| margin-bottom:3px; | |||
| overflow:hidden; | |||
| padding:7px 0 5px; | |||
| position:relative; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}} .mod-slider .mod-slider-image { | |||
| background-image:url(/resources/pedals/slider.png{{{ns}}}); | |||
| background-repeat:no-repeat; | |||
| background-size:auto 110px; | |||
| height:110px; | |||
| margin:0 auto; | |||
| width:44px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}} .mod-slider .mod-slider-image:hover { | |||
| cursor:pointer; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-three-sliders .mod-slider { | |||
| margin:0; | |||
| width:33%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-four-sliders .mod-slider { | |||
| margin:0; | |||
| width:25%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-five-sliders .mod-slider { | |||
| margin:0; | |||
| width:20%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-six-sliders .mod-slider { | |||
| margin:0; | |||
| width:16.5%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-seven-sliders .mod-slider { | |||
| margin:0; | |||
| width:14.2%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-eight-sliders .mod-slider { | |||
| margin:0; | |||
| width:12.5%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-nine-sliders .mod-slider { | |||
| margin:0; | |||
| width:11.11%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-ten-sliders .mod-slider { | |||
| margin:0; | |||
| width:10%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-ten-sliders .mod-slider .mod-slider-image { | |||
| margin-left:-5px; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-twelve-sliders .mod-slider { | |||
| margin:0; | |||
| width:8.333333%; | |||
| } | |||
| .mod-pedal-boxy{{{cns}}}.mod-twelve-sliders .mod-slider .mod-slider-image { | |||
| margin-left:-5px; | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| /* (Auto-generated binary data file). */ | |||
| #ifndef BINARY_DISTRHOARTWORKKARS_HPP | |||
| #define BINARY_DISTRHOARTWORKKARS_HPP | |||
| namespace DistrhoArtworkKars | |||
| { | |||
| extern const char* backgroundData; | |||
| const unsigned int backgroundDataSize = 379260; | |||
| const unsigned int backgroundWidth = 301; | |||
| const unsigned int backgroundHeight = 315; | |||
| extern const char* switchData; | |||
| const unsigned int switchDataSize = 61952; | |||
| const unsigned int switchWidth = 88; | |||
| const unsigned int switchHeight = 176; | |||
| } | |||
| #endif // BINARY_DISTRHOARTWORKKARS_HPP | |||
| @@ -0,0 +1,29 @@ | |||
| /* | |||
| * DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
| * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| * permission notice appear in all copies. | |||
| * | |||
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||
| * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||
| * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||
| * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||
| * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
| */ | |||
| #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
| #define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
| #define DISTRHO_PLUGIN_NAME "Kars" | |||
| #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Kars" | |||
| #define DISTRHO_PLUGIN_HAS_UI 1 | |||
| #define DISTRHO_PLUGIN_IS_RT_SAFE 1 | |||
| #define DISTRHO_PLUGIN_IS_SYNTH 1 | |||
| #define DISTRHO_PLUGIN_NUM_INPUTS 0 | |||
| #define DISTRHO_PLUGIN_NUM_OUTPUTS 1 | |||
| #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED | |||
| @@ -0,0 +1,214 @@ | |||
| /* | |||
| * DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
| * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| * permission notice appear in all copies. | |||
| * | |||
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||
| * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||
| * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||
| * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||
| * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
| */ | |||
| #include "DistrhoPluginKars.hpp" | |||
| START_NAMESPACE_DISTRHO | |||
| // ----------------------------------------------------------------------- | |||
| DistrhoPluginKars::DistrhoPluginKars() | |||
| : Plugin(paramCount, 0, 0), // 0 programs, 0 states | |||
| fSustain(false), | |||
| fSampleRate(getSampleRate()), | |||
| fBlockStart(0) | |||
| { | |||
| for (int i=kMaxNotes; --i >= 0;) | |||
| { | |||
| fNotes[i].index = i; | |||
| fNotes[i].setSampleRate(fSampleRate); | |||
| } | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| // Init | |||
| void DistrhoPluginKars::initParameter(uint32_t index, Parameter& parameter) | |||
| { | |||
| if (index != 0) | |||
| return; | |||
| parameter.hints = kParameterIsAutomable|kParameterIsBoolean; | |||
| parameter.name = "Sustain"; | |||
| parameter.symbol = "sustain"; | |||
| parameter.ranges.def = 0.0f; | |||
| parameter.ranges.min = 0.0f; | |||
| parameter.ranges.max = 1.0f; | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| // Internal data | |||
| float DistrhoPluginKars::getParameterValue(uint32_t index) const | |||
| { | |||
| if (index != 0) | |||
| return 0.0f; | |||
| return fSustain ? 1.0f : 0.0f; | |||
| } | |||
| void DistrhoPluginKars::setParameterValue(uint32_t index, float value) | |||
| { | |||
| if (index != 0) | |||
| return; | |||
| fSustain = value > 0.5f; | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| // Process | |||
| void DistrhoPluginKars::activate() | |||
| { | |||
| fBlockStart = 0; | |||
| for (int i=kMaxNotes; --i >= 0;) | |||
| { | |||
| fNotes[i].on = kNoteNull; | |||
| fNotes[i].off = kNoteNull; | |||
| fNotes[i].velocity = 0; | |||
| } | |||
| } | |||
| void DistrhoPluginKars::run(const float**, float** outputs, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||
| { | |||
| uint8_t note, velo; | |||
| float* out = outputs[0]; | |||
| for (uint32_t count, pos=0, curEventIndex=0; pos<frames;) | |||
| { | |||
| for (;curEventIndex < midiEventCount && pos >= midiEvents[curEventIndex].frame; ++curEventIndex) | |||
| { | |||
| if (midiEvents[curEventIndex].size > MidiEvent::kDataSize) | |||
| continue; | |||
| const uint8_t* data = midiEvents[curEventIndex].data; | |||
| const uint8_t status = data[0] & 0xF0; | |||
| switch (status) | |||
| { | |||
| case 0x90: | |||
| note = data[1]; | |||
| velo = data[2]; | |||
| DISTRHO_SAFE_ASSERT_BREAK(note < 128); // kMaxNotes | |||
| if (velo > 0) | |||
| { | |||
| fNotes[note].on = fBlockStart + midiEvents[curEventIndex].frame; | |||
| fNotes[note].off = kNoteNull; | |||
| fNotes[note].velocity = velo; | |||
| break; | |||
| } | |||
| // nobreak | |||
| case 0x80: | |||
| note = data[1]; | |||
| DISTRHO_SAFE_ASSERT_BREAK(note < 128); // kMaxNotes | |||
| fNotes[note].off = fBlockStart + midiEvents[curEventIndex].frame; | |||
| break; | |||
| } | |||
| } | |||
| if (curEventIndex < midiEventCount && midiEvents[curEventIndex].frame < frames) | |||
| count = midiEvents[curEventIndex].frame - pos; | |||
| else | |||
| count = frames - pos; | |||
| std::memset(out+pos, 0, sizeof(float)*count); | |||
| //for (uint32_t i=0; i<count; ++i) | |||
| // out[pos + i] = 0.0f; | |||
| for (int i=kMaxNotes; --i >= 0;) | |||
| { | |||
| if (fNotes[i].on != kNoteNull) | |||
| addSamples(out, i, pos, count); | |||
| } | |||
| pos += count; | |||
| } | |||
| fBlockStart += frames; | |||
| } | |||
| void DistrhoPluginKars::addSamples(float* out, int voice, uint32_t offset, uint32_t count) | |||
| { | |||
| const uint32_t start = fBlockStart + offset; | |||
| Note& note(fNotes[voice]); | |||
| if (start < note.on) | |||
| return; | |||
| if (start == note.on) | |||
| { | |||
| for (int i=note.sizei; --i >= 0;) | |||
| note.wavetable[i] = (float(rand()) / float(RAND_MAX)) * 2.0f - 1.0f; | |||
| } | |||
| const float vgain = float(note.velocity) / 127.0f; | |||
| bool decay; | |||
| float gain, sample; | |||
| uint32_t index, size; | |||
| for (uint32_t i=0, s=start-note.on; i<count; ++i, ++s) | |||
| { | |||
| gain = vgain; | |||
| if ((! fSustain) && note.off != kNoteNull && note.off < i+start) | |||
| { | |||
| // reuse index and size to save some performance. | |||
| // actual values are release and dist | |||
| index = 1 + uint32_t(0.01 * fSampleRate); // release, not index | |||
| size = i + start - note.off; // dist, not size | |||
| if (size > index) | |||
| { | |||
| note.on = kNoteNull; | |||
| break; | |||
| } | |||
| gain = gain * float(index - size) / float(index); | |||
| } | |||
| size = uint32_t(note.sizei); | |||
| decay = s > size; | |||
| index = s % size; | |||
| sample = note.wavetable[index]; | |||
| if (decay) | |||
| { | |||
| if (index == 0) | |||
| sample += note.wavetable[size-1]; | |||
| else | |||
| sample += note.wavetable[index-1]; | |||
| note.wavetable[index] = sample/2; | |||
| } | |||
| out[offset+i] += gain * sample; | |||
| } | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| Plugin* createPlugin() | |||
| { | |||
| return new DistrhoPluginKars(); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| END_NAMESPACE_DISTRHO | |||
| @@ -0,0 +1,142 @@ | |||
| /* | |||
| * DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
| * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| * permission notice appear in all copies. | |||
| * | |||
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||
| * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||
| * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||
| * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||
| * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
| */ | |||
| #ifndef DISTRHO_PLUGIN_KARS_HPP_INCLUDED | |||
| #define DISTRHO_PLUGIN_KARS_HPP_INCLUDED | |||
| #include "DistrhoPlugin.hpp" | |||
| START_NAMESPACE_DISTRHO | |||
| // ----------------------------------------------------------------------- | |||
| class DistrhoPluginKars : public Plugin | |||
| { | |||
| public: | |||
| static const int kMaxNotes = 128; | |||
| static const uint32_t kNoteNull = (uint32_t)-1; | |||
| enum Parameters | |||
| { | |||
| paramSustain = 0, | |||
| paramCount | |||
| }; | |||
| DistrhoPluginKars(); | |||
| protected: | |||
| // ------------------------------------------------------------------- | |||
| // Information | |||
| const char* getLabel() const noexcept override | |||
| { | |||
| return "Kars"; | |||
| } | |||
| const char* getMaker() const noexcept override | |||
| { | |||
| return "falkTX"; | |||
| } | |||
| const char* getLicense() const noexcept override | |||
| { | |||
| return "GPL v2+"; | |||
| } | |||
| uint32_t getVersion() const noexcept override | |||
| { | |||
| return 0x1000; | |||
| } | |||
| int64_t getUniqueId() const noexcept override | |||
| { | |||
| return d_cconst('D', 'K', 'r', 's'); | |||
| } | |||
| // ------------------------------------------------------------------- | |||
| // Init | |||
| void initParameter(uint32_t index, Parameter& parameter) override; | |||
| // ------------------------------------------------------------------- | |||
| // Internal data | |||
| float getParameterValue(uint32_t index) const override; | |||
| void setParameterValue(uint32_t index, float value) override; | |||
| // ------------------------------------------------------------------- | |||
| // Process | |||
| void activate() override; | |||
| void run(const float**, float** outputs, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) override; | |||
| // ------------------------------------------------------------------- | |||
| private: | |||
| bool fSustain; | |||
| double fSampleRate; | |||
| uint32_t fBlockStart; | |||
| struct Note { | |||
| uint32_t on; | |||
| uint32_t off; | |||
| uint8_t velocity; | |||
| float index; | |||
| float size; | |||
| int sizei; | |||
| float* wavetable; | |||
| Note() noexcept | |||
| : on(kNoteNull), | |||
| off(kNoteNull), | |||
| velocity(0), | |||
| index(0.0f), | |||
| size(0.0f), | |||
| wavetable(nullptr) {} | |||
| ~Note() noexcept | |||
| { | |||
| if (wavetable != nullptr) | |||
| { | |||
| delete[] wavetable; | |||
| wavetable = nullptr; | |||
| } | |||
| } | |||
| void setSampleRate(const double sampleRate) | |||
| { | |||
| if (wavetable != nullptr) | |||
| delete[] wavetable; | |||
| const float frequency = 440.0f * std::pow(2.0f, (index - 69.0f) / 12.0f); | |||
| size = sampleRate / frequency; | |||
| sizei = int(size)+1; | |||
| wavetable = new float[sizei]; | |||
| std::memset(wavetable, 0, sizeof(float)*static_cast<size_t>(sizei)); | |||
| } | |||
| } fNotes[kMaxNotes]; | |||
| void addSamples(float* out, int voice, uint32_t offset, uint32_t count); | |||
| DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginKars) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| END_NAMESPACE_DISTRHO | |||
| #endif // DISTRHO_PLUGIN_KARS_HPP_INCLUDED | |||
| @@ -0,0 +1,77 @@ | |||
| /* | |||
| * DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
| * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| * permission notice appear in all copies. | |||
| * | |||
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||
| * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||
| * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||
| * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||
| * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
| */ | |||
| #include "DistrhoPluginKars.hpp" | |||
| #include "DistrhoUIKars.hpp" | |||
| START_NAMESPACE_DISTRHO | |||
| namespace Art = DistrhoArtworkKars; | |||
| // ----------------------------------------------------------------------- | |||
| DistrhoUIKars::DistrhoUIKars() | |||
| : UI(Art::backgroundWidth, Art::backgroundHeight), | |||
| fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight) | |||
| { | |||
| // sustain switch | |||
| Image switchImageNormal(Art::switchData, Art::switchWidth, Art::switchHeight/2); | |||
| Image switchImageDown(Art::switchData+(Art::switchWidth*Art::switchHeight/2*4), Art::switchWidth, Art::switchHeight/2); | |||
| fSwitchSustain = new ImageSwitch(this, switchImageNormal, switchImageDown); | |||
| fSwitchSustain->setAbsolutePos(Art::backgroundWidth/2-Art::switchWidth/2, Art::backgroundHeight/2-Art::switchHeight/4); | |||
| fSwitchSustain->setId(DistrhoPluginKars::paramSustain); | |||
| fSwitchSustain->setCallback(this); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| // DSP Callbacks | |||
| void DistrhoUIKars::parameterChanged(uint32_t index, float value) | |||
| { | |||
| if (index != 0) | |||
| return; | |||
| fSwitchSustain->setDown(value > 0.5f); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| // Widget Callbacks | |||
| void DistrhoUIKars::imageSwitchClicked(ImageSwitch* imageSwitch, bool down) | |||
| { | |||
| if (imageSwitch != fSwitchSustain) | |||
| return; | |||
| editParameter(DistrhoPluginKars::paramSustain, true); | |||
| setParameterValue(DistrhoPluginKars::paramSustain, down ? 1.0f : 0.0f); | |||
| editParameter(DistrhoPluginKars::paramSustain, false); | |||
| } | |||
| void DistrhoUIKars::onDisplay() | |||
| { | |||
| fImgBackground.draw(); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| UI* createUI() | |||
| { | |||
| return new DistrhoUIKars(); | |||
| } | |||
| // ----------------------------------------------------------------------- | |||
| END_NAMESPACE_DISTRHO | |||
| @@ -0,0 +1,60 @@ | |||
| /* | |||
| * DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
| * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| * permission notice appear in all copies. | |||
| * | |||
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||
| * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||
| * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||
| * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||
| * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
| */ | |||
| #ifndef DISTRHO_UI_KARS_HPP_INCLUDED | |||
| #define DISTRHO_UI_KARS_HPP_INCLUDED | |||
| #include "DistrhoUI.hpp" | |||
| #include "ImageWidgets.hpp" | |||
| #include "DistrhoArtworkKars.hpp" | |||
| START_NAMESPACE_DISTRHO | |||
| // ----------------------------------------------------------------------- | |||
| class DistrhoUIKars : public UI, | |||
| public ImageSwitch::Callback | |||
| { | |||
| public: | |||
| DistrhoUIKars(); | |||
| protected: | |||
| // ------------------------------------------------------------------- | |||
| // DSP Callbacks | |||
| void parameterChanged(uint32_t index, float value) override; | |||
| // ------------------------------------------------------------------- | |||
| // Widget Callbacks | |||
| void imageSwitchClicked(ImageSwitch* imageSwitch, bool down) override; | |||
| void onDisplay() override; | |||
| private: | |||
| Image fImgBackground; | |||
| ScopedPointer<ImageSwitch> fSwitchSustain; | |||
| DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIKars) | |||
| }; | |||
| // ----------------------------------------------------------------------- | |||
| END_NAMESPACE_DISTRHO | |||
| #endif // DISTRHO_UI_KARS_HPP_INCLUDED | |||
| @@ -0,0 +1,55 @@ | |||
| #!/usr/bin/make -f | |||
| # Makefile for DISTRHO Plugins # | |||
| # ---------------------------- # | |||
| # Created by falkTX | |||
| # | |||
| # -------------------------------------------------------------- | |||
| # Project name, used for binaries | |||
| NAME = Kars | |||
| # -------------------------------------------------------------- | |||
| # Files to build | |||
| OBJS_DSP = \ | |||
| DistrhoPluginKars.cpp.o | |||
| OBJS_UI = \ | |||
| DistrhoArtworkKars.cpp.o \ | |||
| DistrhoUIKars.cpp.o | |||
| # -------------------------------------------------------------- | |||
| # Do some magic | |||
| include ../Makefile.Kars.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| TARGETS += dssi_dsp | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi_ui | |||
| endif | |||
| endif | |||
| endif | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| TARGETS += vst | |||
| all: $(TARGETS) | |||
| # -------------------------------------------------------------- | |||
| @@ -0,0 +1,153 @@ | |||
| #!/usr/bin/make -f | |||
| # Makefile for DISTRHO Plugins # | |||
| # ---------------------------- # | |||
| # Created by falkTX | |||
| # | |||
| # NAME, OBJS_DSP and OBJS_UI have been defined before | |||
| include ../../Makefile.mk | |||
| ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| TARGET_DIR = ../../bin | |||
| BUILD_C_FLAGS += -I. | |||
| BUILD_CXX_FLAGS += -I. -I../../dpf/distrho -I../../dpf/dgl | |||
| ifeq ($(HAVE_DGL),true) | |||
| BASE_FLAGS += -DHAVE_DGL | |||
| endif | |||
| ifeq ($(HAVE_JACK),true) | |||
| BASE_FLAGS += -DHAVE_JACK | |||
| endif | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| BASE_FLAGS += -DHAVE_LIBLO | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set plugin binary file targets | |||
| jack = $(TARGET_DIR)/$(NAME)$(APP_EXT) | |||
| ladspa_dsp = $(TARGET_DIR)/$(NAME)-ladspa$(LIB_EXT) | |||
| dssi_dsp = $(TARGET_DIR)/$(NAME)-dssi$(LIB_EXT) | |||
| dssi_ui = $(TARGET_DIR)/$(NAME)-dssi/$(NAME)_ui$(APP_EXT) | |||
| lv2 = $(TARGET_DIR)/$(NAME).lv2/$(NAME)$(LIB_EXT) | |||
| lv2_dsp = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_dsp$(LIB_EXT) | |||
| lv2_ui = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_ui$(LIB_EXT) | |||
| vst = $(TARGET_DIR)/$(NAME)-vst$(LIB_EXT) | |||
| # -------------------------------------------------------------- | |||
| # Set distrho code files | |||
| DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp | |||
| ifeq ($(HAVE_DGL),true) | |||
| DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/libdgl.a | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Handle plugins without UI | |||
| ifneq ($(HAVE_DGL),true) | |||
| dssi_ui = | |||
| lv2_ui = | |||
| DISTRHO_UI_FILES = | |||
| DGL_LIBS = | |||
| OBJS_UI = | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # all needs to be first | |||
| all: | |||
| # -------------------------------------------------------------- | |||
| # Common | |||
| %.c.o: %.c | |||
| $(CC) $< $(BUILD_C_FLAGS) -MD -MP -c -o $@ | |||
| %.cpp.o: %.cpp | |||
| $(CXX) $< $(BUILD_CXX_FLAGS) -MD -MP -c -o $@ | |||
| clean: | |||
| rm -f *.d *.o | |||
| rm -rf $(TARGET_DIR)/$(NAME) $(TARGET_DIR)/$(NAME)-* $(TARGET_DIR)/$(NAME).lv2/ | |||
| # -------------------------------------------------------------- | |||
| # JACK | |||
| jack: $(jack) | |||
| $(jack): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -lpthread $(DGL_LIBS) $(shell pkg-config --cflags --libs jack) -DDISTRHO_PLUGIN_TARGET_JACK -o $@ | |||
| # -------------------------------------------------------------- | |||
| # LADSPA | |||
| ladspa: $(ladspa_dsp) | |||
| $(ladspa_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -lpthread $(SHARED) -DDISTRHO_PLUGIN_TARGET_LADSPA -o $@ | |||
| # -------------------------------------------------------------- | |||
| # DSSI | |||
| dssi: $(dssi_dsp) $(dssi_ui) | |||
| dssi_dsp: $(dssi_dsp) | |||
| dssi_ui: $(dssi_ui) | |||
| $(dssi_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -lpthread $(SHARED) -DDISTRHO_PLUGIN_TARGET_DSSI -o $@ | |||
| $(dssi_ui): $(OBJS_UI) $(DISTRHO_UI_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(shell pkg-config --cflags --libs liblo) -DDISTRHO_PLUGIN_TARGET_DSSI -o $@ | |||
| # -------------------------------------------------------------- | |||
| # LV2 | |||
| lv2_one: $(lv2) | |||
| lv2_dsp: $(lv2_dsp) | |||
| lv2_sep: $(lv2_dsp) $(lv2_ui) | |||
| $(lv2): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -lpthread $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@ | |||
| $(lv2_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -lpthread $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@ | |||
| $(lv2_ui): $(OBJS_UI) $(DISTRHO_UI_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@ | |||
| # -------------------------------------------------------------- | |||
| # VST | |||
| vst: $(vst) | |||
| $(vst): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) | |||
| mkdir -p $(shell dirname $@) | |||
| $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -lpthread $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_VST -o $@ | |||
| # -------------------------------------------------------------- | |||
| -include $(OBJS_DSP:%.o=%.d) | |||
| ifeq ($(HAVE_DGL),true) | |||
| -include $(OBJS_UI:%.o=%.d) | |||
| endif | |||
| # -------------------------------------------------------------- | |||