diff --git a/README.md b/README.md index b687a86..5142086 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Simple monitor for displaying MIDI status for digital pianos. -Supports a keyboard span of **9 octaves** (C0-B8, MIDI note number 12-119), as well as +Supports a **full MIDI key range**, as well as granular pedal status display for **soft pedal/una corda** (MIDI CC number 67), **sostenuto** (MIDI CC number 66), and **sustain** (MIDI CC number 64, values from 0-127). @@ -26,12 +26,12 @@ A directory `dist/` should be generated along with build output. Just run: -``` +```shell script yarn start ``` -Electron should spawn the application window. +Create React App should run in watch mode, then Electron should spawn the application window shortly. ## License -[MIT License](./LICENSE) \ No newline at end of file +[MIT License](./LICENSE) diff --git a/docs/screenshot.png b/docs/screenshot.png index 7e7be80..b67ac12 100644 Binary files a/docs/screenshot.png and b/docs/screenshot.png differ diff --git a/package.json b/package.json index af65278..5d09039 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", - "@theoryofnekomata/react-musical-keyboard": "1.0.4", + "@theoryofnekomata/react-musical-keyboard": "1.0.7", "@types/jest": "^24.0.0", "@types/react": "^16.9.0", "@types/react-dom": "^16.9.0", @@ -19,7 +19,8 @@ "react": "^16.13.1", "react-dom": "^16.13.1", "react-scripts": "3.4.1", - "typescript": "~3.7.2" + "typescript": "~3.7.2", + "yargs": "^15.4.1" }, "scripts": { "postinstall": "electron-builder install-app-deps", diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index bcd5dfd..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..19c6505 Binary files /dev/null and b/public/favicon.png differ diff --git a/public/index.html b/public/index.html index 4fb02c4..e4b3648 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,7 @@ - + { try { - const configJsonRaw = fs.readFileSync('./config.json').toString('utf-8') + const configJsonRaw = fs.readFileSync(path.join(app.getPath('userData'), 'config.json')).toString('utf-8') config = JSON.parse(configJsonRaw) } catch (e) { config = { @@ -180,7 +181,10 @@ app }) app.on('quit', () => { - fs.writeFileSync('./config.json', JSON.stringify(config)) + if (app.commandLine.hasSwitch('discardConfig')) { + return + } + fs.writeFileSync(path.join(app.getPath('userData'), 'config.json'), JSON.stringify(config)) }) app.on('window-all-closed', () => { diff --git a/yarn.lock b/yarn.lock index a9d3778..43e4919 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1540,10 +1540,10 @@ resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-7.2.1.tgz#2ad4e844175a3738cb9e7064be5ea070b8863a1c" integrity sha512-oZ0Ib5I4Z2pUEcoo95cT1cr6slco9WY7yiPpG+RGNkj8YcYgJnM7pXmYmorNOReh8MIGcKSqXyeGjxnr8YiZbA== -"@theoryofnekomata/react-musical-keyboard@1.0.4": - version "1.0.4" - resolved "https://js.pack.modal.sh/@theoryofnekomata%2freact-musical-keyboard/-/react-musical-keyboard-1.0.4.tgz#db4abf5d310563130355d96710ecc8a0a5f97e0d" - integrity sha512-9Iq0g1iY4DS9ANeqDI4uBBxWSamMiIlUWuT5MNwWYXX2dZesUkkwwPFER4PRiYnzj2+5beuHi8V7L97kp9dxaA== +"@theoryofnekomata/react-musical-keyboard@1.0.7": + version "1.0.7" + resolved "https://js.pack.modal.sh/@theoryofnekomata%2freact-musical-keyboard/-/react-musical-keyboard-1.0.7.tgz#beeb038e086491da79d944828ac9b7b8cfb3030b" + integrity sha512-H9nARUaOJpoCgRS4MK+bNiM778MyAd+ZczWW5Qaiasam9l0nFn8HVjCW6u+ftYtX3wNQqFPV9VakOwVsjTUlXA== dependencies: mem "^6.1.0" @@ -11950,7 +11950,7 @@ yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^15.3.1: +yargs@^15.3.1, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==