Difference between revisions of "Q3osc: works"

From CCRMA Wiki
Jump to: navigation, search
m (Instructions)
m (Instructions)
Line 26: Line 26:
 
  shabushabu:~ slork$ q3osc 3 900 10.0.1.189
 
  shabushabu:~ slork$ q3osc 3 900 10.0.1.189
  
 +
 +
After the client is loaded into the game engine and the virtual-environment appears on-screen, the client should press fn+F1, F2, F3 or F4, matching the F# to the Speaker-set number they entered at the command line. With the above example, the client would press fn+F3. This loads a specific configuration file for that client, giving each client specific controls over different global game parameters.
  
  

Revision as of 12:13, 12 May 2008

Quintet: 5 for 4

quintet_caps_400.png

Quintet: 5 for 4 by Robert Hamilton is an improvisatory etude written for the Stanford Laptop Orchestra using q3osc and ChucK. Four performers control avatars in a virtual environment, firing sound-projectiles which bounce or home-in on individual performers, creating sound events at every bounce/collision with a surface of the environment. Virtual sound sources are laid out in a "+" with hemispherical speakers in the real-world laid out in a similar configuration. Spatialization is correlated between virtual and real-environments, with various aspects of each sound-event (frequency, timbre, duration) mapped to various axis and relationships in the virtual environment. Additionally, each of the four performers has real-time control over one of four super-sets of global parameters controlling respectively Projectile-Speed, Homing-Speed, Client-Speed, and Gravity. These commands are bound to the keyboard (1-5) in increasing increments (0/10, 100, 500, 1000, 3000) and can be triggered at any time during the performance to affect all performers.


Files

q3osc Installer: q3osc.zip

Quintet ChucK script: quintet.ck

Large composite of screen-caps: quintet_caps.png


Instructions

speakers.png

Quintet was designed to be run using five slork hemispherical speakers arranged in a + shape with one speaker in the center and 1 speaker on each of the ends of the +. Each user sits at a slork station next to a hemispherical speaker. The center speaker is left un-manned and is connected to a subwoofer. Each physical speaker location has a unique number from 0-4 with 0 being the center speaker, being (on a clock face) 12 o'clock, 2 being 3 o'clock, 3 being 6 o'clock, and 4 being 9 o'clock. These id's are used to identify each user's station to the software for correlation between virtual speaker placements and physical speaker placements (see diagram => ). All performers should be facing inwards towards the center speaker so that they can make eye and gestural contact with one another.

One computer running the q3osc game-server should be running and connected to the local network (preferably over ethernet for now). Currently q3osc has only been successfully compiled in linux so the server should be running linux (Fedora 8 works nicely). The server can be connected to a video projector and is used to project an overall view of the environment to the audience. In this regard, when the server is started it can either be run as a client server (where the game itself appears on the screen of the server), or as a dedicated server, where a separate machine can login as a game client and be used with the projector.

Clients launch q3osc by opening an OS X terminal window and by launching the q3osc shell-script, passing in parameters for the speaker location at which they're sitting, an integer for the radius-to-speaker for which sounds will occur, and the ip-address of the game server. For example, the call below will launch q3osc, load the dirt_dome.bsp map (set by default), connect to the server 10.0.1.189, and will launch ChucK with parameters "-c8 quintet.ck:3:900" where quintet is the name of the ChucK script, -c8 sets multi-channel output to 8 channels, 3 specifies the speaker-set location (see diagram) and 900 sets the speaker-radius.

shabushabu:~ slork$ q3osc 3 900 10.0.1.189


After the client is loaded into the game engine and the virtual-environment appears on-screen, the client should press fn+F1, F2, F3 or F4, matching the F# to the Speaker-set number they entered at the command line. With the above example, the client would press fn+F3. This loads a specific configuration file for that client, giving each client specific controls over different global game parameters.


Additional points:

  • Each client should make sure a multi-channel interface is connected as default sound source in Mac OS X.
  • A mouse can be used with the laptop to make control of the system more natural.
  • When in the game engine, pressing the ~ key brings down the quake-terminal and returns Mouse-focus to the operating system.
  • Things like hot-corners on a mac should be disabled


Installation

  • download q3osc.zip and unzip the archive.
  • run the ./install.sh shell script to install the q3osc mod of OpenArena, the q3osc maps and custom config files. Follow instructions listed in the terminal window at the end of the shell script.


Run the program(s)

A custom bash script is installed by the installation process to the ~/slork/scripts/ directory:

TO LAUNCH:

Type "q3osc" to launch bash script in /Users/slork/slork/scripts/

	"q3osc <user-number> <sounding-radius> <host-ip>"

e.g.:
 
 	shabushabu:~ slork$ q3osc 3 900 10.0.1.189
 
 		- calls "chuck -c8 /Users/slork/slork/users/rob/q3osc/quintet.ck:3:900
 		- launches /Applications/OpenArena and connects to ip address 10.0.1.189 on default port 27660
 		- exec's a specific config file for each performer based on their user number:
 			1:	pspeed.cfg
 			2:	gspeed.cfg
 			3:	hspeed.cfg
 			4:	gravity.cfg
 
 example call: /Applications/OpenArena.app/Contents/MacOS/ioquake3.ub connect 10.0.1.189:27660


Getting Started

After loading the software, press fn+F1-4 where # is the same as the number you enter on the command line:

	Player 1:			/bind F1 "exec pspeed.cfg"
	Player 2:			/bind F2 "exec gspeed.cfg"
	Player 3:			/bind F3 "exec hspeed.cfg"
	Player 4:			/bind F4 "exec gravity.cfg"


In-Game Controls

Key-Commands 


Settings are stored in q3config.cfg file located in ~/slork/Application\ Support/OpenArena/ccrma/

(w) 		move forwards
(s)		move backwards
(a)		strafe left
(b)		strafe right
(SPACE)		jump
(c)		crouch 

(8)		select plasma gun
(9)		select bfg 

(b)		toggle Plasma Bounce on/off
(n)		toggle BFG Bounce on/off
(y)		toggle Plasma Persist on/off 

(h)		toggle Homing on/off
(p)		toggle Parent Homing on/off
(j)		toggle Parent Homing Only on/off
(u)		toggle BFG Homing on/off
(i)		toggle Plasma Homing Persist on/off
(o)		toggle BFG Homing Persist on/off 

(v)		toggle client weapon damage on/off 

(')		Take snapshot (saves to ~/slork/Library/Application\ Support/OpenArena/ccrma/screenshots/) 
Global Parameter Controls:

Each client uses number keys 1-7 to control different attributes of the game world:

(1)		Set Plasma speed to 10			/bind 1 rcon g_plasma_speed 10	
(2)		Set Plasma speed to 100			/bind 2 rcon g_plasma_speed 100	
(3)		Set Plasma speed to 500			/bind 3 rcon g_plasma_speed 500
(4)		Set Plasma speed to 1000			/bind 4 rcon g_plasma_speed 1000
(5)		Set Plasma speed to 3000			/bind 5 rcon g_plasma_speed 3000

(1)		Set Homing speed to 10			  /bind 1 rcon g_homing_speed 10			 
(2)		Set Homing speed to 100			  /bind 2 rcon g_homing_speed 100
(3)		Set Homing speed to 500			  /bind 3 rcon g_homing_speed 500
(4)		Set Homing speed to 1000		/bind 4 rcon g_homing_speed 1000
(5)		Set Homing speed to 3000		/bind 5 rcon g_homing_speed 3000

(1)		Set client speed to 10			          /bind 1 rcon g_speed 10
(2)		Set client speed to 100			  /bind 2 rcon g_speed 100
(3)		Set client speed to 500			  /bind 3 rcon g_speed 500
(4)		Set client speed to 1000			  /bind 4 rcon g_speed 1000
(5)		Set client speed to 3000 			  /bind 5 rcon g_speed 3000

(1)		Set world gravity to 10			  /bind 1 rcon g_gravity 10
(2)		Set world gravity to 100			  /bind 2 rcon g_gravity 100
(3)		Set world gravity to 500			  /bind 3 rcon g_gravity 500
(4)		Set world gravity to 1000			  /bind 4 rcon g_gravity 1000
(5)		Set world gravity to 3000			  /bind 5 rcon g_gravity 3000


Server/Admin shortcuts

To copy updated files to clients:


scp quintet.ck snickers.local:~/slork/users/rob/q3osc/ scp quintet.ck xiaolongbao.local:~/slork/users/rob/q3osc/ scp quintet.ck padthai.local:~/slork/users/rob/q3osc/ scp quintet.ck transfat.local:~/slork/users/rob/q3osc/ scp quintet.ck seventeen.local:~/slork/users/rob/q3osc/

Running clients:


NOTE: client 0 = center, clients 1-4 are respectively top, right, bottom, left

chuck -c8 ~/slork/users/rob/q3osc/quintet.ck:0:900 chuck -c8 ~/slork/users/rob/q3osc/quintet.ck:1:1000 chuck -c8 ~/slork/users/rob/q3osc/quintet.ck:2:1000 chuck -c8 ~/slork/users/rob/q3osc/quintet.ck:3:1000 chuck -c8 ~/slork/users/rob/q3osc/quintet.ck:4:1000