Class FnGui.NumberPanel

java.lang.Object
eu.bandm.music.applications.harm.FnGui.NumberPanel
Enclosing class:
FnGui

class FnGui.NumberPanel extends Object
One frequency row: displays a value and assigns phases.
  • Field Details

    • currentValue

      @Opt Ff currentValue
      Current frequency factor; null if in error state.
    • editable

      final boolean editable
      Whether the frequency fields accept user input.
    • expIO

      final JTextField expIO
      Primary input: exponent/constructor notation.
    • fractSepOutput

      final JTextField fractSepOutput
      Read-only display of the semi-factored rational.
    • fractAllOutput

      final JTextField fractAllOutput
      Input/output: fully reduced rational form.
    • decIO

      final JTextField decIO
      Input/output: decimal value.
    • centIO

      final JTextField centIO
      Read-only display in cents.
    • playLabel

      final JLabel playLabel
      Static label preceding the phase array.
    • playing

      final CheckBoxArray playing
      Checkboxes assigning this row to sequencer phases.
    • myPhases

      final BitSet myPhases
      Phase bits derived from the checkbox array.
    • soundLine

      final FnSound.SoundLine soundLine
      Audio voice for this row; null for non-editable rows.
    • oldrun

      boolean oldrun
      True while this row's audio output is active.
  • Constructor Details

    • NumberPanel

      NumberPanel(boolean editable)
      Constructs a new row; adds it to FnGui.numberPanels.
      Parameters:
      editable - whether the frequency fields are editable
  • Method Details

    • setError

      void setError(JTextField f, boolean isInError)
      Sets the error/normal background on a text field.
      Parameters:
      f - the field to colour
      isInError - 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:
      myPhases updated from the checkboxes
    • changeTable

      void changeTable(DoubleHarmonicSpectrum.DiffTable table)
      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.