Skip to content

Commit

Permalink
Nightly commit 10/17/2021
Browse files Browse the repository at this point in the history
Working on new objects and interfaces. Migrating the old OSC objects to new ones.
  • Loading branch information
Rusettsten committed Oct 18, 2021
1 parent f14011c commit 03a8227
Show file tree
Hide file tree
Showing 13 changed files with 355 additions and 502 deletions.
69 changes: 1 addition & 68 deletions photon/src/main/java/com/strikete/photon/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,11 @@
import com.strikete.photon.wtsahtsi.Wtsahtsi;

public class Main {

/*
* VARIABLES
*/

public static final String version = "SNAPSHOT 0.9.0";
public static Logger log;

/*
* NON-MAIN METHODS
*/

private static void printWelcomeMessage() { //Only to be called after the logger object has been configured
log.info("Welcome to Photon " + version + " .");
log.info("Photon is authored by Benji Arrigo in conjunction with Strike Theatre Electronics.");
}

@Subscribe
public void onChannelUpdateEvent(ChannelUpdateEvent e) {
Channel temp = e.getChannel();
if(temp.getChannelNum() == 3000) {
System.out.println("Channel: " + temp.getChannelNum());
DmxAddress tempAddr = temp.getAddress();
System.out.println("Universe: " + tempAddr.getUniverse().getUniverseNum());
System.out.println("Address: " + tempAddr.getAddressNumber());
System.out.println("Label: " + temp.getName());
System.out.println("Manufactuer: " + temp.getManufacturer());
System.out.println("Fixture Type: " + temp.getType());
System.out.println("UID: " + temp.getUID());
System.out.println("Level: " + temp.getLevel());
}
}



/*
Expand All @@ -73,44 +45,5 @@ public static void main(String[] args) throws IOException {
osc.getEventHandler().register(main);



try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

//osc.getOscSender().sendOscMessage(osc.getOscMap().KEY_BLIND);
//osc.getOscSender().selectChannel(1);

osc.getObjectUpdater().doBasicUpdate();

//while(true) {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

//System.out.println(osc.getOscParser().getChannelSize());
//Wtsahtsi whut = new Wtsahtsi("/Users/rusettsten/Desktop/KC-ON YOUR FEET.csv",1,osc,1499);
printCueLabels(osc);


}
//}

public static void printCueLabels(OscInstance osc) {
int cueSize = osc.getOscParser().getCuelistFromIndex(0).getCueSize();
for(int x = 0; x < cueSize; x++) {
if(!osc.getOscParser().getCuelistFromIndex(0).getCue(x).getName().isEmpty() && !osc.getOscParser().getCuelistFromIndex(0).getCue(x).getName().contains("copy")) {
float cueNumber = osc.getOscParser().getCuelistFromIndex(0).getCue(x).getCueNumber();
String cueName = osc.getOscParser().getCuelistFromIndex(0).getCue(x).getName();
System.out.println("Q" + cueNumber + ": " + cueName);
}
}
}

}
}
111 changes: 111 additions & 0 deletions photon/src/main/java/com/strikete/photon/Photon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package com.strikete.photon;

import java.util.ArrayList;

import org.apache.log4j.Logger;

import com.strikete.photon.objects.BeamPalette;
import com.strikete.photon.objects.Channel;
import com.strikete.photon.objects.ColorPalette;
import com.strikete.photon.objects.Cue;
import com.strikete.photon.objects.Cuelist;
import com.strikete.photon.objects.Curve;
import com.strikete.photon.objects.Effect;
import com.strikete.photon.objects.Fixture;
import com.strikete.photon.objects.FocusPalette;
import com.strikete.photon.objects.Group;
import com.strikete.photon.objects.IntensityPalette;
import com.strikete.photon.objects.Macro;
import com.strikete.photon.objects.MagicSheet;
import com.strikete.photon.objects.Pixelmap;
import com.strikete.photon.objects.Preset;
import com.strikete.photon.objects.Snapshot;
import com.strikete.photon.objects.Sub;

public class Photon {

/*
* VARIABLES - PROGRAM SPECIFIC
*/
public static Logger log;
public static final String version = "SNAPSHOT 0.9.0";

/*
* VARIABLES - OBJECTS
*/
private ArrayList<BeamPalette> beamPalettes;
private ArrayList<Channel> channels;
private ArrayList<ColorPalette> colorPalettes;
private ArrayList<Cue> cues;
private ArrayList<Cuelist> cuelists;
private ArrayList<Curve> curves;
private ArrayList<Effect> effects;
private ArrayList<Fixture> fixtures;
private ArrayList<FocusPalette> focusPalettes;
private ArrayList<Group> groups;
private ArrayList<IntensityPalette>intensityPalettes;
private ArrayList<Macro> macros;
private ArrayList<MagicSheet> magicSheets;
private ArrayList<Pixelmap> pixelmaps;
private ArrayList<Preset> presets;
private ArrayList<Snapshot> snapshots;
private ArrayList<Sub> subs;


/*
* METHODS - GETTERS
*/



/*
* METHODS - SETTERS
*/



/*
* METHODS - PROGRAM SPECIFIC
*/
private static void printWelcomeMessage() { //Only to be called after the logger object has been configured
log.info("Welcome to Photon " + version + " .");
log.info("Photon is authored by Benji Arrigo in conjunction with Strike Theatre Electronics.");
}


/*
* METHODS - INITIALIZATION
*/
private void initializeVariables() {
beamPalettes = new ArrayList<BeamPalette>();
channels = new ArrayList<Channel>();
colorPalettes = new ArrayList<ColorPalette>();
cues = new ArrayList<Cue>();
cuelists = new ArrayList<Cuelist>();
curves = new ArrayList<Curve>();
effects = new ArrayList<Effect>();
fixtures = new ArrayList<Fixture>();
focusPalettes = new ArrayList<FocusPalette>();
groups = new ArrayList<Group>();
intensityPalettes = new ArrayList<IntensityPalette>();
macros = new ArrayList<Macro>();
magicSheets = new ArrayList<MagicSheet>();
pixelmaps = new ArrayList<Pixelmap>();
presets = new ArrayList<Preset>();
snapshots = new ArrayList<Snapshot>();
subs = new ArrayList<Sub>();
}

public void initializeOsc() {

}


/*
* CONSTRUCTOR
*/
public Photon() {
initializeVariables();

}
}
5 changes: 5 additions & 0 deletions photon/src/main/java/com/strikete/photon/PhotonDaemon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.strikete.photon;

public class PhotonDaemon {

}
62 changes: 0 additions & 62 deletions photon/src/main/java/com/strikete/photon/objects/DmxAddress.java

This file was deleted.

54 changes: 0 additions & 54 deletions photon/src/main/java/com/strikete/photon/objects/DmxUniverse.java

This file was deleted.

12 changes: 12 additions & 0 deletions photon/src/main/java/com/strikete/photon/osc/OscIncoming.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.strikete.photon.osc;

public class OscIncoming {

/*
* VARIABLES
*/
public String RETURN_VERSION = "/eos/out/get/version";
public String RETURN_PATCH_COUNT = "/eos/out/get/patch/count";
public String RETURN_CUELIST_COUNT = "/eos/out/get/cuelist/count";
public String RETURN_CUE_COUNT = "/eos/out/get/cuelist/"
}
Loading

0 comments on commit 03a8227

Please sign in to comment.