a more or less open-source aproach to working with GPS sensors using OS X

For this part of the workshop we are going to work with some open-source software and have a look (or a quick glance) at
how a unix system like os x provides a facility for working with this kind of software.

Wikipedia on open-source software

What we are going to do:

During this exercise, we will mostly work with the Terminal. You can find it under Applications -> Utilities -> Terminal

The terminal is a text interface for working with the operating system as opposed to the clicking on the object that the slick OS X "Aqua" surface provides..

 

1. Some things to install first....

2.Downloading and Installing GPSD

GPSD is an open-source program that provides an interface for getting data from the GPS for use in self-made programs.

So we have uncompressed the GPSD directory. It contains all the files that we need to compile the gpsd program. This is how you do it:

The reason why we are using sudo is that in order compile a program you need more permissions than the average user. Sudo gives you the administrator permissions.

if everything worked out, we can now connect the GPS and check if the program functions...

if it did not compile for some weird reason, you can download the folder with the compiled gpsd here: gpsd_compiled.tar.gz running this one on a mac should work.

3. DOWNLOADING AND INSTALLING THE BINARY VERSION OF PureData (PD)

Point your browser to

Download: Pd version 0.37-2 compiled for Macintosh. You might also need Tcl/TK for Macintosh OSX .

check in /Library/Frameworks if there is anything like tk.framework and/or tcl.framework (if no, you have to download Tcl/TK. To install, doubleclick the .mpkg package and follow the instructions)

now you should be ready to run pd:

in a Shell (Terminal) type: /Applications/pd-0.37-2/bin/pd

or: you can just click the pd file in /Applications/pd-0.37-2/bin/pd

 

Simple PD examples (download patches & php files here php_pd.tar.gz)

triggering sounds with a delay:

To test sending data to a pd patch test it: echo 'one 1;' | /Applications/pd-0.37-2/bin/pdsend 2345

subpatch: pd gives you the possibility to use an instance of another patch.

in this case the subpatch is the attack_release.pd file.

 

4. Making a PHP script to connect PD and GPSD

The way to learn PHP: look up functions on www.php.net and somehow put together a script that works.