Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Crown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

Sets for live play, the details of the color map, lessons learned

## Requirements
Java 8, 9, or 10
Gradle
Processing 3.0
git

## How to Run
You can either run through the Processing or run the app headlessly. Use the Processing application when you want to use the UI and DJ patterns. headless mode is only for when the crown app is running continuously on an odroid without a screen (showtime)

### HOWTO Run Interactively with Processing
1. Download Crown repo
- git clone https://github.com/squaredproject/crown.git
2. Open Processing 3.0
- click File->Open
- navigate to Crown directory
- click on Crown.pde
- click on the arrow button to Run
3. Once Processing has loaded the app, it should show you the Crown software and you can start making patterns

### HOWTO Run Headlessly
1. Download Crown repo from github
- git clone https://github.com/squaredproject/crown.git
2. Open terminal and navigate to repo directory
- eg. cd ~/crown/Crown
3. Compile java application using gradle
- gradle build
4. Excute shell script to run headlessly
- ./run.sh
- confirm script out says "LX Engine Started" at the end
5. Optional: configure machine to run crown on startup using crown.servoce


### How to change NDP IP addresses
The IP address for every NDB is saved in a config file called data/crown_clusters.json
If you change the NDBs conncted to the sculpture, you will need to:
1. Edit data/crown_clusters.json and add your specific NDP IP address in the right location
2. Recompile code using ./compile.sh OR restart Processing
2a. Optional - restart NDB by temporarily unplugging it from the power
3. Confirm new NDB LEDS are receiving data and LEDs are turning on as expected

## SAVING SETS FOR LIVE PLAY

### READ THIS
Expand Down Expand Up @@ -115,3 +155,4 @@ You can validate that the kernel portions are working by first doing an 'lsusb'
the device is showing up in USb, then doing ALSA commands to see it in hte list of Alsa midi,
then it should show up in the java iterators.


3 changes: 1 addition & 2 deletions Crown/compile.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh

cd "$( dirname "$0" )"
mkdir -p build-tmp
javac -cp "code/*" -Xlint:unchecked -d build-tmp *.java
gradle build
10 changes: 10 additions & 0 deletions Crown/crown.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=crown

[Service]
ExecStart=/home/odroid/crown/Crown/run.sh
ExecStop=/bin/pkill java
Restart=always

[Install]
WantedBy=multi-user.target
3 changes: 2 additions & 1 deletion Crown/run.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

cd "$( dirname "$0" )"
exec java -Xms256m -Xmx1g -cp "build-tmp:code/*" RunHeadless "${PWD}"
echo java -Xms256m -Xmx1g -cp "build/classes/main:code/*" RunHeadless "${PWD}"
exec java -Xms256m -Xmx1g -cp "build/classes/main:code/*" RunHeadless "${PWD}"