A fairly simple feature - preferences for velocity sensitivity, but a
fair amount of UI infrastructure. This patch includes a new
KnobPreference, changes to KnobView to support a horizontal layout
(which works better in a layout with more compressed vertical space),
and of course the plumbing of the preference itself.
Also some rework of the touch handler in the KeyboardView. This patch
simplifies the logic a bit and fixes a long-standing bug in which the
pressure was always read from pointer index 0 rather than the pointer
index of the key being pressed.
The main reason for these to be inside the KnobView is so that they can
be part of the touch target for the knob. A more general approach would
be to make the Knob a container that can contain TextView widgets, but
this is simpler.
This adjusts the dimensions of the knobs and scroll strip to be a little
better on both phones and tablets. The knobs look a little small, but
they'll be redesigned soon to work better in smaller sizes.
The first setting is just the keyboard layout, but we'll add lots more
in time (velocity sensitivity). Plus, some synth state (program change
in particular) should persist, and this is a good mechanism.
There are some infelicities: the settings screen doesn't bind the synth
service, so sound pauses. Also, fullscreen is inconsistent and should be
rethought (maybe immersive on KitKat).
This patch contains a new keyboard view with an adjustable layout.
As of this version, it draws and displays notes from the MIDI keyboard
but doesn't handle any of its own touch events.
This patch implements nonlinear distortion in the resonant ladder
filter. It's based on the differential equations in the Huovilainen '04
DAFx paper, but using matrix exponential to compute the evolution of the
state variables. The implementation is scalar (and calls into sqrtf),
but designed to be implemented in very efficient SIMD.
Add a button to capture raw start and end callback time (just putting it
in a text buffer so it can be copied), which is useful for making plots.
Also a bunch of commented out code to provoke priority inversion or
sudden increases in load (which exercises the governor), again for the
purpose of probing performance and making plots.
This change adds a (single) resonant filter to the C++ synth unit, and
wires up both USB MIDI and on-screen controls for cutoff and resonance.
Also fixes a bug in KnobView which caused the knob value to jump around.