By Andrew Faraday
An attempt to produce an automated laptop ensemble with PureData and Ruby. The aim is a single sequencer machine and multiple client boxes producing the sound.
- Ruby 1.9
sudo apt-get install puredataor www.puredata.info/downloads (no need for pd-extended)
sudo apt-get install puredata
git clone email@example.com/ajfaraday/NetworkEnsemble
cp config/config.yml.template config/config.yml
cp config/presets.yml.template config/presets.yml
- profile: a named profile, defined lower in the file, for quick switching of environments
- local: should work out-of-the-box with quartet.pd open
- remote: needs modification, designed to work with multiple computers with single.pd open
- Connections: An array of pure data client instances ** hostname: IP address of Pure Data listener ** port: port number of Pure Data listener
- (in another window)
You should hear a number of sequences demonstrating the signals and the sounds they produce.
To do this you will need 4 separate computers, connected to speakers, on a wired network. One will be the sequencer box, the rest, just sound.
- download puredata (
sudo apt-get install puredataor www.puredata.info/downloads
- clone the git repo (
git clone firstname.lastname@example.org/ajfaraday/NetworkEnsembleor use the zip download for windows)
- open single.pd (
puredata pd/single.pdor navigate from pure data)
- find the ip address and make a note of it (
ifconfigin linux or mac OS,
ipconfigin windows command prompt)
On your sequencing box:
- vim config/config.yml (change profile to 'remote' and ip addresses on remote profile to your 4 boxes)
ruby scripts/play.rb sequences/tunes/happy_birthday.csv
All being well, you should receive a delightful birthday treat.
The initial purpose in this project is to play an unexpected medley of christmas tunes on a set of work laptops during a meeting. For this sequence use the generic scripts/play.rb script.
ruby script/play.rb sequences/christmas/flashmob.csv
So what do I do now?
The next step is to add your own tunes using CSV files, these can be added back into the repo, but keep them in a folder, labelled as yours.
- choose a template from sequences/templates
cp sequences/templates/quartet-44-16.csv sequences/myname/mytune.csv
- open your new tune in your favourite csv editor (I recommend libre office, but you could use any spreadsheet program)
- write a tune in there
- Save it (careful to save it as CSV, no matter what they tell you to do)
How do you write a tune?
Look at the CSV reference in the docs, and the command reference.
References (written as I go along) are available in the docs/ directory.
- CSV_REFERENCE.md - How a sequence CSV file is constructed, what the columns mean and the format it expects in them.
- COMMAND_REFERENCE.md - A full list of available commands for the command and event columns.
- MODULE_REFERENCE.md - A reference of what the pd synths are capable of, and what to put in your sequence to control it.
- Andrew Faraday - (www.twitter.com/MarmiteJunction)