Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Version 2.7
October 2002
--- Introduction
The iiwu Xtra integrates the iiwusynth synthesizer into Director.
The iiwusynth software synthesizer has been designed by Peter Hanappe,
and is available under the LGPL licence. It emulates in software the
SoundFont 2.01 Specifications (http://www.soundfont.com) designed by
Creative Labs (SoundBlaster maker). It is basically a small, fast and
robust wavetable synthesizer, with a MIDI-like interface and
integrated sequencer. For more information on the iiwu synthesizer :
http://www.iiwu.org/iiwusynth
The iiwu Xtra has been developped as part of the "infiniteCD Author"
project managed by Antoine Schmitt and Hyptique, with support from the
PRIAM funds from the French government.
For more information on the infiniteCD Author project :
http://www.infiniteCD.org/
http://www.hyptique.com/
http://www.gratin.org/as/
--- Licencing
The Version 2.7 of the iiwu Xtra is beta. Do not distribute without
permission. Eventually, the Xtra will be part of the iiwu project,
and thus will conform to the LGPL licence.
--- Release notes
Version 2.0.1 : first beta version - October 2002
Version 2.0.1 : first beta version - October 2002
Version 2.5 : second beta - November 2002
Version 2.6 : third beta - November 2002
Version 2.7 : fourth beta - November 2002
--- Technical Requirements
OS:
- Macintosh >= MacOS8.6.1 < MacOSX
- Windows >= 95
Director 8.5.1
Sound Card
--- Installation
Drop the folder "iiwuXtraFolder" into the Xtras folder of Director.
------------------- Documentation
----------------- Calls
All function calls are done using lingo's call syntax:
object.func(args...)
or
func(object, args...)
Where object is the instance of the Xtra created with the 'new'
method. All functions return either a value, which can be 0 (zero),
meaning that the function executed without errors, either a negative
number, meaning that an error occurred. If an error occured, the
function 'getError' returns a human-readable string describing the
error.
- Instances
Many instances of the Xtra may coexist at the same time.
Instances are created with the 'new' function, and deleted by assigning
the lingo variable to VOID, as usual for Xtra instances.
- SoundFont file, stack, presets
A SoundFont bank is typically stored in a file, called a SoundFont
file, of extension .sf2. In the following documentation, we will refer
to the SoundFont file or SoundFont bank by the term
'SoundFont'. Please note that the term 'bank' will always refer to a
MIDI bank, not a SoundFont bank.
A SoundFont has a name and contains 'presets'. A preset represents a
way to play a sound, as a combination of sample data and parameters on
how to play it. The preset is the fundamental sound object of the
SoundFont format.
A preset has a name, and is defined uniquely by a MIDI bank number and
a preset number in the bank. The MIDI bank number ranges from 0 to
16383 and the preset number from 0 to 127. Thus a SoundFont file may
contain up to 128x16384=2097152 presets.
SoundFont files may be loaded in the synthesizer, using the
'loadSoundFont' function, thus making its presets available for
playing. A SoundFont may be unloaded using the 'unloadSoundFont'
function.
If more than one SoundFont file is loaded, the SoundFonts are stacked
in the synthesizer : when a preset is requested by the 'programChange'
function, it is looked up in all succcessive SoundFonts, from first to
last, until the preset with the right preset number and bank number is
found. The SoundFont stack may be examined but not changed : the
SoundFonts are stacked in inverse loading order: the last loaded
SoundFont is the first searched.
A special SoundFont is maintained by the synthesizer, corresponding to
user-defined presets, built from user-provided samples. These presets
are defined using the 'loadSample' and 'loadSoundMember'
functions. This user SoundFont is inserted in the SoundFont stack at
the first call of one of these functions. All subsequent calls to one
of these functions will insert the created preset in the same user
SoundFont.
- Channels
According to the MIDI format and protocol, the synthesizer has a fixed
ex : setMasterGain(iiwuObj, 0.5)
Sets the master gain of the synthesizer. By default the gain is 1.0.
The gain should between 0.0 and 2.0.
Gains superior to 1.0 (full volume, no attenuation) should be handled
carefully, as distortion may happen.
Returns an error code (no synth).
------------------ Reverb/Chorus
----------------setReverb(object me)
setReverb(object me, int onOrOff)
----------------ex : setReverb(iiwuObj)
ex : setReverb(iiwuObj, FALSE)
Sets the reverb module of the synthesizer on or off.
Returns an error code (no synth, bad arguments).
getReverb(object me)
----------------ex : revOn = getReverb(iiwuObj)
Return 1 of the reverb module is on (default), 0 if it is off.
Returns an error code (no synth, bad arguments).
setReverbProp(object me, symbol prop, float value)
----------------ex : setReverbProp(iiwuObj, #roomsize, 0.9)
ex : setReverbProp(iiwuObj, #level, 0.2)
Sets the value of a property of the reverb module.
Accepted properties are:
- #level : the level of the reverb (0.0 = no reverb, 1.0 = full reverb).
- #roomsize : the size of the room. 0.0 means a very small room, 1.0 means outer
space.
- #width : the spatial width of the reverb. 0.0 means a very narrow reverb, 1.0
a wide one.
- #damping : how much power is lost at each reverberation. 1.0 : mostly lost, 0.
0 : full reverberation.
All values are between 0.0 and 1.0.
Returns an error code (no synth, bad arguments).
getReverbProp(object me, symbol prop)
----------------ex : roomsiz = getReverbProp(iiwuObj, #roomsize)
#note
#noteon
#noteoff
#allsoundsoff
#allnotesoff
#programchange
#controlchange: includes all controlChange events (pitchbend, modulation,
sustain, pan, volume, reverbsend, chorussend)
- #pitchbend
- #modulation
- #sustain
#pan
#volume
#reverbsend
#chorussend
#callback