|
|||||||||
| Home >> All >> jm >> gui >> [ helper overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jm.gui.helper
Class HelperGUI

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
jm.gui.helper.HelperGUI
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, jm.constants.Alignments, jm.constants.DrumMap, jm.constants.Durations, jm.constants.Dynamics, java.util.EventListener, jm.constants.Frequencies, java.awt.image.ImageObserver, jm.JMC, java.awt.MenuContainer, jm.constants.Noises, jm.constants.Panning, jm.constants.Pitches, jm.constants.ProgramChanges, jm.constants.RhythmValues, jm.constants.Scales, java.io.Serializable, jm.constants.Tunings, jm.constants.Volumes, jm.constants.Waveforms
- public class HelperGUI
- extends java.awt.Frame
- implements jm.JMC, java.awt.event.ActionListener, java.awt.event.AdjustmentListener
- extends java.awt.Frame
This jMusic utility is designed to be extended by user classes. It will provide a simple graphical interface that speeds up the cycle of composing-auditioning-recomposing by minimising the need for recompiling simple changes. It is especially useful for novice Java programmers. To use the HelperGUI class write a standard jMusic class that extends this class. It shopuld have a main() method and a constructor. Make a super() call in the constructor. Overwrite the compose() method [which returns a Score object] and include the compositional logic in that method. To render a score as an audio file, an Instrument array needs to be declared and assigned to the Instrument array varianble 'insts' - which is already declared in the HelperGUI class. As in this example code fragment: Instrument sine = new SineInst(44100); Instrument[] instArray = {sine}; insts = instArray; There are five variables each with a slider that can be accessed to change values in the composition. Each variable, named 'variableA' to 'variableE', returns an integer values between 0 and 127.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface jm.JMC |
AMPLITUDE, DEBUG, DYNAMIC, EIGHT_BIT, FREQUENCY, KEY_SIG_EVT, MONO, NO_DENOMINATOR, NO_INSTRUMENT, NO_KEY_QUALITY, NO_KEY_SIGNATURE, NO_NUMERATOR, OCTAPHONIC, PAN, PITCH, PROG_EVT, QUADRAPHONIC, RHYTHM, SIXTEEN_BIT, STEREO, TEMP_EVT, THIRTY_TWO_BIT, TIME_SIG_EVT, VERBOSE |
| Fields inherited from interface jm.constants.Durations |
C, CD, CDD, CROTCHET, CROTCHET_TRIPLET, CT, DC, DDC, DDEN, DDHN, DDM, DDQ, DDQN, DEMI_SEMI_QUAVER, DEMI_SEMI_QUAVER_TRIPLET, DEN, DHN, DM, DOTTED_CROTCHET, DOTTED_EIGHTH_NOTE, DOTTED_HALF_NOTE, DOTTED_MINIM, DOTTED_QUARTER_NOTE, DOTTED_QUAVER, DOTTED_SEMI_QUAVER, DOTTED_SIXTEENTH_NOTE, DOUBLE_DOTTED_CROTCHET, DOUBLE_DOTTED_EIGHTH_NOTE, DOUBLE_DOTTED_HALF_NOTE, DOUBLE_DOTTED_MINIM, DOUBLE_DOTTED_QUARTER_NOTE, DOUBLE_DOTTED_QUAVER, DQ, DQN, DSN, DSQ, DSQT, EIGHTH_NOTE, EIGHTH_NOTE_TRIPLET, EN, ENT, HALF_NOTE, HALF_NOTE_TRIPLET, HN, HNT, M, MD, MDD, MINIM, MINIM_TRIPLET, MT, Q, QD, QDD, QN, QNT, QT, QUARTER_NOTE, QUARTER_NOTE_TRIPLET, QUAVER, QUAVER_TRIPLET, SB, SEMI_QUAVER, SEMI_QUAVER_TRIPLET, SEMIBREVE, SIXTEENTH_NOTE, SIXTEENTH_NOTE_TRIPLET, SN, SNT, SQ, SQD, SQT, THIRTYSECOND_NOTE, THIRTYSECOND_NOTE_TRIPLET, TN, TNT, TSN, TSNT, WHOLE_NOTE, WN |
| Fields inherited from interface jm.constants.Frequencies |
FRQ |
| Fields inherited from interface jm.constants.Tunings |
EQUAL, JUST, MEAN, PYTHAGOREAN |
| Fields inherited from interface jm.constants.Volumes |
F, FF, FFF, FORTE, FORTISSIMO, MEZZO_FORTE, MEZZO_PIANO, MF, MP, P, PIANISSIMO, PP, PPP, SILENT |
| Fields inherited from interface jm.constants.Panning |
PAN_CENTER, PAN_CENTRE, PAN_LEFT, PAN_RIGHT |
| Fields inherited from interface jm.constants.DrumMap |
ACOUSTIC_BASS_DRUM, ACOUSTIC_SNARE, BASS_DRUM_1, CABASA, CHINESE_CYMBAL, CLAVES, CLOSED_HI_HAT, COWBELL, CRASH_CYMBAL_1, CRASH_CYMBAL_2, ELECTRIC_SNARE, HAND_CLAP, HI_BONGO, HI_MID_TOM, HI_WOOD_BLOCK, HIGH_AGOGO, HIGH_FLOOR_TOM, HIGH_TIMBALE, HIGH_TOM, LONG_GUIRO, LONG_WHISTLE, LOW_AGOGO, LOW_BONGO, LOW_CONGA, LOW_FLOOR_TOM, LOW_MID_TOM, LOW_TIMBALE, LOW_TOM, LOW_WOOD_BLOCK, MARACAS, MUTE_CUICA, MUTE_HI_CONGA, MUTE_TRIANGLE, OPEN_CUICA, OPEN_HI_CONGA, OPEN_HI_HAT, OPEN_TRIANGLE, PEDAL_HI_HAT, RIDE_BELL, RIDE_CYMBAL_1, RIDE_CYMBAL_2, SHORT_GUIRO, SHORT_WHISTLE, SIDE_STICK, SPLASH_CYMBAL, TAMBOURINE, VIBRASLAP |
| Fields inherited from interface jm.constants.Scales |
AEOLIAN_SCALE, BLUES_SCALE, CHROMATIC_SCALE, DIATONIC_MINOR_SCALE, DORIAN_SCALE, HARMONIC_MINOR_SCALE, INDIAN_SCALE, LYDIAN_SCALE, MAJOR_SCALE, MELODIC_MINOR_SCALE, MINOR_SCALE, MIXOLYDIAN_SCALE, NATURAL_MINOR_SCALE, PENTATONIC_SCALE, TURKISH_SCALE |
| Fields inherited from interface jm.constants.Waveforms |
COSINE_WAVE, PULSE_WAVE, SABERSAW_WAVE, SAWDOWN_WAVE, SAWTOOTH_WAVE, SINE_WAVE, SQUARE_WAVE, TRIANGLE_WAVE |
| Fields inherited from interface jm.constants.Noises |
BROWN_NOISE, FRACTAL_NOISE, SMOOTH_NOISE, STEP_NOISE, WHITE_NOISE |
| Fields inherited from interface jm.constants.Alignments |
AFTER, BEFORE, CENTER_ALIGN, CENTER_ON_END, CENTER_ON_START, CENTRE_ALIGN, CENTRE_ON_END, CENTRE_ON_START, END_ON_CENTER, END_ON_CENTRE, END_TOGETHER, START_ON_CENTER, START_ON_CENTRE, START_TOGETHER |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
HelperGUI()
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handle the button clicks in the GUI |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent ae)
This method is called when an adjustable value changes. |
protected jm.music.data.Score |
compose()
This method should be overridden by classes that extend the HelperGUI class. |
private void |
composeScore()
|
private void |
histogramScore()
Display a score in the histogram viewer |
private void |
makeBtnsVisible()
|
private void |
notateScore()
Display a score with the notation viewer |
private void |
playAudio()
Playback the audio file using jMusic real time audio |
private void |
playScore()
Start MIDI playback |
private void |
printScore()
print score data to the CLI |
private void |
renderScore()
Save the score as an audio file |
private void |
saveScore()
Save score as a standard MIDI file |
void |
setVariableA(int value)
Specify the value for vaiable A |
void |
setVariableA(int value,
java.lang.String comment)
Specify the value and comment for vaiable A |
void |
setVariableB(int value)
Specify the value for vaiable B |
void |
setVariableB(int value,
java.lang.String comment)
Specify the value and comment for vaiable B |
void |
setVariableC(int value)
Specify the value for vaiable C |
void |
setVariableC(int value,
java.lang.String comment)
Specify the value and string for vaiable C |
void |
setVariableD(int value)
Specify the value for vaiable D |
void |
setVariableD(int value,
java.lang.String comment)
Specify the value and string for vaiable D |
void |
setVariableE(int value)
Specify the value for vaiable E |
void |
setVariableE(int value,
java.lang.String comment)
Specify the value and string for vaiable E |
private void |
showScore()
Display a score with the show score viewer |
private void |
sketchScore()
Display a score with the sketch score viewer |
private void |
stopAudio()
Stop playback of the audio file |
private void |
stopScore()
halt MIDI playback |
private void |
viewAudio()
Show the saved audio file in the wave viewer |
private void |
xmlOpen()
|
private void |
xmlSave()
|
| Methods inherited from class java.awt.Frame |
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
clone, |
JAVADOC