From c5b21bf64d593083f132203f39e1c1b16a65fca7 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Thu, 25 May 2023 05:53:01 -0500 Subject: [PATCH 01/15] Update app.js - increased legibility - reworked GUI --- apps/Uke/app.js | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/apps/Uke/app.js b/apps/Uke/app.js index c60c49a6b..3c28381c0 100644 --- a/apps/Uke/app.js +++ b/apps/Uke/app.js @@ -72,12 +72,28 @@ var ee = [ var index = 0; var chords = []; +var menu = { + "" : { + "title" : "Uke Chords" + }, + "C" : function() { draw(cc); }, + "D" : function() { draw(dd); }, + "E" : function() { draw(ee); }, + "Em" : function() { draw(em); }, + "A" : function() { draw(aa); }, + "Am" : function() { draw(am); }, + "F" : function() { draw(ff); }, + "G" : function() { draw(gg); }, + "About" : function() { + E.showMessage( + "Created By:\nNovaDawn999", { + title:"About" + } + ); + } +}; + -function init() { - g.setFontAlign(0,0); // center font - g.setFont("6x8",2); // bitmap font, 8x magnified - chords.push(cc, dd, gg, am, em, aa, ff, ee); -} function drawBase() { for (let i = 0; i < 4; i++) { @@ -87,18 +103,18 @@ function drawBase() { } function drawChord(chord) { - g.drawString(chord[0], g.getWidth() * 0.5 + 2, 18); + g.drawString(chord[0], g.getWidth() * 0.5 - 3, 18); for (let i = 0; i < chord.length; i++) { if (i === 0 || chord[i][0] === "x") { continue; } if (chord[i][0] === "0") { - g.drawString(chord[i][1], x + (i - 1) * stringInterval + 1, y + fretHeight * chord[i][0], true); - g.drawCircle(x + (i - 1) * stringInterval -1, y + fretHeight * chord[i][0], 8); + g.drawString(chord[i][1], x + (i - 1) * stringInterval - 5, y + fretHeight * chord[i][0] + 2, true); + g.drawCircle(x + (i - 1) * stringInterval -1, y + fretHeight * chord[i][0], 10); } else { - g.drawString(chord[i][1], x + (i - 1) * stringInterval + 1, y -fingerOffset + fretHeight * chord[i][0], true); - g.drawCircle(x + (i - 1) * stringInterval -1, y -fingerOffset + fretHeight * chord[i][0], 8); + g.drawString(chord[i][1], x + (i - 1) * stringInterval -5, y -fingerOffset + fretHeight * chord[i][0] + 2, true); + g.drawCircle(x + (i - 1) * stringInterval -1, y -fingerOffset + fretHeight * chord[i][0], 10); } } } @@ -107,22 +123,19 @@ function buttonPress() { setWatch(() => { buttonPress(); }, BTN); - index++; - if (index >= chords.length) { index = 0; } - draw(); + E.showMenu(menu); } -function draw() { +function draw(chord) { g.clear(); drawBase(); - drawChord(chords[index]); + drawChord(chord); } function main() { - init(); - draw(); + E.showMenu(menu); setWatch(() => { buttonPress(); }, BTN); From dc27727157b28ebfc861c0e2adf413ffce7e2fd4 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Thu, 25 May 2023 05:53:41 -0500 Subject: [PATCH 02/15] Update metadata.json 0.02 --- apps/Uke/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/Uke/metadata.json b/apps/Uke/metadata.json index 10c3b3e79..8d92718c3 100644 --- a/apps/Uke/metadata.json +++ b/apps/Uke/metadata.json @@ -1,7 +1,7 @@ { "id": "Uke", "name": "Uke Chords", "shortName":"Uke", - "version":"0.01", + "version":"0.02", "description": "Wrist mounted ukulele chords", "icon": "app.png", "tags": "uke, chords", From e4e45b5d2d2d666b789027907c1e67a8e2bbb493 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Thu, 25 May 2023 05:54:18 -0500 Subject: [PATCH 03/15] Update ChangeLog --- apps/Uke/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/Uke/ChangeLog b/apps/Uke/ChangeLog index 5560f00bc..366158b0e 100644 --- a/apps/Uke/ChangeLog +++ b/apps/Uke/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Increased Legibility, GUI rework From 6fb3417f82549145d36e6b67a8491f9475fed2b3 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Thu, 25 May 2023 05:57:10 -0500 Subject: [PATCH 04/15] Update README.md --- apps/Uke/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/Uke/README.md b/apps/Uke/README.md index 49ceea1ed..b6236e307 100644 --- a/apps/Uke/README.md +++ b/apps/Uke/README.md @@ -4,7 +4,8 @@ An app that simply describes finger placements on a Ukulele to form common chord ## Usage -Use the button to scroll through the available chords. +Select a chord to view. +Use the button to return to the chord selection menu. ## Creator From 974ab7f5252666758bce7954e8101cafff536bf8 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:15:42 -0500 Subject: [PATCH 05/15] Create app.js --- apps/guitar/app.js | 159 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 apps/guitar/app.js diff --git a/apps/guitar/app.js b/apps/guitar/app.js new file mode 100644 index 000000000..d48d9009a --- /dev/null +++ b/apps/guitar/app.js @@ -0,0 +1,159 @@ +const stringInterval = 24; +const stringLength = 138; +const fretHeight = 35; +const fingerOffset = 17; +const x = 30; +const y = 32; + +//chords +const cc = [ + "C", + "0X", + "33", + "22", + "x", + "11", + "x" +]; + +const dd = [ + "D", + "0X", + "0X", + "x", + "21", + "33", + "22" +]; + +const gg = [ + "G", + "32", + "21", + "x", + "x", + "x", + "33" +]; + +const am = [ + "Am", + "0x", + "x", + "22", + "23", + "11" +]; + +const em = [ + "Em", + "x", + "22", + "23", + "x", + "x", + "x" +]; + +const aa = [ + "A", + "0X", + "x", + "21", + "22", + "23", + "x" +]; + +const ff = [ + "F", + "0X", + "33", + "34", + "22", + "11", + "11" +]; + +var ee = [ + "E", + "x", + "22", + "23", + "11", + "x", + "x" +]; + +var index = 0; +var chords = []; +var menu = { + "" : { + "title" : "Guitar Chords" + }, + "C" : function() { draw(cc); }, + "D" : function() { draw(dd); }, + "E" : function() { draw(ee); }, + "Em" : function() { draw(em); }, + "A" : function() { draw(aa); }, + "Am" : function() { draw(am); }, + "F" : function() { draw(ff); }, + "G" : function() { draw(gg); }, + "About" : function() { + E.showMessage( + "Created By:\nNovaDawn999", { + title:"About" + } + ); + } +}; + + + +function drawBase() { + for (let i = 0; i < 6; i++) { + g.drawLine(x + i * stringInterval, y, x + i * stringInterval, y + stringLength); + g.fillRect(x- 1, y + i * fretHeight - 1, x + stringInterval * 5 + 1, y + i * fretHeight + 1); + } +} + +function drawChord(chord) { + g.drawString(chord[0], g.getWidth() * 0.5 - 3, 18); + for (let i = 0; i < chord.length; i++) { + if (i === 0 || chord[i][0] === "x") { + continue; + } + if (chord[i][0] === "0") { + g.drawString(chord[i][1], x + (i - 1) * stringInterval - 5, y + fretHeight * chord[i][0] + 2, true); + g.drawCircle(x + (i - 1) * stringInterval -1, y + fretHeight * chord[i][0], 10); + } + else { + g.drawString(chord[i][1], x + (i - 1) * stringInterval -5, y -fingerOffset + fretHeight * chord[i][0] + 2, true); + g.drawCircle(x + (i - 1) * stringInterval -1, y -fingerOffset + fretHeight * chord[i][0], 10); + } + } +} + +function buttonPress() { + setWatch(() => { + buttonPress(); + }, BTN); + E.showMenu(menu); +} + +function draw(chord) { + g.clear(); + drawBase(); + drawChord(chord); +} + + + +function main() { + E.showMenu(menu); + setWatch(() => { + buttonPress(); + }, BTN); +} + +main(); From def056b496b89324b6fbcad58514035f9d985603 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:16:32 -0500 Subject: [PATCH 06/15] Create ChangeLog --- apps/guitar/ChangeLog | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/guitar/ChangeLog diff --git a/apps/guitar/ChangeLog b/apps/guitar/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/guitar/ChangeLog @@ -0,0 +1 @@ +0.01: New App! From 6dc94b96cae6b41289b451b27e518ed7496108a3 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:17:16 -0500 Subject: [PATCH 07/15] Create README.md --- apps/guitar/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 apps/guitar/README.md diff --git a/apps/guitar/README.md b/apps/guitar/README.md new file mode 100644 index 000000000..ad4ecca4a --- /dev/null +++ b/apps/guitar/README.md @@ -0,0 +1,12 @@ +# Guitar Chords + +An app that simply describes finger placements on a Guitar to form common chords. + +## Usage + +Select a chord to view. +Use the button to return to the chord selection menu. + +## Creator + +NovaDawn999 From 724937205ec00a4fc76532c078674c357fbf2c05 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:19:19 -0500 Subject: [PATCH 08/15] Create app-icon.js --- apps/guitar/app-icon.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/guitar/app-icon.js diff --git a/apps/guitar/app-icon.js b/apps/guitar/app-icon.js new file mode 100644 index 000000000..7a5487de6 --- /dev/null +++ b/apps/guitar/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("AJhMMJApEAPwBjJKEF1aJRBcrRKaMFKJQhgoXQYoMQSMpRRiCF1COCjVRcsplaJFFIoLgnWsLkO73RcpJO7TQwDFKoLkgAD1KpEQsfLQuGRQYkF0+pFBcgRg+o0ki6I0we70i4iXQqIFzQqJ1aiFghmCLUKquwWAC2wxcZ3u7BIjUQQGLjvb3apRaAF0RcD3aDRIICAjuUJQ/IWgepEK6Xwl0euQe77hcaFxYiiw16j3uiMAiKYvh6ivDguP1AuERjCQKvwS8eFxQAIFziQKXjxgUFzxgOFzxgMXjhgQFkAwKLkQAFJAsqAPwAyA")) From 52d45afc1cfc61eeea4cfc9a0042eca08737523e Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:20:08 -0500 Subject: [PATCH 09/15] Add files via upload --- apps/guitar/app.png | Bin 0 -> 1798 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/guitar/app.png diff --git a/apps/guitar/app.png b/apps/guitar/app.png new file mode 100644 index 0000000000000000000000000000000000000000..6ff5d79ca34164a3a66ddd3b8a0f8eae81286cd2 GIT binary patch literal 1798 zcmV+h2l@DkP)S(*QIL}#iWQ94#XV3&4bxd^y%O~VVPdERfK z%$jBzz-5Lr^Ue;i!*|a6ob$ZT`vLvvM?bt0%VtiRSgaZMpVy3AXu*BxOZX;v`29yC z$F`i;jFeTZ84sVcJTm}&0f{e6p7mMun5trv@%HA|Ce)mY8S}FeVlozbeI=I82$^$s zQQ(DQld&WBji9fOMvaa*6K8DwJZ7v-uSDQxcq`6Dj~sk5dbF$9WaR0X(dLX<6TUcW zGB%3{sf5Q$`{1p(5EnR8NFI+GSIO}r$P5IadGO0-Es;H`+79y)&YTVYM>BB$|qY|ypNN{F2#6A3e>%!Id-PhSwm zw0U7%J3ovk;)2{F;*01p)rl`nnuESV-ZDRoY41#H5<3;g8()!Nqpy*VnjShH-VU!N zZ;!_lHVp^uacHo`p}8~`r%I#nbe|yaNJOwB30Iv-pe#os_)7w4UxE&M9P)pfi$PvX zzG4;pTr1$HUIogklC=VKrGOR5x|rga2fkh7jpPNj={SDH0$y3`Sr)K19jsZS3;NDH zgc6PT`GLg`*0lc~qyqfJ<8^MP4VBI?KV#*L^ymKe{bZ;T=&cWO6Ex6gZ6>Q1_ zo3`nn^7F4-z#miZCZDw+MA@lC!@zq&x@D&-N z=lTF%w)iu1e#l+q#ZJ!mK)VS$dyTZig26SZc%wcO$J{w+ZOqe&w-tcD?E%|%8)(ZI z$=X~$wptBr-EH8R)uU*+gM6s6Q}qX6#rt}9DviNYJxaVX8UB?i*jk;6rut0Kouk`C zc3g;G`w;wnA6T9_l8t)@(DJ4aLr3}X-RBq^Ga1#@tHHVqJ)E-hio6xP{xR783D{)yWkbFn*S+P#36DR@MK6zK z!kqDZclsz6Xpivhnm}H%Jft!q!Ith+wGzrkHWS=ELcS~(!45N8q?gMB<-xz^>b8-c z7xFhg0dE}!YqkaO#$f}eKIx~(Cr1P`>GfcmXOCm_^COgeu4une@vzP__^&WCReO)~12=S$a!UyKmJ!fAgSDzT+6!y5E%zs`4PsxID*rj)HBg&9YEW<5o|3$R|UjE zRjW|`iy1-PPTnKnHyOsnr}8j)sOmgopO19=q(+QoA95vC?X#<*MD!#YyxQN;C{~CZbY8+;s*>7uq2sgXi?!?-6kb zyqNQ#%7g@4x>I{6d8;m3_5Tfc5xohA8R3;FxGl$i*9al=&)-G}v6B#1t5E-){7t?i zfOBDR zEyrQGRY{oT(xODN8&_E+WNp5`L*(bt+!Ny+VnGfv%M}C00@**6X_} z1pn<4BY#)7u?%&kY%EKJ5AG!#77VUhiLay*VkfyK3cf1ZvX%Q literal 0 HcmV?d00001 From cfa6321f71030e0a11216fe59be5198899109924 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:21:13 -0500 Subject: [PATCH 10/15] Create metadata.json --- apps/guitar/metadata.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 apps/guitar/metadata.json diff --git a/apps/guitar/metadata.json b/apps/guitar/metadata.json new file mode 100644 index 000000000..50c55bece --- /dev/null +++ b/apps/guitar/metadata.json @@ -0,0 +1,14 @@ +{ "id": "Guitar", + "name": "Guitar Chords", + "shortName":"Guitar", + "version":"0.01", + "description": "Wrist mounted guitar chords", + "icon": "app.png", + "tags": "guitar, chords", + "supports" : ["BANGLEJS2"], + "readme": "README.md", + "storage": [ + {"name":"guitar.app.js","url":"app.js"}, + {"name":"guitar.img","url":"app-icon.js","evaluate":true} + ] +} From a25c98d3ad4f351474b9775c45bec57a10300d9c Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:25:09 -0500 Subject: [PATCH 11/15] Update metadata.json --- apps/guitar/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/guitar/metadata.json b/apps/guitar/metadata.json index 50c55bece..8f98ce44e 100644 --- a/apps/guitar/metadata.json +++ b/apps/guitar/metadata.json @@ -1,4 +1,4 @@ -{ "id": "Guitar", +{ "id": "guitar", "name": "Guitar Chords", "shortName":"Guitar", "version":"0.01", From 6f63528a612c7814b16f59c896ea8f560727b166 Mon Sep 17 00:00:00 2001 From: NovaDawn999 <106365882+NovaDawn999@users.noreply.github.com> Date: Fri, 26 May 2023 00:26:21 -0500 Subject: [PATCH 12/15] Update app-icon.js --- apps/guitar/app-icon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/guitar/app-icon.js b/apps/guitar/app-icon.js index 7a5487de6..490541b44 100644 --- a/apps/guitar/app-icon.js +++ b/apps/guitar/app-icon.js @@ -1 +1 @@ -require("heatshrink").decompress(atob("AJhMMJApEAPwBjJKEF1aJRBcrRKaMFKJQhgoXQYoMQSMpRRiCF1COCjVRcsplaJFFIoLgnWsLkO73RcpJO7TQwDFKoLkgAD1KpEQsfLQuGRQYkF0+pFBcgRg+o0ki6I0we70i4iXQqIFzQqJ1aiFghmCLUKquwWAC2wxcZ3u7BIjUQQGLjvb3apRaAF0RcD3aDRIICAjuUJQ/IWgepEK6Xwl0euQe77hcaFxYiiw16j3uiMAiKYvh6ivDguP1AuERjCQKvwS8eFxQAIFziQKXjxgUFzxgOFzxgMXjhgQFkAwKLkQAFJAsqAPwAyA")) +require("heatshrink").decompress(atob("mEwwkCkQA/AGMkoQXVptEFytEogwUCoIYBLqlUGIIXTopHVknUoXULylNpouUIoKmUUi0hoMUailEiMSCR/d7pdECx8tC4IYBolULqAWC7qLSFwfdiKMRC4dEoK6RFwYWBppdW7vSLiPd6gXPConVgIWCYYYtM9vdosUqgXOFwndilBqoGDLh/eqtEioXR9xHCoIXDO5SKEpvU6kVppeQ73kqgwB7wuNOwosEXqSlB9xFNR49RpwXV6pICIxhIF73ePAIXTAAgXOJApePGBQXPGA4XPGAxeOGBAWQDAouRDAgWUAH4AZ")) From 1a82f314cefd3fef8c8152f54aedce98a878d226 Mon Sep 17 00:00:00 2001 From: novadawn999 Date: Sun, 4 Jun 2023 15:38:28 -0500 Subject: [PATCH 13/15] added 13 new chords support for fret offsets more formatting refinements --- apps/guitar/ChangeLog | 1 + apps/guitar/app.js | 241 +++++++++++++++++++++++++++++++++----- apps/guitar/metadata.json | 2 +- 3 files changed, 213 insertions(+), 31 deletions(-) diff --git a/apps/guitar/ChangeLog b/apps/guitar/ChangeLog index 5560f00bc..22c67383d 100644 --- a/apps/guitar/ChangeLog +++ b/apps/guitar/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: More Chords, formatting, fret offset support. \ No newline at end of file diff --git a/apps/guitar/app.js b/apps/guitar/app.js index d48d9009a..6c172f920 100644 --- a/apps/guitar/app.js +++ b/apps/guitar/app.js @@ -2,10 +2,9 @@ const stringInterval = 24; const stringLength = 138; const fretHeight = 35; const fingerOffset = 17; -const x = 30; -const y = 32; +const xOffset = 26; +const yOffset = 34; -//chords const cc = [ "C", "0X", @@ -13,7 +12,8 @@ const cc = [ "22", "x", "11", - "x" + "x", + "0" ]; const dd = [ @@ -23,7 +23,8 @@ const dd = [ "x", "21", "33", - "22" + "22", + "0" ]; const gg = [ @@ -33,16 +34,19 @@ const gg = [ "x", "x", "x", - "33" + "33", + "0" ]; const am = [ "Am", "0x", "x", - "22", "23", - "11" + "22", + "11", + "x", + "0" ]; const em = [ @@ -52,7 +56,8 @@ const em = [ "23", "x", "x", - "x" + "x", + "0" ]; const aa = [ @@ -62,17 +67,8 @@ const aa = [ "21", "22", "23", - "x" -]; - -const ff = [ - "F", - "0X", - "33", - "34", - "22", - "11", - "11" + "x", + "0" ]; var ee = [ @@ -82,9 +78,177 @@ var ee = [ "23", "11", "x", - "x" + "x", + "0" ]; +var dm = [ + "Dm", + "0x", + "0x", + "x", + "22", + "33", + "11", + "0" +]; + +var ff = [ + "F", + "0x", + "0x", + "33", + "22", + "11", + "11", + "0" +]; + +var b7 = [ + "B7", + "0x", + "22", + "11", + "23", + "x", + "24", + "0" +]; + +var cadd9 = [ + "Cadd9", + "0x", + "32", + "21", + "x", + "33", + "34", + "0" +]; + +var dadd11 = [ + "Dadd11", + "0x", + "33", + "22", + "x", + "11", + "x", + "3" +]; + +var csus2 = [ + "Csus2", + "0x", + "33", + "x", + "x", + "11", + "0x", + "0" +]; + +var gadd9 = [ + "Gadd9", + "32", + "0x", + "x", + "21", + "x", + "33", + "0" +]; + +var aadd9 = [ + "Aadd9", + "11", + "33", + "34", + "22", + "x", + "x", + "5" +]; + +var fsharp7add11 = [ + "F#7add11", + "21", + "43", + "44", + "32", + "x", + "x", + "0" +]; + +var d9 = [ + "D9", + "0x", + "22", + "11", + "23", + "23", + "0x", + "4" +]; + +var g7 = [ + "G7", + "33", + "22", + "x", + "x", + "34", + "11", + "0" +]; + +var bflatd = [ + "Bb/D", + "0x", + "33", + "11", + "11", + "11", + "0x", + "3" +]; + +var e7sharp9 = [ + "E7#9", + "0x", + "22", + "11", + "23", + "34", + "0x", + "6" +]; + +var a11 = [ + "A11 3rd fret", + "33", + "0x", + "34", + "22", + "11", + "0x", + "0" +]; + +var a9 = [ + "A9", + "32", + "0x", + "33", + "21", + "34", + "0x", + "3" +]; + + + var index = 0; var chords = []; var menu = { @@ -99,6 +263,20 @@ var menu = { "Am" : function() { draw(am); }, "F" : function() { draw(ff); }, "G" : function() { draw(gg); }, + "Dm" : function() { draw(dm); }, + "B7" : function () { draw(b7); }, + "Cadd9" : function () { draw(cadd9); }, + "Dadd11" : function () { draw(dadd11); }, + "Csus2" : function () { draw(csus2); }, + "Gadd9" : function () { draw(gadd9); }, + "Aadd9" : function () { draw(aadd9); }, + "F#7add11" : function () { draw(fsharp7add11); }, + "D9" : function () { draw(d9); }, + "G7" : function () { draw(g7); }, + "Bb/D" : function () { draw(bflatd); }, + "E7#9" : function () { draw(e7sharp9); }, + "A11" : function () { draw(a11); }, + "A9" : function () { draw(a9); }, "About" : function() { E.showMessage( "Created By:\nNovaDawn999", { @@ -112,26 +290,29 @@ var menu = { function drawBase() { for (let i = 0; i < 6; i++) { - g.drawLine(x + i * stringInterval, y, x + i * stringInterval, y + stringLength); - g.fillRect(x- 1, y + i * fretHeight - 1, x + stringInterval * 5 + 1, y + i * fretHeight + 1); + g.drawLine(xOffset + i * stringInterval, yOffset, xOffset + i * stringInterval, yOffset + stringLength); + g.fillRect(xOffset- 1, yOffset + i * fretHeight - 1, xOffset + stringInterval * 5 + 1, yOffset + i * fretHeight + 1); } } function drawChord(chord) { - g.drawString(chord[0], g.getWidth() * 0.5 - 3, 18); - for (let i = 0; i < chord.length; i++) { + g.drawString(chord[0], g.getWidth() * 0.5 - (chord[0].length * 5), 16); + for (let i = 0; i < chord.length - 1; i++) { if (i === 0 || chord[i][0] === "x") { continue; } if (chord[i][0] === "0") { - g.drawString(chord[i][1], x + (i - 1) * stringInterval - 5, y + fretHeight * chord[i][0] + 2, true); - g.drawCircle(x + (i - 1) * stringInterval -1, y + fretHeight * chord[i][0], 10); + g.drawString(chord[i][1], xOffset + (i - 1) * stringInterval - 5, yOffset + fretHeight * chord[i][0] + 2, true); + g.drawCircle(xOffset + (i - 1) * stringInterval -1, yOffset + fretHeight * chord[i][0], 10); } else { - g.drawString(chord[i][1], x + (i - 1) * stringInterval -5, y -fingerOffset + fretHeight * chord[i][0] + 2, true); - g.drawCircle(x + (i - 1) * stringInterval -1, y -fingerOffset + fretHeight * chord[i][0], 10); + g.drawString(chord[i][1], xOffset + (i - 1) * stringInterval -5, yOffset -fingerOffset + fretHeight * chord[i][0] + 2, true); + g.drawCircle(xOffset + (i - 1) * stringInterval -1, yOffset -fingerOffset + fretHeight * chord[i][0], 10); } } + if (chord[7] !== "0") { + g.drawString(chord[7], 9, 50); + } } function buttonPress() { @@ -156,4 +337,4 @@ function main() { }, BTN); } -main(); +main(); \ No newline at end of file diff --git a/apps/guitar/metadata.json b/apps/guitar/metadata.json index 8f98ce44e..6ab3ffc51 100644 --- a/apps/guitar/metadata.json +++ b/apps/guitar/metadata.json @@ -1,7 +1,7 @@ { "id": "guitar", "name": "Guitar Chords", "shortName":"Guitar", - "version":"0.01", + "version":"0.02", "description": "Wrist mounted guitar chords", "icon": "app.png", "tags": "guitar, chords", From e21fc018b43367e9d5dbfaa872cb6ce656e1b5cd Mon Sep 17 00:00:00 2001 From: novadawn999 Date: Sun, 4 Jun 2023 16:26:35 -0500 Subject: [PATCH 14/15] added 13 more chords --- apps/Uke/ChangeLog | 1 + apps/Uke/app.js | 235 ++++++++++++++++++++++++++++++----------- apps/Uke/metadata.json | 2 +- 3 files changed, 178 insertions(+), 60 deletions(-) diff --git a/apps/Uke/ChangeLog b/apps/Uke/ChangeLog index 366158b0e..ef5ffa3fe 100644 --- a/apps/Uke/ChangeLog +++ b/apps/Uke/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Increased Legibility, GUI rework +0.03: 13 new chords diff --git a/apps/Uke/app.js b/apps/Uke/app.js index 3c28381c0..411a39b70 100644 --- a/apps/Uke/app.js +++ b/apps/Uke/app.js @@ -16,52 +16,12 @@ const cc = [ const dd = [ "D", + "22", "23", - "22", "24", "x" ]; -const gg = [ - "G", - "x", - "21", - "33", - "22", -]; - -const am = [ - "Am", - "22", - "x", - "x", - "x" -]; - -const em = [ - "Em", - "x", - "43", - "32", - "21" -]; - -const aa = [ - "A", - "22", - "11", - "x", - "x" -]; - -const ff = [ - "F", - "22", - "x", - "11", - "x" -]; - var ee = [ "E", "33", @@ -70,27 +30,184 @@ var ee = [ "11" ]; +const ff = [ + "F", + "22", + "x", + "11", + "x" +]; + +const gg = [ + "G", + "x", + "21", + "33", + "22", +]; + +const aa = [ + "A", + "22", + "11", + "x", + "x" +]; + +const bb = [ + "B", + "42", + "43", + "44", + "21" +]; + +const cm = [ + "Cm", + "11", + "x", + "12", + "34" +]; + +const dm = [ + "Dm", + "x", + "22", + "33", + "11" +]; + +const em = [ + "Em", + "x", + "43", + "32", + "21" +]; + +const fm = [ + "Fm", + "33", + "11", + "11", + "11" +]; + +const gm = [ + "Gm", + "x", + "22", + "33", + "11" +]; + +const am = [ + "Am", + "22", + "23", + "11", + "x" +]; + +const bm = [ + "Bm", + "x", + "43", + "32", + "21" +]; + +const c7 = [ + "C7", + "22", + "33", + "11", + "x" +]; + +const d7 = [ + "D7", + "x", + "22", + "11", + "23" +]; + +const e7 = [ + "E7", + "x", + "11", + "x", + "x" +]; + +const f7 = [ + "F7", + "11", + "22", + "11", + "11" +]; + +const g7 = [ + "G7", + "x", + "x", + "x", + "11" +]; + +const a7 = [ + "A7", + "21", + "21", + "21", + "32" +]; + +const b7 = [ + "B7", + "11", + "22", + "x", + "23" +]; + + + var index = 0; var chords = []; var menu = { - "" : { - "title" : "Uke Chords" - }, - "C" : function() { draw(cc); }, - "D" : function() { draw(dd); }, - "E" : function() { draw(ee); }, - "Em" : function() { draw(em); }, - "A" : function() { draw(aa); }, - "Am" : function() { draw(am); }, - "F" : function() { draw(ff); }, - "G" : function() { draw(gg); }, - "About" : function() { - E.showMessage( - "Created By:\nNovaDawn999", { - title:"About" - } - ); - } + "" : { "title" : "Uke Chords" }, + "C" : function() { draw(cc); }, + "D" : function() { draw(dd); }, + "E" : function() { draw(ee); }, + "F" : function() { draw(ff); }, + "G" : function() { draw(gg); }, + "A" : function() { draw(aa); }, + "B" : function() { draw(bb); }, + "C7" : function() { draw(c7); }, + "D7" : function() { draw(d7); }, + "E7" : function() { draw(e7); }, + "F7" : function() { draw(f7); }, + "G7" : function() { draw(g7); }, + "A7" : function() { draw(a7); }, + "B7" : function() { draw(b7); }, + "Cm" : function() { draw(cm); }, + "Dm" : function() { draw(dm); }, + "Em" : function() { draw(em); }, + "Fm" : function() { draw(fm); }, + "Gm" : function() { draw(gm); }, + "Am" : function() { draw(am); }, + "Bm" : function() { draw(bm); }, + "About" : function() { + E.showMessage( + "Created By:\nNovaDawn999", { + title:"About" + } + ); + } }; diff --git a/apps/Uke/metadata.json b/apps/Uke/metadata.json index 8d92718c3..ef31e3663 100644 --- a/apps/Uke/metadata.json +++ b/apps/Uke/metadata.json @@ -1,7 +1,7 @@ { "id": "Uke", "name": "Uke Chords", "shortName":"Uke", - "version":"0.02", + "version":"0.03", "description": "Wrist mounted ukulele chords", "icon": "app.png", "tags": "uke, chords", From 14a4dfcd968aab7bd30b5934a380257cf93329fb Mon Sep 17 00:00:00 2001 From: novadawn999 Date: Sun, 4 Jun 2023 16:45:23 -0500 Subject: [PATCH 15/15] bugfix --- apps/Uke/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/Uke/app.js b/apps/Uke/app.js index 411a39b70..095477f3f 100644 --- a/apps/Uke/app.js +++ b/apps/Uke/app.js @@ -220,7 +220,7 @@ function drawBase() { } function drawChord(chord) { - g.drawString(chord[0], g.getWidth() * 0.5 - 3, 18); + g.drawString(chord[0], g.getWidth() * 0.5 - (chord[0].length * 5), 16); for (let i = 0; i < chord.length; i++) { if (i === 0 || chord[i][0] === "x") { continue;