From 9bb2a566df15769282702642a98cf1f7b16a3c80 Mon Sep 17 00:00:00 2001 From: XR-XharpRazor <114336132+XR-XharpRazor@users.noreply.github.com> Date: Thu, 9 Jan 2025 06:06:08 -0600 Subject: [PATCH 1/2] MouseDown to TouchStart --- index.html | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 2c0a012..126771a 100644 --- a/index.html +++ b/index.html @@ -827,35 +827,35 @@ // ---- ---- ---- ---- SCREEN CONTROLS - function POwO_addEventListen_MouseDownUp_PianoKeys( InRec ) + function POwO_addEventListen_touchstartUp_PianoKeys( InRec ) { - InRec.addEventListener("mousedown", (event) => {InRec.style.opacity = "1";}) - InRec.addEventListener("mouseup", (event) => {InRec.style.opacity = "0.5";}) + InRec.addEventListener("touchstart", (event) => {InRec.style.opacity = "1";}) + InRec.addEventListener("touchend", (event) => {InRec.style.opacity = "0.5";}) } for(var i = 0 ; i < recAll.length ; i++) { - POwO_addEventListen_MouseDownUp_PianoKeys(recAll[i]) + POwO_addEventListen_touchstartUp_PianoKeys(recAll[i]) } - btn_wave_sin.addEventListener("mousedown" , (event) => {POwO_Action_TypeSin()}) - btn_wave_tri.addEventListener("mousedown" , (event) => {POwO_Action_TypeTri()}) - btn_wave_saw.addEventListener("mousedown" , (event) => {POwO_Action_TypeSaw()}) - btn_wave_sqr.addEventListener("mousedown" , (event) => {POwO_Action_TypeSqr()}) + btn_wave_sin.addEventListener("touchstart" , (event) => {POwO_Action_TypeSin()}) + btn_wave_tri.addEventListener("touchstart" , (event) => {POwO_Action_TypeTri()}) + btn_wave_saw.addEventListener("touchstart" , (event) => {POwO_Action_TypeSaw()}) + btn_wave_sqr.addEventListener("touchstart" , (event) => {POwO_Action_TypeSqr()}) - btn_adktSetup.addEventListener("mousedown" , (event) => {POwO_adktSetup()}) + btn_adktSetup.addEventListener("touchstart" , (event) => {POwO_adktSetup()}) - btn_oct_d.addEventListener("mousedown" , (event) => {POwO_Action_OctaveDown()}) - btn_oct_u.addEventListener("mousedown" , (event) => {POwO_Action_OctaveUp()}) - btn_smi_d.addEventListener("mousedown" , (event) => {POwO_Action_SemiDown()}) - btn_smi_u.addEventListener("mousedown" , (event) => {POwO_Action_SemiUp()}) + btn_oct_d.addEventListener("touchstart" , (event) => {POwO_Action_OctaveDown()}) + btn_oct_u.addEventListener("touchstart" , (event) => {POwO_Action_OctaveUp()}) + btn_smi_d.addEventListener("touchstart" , (event) => {POwO_Action_SemiDown()}) + btn_smi_u.addEventListener("touchstart" , (event) => {POwO_Action_SemiUp()}) - btn_mod_l.addEventListener("mousedown" , (event) => {POwO_Action_ModL()}) - btn_prm_l.addEventListener("mousedown" , (event) => {POwO_Action_PrmL()}) - btn_prm_d.addEventListener("mousedown" , (event) => {POwO_Param_Change("-")}) - btn_prm_u.addEventListener("mousedown" , (event) => {POwO_Param_Change("+")}) - btn_prm_r.addEventListener("mousedown" , (event) => {POwO_Action_PrmR}) - btn_mod_r.addEventListener("mousedown" , (event) => {POwO_Action_ModR()}) + btn_mod_l.addEventListener("touchstart" , (event) => {POwO_Action_ModL()}) + btn_prm_l.addEventListener("touchstart" , (event) => {POwO_Action_PrmL()}) + btn_prm_d.addEventListener("touchstart" , (event) => {POwO_Param_Change("-")}) + btn_prm_u.addEventListener("touchstart" , (event) => {POwO_Param_Change("+")}) + btn_prm_r.addEventListener("touchstart" , (event) => {POwO_Action_PrmR}) + btn_mod_r.addEventListener("touchstart" , (event) => {POwO_Action_ModR()}) From 565ad4cca39ea09640505d61922a03176140b29c Mon Sep 17 00:00:00 2001 From: XR-XharpRazor <114336132+XR-XharpRazor@users.noreply.github.com> Date: Thu, 9 Jan 2025 06:19:32 -0600 Subject: [PATCH 2/2] when setup properly, manual text will turn from red to green --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 126771a..8265fd5 100644 --- a/index.html +++ b/index.html @@ -207,7 +207,7 @@

- [1 : ◯]   [2 : △]   [3 : ◺]   [4 : ▢]   [= : start / power / setup (MANDATORY)]
+ [1 : ◯]   [2 : △]   [3 : ◺]   [4 : ▢]   [= : start / power / setup (MANDATORY)]
[z : oct ↓]     [x : oct ↑]     [c : semi ↓]     [v : semi ↑]     [b : module ←]     [n : param ←]     [m : param ↓]     [, : param ↑]     [. : param →]     [/ : module →]
@@ -283,6 +283,8 @@ const btn_prm_r = document.getElementById("btn_prm_r"); const btn_mod_r = document.getElementById("btn_mod_r"); + const field_adktSetup = document.getElementById("field_adktSetup"); + const field_octave = document.getElementById("field_octave"); const field_semitone = document.getElementById("field_semitone"); @@ -584,6 +586,7 @@ POwO_ConnectAll() POwO_OscilatorAllStart() console.log("=") + field_adktSetup.style.color = "#004000" isREADY = true; }