Coder Social home page Coder Social logo

pinchbar's Introduction

PinchBar

What is it?

PinchBar is a free macOS tool that adds continuous pinch-to-zoom to various apps and is custom-made for Cubase with features often requested on the official forum.

How do I get it running?

On first launch, macOS will ask you for permission. If unsure, just follow these steps:

  • Download PinchBar.zip from the latest release.
  • When not using Safari, open the zip file to extract its content and delete it. Safari does this automatically.
  • Launch PinchBar.app. A popup appears to tell you that you just downloaded it. Click on "Open".1
  • A second popup asks you to allow PinchBar to use macOS accessibility features.
  • Click on "Open System Preferences".2 On older machines, this might take a moment...
  • Enable the switch next to PinchBar.app, confirm with your username and password and close the window.3
  • Finally, drag PinchBar.app onto your Applications folder.

Now when you open Cubase, PinchBar's status icon will become opaque. Make a pinch gesture on your trackpad, it should zoom in/out horizontally. With version 0.2 there are now two possible modifiers: Pinch while holding down CMD zooms vertically, while holding down ALT it zooms just the waveforms without the tracks. For this to work properly, default keyboard settings have to be set in Cubase for vertical and waveform zoom (i.e. SHIFT/ALT+G/H).

When you switch to another app, PinchBar's status icon turns gray, telling you it's inactive for that app.

If you want to use PinchBar with an app other than Cubase, e.g. Nuendo, just open it, click on PinchBar's status icon, "Change preset for Nuendo" and select a suitable preset (it'll remember the last selected preset for each app). In principle, PinchBar works for any app, but the presets might not be suitable: The targetted app has to respond to certain user input events. See "How does it work?" for more information.

With version 0.2 there is now a new preset called "Font Size". This preset maps pinch gestures to CMD+ and CMD- which is a common key binding to change the font size in various macOS applications. I use this preset for text editors like Xcode and Terminal. It also feels very intuitive in Mail, e.g. when readings through a bunch of mails and every sender chose a different font. And if you find yourself often zooming into webpages, you can enable this preset for Safari, Firefox, etc. That has the advantage, that the layout will stay fit to window while just text and graphics grow and shrink. This preset also comes with a modifier: When holding down CMD, the normal pinch zoom is performed, so you don't have to change presets if you use both modes frequently.

If you prefer your status bar clean: While holding down CMD, you can drag the icon around or away from the status bar to make it disappear. PinchBar then remains open in the background. To make the icon reappear, just re-open PinchBar.app from your Applications folder (e.g. via Spotlight). This won't launch a second instance, it's rather Apples convention for making an app visible to the user (again).

So what do I get?

  • A lightweight tool that requires no configuration and just does its job well.
  • Very smooth continuous trackpad zoom, seamlessly integrated into Cubase and similar apps.
  • Intuitive one-handed project navigation, no mouse or controller required - just your headphones.
  • Compatible with all versions of Cubase, macOS High Sierra and later, Intel and Apple chips.
  • It's actively developed and now even extended for different kinds of use cases.
  • It's open source. You can use it for free and contribute your ideas. Also you can review its exact functionality: PinchBar only intercepts trackpad events, but no keyboard events, i.e. no private user data, passwords, etc.

Doesn't Cubase have enough zoom features?

Cubase has build-in support for continuous zoom on macOS by scrolling while holding down CMD. Sadly it doesn't provide customization of this feature to make it work like the conventional pinch gesture of your MacBook's trackpad. It only provides customizable hotkeys for incremental zoom in and out (G and H), which can be remapped to trackpad gestures with other macOS tools as described here, but there are some caveats:

  • The gesture is recognized only in its initial phase and not tracked thereafter, so, regardless of its length and duration, only a fixed zoom step is performed.
  • The triggered Cubase hotkeys (G and H) reset the view to the project cursor, oftentimes disrupting your workflow when editing.
  • The suggested tool isn't free anymore: There is now a trial version (45 days) and various licence plans available.

Other options Cubase provides are its zoom tool, zoom sliders and clicking and dragging the lower half of the ruler. While working well with a mouse, that's all pretty tedious on the trackpad.

That leaves Cubase users on Macbooks with a rather strange and definitely suboptimal user experience. So, since I myself use Cubase quite often (to record and mix our rehearsals and album tracks; check out Camel Driver :D) and also happen to know a little about programming my MacBook, I decided to invest a few cups of coffee in this issue and found a really good approach. Et voilà! It works flawlessly and I'm happy to share this solution with anyone using Cubase on a MacBook!

How does it work?

In principle the same way as other accessibility apps: PinchBar gets notified when the user activates or deactivates a specific app (e.g. Cubase). It then starts or pauses a so-called event tap, a special background thread to intercept and modify user input before it is being processed by the targetted app. But unlike other accessibility apps, Pinchbar can map gesture events to other event types in every phase, not just the initial one.

E.g. for Cubase it replaces all pinch events with scroll events and adds a modifier flag for the CMD key. Thereby Cubase doesn't have to react to pinch gestures; it just reacts to scroll gestures with CMD held down, gracefully showing the desired behaviour ;)

Other apps recognize neither pinch nor scroll events with CMD held down, but can be zoomed incrementally with CMD+ and CMD-. This is what the preset "Font Size" is doing: It accumulates the magnification over your continuous pinch gesture and sends keyboard events according to exceeded intervals. PinchBar also does this too for vertical and waveform zoom in Cubase, just with different keyscodes.

Is PinchBar still being actively developed?

At the moment, promotion is the top priority to make it known among Cubase users. When people actually use PinchBar, I'll continue with this roadmap:

  • Proof of concept
  • Update check
  • First release
  • This readme file
  • Adjustable sensivity
  • Vertical zoom with modifier
  • new preset for editors to pinch to change font size
  • new "inverse" preset: map CMD+scroll to pinch gesture
  • global and multiple simultanious presets
  • Settings window
  • Any ideas? Please open an issue

But what about Windows?

Cubase natively supports pinch-to-zoom on Windows, although not as smoothly as on macOS with PinchBar. For this feature to work, you must be lucky in that the manufacturer provides Windows Precision Touchpad drivers for your notebook. Apple does this for MacBooks with T2 chip. So if your Macbook is from 2017 or earlier, its Bootcamp drivers don't support trackpad gestures. If you're using Bootcamp on such a MacBook, check out this awesome project. It's an open source implementation of Windows Precision Touchpad drivers, similar to Apple's but for older MacBooks. I use this on my MacBook Pro 2015 and it really works like a charm. Not only does it enable pinch-to-zoom in Cubase, it's also fully customizable via Windows settings, allowing you to tap with three fingers for a middle click and to swipe them left or right to go back or forth in your web browser. It even supports four-finger gestures to change between apps or multiple desktops. Really nice!

Credits

Footnotes

  1. If there is no such option, your macOS settings only allow launching apps installed via the App Store. To grant an exception, click on "Show in Finder", right-click PinchBar.app and choose "Open" from the context menu. The same popup appears again, but this time with the option to "Open". Duh...

  2. If you dismissed the popup or accidentally denied, you can click on PinchBar's status icon and "Enable PinchBar in Accessibility" there.

  3. Prior to macOS Ventura, you must first click the lock button on the bottom left and confirm with your username and password.

pinchbar's People

Contributors

pnoqable avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pinchbar's Issues

Issue with Pinchbar Gesture Not Working in Cubase 13 on MacOS M1 Max

Hi there,

I recently downloaded Pinchbar to enable horizontal zooming with my trackpad, similar to the functionality in Logic Pro and Ableton Live. However, I'm encountering an issue where the Pinchbar gesture doesn't work in Cubase, despite it showing as active on the touchbar.

Here are the details of my setup:

Operating System: MacOS M1 Max (Version: Sonoma 14.0)

After launching both Pinchbar and Cubase, the Pinchbar gesture doesn't have any effect in Cubase, even though it appears to be functioning properly on the touchbar. But the vertical zoom works with CMD + pinch.

I would greatly appreciate any assistance or guidance on how to resolve this issue. If there are any specific settings or configurations I need to adjust, please let me know. Thank you in advance for your help!

Best regards,

Binary Release of PinchBar 0.3

It's getting time for the release of PinchBar 0.3.

As I mentioned in #2 and in Cubase's User Forum, properly signed binary releases require an active membership in Apple's developer programm. Having personally invested for signing PinchBar's first releases, I now need to allocate this cost to PinchBar's users.

By contributing to this request, you effectively accelerate the release of PinchBar 0.3, which will fix compatibility with Cubase 13.

Of Course, contributors will be included in special thanks on PinchBar's front page.

CMD + Scroll Up/Down to Pinch In/Out [FR]

Currently PinchBar changes pinch action to scroll action. But how about the other way around?

There are other apps like Mac Mouse Fix to change normal mouse scroll events into pinch events. But it cannot do the smooth scrolling events of magic mouse. This app could do that.
(Seamouse doesn't count because it's buggy and doesn't work anymore.)

Pinch in & out is the only function magic trackpad has that magic mouse doesn't. Enabling this function, you could kill some people's wish to buy magic trackpads. It would be so cool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.