...
 
Commits (3)
......@@ -49,9 +49,10 @@ select {
text-align: center;
}
#export > img {
nav > a > img{
width: 25px;
margin-left: 10px;
margin-right: 10px;
margin-top: -5px;
}
#synth, #category {
......
......@@ -33,7 +33,6 @@ for (let select of allSelects) {
var exportBtn = document.querySelector('#export');
var getPatchBtn = document.querySelector('#getPatch');
var storePatchBtn = document.querySelector('#storePatch');
var resetBtn = document.querySelector('#reset');
exportBtn.addEventListener('click', function(event) {
......@@ -45,14 +44,6 @@ getPatchBtn.addEventListener('click', function(event) {
getCurrentSelectedPatch();
});
storePatchBtn.addEventListener('click', function(event) {
console.log('Store patch to Circuit');
var slot = document.querySelector('#slot').value;
slot--;
storePatch(slot);
});
resetBtn.addEventListener('click', function(event) {
console.log('Reset all values');
......
......@@ -305,29 +305,6 @@ function setLFO(data, lfo) {
}
}
function storePatch(slot) {
if ((slot < 0) || (slot > 63)) {
return;
}
var data = getData();
// Set storage metadata
data.splice(6, 1, 1);
data.splice(7, 1, slot);
// Remove BOF and EOF
data.splice(349, 1);
data.splice(0, 1);
// Remove manufacturer
data.splice(0, 3);
console.log("storePatch", data);
output.sendSysex([0, 32, 41], data);
}
function synthHistoryAdd(id, value) {
let length = synthHistory.length;
let item = {
......@@ -392,5 +369,6 @@ function writeSysexFile(data) {
}
var blob = new Blob([ia], {type: "application/octet-stream"});
saveAs(blob, "circuit-patch.syx");
let patchName = document.querySelector('input[name="name"]').value || "circuit"
saveAs(blob, patchName + "-patch.syx");
}
......@@ -16,44 +16,25 @@
<body>
<nav class="navbar navbar-expand-lg navbar-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">Circuit Web Synth Editor <small id="status"></small></a>
<a class="navbar-brand" href="https://framagit.org/pumpkin/circuit-web-synth-editor" target="_blank"><img src="assets/info.png" alt="Informations about Circuitweb Editor"/>Circuit Web Synth Editor <small id="status"></small></a>
</nav>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<div class="container-fluid">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<nav class="navbar fixed-bottom navbar-light bg-dark">
<a class="nav-link btn-sm fixedBtn" id="simpleMode" data-toggle="tooltip" data-placement="bottom" title="Single oscillator and fewer parameters">Simple Mode</a>
<div class="nav-item dropup">
<a class="nav-link dropdown-toggle btn-sm fixedBtn" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Patch
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#" id="reset">New</a>
<hr/>
<a class="dropdown-item" href="#" id="getPatch" >Load & edit</a>
<a class="dropdown-item" href="#" id="getPatch" >Load from Circuit</a>
<hr/>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#slotModal">Store</a>
<a class="dropdown-item" href="#" id="export">Export</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="https://framagit.org/pumpkin/circuit-web-synth-editor" target="_blank" id="export"><img src="assets/info.png" alt="Informations about Circuitweb Editor"/></a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="nav btn-group justify-content-center" role="group">
</div>
<nav class="navbar fixed-bottom navbar-light bg-dark">
<a class="nav-link btn-sm fixedBtn" id="simpleMode" data-toggle="tooltip" data-placement="bottom" title="Single oscillator and fewer parameters">Simple Mode</a>
<a class="nav-link btn-sm fixedBtn" id="undo" data-toggle="tooltip" data-placement="bottom" title="Undo last action">Undo</a>
</nav>
......@@ -5970,27 +5951,6 @@
</fieldset>
</div>
<!-- Modal -->
<div class="modal f" id="slotModal" tabindex="-1" role="dialog" aria-labelledby="slotModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="slotModalLabel">Store patch to Circuit</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<input id="slot" type="number" min="1" max="64" class="input-group" placeholder="Slot to store the patch (number from 1 to 64)"/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-warning" id="storePatch" data-dismiss="modal">Store Patch</button>
</div>
</div>
</div>
</div>
<br/>
<br/>
......