at.ofai.music.beatroot
public class GUI extends JFrame
Field Summary | |
---|---|
static String | AUDIO_SCALE_FACTOR |
protected AudioPlayer | audioPlayer The object which handles sound output |
protected AudioProcessor | audioProcessor The object which reads and processes audio |
protected EventList | beats The current list of beat times |
static int | BAR Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static int | BEAT Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static String | BEAT_TRACK |
protected Chooser | chooser BeatRoot's file chooser object |
protected ControlPanel | controlPanel The panel containing buttons and text fields, situated at the bottom of the window |
static String | CLEAR_BEATS |
static String | CLEAR_METRICAL_LEVELS |
static String | CLICK_VOLUME |
static boolean | debug Flag for enabling printing of debugging information |
protected BeatTrackDisplay | displayPanel The main data panel, which displays audio and beat data, and is a component of this window |
static double | DEFAULT_CLICK_VOLUME |
static double | DEFAULT_HIGH_THRESHOLD |
static double | DEFAULT_LOW_THRESHOLD Default values of preferences |
static double | DEFAULT_SCALE_FACTOR |
static String | EDIT_PERCUSSION |
static String | EDIT_PREFERENCES |
static String | EXIT |
static String | HIGH_THRESHOLD |
protected EventProcessor | listener The object which processes key, button and menu events |
static String | LENGTH |
static String | LEVEL Strings displayed in metrical level window |
static String | LOAD_AUDIO Strings displayed on menus and buttons |
static String | LOAD_BEATS |
static String | LOW_THRESHOLD Strings displayed in preferences window |
protected JMenuBar | menuBar BeatRoot's menu bar |
protected Parameters | metricalLevels Dialog for specifying metrical levels |
static String | MARK_METRICAL_LEVEL |
static int | percussionCount Constants and default file names for percussion sounds for each metrical levels |
protected Parameters | percussionSounds Dialog for setting the percussion sounds which are played on beats |
protected Parameters | preferences Dialog for setting preferences |
static String[][] | PERCUSSION_STRINGS |
static String | PHASE |
static String | PLAY |
static String | PLAY_AUDIO |
static String | PLAY_BEATS |
static String | REDO |
protected JScrollBar | scroller The scroller for showing or changing the position of the viewport relative to the whole audio file |
protected JPanel | scrollPane An intermediate level panel containing the displayPanel and scroller |
static long | serialVersionUID Avoid compiler warning |
static String | SAVE_AUDIO |
static String | SAVE_BEATS |
static int | SEG1 Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static int | SEG2 Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static int | SEG3 Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static int | SEG4 Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static String | SHOW_BEATS |
static String | SHOW_IBIS |
static String | SHOW_SPECTRO |
static String | SHOW_WAVE |
static String | STOP |
static String | title Name of program - displayed as part of window title |
static int | TRACK Constants defining metrical levels (see at.ofai.music.worm.WormFile) |
static String | UNDO |
static String | version Version number of program - displayed as part of window title.
|
Constructor Summary | |
---|---|
GUI(AudioPlayer ap, AudioProcessor proc, Chooser ch) Constructor: creates the GUI for BeatRoot |
Method Summary | |
---|---|
void | clearBeatData() Clear all beats. |
void | clearMetricalLevels() Clears any metrical level annotations from the beats |
void | editPercussionSounds() Opens the percussion sound selection dialog and updates the sound buffers accordingly |
void | editPreferences() Opens preferences dialog and updates the display accordingly. |
EventList | getBeatData() Returns the list of beats |
String | getPercussionSound(int level) Returns the file name of a percussion sound for playing at beat times. |
void | loadAudioData() Loads and processes an audio file chosen with a file open dialog. |
void | loadAudioData(String fileName) Loads and processes a given audio file. |
void | loadBeatData() Loads beat data from a file chosen by a file open dialog. |
void | loadBeatData(String fileName) Loads beat data from a given file. |
protected JMenu | makeBeatTrackMenu() Creates the beat tracking menu |
protected JMenu | makeEditMenu() Creates the edit menu |
protected JMenu | makeFileMenu() Creates the file menu |
protected JMenuItem | makeMenuItem(String text, int menuKey, int altKey, boolean isCheckBox) Creates a menu item with the given text and key codes. |
protected JMenu | makePlayMenu() Creates the play menu |
protected JMenu | makeViewMenu() Creates the view menu |
void | markMetricalLevel() Opens the metrical levels dialog and annotates the beat data correspondingly |
void | saveBeatData() Saves beat data to a file chosen by a file save dialog. |
void | scroll(int dir) Scroll the display by a given amount.
|
void | setAudioData(double[] onsets, double[] envTimes, int[] envMags) NOT USED:
Sets the data for the amplitude envelope and onsets on the display. |
void | setBeatData(EventList b) Set the list of beats displayed on this window. |
void | setMetricalLevels() Initialises the metrical levels dialog |
void | setMidiData(double[] onsets, double[] offsets, int[] pitches) NOT USED:
Sets the data for a MIDI piano-roll display. |
void | setMode(int mode, boolean flag) Changes the display mode (which elements are displayed on the data panel).
|
void | setPercussionSounds() Initialises the percussion sound dialog and sound buffers |
void | setPreferences() Copies default values into preferences dialog. |
void | setSpectroData(double[][] data, int len, double tInc, double overlap) NOT USED
Sets the data for displaying the spectrogram of the audio signal. |
void | skipTo(double time) Send a request to the audio player to skip to a given time if it is not playing |
void | updateDisplay(boolean resetSelection) Redraws the data panel when new data is loaded or the mode or preferences are changed. |
Parameters: ap Handle to the audio player object proc Handle to the audio processor object ch Handle to the file chooser object
Parameters: level The requested metrical level
Returns: The file name of the percussion sound for the requested metrical level
Parameters: fileName The name of the audio file to open
Parameters: fileName The name of the file to open
Parameters: text The text that appears on the menu menuKey The key to access the menu item when the menu is open altKey The shortcut key to access the menu item using the ALT key isCheckBox Flag indicating whether the menu item is a binary flag
Returns: The menu item
Parameters: dir The direction and number of units to scroll
Parameters: onsets The list of onset times envTimes The list of times corresponding to envelope values (envMag
) envMags The values of the signal magnitude at each of these times
Parameters: b The list of beats
Parameters: onsets The onset times of each note offsets The offset times of each note pitches The MIDI pitches of each note
Parameters: mode A bit string indicating the elements that should be switched on or off flag Indicates whether the elements should be switched on (true) or off (false)
Parameters: data The spectrogram data, indexed by time and frequency len The number of frames of spectrogram data tInc The time between successive frames (hop time) overlap The ratio of hop size to frame size; used for centering the frames in the display
Parameters: resetSelection Indicates whether the selected region should be reset