diff options
Diffstat (limited to 'client')
| -rw-r--r-- | client/index.js | 11 | ||||
| -rw-r--r-- | client/lib/ui.js | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/client/index.js b/client/index.js index acb4803..23ce899 100644 --- a/client/index.js +++ b/client/index.js @@ -50,7 +50,6 @@ data.load().then(lists => { lines: [row.map(n => parseInt(n))], } }) - pick_dataset('Surrenders') requestAudioContext(ready) }) @@ -95,9 +94,11 @@ function ready() { build_options(document.querySelector('#behavior'), behaviors, pick_behavior) console.log(Nexus) + const dial_size = [50, 50] Tone.Transport.bpm.value = DEFAULT_BPM nx.tempo = new Nexus.Dial('#tempo', { + size: dial_size, min: 10, max: 300, step: 1, @@ -113,6 +114,7 @@ function ready() { update_radio_value_on_change(nx.timing, '#timing', note_values) nx.duration = new Nexus.Dial('#duration', { + size: dial_size, min: 0, max: 2, step: 0.01, @@ -121,6 +123,7 @@ function ready() { update_value_on_change(nx.duration, '#duration', false) nx.offset = new Nexus.Dial('#offset', { + size: dial_size, min: -24, max: 24, step: 1, @@ -129,6 +132,7 @@ function ready() { update_value_on_change(nx.offset, '#offset', true) nx.octave = new Nexus.Dial('#octave', { + size: dial_size, min: -4, max: 4, step: 1, @@ -137,6 +141,7 @@ function ready() { update_value_on_change(nx.octave, '#octave', true) nx.multiply = new Nexus.Dial('#multiply', { + size: dial_size, min: -64, max: 64, step: 1, @@ -145,6 +150,7 @@ function ready() { update_value_on_change(nx.multiply, '#multiply', true) nx.interval = new Nexus.Dial('#interval', { + size: dial_size, min: -64, max: 64, step: 1, @@ -176,6 +182,9 @@ function ready() { }) document.querySelector('.loading').classList.remove('loading') + + document.querySelector('#dataset').value = 'Surrenders' + pick_dataset('Surrenders') play_next() } diff --git a/client/lib/ui.js b/client/lib/ui.js index b0909cd..413ff1c 100644 --- a/client/lib/ui.js +++ b/client/lib/ui.js @@ -1,3 +1,5 @@ +import Nexus from 'nexusui' + export const nx = window.nx = {} /* ui - update an int/float value */ |
