EDIT: MAC OS X Leopard (10.5) has PHP 5.2.x out of the box. If you are using Leopard you can download the scripts (or do a CVS checkout) and ignore the PHP advice below.
Members of the Renoise community are writing some pretty cool PHP scripts that do awesome stuff with the XRNS file format.
http://xrns-php.sourceforge.net/
Unfortunately, there is no GUI for XRNS-PHP on the mac at this time. XRNS-PHP requires PHP 5.2.3 or higher. This is currently not included on OS X 10.4, the default in /usr/bin/php is version 4 which is too old.
All of these factors make it difficult to use for people not familiar with the command prompt. That being said, it’s very easy to learn the command prompt. The amount of time spent making and maintaining the scripts is far greater than the amount of time it takes to learn the command prompt. Blah blah blah, command prompt.
1) OS X 10.4 Tiger users and below, get a PHP5 package:
- http://www.entropy.ch/software/macosx/php/
- http://www.apachefriends.org/en/xampp-macosx.html
- http://www.mamp.info/en/download.html <- I use this one
2) download xrns-scripts (Edit: Currently at version 1.06) and extract in a new folder. Optionally if you have terminal rocking (see below) you can:
cd ~
mkdir xrns-php
cd xrns-php
cvs -z9 -d:pserver:anonymous@xrns-php.cvs.sourceforge.net:/cvsroot/xrns-php co -P xrns-php/scripts/
The first three lines make a folder in your home dir named xrns-php, the fourth line downloads the scripts from CVS. Warning! These are work in progress and probably unstable, use at your own risk. But if you want the latest and greatest, cvs is the way to go.
3) Download the missing third party tools.
- Vorbis Tools for MacOS X : http://www.rarewares.org/ogg-oggenc.php
- FLAC: http://flac.sourceforge.net/
4) Make a directory in your home dir named “bin”, put the files in there, here’s my bin:
[dac514@iMac][~/bin]
[13:46:07]$ pwd
/Users/dac514/bin
[dac514@iMac][~/bin]
[13:46:08]$ ls -al
total 7664
drwxr-xr-x 12 dac514 dac514 408 Aug 26 11:27 .
drwxr-xr-x 25 dac514 dac514 850 Oct 18 18:37 ..
-rw-r--r-- 1 dac514 dac514 12292 Aug 26 11:27 .DS_Store
-rwxr-xr-x 1 dac514 dac514 352348 Feb 14 2007 flac
-rwxr-xr-x 1 dac514 dac514 233376 Feb 14 2007 metaflac
-rwxr-xr-x 1 dac514 dac514 215796 Nov 19 2005 oggdec
-rwxr-xr-x 1 dac514 dac514 1319344 Nov 19 2005 oggenc
-rwxr-xr-x 1 dac514 dac514 199240 Nov 19 2005 ogginfo
-rwxr-xr-x 1 dac514 dac514 727464 Jul 6 00:19 rar
-rwxr-xr-x 1 dac514 dac514 440100 Jul 6 00:19 unrar
-rwxr-xr-x 1 dac514 dac514 182716 Nov 19 2005 vcut
-rwxr-xr-x 1 dac514 dac514 220824 Nov 19 2005 vorbiscomment
[dac514@iMac][~/bin]
[13:46:11]$
5)
Find the Terminal application, this is your command prompt.
Desktop -> Hard Drive -> Applications -> Utilites -> Terminal
Change the preferences so that you are using bash:
Terminal -> Windows Settings
Shell: Should be bash
Color: Change to white on black for 3l1t3 k00l factor
Change the other stuff if you want, too
Click “Use Settings as Defaults”
Click “X”
In Terminal, type:
cd ~
pico -w .bash_profile
Pay attention to the dot at the start of the file name, this means “hidden file”. If not already there, paste the following into pico.
if [-f ~/.bashrc]; then
source ~/.bashrc
fi
Press CTRL-X, look at the bottom, agree to save.
In Terminal, type:
whoami
Remember this value, write it down somewhere if you have poor memory.
cd ~
pico -w .bashrc
Again, pay attention to the dot at the start of the file name, this still means “hidden file”. Paste the following into pico:
# COLOURS
TEMP="\[\033[1;30m\]"
BLACK="\[\033[0;30m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
ORANGE="\[\033[0;33m\]"
BLUE="\[\033[0;34m\]"
PURPLE="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"
LIGHT_GRAY="\[\033[0;37m\]"
LIGHT_BLACK="\[\033[1;30m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
YELLOW="\[\033[1;33m\]"
LIGHT_BLUE="\[\033[1;34m\]"
LIGHT_PINK="\[\033[1;35m\]"
LIGHT_CYAN="\[\033[1;36m\]"
WHITE="\[\033[1;37m\]"
NO_COLOUR="\[\033[0m\]"
BLUE_BG="\[\033[0;44m\]"
# PROMPT
PS1="$LIGHT_BLUE[$WHITE\u$NO_COLOUR@$LIGHT_GREEN\h$LIGHT_BLUE][$WHITE\w$LIGHT_BLUE]\n$LIGHT_BLUE[$WHITE\t$LIGHT_BLUE]$NO_COLOUR\$ "
#PATH
export PATH="$PATH:/Users/dac514/bin/:/Applications/MAMP/bin/php5/bin/"
# ALIASES
alias "ls"="ls -G"
alias "dir"="ls -alG"
# OS X 10.4 Tiger and below
alias php=/Applications/MAMP/bin/php5/bin/php
alias pear=/Applications/MAMP/bin/php5/bin/pear
Look above, replace all the “dac514” with the result you got when you did whoami
just before. Replace the paths with the whatever version of PHP you downloaded.
Exit terminal.
Start terminal again.
6) go to command line and navigate to the xrns-scripts folder i.e. cd ~/xrns-php
without the backticks.
7) launch script with
(/path/to)php -n script_name.php /path/to/input.ext (/path/to/)output.ext
Where (/path/to) is optional i.e. you don’t have to type it and if you do lose the parenthesis. Where script_name.php is the actual file name of a script. Some scripts have extra options. Open the script in a text editor to read which parameters it expects when running it from the command-line.
Cool OS X text editors:
http://smultron.sourceforge.net/
http://www.jedit.org/
http://www.eng.hawaii.edu/Tutor/vi.html
http://www.gnu.org/software/emacs/
Command prompt tutorials:
http://www.hypexr.org/bash_tutorial.php
http://www.macdevcenter.com/pub/a/mac/2005…/terminal1.html
http://www.oreilly.com/pub/a/mac/2005/06/14/terminal2.html
http://www.macdevcenter.com/pub/a/mac/2005…/terminal3.html
http://www.macdevcenter.com/pub/a/mac/2005…/terminal4.html
http://www.macdevcenter.com/pub/a/mac/2005…/terminal5.html
Although I’m snarky and sardonic, provided you actually made some effort and aren’t a lazy pile of tard, I’m more than willing to help, so post questions here. Who knows, maybe you could start writing your own scripts and be part of the kingdom of nerds!