Cardinal icon indicating copy to clipboard operation
Cardinal copied to clipboard

Touchscreen support

Open matchaxnb opened this issue 1 year ago • 6 comments

Hey there!

I'd love to have support for touchscreen in Cardinal. I would be very happy if 2 finger gestures would allow to scroll into the rack to quickly navigate from one part of the patch to another. I'd be available to test that feature on Windows on a Surface Pro.

Support for stylus pen would be a nice addition but that's less important to me at least.

I tried to figure how to do that myself but found Cardinal barely usable with these tools.

Thanks :)

matchaxnb avatar Apr 11 '23 10:04 matchaxnb

Realistically dont think this will ever happen. The more deep framework in use by Cardinal for OS events does not support touch, and neither does VCV Rack.

I faked the events in the online version (running at https://cardinal.kx.studio/), perhaps that event mapping is good enough? I could try to port it over to desktop if it proves to work well, but more than that is very unlikely to happen.

falkTX avatar Apr 11 '23 11:04 falkTX

To be more specific, I believe the OP must have meant “multi-touch” support. Single-touch support works fine with pretty much everything. 🙂

That said, multi-touch support is unlikely. The OP could try a utility like touchegg and see if that helps, but I doubt it if the underlying multi-touch framework isn’t there. It would still only respond to a single touch at a time. 🙂

Audiojunkie avatar Apr 12 '23 15:04 Audiojunkie

FYI I dont have a multi-touch device myself, nor feel the need for one. As Cardinal development is mostly done by me, this reduces the chance of anything multi-touch ever happening to almost zero.

falkTX avatar Apr 12 '23 15:04 falkTX

Context is Windows.

Due to submodules being taken whole it's a bit of mess so it's faster to just ask, of these (all of whom fuddle with WM_MOUSEWHEEL in some fashion) who is the input lord that translates into mouse-wheel and shift + mousewheel that actually manifests?

  .\carla\source\modules\dgl\src\pugl-upstream\src\win.c
  .\carla\source\modules\juce_gui_basics\native\juce_win32_Windowing.cpp
  .\carla\source\modules\ysfx\thirdparty\WDL\source\WDL\eel2\eel_lice.h
  .\carla\source\modules\ysfx\thirdparty\WDL\source\WDL\swell\swell-generic-gdk.cpp
  .\carla\source\modules\ysfx\thirdparty\WDL\source\WDL\swell\swell-menu-generic.cpp
  .\carla\source\modules\ysfx\thirdparty\WDL\source\WDL\swell\swell-types.h
  .\carla\source\modules\ysfx\thirdparty\WDL\source\WDL\swell\swell-wnd-generic.cpp
  .\dpf\dgl\src\pugl-upstream\src\win.c
  .\plugins\surgext\surge\libs\JUCE\examples\Plugins\ReaperEmbeddedViewPluginDemo.h
  .\plugins\surgext\surge\libs\JUCE\examples\Plugins\extern\reaper_plugin_fx_embed.h
  .\plugins\surgext\surge\libs\JUCE\modules\juce_audio_plugin_client\utility\juce_WindowsHooks.h
  .\plugins\surgext\surge\libs\JUCE\modules\juce_gui_basics\native\juce_win32_Windowing.cpp
  .\src\Rack\dep\glfw\src\win32_window.c

I assume it's one of the juce files as the Zoom gesture is functioning correctly, it's the other gestures that are unimplemented. Two-finger drag is correctly being recognized (in that nothing funky happens) but it's just doing nothing because there's no implementation mapping that to scrolling left-right or up-down.

JSandusky avatar Jun 15 '23 02:06 JSandusky

You can fully ignore the carla and plugins dirs for this. It's either dgl or glfw, but @falkTX would better know which one is relevant here.

dromer avatar Jun 15 '23 04:06 dromer

the code to look into is .\dpf\dgl\src\pugl-upstream\src\win.c, ignore all the rest

falkTX avatar Jun 15 '23 05:06 falkTX