jpsim / ZenTuner

A minimal chromatic tuner for iOS & macOS.

Home Page:https://apps.apple.com/us/app/zen-tuner/id1550640624

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smooth indicator movement

daneal opened this issue · comments

Is there a way to apply a "smoothing" factor to cause the note indicator to not jump around so much and just ease slowly into a new position?

Well the note indicator does smoothly animate when moving, but I think you're asking how to make that animation even slower?

You can adjust the animation speed by specifying a duration here:

.animation(.easeInOut, value: distance.cents)

For example:

.animation(.easeInOut(duration: 1), value: distance.cents)

If you're asking for me to expose a way to expose the animation speed in the UI to enable users to control it, I'll have to give this more serious thought. A main goal of this app is to be minimalist (ahem "zen") so naturally this means not having too many fiddly knobs and controls.

I am more asking if there is a way to smooth the frequency that comes from the microphone. For example, a very simple data smoothing algorithm would take each new measurement that comes from the microphone and weight it at 10% while weighting the previous frequency at 90%
`smoothedFrequency = (newFrequency * 0.1) + (oldFrequency * 0.9)'

Sure, you could do that here

But I'd still recommend adjusting the animation speed.

Thank you, I will experiment with both approaches. And thank you for creating ZenTuner. It has been a huge help!