Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional midi_in/out checkboxes for hvcc #3

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions webserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ def build(msg):

symbol = symbolify(symbol)

if buildtype == 'hvcc':
midi_in = msg.get('midi_in')
midi_out = msg.get('midi_out')

if category == '(none)':
category = 'lv2:Plugin'
else:
Expand Down Expand Up @@ -286,8 +290,8 @@ def build(msg):
"license": "ISC",\
"lv2_info": "{category}",\
"maker": "{brand}",\
"midi_input": 0,\
"midi_output": 0,\
"midi_input": {1 if midi_in else 0},\
"midi_output": {1 if midi_out else 0},\
"plugin_uri": "urn:hvcc:{symbol}",\
"plugin_formats ":["lv2_sep"],\
"version": "0, 0, 0"\
Expand Down
12 changes: 12 additions & 0 deletions webserver/templates/builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@
brand: $('#brand').val(),
symbol: $('#symbol').val(),
category: $('#category').val(),
midi_in: $('#midi_in').is(":checked"),
midi_out: $('#midi_out').is(":checked")
};
var numFilesRead = 0;
for (var i=0; i<files.length; ++i) {
Expand Down Expand Up @@ -253,6 +255,16 @@ <h2>Plugin settings</h2>
{% endfor %}
</select>
</div>
{% if buildertype == 'hvcc' %}
<div class="mb-3 form-group form-check">
<label for="midi_in" class="form-check-label">Midi Input</label>
<input class="form-check-input" type="checkbox" name="midi_in" value="" id="midi_in">
</div>
<div class="mb-3 form-group form-check">
<label for="midi_out" class="form-check-label">Midi Output</label>
<input class="form-check-input" type="checkbox" name="midi_out" value="" id="midi_out">
</div>
{% endif %}
<!--
<div class="mb-3 form-group form-check">
<input class="form-check-input" type="checkbox" value="" id="save-settings">
Expand Down