Package net.paulhertz.pixelaudio.curves
Class AudioBrush
java.lang.Object
net.paulhertz.pixelaudio.curves.AudioBrush
- Direct Known Subclasses:
GranularBrush,SamplerBrush
Abstract class for combining gesture data from PACurveMaker with audio synthesis parameters
from GestureGranularConfig.Builder.
TODO links to relevant classes
In the PixelAudio library examples, a "brush" uses gesture to control sound, and can draw the gesture to the display as an interactive UI element. In other words, brushes advance the core design theme of PixelAudio: combining image and audio through structural correspondences. See the GesturePlayground applet in the example code for a GUI-driven tour of features.
Two included subclasses, SamplerBrush and GranularBrush, model brushes for the PASamplerInstrument and PAGranularInstrument classes. Subclasses may add fields or behavior, but should preserve:
- a stable PACurveMaker reference
- a mutable or snapshot-based config for rendering both image and audio
TODO links to relevant classes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GestureGranularConfig.Builderprivate final PACurveMakerprivate GestureTransformState -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAudioBrush(PACurveMaker curve, GestureGranularConfig.Builder cfg) -
Method Summary
-
Field Details
-
curve
-
cfg
-
transformState
-
-
Constructor Details
-
AudioBrush
- Parameters:
curve- a PACurveMaker instancecfg- a GestureGranularConfig
-
-
Method Details
-
curve
-
cfg
Returns the configuration builder associated with this brush. Mutating the builder affects subsequent rendering unless a snapshot is taken viacfg().build()orsnapshot(). -
snapshot
Returns an immutable snapshot of the current configuration state. -
transform
-
setTransform
-
hasTransform
public boolean hasTransform() -
ensureTransform
-
captureRestPoints
public void captureRestPoints() -
applyTransform
public void applyTransform() -
restoreTransform
public void restoreTransform()
-