Skip to content

Commit 0118578

Browse files
committed
add interactive inputs for MIDI
1 parent c0a72c8 commit 0118578

File tree

5 files changed

+24
-10
lines changed

5 files changed

+24
-10
lines changed

dist/index.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "binary-synth",
3-
"version": "1.9.0",
3+
"version": "1.10.0",
44
"private": true,
55
"scripts": {
66
"dev": "vite --host",

src/BinarySynth.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const file = useFileStore()
1414
<FileInput />
1515
<ControlPanel />
1616
<div class="about">
17-
<a href="https://github.com/MaxAlyokhin/binary-synth" target="_blank" rel="noopener noreferrer">About and sources (v1.9.0)</a>
17+
<a href="https://github.com/MaxAlyokhin/binary-synth" target="_blank" rel="noopener noreferrer">About and sources (v1.10.0)</a>
1818
<a href="https://dfap.stranno.su" target="_blank" rel="noopener noreferrer">by DFAP</a>
1919
</div>
2020
</div>

src/components/ControlPanel/Frequency.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,26 @@ watch(midi, () => {
121121
<div class="module__container">
122122
<span>From</span>
123123
<div class="notes-range__inputs">
124-
<input type="number" step="1" name="notes-range-from" class="notes-range-from" v-model="notesFrom" />
124+
<InteractiveInput
125+
:validValue="settings.notesRange.from"
126+
@valueFromInput="notesFrom = $event"
127+
step="1"
128+
keyCode="KeyA"
129+
letter="A"
130+
/>
125131
<span class="notes-range__from-span">{{ noteNameFrom }}</span>
126132
</div>
127133
</div>
128134
<div class="module__container">
129135
<span class="notes-range-to-span key">To</span>
130136
<div class="notes-range__inputs">
131-
<input type="number" step="1" name="notes-range-to" class="notes-range-to" v-model="notesTo" />
137+
<InteractiveInput
138+
:validValue="settings.notesRange.to"
139+
@valueFromInput="notesTo = $event"
140+
step="1"
141+
keyCode="KeyS"
142+
letter="S"
143+
/>
132144
<span class="notes-range__to-span">{{ noteNameTo }}</span>
133145
</div>
134146
</div>
@@ -145,7 +157,9 @@ watch(midi, () => {
145157
span {
146158
position: absolute;
147159
top: 4px;
148-
left: 6px;
160+
left: 95px;
161+
line-height: 13px;
162+
z-index: 10;
149163
}
150164
151165
input {

src/stores/globalStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const useSettingsStore = defineStore('settings', () => {
2424
to: 256,
2525
})
2626
const notesRange = ref({
27-
from: 48,
28-
to: 60,
27+
from: 36,
28+
to: 48,
2929
})
3030
const fragment = ref({
3131
from: 0,

0 commit comments

Comments
 (0)