Package org.emrick.project
Class MediaEditorGUI
java.lang.Object
java.awt.Component
org.emrick.project.MediaEditorGUI
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EffectListener,RFTriggerListener,FootballFieldListener,ImportListener,LEDConfigListener,ReplaceFilesListener,RequestCompleteListener,RFSignalListener,ScrubBarListener,SelectListener,SyncListener,TimelineListener,UserAuthListener
public class MediaEditorGUI
extends Component
implements ImportListener, ScrubBarListener, SyncListener, FootballFieldListener, EffectListener, SelectListener, UserAuthListener, RFTriggerListener, RFSignalListener, RequestCompleteListener, LEDConfigListener, ReplaceFilesListener, TimelineListener
Main class of Emrick Designer.
Contains all GUI elements and logic for light show design and Emrick board interaction
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate classRunnable object used to split the load of packet export.private classTask used by the playback timer to repeatedly repaint the footballfieldpanel with new frames in fps mode.private classObject used to track the progress of programming led strips using the web serverNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanfinal intprivate final Timerfinal intprivate Effectprivate Fileprivate Effectprivate intintfinal intfinal intfinal intprivate EffectGUIprivate EffectManagerprivate JPanelprivate Filestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate JMenuItemprivate FlowViewGUIprivate JPanelprivate FootballFieldBackgroundprivate FootballFieldPanelprivate final JFrameprivate SelectionGroupGUIprivate final com.google.gson.Gsonprivate HardwareStatusIndicatorprivate JSplitPanefinal intprivate booleanprivate longprivate LEDConfigurationGUIprivate LEDStripViewGUIfinal intprivate JMenuItemprivate booleanprivate JPanelprivate static intprivate Timerprivate Stringprivate floatprivate Timerprivate intfinal intprivate JProgressBar(package private) JLabelprivate RFTriggerGUIprivate HttpServerprivate JMenuItemprivate JMenuItemprivate JMenuItemprivate JMenuItemprivate ScrubBarGUIprivate JPanelprivate EffectListprivate HttpServerfinal intprivate booleanprivate JCheckBoxMenuItemprivate Stringprivate floatprivate JMenuItemprivate JMenuItemprivate JMenuItemprivate final JLabelprivate TimelineGUIprivate JPanelprivate TimeManagerprivate ArrayList<SyncTimeGUI.Pair> private intfinal intfinal intprivate final Pathprivate booleanprivate Colorfinal intprivate JSplitPane(package private) JFrameprivate WindowListenerFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidApplies a default led configuration to all performersprivate voidLoads the ScrubBarGUI Panel if it has not been created, or refreshes it if it already exists.private JPanelbuildWelcomePanel(MediaEditorGUI mediaEditorGUI) Build the welcome panel displayed when no project is loaded.comPortPrompt(String type) Used to get a Serial Transmitter object.private voidprivate voidconcatenateProject(File path) private voidBuilds all major GUI elements and adds them to the main frame.private voidcreateEffectAtCurrentTime(EffectList effectType) Helper method to create a 1-second effect of the given type at the current timeline positionvoidctrlGroupSelection(LEDStrip[] ledStrips) private booleandeleteDirectory(File directoryToBeDeleted) Recursively empties and deletes the specified file/directory.private voidexportCsvFileForPerformerDeviceIDs(File selectedFile) Builds and exports a csv file containing configuration data for led strips and performersprivate voidexportPackets(File path) Multithreaded export of firmware-readable packet data to a .pkt file.Get audio playerprivate JComponentInitializes the Effect Options button and the effects popup menu and returns the Effect Options button.private intgetEffectTriggerIndex(Effect e, Long[] timesMS) Calculates the index of the RF Trigger immediately before the relevant effect.doubleprivate intprivate longCalculates and returns the frame length in millisecondslonggetPrevAudioPlayerDurations(int index) booleanprivate voidloadProject(File path) Loads a new .emrick file to the viewport to be edited.Load recent projects from user folder.static voidMain method of Emrick Designer.private SerialTransmitteroldComPortPrompt(String type) Legacy method for hardware detection - kept as fallbackvoidonAudioImport(ArrayList<File> audioFiles) voidvoidonChangeSelectionMode(boolean isInnerSelect, HashSet<LEDStrip> strips) voidonConcatAudioImport(ArrayList<File> audioFiles) voidonCreateEffect(Effect effect) voidonCreateRFTrigger(RFTrigger rfTrigger) voidonDeleteEffect(Effect effect) voidonDeleteRFTrigger(int count) voidonDrillImport(String drill) voidvoidonFileSelect(ArrayList<File> archivePaths, File csvFile) voidonGroupSelection(LEDStrip[] ledStrips) voidonImport()voidonMultiSelect(HashSet<Integer> labels, HashSet<String> symbols) booleanonNewFileSelect(File drill, File archive) booleanonPause()voidvoidbooleanonPlay()voidonPressEffect(Effect effect) voidonPressRFTrigger(RFTrigger rfTrigger) voidonRequestComplete(int id) voidvoidonRFSignal(int i) LEDStrip[]longonScrub()voidonSetChange(int setIndex) voidonSpeedChange(float playbackSpeed) voidonSync(ArrayList<SyncTimeGUI.Pair> times, float startDelay) voidonTimeChange(long time) voidonTimelineScrub(double count) Called when the timeline is scrubbed to a specific countvoidonUpdateEffect(Effect oldEffect, Effect newEffect) voidonUpdateEffectPanel(Effect effect, boolean isNew, int index) voidvoidonUpdateRFTrigger(RFTrigger rfTrigger, int count) voidonUserLoggedIn(String username) private voidOpens a prompt for the user to select a project to open.private voidparseCsvFileForPerformerDeviceIDs(File inputFile) Imports a configuration csv file and applies the config to an open project.private voidBegin playing audio in sync with the drill playbackprivate voidRebuilds the map of set labels to set start counts that is used in ScrubBarGUI.private voidRemoves the flow viewer from the main content panel and restores the run menu to be used againprivate voidreplaceEffectView(JComponent center, JComponent south) Atomically replace the effect view center and south components so only the desired panels are visible.private voidreplaceMainView(JComponent center, JComponent south) Atomically replace the main content center and south components so only the desired panels are visible.private voidPrompts the user for information and then starts a web server using this information for RSSI Loggingprivate voidPrompts the user for information and then starts a web server using this informationprivate voidPrompts the user for a location to save the current project.private voidsaveProject(File path, ArrayList<File> archivePaths) Save the current project to a .emrick file.private voidAttempts to save the project to a file.private voidsavePropertiesToFile(Properties props, File configFile, String dataDir, String packetsDir, String csvFile, String showToken, String verificationColor, String marcherLabel) private voidsaveRecentProjects(List<File> list) private voidsetupEffectView(ArrayList<Integer> ids) Initializes the effect panel and its dependenciesprivate static voidSets up the look and feel of the application based on the user's OS theme.private voidDisplay an error message to the user that indicates an RF Trigger has not been placed yet.private voidStops the currently running web server, restores the run menu to be used again, and cleans the filesystem of any files created by the web serverprivate longtimeAfterEffect(int index, Effect e, ArrayList<Effect> effects, Long[] timesMS) Calculates the time between the end of the current effect and the start of the next effect/RF Trigger.private longtimeBeforeEffect(int index, Effect e, ArrayList<Effect> effects, Long[] timesMS) Calculates the time between the end of the previous effect/RF Trigger and the start of the current effect.private static Stringprivate voidupdateEffectViewPanel(EffectList effectType, Effect effect) Update the effect panel to display the currently selected effectprivate voidupdateProgressLabel(JLabel label, Set<Integer> newlyProgrammed, Set<Integer> previouslyProgrammed, int totalBoards) private voidUpdate the timeline panel to show data relevant to the currently selected performers.private voidwriteSysMsg(String msg) Writes a system message in the top right of the screenMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
-
Field Details
-
FILE_MENU_CONCATENATE
- See Also:
-
FILE_MENU_NEW_PROJECT
- See Also:
-
FILE_MENU_OPEN_PROJECT
- See Also:
-
FILE_MENU_SAVE
- See Also:
-
FILE_MENU_SAVE_AS
- See Also:
-
frame
-
windowListener
-
mainContentPanel
-
footballField
-
footballFieldPanel
-
footballFieldBackground
-
ledConfigurationGUI
-
timelineGUI
-
effectGUI
-
groupsGUI
-
rfTriggerGUI
-
flowViewGUI
-
ledStripViewGUI
-
scrubBarGUI
-
scrubBarPanel
-
effectViewPanel
-
showAllEffects
private boolean showAllEffects -
timelinePanel
-
hSplitPane
-
vSplitPane
-
sysMsg
-
clearSysMsg
-
gson
private final com.google.gson.Gson gson -
userHome
-
audioPlayers
-
currentAudioPlayer
-
canSeekAudio
private boolean canSeekAudio -
effectManager
-
currentEffect
-
copiedEffect
-
selectedEffectType
-
DEFAULT_FUNCTION
public final int DEFAULT_FUNCTION- See Also:
-
USE_DURATION
public final int USE_DURATION- See Also:
-
SET_TIMEOUT
public final int SET_TIMEOUT- See Also:
-
DO_DELAY
public final int DO_DELAY- See Also:
-
INSTANT_COLOR
public final int INSTANT_COLOR- See Also:
-
PROGRAMMING_MODE
public final int PROGRAMMING_MODE- See Also:
-
USE_COLORS
public final int USE_COLORS- See Also:
-
DIRECTION
public final int DIRECTION- See Also:
-
LIGHT_BOARD
public final int LIGHT_BOARD- See Also:
-
CONTINUOUS
public final int CONTINUOUS- See Also:
-
VERIFY
public final int VERIFY- See Also:
-
CHECK_LR
public final int CHECK_LR- See Also:
-
count2RFTrigger
-
timeManager
-
timeSync
-
useStartDelay
private boolean useStartDelay -
startDelay
private float startDelay -
playbackSpeed
private float playbackSpeed -
playbackTimer
-
currentMovement
public int currentMovement -
server
-
rssiServer
-
ssid
-
password
-
port
private int port -
currentID
private int currentID -
MAX_CONNECTIONS
private static int MAX_CONNECTIONS -
lastRun
private long lastRun -
token
private int token -
verificationColor
-
noRequestTimer
-
requestIDs
-
runWebServer
-
runLightBoardWebServer
-
stopWebServer
-
runRSSILogger
-
stopRSSILogger
-
programmingTracker
-
programmingProgressBar
-
lightBoardMode
private boolean lightBoardMode -
programmingProgressLabel
JLabel programmingProgressLabel -
runShowItem
-
flowViewerItem
-
lightBoardFlowViewerItem
-
stopShowItem
-
isLightBoardMode
private boolean isLightBoardMode -
showIndividualView
-
archivePaths
-
emrickPath
-
csvFile
-
hardwareStatusIndicator
-
webServerFrame
JFrame webServerFrame
-
-
Constructor Details
-
MediaEditorGUI
Constructor for MediaEditorGUI- Parameters:
file- - Used when starting the application via opening a file via an associated type. Otherwise, this can be left as an empty string.
-
-
Method Details
-
main
Main method of Emrick Designer.- Parameters:
args- - Only used when opening the application via an associated file type rather than an executable
-
getPlaybackTimerTimeByCounts
private long getPlaybackTimerTimeByCounts()Calculates and returns the frame length in milliseconds- Returns:
- - Time in milliseconds the timer should wait between frames
-
setupLookAndFeel
private static void setupLookAndFeel()Sets up the look and feel of the application based on the user's OS theme. -
createAndShowGUI
private void createAndShowGUI()Builds all major GUI elements and adds them to the main frame. This method should be called on startup and on project loading when another project is already loaded. -
savePropertiesToFile
-
deleteDirectory
Recursively empties and deletes the specified file/directory.- Parameters:
directoryToBeDeleted- - File or directory that should be emptied and/or deleted- Returns:
- true - if the directory was deleted successfully. false - otherwise
-
getEffectOptionsButton
Initializes the Effect Options button and the effects popup menu and returns the Effect Options button.- Returns:
- JButton button that displays a popup menu with all the effect options when pressed
-
createEffectAtCurrentTime
Helper method to create a 1-second effect of the given type at the current timeline position -
comPortPrompt
Used to get a Serial Transmitter object. Now uses the hardware status indicator instead of prompting the user each time.- Parameters:
type- The type of hardware that should be detected ("Transmitter" or "Receiver").- Returns:
- A SerialTransmitter object for the specified type. If no hardware of the requested type is available, this method returns null.
-
comPortPromptFlow
-
oldComPortPrompt
Legacy method for hardware detection - kept as fallback -
removeFlowViewer
private void removeFlowViewer()Removes the flow viewer from the main content panel and restores the run menu to be used again -
stopServer
private void stopServer()Stops the currently running web server, restores the run menu to be used again, and cleans the filesystem of any files created by the web server -
runServer
Prompts the user for information and then starts a web server using this information- Parameters:
path- A path to the .pkt file whose contents should be served by the web server.lightBoard- true - Run the web server to serve light board packets false - Run the web server to serve show packets
-
updateProgressLabel
-
runRSSIServer
private void runRSSIServer()Prompts the user for information and then starts a web server using this information for RSSI Logging -
loadProject
Loads a new .emrick file to the viewport to be edited.- Parameters:
path- Path pointing to the intended .emrick file
-
concatenateProject
-
getMovementIndex
private int getMovementIndex() -
buildScrubBarPanel
private void buildScrubBarPanel()Loads the ScrubBarGUI Panel if it has not been created, or refreshes it if it already exists. -
onMultiSelect
- Specified by:
onMultiSelectin interfaceSelectListener
-
onGroupSelection
- Specified by:
onGroupSelectionin interfaceSelectListener
-
ctrlGroupSelection
- Specified by:
ctrlGroupSelectionin interfaceSelectListener
-
onSaveGroup
- Specified by:
onSaveGroupin interfaceSelectListener
-
onUpdateGroup
public void onUpdateGroup()- Specified by:
onUpdateGroupin interfaceSelectListener
-
exportCsvFileForPerformerDeviceIDs
Builds and exports a csv file containing configuration data for led strips and performersFormat:
The first line contains headers and the last element contains the expected number of led strips.
A new performer starts on a new line where its label (Ex. "R31") is written as the first element
Below each performer label will be a list of all of this performer's led strips, each line beginning with an empty element. The led strips lines will contain their label, id, and a set of configuration data.
Ex. ",226,R31L,50,12,6,-6,-6"
- Parameters:
selectedFile- The desired file location to write the csv file.
-
applyDefaultLEDConfiguration
private void applyDefaultLEDConfiguration()Applies a default led configuration to all performers -
parseCsvFileForPerformerDeviceIDs
Imports a configuration csv file and applies the config to an open project.- Parameters:
inputFile- csv configuration file
-
openProjectDialog
private void openProjectDialog()Opens a prompt for the user to select a project to open. -
concatenateDialog
private void concatenateDialog() -
saveProjectDialog
private void saveProjectDialog()Attempts to save the project to a file. If the currently open project is a new project, the user will be prompted to specify a save location before the project is saved. -
saveAsProjectDialog
private void saveAsProjectDialog()Prompts the user for a location to save the current project. -
onBeginImport
public void onBeginImport()- Specified by:
onBeginImportin interfaceImportListener
-
onImport
public void onImport()- Specified by:
onImportin interfaceImportListener
-
onFileSelect
- Specified by:
onFileSelectin interfaceImportListener
-
onAudioImport
- Specified by:
onAudioImportin interfaceImportListener
-
onConcatAudioImport
- Specified by:
onConcatAudioImportin interfaceImportListener
-
onDrillImport
- Specified by:
onDrillImportin interfaceImportListener
-
rebuildPageTabCounts
private void rebuildPageTabCounts()Rebuilds the map of set labels to set start counts that is used in ScrubBarGUI. -
onSync
- Specified by:
onSyncin interfaceSyncListener
-
setupEffectView
Initializes the effect panel and its dependencies- Parameters:
ids- List of effect ids
-
onPlay
public boolean onPlay()- Specified by:
onPlayin interfaceScrubBarListener
-
onPause
public boolean onPause()- Specified by:
onPausein interfaceScrubBarListener
-
onScrub
public long onScrub()- Specified by:
onScrubin interfaceScrubBarListener
-
onTimeChange
public void onTimeChange(long time) - Specified by:
onTimeChangein interfaceScrubBarListener
-
onSetChange
public void onSetChange(int setIndex) - Specified by:
onSetChangein interfaceScrubBarListener
-
playAudioFromCorrectPosition
private void playAudioFromCorrectPosition()Begin playing audio in sync with the drill playback -
getPrevAudioPlayerDurations
public long getPrevAudioPlayerDurations(int index) -
onSpeedChange
public void onSpeedChange(float playbackSpeed) - Specified by:
onSpeedChangein interfaceScrubBarListener
-
onUserLoggedIn
- Specified by:
onUserLoggedInin interfaceUserAuthListener
-
showEffectBeforeFirstTriggerError
private void showEffectBeforeFirstTriggerError()Display an error message to the user that indicates an RF Trigger has not been placed yet. -
onCreateEffect
- Specified by:
onCreateEffectin interfaceEffectListener
-
onUpdateEffect
- Specified by:
onUpdateEffectin interfaceEffectListener
-
onDeleteEffect
- Specified by:
onDeleteEffectin interfaceEffectListener
-
onUpdateEffectPanel
- Specified by:
onUpdateEffectPanelin interfaceEffectListener
-
onChangeSelectionMode
- Specified by:
onChangeSelectionModein interfaceEffectListener
-
onInnerSelectionRequired
- Specified by:
onInnerSelectionRequiredin interfaceEffectListener
-
onSelectionRequired
- Specified by:
onSelectionRequiredin interfaceEffectListener
-
onTimeRequired
- Specified by:
onTimeRequiredin interfaceEffectListener
-
onPerformerSelect
public void onPerformerSelect()- Specified by:
onPerformerSelectin interfaceFootballFieldListener
-
onPerformerDeselect
public void onPerformerDeselect()- Specified by:
onPerformerDeselectin interfaceFootballFieldListener
-
onTimelineScrub
public void onTimelineScrub(double count) Description copied from interface:TimelineListenerCalled when the timeline is scrubbed to a specific count- Specified by:
onTimelineScrubin interfaceTimelineListener- Parameters:
count- The count position that was scrubbed to
-
onCreateRFTrigger
- Specified by:
onCreateRFTriggerin interfaceRFTriggerListener
-
onUpdateRFTrigger
- Specified by:
onUpdateRFTriggerin interfaceRFTriggerListener
-
onDeleteRFTrigger
public void onDeleteRFTrigger(int count) - Specified by:
onDeleteRFTriggerin interfaceRFTriggerListener
-
onPressRFTrigger
- Specified by:
onPressRFTriggerin interfaceRFTriggerListener
-
onResizeBackground
public void onResizeBackground()- Specified by:
onResizeBackgroundin interfaceFootballFieldListener
-
getFrameRate
public double getFrameRate()- Specified by:
getFrameRatein interfaceFootballFieldListener
-
isPlaying
public boolean isPlaying()- Specified by:
isPlayingin interfaceFootballFieldListener
-
onPressEffect
- Specified by:
onPressEffectin interfaceEffectListener
-
updateEffectViewPanel
Update the effect panel to display the currently selected effect- Parameters:
effectType- - The type of effect that is currently selected.
-
replaceEffectView
Atomically replace the effect view center and south components so only the desired panels are visible. Pass null for either argument to omit that region. -
replaceMainView
Atomically replace the main content center and south components so only the desired panels are visible. Pass null for either argument to omit that region. -
buildWelcomePanel
Build the welcome panel displayed when no project is loaded. Contains a clickable/open control and a list of recently opened projects. -
toHex
-
loadRecentProjects
Load recent projects from user folder. Only returns existing files. -
saveRecentProjects
-
addToRecentProjects
-
updateTimelinePanel
private void updateTimelinePanel()Update the timeline panel to show data relevant to the currently selected performers. -
saveProject
Save the current project to a .emrick file.- Parameters:
path- The file location to save the project.archivePaths- The locations of the .3dz files in user files when the project is loaded.
-
timeBeforeEffect
Calculates the time between the end of the previous effect/RF Trigger and the start of the current effect.- Parameters:
index- Current RF Trigger indexe- Effect to find the time beforeeffects- List of effects on the relevant led striptimesMS- A list of times in milliseconds that RF Triggers occur- Returns:
- The time in milliseconds between the current effect and the previous effect/RF Trigger.
-
timeAfterEffect
Calculates the time between the end of the current effect and the start of the next effect/RF Trigger.- Parameters:
index- Current RF Trigger indexe- Effect to find the time beforeeffects- List of effects on the relevant led striptimesMS- A list of times in milliseconds that RF Triggers occur- Returns:
- The time in milliseconds between the current effect and the next effect/RF Trigger.
-
getEffectTriggerIndex
Calculates the index of the RF Trigger immediately before the relevant effect.- Parameters:
e- The relevant effect.timesMS- A list of times in milliseconds that RF Triggers occur- Returns:
- The index of the RF Trigger immediately before the relevant effect.
-
exportPackets
Multithreaded export of firmware-readable packet data to a .pkt file.- Parameters:
path- Location to write .pkt file.
-
writeSysMsg
Writes a system message in the top right of the screen- Parameters:
msg- Message to be written
-
onRFSignal
public void onRFSignal(int i) - Specified by:
onRFSignalin interfaceRFSignalListener
-
onRequestComplete
public void onRequestComplete(int id) - Specified by:
onRequestCompletein interfaceRequestCompleteListener
-
onExitConfig
public void onExitConfig()- Specified by:
onExitConfigin interfaceLEDConfigListener
-
onNewFileSelect
- Specified by:
onNewFileSelectin interfaceReplaceFilesListener
-
getAudioPlayers
Get audio player- Returns:
- AudioPlayer object
-