This page provides installation instructions for Strasheela, a constraint-based computer aided composition environment. To install Strasheela on either Linux, Windows, or MacOS X conduct the following installation steps.
On Linux it is is probably already there.
The Emacs pre-installed by MacOS X is less suitable, due to its missing graphical interface. A highly recommended alternative is Aquamacs. Alternatively, there are also the Carbon Emacs Package and Emacs on Aqua. Note: Emacs on Aqua is only suitable for pre-10.4 Macs (based on Emacs version 20.7 instead of 21.* or 22.*).
For Windows, follow the instructions in the Mozart Installation Manual on Obtaining and Installing GNU Emacs. The Emacs installer provided at the Mozart site is already dated, check out the GNU Emacs FAQ For Windows for a more recent version: Where can I get precompiled versions?.
Simply get a package ready to install from the Download Mozart page. In case of troubles or for compiling from source consult the Mozart Installation Manual. Additional help can be found here (in particular for installing Mozart on Intel Macs). A usual Windows problem is that Mozart does not find Emacs if it has to be invoked with a different name (e.g., runemacs.exe as the Win-Emacs-Version recommended above). In that case, set the environment variable OZEMACS to the path of your Emacs application (e.g., C:\Program Files\emacs-22.1\bin\runemacs.exe) as described here.
After successfully installing Mozart, you may want to test the installation. At a commandline (a terminal or a DOS box) type oz. This starts the Oz Programming Interface (OPI), which runs inside Emacs. The initial window is split in two text buffers (Oz and *Oz Compiler*). In the upper buffer type the following.
{Browse hello}
Select this text line with the mouse, then go to the Oz menu and select 'Feed Region'. This feeds the selected code to the system (i.e. executes it): it opens a window called Oz Browser which shows 'hello'.
Strasheela offers two archive files for download: strasheela-$VERSION.tar.gz and strasheela-withSounds-$VERSION.tar.gz (e.g., strasheela-0.9.tar.gz). Both files are identical, except that all sound files of the documentation are only contained in the bigger archive strasheela-withSounds-$VERSION.tar.gz. So, for running Strasheela the files don't make any difference. If you have a network connection where you can always access the Strasheela documentation online, then the archive file without the sounds is sufficient.
On a UNIX-like system (i.e. Linux or MacOS), for compiling and installing Strasheela with all its extensions open a shell, move into Strasheela/scripts1 and run
./install-all.sh
This script outputs a number of warnings, most of them of the form binding analysis warning: local variable Browse used only once. You can savely ignore all these warnings (I left them in as it slightly simplifies debugging for me..).
In case you later somehow changed Strasheela2 and want to update the installation then run (again in the folder Strasheela/scripts)
./update-all.sh
An alternative method installs the core of Strasheela (in Strasheela) and each of its extensions (in Strasheela/contributions/*/*) separately. This method also works on MS Windows. It uses ozmake, a tool for installing Mozart packages (the above mentioned scripts internally call ozmake as well).
Open a shell (or a DOS promt) and move into the directory Strasheela/contributions/tmp/Path/. Then type
ozmake --install
On Windows, you may need to enter ozmake.exe. Alternatively, you may use drag and drop. For example, you may drag the ozmake application (which can be found in the bin directory of your Mozart installation) and drop it into the DOS promt in order to enter its full path. You can also enter the path of the directory with drag and drop. Then, move into the top-level Strasheela directory and call ozmake again. Continue likewise with all Strasheela constributions you want to install in Strasheela/contributions/ (e.g., Strasheela/contributions/anders/Pattern).
The steps above result only in a bare-bones Strasheela installation which is of limited practical use. The following installation steps bring Strasheela to life (e.g. they are essential for hearing Strasheela output). The examples provided with Strasheela assume that all the following installation steps have been conducted.
This section discusses how to update from an old to a new Strasheela version. In case your old Strasheela source folder contains no personal files, you can simply replace your old folder with the new one. If your old folder contains personal files (e.g., personal contributions), then you better first copy them to the new Strasheela version :)
If you are on UNIX, you then upgrade simply by running the script Strasheela/scripts/upgrade-all.sh. On Windows, you have to call ozmake manually, like during your first Strasheela installation. In a DOS window, move into the Strasheela top-level dictionary and enter the following.
ozmake --upgrade
Then repeat this command in every Strasheela contribution directory.
You will usually want to load Strasheela automatically whenever you start Oz. For this purpose, please edit the Oz initialisation file. Strasheela provides the initialisation file template Strasheela/_ozrc, edit this template file according to your system.3 A special template Strasheela/_WindowsOZRC is provided for Windows which demonstrates how Windows pathes are entered (this template still requires editing according to your system).
Several settings in the initialisation file templates depend on the software for which Strasheela supports an output format (see below).
Please leave all paths starting with x-ozlib:// untouched. These are platform-independent paths, which don't require any changes. Also, you better don't change any code, unless you know what you are doing :)
On Linux and MacOS X, you can save your initialisation file as ~/.ozrc or ~/.oz/ozrc (for Mac users unfamiliar with UNIX conventions: ~ indicates your home directory, e.g., /Users/yourself). On Windows, it is easiest to set the environment variable OZRC to the path of your initialisation file. A description how to manage environment variables on MS Windows XP can be found here.
Also, you may want to add the Oz applications (e.g., the Strasheela tutorial) to your PATH environment variable, so that you can call them directly at the commandline. For example, on MacOS or Linux add the following line to your ~/.profile file. You may need to replace 1.3.2 with the mozart version you are using (just check how your subdirectory of ~/.oz is called).
export PATH=~/.oz/1.3.2/bin/:$PATH
You can test your setting by executing the following at the commmand line (first logout/login again or at least open a new terminal).
StrasheelaTutorial
Strasheela exports its scores into various formats, for instance, to produce sheet music or sound output.
A number of output formats are already predefined. Most formats are supported by all Strasheela platforms (e.g. Linux, MacOS X, and Windows). Because, output formats are relatively easy to define, further output formats will be added later (or can be defined by the user).
sndplay on Linux) or some sound editor (e.g. Audacity).Some Strasheela extensions make use of Oz functionality which is not part of plain Oz itself.
For instance, the following examples in the examples folder rely on selection constraints (e.g. via Strasheela's harmony model): 04-AutomaticMelodyHarmonsation.oz, 05-MicrotonalChordProgression.oz, 07-Harmonised-L-system.oz.
Please note that you need a C++ compiler in order to install these constraints. The GNU C++ compiler is usually already installed on Linux. On MacOS X, install Apple's developer tool Xcode (available either from your MacOS installation CDs, or from here if this online version is newer). On Windows, you may consider installing this compiler under Cygwin. You can install the selection constraints by typing
ozmake --install --package=http://www.mozart-oz.org/mogul/populate/duchier/select/duchier-select__1.3.0__source__1.8.pkg
NB: Unfortunately, it has been found that on Mozart 1.3.2 ozmake hangs when invoking the GNU compiler on Windows.4
IOzSeF provides search engines which can solve complex constraint problems more efficiently. For example, all IOzSeF solvers support adaptive recomputation — a technique saving memory (see Programming Constraint Services).
Strasheela integrates IOzSeF for convenient score search (see SDistro). You can install IOzSeF by typing
ozmake --install --package=mogul:/tack/TkTreeWidget ozmake --install --package=mogul:/tack/iozsef
We highly welcome contributors of packages which simplify the Strasheela installation. For example, RPM files for SUSE Linux can be found here (thank you Toni!).
Strasheela tries to simplify the package creation process. The above-mentioned script install-all supports all options of ozmake. For exammple, you can specify an installation directory with the option --prefix (default ~/.oz). The Strasheela functors are installed in <PREFIX>/cache/x-ozlib (most stuff goes into /cache/x-ozlib/anders/strasheela/, but there are additional folders created for user contributions). Mozart must find these installed files. For a 'global' installation, you may give the Mozart installation directory $OZHOME as prefix (recommended). Any other directory is possible as well, but then you must tell Mozart to search in this directory by setting the environment variable $OZLOAD (or OZ_SEARCH_LOAD) to a suitable value. For example, if Mozart should first look into the user's home directory, then into some folder given as prefix to ozmake during the Strasheela installation, and finally into the Mozart installation folder you specify the following.
OZLOAD=cache=${HOME}/.oz/cache:cache=$(MYNEWCACHE):cache=$(OZHOME)/cache
Per default, Mozart first searches in the home directory, and then in the Mozart installation folder — which means that the user can shadow files installed in the Mozart installation folder.
Strasheela applications (e.g., the interactive StrasheelaTutorial and the OzServer) are per default installed in <PREFIX>/bin. This can be changed with the install-all.sh option --bindir. You may want to add this directory to the PATH environment variable. However, these applications should always be started from the commandline (as feedback is given at stdout / stderr): if you want to add a menu entry for the StrasheelaTutorial, please run them in a terminal nevertheless. BTW: OzServer on the other hand usually requires commandline parameters (e.g., a port number) and is therefore less suited for a menu entry.
In case you are building your package in a chroot (e.g., to model some specific target system which differs from your running system), then some additional configuration is necessary. The ozmake calls by the script install-all.sh must find the compiled *.ozf files during the installation process. So, for the build process please specify your build root for Mozart via the environment variable $OZLOAD (see above), for example, as following (thanks to Toni Graffy for pointing this out).
export INSTALLDIR=/usr/local # your installation prefix export BUILDROOT=/var/tmp/strasheela # your build root export PATH=$INSTALLDIR/mozart/bin:$PATH # adding the mozart executables export OZHOME=$INSTALLDIR/mozart # NB: include BUILDROOT in OZLOAD export OZLOAD=cache=${BUILDROOT}$OZHOME/cache:cache=$OZHOME/cache scripts/install-all.sh \ --prefix=${BUILDROOT}${INSTALLDIR}/mozart \ --bindir=${BUILDROOT}${INSTALLDIR}/mozart/bin
The Strasheela documentation (scattered across the Strasheela source files..) is not installed automatically. However, it can be extracted from the source with the script extract-doc.sh in Strasheela's scripts directory.
Strasheela provides output to various formats, and therefore relies on other applications. Please add dependencies to Csound, midicsv, Lilypond, a sound file player, a midi file player, and a pdf file viewer. Also, make sure that you edit the provided OZRC template file appropriatedly according to your target system, before you save it as Oz initialisation file. In particular, in this initialisation file set the Strasheela environment variables (using Init.putStrasheelaEnv, see the template) to the right values where output files will be stored, where you installed applications like Csound, midicsv, Lilypond, and the player/viewer for sound/midi/pdf files, and possibly their right flags. Make sure that you set the operating system environment variable $OZRC to point to the (edited) global initialisation file. If a user later wants to add private settings, she can change the value of $OZRC for her account.
In case of any questions concerning packaging Strasheela, please to not hestitate to ask via email (e.g., on the Strasheela mailing list).
If you report your Strasheela package, then I am most happy to announce it at the Strasheela website (together with acknowledgments of course).
Have fun with Strasheela!
1. The folder Strasheela/ denotes the relative path of the Strasheela source on your system.
2. For example, you added your own extensions in the folder Strasheela/contributions/yourName/yourContribution together with a corresponding makefile.oz in that folder (cf. ozmake, or simply copy and edit the makefile.oz of one of the already existing contributions).
3. You can load Strasheela manually as well by manually feeding the (edited) content of _ozrc to Oz.
4. See http://www.ps.uni-sb.de/pipermail/mozart-users/2006/015298.html. Nevertheless, the selection constraints have been installed successfully on Windows with earlier Mozart versions (cf. the installation of the XMG - eXtensible MetaGrammar).