Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Jan 17, 2025
1 parent ca4c43c commit 0c0c9b1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h4><span style="margin-right: 20px" id="bass-mute"></span>Bass</h4>
<tr valign="top">
<td><center>
<b><span style="margin-right: 20px" id="play-control"></span>Guitar Control</b>
<div id="control-items-1"></div>
<div id="control-items"></div>
</center></td>
<td><center>
<b><span style="margin-right: 20px" id="extern-device">Controller</span></b>
Expand All @@ -85,7 +85,7 @@ <h4><span style="margin-right: 20px" id="bass-mute"></span>Bass</h4>
<fluent-button appearance="accent" title='Guitar playing style' id="gamepad_mode">Color Tabs</fluent-button>
<fluent-button appearance="accent" title='Load external file (drum, chord, bass, midi, sty, etc)' id="load_file">Load</fluent-button>
<fluent-button appearance="accent" title='Pair/Unpair Stream Deck' id="stream_deck">Stream Deck</fluent-button>
<fluent-button appearance="accent" title='Pair/Unpair LiberLive/Lava Genie Guitar' style="display: none;" id="bluetooth">Bluetooth</fluent-button>
<fluent-button appearance="accent" title='Pair/Unpair LiberLive/Lava Genie Guitar' style="display: none;" id="bluetooth">BT</fluent-button>
<fluent-button appearance="accent" style="display: none;" id="chorda_bluetooth">BT OFF</fluent-button>
<fluent-button appearance="accent" style="display: none;" id="delete_style">Delete Style</fluent-button>
<fluent-button appearance="accent" style="display: none;" id="toggle_chat">Chat</fluent-button>
Expand Down
40 changes: 21 additions & 19 deletions docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ async function doLavaGenieSetup(device) {
resetGuitarHero();
}

document.getElementById("lavagenie").style.display = "";
document.getElementById("extern-device").innerHTML = "Lava Genie Guitar";
document.getElementById("lavagenie").style.display = "";

handlers[characteristic.uuid].addEventListener('characteristicvaluechanged', (evt) => {
const {buffer} = evt.target.value;
Expand Down Expand Up @@ -1318,10 +1319,10 @@ async function doLiberLiveSetup(device) {
resetGuitarHero();
}

const liberLiveSettings = document.getElementById("liberlive");
liberLiveSettings.style.display = "";
document.getElementById("liberlive").style.display = "";

if (mobileCheck()) {
document.getElementById("extern-device").innerHTML = "LiberLive C1 Guitar";
const controlDevice = document.getElementById("control-device");
controlDevice.append(document.getElementById("ll-chord1"));
controlDevice.append(document.getElementById("ll-drums1"));
Expand Down Expand Up @@ -1873,17 +1874,14 @@ async function onloadHandler() {
showVol.innerHTML = "Vol: " + Math.trunc(guitarVolume * 100);
});

const controlItems1 = document.getElementById("control-items-1");
const controlItems2 = document.getElementById("control-items-2");
const controlItems3 = document.getElementById("control-items-3");

controlItems1.append(document.getElementById("guitarStrum1"));
controlItems1.append(document.getElementById("guitarStrum2"));
controlItems1.append(document.getElementById("guitarStrum3"));
controlItems1.append(document.getElementById("guitarPosition"));
controlItems1.append(document.getElementById("guitarIRDef"));
controlItems1.append(document.getElementById("control-fill"));
controlItems1.append(document.getElementById("control-intro"));
const controlItems = document.getElementById("control-items");
controlItems.append(document.getElementById("guitarStrum1"));
controlItems.append(document.getElementById("guitarStrum2"));
controlItems.append(document.getElementById("guitarStrum3"));
controlItems.append(document.getElementById("guitarPosition"));
controlItems.append(document.getElementById("guitarIRDef"));
controlItems.append(document.getElementById("control-fill"));
controlItems.append(document.getElementById("control-intro"));

} else {
mobileContainer.style.display = "none";
Expand Down Expand Up @@ -6723,10 +6721,11 @@ function doChord() {

function startStopWebAudio() {
let gapTime = 0.5;
const stillPlaying = drumLoop?.looping || bassLoop?.looping || chordLoop?.looping;

console.debug("startStopWebAudio", styleStarted, stillPlaying, pad.buttons[YELLOW]);

console.debug("startStopWebAudio", styleStarted, pad.buttons[YELLOW]);

if (!styleStarted) {
if (!styleStarted) {
if (recordMode) startRecording();
if (!registration || registration == 0) setTempo(realInstrument.bpm);
const goTime = audioContext.currentTime + gapTime;
Expand Down Expand Up @@ -7865,7 +7864,9 @@ function scheduleArrNote() {
const secondsPerBeat = 60.0 / tempo;
const beatTime = (0.25 * secondsPerBeat);
const goTime = audioContext.currentTime + beatTime;


// TODO SFF plus WebAudio
/*
if (drumLoop && !drumLoop.looping && drumCheckedEle?.checked) {
drumLoop.start("arra", goTime);
}
Expand All @@ -7877,7 +7878,8 @@ function scheduleArrNote() {
if (chordLoop && !chordLoop.looping && chordCheckedEle?.checked) {
chordLoop.start("key" + (keyChange % 12), goTime);
}

*/

// TODO implement CASM
const channel = getCasmChannel(currentSffVar, event.channel);

Expand Down

0 comments on commit 0c0c9b1

Please sign in to comment.