-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
520 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix pset: <http://lv2plug.in/ns/ext/presets#> . | ||
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> . | ||
|
||
<urn:brummer10:neuralrecord> | ||
a lv2:Plugin ; | ||
lv2:binary <neuralrecord_dsp.so> ; | ||
rdfs:seeAlso <neuralrecord_dsp.ttl> ; | ||
rdfs:seeAlso <modgui.ttl> . | ||
|
||
<urn:brummer10:neuralrecord#preset001> | ||
a pset:Preset ; | ||
lv2:appliesTo <urn:brummer10:neuralrecord> ; | ||
rdfs:label "" ; | ||
rdfs:seeAlso <presets.ttl> . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@prefix modgui: <http://moddevices.com/ns/modgui#> . | ||
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . | ||
|
||
<urn:brummer10:neuralrecord> | ||
modgui:gui [ | ||
modgui:resourcesDirectory <modgui> ; | ||
modgui:iconTemplate <modgui/icon-profiler.html> ; | ||
modgui:stylesheet <modgui/stylesheet-profiler.css> ; | ||
modgui:screenshot <modgui/screenshot-profiler.png> ; | ||
modgui:thumbnail <modgui/thumbnail-profiler.png> ; | ||
modgui:javascript <modgui/script-profiler.js> ; | ||
modgui:brand "brummer" ; | ||
modgui:label "Neural Record" ; | ||
modgui:model "profiler" ; | ||
modgui:monitoredOutputs [ lv2:symbol "METER" ] , [ lv2:symbol "STATE" ] , [ lv2:symbol "ERRORS" ] ; | ||
modgui:port [ | ||
lv2:index 0 ; | ||
lv2:symbol "PROFILE" ; | ||
lv2:name "PROFILE" ; | ||
] ; | ||
] . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<div class="mod-pedal profiler{{{cns}}}"> | ||
<div class="popup" mod-role="POPUP"></div> | ||
<div class="background"> | ||
|
||
<div mod-role="drag-handle" class="mod-drag-handle"></div> | ||
<div class="mod-plugin-name"><h1>{{label}}</h1></div> | ||
<div class="mod-control-group clearfix"> | ||
{{#controls.0}} | ||
<div id="js-toggle" class="button" mod-role="input-control-port" mod-port-symbol="{{symbol}}" mod-widget="switch"></div> | ||
{{/controls.0}} | ||
</div> | ||
<div class="meterbar"> | ||
<div class="meter" mod-role="METER" mod-port-symbol="{{symbol}}"></div> | ||
</div> | ||
<div class="progressbar" title="{{comment}}"> | ||
<div class="progress" mod-role="STATE" mod-port-symbol="{{symbol}}"></div> | ||
</div> | ||
<div class="mod-pedal-input"> | ||
{{#effect.ports.audio.input}} | ||
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}"> | ||
<div class="mod-pedal-input-image"></div> | ||
</div> | ||
{{/effect.ports.audio.input}} | ||
{{#effect.ports.midi.input}} | ||
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}"> | ||
<div class="mod-pedal-input-image"></div> | ||
</div> | ||
{{/effect.ports.midi.input}} | ||
{{#effect.ports.cv.input}} | ||
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}"> | ||
<div class="mod-pedal-input-image"></div> | ||
</div> | ||
{{/effect.ports.cv.input}} | ||
</div> | ||
<div class="mod-pedal-output"> | ||
{{#effect.ports.audio.output}} | ||
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}"> | ||
<div class="mod-pedal-output-image"></div> | ||
</div> | ||
{{/effect.ports.audio.output}} | ||
{{#effect.ports.midi.output}} | ||
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}"> | ||
<div class="mod-pedal-output-image"></div> | ||
</div> | ||
{{/effect.ports.midi.output}} | ||
{{#effect.ports.cv.output}} | ||
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}"> | ||
<div class="mod-pedal-output-image"></div> | ||
</div> | ||
{{/effect.ports.cv.output}} | ||
</div> | ||
</div> | ||
</div> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
function (event) { | ||
|
||
const meter = event.icon.find ('[mod-role=METER]'); | ||
const state = event.icon.find ('[mod-role=STATE]'); | ||
const popup = event.icon.find ('[mod-role=POPUP]'); | ||
|
||
var position = "0"; | ||
|
||
function log_meter (db) { | ||
var def = 0.000001; /* Meter deflection %age */ | ||
|
||
if (db < -70.0) { | ||
def = 0.0000001; | ||
} else if (db < -60.0) { | ||
def = (db + 70.0) * 0.25; | ||
} else if (db < -50.0) { | ||
def = (db + 60.0) * 0.5 + 2.5; | ||
} else if (db < -40.0) { | ||
def = (db + 50.0) * 0.75 + 7.5; | ||
} else if (db < -30.0) { | ||
def = (db + 40.0) * 1.5 + 15.0; | ||
} else if (db < -20.0) { | ||
def = (db + 30.0) * 2.0 + 30.0; | ||
} else if (db < 6.0) { | ||
def = (db + 20.0) * 2.5 + 50.0; | ||
} else { | ||
def = 115.0; | ||
} | ||
|
||
return (Math.floor((def/115.0)* 100 ) ).toFixed(1); | ||
} | ||
|
||
function handle_event (symbol, value) { | ||
switch (symbol) { | ||
case 'METER': | ||
position = log_meter (value); | ||
meter.css({height: position + `%`}); | ||
if (value >= 0) { | ||
meter.css({boxShadow: `5px 5px 15px red`}); | ||
} else if (value > -6) { | ||
meter.css({boxShadow: `5px 5px 15px rgba(242, 121, 0, 0.8)`}); | ||
} else { | ||
meter.css({boxShadow: `5px 5px 15px rgba(35, 145, 0, 0.8)`}); | ||
} | ||
break; | ||
case 'STATE': | ||
position = (Math.floor(value * 100)).toFixed(); | ||
state.css({width: `${position}%`}); | ||
state.text(`${position}%`); | ||
break; | ||
case 'ERRORS': | ||
if (value >= 3.0) { | ||
popup.text(`Neural Record Error: Sample Rate mismatch, please use 48kHz`); | ||
popup.css({display: 'block'}); | ||
setTimeout(function() { popup.css({display: 'none'}); }, 5000); | ||
} else if (value >= 2.0) { | ||
popup.text(`Neural Record Error: Seems we receive only garbage, we stop the process now`); | ||
popup.css({display: 'block'}); | ||
setTimeout(function() { popup.css({display: 'none'}); }, 5000); | ||
} else if (value >= 1.0) { | ||
popup.text(`Neural Record Error: No signal comes in, we stop the process now`); | ||
popup.css({display: 'block'}); | ||
setTimeout(function() { popup.css({display: 'none'}); }, 5000); | ||
} | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
|
||
if (event.type == 'start') { | ||
var ports = event.ports; | ||
for (var p in ports) { | ||
handle_event (ports[p].symbol, ports[p].value); | ||
} | ||
} | ||
else if (event.type == 'change') { | ||
handle_event (event.symbol, event.value); | ||
} | ||
} |
Oops, something went wrong.