This repository has been archived by the owner on Mar 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,395 changed files
with
143,723 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
C-quencer | ||
========= | ||
|
||
Realtime collaborative sequencer | ||
Realtime collaborative sequencer | ||
|
||
Setup | ||
===== | ||
|
||
To use the C-quencer, you need to modify the config.ck file to reflect your setup. It is currently set up in 2 modes - either a 2 computer setup or a 16 computer 4x4 grid setup. | ||
Modify the host_name() file to return the correct computer name in whatever set up you want. Update the server_name() to return the server name. Nothing else needs to be changed. | ||
|
||
Use | ||
=== | ||
To use the C-quencer, first clone all the files on all the computers. Run launch_node.ck on each node that wants to play. Run launch_server.ck on a separate computer that acts as the server. Once the ChucK files are running, run the fm_envelopes.maxpat from the max directory. This brings up the GUI for controlling the sequencer. This GUI is entirely mouse controlled. | ||
|
||
Server Controls | ||
=============== | ||
The server has a few special controls. By pressing the number keys, you can move through the pre-defined sections. Changing sections changes the score displayed on each sequencer as well as switches on/off the 'drone' mode. By pressing +/-, the tempo of the piece is modified - this can be used as a manual control over the energy in the piece. | ||
|
||
Changing Scores | ||
=============== | ||
To change the score, modify the appropriate image and sound files in the max folder. |
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,231 @@ | ||
//////////////////////////////////////////////////////////// | ||
// Final Project | ||
// Config Module | ||
//////////////////////////////////////////////////////////// | ||
// Slork 2012 | ||
// Mayank Sanganeria, Jiffer Harriman, Hunter McCurry | ||
//////////////////////////////////////////////////////////// | ||
|
||
// Holds common information | ||
public class Config | ||
{ | ||
// Config mode | ||
0 => static int mode; | ||
|
||
// Number of nodes: | ||
16 => static int NUMNODES; | ||
|
||
// Name of nodes, update before each run | ||
fun static string host_name(int index) | ||
{ | ||
if (mode == 1) | ||
{ | ||
return "localhost"; | ||
} | ||
else if (mode == 2) | ||
{ | ||
if (index == 0) | ||
return "jiffer8.local"; | ||
if (index == 1) | ||
return "Mayank.local"; | ||
|
||
} | ||
|
||
else // mode 0 | ||
{ | ||
if (index == 0) | ||
{ | ||
return "albacore.local"; | ||
} | ||
else if (index == 1) | ||
{ | ||
return "banhmi.local"; | ||
} | ||
else if (index == 2) | ||
{ | ||
return "chowder.local"; | ||
} | ||
else if (index == 3) | ||
{ | ||
return "donut.local"; | ||
} | ||
else if (index == 4) | ||
{ | ||
return "empanada.local"; | ||
} | ||
else if (index == 5) | ||
{ | ||
return "foiegras.local"; | ||
} | ||
else if (index == 6) | ||
{ | ||
return "gelato.local"; | ||
} | ||
else if (index == 7) | ||
{ | ||
return "hamburger.local"; | ||
} | ||
else if (index == 8) | ||
{ | ||
return "kimchi.local"; | ||
} | ||
else if (index == 9) | ||
{ | ||
return "lasagna.local"; | ||
} | ||
else if (index == 10) | ||
{ | ||
return "meatloaf.local"; | ||
} | ||
else if (index == 11) | ||
{ | ||
return "nachos.local"; | ||
} | ||
else if (index == 12) | ||
{ | ||
return "quinoa.local"; | ||
} | ||
else if (index == 13) | ||
{ | ||
return "ratatouille.local"; | ||
} | ||
else if (index == 14) | ||
{ | ||
return "spam.local"; | ||
} | ||
else if (index == 15) | ||
{ | ||
return "tiramisu.local"; | ||
} | ||
else | ||
{ | ||
<<< "ERROR: Requested node index too high!" >>>; | ||
return ""; | ||
} | ||
} | ||
} | ||
|
||
// Name of server, update before each run | ||
fun static string server_name() | ||
{ | ||
if (mode == 1) | ||
{ | ||
return "localhost"; | ||
} | ||
else if (mode == 2) | ||
{ | ||
return "Mayank.local"; | ||
} | ||
else | ||
{ | ||
return "waffle.local"; | ||
} | ||
} | ||
|
||
// Different modes we can be in: | ||
0 => static int MODE_IDLE; | ||
1 => static int MODE_ACTIVE; | ||
|
||
// OSC ports: | ||
6470 => static int server_to_node_port; // send status pulse | ||
6471 => static int node_to_server_port; // send state request | ||
6472 => static int node_to_server_trigger_port; // send trigger | ||
6473 => static int node_to_synth_port; // make sound | ||
6474 => static int server_to_display_port; // send data to visualizer | ||
|
||
// Delay between OSC server burst messages, in ms | ||
// 1 => static int osc_burst_delay; | ||
|
||
// OSC message definitions: | ||
fun static string osc_message_state() | ||
{ | ||
return "/state"; | ||
} | ||
fun static string osc_message_state_data() | ||
{ | ||
// mahine_num, next_node, sequence_length, sequence_index, pulses_since_banged, wail_mode, section | ||
return "i i i i i i i "; | ||
} | ||
|
||
fun static string osc_message_node_to_synth() | ||
{ | ||
return "/synth"; | ||
} | ||
fun static string osc_message_node_to_synth_data() | ||
{ | ||
// Indicates sequence index, sequence length, pulses_since_banged, next_node, do_wail, section, machine_num | ||
return "i i i i i i i"; | ||
} | ||
|
||
fun static string osc_message_server_to_display_connections() | ||
{ | ||
return "/display_connections"; | ||
} | ||
fun static string osc_message_server_to_display_connections_data() | ||
{ | ||
// state of all computers - node connected to | ||
"" => string data; | ||
for( 0 => int i; i < NUMNODES; i++ ) | ||
"i " +=>data; | ||
return data; | ||
|
||
} | ||
fun static string osc_message_server_to_display_playing() | ||
{ | ||
return "/display_playing"; | ||
} | ||
fun static string osc_message_server_to_display_playing_data() | ||
{ | ||
// state of all computers - playing or not | ||
"" => string data; | ||
for( 0 => int i; i < NUMNODES; i++ ) | ||
"i " +=>data; | ||
return data; | ||
} | ||
fun static string osc_message_server_to_display_transition() | ||
{ | ||
return "/disp_transition"; | ||
} | ||
fun static string osc_message_server_to_display_transition_data() | ||
{ | ||
// node from - node to | ||
return "i i"; | ||
} | ||
fun static string osc_message_server_to_display_pulses_since_banged() | ||
{ | ||
return "/disp_pulses_since_banged"; | ||
} | ||
fun static string osc_message_server_to_display_pulses_since_banged_data() | ||
{ | ||
// state of all computers - pulses since banged | ||
"" => string data; | ||
for( 0 => int i; i < NUMNODES; i++ ) | ||
"i " +=>data; | ||
return data; | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
} | ||
// Instantiate to initialize static variables: | ||
Config config; | ||
if (me.args() > 0) | ||
{ | ||
if (me.arg(0) == "local_test") | ||
{ | ||
<<< "Setting up local test version" >>>; | ||
1 => Config.mode; | ||
1 => Config.NUMNODES; | ||
} | ||
else if (me.arg(0) == "two_test") | ||
{ | ||
<<< "Setting up 2 computer test version" >>>; | ||
2 => Config.mode; | ||
2 => Config.NUMNODES; | ||
|
||
|
||
} | ||
} |
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,9 @@ | ||
Machine.add("config.ck:local_test"); | ||
|
||
Machine.add("node_state.ck"); | ||
|
||
Machine.add("server.ck"); | ||
|
||
Machine.add("node.ck"); | ||
|
||
//Machine.add("synth.ck"); |
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,7 @@ | ||
Machine.add("../../../../../../../../../../../Users/slork/slork/groups/2012/mayank-jiffer-hunter/version 3.0/config.ck"); | ||
|
||
Machine.add("../../../../../../../../../../../Users/slork/slork/groups/2012/mayank-jiffer-hunter/version 3.0/node_state.ck"); | ||
|
||
Machine.add("../../../../../../../../../../../Users/slork/slork/groups/2012/mayank-jiffer-hunter/version 3.0/node.ck"); | ||
|
||
//Machine.add("synth.ck"); |
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,7 @@ | ||
Machine.add("config.ck"); | ||
|
||
Machine.add("node_state.ck"); | ||
|
||
Machine.add("server.ck"); | ||
|
||
//Machine.add("synth.ck"); |
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,9 @@ | ||
Machine.add("config.ck:two_test"); | ||
|
||
Machine.add("node_state.ck"); | ||
|
||
Machine.add("server.ck"); | ||
|
||
Machine.add("node.ck"); | ||
|
||
//Machine.add("synth.ck"); |
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,7 @@ | ||
Machine.add("config.ck:two_test"); | ||
|
||
Machine.add("node_state.ck"); | ||
|
||
Machine.add("node.ck"); | ||
|
||
//Machine.add("synth.ck"); |
Binary file not shown.
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,17 @@ | ||
K 25 | ||
svn:wc:ra_dav:version-url | ||
V 80 | ||
/svn/slork/!svn/ver/980/trunk/groups/2012/mayank-jiffer-hunter/version%203.0/max | ||
END | ||
fm_envelopes_old.maxpat | ||
K 25 | ||
svn:wc:ra_dav:version-url | ||
V 104 | ||
/svn/slork/!svn/ver/825/trunk/groups/2012/mayank-jiffer-hunter/version%203.0/max/fm_envelopes_old.maxpat | ||
END | ||
fm_envelopes.maxpat | ||
K 25 | ||
svn:wc:ra_dav:version-url | ||
V 100 | ||
/svn/slork/!svn/ver/980/trunk/groups/2012/mayank-jiffer-hunter/version%203.0/max/fm_envelopes.maxpat | ||
END |
Oops, something went wrong.