-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from isuretpolos/develop
Dynamic adjustment of queue rates
- Loading branch information
Showing
15 changed files
with
148 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
...ava/de/isuret/polos/AetherOnePi/processing2/dialogs/ImprobabilityMeterVerticalDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package de.isuret.polos.AetherOnePi.processing2.dialogs; | ||
|
||
import de.isuret.polos.AetherOnePi.processing2.hotbits.HotbitsHandler; | ||
import processing.core.PApplet; | ||
import processing.core.PFont; | ||
|
||
/** | ||
* Measurement of improbable events in realtime | ||
*/ | ||
public class ImprobabilityMeterVerticalDialog extends PApplet { | ||
|
||
public static int WIDTH = 400; | ||
public static int HEIGHT = 700; | ||
private HotbitsHandler hotbitsHandler; | ||
|
||
private int cumulativeValue = 0; | ||
private Integer lastRandomValue = null; | ||
|
||
public static void main(String[] args) { | ||
init(new HotbitsHandler(null)); | ||
} | ||
|
||
public static void init(HotbitsHandler hotbitsHandler) { | ||
|
||
ImprobabilityMeterVerticalDialog improbabilityMeterDialog = new ImprobabilityMeterVerticalDialog(hotbitsHandler); | ||
String[] args2 = {""}; | ||
PApplet.runSketch(args2, improbabilityMeterDialog); | ||
} | ||
|
||
public void exit() { | ||
surface.setVisible(false); | ||
dispose(); | ||
System.out.println("CLOSED"); | ||
System.exit(0); | ||
} | ||
|
||
public ImprobabilityMeterVerticalDialog(HotbitsHandler hotbitsHandler) { | ||
this.hotbitsHandler = hotbitsHandler; | ||
} | ||
|
||
public void settings() { | ||
size(WIDTH, HEIGHT); | ||
} | ||
|
||
public void setTitle(String title) { | ||
frame.setTitle(title); | ||
} | ||
|
||
public void setup() { | ||
background(0); | ||
surface.setTitle("Improbability Meter"); | ||
PFont font = createFont("Verdana", 20); | ||
textFont(font); | ||
} | ||
|
||
public void draw() { | ||
|
||
background(0); | ||
|
||
stroke(255); | ||
|
||
if (lastRandomValue != null && lastRandomValue == 10) { | ||
stroke(255,0,0); | ||
} | ||
|
||
text("points: " + cumulativeValue, 20, 30); | ||
|
||
for (int i = 0; i < 24; i++) { | ||
|
||
if (cumulativeValue > i * 10 ) { | ||
fill(255,i*10,0); | ||
rect(20, HEIGHT - (14 * i) - 60, WIDTH - 40, 10); | ||
} | ||
} | ||
|
||
throwDice(); | ||
|
||
if (cumulativeValue > 0) { | ||
cumulativeValue -= 1; | ||
} | ||
} | ||
|
||
public void throwDice() { | ||
|
||
if (lastRandomValue != null && lastRandomValue == 10) { | ||
|
||
cumulativeValue += lastRandomValue; | ||
} | ||
|
||
lastRandomValue = hotbitsHandler.getInteger(10); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/de/isuret/polos/AetherOnePi/sound/Binaural.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
java -jar AetherOnePi-1.2.5-jar-with-dependencies.jar | ||
java -jar AetherOnePi-1.2.6-jar-with-dependencies.jar | ||
rem pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
java -jar AetherOnePi-1.2.5.jar | ||
java -jar AetherOnePi-1.2.6.jar | ||
pause |