To test the Siren set-up and I/O, open the basic configuration/test panel,
[SirenUtility open]
You can see the system configuration and test the MIDI, sound file, and sound IO here.
The SirenUtility and the Workbook are available as menu items in the Launcher's Tools menu.
Setting up the external interfaces
Siren uses several external interfaces (based on the DLLCC framework) for access to external data and I/O. The Smalltalk code for these interfaces is in the category Music-External.
Sound file read/write -- libSndFile -- see http://www.zip.com.au/~erikd/libsndfile
Streaming sound I/O -- PortAudio -- see http://www.portaudio.com
Streaming MIDI I/O -- PortMidi -- see http://www-2.cs.cmu.edu/~music/portmusic
You need to have these libraries installed, and compile and link the DLLCC interface libraries in the subdirectory DLLCC for sound or MIDI I/O to work with Siren. All of this has been tested on Mac OSX only. There are pre-compiled versions of the required libraries on the CSL web site at CREATE; look at http://create.ucsb.edu/CSL.
Testing sound file I/O
This will print diagnostics and a few rows of sample values to the Transcript.
(Edit the file name to point to a valid sound file.)
[LibSndFileInterface example1: 'Data/a.snd']
Testing streaming sound I/O (this will report to the Transcript)
[PortAudioInterface example1]
Testing MIDI I/O
This will open the MIDI driver and play a note; printing messages to the Transcript.
[PortMidiInterface testMIDI]
MIDI/Sound Configuration
Siren''s MIDI support depends on a platform-independent interface class that talks to VM-side primitives that talk to OS-level device drivers. The basic Squeak built-in MIDI can be used, but is limited to toy examples. There are special virtual machine extensions and drivers for the Macintosh and MS-Windows platforms.
Smalltalk Options
There are several configurable parts to Siren.
Class Siren is the general place to find utility messages related to Siren set-up and global variables. Look at its class variables and initialization method.
Several of the voice classes have "default" methods that return a default instance. Look at MIDIVoice default, and Voice default.
Siren looks in default directory for scores and sound files. By default this is called "TestData" and is a sub-folder of the folder where the virtual image is executing. There are methods in class Siren to change this.
Siren House-keeping
To clear out temp. event lists, use,
[SirenUtility flushTempEventLists]
or to flush all,
[SirenUtility flushAllEventLists]
To flush and close down the scheduler,
[Schedule interrupt; flush; release]
To send MIDI all notes off, flush ports, throw away open ports, clear out temp event lists, etc.
[MIDIPort cleanUp]
Check here to see if there's any cruft,
[DependentsFields inspect]