AudioKit / AudioKitSynthOne

AudioKit Synth One: Open-Source iOS Synthesizer App
http://audiokitpro.com/synth
MIT License
1.69k stars 219 forks source link

Touches ended #147

Closed marcus-w-hobbs closed 4 years ago

marcus-w-hobbs commented 4 years ago

removed unnecessary code from touchesEnded throughout entire app. whitespace. higher order swift.

sieren commented 4 years ago

Small observation:

for _ in touches {
  value = 1 - value 
  setValueCallback(value)
}

is there any reason we're having the Knobs react to multiple touches? In this case I'd say let's get rid of the for loop and do a guard let touch = touches.first else { return } followed by the value callback/value calc. Refering to the touchesBegan code which we could also refactor this way while we're at it.