2xAA / genmdm-editor

A web-based interface for genMDM and Mega Drive MIDI Interface, MIDI controllers for the Sega Mega Drive/Genesis.
https://2xaa.github.io/genmdm-editor/
MIT License
39 stars 6 forks source link

add knob throttle feature #178

Open hex-spell opened 1 year ago

hex-spell commented 1 year ago

Add knob throttle feature

This fixes #176, the change is more noticeable in poly mode. 2023-09-25_22-21

2xAA commented 11 months ago

Hey @hex-spell, thanks for the contribution! Though there's a few things I would like changed before merging this.

The major thing being that once the throttle is enabled, the UI update feels slow. I would apply the throttle directly to the MIDI message output somehow instead of just the mouse move.

The throttle also doesn't apply to the DraggableSelect and MDMWaveform components, which can have the same issue as the MDMDial component as they have mouse inputs.

The import of lodash should be a named import (import { throttle } from "lodash";) to allow webpack to tree-shake the unused lodash modules from the resulting JavaScript bundle.

And lastly, the naming of "Knob Throttle". I'd prefer something like "Mouse Throttle" as it's only to do with the mouse input and should be applied to the MDMDial, DraggableSelect and MDMWaveform components.

2xAA commented 11 months ago

And also, once complete and explanation of the Mouse Throttle feature in the README would be appreciated.