Package eu.bandm.music.applications.harm
Class FnGui.NumberPanel
java.lang.Object
eu.bandm.music.applications.harm.FnGui.NumberPanel
- Enclosing class:
FnGui
One frequency row: displays a value and assigns phases.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final JTextFieldRead-only display in cents.Current frequency factor; null if in error state.(package private) final JTextFieldInput/output: decimal value.(package private) final booleanWhether the frequency fields accept user input.(package private) final JTextFieldPrimary input: exponent/constructor notation.(package private) final JTextFieldInput/output: fully reduced rational form.(package private) final JTextFieldRead-only display of the semi-factored rational.(package private) final BitSetPhase bits derived from the checkbox array.(package private) booleanTrue while this row's audio output is active.(package private) final CheckBoxArrayCheckboxes assigning this row to sequencer phases.(package private) final JLabelStatic label preceding the phase array.(package private) final FnSound.SoundLineAudio voice for this row; null for non-editable rows. -
Constructor Summary
ConstructorsConstructorDescriptionNumberPanel(boolean editable) Constructs a new row; adds it toFnGui.numberPanels. -
Method Summary
Modifier and TypeMethodDescription(package private) voidPropagates a wavetable change to this row's oscillator.(package private) BitSetReads the phase assignment from the checkbox array.(package private) voidsetError(JTextField f, boolean isInError) Sets the error/normal background on a text field.(package private) voidSilences audio and restores the normal background.(package private) voidActivates audio and highlights the phase array.(package private) voidActivates or silences this row when the sequencer advances.(package private) voidTurns this row on or off per the current phase selection.(package private) voidRefreshes all output fields from the current value.
-
Field Details
-
currentValue
Current frequency factor; null if in error state. -
editable
final boolean editableWhether the frequency fields accept user input. -
expIO
Primary input: exponent/constructor notation. -
fractSepOutput
Read-only display of the semi-factored rational. -
fractAllOutput
Input/output: fully reduced rational form. -
decIO
Input/output: decimal value. -
centIO
Read-only display in cents. -
playLabel
Static label preceding the phase array. -
playing
Checkboxes assigning this row to sequencer phases. -
myPhases
Phase bits derived from the checkbox array. -
soundLine
Audio voice for this row; null for non-editable rows. -
oldrun
boolean oldrunTrue while this row's audio output is active.
-
-
Constructor Details
-
NumberPanel
NumberPanel(boolean editable) Constructs a new row; adds it toFnGui.numberPanels.- Parameters:
editable- whether the frequency fields are editable
-
-
Method Details
-
setError
Sets the error/normal background on a text field.- Parameters:
f- the field to colourisInError- true for error state, false to clear it
-
updateRepresentations
void updateRepresentations()Refreshes all output fields from the current value. -
parseSequencerSelection
BitSet parseSequencerSelection()Reads the phase assignment from the checkbox array.- Returns:
myPhasesupdated from the checkboxes
-
changeTable
Propagates a wavetable change to this row's oscillator.- Parameters:
table- the new wavetable
-
staticPhaseSelectionChanges
void staticPhaseSelectionChanges()Turns this row on or off per the current phase selection. -
startPhase
void startPhase()Activates or silences this row when the sequencer advances. -
setSoundOn
void setSoundOn()Activates audio and highlights the phase array. -
setSoundOff
void setSoundOff()Silences audio and restores the normal background.
-