hugozap / react-rotary-knob

🎛 Skinnable knob for React.
MIT License
156 stars 22 forks source link

Control of knobs much too complex #4

Open TimSusa opened 6 years ago

TimSusa commented 6 years ago

Hey,

at first thanks to your amazing work. It is very cute and nice looking. High quality. Big respect. But there is one thing, that makes the knobs unusable for me:

Why do you have this strange precision Mode and this kind of dynamic circle arround the knobs, when its pressed? This makes it hard to use in live situations or music performances. It is absolutely distracting the user experience in my opinion. I asked friends of mine, coming from a musical background and working with digital software. All say, they don´t like it.

As a very experienced user of Ableton Live, Cubase, Logic Reaper, Traktor DJ and all of its thousand vst/au plugins outta there, I was get to used to a rotary or a knob all the same way, because they all are working the same way, JUST LIKE A SLIDER with start and endpoint in a fixed, specific range.

I kindly want to ask, if you would expose a normal rotary mode, which just handles like a normal slider, as this is everywhere the exact same behaviour, what people are get used to in all DAWs.

Thanks!

hugozap commented 6 years ago

Hey Tim, some of your requests can be handled with the current props. If you want to hide the precision controls use: unlockDistance={0} preciseMode={false}

As of now, the control doesn't stop on the endpoint. However that can be built on top of this component. I think a High Order Component that restricts going from maxValue to minValue and visceversa would be the way to go.

Take a look at this for a reference/starting point of how to do it:

https://codesandbox.io/s/qvyyyvv346

TimSusa commented 6 years ago

Hey,

thanks for your answer! Maybe, this would pose a starting point, it is really not perfect (I miss the slider behaviour), I should have a closer look at it, maybe to improve this, but it lacks in a matter of time at the moment. Sry!

hugozap commented 6 years ago

Hey, I'm not sure I get what you mean by the sliding behavior, can you give me an example, thanks!

El dom., 9 de sep. de 2018, 11:16 a. m., Tim Susa notifications@github.com escribió:

Hey,

thanks for your answer! Maybe, this would pose a starting point, it is really not perfect (I miss the slider behaviour), I should have a closer look at it, maybe to improve this, but it lacks in a matter of time at the moment. Sry!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hugozap/react-rotary-knob/issues/4#issuecomment-419726736, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkB18rMarjDoom-xFQyLzrd1Uj5X-e2ks5uZT7jgaJpZM4WWp-n .

TimSusa commented 6 years ago

Is there a way, just to only track vertical events and ignore horizontal events?

PS: Please be informed, that I really would like to integrate your project into my open-source project: https://midi-sliders.herokuapp.com/ or https://github.com/TimSusa/midi-sliders because it would pose a perfect fit.

hugozap commented 6 years ago

Hey @TimSusa right now there's no prop available for that, however this should be possible by setting x to startPos.x in this line: function dragged() { let currentPos = { x: event.x - cx, y: event.y - cy };

https://github.com/hugozap/react-rotary-knob/blob/7c0f40046b51cf2ac930f1d825bc84ac1a1525d9/src/index.js#L214

If that's something you think would be valuable to have in the component I think adding it as a prop should be possible without much effort ( what would be a good name for it ? )

TimSusa commented 6 years ago

Hey,

thanks for your answer. I would propose some kind of: "ignoreHorz", "isSliderMode" or something?

Maybe some kind of boolean as PropType, which in my opinion should be prefixd with "is" or doing something or not.

PS: Please be informed, that I established free resizing and drag&drop of GUI Elements in my application... so it would be fantastic to use your rotary in there to customize a kind of own layout, which sends MIDI stuff everywhere you wish...this all is supposed to be open source and fully free for the community.

screen shot 2018-09-16 at 13 00 37