Class: MusicMagnitude
Environment: Siren
Instances of the subclasses of MusicMagnitude are used to represent scalar magnitudes in musical objects. The class MusicMagnitude is a place for the music magnitudes to share their state and basic accessing behavior.
MusicMagnitudes generally implement precise mixed-mode arithmetic and comparison methods using a per-species generality table and auto-coercion within a species.
The "type abstraction" classes (Duration, Pitch, Amplitude, etc.) represent "what"; they are never instantiated; their class creation methods answer instances of their species, but they manage coercion within the classes of their species. The "representational abstraction" classes (NominalMagnitude, OrdinalMagnitude, NumericalMagnitude, RatioMagnitude, etc.) represent "how"; they share value model semantics and coercion techniques. Note that the concrete implementation classes therefore answer their species by property model rather than by implementation subclass (i.e., HertzPitch species --> Pitch rather than NumericalMagnitude).
MusicMagnitudes can have dependents (observers), and send themselves the changed: message when their values are changed.
There are many examples in the implementation classes and the Siren outline.
Instance variables:
accessing
value
value
Answer the instance variable 'value'.
value: theValue
Accept the argument, 'theValue', as the new instance variable 'value'
and signal any dependents.
printing
Print the receiver on the argument as a MM declaration.
printOn: aStream parens: useParens
Print the receiver on the argument as a MM declaration.
printString
Answer a String whose characters are a description of the receiver.
printStringParens: bool
Answer a String whose characters are a description of the receiver.
printValue
storeOn: aStream
Store the receiver on the argument as a MM declaration.
units
Answer the units string of the receiver.
private
Answer MusicMagnitude.
converting
If I am involved in arithmetic with a number, convert me to a number.
coerceTo: type
Coerce the receiver to the given class and answer a new object.
ddMsgName
Answer the selector to be used in coercing double-dispatching messages.
msec
Answer a MSecondDuration.
usec
Answer a MSecondDuration.
testing
Answer whether the receiver has an immediate representation.
isMusicMagnitude
Answer true for the receiver and all subsclasses.
arithmetic
Answer the product of the receiver and the argument
+ aValue
Answer the sum of the receiver and the argument, doing generality-based
class coercion within a species using auto-generated coercion messages.
- aValue
Answer the difference of the receiver and the argument
/ aValue
Answer the quotient of the receiver and the argument
comparing
Answer whether the receiver is less than the argument
= aValue
Answer whether the receiver and the argument are equal.
hash
Answer a SmallInteger unique to the receiver.
MetaClass: MusicMagnitude class
instance creation
Answer and instance with the argument as its value.
class constants
Answer the default color to display instances with (hack for making pretty graphs).
propertyName
Answer the receiver class's default property name.
relativeMember
Answer the receiver class's species member used as a relative magnitude.
Class: PField
Instance variables:
Examples:
accessing
Superclass: Siren.MusicMagnitude
Category: Music-Models-Representation
Instance variables: name field
field
name
PField field: 5 value: 0.7 name: #position
PField field: 9 value: 'legato' name: #expression
Answer the instance variable 'field'.
field: theNumber
Accept the argument, 'theNumber', as the new instance nariable 'field'.
name
Answer the instance variable 'name'.
name: theName
Accept the argument, 'theName', as the new instance nariable 'name'.
MetaClass: PField class
instance creation
Answer an initialized instance.
field: aNumber value: aValue name: aName
Answer an initialized instance.
Class: MusicModel
See the class methods for generality.
Class inst Vars:
generality
Superclass: Siren.MusicMagnitude
Category: Music-Models-Representation
Class instance variables: generalityTable
generalityTable
Answer the class inst var for the generality table.
generalize: aMag and: otherMag
Answer an array of the two arguments with the most general first.
examples
Pitch generalize: (#c pitch) and: (21 key)
Class: Positus
Examples:
See also the class example.
instance creation
Superclass: Siren.MusicModel
Category: Music-Models-Representation
Instances of its subclass species are used to model spatial and positional values.
Superclass: Siren.Positus
Category: Music-Models-Representation
This class can be used as a concrete one (adding a few methods to fill it out), or like the other representational classes (making concrete classes of this species).
In the later case, the value instance variable would hold a 1- or 2-dimensional position as a number or point.
Superclass: Siren.MusicModel
Category: Music-Models-Representation
Instances of its subclass species are used to model loudness values.
Superclass: Siren.Positus
Category: Music-Models-Representation
This class can be used as a concrete one (adding a few methods to fill it out), or like the other representational classes (making concrete classes of this species).
In the later case, the value instance variable would hold a record with the geometry or the room, the positions of default sources, and the listener's position and features.
Superclass: Siren.Ergon
Category: Music-Models-Representation
Amplitudes come in several flavors, as in the classes RatioMagnitude, MIDIVelocity and SymbolicLoudness.
The class Amplitude is abstract, its class creation method answers an instance of a concrete Amplitude/Loudness class.
Amplitude value: 0.77 "create a ratio instance - range 0.0 to 1.0 (cmusic)"
Amplitude value: 77 "create an MIDI instance - range 0 to 127"
Amplitude value: #mp "create a symbolic instance - range #ppp to #fff"
Answer a new instance of a member of my species.
class constants
Answer the default color to display instances with.
initialize
Set up the class inst var, a generality table.
initializeGenerality
Set up the class inst var, a generality table.
mostGeneral
Answer the most general-purpose duration--relative
propertyName
Answer the receiver class's default property name.
relativeMember
Answer the receiver class's species member used as a relative magnitude.
species
Answer Amplitude.
examples
Print a simple message to the transcript demonstrating the various types.
Class: Position
Examples:
Note that new pitch representations such as music11-like pch (4.11 = 11th note in oct 4) or oct (4.1100 = oct4 + 1100 cts) notations can be added by overriding the float-to-Hz or float-to-midi conversions.
See also the class example.
instance creation
Superclass: Siren.Positus
Category: Music-Models-Representation
This class can be used as a concrete one (adding a few methods to fill it out), or like the other representational classes (making concrete classes of this species).
In the later case, the value instance variable could hold a number or point.
Superclass: Siren.MusicModel
Category: Music-Models-Representation
Instances of its subclass species are used to model pitches, gamut members, and frequencies.
Superclass: Siren.Chroma
Category: Music-Models-Representation
Pitches come in several flavors, as in the classes HertzPitch, RatioPitch, MIDIPitch and SymbolicPitch.
The class Pitch is abstract, its class creation method answers an instance of a concrete Pitch class.
Pitch value: 440.0 "create an instance with units of Hertz"
Pitch value: 77 "create an instance with units of MIDI key numbers"
Pitch value: #e4 "create a symbolic instance"
Pitch value: 'e4' "same as using a symbol"
Pitch value: 4/3 "create a ratio instance"
Answer a new instance of a member of my species.
class constants
Answer the default color to display instances with.
initialize
Set up the class inst var, a generality table.
initializeGenerality
Set up the class inst var, a generality table.
mostGeneral
Answer the most general-purpose duration--Hertz
propertyName
Answer the receiver class's default property name.
relativeMember
Answer the receiver class's species member used as a relative magnitude.
species
Answer Pitch.
examples
Print a simple message to the transcript demonstrating the various types.
exampleAdC
Pitch exampleAdC
Class: Chronos
Examples:
See also the class example.
instance creation
Superclass: Siren.MusicModel
Category: Music-Models-Representation
Instances of its subclass species are used to model times, durations and metronomes.
Superclass: Siren.Chronos
Category: Music-Models-Representation
Durations come in several flavors, as in the classes RatioDuration, MSecondDuration and ConditionalDuration.
The class Duration is abstract, its class creation method answers an instance of a concrete Duration class.
Duration value: 0.77 "create an instance with seconds as the unit"
Duration value: 770 "create an instance with milliseconds as the unit"
Duration value: 1/4 "create an instance with beats as the unit"
Duration value: [ :x | x > 4] "create an instance for: 'until x > 4'"
Answer a new instance of a member of my species.
class constants
Answer the default color to display instances with.
initialize
Set up the class inst var, a generality table.
initializeGeneralities
Set up the class inst var, a generality table.
mostGeneral
Answer the most general-purpose duration--seconds
propertyName
Answer the receiver class's default property name.
relativeMember
Answer the receiver class's species member used as a relative magnitude.
species
Answer Duration.
examples
Print a simple message to the transcript demonstrating the various types.
Class: Meter
Each subclass may decide whether instances or the class will hold the table of relationships.
See the subclass' class examples.
Instance Variable:
Class Instance Variable:
accessing
Superclass: Siren.Chronos
Category: Music-Models-Representation
This class can be used as a concrete one (adding a few methods to fill it out), or like the other representational classes (making concrete classes of this species).
In the later case, the value instance variable could hold a number, process or block.
Superclass: Siren.Chroma
Category: Music-Models-Representation
This class can be used as a concrete one (adding a few methods to fill it out), or like the other representational classes (making concrete classes of this species).
In the later case, the value instance variable could hold a number or pitch, and the mode or gamut could be shared.Music-Models-Implementation
Superclass: Siren.MusicMagnitude
Category: Music-Models-Implementation
Instance variables: table
Class instance variables: Table
They use the instance or class instance tables for holding comparative relationships among instances (e.g., mag1 might know that it's > mag2).
The relation-setting (i.e., order assignment) messages are: ==, >>, <<, =<, and =>.
The query messages are: =?, > < <=, and >=.
The decision should be made on the basis of the expected number of magnitude instances and the sparseness of their relationships.
table
Table
Answer a SmallInteger unique to the receiver. Essential. See
Object documentation whatIsAPrimitive.
table
Answer the receiver's loop-up table--its or the class'.
value
Signal an error.
value: theValue
Signal an error.
initialize-release
Release the receiver's table.
printing
Print the receiver as an ordinal magnitude.
converting
Answer that it is an error to attempt coercion with ordinal magnitudes.
ordering
Answer whether the receiver is less than the argument.
<< anotherOMag
Specify that the receiver is less than the argument.
<= anotherOMag
Answer whether the receiver is less than or equal to the argument.
=< anotherOMag
Specify that the receiver is less than or equal to the argument.
== anotherOMag
Specify that the receiver is equal to the argument.
=> anotherOMag
Specify that the receiver is greater than or equal to the argument.
=? anotherOMag
Answer whether the receiver is equal to the argument.
> anotherOMag
Answer whether the receiver is greater than the argument.
>= anotherOMag
Answer whether the receiver is greater than or equal to the argument.
>> anotherOMag
Specify that the receiver is greater than the argument.
arithmetic
Answer that it is an error to attempt arithmetic with ordinal magnitudes.
+ aValue
Answer that it is an error to attempt arithmetic with ordinal magnitudes.
- aValue
Answer that it is an error to attempt arithmetic with ordinal magnitudes.
/ aValue
Answer that it is an error to attempt arithmetic with ordinal magnitudes.
= aValue
Answer whether the receiver and the argument are equivalent.
MetaClass: OrdinalMagnitude class
table access
Answer the class' instance look-up table.
values
Answer the sorted values.
instance creation
Answer a new instance and, if it's in use, add it to the table.
value: aValue
Answer an instance
class initialization
Release the shared class table and all instances.
useTable
Set up a shared class table for all instances.
Class: NumericalMagnitude
One may want to add range-checking for these cases.
Note that the class NumericalMagnitude is vacuous at present, and exists solely for representational modeling.
double dispatching
Superclass: Siren.MusicMagnitude
Category: Music-Models-Implementation
When the values are floating-point numbers, the range is often 0.0 to 1.0.
Integer ranges such as 0 to 127 can also be used in subclasses.
adaptToInteger
MetaClass: NumericalMagnitude class
printing
Superclass: Siren.NumericalMagnitude
Category: Music-Models-Implementation
This is the most general Pitch representation.
The value is assumed to be a floating-point number.
Print the receiver as a pitch string in Hertz.
units
Answer the units string of the receiver.
private
Answer Pitch.
converting
Assuming value is a frequency, Answer a fractional key number
asFracSymbol
Assuming value is a frequency, answer a symbolic note name
asHertz
Answer a HertzPitch.
asHz
Answer a HertzPitch.
asMIDI
Assuming value is a frequency, Answer a key number
asSymbol
Assuming value is a frequency, answer a symbolic note name
MetaClass: HertzPitch class
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: RatioMagnitude
Instance Variable:
accessing
Superclass: Siren.NumericalMagnitude
Category: Music-Models-Implementation
Instance variables: relative
relative
Answer the receiver's value mapped to the receiver.
value
Answer the receiver's value mapped to the receiver.
converting
Answer self.
map
Apply the receivers reference.
relativeTo: aRelative
Set the receivers reference.
MetaClass: RatioMagnitude class
instance creation
Answer and instance with the argument as its value.
Class: RatioPitch
private
Superclass: Siren.RatioMagnitude
Category: Music-Models-Implementation
They can be transformed into other values (e.g., note names or key numbers), but often at a loss of accuracy if they are not well-tempered.
Answer Pitch.
printing
Print the receiver as a ratio.
converting
return a RatioPitch as a fractional MIDINote.
asFracSymbol
Assuming value is a ratio, answer a symbolic note name
asHertz
Answer a HertzPitch.
asMIDI
return a RatioPitch as a MIDINote (rounded).
asSymbol
Assuming value is a ratio, answer a symbolic note name
mostGeneral
Answer the most numerically meaningful version of the receiver.
MetaClass: RatioPitch class
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: RatioLoudness
private
Superclass: Siren.RatioMagnitude
Category: Music-Models-Implementation
Answer Amplitude.
printing
Print the receiver as a ratio.
converting
Answer a dB loudness; ratio 1 = 0dB, ratio 0.5 = -6dB, etc.
asMIDI
Answer a MIDI key velocity (0 to 127)
asSymbol
Answer a symbolic dynamic.
MetaClass: RatioLoudness class
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: IntervalMagnitude
accessing
Superclass: Siren.NumericalMagnitude
Category: Music-Models-Implementation
Class instance variables: range
Accept theValue, as the new instance variable 'value' -- perform range-checking
MetaClass: IntervalMagnitude class
class inst var access
Answer the class' range.
range: anInterval
Set the class' range.
Class: ConditionalDuration
See the class examples.
updating
Superclass: Siren.MusicMagnitude
Category: Music-Models-Implementation
The accessing protocol allows them to be spawned as co-processes in schedulers.
The valueAt: and waitUntil: methods allow flexible conditional scheduling.
ConditionalDurations can be made dependents of other objects using the until: instance creation message.
Respond to a change in the receiver's model
accessing
Answer the result of passing the argument to the receiver's block.
wait
Cycle the receiver until the argument fulfills the receiver's block.
waitUntil: anArg
Cycle the receiver until the argument fulfills the receiver's block.
private
Answer Duration.
converting
It is an error to try this here--we implement what's ok for CDs
arithmetic
Answer that it is an error to attempt arithmetic with this magnitude.
+ aDuration
Answer the sum of the receiver and the argument--the composition of two blocks
- aValue
Answer that it is an error to attempt arithmetic with this magnitude.
/ aValue
Answer that it is an error to attempt arithmetic with this magnitude.
MetaClass: ConditionalDuration class
instance creation
Answer a new conditional duration whose value is the given block
randomBetween: lo and: hi
Answer a new conditional duration whose value is between lo and hi (given in seconds)
until: boolBlock
Answer a new conditional duration whose value is the given block
examples
Print a simple message to the transcript demonstrating the various types.
exampleWithRands
Demonstrate the random duration
Class: Length
See the class examples.
private
Superclass: Siren.OrdinalMagnitude
Category: Music-Models-Implementation
The instance variable tables are used for the name -> relation symbol map.
Answer Duration.
MetaClass: Length class
examples
Demonstrate the use of an OrdinalMagnitude with a scale of length.
Class: NominalMagnitude
Class Instance Variable:
class instance variables
Superclass: Siren.MusicMagnitude
Category: Music-Models-Implementation
Class instance variables: NameMap
Examples are pitch (#d4) or dynamic (#mp) names.
NameMap
Answer the class instance variable NameMap.
Class: SymbolicLoudness
The class instance variable NameMap is used for the name <--> MIDI velocity range (0 to 127) mapping dictionary.
printing
Superclass: Siren.NominalMagnitude
Category: Music-Models-Implementation
Print the receiver as a symbolic amplitude.
units
Answer the units string of the receiver.
private
Answer Amplitude.
converting
Answer a dB loudness; ratio 1 = 0dB, ratio 0.5 = -6dB, etc.
asMIDI
Answer a MIDIVelocity.
asRatio
Answer a RatioLoudness.
asSymbol
Answer a SymbolicLoudness.
mostGeneral
Answer the most numerically meaningful version of the receiver.
MetaClass: SymbolicLoudness class
class initialization
Set up the class dynamic mapping dictionary
instance creation
Assuming value is a key velocity, answer a symbolic loudness name
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: Sharpness
See the class examples.
private
Superclass: Siren.OrdinalMagnitude
Category: Music-Models-Implementation
The instance variable tables are used for the name -> relation symbol map.
Answer Pitch.
MetaClass: Sharpness class
examples
Demonstrate the use of an OrdinalMagnitude with a scale of sharpness.
Class: MIDIPitch
The translation key <--> Hz. is done with the logarithm or 27.5 Hz. (very low A = 440/16).
Note that AdC's additions make fractional MIDI pitches possible, whereby the first 2 digits to the right of the decimal point signify pitch cents. There are coercion methods such as asFracMIDI for handling microtonal MIDI pitches.
printing
Superclass: Siren.IntervalMagnitude
Category: Music-Models-Implementation
Answer the units string of the receiver.
private
Answer Pitch.
converting
Answer a fractionalMIDIPitch (or integer if value is no fraction).
asFracSymbol
Assuming value is a key number, answer a symbolic pitch name
asHertz
Assuming value is a key number, answer a frequency
asHz
Assuming value is a key number, answer a frequency
asMIDI
Answer a MIDIPitch.
asSymbol
Assuming value is a key number, answer a symbolic pitch name
mostGeneral
Answer the most numerically meaningful version of the receiver.
MetaClass: MIDIPitch class
class initialization
Initialize the class instance variable.
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: DBLoudness
printing
Superclass: Siren.RatioLoudness
Category: Music-Models-Implementation
Answer the units string of the receiver.
double dispatch
Subtract the argument from the receiver after turning both into db.
differenceFromVelocity: aDyn
Subtract the argument from the receiver after turning both into db.
productFromDynamic: aDyn
Multiply the argument by the receiver after turning both into db.
productFromVelocity: aDyn
Multiply the argument by the receiver after turning both into db.
quotientFromDynamic: aDyn
Divide the argument by the receiver after turning both into db.
quotientFromVelocity: aDyn
Divide the argument by the receiver after turning both into db.
sumFromDynamic: aDyn
Add the argument to the receiver after turning both into db.
private
Answer Amplitude.
converting
Answer a MIDI key velocity (0 to 127)
asRatio
Answer the receiver as a ratio between 0 and 1.
positiveDB
Answer the zero-based positive dB value of the receiver.
MetaClass: DBLoudness class
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: RatioDuration
printing
Superclass: Siren.RatioMagnitude
Category: Music-Models-Implementation
They can be expanded into msec. relative to some given event (a whole note), or use the default tempo of 1 sec.
Print the receiver as a fractional duration.
units
Answer the units string of the receiver.
private
Answer Duration.
double dispatching
Answer a MM whose value is the argument over the receiver's value.
converting
Answer a MSecondDuration.
asMsec
Answer a MSecondDuration.
asSec
Answer a SecondDuration.
asUsec
Answer a USecondDuration.
asUseconds
Answer a USecondDuration.
mostGeneral
Answer the most numerically meaningful version of the receiver.
MetaClass: RatioDuration class
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: SecondDuration
printing
Superclass: Siren.NumericalMagnitude
Category: Music-Models-Implementation
This is among the most general duration time representations.
Print the receiver on the argument as a MM declaration.
units
Answer the units string of the receiver.
process delay
Delay for a time corresponding to the receiver
private
Answer the receiver in seconds.
species
Answer Duration.
converting
Answer a float of seconds.
asBeat
Answer a RatioDuration.
asMS
Answer a MSecondDuration.
asMsec
Answer a MSecondDuration.
asMseconds
Answer a MSecondDuration.
asRatio
Answer a RatioDuration.
asSec
Answer a float of seconds.
asSeconds
Answer a float of seconds.
asUsec
Answer a USecondDuration.
asUseconds
Answer an int of micro seconds.
MetaClass: SecondDuration class
-- all --
Answer the selector to be used in coercing double-dispatching messages.
Class: MSecondDuration
printing
Superclass: Siren.SecondDuration
Category: Music-Models-Implementation
Answer the units string of the receiver.
converting
Answer a MSecondDuration.
asSeconds
Answer a float of seconds.
asUseconds
Answer a float of micro seconds.
MetaClass: MSecondDuration class
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: USecondDuration
printing
Superclass: Siren.SecondDuration
Category: Music-Models-Implementation
This is the default time representation (most general duration) and is usually used for keys in event lists.
Answer the units string of the receiver.
converting
Answer a MSecondDuration.
asSeconds
Answer a float of seconds.
asUseconds
Answer a float of micro seconds.
MetaClass: USecondDuration class
Instance Variables:
The class instance variable NameMap is used for the name <--> MIDI key number mapping array.
printing
Superclass: Siren.NominalMagnitude
Category: Music-Models-Implementation
Instance variables: fracPitch
The range is c0 to g#9 and the values are symbols.
Note the confusion between the sharp sign (always placed after the note name) and Smalltalk's symbol key #.
One often writes ('c#3' asSymbol) to be safe.
fracPitch
Print the receiver as a symbolic pitch.
units
Answer the units string of the receiver.
arithmetic
Answer the sum of the receiver and the argument-handle adding Integers as a special case.
- aValue
Answer the sum of the receiver and the argument-handle adding Integers as a special case.
transposeBy: aValue
transpose a SymbolicPitch by aValue in fractional halfsteps
private
Answer Pitch.
converting
Assuming value is a symbolic note name, answer a key number.
asHertz
assuming value is a symbolic note name, return a frequency
asHz
assuming value is a symbolic note name, return a frequency
asMIDI
Assuming value is a symbolic note name, answer a key number.
asSymbol
Answer a SymbolicPitch.
mostGeneral
Answer the most numerically meaningful version of the receiver.
accessing
Answer the receiver's accidental, if any.
fracPitch
return microtonal offset as fractions of a halfstep
fracPitch: aValue
set microtonal offset as fractions of a halfstep
MetaClass: SymbolicPitch class
class initialization
Set up the class name mapping array.
instance creation
Assuming value is a key number, answer a symbolic pitch name
fromMIDI: aValue
Assuming value is a key number, answer a symbolic pitch name
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: MIDIVelocity
The SymbolicLoudness class maps symbolic dynamic names onto this range on an approximately logarithmic scale.
accessing
Superclass: Siren.IntervalMagnitude
Category: Music-Models-Implementation
Truncate
printing
Print the receiver as a MIDI velocity.
units
Answer the units string of the receiver.
private
Answer Amplitude.
converting
Answer a dB loudness; ratio 1 = 0dB, ratio 0.5 = -6dB, etc.
asMIDI
Answer a MIDIVelocity.
asRatio
Answer a RatioLoudness.
asSymbol
Answer a symbolic loudness.
mostGeneral
Answer the most numerically meaningful version of the receiver.
MetaClass: MIDIVelocity class
class initialization
Initialize the class instance variable.
coercion
Answer the selector to be used in coercing double-dispatching messages.
Class: MeasureDuration
It is partially implemented and unused.
Instance Variables:
printing
Superclass: Siren.NumericalMagnitude
Category: Music-Models-Implementation
Instance variables: timeSignature
timeSignature
Answer the units string of the receiver.
private
Answer Duration.
MetaClass: MeasureDuration class
Instance variables:
The global dictionary called Events can be used for sharing event instances.
accessing
Music-Events
Superclass: Object
Category: Music-Events
Instance variables: properties
properties
Add the argument as a property of the receiver.
date
Answer the receiver's 'date'.
date: obj
Set the receiver's 'date'.
inspect
Inspect the receiver--Use a special inspector for Event types
name
Answer the receiver's 'name'.
open
Edit, play (if
Answer AEvent--all subclasses look like me
version
Answer the receiver's 'version'.
version: obj
Set the receiver's 'version'.
printing
display: showHide field: filter on: stream
displayField: filter on: stream
printOn: aStream
Format and print the receiver on the argument.
storeOn: aStream
Format and store the source the receiver on the argument.
templateFields
Answer the field names for the instances of the receiver class.
scheduling
Perform or interpret the receiver on the argument; override in subclasses.
properties
Answer a value from the property list dictionary (or an instVar).
at: aProp ifAbsent: otherCase
Answer a value from the property list dictionary or the value of the given block.
at: aProp put: aVal
Set a value in the receiver's property list dictionary (or instVar).
doesNotUnderstand: aMessage
Handle doesNotUnderstand: to try to access the property dictionary.
If this is unsuccessful, announce that the receiver does not understand the argument.
hasProperty: aSymbol
Answer whether or not the receiver's property list dictionary includes the symbol as a key.
properties
Answer the receiver's property list dictionary.
respondsTo: aSymbol
Answer whether the method dictionary of the receiver's class contains
aSymbol as a message selector OR if the selector is unary and is a key
in the receiver's property dictionary.
initialize-release
Set up the default state of the receiver--add props. dict.
release
Flush the receiver.
private
Make sure the receiver has a property list dictionary.
testing
Answer true.
isSound
Answer false.
comparing
Answer whether the receiver and the argument represent the same values.
MetaClass: AbstractEvent class
examples
Demonstrate the creation of an AEvent.
example
Demonstrate the creation of an AEvent.
Class: DurationEvent
Instance variables:
accessing
Superclass: Siren.AbstractEvent
Category: Music-Events
Instance variables: duration index startedAt realTime
duration
Answer the receiver's ampl
dur
Answer the receiver's duration.
dur: newValue
Set the receiver's duration.
duration
Answer the receiver's duration.
duration: newValue
Set the receiver's duration.
index: aNumber
Set the receiver's event index.
order
Answer the receiver's order.
order: anOrder
Set the receiver's order.
pitch
Answer the receiver's pitch
voice
Answer the receiver's voice or some reasonable default.
voice: aValue
Set the receiver's voice to the argument.
printing
Format and print the receiver on the argument.
storeOn: aStream
Format and store the source the receiver on the argument.
scheduling
Answer whether the receiver is in a schedule
nextTime: ignored
Answer whether to reschedule the receiver
play
Play the receiver by scheduling it.
playAt: aTime
Play the receiver on its voice then.
playOn: aVoice at: aTime
This is a no-op in the abstract class
reset
Reset the receiver's index.
scheduleAt: aTime
Play the receiver on its voice then.
comparing
Answer whether the receiver and the argument represent the same values.
initialize-release
Set up the default state of the receiver--add props. dict.
MetaClass: DurationEvent class
examples
Demonstrate the creation of a DEvent.
example
Demonstrate the creation of a DEvent.
instance creation
Answer a DurationEvent instance initialized with the arguments.
Class: MusicEvent
Instance variables:
accessing
Superclass: Siren.DurationEvent
Category: Music-Events
Instance variables: pitch loudness voice
pitch
loudness
voice
Answer the receiver's loudness
ampl: aValue
Set the receiver's loudness to the argument.
amplitude
Answer the receiver's loudness
amplitude: aValue
Set the receiver's loudness to the argument.
loudness
Answer the receiver's loudness
loudness: aValue
Set the receiver's loudness to the argument.
pitch
Answer the receiver's pitch
pitch: aValue
Set the receiver's pitch to the argument.
voice
Answer the receiver's voice
voice: aValue
Set the receiver's voice to the argument.
processing
Add the given step to the receiver's pitch.
printing
Format and print the receiver on the argument.
printTerseOn: aStream
Format and print the receiver on the argument as tersely as possible.
printVerboseOn: aStream
Format and print the receiver on the argument.
readDataFrom: aDataStream size: size
Read a new event from the given stream using the compact format.
storeDataOn: aDataStream
Store myself on a DataStream. Answer self.
storeOn: aStream
Format and store the source the receiver on the argument.
comparing
Answer whether the receiver and the argument represent the same values.
scheduling
Play the receiver on the voice then.
MetaClass: MusicEvent class
instance creation
Answer a MusicEvent instance initialized with the arguments.
dur: aD ampl: anA voice: aVoice
Answer a MusicEvent instance initialized with the arguments.
dur: aD pitch: aP
Answer a MusicEvent instance initialized with the arguments.
dur: aD pitch: aP ampl: anA
Answer a MusicEvent instance initialized with the arguments.
dur: aD pitch: aP ampl: anA voice: aVoice
Answer a MusicEvent instance initialized with the arguments.
dur: aD pitch: aP voice: aVoice
Answer a MusicEvent instance initialized with the arguments.
dur: aD voice: aVoice ampl: anA
Answer a MusicEvent instance initialized with the arguments.
duration: aD pitch: aP
Answer a MusicEvent instance initialized with the arguments.
duration: aD pitch: aP ampl: anA
Answer a MusicEvent instance initialized with the arguments.
pitch: aP
Answer a MusicEvent instance initialized with the argument.
pitch: aP ampl: anA voice: aVoice
Answer a MusicEvent instance initialized with the arguments.
class initialization
Initialize the global dictionary of Events (optional).
initializeEventDictionary
Initialize the global dictionary of Events (optional).
examples
Demonstrate the terse format of event description.
example
Demonstrate the terse format of event description.
Class: EventList
Class EventList implements much collection-style protocol for event processing, as well as having special block application methods. All EventList algorithms are recurrsive in order to handle arbitrarily-deep hierarchical EventLists (possible because EventList is a subclass of DurationEvent). The class also has numerous powerful and flexible instance creation methods.
Instance Variables:
Standard properties are #tempoScale for the tempo scaling factor (used by the CMN editors as the MS/whole note scale), and #code (#duration, #delta, or #startStop) to support different event coding schemes. The class also supports typed links to other event lists, e.g., "eList1 isTonicAnswerOf: eList2" or "eList1 hasPreviousVersion: eList2", which can be very useful properties in editors and browsers.
The global dictionary EventLists holds onto instances that can be referenced with their name symbols; these can have gensym-like names such as #temp.23. Creating a named EventList automatically adds it to the global dictionary. There are tools for browsing and maintaining this dictionary.
accessing
Superclass: Siren.MusicEvent
Category: Music-Events
Instance variables: events
events
the list's events, time/event associations sorted by relative start times
index
startedAt
Add the given event modifier to the receiver's special modifier collection
code
Answer a symbol about the receiver's events' coding, usually #durations or #noteOnOff
code: aSymbol
Set the code about the receiver's events, usually #durations or #noteOnOff
deepCopy
Answer a careful deep copy.
defaultEventClass
Answer the default note event class.
name
Answer the receiver's name.
name: aName
Set the receiver's name.
next
Answer the next event in the list.
removeModifier: aModifier
Remove the given event modifier from the receiver's collection.
shallowCopy
Answer a shallow copy of the receiver's events.
size
Answer the number of events in the receiver.
tempo: someValue
Set the tempo to scale the events by.
voices
Answer the collection of voices used by thereceiver event list.
code conversion
Fill in missing properties with values that are continued from previous ones.
findNoteOff: anAssociation
Locate the noteOff event that corresponds to anAssociation; answer the sum of the delta times between (the duration)
setDurations
Take a delta-time encoded event list and determine the durations.
collecting
Iterate over the receiver's events with the given block
collectAll: aBlock
Iterate over the receiver's events with the given block
do: aBlock
Iterate over the receiver's event associations with the given block
eventsDo: aBlock
Iterate over the receiver's events with the given block
excerptFrom: start to: end
Answer a hierarchical list delineated by the given times.
expanded
Expand all sub-event lists and answer one large flat list.
expandedFrom: start to: end
Expand all sub-event lists and answer one flat list with events between the given times.
group: selection
Group the argument's events as a sub-event list in the receiver's list.
includes: anAss
Answer whether the given association is in the receiver's event list.
keysAndValuesDo: aBlock
remove: anA
Remove the given event from the receiver's collection
select: aBlock
Iterate over the receiver's events with the given block
selectAll: aBlock
Iterate over the receiver's events with the given block
selectKey: aBlock
Iterate over the receiver's events with the given block
selectValue: aBlock
Iterate over the receiver's events with the given block
timesDo: aBlock
Iterate over the receiver's events' relative start times with the given block
printing
asExplorerString: ignored
printOn: aStream
Print out the receiver's events on the argument.
readDataFrom: aDataStream size: size
Read a new event list from the given stream using the compact format.
storeDataOn: aDataStream
Store myself on a DataStream. Answer self.
storeOn: aStream
Store source code for the receiver's events on the argument.
storeOnFile: aName
Store out the receiver's events on the file named by the argument.
templateFields
Answer the field names for the instances of the receiver class.
processing
Add theValue to the aspect refered to by theSelector of all events.
applyBlock: theBlock toProp: theSelector
Apply the given block to the aspect refered to by theSelector of all events.
applyFunction: aFunction to: aSelector
Apply the given function to the range of the given selector
applyFunction: aFunction to: aSelector startingAt: sTime
Apply the given function to the range of the given selector starting at sTime.
chooseRange: theRange toProp: theSelector
Select a value from the given range for the aspect refered to by theSelector of all events.
edit
Open your favorite graphical editor on the receiver (left-shift-sensitive)
scale: theSelector by: theValue
Multiply the aspect refered to by theSelector of all events by theValue.
scaleStartTimesBy: theValue
Multiply the start times all events by theValue.
scaleValue: theValue toProp: theSelector
Multiply the aspect refered to by theSelector of all events by theValue.
setValue: theValue toProp: theSelector
Set the aspect refered to by theSelector of all events to theValue.
spreadValue: theRandomPercent toProp: theSelector
Spread the given property of all events by the given random range (%+-).
testing
Answer whether or not the receiver has items or components (true).
isEmpty
Answer whether the receiver is an event list (true).
isEventList
Answer whether the receiver is an event list (true).
species
Answer EventList.
scheduling
Play the event list by passing it off to the event scheduler.
nextTime: now
Answer the time of the next appointment
nextTimeFor: ass
Answer the time delay between the given event association and the one that follows it.
play
Play the event list by passing it off to the event scheduler.
playOn: aVoice
Play the event list on the voice by expanding its events
playOn: aVoice at: startTime
Play the event list on the voice by expanding its events
scheduleAt: aTime
Expand an eventList for the appointment scheduler.
stop
Play the event list by passing it off to the event scheduler.
initialize-release
Throw away the receiver's events.
initializeAnonymous
Initialize an un-named instance with default state.
initializeNamed: aName
Initialize a named instance with default state.
release
Flush the receiver.
event accessing
Add a new event or association to the receiver.
add: anEorA
Add a new event or association to the receiver.
add: anEvent at: aTime
Add a new event to the receiver at the given relative start time.
addAll: anEventList
Add the given event list's events to the receiver.
eventKeys
Answer the keys (durations) of the receiver's eventDictionary.
eventNear: aPoint
Answer an event within a reasonable distance (100 msec.) of the given point's x.
eventNearestTime: aTime
Answer an event within a reasonable distance (32 msec.) of the given point.
eventNearTime: aTime
Answer an event within a reasonable distance (32 msec.) of the given point.
events
Answer the receiver's eventDictionary.
events: anEL
Set the receiver's eventDictionary.
eventValues
Answer the values (events) of the receiver's eventDictionary.
recomputeDuration
Recompute the total duration of the receiver.
private
Map the receiver's special properties and/or eventModifiers onto the given event.
map: anAssociation at: startTime
Map the receiver's special properties and/or eventModifiers onto the given event.
comparing
Answer whether the receiver and the argument represent the same events.
MetaClass: EventList class
examples
Select the expressions below one-at-a-time and inspect the results.
randomExample
Create an event list with random data.
randomExample: length
Create an event list with random data.
randomExample: length from: data
Create an event list with random data.
randomSWSSExample
Create an event list with random data appropriate for software sound synthesis.
randomSWSSExample2
Create an event list with random data appropriate for software sound synthesis.
scaleExample2
Answer a scale where the event property types are mixed.
scaleFrom: start to: stop in: dur
Answer an event list with a scale.
sentenceExample
Create an event list for a beautiful sentence.
serialExample: length from: data
Create an event list with serial data.
wordExample
Create an event list for a long word.
class initialization
Erase the shared EventList dictionary and try to clean up all events.
initialize
Initialize the shared EventList dictionary.
storeAll
Write out all event lists.
named constants
Answer the named instance from the dictionary or a new EL.
named: aName ifAbsent: theBlock
Answer the named instance from the dictionary or the result of the block.
namedLists
Answer the dictionary of named event lists.
newNamed
Answer the named instance with a temp name.
newNamed: aName
Create and answer a new named (and stored) instance.
nextName
Answer a gensym-type ('te6') event list name for which no EL exists in the dictionary.
instance creation
Create and answer a new default-named instance of me
fromFile: theName
Create and answer a new default un-named (and therefore un-persistent) instance of me
named: myName fromPitches: pitchCollection
Answer an event list made with the given collection of pitches.
named: myName fromSelectors: selArray values: valueArrayArray
Answer an event list made with the given collection of values applied to the given array of selectors.
named: myName fromStartTimes: timeCollection
Answer an event list with the given collection of relative start times.
new
Create and answer a new default-named instance of me
new: ignored
Create and answer a new default-named instance of me
newAnonymous
Create and answer a new default un-named (and therefore un-persistent) instance of me
Class: ActionEvent
Instance variables:
scheduling
Superclass: Siren.DurationEvent
Category: Music-Events
Instance variables: action
Indexed variables: objects
action
Play the receiver by executing its action block.
playAt: aTime
Play the receiver by executing its action block.
accessing
Answer the receiver's 'action'.
action: anObject
Set the receiver's instance variable 'action' to be anObject.
MetaClass: ActionEvent class
examples
Demonstrate the creation of an ActionEvent.
listExample
Demonstrate the creation of an ActionEvent by making a list of events that draw rectangles on the top window.
playExample
Demonstrate the performance of a list of ActionEvents.
instance creation
Answer an ActionEvent instance initialized with the arguments.
dur: aD block: actionBlock
Answer an ActionEvent instance initialized with the arguments.
Class: EventGenerator
playing
Superclass: Siren.EventList
Category: Music-EventGenerators
An EventGenerator can create an EventList using its given parameters and a function (block) to use to create Event sequences. See the subclasses for examples.
edit me
eventList
Answer an eventList for the receiver.
play
Play the receiver's event list.
MetaClass: EventGenerator class
accessing instances
Find the and return instances of me or any subclasses of me.
allPlaying
Find all playing instances of me or my subclasses.
named: aName
Find the named instance of me or a subclass of me.
stopAll
Find all playing instances of me or my subclasses and terminate them.
examples
Play random examples from the set of examples in my subclasses
Class: Cloud
Instance variables:
accessing
Superclass: Siren.EventGenerator
Category: Music-EventGenerators
Instance variables: density
This can be (e.g.,) POD-style specification of ranges for random selection, or selection from a given set of pitches.
See the class examples of my subclasses for description examples.
density
set the density instance variable
playing
Make the cloud's events; assume that the receiver's pitch, loudness and
durations are actually intervals
eventList0
Make the cloud's events; assume that the receiver's pitch, loudness and
durations are actually intervals
MetaClass: Cloud class
examples
Answer an initialized Cloud generated from the given property map dictionary.
example1
Create and edit a low 6 second stochastic cloud with 5 events per second
randomExample
Play a stochastic cloud with random properties.
randomExample2
Play a stochastic cloud with random properties.
instance creation
return an initialized Cloud
dur: aD pitch: aP ampl: anA voice: aVoice
return an initialized Cloud
dur: aD pitch: aP ampl: anA voice: aVoice density: aDe
return an initialized Cloud
dur: aD voice: aVoice density: aDe
return an initialized Cloud
fromDictionary: aDictionary
Answer an initialized Cloud generated from the given property map dictionary.
Class: Peal
Instance variables:
playing
Superclass: SequenceableCollection
Category: Music-EventGenerators
Instance variables: base directions position finished
Indexed variables: objects
This implementation was written by Mark Lentczner in 1986.
base
directions
position
finished
play
playOn0: out durations: dur meter: mtr at: start
Play the receiver
playOn: vox
playOn: out durations: dur meter: mtr at: start
Play the receiver
accessing
Answer the element in the base collection currently mapped into the index position.
at: index put: object
currentChange
Answer the base as mapped by the current change.
finished
Answer is the peal has completed it's last change
setBase: baseSet
Initialize the base set and everything else.
size
Redone here because SequencableCollection overrides it.
private
Produce the next change in the peal by moving the element n within the range. If the element wants to move outside the range, alter it's direction and move the next element (recursively call this).
indexOfElement: n
Answer the index the anElement item (i.e. the n-th item, not the item = to n) within the receiver.
swap: index1 with: index2
We need to redefine this, since we redefined at: & at:put: to map trhrough the base collection
changing
Produce the next change in the peal
MetaClass: Peal class
examples
Play a simple bell peal
instance creation
Create a new peal on the given size with 1..size as the base set.
upon: baseSet
Create a new peal on the base set given
Class: DynamicCloud
playing
Superclass: Siren.Cloud
Category: Music-EventGenerators
make the cloud's events--assume that the receiver's pitch, loudness and durations are actually ARRAYS of two intervals (for the start and end ranges)
MetaClass: DynamicCloud class
examples
Create and play an 8-second cloud that goes from soft to loud on the same pitch.
example1
Edit a 6-second cloud that goes from low to high and soft to loud.
example4
Edit a 6 second cloud that focuses on its center
focusExample
Create a 6-second cloud that focuses on its center.
randomExample
Create a dynamic second cloud with random properties.
Class: Cluster
playing
Superclass: Siren.EventGenerator
Category: Music-EventGenerators
A cluster need only have a set of pitches, or a rhythm.
make the cluster's events
MetaClass: Cluster class
instance creation
return an initialized Cluster with the given list as pitches
dur: aD list: anEL ampl: anA voice: aV
return an initialized Cluster with the given list as pitches
dur: aD pitchSet: aColl ampl: anA voice: aV
return an initialized Cluster with the given list as pitches
examples
Cluster example1
example2
Cluster example2
Class: Roll
Instance variables:
initialize
Superclass: Siren.Cluster
Category: Music-EventGenerators
Instance variables: number delta noteDuration
It will eventually be possible to apply pitch, amplitude or duration envelopes to them as well.
number
delta
noteDuration
make a new roll of the specified length...
number: aNumber rhythm: aDuration note: aNote
make a new roll with the specified number of notes...
playing
return an eventList for me
accessing
compute and answer the duration
MetaClass: Roll class
instance creation
return a new roll of the specified length...
number: aNumber rhythm: aDuration note: aNote
return a new roll with the specified number of events...
examples
Create and edit/play a few rolls.
Class: Chord
Instance variables:
accessing
Superclass: Siren.Cluster
Category: Music-EventGenerators
Instance variables: root inversion type arity
root
inversion
type
arity
set the number of notes of the receiver chord
duration: aDuration
set the durations of my notes
eventList
Answer the receiver's events
inversion: number
set the inversion of the receiver chord
root: tonic
set the root of the receiver chord
type: aSymbol
set the type symbol of the receiver chord
generating events
return a three-note major chord on the given tonic in the given inversion
majorTriad
return a three-note major chord on the given tonic in the given inversion
minorTetrad
return a three-note minor chord on the given tonic in the given inversion
minorTriad
return a three-note minor chord on the given tonic in the given inversion
MetaClass: Chord class
instance creation
return a three-note major chord on the given tonic in the given inversion
majorTriadOn: tonic inversion: inversion
return a three-note major chord on the given tonic in the given inversion
minorTetradOn: tonic inversion: inversion
return a three-note minor chord on the given tonic in the given inversion
minorTriadOn: tonic inversion: inversion
return a three-note minor chord on the given tonic in the given inversion
examples
Create and edit some chords.
Class: Arpeggio
Instance variables:
playing
Superclass: Siren.Chord
Category: Music-EventGenerators
Instance variables: delay
delay
edit me
eventList
return my event list
play
don't expand me
private
set the start times of my notes
accessing
set the delay between the onset of my notes
MetaClass: Arpeggio class
instance creation
create an Arpeggio on the given chord or event list
Class: Ostinato
Instance variables:
initializing
Superclass: Siren.EventGenerator
Category: Music-EventGenerators
Instance variables: list playing process
list
playing
process
set up a new Ostinato.
initializeNamed: aName
Set up a new Ostinato.
accessing
list
list: anEL
process: anBlockOrProc
playing
return an event list from the given number of times playing
playAt: firstTime
Play an ostinato until turned off.
playOn: aVoice at: firstTime
play an ostinato until turned off.
stop
stop a playing Ostinato.
printing
MetaClass: Ostinato class
instance creation
create an Ostinato on the given EventList.
named: aSymbol onList: anEL dur: theDur
create an Ostinato on the given EventList.
newNamed: aSymbol onList: anEL
create an Ostinato on the given EventList.
onList: anEL
create an Ostinato on the given EventList.
onList: anEL dur: theDur
create an Ostinato on the given EventList.
examples
Create and edit some ostinati.
Class: Trill
playing
Superclass: Siren.Roll
Category: Music-EventGenerators
return an eventList for me
MetaClass: Trill class
instance creation
return a new roll of the specified length...
length: aNumber rhythm: aDuration notes: aNote
return a new trill of the specified length...
Class: SelectionCloud
playing
Superclass: Siren.Cloud
Category: Music-EventGenerators
Make the cloud's events
eventListWithDensityFunction
make the cloud's events
MetaClass: SelectionCloud class
examples
Create a low 4 second cloud selecting pitch, amp and voice from value arrays.
exampleRand
Edit a selection cloud with random properties.
randomExample
Create a selection cloud with random properties.
Class: DynamicSelectionCloud
playing
Superclass: Siren.SelectionCloud
Category: Music-EventGenerators
make the dynamic selection cloud's events
MetaClass: DynamicSelectionCloud class
examples
Create a selection cloud that focuses onto a trill.
example2
Create a selection cloud that makes a transition from one triad to another
randomExample
Answer a dynamic selection cloud with random properties.
Class: ExtDynamicSelectionCloud
playing
Superclass: Siren.DynamicSelectionCloud
Category: Music-EventGenerators
Instance variables: list
make the dynamic selection cloud's events
accessing
Set the receiver's list
MetaClass: ExtDynamicSelectionCloud class
examples
Answer a dynamic selection cloud that plays chords from a scale.
Class: EventModifier
accessing
Superclass: Object
Category: Music-EventModifiers
Instance variables: selector function scale start stop index
Instance Variables:
selector
function
scale
start
stop
index
Answer the receiver's 'function'.
function: anObject
Set the receiver's instance variable 'function' to be anObject.
index
Answer the receiver's 'index'.
index: anObject
Set the receiver's instance variable 'index' to be anObject.
scale
Answer the receiver's 'scale'.
scale: anObject
Set the receiver's instance variable 'scale' to be anObject.
selector
Answer the receiver's 'selector'.
selector: anObject
Set the receiver's instance variable 'selector' to be anObject.
start
Answer the receiver's 'start'.
start: anObject
Set the receiver's instance variable 'start' to be anObject.
stop
Answer the receiver's 'stop'.
stop: anObject
Set the receiver's instance variable 'stop' to be anObject.
application
valueIn: evtList at: time
MetaClass: EventModifier class
instance creation
Create a new modifier and initialize it
new
Create a new modifier and initialize it
Class: Rubato
initialize-release
Superclass: Siren.EventModifier
Category: Music-EventModifiers
MetaClass: Rubato class
examples
Rubato example
Class: Swell
initialize-release
Superclass: Siren.EventModifier
Category: Music-EventModifiers
MetaClass: Swell class
as yet unclassified
Swell example
Class: Function
Examples are a ramp from 0 to 1 such as:
InstanceVariables:
ui
Superclass: Siren.DurationEvent
Category: Music-Functions
Instance variables: data range domain scale offset
Indexed variables: objects
Class Function is concrete and represents functions that are described by a array of data points assumed to lie equally-spaced in the unit interval.
Functions are normally created from an array of values over the unit interval; x varies from 0.0 to 1.0 and y is free over that range.
One can address them within the unit interval with atX: or one can address them with integer indeces up to the data set's size with atIndex: (can be dangerous).
[(LinearFunction from: #((0 0) (1 2))) at: 0.33]
or a spline that traces a sine-like path centered around 1:
[(SplineFunction from: #((0 1) (0.33 2) (0.67 0) (1 1))) at: 0.35]
data
the data values or breakpoints of the function
domain
range
Open a function view on the receiver.
edit: extent
Open a function view on the receiver.
updateSelector
processing
Answer an averaged version of the receiver of the given size.
freeData
Release the receiver's 'data'.
maxTo: size win: wsize
Answer a version of the receiver of the given size taking the maximum value of each window.
sampledTo: size
Answer a down-sampled version of the receiver of the given size.
smoothed
Answer a version of the receiver smoothed to about 32 points.
updateRange
accessing
Add the argument to the receiver's point collection.
at: anIndex
Answer the value at the given index (between 0 and 1 -or- 1 and data size).
at: anIndex put: aValue
Put the given value at the given index (between 0 and 1).
atX: anIndex
Answer the value at the given index (between 0 and 1).
data
Answer the receiver's 'data'.
data: anObject
Set the receiver's instance variable 'data' to be anObject.
dataClass
Answer the class of the elements in the receiver's data collection.
domain
Answer the receiver's 'domain'.
domain: anObject
Set the receiver's instance variable 'domain' to be anObject.
duration
Answer the domain of the receiver's collection of breakpoints.
nextXMoreThan: delta from: thisIndex
Answer the next X value after index whose Y value is more than delta from the value at thisIndex
nextXMoreThan: delta from: thisIndex step: step
Answer the next X value after thisIndex whose Y value is more than delta from the value at thisIndex
offset: offVal
Set the receiver's 'offset'.
pointAt: index
Answer the given value in the receiver's breakpoint collection.
pointAt: index put: value
Assign the given values in the receiver's breakpoint collection.
points
Answer the receiver's 'data'.
range
Answer the receiver's 'range'.
range: anObject
Set the receiver's instance variable 'range' to be anObject.
realPointAt: index
Answer the given value in the receiver's breakpoint collection (this is not overridden in ExpSeg).
sampleAt: anIndex
Answer the value at the given index (between 0 and 1).
scale
Answer the receiver's 'scale'.
scale: scaleVal
Set the receiver's 'scale'.
selection
size
Answer the size of the receiver's collection of breakpoints.
printing
Format and print the receiver on the argument.
storeOn: aStream
Format and print the receiver on the argument.
enumerating
Evaluate aBlock with each of the receiver's elements as the argument.
Answer the first element for which aBlock evaluates to true.
do: aBlock
Evaluate aBlock with each of the receiver's elements as the argument.
isEmpty
initialize-release
Initialize the receiver for the given size.
geometry
Answer whether or not the receiver has a function breakpoint near the given x value.
indexOfPointNearestX: anXValue
Answer the receiver`s point nearest the given x value.
arithmetic
Answer a function graph with the argument multiplied by the receiver
+ aFcnOrNum
Answer a function graph with the argument added to the receiver
- aFcnOrNum
Answer a function graph with the argument subtracted from the receiver
/ aFcnOrNum
Answer a function graph with the receiver divided by the argument
MetaClass: Function class
standard functions
Answer a exponential attack/decay/sustain/release envelope.
exponentialADSR2
Answer a exponential attack/decay/sustain/release envelope.
linearADSR1
Answer a linear attact/decat/sustain/release envelope.
linearADSR2
Answer a linear attact/decat/sustain/release envelope.
spline
Answer a generic spline curve.
sumOfSines
Answer a simple Fourier summation.
instance creation
Answer a default instance of the receiver class.
from: anArray
Answer a function with the given array of collections, points, or data values.
fromFile: fName
Load 1 or more functions from a text file.
new
Answer an instance of the receiver class.
ofSize: size
Answer an instance of the receiver class of the requested size.
randomOfSize: size from: low to: high
Answer a function with the given number of data points in the given range.
randomWalkSize: size from: low to: high
Answer a function with the given number of data points in the given range.
readFloatsFrom: filename
Answer a function with the given points.
examples
Function usage example; read a function from a binary file and view it.
fileExample
Function usage example; read a function from a binary file and view it.
functionFileExample
Function usage example; read a function from a binary file and view it.
functionPlayExample
Function usage example; make a roll-type eventList and apply a crescendo/decrescendo to it
functionViewExample
Function usage example; make a z-z function and view it.
maxedFunctionFileExample
Function usage example; read a function from a binary file and view it.
randomViewExample
Function usage example; make a random walk fcn and view it.
randomViewExample2
Function usage example; make a random walk fcn and view it.
class constants
Answer the default size for the instances' storage array.
Class: LinearFunction
Example:
processing
Superclass: Siren.Function
Category: Music-Functions
Indexed variables: objects
LinearFunction from: #((0 0) (0.1 1) (0.2 0.6) (0.9 0.4) (1 0))
Normalize the receiver to the range and domain of 0-1, inclusive.
scaleBy: scalePt
Scale the receiver's points by the given scale.
updateRange
accessing
Add the argument to the receiver's point collection.
at: anIndex
Answer the value at the given index in my range--do linear interpolation.
size
Answer the size of the receiver's collection of breakpoints.
MetaClass: LinearFunction class
instance creation
Answer an ADSR envelope.
default
Answer a default instance of the receiver class - an ADSR shape.
fromLorisData: data size: siz duration: dur
Create a linear envelope from the given Loris linear envelope.
examples
Answer a LinSeg of a typical envelope function.
linearExample
Make a LinSeg and answer a value.
linearViewExample
Make an ADSR-shaped LinSeg and open a view on its form.
Class: FunctionGraph
accessing
Superclass: Siren.Function
Category: Music-Functions
Instance variables: operandL operandR operation
Indexed variables: objects
Answer the value at the given index (between 0 and 1 -or- 1 and data size).
operandL: aFcn
operandR: aValue
operation
operation: aValue
MetaClass: FunctionGraph class
examples
Open the sum of a triangle and a sine
instance creation
Answer a new function graph
Class: FourierSummation
Instance variables:
Superclass: Siren.Function
Category: Music-Functions
Instance variables: myForm myArray lazy
Indexed variables: objects
myForm
Initialize the receiver for the given size.
computing
Compute the block by sine summation--set the values in the cached array.
computeValueAt: anIndex
Compute the answer by sine summation.
accessing
Add the argument to the receiver's point collection.
at: theIndex
Answer the value from my array--assume an index in the range 0 to 1
MetaClass: FourierSummation class
instance creation
Answer a default instance of the receiver class.
from: anArrayOfZPoints
Answer a sum-of-sines function with the given points.
examples
Make a Sine summation that approaches a square wave
fourierViewExample
Make a Sine summation that approaches a square wave and open a view on it.
Class: Spectrum
Instance Variables:
accessing
Superclass: Siren.Function
Category: Music-Functions
Instance variables: sound window windowSize stepSize magReal
Indexed variables: objects
sound
window
windowSize
stepSize
fft
magReal
Answer the receiver's decimation factor.
D: factor
Set the receiver's decimation factor.
N
Answer the receiver's 'windowSize'.
N: aNum
Set the receiver's instance variable 'windowSize' to be aNum.
sound
Answer the receiver's 'sound'.
sound: anObject
Set the receiver's instance variable 'sound' to be anObject.
stepSize
Answer the receiver's 'stepSize'.
stepSize: anObject
Set the receiver's instance variable 'stepSize' to be anObject.
windowSize
Answer the receiver's 'windowSize'.
windowSize: aNum
Set the receiver's instance variable 'windowSize' to be aNum.
computing
Do the FFT and store the results into the receiver's data.
compute0
Do the FFT and store the results into the receiver's data.
setData
Create the receiver's data array for the right number of frames.
updateRange
Iterate over the receier's data getting the RMS data range
window: which
Answer the real data array for the given window of the receiver's sound.
modes
Set the receiver's instance variable 'magReal' to be #complex.
real
Set the receiver's instance variable 'magReal' to be #real.
setWindow: aSymbol
Set the receiver's 'window'.
window
Answer the receiver's 'window'.
time warp
Answer a new frame interpolated for the given (floating-point) index.
timewarpBy: fact
Interpolate/decimate the receiver by the given (float or function) time factor.
printing
Display the receiver
printOn: aStream
Format and print the receiver on the argument.
initialize-release
Set up the receiver.
frames
Answer the value at the given index (between 1 and self size).
at: anIndex put: aValue
Answer the value at the given index (between 0 and 1).
frame: anIndex
Answer the frame at the given index (between 1 and self size).
frame: anIndex do: aBlock
Iterate over a single frame with the given block.
frame: frm imagAt: frq
Answer the given imag value in the given frame.
frame: frm imagAt: frq put: val
Set the given imag value in the given frame.
frame: anIndex put: aValue
Set the value at the given index (between 0 and 1).
frame: frm realAt: frq
Answer the requested real value from the given frame.
frame: frm realAt: frq put: val
Set the given real value in the given frame.
MetaClass: Spectrum class
examples
Read a sound from disk and take its fft.
sweepExample
Create a swept sine wave and take its fft.
Class: FunctionEvent
accessing
Superclass: Siren.MusicEvent
Category: Music-Functions
Instance variables: function interval delta
Indexed variables: objects
delta: aValue
function
function: aFcn
interval
interval: aValue
value
Answer the receiver's data value
events
Play the receiver on the voice then.
scheduling
Answer the next time to reschedule me
play
Play the event list by passing it off to the event scheduler.
scheduleAt: aTime
Expand an eventList for the appointment scheduler.
MetaClass: FunctionEvent class
instance creation
Create and answer a new instance of me
Class: SplineFunction
Instance Variable:
computing
Superclass: Siren.LinearFunction
Category: Music-Functions
Instance variables: linSeg
Indexed variables: objects
linSeg
Compute the receiver by cubic interpolation; use the Geometric spline.
accessing
Answer the value at the given index in my range--take it out of my computed form.
MetaClass: SplineFunction class
examples
Make a SplineSeg.
splineViewExample
Make a SplineSeg and open a view on its form.
instance creation
Answer a default instance of the receiver class.
Class: ExponentialFunction
Example:
accessing
Superclass: Siren.LinearFunction
Category: Music-Functions
Indexed variables: objects
They use ZPoints for x/y/exponent. The exponent determines the speed of the exponential/logarithmic transition between breakpoint values. A value of 0 leads to linear interpolation.
ExponentialFunction from: #((0 0 -5) (0.2 1 -3) (0.8 0.5 -2) (1 0))
Answer the value at the given index in my range--do exponential interpolation such
that if f(x, i) is the i-th function value in the transition from breakpoint v[J] to
v[J+1], then:
f(x) = v[J] + (v[J+1] - v[J])*(1 - exp(i*x[J]/(N-1)))/(1 - exp(x[J]))
for 0 <= i < N, where N is the number of function points between t[J] and the next
horizontal value, and x is the exponential weight whereby x = 0 will yield a
straight line, x < 0 will yield an exponential transition, and x > 0 will yield a
logarithmic transition.
pointAt: index
Answer the given value in the receiver's breakpoint collection as a 2-D point.
printing
Format and print the receiver on the argument.
MetaClass: ExponentialFunction class
instance creation
Answer an ADSR envelope.
default
Answer a default instance of the receiver class.
from: anArrayOfPoints
Answer a function with the given points.
examples
Make an exp seg and open a view on its form.
expASRViewExample
Make an exp seg and open a view on its form.
expsegViewExample
Make an exp seg and open a view on its form.
Class: MusicalInterval
computing notes
Superclass: Object
Category: Music-PitchClasses
Instance variables: type semiTones
Intervalle represente un intervalle entre deux notes.
type represente l'ecart entre les deux notes extremites. Cet ecart ne tient compte
que des notes naturelles. Par exemple, les tierces (majeures ou mineures) ont comme type 3,
les quarte 4 etc.
demisTons est le nombre de demis tons entre les deux notes. Par exemple une tierce
majeure a comme type 3 et demisTons = 4.
yields the note making the interval self with aNote
printing
printOn: s
printPrintableOn: s
Watch out : all Intervals cant print themselves.
You can convert a musicalInterval into a ChromaticInterval.
E.g. : Interval between Cbb and C ## (super super augmented
unison!!).
There are here 40 printable intervals. Cf. method MusicalInterval allPrintableIntervals
(put in protocol constants)
storeOn: s
automatic access
semiTones
semiTones: aValue
type
type: aValue
arithmetics
(MusicalInterval majorSecond) + (MusicalInterval perfectFifth)
testing
isAscending
isDescending
comparing
<= anInterval
= anInterval
> anInterval
>= anInterval
hasSameDirectionAs: anInterval
mutations
asChromaticInterval
descending
MetaClass: MusicalInterval class
examples
MusicalInterval allPrintableIntervals
example
MusicalInterval majorThird inverse
MusicalInterval perfectFourth topIfBottomIs: N C sharp -> Fa#
MusicalInterval perfectFourth bottomIfTopIs: N F sharp -> Do#
N do intervalBetween: N re -> Major second
N do flat intervalBetween: N sol -> Augmented fifth
N do flat intervalBetween: N do sharp -> superAugmented unisson
N do flat intervalBetween: N do sharp sharp -> non printable interval
(N do flat intervalBetween: N do sharp sharp) asChromaticInterval -> Chromatic 3
(N do intervalBetween: N sol) = (N re intervalBetween: N la) -> true
(N do intervalBetween: N fa sharp) = (N do intervalBetween: N sol flat) -> false
MusicalInterval allIntervalsType: 3 -> #(Major third Minor third )
MusicalInterval allIntervalsType: 2 ->
#(Augmented second Diminished second Major second Minor second )
MusicalInterval allIntervalsType: 1 -> #(Augmented unisson Diminished unisson superAugmented unisson superDiminished unisson unisson )
exampleTranspositions
three ways of of transposing pitch classes and od notes
creation
MusicalInterval allIntervalsType: 2
type: aType semiTones: d
all-printable
augmentedFifth
8 semitones
augmentedFourth
6 semitones
augmentedNinth
15 semitones
augmentedOctave
3 semitones
augmentedSecond
3 semitones
augmentedTenth
17 semitones
augmentedTwelvth
20 semitones
augmentedUnison
diminishedFifth
6 semitones
diminishedFourth
5 semitones
diminishedNinth
1 octave + 1 semitones
diminishedOctave
11 semitones
diminishedSecond
0 semitones
diminishedSeventh
9 semitones
diminishedTenth
15 semitones
diminishedThirteenth
diminishedTwelvth
18 semitones
diminishedUnison
MusicalInterval diminishedUnison topIfBottomIs: N C
majorNinth
14 semitones
majorSecond
2 semitones
majorSeventh
11 semitones
majorSixth
9 semitones
majorTenth
14 semitones
majorThird
4 semitones
majorThirteenth
majorTwelvth
19 semitones
minorNinth
1 octave + 1 semitones
minorSecond
1 semitone
minorSeventh
10 semitones
minorSixth
8 semitones
minorThird
3 semitones
minorThirteenth
octave
perfectEleventh
5 semitones
perfectFifth
7 semitones
perfectFourth
5 semitones
superAugmentedUnison
MusicalInterval superAugmentedUnison topIfBottomIs: N C
superDiminishedUnison
MusicalInterval superDiminishedUnison topIfBottomIs: N C
unison
constants nick-names
aug4
aug5
aug9
15 semitones
dim13
dim5
6 semitones
dim7
9 semitones
dim9
eleventh
fifth
flatFifth
flatNinth
1 octave + 1 semitones
flatThirteenth
fourth
ninth
second
2 semitones
seventh
sixth
thirteenth
Class: PitchClass
private intervals
Superclass: Object
Category: Music-PitchClasses
Class variables: A AllNatural AllNotes B C D E English F G
A pitch class is an octave-independent note.
There are 35 (sub) instances of this class.
Octave-dependent notes are represented by instances of class
OctaveDependentNote.
Ideally PitchClass should be a metaclass, so that its instances
be classes, and octave-dependent notes could then be instances
of pitchClasses !!
Unfortunately this is not possible straightforwadly in Smaltalk, so we
use aggregation instead to represent octave-dependent notes
Important method in the theory. It is a 3-stage computation of the interval between 2 notes
descendingSemiTonesToNatural
intervalBetween: aNote
returns the interval between the two notes
intervalTypeBetween: aNote
returns the interval between the two notes
nthFollowing: i
returns the i th natural note following self
nthPreceding: i
returns the i th natural note preceding self
numberOfSemiTonesBetween: aNote
Important method in the theory. It is a 3-stage computation of the interval between 2 notes
semiToneCount
smallestIntervalBetween: aNote
returns the descending interval between the two notes
public intervals
alterateBelow: note toReach: i
augmentedEleventh
augmentedFifth
augmentedFourth
augmentedNinth
augmentedSecond
augmentedUnison
diminishedFifth
diminishedNinth
diminishedSecond
diminishedSeventh
diminishedThirteenth
eleventh
fifth
flatFifth
flatNinth
flatThirteenth
fourth
majorNinth
majorSecond
majorSeventh
majorSixth
majorThird
majorThirteenth
minorNinth
minorSecond
minorSeventh
minorSixth
minorThird
minorThirteenth
ninth
octave
perfectEleventh
perfectFifth
perfectFourth
second
seventh
sixth
thirteenth
unison
testing
isDoubleSharp
isFlat
isNatural
isSharp
pitchEqual: aNote
chord creation
majorTriad
minorTriad
mutations
chordFromString: st
inTessitura: qualTessitura
N C pitchInTessitura: QTessitura high
octave: o
scales
harmonicMinorScale
majorScale
melodicMinorScale
minorScale
pseudoMinorScale
making octave-dep notes
returns two octave dependent notes of self who are repectively
lower and higher than the given odNote
pitchBetween: n1 and: n2
return, if it exists, a pitch (octave dependent note) between the two given notes
the: nb octavesBeginningFrom: initialOctave
N D the: 3 octavesBeginningFrom: 0
access
doubleSharp
natural
pitchClass
saving
to ensure uniqueness, pitch classes save themselves as messages sent
to the appropriate class, so that no duplicate are created
printing
storeOn: s
N C storeString
transpose
three cases: integer (+/-), method name (= ascending interval), or interval
object
constraining
Paleo
nameInScale: aScale
MetaClass: PitchClass class
initialization
initialize
There are 35 pitch classes. That's too much for Squeak, so the method was split into two methods
initializeAllNaturalNotes
initializeClass
There are 35 pitch classes. That's too much for Squeak, so the method was split into two methods
initializeDoubleFlat
initializeFrenchNames
initializeGlobals
global access
allNotesButDoubles
allPlausibleRootNotes
allPlausibleRootsForMajorScales
self allPlausibleRootsForMajorScales
allPlausibleRootsForMinorScales
self allPlausibleRootsForMinorScales
B
C
D
do
E
F
fa
flatNotes
fromSemiTones: n
arbitrary method, used for transposing pitch classes (a strange notion...)
G
la
mi
naturalNotes
noteNamed: c
takes the case of flat into account. Sharps are naturally parsed out
from the note name by the smalltalk parser.
Since the algorithm proceeds from the left, it accepts any number of sharps and flats (using the common algebra) :
N noteNamed: 'C#b#b#b#' -> C#
re
sharpNotes
si
sol
vocal ranges
retourne la collection des notes de l'alto
altoRangeInScale: aScale
PitchClass sopranoRangeInScale: (N do sharp minorScale)
baseRange
retourne la collection des notes de la basse
baseRangeInScale: aScale
PitchClass sopranoRangeInScale: (N do sharp minorScale)
sopranoRange
retourne la collection des notes du soprano
sopranoRangeInScale: aScale
PitchClass sopranoRangeInScale: (N do sharp minorScale)
tenorRange
retourne la collection des notes du tenor
tenorRangeInScale: aScale
PitchClass sopranoRangeInScale: (N do sharp minorScale)
ordering
nFirstFlats: n
PitchClass nFirstFlats: 3
nFirstSharps: n
PitchClass nFirstSharps: 3
sharpOrdering
examples
N C sharp chordFromString: '' -> [C# ]
(N C sharp chordFromString: 'min 7 dim5') notes -> OrderedCollection (C# E G B )
closestEnharmonic
N D sharp closestEnharmonic Eb
N E flat closestEnharmonic D#
N B sharp closestEnharmonic C
N C flat closestEnharmonic D#
N D sharp sharp closestEnharmonic E
N E flat flat closestEnharmonic D
------
(N D sharp @ 2) closestEnharmonic Eb2
(N E flat @ 2) closestEnharmonic D#2
(N B sharp @ 2) closestEnharmonic C3
(N C flat @ 3) closestEnharmonic B2
majorScaleExample
PitchClass B majorScale notes- > #(B C# D# E F# G# A# )
melodicMinorScaleExample
minorScaleExample
pitchInTessituraExamples
N C pitchInTessitura: QTessitura high -> C5
N A pitchInTessitura: QTessitura high -> A4
N G pitchInTessitura: QTessitura high -> G4
N F pitchInTessitura: QTessitura high -> F5
N A pitchInTessitura: QTessitura low -> A2
sharpflatAlgebraExample
sharp and flat's algebra
N C sharp ->Do#
N C sharp sharp ->Do##
N C sharp sharp sharp ->error
N C flat sharp -> Do
N re sharp sharp natural -> re
Intervals computation :
N C diminishedFifth -> Solb
N C augmentedFourth -> Fa#
N C diminishedThirteenth -> Lab
N C flat minorSeventh -> Sibb
N C majorThird majorThird -> Sol#
Notes equivalence : pitchEgal methode
N C sharp pitchEqual: N re flat -> true
N C augmentedFourth pitchEqual: N C diminishedFifth -> true
N C diminishedFifth pitchEqual: N F minorSecond -> true
Class: PitchClassAltered
accessing
Superclass: Siren.PitchClass
Category: Music-PitchClasses
Instance variables: natural
name
yields a symbol
natural
natural: value
nom
yields a symbol
preceding
testing
MetaClass: PitchClassAltered class
access
Superclass: Object
Category: Music-PitchClasses
Instance variables: oct pc midiPitch natural
pc : the pitch class of the note (takes enharmonic spelling into account)
octave: integer from 0 to .., represent the octave.
Middle C is therefore represented by
pc : C
octave: 4
Defines methods to compute intervals, midiPitches, and lots
of thing that PitchClass implements too.
So why not make this class and PitchClass have
a common superclass, to factor out common computations ?
Ontological questions :
how to compute an interval between two octave-dependent notes,
since their ambitus may be arbitrarily large (no question of computing 25th intervals).
So intervals should be reduced to thirteenth, i.e. :
octaves should be taken into account only in a 0/1 manner
oct: o
octave: o
pitchClass
pitchClass: aPc
alterations
isDoubleFlat
isDoubleSharp
isFlat
isNatural
isSharp
natural
sharp
printing
storeOn: s
(N C sharp sharp octave: 3) storeString = '(N C sharp sharp @ 3)'
intervals
diatonicStepsTo: aNote
returns the number of diatonic steps to aNote
following
the next diatonic note of self's natural note
newdiatonicStepsTo: aNote
returns the number of diatonic steps to aNote
nthFollowing: i
yields the nth diatonic note following self.
Takes octave shifts into account
nthPreceding: i
yields the nth diatonic note preceding self.
Takes octave shifts into account
olddiatonicStepsTo: aNote
returns the number of diatonic steps to aNote
oldEquals: x
important pour l'integrite des operations sur les melodies
preceding
the next diatonic note of self's natural note
semiToneCount
related to OctaveDependentNote fromMidiPitch
semiTonesWith: aNote
interval testing
returns the interval between the two octaveDependentNotes.
Assume that aNote is really a OctaveDependentNote
intervalTypeBetween: aNote
returns the type of the interval between the two notes modulo one
octave
(N C octave: 6) intervalTypeBetween: (N re octave: 3)
isLessThanA: interval from: od
ascending or descending direction
realIntervalTypeBetween: aNote
returns the type of the interval between the two notes
(N C octave: 6) realIntervalTypeBetween: (N C octave: 3)
testIntervalsFrom: pitch1 to: pitch2
(N C sharp @ 3) testIntervalsFrom: (N A @ 1) to: (N A @ 4)
public intervals
Join semitons to note in order to obtain the required number of
semitones with self.
Redefined here because interval computation must take octave
into account ...
alterateBelow: note toReach: i
Join semitons to note in order to obtain the required number of
semitones with self.
Redefined here because interval computation must take octave
into account ...
augmentedEleventh
augmentedFifth
augmentedFourth
augmentedNinth
augmentedOctave
augmentedSecond
diminishedFifth
diminishedNinth
diminishedOctave
diminishedSeventh
diminishedThirteenth
eleventh
fifth
flatFifth
flatNinth
flatThirteenth
fourth
majorNinth
majorSecond
majorSeventh
majorSixth
majorThird
majorThirteenth
minorNinth
minorSecond
minorSeventh
minorSixth
minorThird
minorThirteenth
ninth
octave
perfectEleventh
perfectFifth
perfectFourth
second
seventh
sixth
thirteenth
unison
transpose
beTransposedBy: i
beTransposedOneStepDown
used by the score editor as diatonic step!
beTransposedOneStepUp
used by the score editor as diatonic step!
beUpAnOctave
downAnOctave
setPitchTo: aPitch
switchTo: aNote
transposeOf: anInterval
three cases: integer (+/-), method name (= ascending interval), or interval
object
upAnOctave
comparing
<= aNote
= x
> aNote
>= aNote
hash
isbetween: n1 and: n2
isNearerTo: n1 than: n2
midiPitchEquals: aNote
pitchEqual: aNote
theNearestPitch: list
(N A flat @ 2) theNearestPitch: (Array with: (N C @ 2) with: (N C @ 3))
mutations
leading
lowerLeadingToneInScale: s
upperLeadingToneInScale: s
private-pacts
modifying
modify octave according to the given tessitura
mutations more
dottedFull
dottedHalf
dottedQuarter
eighth
eighthInTriplet
full
half
quarter
quarterInTriplet
sixteenth
accessing delegation
constraining
MetaClass: OctaveDependentNote class
creation
fromMidiPitch: n
yields the note that has n as midiPitch. Only natural and sharp
notes are created as there is no possible way of knowing the
intention
named: s
self named: 'Re#2'
octave: o pc: pc
examples
(N do octave: 3) minorThird sharp sharp E#3
(N C octave: 3) semiTonesWith: (N la octave: 4) 21
(#(do re mi fa sol la si ) collect: [:x | (N perform: x) octave: 3])
collect: [:y | y - #octave]
(N B octave: 3) intervalBetween: (N B flat octave: 4)
(N B octave: 3) intervalBetween: (N B flat octave: 2)
(N C octave: 3) intervalBetween: (N C octave: 2) descending octave
(N C octave: 2) intervalBetween: (N C octave: 3) octave
vocal ranges
retourne la collection des notes de l'alto
altoRangeInScale: aScale
OctaveDependentNote sopranoRangeInScale: (N do sharp minorScale)
baseRange
retourne la collection des notes de la basse
baseRangeInScale: aScale
OctaveDependentNote sopranoRangeInScale: (N do sharp minorScale)
sopranoRange
retourne la collection des notes du soprano
sopranoRangeInScale: aScale
OctaveDependentNote sopranoRangeInScale: (N do sharp minorScale)
tenorRange
retourne la collection des notes du tenor
tenorRangeInScale: aScale
OctaveDependentNote sopranoRangeInScale: (N do sharp minorScale)
Class: ChromaticInterval
printing
Superclass: Siren.MusicalInterval
Category: Music-PitchClasses
used to produce intervals with no names, measured only in terms
of a number of semie tones (for non-tonal music)
MetaClass: ChromaticInterval class
examples
(N C octave: 3) transposeBySemiTones: 4 -> E3
creation
anInterval without type, only chromatic
Class: PitchClassDoubleSharp
saving
Superclass: Siren.PitchClassAltered
Category: Music-PitchClasses
intervals
alterateBelow: note toReach: i
closestEnharmonic
semiTonesToNatural
access
la methode diese n'est pas definie et provoque donc une erreur
semiToneCount
sharp
Sorry, I have to do that (Cf. Bluesette) otherwise I can't
compute possibleTonalities properly ...
printing
storeOn: s
N C sharp sharp storeString
testing
MetaClass: PitchClassDoubleSharp class
printing
Superclass: Object
Category: Music-PitchClasses
Instance variables: sharps flats
scales having only sharps OR flats in their signature.
So method tonality here works only for legal scales.
It should possible to compute the tonality for arbitrary scales though,
but I am not sure how
storeOn: s
testing
isEmpty
isLegal
sharpsInRightOrder
tonality
access
flats
initialize
nbFlats: n
nbSharps: n
reOrderSharpsAndFlats
attempts to reorder flats and sharps according to the natural order as found in
PitchClass
sharps
sharps: s flats: f
attempts to reorder flats and sharps according to the natural order as found in
PitchClass
MetaClass: Signature class
examples
example2
Signature new tonality -> C MajorScale
(Signature new nbSharps: 4) tonality -> E MajorScale
(Signature new nbFlats: 3) tonality -> Eb MajorScale
example3
Signature fromTonality: N D majorScale
Signature fromTonality: N E flat majorScale
example4
Signatures may be created for illegal scales. However, method
tonality yields an error for these scales:
Signature fromTonality: N D minorScale -> 1 sharps; 1 flats
Signature sharps: (Array with: N F sharp) flats: (Array with: (N E flat)) -> 1 sharps; 1 flats
(Signature fromTonality: N D minorScale) tonality -> error
creation
Signature choseSignature
fromTonality: aScale
Signature fromTonality: N E flat majorScale
new
sharps: s flats: f
Class: PitchClassNatural
intervals
Superclass: Siren.PitchClass
Category: Music-PitchClasses
Instance variables: semiToneCount nom name following preceding sharp flat
Join semitons to note in order to obtain the required number of semitones with self
alterateBelow: note toReach: i
Join semitons to note in order to obtain the required number of semitones with self
closestEnharmonic
semiTonesToNatural
semiTonesWithNaturalNote: aNote
number of semitones between self and aNote
semiTonesWithNaturalNoteBelow: aNote
number of semitones between aNote and self
accessing
flat: value
name
name: x
natural
nom
nom: value
sharp
sharp: value
private-accessing
following: value
preceding
preceding: value
semiToneCount
semiToneCount: s
printing
printOn: s
saving
MetaClass: PitchClassNatural class
saving
Superclass: Siren.PitchClassAltered
Category: Music-PitchClasses
intervals
alterateBelow: note toReach: i
closestEnharmonic
semiTonesToNatural
access
Sorry, I have to do that (Cf. Bluesette) otherwise I can't
compute possibleTonalities properly ...
semiToneCount
sharp
Methode flat is not defined.
Exemple C flat diminishedSeventh..
printing
storeOn: s
N C flat flat storeString
testing
MetaClass: PitchClassDoubleFlat class
testing
Superclass: Siren.MusicalInterval
Category: Music-PitchClasses
Que voudrait dire DescendingInterval topIfBottomIs: N C ?
(quelle difference avec ascending ?).
Introduit juste pour les besoins de la cause, mais un peu incoherent.
Herite tout de MusicalInterval, et donc se comporte presque pareil.
Utilisee uniquement en creation dans la methode intervalBetween: de OctaveDependentNote.
Il faudrait d'ailleurs modifier aussi la methode similaire de PitchClass
isDescending
computing notes
yields the note for which I am the interval self
topIfBottomIs: aNote
yields the note for which I am the interval self
mutations
descending
MetaClass: MusicalDescendingInterval class
examples
(N C octave: 3) intervalBetween: (N D octave: 2) descending Minor seventh
(N B flat octave: 3) intervalBetween: (N B flat flat octave: 2) descending augmented octave
Class: DiatonicInterval
private
Superclass: Siren.MusicalInterval
Category: Music-PitchClasses
Instance variables: ascending
computing notes
yields the note making the interval self with aNote
topIfBottomIs: aNote
yields the note making the interval self with aNote
printing
initialize
MetaClass: DiatonicInterval class
creation
descending
new
Class: PitchClassFlat
intervals
Superclass: Siren.PitchClassAltered
Category: Music-PitchClasses
Instance variables: flat
alterateBelow: note toReach: i
closestEnharmonic
semiTonesToNatural
saving
printing
storeOn: s
N C flat storeString
testing
accessing
flat: value
semiToneCount
sharp
MetaClass: PitchClassFlat class
automatic access
Superclass: Object
Category: Music-PitchClasses
Instance variables: root structure notes possibleTonalities
root: aValue
rootPitchClass
structure
structure: aValue
printing
produces a printable name (without the sharps before symbols)
notesString
printOn: s
quotedPrintOn: s
as printOn but without the brackets [] and with quotes
storeOn: s
returns a String representation of the receiver from which the receiver
can be reconstructed
structureString
note testing
The previous version couldnt deal with situations like
(FPChord newFromString: 'C 7 aug9') possibleTonalitiesInScaleClass: MajorScale
chordNotesAmong: list
select among given notes those that are chord notes
containsNote: n
nextIn: aCS
nonChordNotesAmong: list
select among given notes those that are chord notes
notes: aListOfNotes contains: anArrayOfIntervals
creation
format the structure. Assumes root is not nil
fromNotes: l
assumes the first note is the root
fromNotes: aList root: r
l isa list of pitch-classes.
This method computes the correct (and canonical) name for the chord
fromString: l
l is a list whose first element is a note and the rest a structure, in our
standardized chord syntax
structureFromNotes: aList root: r
l isa list of pitch-classes.
This method computes the correct (and canonical) name for the chord
notes computation
computes the list of notes from the structure. The job is the opposite
of what is written is method fromListOfNotes.
Assumes root is not nil.
| c |
c := FPChord newFromString: 'A halfDim7'.
c computeAllNotes.
c notes
computeDiminished
computeEleventh
computeFifth
computeNinth
computeRoot
computeSeventh
computeSixth
computeThird
computeThirteenth
notes
notesWithinOctave
accordingly, return the notes as in the case of a four note chord
with no higher dissonances
compute possible tonalities
analyseIn: aScale
en majeure, mineure harm et min mel
computePossibleTonalities
self allInstancesDo: [:x| x computePossibleTonalities]
matchWith: c
((Chord new fromString: 'D min 7') computeAllNotes) format
matchAvec: ((N re majorScale genereAccordsPoly: 4) at: 3).
possibleTonalitiesInScaleClass: s
possible tonalities in scale class s.
(PitchClassChord newFromString: 'C ') possibleTonalitiesInScaleClass: MajorScale AnalysisList ({I de C MajorScale} {IV de G MajorScale} {V de F MajorScale} )
There is a problem here, related to invalid scales. If you ask for
instance the possible tonalities of 'C# min', it will try to say that V of G# major is a
possible tonality. But the creation of G# major raises an error since it
is an invalid scale. For the moment I leave it as is because I would
like to have a model of reasoning in an object-oriented setting first
standardPossibleTonalities
possible tonalities in scale class major, minorMel and minorHarm
(Chord new fromString: 'C min') standardPossibleTonalities
ListeDAnalyses ({II de Sib MajorScale} {III de Lab MajorScale} {VI de
Mib MajorScale} {I de Do HarmonicMinorScale} {IV de Sol
HarmonicMinorScale} {I de Do MelodicMinorScale} {II de Sib
MelodicMinorScale} )
tonalitesCommunesAvec: unAccord
(FPChord newFromString: 'C min') tonalitesCommunesAvec: (FPChord
newFromString: 'D b ')
tonalitesCommunesAvec: unAccord et: autreAccord
(FPChord newFromString: 'C min') tonalitesCommunesAvec: (FPChord
newFromString: 'D b ')
transposing
transposeOf: interval
FP
accessing
possibleTonalities
initializations
initialize
resetNotes
reset notes to an empty collection when an important change occurred
accessing by intervals
theFourth
theOctave
theSeventh
theThird
theTonic
testing ok
hasA: anInterval
(FPChord newFromString: 'C min 7') hasA: #majorThird
hasADiminishedFifth
hasADiminishedSeventh
hasAMajorSeventh
hasAMinorSeventh
hasAnAugmentedFifth
hasNoFifth
hasNoSeventh
isAlterate
isDiminished
isDominant
isHalfDiminished
isMajor
isMinor
isSuspended
structureHasEitherOf: aList
structureHasNeitherOf: aList
mutations
asPlayableObject
defaultOctave
fondamental
inTessitura: qt
lapse: l
octave: n
startBeat: s duration: d
a default octave is used
startTime: s duration: d
tessitura
other computations
remark: not that this method answers the interval between
the root *pitch classes*!!
private-pact
answer the most plausible tonality when the chor is isolated.
Later, I will rewrite it to bypass possibleTonalities for sake of efficience
MetaClass: PitchClassChord class
creation
newFromNotes: l
computes the name from the list of notes, according to our syntax
newFromNotesNames: aStringOfNoteNames
computes the name from the list of notes, according to our syntax
PitchClassChord newFromNotesNames: 'A C# E G' [La 7 ]
newFromString: l
computes the list of notes fom the name acording to our syntax
root: r structure: s
editing
examples
self allChordsFromListOfNotes: (Array with: N do with: N mi with: N sol)
#(Do Mi #min #no5 #no11 #no9 #no7 #dim13 Sol #sus4 #no5 #sixth )
self allChordsFromListOfNotes: (Array with: N do with: N mi with: N sol with: N si)
commonTonalities
(PitchClassChord new fromString: 'C maj7')
possibleTonalities AnalysisList ({I of C MajorScale} {IV of G MajorScale} {VI of E HarmonicMinorScale} )
(PitchClassChord new fromString: 'F maj7')
possibleTonalities AnalysisList ({I of F MajorScale} {IV of C MajorScale} {VI of A HarmonicMinorScale} )
(PitchClassChord new fromString: 'E min 7')
possibleTonalities AnalysisList ({II of D MajorScale} {III of C MajorScale} {VI of G MajorScale} {IV of B HarmonicMinorScale} {II of D MelodicMinorScale} )
----
(PitchClassChord new fromString: 'C maj7')
tonalitesCommunesAvec: (PitchClassChord new fromString: 'F maj7')
et: (PitchClassChord new fromString: 'E min 7') Set (C MajorScale )
examples
(PitchClassChord new fromString: 'Re maj7') notes OrderedCollection (Re Fa# La Do# )
(PitchClassChord new fromString: 'Re# maj7') notes OrderedCollection (Re# Fa## La# Do## )
(PitchClassChord new fromString: 'C') notes OrderedCollection (Do Mi Sol )
(PitchClassChord new fromString: 'D min 7 dim5') notes OrderedCollection (Re Fa Lab Do )
(PitchClassChord new fromString: 'C aug9') notes OrderedCollection (Do Mi Sol Sib Re# )
(PitchClassChord new fromString: 'C aug9 dim5') notes OrderedCollection (Do Mi Solb Sib Re# )
(PitchClassChord new fromString: 'C 13') notes OrderedCollection (Do Mi Sol Sib Re Fa La )
(PitchClassChord new fromString: 'C 13 aug9') notes OrderedCollection (Do Mi Sol Sib Re# Fa La )
(PitchClassChord new fromString: 'C 13 aug9 no7') notes OrderedCollection (Do Mi Sol Re# Fa La )
(PitchClassChord new fromString: 'C halfDim7') notes OrderedCollection (Do Mib Solb Sib )
'F min 7' asChord notes > OrderedCollection (F Ab C Eb )
'F min7' asChord notes > OrderedCollection (F A C )
'F m 7' asChord notes > OrderedCollection (F A C Eb )
'Fm 7' asChord notes > error
'F maj 7' asChord notes > error
'F m7' asChord notes > OrderedCollection (F A C )
'F maj 7' asChord notes > OrderedCollection (F A C Eb )
'F maj7' asChord notes > OrderedCollection (F A C E )
'F halfDim7' asChord notes > OrderedCollection (F Ab Cb Eb )
'F min dim5 7' asChord notes OrderedCollection (F Ab Cb Eb )
'F min b5 7' asChord notes OrderedCollection (F Ab Cb Eb )
'F dim7' asChord notes OrderedCollection (F A C Ebb )
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N sol) Do
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N sol sharp) Do #aug5
PitchClassChord new fromNotes: (Array with: N do with: N fa with: N sol ) Do #sus4
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N sol with: N la) Do #sixth
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N la) Do #no5 #sixth
PitchClassChord new fromNotes: (Array with: N do with: N la) Do #no3 #no5 #sixth
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N sol sharp with: N si) Do #aug5 #maj7
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N sol flat with: N si flat) Do #dim5 7
PitchClassChord new fromNotes: (Array with: N do with: N mi flat with: N sol flat with: N si flat) Do #halfDim7
PitchClassChord new fromNotes: (Array with: N do with: N mi flat with: N sol flat with: N si flat flat) Do #dim7
PitchClassChord new fromNotes: (Array with: N do with: N mi flat) Do #min #no5
PitchClassChord new fromNotes: (Array with: N do with: N mi with: N fa with: N fa sharp ) Do #no5 #no9 #no7 11 #aug11
PitchClassChord new fromNotes: (Array with: N do with: N sol flat with: N sol sharp) Do #no3 #dim5 #aug5
A chord of A. holdsworth
PitchClassChord new fromNotes: (Array with: N re sharp with: N fa sharp sharp with: N la with: N do sharp sharp) Re# #dim5 #maj7
(PitchClassChord new fromString: 'C min') standardPossibleTonalities OrderedCollection ({II de Sib MajorScale} {III de Lab MajorScale} {VI de Mib MajorScale} {I de Do HarmonicMinorScale} {IV de Sol HarmonicMinorScale} {I de Do MelodicMinorScale} {II de Sib MelodicMinorScale} )
(PitchClassChord new fromString: 'Do') possibleTonalities
ListeDAnalyses ({V de Fa HungarianMinor} {VI de Mi HungarianMinor} {I de Do MajorScale} {IV de Sol MajorScale} {V de Fa MajorScale} {I de Do DoubleHarmonic} {II de Si DoubleHarmonic} {IV de Sol MelodicMinorScale} {V de Fa MelodicMinorScale} {IV de Sol Oriental} {IV de Sol NeapolitanMajor} {V de Fa HarmonicMinorScale} {VI de Mi HarmonicMinorScale} {II de Si NeapolitanMinor} {VI de Mi NeapolitanMinor} )
(PitchClassChord new fromString: 'D min ') possibleTonalities
ListeDAnalyses ({I de Re HungarianMinor} {VII de Mib HungarianMinor} {II de Do MajorScale} {III de Sib MajorScale} {VI de Fa MajorScale} {III de Sib DoubleHarmonic} {IV de La DoubleHarmonic} {I de Re MelodicMinorScale} {II de Do MelodicMinorScale} {I de Re NeapolitanMajor} {I de Re HarmonicMinorScale} {IV de La HarmonicMinorScale} {I de Re NeapolitanMinor} {IV de La NeapolitanMinor} )
exampleShort
'C min 7 dim5' asChord.
('C min 7 dim5 9' asChordOct: 4) notes
OrderedCollection (C4 Eb4 Gb4 Bb4 D5 )
holdsworth
reallyAllChordsFromListOfNotes: aList
self reallyAllChordsFromListOfNotes: (Array with: N do with: N mi with: N sol)
OrderedCollection ([La #noRoot #min 7 ] [Si #noRoot #sus4 #no5 #no7 #dim9 #dim13 ] [Do ] [Re #noRoot #sus4 #no5 7 9 ] [Mi #min #no5 #no11 #no9 #no7 #dim13 ] [Fa #noRoot #no3 #maj7 9 ] [Sol #sus4 #no5 #sixth ] [La# #noRoot #no3 #dim5 ] [Do# #noRoot #min #dim5 ] [Re# #noRoot #no3 #no5 #dim9 ] [Fa# #noRoot #no3 #dim5 7 #dim9 ] [Sol# #noRoot #no3 #no5 #no11 #no9 #no7 #dim13 ] [Lab #noRoot #aug5 #maj7 ] [Sib #noRoot #no3 #no5 #no7 9 #aug11 #sixth ] [Reb #noRoot #no3 #no5 #maj7 #aug9 #aug11 ] [Mib #noRoot #no5 #sixth ] [Solb #noRoot #no3 #no5 #no9 #no7 #aug11 ] )
Class: OctaveDependentChord
saving
Superclass: Siren.PitchClassChord
Category: Music-PitchClasses
Instance variables: notesByInterval
by the names of their intervals with the root. The calculation
is done once forever. On the contrary, for FPChord the
calculation is done all the times a note is required since
its rarely required.
Note that for all request (e.g. theFifth) the copy of the note is
answer). it is necessary in order to avoid some confusions. For instance,
the pitches (ODNotes) of an simple arpeggio on a chord ch may be
obtained by:
o := OredredCollection new.
o add: ch theTonic; add: ch theThird; ch theFifth; theTonic.
the first and last must be different objects in the case we will assign
them todifferents PlayableNotes.
storeOn: s
mutations
asPlayableObject
lapse: l
startBeat: s duration: d
startTime: s duration: d
accessing
notes: value
removeNote: c
alteration
octaveFromNote: n
set octave from new root or chord note
copy
private-pact
((FPChord newFromString: 'C maj7') @ 3) closestTriadNoteTo: N B flat @ 2
closestTriadNoteTo: n
((FPChord newFromString: 'C maj7') @ 3) closestTriadNoteTo: N B flat @ 2
closestUpTriadNoteTo: n
((PitchClassChord newFromString: 'C maj7') @ 3) closestTriadNoteTo: N B flat @ 2
containsLegalNote: n
downTriadNotes
return all triad notes within 2 octaves in a particular order
triadDownNoteLeadingTo: n
for the conflicting cases uses the priority given by the ordering
of upAndDownTriadNotes
triadNoteLeadingTo: n
for the conflicting cases uses two priority criteria: the proximity and
the ordering given by triadNotesLeadingTo:
triadNotesLeadingTo: n
answer the chord 'triad' notes (extend to 7?) within an octave,
that are leading notes to the given note n
triadUpNoteLeadingTo: n
for the conflicting cases uses the priority given by the ordering
of upAndDownTriadNotes
upAndDownTriadNotes
return all triad notes within 2 octaves in a particular order
upTriadNotes
return all triad notes within 2 octaves in a particular order
initialize
resetNotes
extend super class method for notesByIntevals
notes by intervals
only for triad notes
notesByInterval
reallyTheFifth
reallyTheLowFifth
reallyTheLowOctave
reallyTheLowThird
attention: do not cofound with 'root downThird interval
reallyTheOctave
reallyTheThird
reallyTheTonic
theFifth
theLowFifth
theLowOctave
theLowThird
theOctave
theThird
theTonic
As yet unclassified
WARN: the calculatin of the seven is done in every request
FP
transposing
beTransposedOneStepUp
MetaClass: OctaveDependentChord class
cation
readFromFile
readFromFile: fileName
root: r notes: n
examples
example1
self example1
example2
Class: Triad
type
Superclass: Siren.PitchClassChord
Category: Music-PitchClasses
Instance variables: type
type: t
notes
MetaClass: Triad class
intervals
Superclass: Siren.PitchClassAltered
Category: Music-PitchClasses
Instance variables: sharp
alterateBelow: note toReach: i
closestEnharmonic
semiTonesToNatural
saving
printing
storeOn: s
N C sharp storeString
testing
accessing
semiToneCount
sharp
sharp: value
MetaClass: PitchClassSharp class
change
Superclass: ApplicationModel
Category: Music-PitchClasses
Instance variables: pitchClass pitchClassIndex structure seventh eleventh
root ninth fifth third thirteenth noteNames
structureChanged
initialize
aspects
eleventh
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
fifth
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
ninth
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
noteNames
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
pitchClass
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
pitchClassIndex
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
root
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
seventh
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
structure
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
third
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
thirteenth
This method was generated by UIDefiner. The initialization provided
below may have been preempted by an initialize method.
actions
doMaj
doMaj7
doMin7
MetaClass: ChordNameEditor class
interface specs
UIPainter new openOnClass: self andSelector: #windowSpec
resources
UIMenuEditor new openOnClass: self andSelector: #eleventhMenu
fifthMenu
UIMenuEditor new openOnClass: self andSelector: #fifthMenu
ninthMenu
UIMenuEditor new openOnClass: self andSelector: #ninthMenu
rootMenu
UIMenuEditor new openOnClass: self andSelector: #rootMenu
seventhMenu
UIMenuEditor new openOnClass: self andSelector: #seventhMenu
thirdMenu
UIMenuEditor new openOnClass: self andSelector: #thirdMenu
thirteenthMenu
UIMenuEditor new openOnClass: self andSelector: #thirteenthMenu
Class: Scale
accessing
Superclass: Object
Category: Music-PitchScales
Instance variables: root notes
Class variables: AllNotes
noteAfter: aNote
aNote can be a pitchClass, a pitch (ODNote) or even a PlayableNote.
coputation takes into accont circularity and is approximative wrt aNote
alterations
noteBefore: aNote
aNote can be a pitchClass, a pitch (ODNote) or even a PlayableNote.
coputation takes into accont circularity and is approximative wrt aNote
alterations
notes
root
root: value
scale tone chords
yields n notes from startNote by intervals of int
chordFromNotes: l
following: noteDepart by: x
rend la x ieme note a partir de noteDepart dans mes notes
generateChordsPoly: n
generate the list of 7 scale tone chords from my notes with polyphony n
generateChordsPoly: n inOctave: oct
generate the list of 7 scale tone chords from my notes with polyphony n
indexDe: uneNote
scaleToneTriads
N C majorScale scaleToneTriads
(NeapolitanMinor root: N D ) scaleToneTriads
octave-dependent notes
first note is in octave o. others follow (and may shift octave!)
asPitchesInOctave: o
closestPitchClassTo: aPc
decendingFromOctave: o
first note is in octave o. others follow (and may shift octave!)
diatonicNotesFrom: dep to: arr
assumes a and b belong to the scale.
N re minorScale diatonicNotesFrom: (N do sharp octave: 3) to: (N re octave: 4)
octave: o
computing notes
intervalList depends on the type of the scale. It is redefined in each
subclass of Scale
intervalList
yields the list of interval. Redefined in subclasses
leadingNote
N la minorScale leadingNote
reverseNotes
first is root, others following descending order
tonic
N re minorScale tonic
printing
storeOn: s
degres
degreeOfNote: aNote
transpose
testing
containsAllOfTheseNotes: listOfNotes
containsNote: n
isMajor
isMinor
isValid
querying
Warning: doubles sharps are not sharps!
numberOfFlats
Attention les doubles bemols ne sont pas des bemols!
numberOfSharps
Attention les doubles dieses ne sont pas des dieses!
sharpNotesInSignature
Warning: doubles sharps are not sharps!
comparing
Paleo
enharmonicScale
pitchClassFor: p
N C majorScale pitchClassFor: N A
MetaClass: Scale class
creation
self askScale
root: aNote
standardScales
warn: s
examples
N la flat majorScale notes -> #(Lab Sib Do Reb Mib Fa Sol )
N do harmonicMinorScale notes -> #(Do Re Mib Fa Sol Lab Si )
N re majorScale numberOfSharps -> 2
N do majorScale generateChordsPoly: 4 ->
OrderedCollection ([Do #maj7 ] [Re #min 7 ] [Mi #min 7 ] [Fa #maj7 ] [Sol 7 ] [La #min 7 ] [Si #halfDim7 ] )
N do majorScale generateChordsPoly: 6
-> OrderedCollection (Do #maj7 9 11 Re #min 7 9 11 Mi #min 7 #dim9 11 Fa #maj7 9 #aug11 Sol 7 9 11 La #min 7 9 11 Si #min #dim5 7 #dim9 11 )
N do majorScale generateChordsPoly: 7
-> OrderedCollection (Do #maj7 9 11 13 Re #min 7 9 11 13 Mi #min 7 #dim9 11 #dim13 Fa #maj7 9 #aug11 13 Sol 7 9 11 13 La #min 7 9 11 #dim13 Si #min #dim5 7 #dim9 11 #dim13 )
N re HarmonicMinorScale generateChordsPoly: 3
N do majorScale degreDeAccord: (FPChord new fromString: 'Fa min 7')
-> 4
interval list
Paleo class initialize
Class: ChromaticScale
interval list
Superclass: Siren.Scale
Category: Music-PitchScales
Class: MelodicMinorScale
Paleo
Superclass: Siren.Scale
Category: Music-PitchScales
enharmonicScale
MetaClass: MelodicMinorScale class
interval list
intervalList
Class: Oriental
interval list
Superclass: Siren.Scale
Category: Music-PitchScales
tire de McLaughlin et le Mahavishnu Orchestra
Class: DoubleHarmonic
interval list
Superclass: Siren.Scale
Category: Music-PitchScales
tire de McLaughlin et le Mahavishnu Orchestra
Class: NeapolitanMajor
interval list
Superclass: Siren.Scale
Category: Music-PitchScales
tire de McLaughlin et le Mahavishnu Orchestra
Class: NeapolitanMinor
interval list
Superclass: Siren.Scale
Category: Music-PitchScales
tire de McLaughlin et le Mahavishnu Orchestra
Class: HarmonicMinorScale
Paleo
Superclass: Siren.Scale
Category: Music-PitchScales
enharmonicScale
MetaClass: HarmonicMinorScale class
interval list
intervalList
Class: PseudoMinorScale
interval list
Superclass: Siren.Scale
Category: Music-PitchScales
Class: MajorScale
Paleo
Superclass: Siren.Scale
Category: Music-PitchScales
enharmonicScale
MetaClass: MajorScale class
interval list
intervalList
Class: HungarianMinor
examples
Superclass: Siren.Scale
Category: Music-PitchScales
(HungarianMinor root: N do) notes -> #(Do Re Mib Fa# Sol Lab Si )
(HungarianMinor root: N do) generateChordsPoly: 4
-> OrderedCollection (Do #min #maj7 Re #dim5 7 Mib #aug5 #maj7 Fa# #dim5 #dim7 Sol #maj7 Lab #maj7 Si #min #dim7 )
(FPChord newFromString: 'D min ') possibleTonalitiesInScaleClass: self ->
ListeDAnalyses ({I de Re HungarianMinor} {VII de Mib HungarianMinor} )
interval list
tire de McLaughlin et le Mahavischnu Orchestra
Class: Sound
testing
Superclass: Siren.Function
Category: Music-Sound
Indexed variables: objects
Imports: private SoundConstants.*
The abstract class Sound is vacuous.
Sounds use their Function and DurationEvent behaviors actively.
Answer true.
initialize-release
Free the receiver's external data, if any
initialize
Set up a default sound.
cue accessing
Add the given named cue region to the receiver's list.
cueList
Answer the receiver's 'cueList'.
cueList: CollectionOfCues
Set the receiver's 'cueList' to be the given OrderedCollection of (#name -> (start to: stop)) cues.
cueNamed: cName
Answer a sound derived from the receiver using the samples between the named cue points.
cueRegionNamed: cName
Answer a indices for the samples between the named cue points.
MetaClass: Sound class
instance accessing
Answer the sound by the given name, or nil.
named: aName put: aSound
Put the given sound in the shared dictionary under the given name.
utilities
Open the given file (AIFF, IRCAM, NeXT, or SPARC soundfile format)
playFile: theName
Play the sound file with the given name
Class: SampledSound
The class SampledSound is concrete and assumes 16-bit linear encoding of samples; there are subclasses for floating-point and 8-bit Mu-law sample types. There are useful class methods for creating a number of standard sounds such as silence, impulses, swept sine waves, etc. Note that SampledSound uses the 'range' instance variable inherited from Function as its (integer) size.
Instance variables:
Other properties, such as the sound's (optional) file name, its sample rate, or the number of channels, are stored in the property list dictionary that is inherited by virtue of being an event subclass.
KNOWN BUGS:
Note that not all of this class is finished--there are methods that call non-existent user primitives and have no Smalltalk implementations (like the heavy DSP).
accessing
Superclass: Siren.Sound
Category: Music-Sound
Instance variables: name rate format channels samplesInMemory firstIndex
Indexed variables: objects
Class variables: MagicNumbers MaxIntSample MinIntSample
Imports: private SoundConstants.*
name
rate
format
channels
samplesInMemory
size for very large sounds)
firstIndex
for very large "paged" sounds)
channels
Answer the receiver's 'channels'.
channels: anObject
Set the receiver's instance variable 'channels' to be anObject.
copy
Answer a 'clean' copy of the receiver.
copyAllButSamples
Answer a 'clean' copy of the receiver, but don't write in the samples yet.
copyFrom: start to: stop
Answer a copy of the receiver for the given sample range.
cueNamed: cName
Answer a sound derived from the receiver using the samples between the named cue points.
envelope
Answer the receiver's envelope.
envelope: anEnv
Set the receiver's envelope property.
file
Answer the sound file for the receiver (if present).
firstIndex
Answer the receiver's 'firstIndex'.
firstIndex: anObject
Set the receiver's instance variable 'firstIndex' to be anObject.
floatsFrom: aStart to: aStop
Answer a copy of the receiver's data within the given sample range.
format
Answer the receiver's 'format'.
format: fSymbol
Set the receiver's instance variable 'format' to be fSymbol.
frameRate
Answer the receiver's 'rate'.
from: aStart to: aStop
Answer a copy of the receiver within the given time range.
fromSample: start toSample: finish
Answer a copy of the receiver within the given sample range.
hasFile
Answer whether the receiver is stored on a file of the same name.
longFormat
Answer the receiver's format as a descriptive string.
name
Answer the receiver's 'name'.
name: anObject
Set the receiver's instance variable 'name' to be anObject.
rate
Answer the receiver's 'rate'.
rate: anObject
Set the receiver's instance variable 'rate' to be anObject.
sampleRate
Answer the receiver's 'rate'.
samples
Answer the instance variable 'data'.
samples: theArray
Accept the argument, 'theArray', (a Byte, Word, or Float array, or an UninterpretedBytes)
as the new instance variable 'samples'.
samplesInMemory
Answer the receiver's 'samplesInMemory'.
samplesInMemory: anObject
Set the receiver's instance variable 'samplesInMemory' to be anObject.
sampleSize
Answer the size in bytes of the receiver's samples (2).
size
Return the receiver's size in sample frames.
size: aNumber
Set the receiver's 'size' in samples.
sizeInBytes
Answer the size in bytes of the receiver.
sizeInFrames
Return the receiver's size in sample frames.
sample accessing
Answer the value at the given index (between 0 and 1).
at: anIndex put: aValue
Stuff the given sample at the given index (after lots of checking and testing).
cutFrom: startSample to: stopSample
Cut the designated section from the receiver; answer a new sound (!).
floatSampleAt: index
Answer the sample at the given index as a normalized floating-point number.
floatSampleAt: index put: aValue
Stuff the given floating-point sample at the given index after scaling.
intSampleAt: index
Answer the sample at the given index as an integer.
intSampleAt: index put: aValue
Stuff the given integer sample at the given index.
paste: aSound from: startSample to: stopSample at: index
Paste the given sound into the receiver; answer a new sound (!).
sampleAt: index
Answer the sample at the given index, mapping and paging as necessary.
sampleAt: anIndex put: aValue
Stuff the given sample at the given index (after lots of checking and testing).
interpolating
Answer the cummulative error between the portions of my waveform starting at the given two indices and extending for the given length. The larger this error, the greater the difference between the two waveforms.
errorBetween: sampleArray1 and: sampleArray2
Answer the cummulative error between the two sample arrays, which are assumed to be the same size.
fadeInOver: fTime
Apply a fade-in ramp to the receiver with the given time.
fadeOutOver: fTime
Apply a fade-in ramp to the receiver with the given time.
interpolatedWindowAt: anIndex width: nSamples
Return an array of N samples starting at the given index in my data.
sampledFrom: aStart to: aStop into: anArray
Place a down-sampled version of the receiver in the argument array.
sampledTo: anArray
Place a down-sampled version of the receiver in the argument array.
sampleMaxFrom: aStart to: aStop into: anArray
Place a version of the root-mean-square energy of the receiver in the argument array.
merging
Extract the given channel from the receiver into the argument sound.
mergeChannel: cNumber from: aSound
Merge the argument sound into the given channel of the receiver.
envelopes
Answer the average sample value of the receiver (normally the DC offset).
computeEnvelope: type
Compute a sample envelope for the receiver with 128 points per second.
computePeakEnvelope
Compute a windowed peak sample envelope for the receiver with 1024 points per 4 seconds.
computeRMSEnvelope
Compute a windowed root-mean-square sample envelope for the receiver.
edit
Edit the receiver.
max
Answer the maximum value of the samples.
offsetBy: aFactor
Answer a copy of the receiver offset by the given factor.
offsetFrom: aStart to: aStop by: anOffset
Answer a copy of the receiver offset by the given factor.
peakEnvelope
Answer the receiver's peak-detected envelope, or compute a new one.
peaksFrom: aStart to: aStop into: anArray
Place a version of the root-mean-square energy of the receiver in the argument array.
readEnvelope: type
Try to read the sample envelope for the receiver from a file named XXX.env.
rmsEnvelope
Answer the receiver's envelope, or compute a new one.
rmsFrom: aStart to: aStop into: anArray
Place a version of the root-mean-square energy of the receiver in the argument array.
rmsTo: anArray
Place a version of the root-mean-square energy of the receiver in the argument array.
scaleBy: aScaleFactor
Scale the receiver's samples by the given factor.
scaledBy: aScaleFactor
Answer a copy of the receiver scaled by the given factor.
scaledByEnvelopeArray: anArray
Answer a copy of the receiver scaled by the given envelope array.
scaledByFunction: aFunction
Answer a copy of the receiver scaled by the given breakpoint envelope expressed as points.
scaledFrom: aStart to: aStop by: aScaleFactor
Answer a copy of the receiver scaled by the given factor.
scaledFrom: aStart to: aStop byEnvelopeArray: anArray
Answer a copy of the receiver scaled by the given envelope array.
scaledFrom: aStart to: aStop byFunction: aFunction
Answer a copy of the receiver scaled by the given breakpoint envelope expressed as points.
scaleFrom: aStart to: aStop by: aScaleFactor
Scale the receiver's damples by the given factor.
writeEnvelope: type
Write the sample envelope for the receiver to a file named XXX.env or XXX.pk.
enumerating
Evaluate aBlock with each of the receiver's elements as the argument.
printing
pretty-print the receiver.
printSamples
pretty-print a few samples.
printSamplesOn: aStream
Pretty-print a few samples--32 by default, 1024 if shift-down, *all* of ctrl and shift down.
storeOnFileNamed: aName
Save the receiver on the sound file named by the argument.
private
Read samples in from the file if none in memory.
mapSampleIndex: index
Map the given sample index according to the 'page' (firstIndex) of the receiver.
privateSampleAt: anIndex
Answer the sample at the given index as an integer.
privateSampleAt: anIndex in: cPtr bigEndian: isBE
Answer the sample at the given index as an integer,
assuming the output is a cPointer; handle endianness.
privateSampleAt: anIndex in: cPtr put: value bigEndian: isBE
Answer the sample at the given index as an integer,
assuming the output is a cPointer; handle endianness.
privateSampleAt: anIndex put: aValue
Stuff the given sample at the given index (safely).
readSamplesFrom: index
Read in samples from disk starting a bit before the given index.
realSound
Answer the real sound for the receiver (overridden in virtual subclasses).
scaleSampleIndex: index
Scale the given sample index according to the sample size of the receiver.
play/record
Copy data from the receiver into the given output buffer; answer the current sample index.
play
Play the receiver out over the default sound port.
testing
Answer whether the receiver has any gaps.
isComposite
Answer whether the receiver is a composite sound.
isEmpty
Answer whether the receiver is empty.
isVirtual
Answer whether the receiver is a virtual sound.
initialize-release
Set up a default sound.
MetaClass: SampledSound class
instance creation
Answer the default empty sound.
duration: aDur named: nameString rate: aRate channels: aChannels format: aFormat
Answer a new 16-bit linear sound with the given properties.
duration: aDur rate: aRate channels: aChannels
Answer a new sound with the given properties.
duration: aDur rate: aRate channels: aChannels format: aFormat
Answer a new sound with the given properties.
fromData: anArray named: nameString rate: aRate channels: aChannels format: aFormat
Answer a new sound from the given data.
fromData: anArray rate: aRate channels: aChannels format: aFormat
Answer a new 16-bit linear sound from the given data.
fromDblData: anArray rate: aRate channels: aChannels size: siz
Answer a new sound from the given data.
headerFromFile: nameString
Open the given file (EBICSF, NeXT, or SPARC soundfile format)
named: aName size: aSize format: formatSymbol
Answer a new Sound with the given name and storage size.
named: nameString size: size rate: rate channels: chans format: formatSymbol
Answer a new Sound with the given storage size (in sample frames), etc.
named: nameString size: size rate: rate channels: chans format: formatSymbol data: data
Answer a new Sound with the given storage size (in sample frames), etc.
size: size format: formatSymbol channels: chans
Answer a new Sound with the given storage size, etc.
size: size rate: aRate channels: chans
Answer a new Sound with the given storage size, etc.
size: size rate: rate channels: chans format: formatSymbol
Answer a new Sound with the given storage size, etc.
size: size rate: rate format: formatSymbol channels: chans
Answer a new Sound with the given storage size, etc.
examples
Answer a sampled sound from immediate data; inspect it.
rmsViewExample
Read a sampled sound from the file, take the rms into 64 values, and edit that.
sweepExample
Open a sound view on a swept sine wave.
sweepView
Open a sound view on a swept sine wave.
standard wave forms
Answer a sound with a constant value.
expSweepDur: dur rate: rate from: start to: stop chans: chans
Answer a SampledSound with a swept sine wave.
impulseOfDur: dur width: width rate: rate chans: chans
Create a sound with an impulse of the given characteristics.
linearSweepDur: dur rate: rate from: start to: stop chans: chans
Answer a StoredSound with a swept sine wave.
pulseTrainDur: dur rate: rate freq: freq width: width chans: chans
Answer a StoredSound with a pulse train.
pulseTrainDur: dur rate: rate freq: freq width: width chans: chans zero: zero
Answer a StoredSound with a pulse train.
rampDur: dur rate: rate chans: chans
Answer a StoredSound with a single ramp of samples.
sawtooth
Answer a StoredSound with raw sawtooth samples.
sawtoothDur: dur rate: rate freq: freq chans: chans
Answer a StoredSound with raw sawtooth samples.
sineDur: dur rate: rate freq: freq chans: chans
Answer a StoredSound with a pulse train.
squareDur: dur rate: rate freq: freq chans: chans
Answer a StoredSound with a square wave.
sweepDur: dur rate: rate from: start to: stop chans: chans
Answer a StoredSound with a swept sine wave.
class constants
Answer the symbolic code used for the format of the receiver's instances.
maxSample
Answer the maximum value of the receiver class.
minSample
Answer the minimum value of the receiver class.
Class: FloatSound
accessing
Superclass: Siren.SampledSound
Category: Music-Sound
Indexed variables: objects
There are behaviors for mapping into other formats.
Return the receiver's format--a symbol constant.
sampleSize
Answer the size in bytes of the receiver's samples (4).
private
Answer the sample at the given index.
privateSampleAt: index put: aValue
Stuff the given sample into the data array at the given index (no checking).
sample accessing
Answer the sample at the given index as a scaled 16-bit integer.
intSampleAt: index put: aValue
Put the given integer sample at the given index after scaling.
MetaClass: FloatSound class
class constants
Answer the symbolic code used for the format of the receiver's instances.
maxSample
Answer the maximum value of the receiver class.
minSample
Answer the minimum value of the receiver class.
examples
Answer a typical float sound read in from a file.
Class: ComponentSound
Instance Variables:
accessing
Superclass: Siren.Sound
Category: Music-Sound
Instance variables: start stop sound
Indexed variables: objects
It represents another sound that "composes" the composite.
sound
start
stop
offset
Answer the receiver's 'offset'.
offset: anObject
Set the receiver's 'offset' to be anObject.
sound
Answer the receiver's 'sound'.
sound: anObject
Set the receiver's 'sound' to be anObject.
start
Answer the receiver's 'start'.
start: anObject
Set the receiver's 'start' to be anObject.
stop
Answer the receiver's 'stop'.
stop: anObject
Set the receiver's 'stop' to be anObject.
printing
Pretty-print the receiver on the argument.
testing
Answer whether the argument is within the range of the receiver.
MetaClass: ComponentSound class
instance creation
Answer a new instance initialized with the arguments.
on: sound start: start stop: stop
Answer a new instance initialized with the arguments.
on: sound start: start stop: stop offset: offset
Answer a new instance initialized with the arguments.
Class: VirtualSound
Instance Variables:
accessing
Superclass: Siren.SampledSound
Category: Music-Sound
Instance variables: source
Indexed variables: objects
source
Set the cue name of the receiver
source
Answer the receiver's source sound.
source: aSound
Set the receiver's source sound.
start: start
Set the argument as the starting sample of the receiver.
stop: stop
Set the argument as the ending sample of the receiver.
sample accessing
Stuff the given sample at the given index **after transforming into a 'real' sound**.
private
Answer a 'real sound' based on the receiver.
mapSampleIndex: index
Map the given sample index according to the 'page' (firstIndex) of the source and the receiver's relative offset.
realSound
Answer the real sound for the receiver.
testing
Answer whether the receiver is a virtual sound.
MetaClass: VirtualSound class
instance creation
Answer a VirtualSound derived from the argument and named cue region.
examples
Open a sound view on a ramp with a chunk cut out of it.
Class: CompositeSound
Instance Variables:
sample accessing
Superclass: Siren.VirtualSound
Category: Music-Sound
Instance variables: components
Indexed variables: objects
It uses its components collection to maintain sounds and sample ranges that have been pasted together.
It responds to sampleAt: and sampleAt:put: just like other sounds, but stores only its components list on files unless explicitly told to store samples.
components
Answer the sample at the given index, mapping and paging as necessary.
private
Shift all the cues above the given one up by the given insert count.
accessing
Set the receiver's source sound.
paste: sound from: start to: stop at: index
Paste the designated section into the receiver.
testing
Answer whether the receiver is a composite sound.
MetaClass: CompositeSound class
instance creation
Answer a CompositeSound derived from the argument pasting in the given sound at the given index.
examples
Open a sound view on a ramp with a chunk of a sine pasted into it.
Class: GapSound
Instance Variables:
private
Superclass: Siren.VirtualSound
Category: Music-Sound
Instance variables: cutList
Indexed variables: objects
It uses its cut list instance variable to maintain sample ranges that have been deleted from the sound that comprises it (the source).
It responds to sampleAt: and sampleAt:put: just like other sounds, but stores only its cut list on files unless explicitly told to store samples.
cutList
Map the given sample index according to the cut list (i.e., deleted sections) of the receiver.
testing
Answer whether the receiver has any gaps.
accessing
no-op
cutFrom: startSample to: stopSample
Cut the designated section from the receiver.
samples
MetaClass: GapSound class
instance creation
Answer a CompositeSound derived from the argument missing the given range.
examples
Open a sound view on a ramp with a chunk cut out of it.
Class: EventAssociation
accessing
Superclass: Association
Category: Music-Support
Add the argument as a property of the receiver.
event
Answer the receiver's event (value).
start
Answer the receiver's start (key).
start: aTime
Set the receiver's start (key).
stop
Answer the stop time of the event association.
time
Answer the receiver's start (key).
printing
Append to the argument, aStream, the two elements of the
EventAssociation separated by a double-right arrow (=>).
comparing
Handle events, associations, and time/order sorting.
= anAssociation
If the argument's not an association, compare it to the receiver's value, otherwise answer whether the receiver's key and value are both equal to the argument's.
MetaClass: EventAssociation class
Instance variables:
Class variable:
See the class examples.
accessing
Superclass: Model
Category: Music-Support
Instance variables: appointments timers threads running doWait startTime
delay logTime
Class variables: Schedule
clients
appointments
running
doWait
scheduling--set to false if there is a lower level of scheduling
(e.g., primitive-level) or if output need not be real-time
startTime
Schedule
Add the argument, 'theApp', to the instance variable 'appointments'.
addClient: theApp at: start
Add the argument, 'theApp', to the instance variable 'appointments'.
addClient: theApp at: start loop: aBool
Add the argument, 'theApp', to the instance variable 'appointments'.
addClient: theApp in: start
Add the argument, 'theApp', to the instance variable 'appointments'.
addClient: theApp in: start loop: loopBool
Add the argument, 'theApp', to the instance variable 'appointments'.
addClient: theApp loop: aBool
Add the argument, 'theApp', to the instance variable 'appointments'.
addTimer: start
Add the argument, 'theApp', to the instance variable 'timers'.
addTimer: start interval: int
Add the argument, 'theApp', to the instance variable 'timers'.
clientNamed: aName
Answer a named client
clients
Get the instance's clients
clock
Answer the instance's clock (in usec)
delay
Get the instance's delay
delay: aTime
Set the instance's delay
dontWait
Specify that the scheduler should NOT do the waiting--i.e., there is a lower level of scheduling going on
isRunning
Answer the instance variable 'running'.
removeClient: aClient
Add the argument, 'theApp', to the instance variable 'timers'.
removeClientNamed: aClient
Add the argument, 'theApp', to the instance variable 'timers'.
removeTimer: aTimer
Add the argument, 'theApp', to the instance variable 'timers'.
removeTimerNamed: aTimer
Add the argument, 'theApp', to the instance variable 'timers'.
resetClock
Reset the instances clock (in usec)
timerNamed: aName
Answer a named timer
timers
Answer the instance's timers
wait
Specify that the scheduler should do the waiting--i.e., Smalltalk-level real-time.
updating
Check if clients are waiting
running
Calls upon the next appointment to be made and then reschedules the next one
flush
Reset the appointment list.
interrupt
Stop a running scheduler.
processEvent: entry at: now
Handle an event or timer
run
Set up the first meetings and then run them all till no one wants a meeting anymore.
run: theBool
Accept the argument, 'theBool', as the instance variable 'running'.
initialize release
Set up the default Schedule
release
Clean up the schedule.
MetaClass: EventScheduler class
examples
Play MIDI using the event scheduler.
scheduleExample2
Play MIDI using the event scheduler.
timerExample
Start some timers in the event scheduler.
class initialization
Set up the global Scheduler.
release
Clear away the global EventScheduler.
instance control
Add a timer to the instance
addClient: aT at: theTime
Add a timer to the instance
addClient: aT in: theTime
Add a timer to the instance
addClient: aT in: theTime loop: loopBool
Add a timer to the instance
addTimer: aT
Add a timer to the instance
addTimer: aT interval: int
Add a timer to the instance
clients
Get the instance's clients
clock
Answer the instance's clock
flush
Reset all running schedules by brute force.
interrupt
Stop all running schedules by brute force.
isRunning
Ask the instance if it's on
resetClock
Answer the instance's clock
run
Turn the instance on
timers
Get the instance's timers
instance creation
EventScheduler instance
instance
EventScheduler instance
Class: PortModel
initialize-release
Superclass: Model
Category: Music-Support
Instance variables: name status device in out
Class instance variables: blockSize devices in instance mutex out properties rate
useSingleton
no-op
mutex support
Execute the given block as a critical section
accessing
device: aValue
in
in: aValue
name
name: aValue
out
out: aValue
status
status: aValue
MetaClass: PortModel class
instance creation
blockSize mutex
Answer the class to use for ports
default
Answer a new instance, or the singleton
instance
Answer a new instance, or the singleton
new
Answer a new instance, or the singleton
release
Release the unique instance
class initialization
Set up the defaults for the class constants.
initializeData
Set up the defaults for the class constants.
class var accessing
blockSize: value
devices
devices: anArr
in
in: value
instance: value
mutex
out
out: value
properties
properties: anArr
rate
rate: value
resetDevices
Flush the device list
sampleRate
sampleRate: value
Class: Timer
accessing
Superclass: Model
Category: Music-Support
Instance variables: startTime accumulator lastUpdate interval running name
accumulator: aValue
interval
interval: aValue
lastUpdate
lastUpdate: aValue
name
name: aValue
running
running: aValue
startTime
startTime: aValue
control
Start a timer
reset
Start a timer
restart
Start a timer
scheduleAt: aTime
update a timer
start
Start a timer
stop
Start a timer
MetaClass: Timer class
Class Variables:
class initialization
Superclass: ApplicationModel
Category: Music-Support
Class variables: DataDir DefaultMIDIIn DefaultMIDIOut DefaultOSCHost
DefaultOSCPort LoggingStream ScoreDir SoundDir
Verbosity
DataDir
ScoreDir
SoundDir
Edit these to taste for your installation.
postLoad: aParcel
Load the missing pieces and put up a dialog after loading the parcel
logging
Log the given string to the Transcript (or otgher output stream) if the system verbosity is >= the given verbosity level
log: theMessage level: verbosityInt
Log the given string to the Transcript (or otgher output stream) if the system verbosity is >= the given verbosity level
verbosity
Answer the class's default verbosity, 0/1/2.
verbosity: aNum
Set the class's default verbosity, 0/1/2.
class var accessing
Answer the class's default data storage directory.
defaultMIDIIn
Answer the class's default MIDI input device.
defaultMIDIIn: num
Set the class's default MIDI input device.
defaultMIDIOut
Answer the class's default MIDI output device.
defaultMIDIOut: num
Set the class's default MIDI output device.
defaultOSCHost
Answer the class's default OSC host IP.
defaultOSCHost: ip
Set the class's default OSC host IP.
defaultOSCPort
Answer the class's default OSC port #.
defaultOSCPort: num
Set the class's default OSC port #.
scoreDir
Answer the class's default score storage directory.
soundDir
Answer the class's default sound storage directory.
utilities
Answer the class categories for all of CSL
fileoutCategories
Create the source directory of old-fashioned ST80 file-outs (for Squeak users)
playSoundFile: nam
Play a sound file using UNIX shell and libsndfile's play program
writeSirenManual
Create the big book
writeSirenManualToHTML: folder
Create the doxygen-style manual in an HTML folder
example access
Answer the given item from the global music constants.
musicConstants
Answer the global music constants (mostly icons).
file support
Try to locate the requested directory and, if found, add it to the given list
createS7: aFullPathName
Create an s7 folder and copy any files with the same name into it
findDir: dir
Try to locate the requested directory either locally or globally
findDir: dir tryHard: aggressive
Try to locate the requested directory either locally or globally
findFile: fil
Try to locate the requested file in the data directories, being smart about s7 files
findFile: fil in: theDir
Try to locate the requested file in the given directory, being smart about s7 files
findFiles: ext
Answer all of the files in the user's data folders with the given filename extension
findFiles: ext in: theDir into: coll
Add the files with the given name extension to the given collection
listS7: aName
List the contents of the requested s7 file
nextName: aName type: extension
Answer the next free name with the given extension in the given s7 folder
Class: ScheduleRecord
Instance Variables
key
accessing
Superclass: Association
Category: Music-Support
Instance variables: next previous loop
It's a doubly-linked record with a key (the start time) and value (the scheduled event).
next
previous
value
loop: aBool
next
Answer the receiver's 'next'.
next: anObject
Set the receiver's instance variable 'next' to be anObject.
previous
Answer the receiver's 'previous'.
previous: anObject
Set the receiver's instance variable 'previous' to be anObject.
start
control
stop
testing
MetaClass: ScheduleRecord class
Instance Variables (used by the pop-up utility window)
Class Variables:
actions
Superclass: ApplicationModel
Category: Music-Support
Instance variables: scheduleList scheduleListText verbosity clock
startedAt inChannels blockSize sampleRate outChannels
interfaceParams transport eventList sound voice timer
soundPort midiPort loadedSounds loadedLists oscAddress
defaultVoiceClass
Class instance variables: instance useSingleton
Class variables: EventLists Sounds Voices
sampleRate - the sample rate
inChannels outChannels - # of snd I/O channels
oscIP oscPort - OSC IP & port
defaultVoiceClass - voice class to use
blockSize - snd IO block size
interfaceParams - snd IO properties
transport - value used by GUI
eventList - value used by GUI
sound - value used by GUI
voice - value used by GUI
timer - value used by GUI
scheduleList - value used by GUI
soundPort - value used by GUI
midiPort - value used by GUI
EventLists
Sounds
Voices
Turn off anything that's playing
cleanUp
configureMIDI
freeLists
inspectSession
loadAll
SirenSession initialize. SirenSession loadDemoData
openSirenUtility
openTransport
Open a transport control
resetSound
Reset the parameters of the sound port
stopMIDI
Turn off MIDI
stopSound
Stop the sound player if it's active
aspects
clock
defaultVoiceClass
eventList
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
inChannels
midiPort
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
oscAddress
Answer the formatted OSC IP address + port
outChannels
sampleRate
scheduleList
Answer the scheduler's list
scheduleListText
Answer the scheduler's list
scheduleListText0
Answer the scheduler's list
sound
soundPort
timer
Answer the timer
updateClock
Answer the clock display
updateScheduleList
Build the transport view's list
updateTimer
Answer the timer display
verbosity
Answer the verbosity level 0, 1, or 2
verbosityLabel
Answer the verbosity level 0, 1, or 2
voice
interface opening
This message is sent by the builder after it has opened a completed window.
initialize release
Set up the defaults values.
release
actions--change
Respond to a selection in the block size menu
chInChans
Respond to a selection in the input channel menu
chListSelection
Respond to a selection in the main list menu
chOSCAddr
Respond to a selection in the OSC address field
chOutChans
Respond to a selection in the output channel menu
chSRate
Respond to a selection in the sampleRate menu
chVerbosity
Respond to a selection in the verbosity menu
chVoiceClass
Respond to a selection in the voice class menu
newEventList
Respond to a selection in the score menu
newMIDIPort
Respond to a selection in the MIDI port menu
newSound
Respond to a selection in the sound menu
newSoundPort
Respond to a selection in the sound port menu
newTimer
Respond to a selection in the timer menu
newVoice
Respond to a selection in the sound port menu
accessing
Find the object that corresponds to the given ID
selectedObject
Select an item in the list
selectedObjectName
Select an item in the list
transport
it's me
resources
Add items from the given dictionary to a hierarchical menu
listMenu
Answer the event list menu
soundMenu
Answer the hierarchical sound menu
timerMenu
Answer the timer list menu
voiceMenu
Tools.MenuEditor new openOnClass: self andSelector: #voiceMenu
actions--menu
Remove an item from the list
playItem
Remove an item from the list
spawnItem
Remove an item from the list
zeroTimer
actions--transport
This stub method was generated by UIDefiner
play
Play the selection
record
This stub method was generated by UIDefiner
rewind
This stub method was generated by UIDefiner
stop
Stop the selection
actions--tests
testMIDIin
testMIDIout
testOSCout
testSndFileIn
Run the default sound file test
testSoundIn
This stub method was generated by UIDefiner
testSoundOut
Play a sound
updating
update: anAspectSymbol with: aParameter from: aSender
Catch an update
MetaClass: SirenSession class
class initialization
Flush the class's temporary event list dictionary.
initialize
Edit these to taste for your installation.
initializeEventLists
Flush the class's event list dictionary.
initializeSounds
Empty the class's sound dictionary.
initializeVoices
SirenSession initializeVoices
update: anAspect with: arguments from: anObject
You can put code here to be done before or after a snapshot
(i.e., do you want to store events lists and sounds in the image or not)
class var accessing
Add to the class's voice dictionary.
eventList: aName
Get the event list at the given (possibly hierarchical) name in the shared dictionary
eventList: aName put: anEventList
Store the give n event list in the shared dictionary; handle hierarchical names
eventListNamed: aName
Get the event list at the given (possibly hierarchical) name in the shared dictionary
eventLists
Answer the class's event list dictionary.
schedule
Answer the 'global' scheduler.
sound: aName
Get the event list at the given (possibly hierarchical) name in the shared dictionary
sound: aName put: aSound
Store the give n event list in the shared dictionary; handle hierarchical names
soundNamed: aName
Get the event list at the given (possibly hierarchical) name in the shared dictionary
sounds
Answer the class's sound dictionary.
voice: aName put: vox
Add to the class's voice dictionary.
voiceNamed: aName
Add to the class's voice dictionary.
voices
Answer the class's voice dictionary.
resources
Tools.MenuEditor new openOnClass: self andSelector: #blocksizeMenu
chMenu
Tools.MenuEditor new openOnClass: self andSelector: #chMenu
clockMenu
Tools.MenuEditor new openOnClass: self andSelector: #clockMenu
forwardButton
UIMaskEditor new openOnClass: self andSelector: #forwardButton
midiPortMenu
Answer the midi port menu
playButton
UIMaskEditor new openOnClass: self andSelector: #playButton
rateMenu
Tools.MenuEditor new openOnClass: self andSelector: #rateMenu
recordButton
UIMaskEditor new openOnClass: self andSelector: #recordButton
rewindButton
UIMaskEditor new openOnClass: self andSelector: #rewindButton
scheduleMenu
Tools.MenuEditor new openOnClass: self andSelector: #scheduleMenu
soundPortMenu
Answer the sound port menu
stopButton
UIMaskEditor new openOnClass: self andSelector: #stopButton
timerMenu
Tools.MenuEditor new openOnClass: self andSelector: #timerMenu
verbosityMenu
Tools.MenuEditor new openOnClass: self andSelector: #verbosityMenu
data load/store
Store the given item (sound or event list) in the shared dictionary;
handle hierarchical names
dataAt: aName in: theDict
Get the event list at the given (possibly hierarchical) name in the shared dictionary
loadDemoData
Load a few scores and sounds for demos
interface opening
Open the ApplicationModel's user interface.
openTransport
Open the ApplicationModel's user interface.
openUtility
Open the ApplicationModel's user interface.
interface specs
Tools.UIPainter new openOnClass: self andSelector: #transportButtonSpec
transportWindowSpec
Tools.UIPainter new openOnClass: self andSelector: #transportWindowSpec
utilWindowSpec
Tools.UIPainter new openOnClass: self andSelector: #utilWindowSpec
instance creation
Answer the 'global' session.
new
Make sure there's only ever one of me.
refresh
Recreate the instance
release
Make sure there's only ever one of me.
Class: DeviceModel
accessing
Superclass: Model
Category: Music-Support
Instance variables: name port stream debug in out rate
debug: aValue
in
in: aValue
name
name: aValue
out
out: aValue
port
port: aValue
rate
rate: aValue
stream
stream: aValue
printing
Append to the argument aStream a sequence of characters
that identifies the collection.
MetaClass: DeviceModel class
accessing
Superclass: Model
Category: Music-Support
Instance variables: selections copyBuffer view
Answer the receiver's copybuffer
copyBuffer: anObject
Set the receiver's copybuffer
select: sel
Set the receiver's selection.
selection
Answer the receiver's selection.
view: aView
Assign into the receiver's view instVar
MetaClass: EditorModel class
Instance Variables:
accessing
Superclass: SequenceableCollection
Category: Music-Support
Instance variables: first last
Indexed variables: objects
Class variables: CurrentRecord RecordPool
These are used for real-time schedules because they can have faster search methods than using SortedCollections of OrderedCollections for the EventScheduler.
The current implementation uses a simple linear search. For really big schedules, this could be made faster with a binary search or tree-based schedule.
first
last
Add the given eventAssociation to the receiver in the right place.
add: eventAss loop: aBool
Add the given eventAssociation to the receiver in the right place.
asOrderedCollection
Answer a copy of the receiver's items
detect: aBlock
Walk the list looking
do: aBlock
Refer to the comment in Collection|do:.
includes: sought
isEmpty
itemNamed: theName
Answer a copy of the receiver's items
ready: now
Answer whether there's an event ready within 5000 usec of the given time
removeAllSuchThat: aBlock
Remove each element for which aBlock evaluates to true.
removeFirst
Remove and answer the first item from the list.
size
Answer how many elements the receiver contains.
private
Find the proper slot for inserting a new event with the given start time.
printing
Append to the argument aStream a sequence of characters that identifies the receiver.
MetaClass: SEventQueue class
record pool
Set up the class's record pool
nextRecord
Set up the class's record pool
Class: Voice
The instance variables are:
The global object Voices is a dictionary that note events can refer to with integer or symbolic keys.
accessing
Superclass: Model
Category: MusicIO-Voices
Instance variables: name instrument stream
Class variables: DefaultVoiceClass
They can be used for generating sound compiler notelists or (real-time output or file dumps of) MIDI data.
instrument
name
stream
return my instrument.
instrument: newValue
set my instrument.
stream
answer the stream of the receiver voice
stream: someStream
plug in a stream to the receiver voice
events
Answer an event list read from the receiver.
play: anEventList
Expand the list and play it now.
play: anEventOrList at: start
Expand the list and play it at the given time.
playEvent: anEvent
Play the argument now.
playEvent: anEvent at: aTime
make sure my subclasses implement this
readOnto: eventList
Read events from the receiver into the argument.
printing
Print the receivcer on the argument.
testing
Answer true
initialize-release
Close the stream, devise, or whatever.
initialize
Set up a Voice.
initializeNamed: aName
Set up a named Voice.
MetaClass: Voice class
class var accessing
class initialization
set up the shared dictionary for caching voices
reset
Reset all sub-instances of Voice.
setDefault: className
Set the default class to use for new voices
instance creation
Answer a voice.
named: aName
Answer the shared dictionary's voice item at the given name (or the name itself if it's a voice)
on: someStream
Answer a new voice instance on the given stream.
Class: NotelistVoice
Note that we are output-only at present.
Instance Variables:
accessing
Superclass: Siren.Voice
Category: MusicIO-Voices
Instance variables: parameterMap lastTime header
parameterMap
the object's P:=map, used to print out or parse note commands.
Add the argument (a symbol or block), to the parameterMap of the receiver
header: aString
Set the file header string of the receiver.
parameterMap
Answer the parameterMap of the receiver.
parameterMap: anOrderedCollection
Set the parameterMap of the receiver.
events
The case I handle is strings. Subclasses may override.
endLine
Put the proper command terminator on the receiver's stream.
mapProperty: item of: ass within: list
Write the given event association to the receiver's stream in the appropriate format.
play: anEL
Perform the argument.
play: anEL at: start
Perform the argument.
playAssociation: ass in: list
Write the given event association to the receiver's stream in the appropriate format.
space
Put the proper field separator on the receiver's stream.
writeFooter
Write a notelist file footer on the receiver's stream.
writeHeader
Write a notelist file header on the receiver's stream.
initialize-release
Close the receiver's output stream (if it's a file).
initialize
Initialize the receiver.
initializeNamed: aName onStream: theStream
Answer a new named NotelistVoice on the given stream.
initializeOnStream: theStream
Answer a new named NotelistVoice on the given stream.
MetaClass: NotelistVoice class
instance creation
Answer the default parameterMap of the receiver class's instances.
newNamed: aName onFile: fName
Set up a NotelistVoice on the given output file
newNamed: aName onStream: aStream
Set up a NotelistVoice on the given output stream
onFileNamed: fName
Set up a NotelistVoice on the given output file
Class: SuperColliderVoice
events
Superclass: Siren.NotelistVoice
Category: MusicIO-Voices
Put the proper command terminator on the receiver's stream.
space
Put the proper field separator on the receiver's stream.
writeFooter
Write a notelist file footer on the receiver's stream.
writeHeader
Write a SuperCollider notelist file header on the receiver's stream.
MetaClass: SuperColliderVoice class
examples
SuperColliderVoice randomExampleToFileAndEdit
randomExampleToFileNamed: fnam
Create a random event list and store it on a file.
instance creation
Answer up the parameter map for the default instance.
pMapForPanner
Answer up the parameter map for the default instance.
Class: MIDIFileVoice
accessing
Superclass: Siren.Voice
Category: MusicIO-Voices
Instance variables: fileType tracks ppq tempo
tempo
tempo: tem
read/write
load a MIDI file into anEventList.
readMThd
Read the header chunk from MIDI binary file.
readMTrk
Read a track chunk from MIDI binary file. Answer its length.
readOnto: eventList
Read a MIDI file
readTrackOnto: anEventList
Read a track of MIDI events from my stream into anEventList
private
Combine 1 or more input bytes from my stream into a variable length item
initialize-release
Close the stream, device, or whatever.
MetaClass: MIDIFileVoice class
instance creation
examples
MIDIFileVoice midiFileExample
Class: CmusicVoice
events
Superclass: Siren.NotelistVoice
Category: MusicIO-Voices
writeFooter
writeHeader
Write the cmusic score file header.
MetaClass: CmusicVoice class
examples
CmusicVoice randomExampleToFileAndEdit
randomExampleToFileNamed: fnam
Store the given score to a file
randomExampleToTranscript
CmusicVoice randomExampleToTranscript
instance creation
Answer the default cmusic p-map
Class: CsoundVoice
events
Superclass: Siren.NotelistVoice
Category: MusicIO-Voices
writeHeader
MetaClass: CsoundVoice class
examples
CsoundVoice randomExampleToFileAndEdit
randomExampleToFileNamed: fnam
Create a random event list and store it on a file.
instance creation
Class: SoundVoice
events
Superclass: Siren.Voice
Category: MusicIO-Voices
MetaClass: SoundVoice class
constant access
Class: CmixVoice
events
Superclass: Siren.NotelistVoice
Category: MusicIO-Voices
playEvent: evt at: start
Play the given event
space
writeHeader
Write out a CMix score file header.
MetaClass: CmixVoice class
examples
CmixVoice randomExampleToFileAndEdit
randomExampleToFileNamed: fnam
Create a random event list and store it on a file.
instance creation
defaultPMap
CmixVoice randomExampleToFileAndEdit
Class: MIDIPacket
Instance Variables
Pool dictionaries:
See the class comment in MIDIPort for details.
accessing
Superclass: Object
Category: MusicIO-MIDI
Instance variables: length time flags duration data
Imports: private MIDICommands.*
data
length
time
flags
duration
MIDICommands
(It is initialized by class MIDIPort.)
Answer the receiver's MIDI velocity.
ampl: a
Set the receiver's MIDI velocity.
channel
Answer the receiver's MIDI channel.
command
Answer the receiver's MIDI command nibble.
data
Answer the receiver's 'data' byte array.
data: anObject
Set the receiver's instance variable 'data' to be anObject.
duration
Answer the receiver's duration.
duration: d
Set the receiver's duration.
key
Answer the receiver's MIDI key number.
key: k
Set the receiver's MIDI key number.
length
Answer the receiver's 'length'.
length: anObject
Set the receiver's instance variable 'length' to be anObject.
pitch
Answer the receiver's MIDI key number.
pitch: aValue
Set the receiver's MIDI key number.
second: aValue
Set the receiver's MIDI key number.
setPitch: p dur: d loudness: vol
Answer an instance of the class with the given parameters.
status: s
Set the receiver's MIDI command.
third: aValue
Set the receiver's MIDI key velocity.
time
Answer the receiver's 'time'.
time: anObject
Set the receiver's instance variable 'time' to be anObject.
vel
Answer the receiver's MIDI velocity.
vel: v
Set the receiver's MIDI velocity.
voice
Answer the receiver's MIDI channel.
voice: v
Set the receiver's MIDI channel.
printing
Store a two-digit hexadecimal version of the 8-bit argument x on the stream.
printOn: aStream
Store a readable version of the receiver on the argument.
initialize release
Set the receiver's time stamp
MetaClass: MIDIPacket class
instance creation
Answer a two-element array with the 14-bit values that correspond to the given value.
fromBytes: aByteArray
Answer a new instance of a MIDI packet instantiated from the given byte array.
fromInt: anInt at: aTime
Answer a new instance of a MIDI packet instantiated from the given 3-byte long value.
new
Answer a new instance.
new: size
Answer a new instance with a data array of the given size.
setPitch: p dur: d loudness: vol
Answer an instance of the class with the given parameters.
Class: MIDIDevice
Instance variables:
Class variable:
Standard MIDI Commands:
Relevant Constants for description of MIDI commands:
accessing
Superclass: Siren.DeviceModel
Category: MusicIO-MIDI
Class variables: MStream
The abstract class MIDIDevice implements the generic MIDI note on/off type events.
Subclasses of MIDIDevice exist for specific models of devices and implement the device-specific (system exclusive) commands.
MIDIDevice are passed Events and channel numbers by their voices and generate commands as ByteArrays that they pass to MIDIPorts.
Several devices may share one port (if there are several MIDI-capable devices on one cable), and one voice may point to several device/channel pairs on one or more devices.
port
stream
debug
MStream
Note On = 9n kk vv
Note Off = 8n kk vv
Key Pressure = An kk vv
Pitch Wheel = En ll ll
After Touch Channel Pressure = Dn vv
Control Change = Bn cc vv
Program change = Cn pp
n = 4-bit channel number
kk = 7-bit key number
vv = 7-bit key velocity
ll = 7-bit low-order value
hh = 7-bit high-order value
cc = 7-bit control number
pp = 7-bit program number
Answer the receiver's I/O port.
port: aPort
Set the receiver's I/O port.
stream
Answer the receiver's MIDI stream ID.
stream: aNumber
Set the receiver's MIDI stream ID.
initialization
Ensure that the receiver's output port is initialized.
close
Release the receiver's hold on the port.
initialize
Set the receiver up on the default output port.
initialize: thePort
Set the receiver up on the given output port.
play: anAss on: channelNumber
play the given event on my port as a default MIDI noteOn/noteOff pair
note events
Play the given event on my port as a default MIDI noteOn/noteOff pair.
parameter mapping
Map a numerical or symbolic amplitude to a MIDI-compatible
volume number (key velocity)
mapDuration: aVal
Map a numerical or symbolic duration value to a
MIDI-compatible duration in msec.
mapPitch: aVal
Map a numerical or symbolic pitch to a MIDI-compatible note number.
mapVoice: aVal
Map a numerical or symbolic pitch to a MIDI-compatible note number.
MetaClass: MIDIDevice class
examples
Play a note out MIDI from the device level.
scheduleExample
Play MIDI using the event scheduler.
instance creation
Open a generic MidiDevice on the default Port
on: port
Open a generic MidiDevice on the given Port
class initialization
Set up the one class variable
Class: MIDIPort
There is typically only one instance of MIDIPort. The messages new, default, and instance all answer the sole instance. MIDIPorts use dependency to signal input data, objects wishing to receive input should register themselves as dependents of a port. In the default Siren implementation, the scheduler is all in Smalltalk, and only the simplest MIDI driver is assumed.
Instance Variables:
Class Variables:
MIDI Commands Supported:
accessing
Superclass: Siren.PortModel
Category: MusicIO-MIDI
Instance variables: inputData readProcess
Class variables: Streams
Imports: private MIDICommands.* private MIDIioctls.*
private GeneralMIDIMap.* private GeneralMIDIDrums.*
readProcess
inputData
status
device
Instance
Debug
UseSingleton
DefaultInputDevice
DefaultOutputDevice see above
0x9x pp vv -- note-on (x=channel, pp=pitch, vv=velocity)
0x8x pp vv -- note-off (x=channel, pp=pitch, vv=velocity)
0xCx cc -- program-change (x=channel, pp=pitch)
0xEx ll hh -- program-change (x=channel, ll=low 7 bits, hh=high 7 bits)
0xBx cc dd -- control change (x=channel, cc=controller, dd=data)
Answer the receiver's Q of input data.
isActive
Answer whether the receiver is active.
reader
Answer the receiver's read process
resetInput
Reset the receiver's Q of input data.
control commands
Turn all MIDI notes off using the channel message 123.
allNotesOffVerbose
Turn all MIDI notes off (the verbose way).
controlChange: chan controller: controller to: value
Send out a control-change command now.
pitchBend: chan to: value
Send out a pitch-bend command at the given time.
programChange: chan to: value
Send out a program-change command at the given time.
sysex: command
Send out a MIDI system exclusive data packet at the given time.
open/close
Close MIDI.
open
Open the MIDI driver -- start the lower-level driver up.
openInput
Open the MIDI driver -- start the lower-level driver up.
openInput: which
Open the MIDI driver -- start the lower-level driver up.
openOutput
Open the MIDI driver -- start the lower-level driver up.
openOutput: which
Open the MIDI driver -- start the lower-level driver up.
reset
Reset the port.
ioctl
Answer the number of events in the input Q.
hasBuffer
Answer whether the MIDI driver has a time-stamped output buffer.
hasClock
Answer whether the MIDI driver has its own clock.
hasControllerCache
Answer whether the MIDI driver supports a controller data buffer.
hasDurs
Answer whether the MIDI driver supports a 1-call note-on/off command.
readLoop
polling or waiting loop
startControllerCaching
Start caching MIDI controller in the driver.
startMIDIEcho
Start echoing MIDI input from the driver.
startMIDIInput
Start the polling loop (or semaphore waiter) MIDI input.
stopControllerCaching
Stop caching MIDI controller in the driver.
stopMIDIEcho
Stop echoing MIDI input from the driver.
stopMIDIInput
Stop signalling the read semaphore on MIDI input.
initialize release
Setup the receiver's instance variables.
release
Release--break and dependencies on the error value.
read/write
Read the data from the receiver into the argument (a MIDIPacket). Answer the number of data bytes read.
nextEventInto: anEventAssociation
Record via the receiver into the argument.
nextMessage
Answer the first (length -> bytes) association from the input data collection.
play: aPitch dur: aDur amp: anAmp voice: aVoice
Play a note (on/off message pair) with the given parameters on the receiver.
play: streamID pitch: aPitch dur: aDur amp: anAmp voice: aVoice
Play a note (on/off message pair) with the given parameters on the receiver.
playOff: streamID pitch: aPitch amp: anAmp voice: aVoice
Play a note-on command with the given parameters on the receiver.
playOn: streamID pitch: aPitch amp: anAmp voice: aVoice
Play a note-on command with the given parameters on the receiver.
put: data length: size
Send the argument data to the receiver now.
readController: index
Read the given controller value.
readControllersFrom: lo to: hi into: array
Read a range of controllers
MetaClass: MIDIPort class
message tests
Demonstrate control commands by playing a note and making a crescendo with the volume pedal.
testBend
Demonstrate pitch-bend by playing two notes and bending them.
testControlContinuous
Demonstrate control commands by playing a note and making a crescendo with the volume pedal.
testProgramChange
Demonstrate program change by setting up an organ instrument to play on.
testSysex
Demonstrate system exclusive commands by loading the Santur scale
and playing a scale.
driver performance tests
Play 'num' random pitches (molto legato) spaced 'dur' msec apart.
testRandomPlayLowLevel: num dur: dur
Play 'num' random pitches spaced 'dur' msec apart.
testRollLowLevel: num dur: dur
Play a roll of 'num' notes spaced 'dur' msec apart.
output tests
Try to open and close the MIDI port.
testANote
Open MIDI, play a note.
testARandomNote
Open MIDI, play a note.
testAScale
Open MIDI, play a fast scale.
testInspect
Inspect a MIDI port.
testMouseMIDI
Open MIDI, play notes based on the mouse position.
testNoteOnOff
Open MIDI, play a note, and close it.
testOpenClose
Try to open and close the MIDI port.
testOutput
Open MIDI, play some random notes, and close it.
input tests
Set up a MIDI dump object as a dependent of the input port. Dump for 10 seconds,
then turn off. The default update: method just dumps the MIDI packet into the transcript;
customize this by writing your own update: method.
testInput
Open MIDI, try to read something--dump it to the transcript.
testInputStop
Execute this to end the input test
controller tests
Set up uncached controller reading--make a loop that reads and prints controller 48
twice a second (until you press the shift button).
testControllerCaching2
Set up uncached controller reading--read controllers 48-52 as an array and print it; stop on mouse press.
testControllerCachingFrom: lo to: hi
Set up uncached controller reading--read controllers from lo to hi (inclusive) as an array and print it;
stop on
Set up uncached controller reading--make a loop that reads and prints controller 48
40 times a second for 5 seconds.
utilities
MIDIPort allNotesOff
cleanUp
Close down and clean up all MIDI, sound IO, event lists, etc.
showInput
Open MIDI, wait to read something, then dump it to the transcript.
general MIDI patches
Set instruments 0-15 to the General MIDI name iname
setEnsemble: orch
Down-load a general MIDI patch for the given ensemble (a collection of
[chan -> name] associations).
setEnsembleInOrder: orch
Down-load a general MIDI patch for the given ensemble (a collection of symbolic keys
into the General MIDI voice map) mapping the first element to MIDI channel 1, etc.
setupDefaultGeneralMIDI
Down-load a general MIDI patch for a 16-voice percussion ensemble.
setupOrgan
Down-load a general MIDI patch for a 4-voice organ.
setupTunedPercussion
Down-load a general MIDI patch for a 16-voice percussion ensemble.
setupWindOrchestra
Down-load a general MIDI patch for a 16-voice wind ensemble.
examples
Select and execute the following for usage examples.
scaleFrom: lo to: hi in: dur
Answer array of (start dur pitch amp)
instance creation
Answer the class to use for MIDI
class initialization
Set up the dictionaries of commands, ioctl primitive selectors and arguments, and general MIDI maps.
initializeMIDITables
MIDIPort initializeMIDITables
Class: MIDIPF70
The standard PF70 note command is like:
The standard FB01 note command is like:
note events
Superclass: Siren.MIDIDevice
Category: MusicIO-MIDI
It implements the special commands available here (like note commands with fractional pitch and given duration).
2n k f v d1 d2 = cmd:channel, noteNum, frac, vel, durLow, durHigh
Superclass: Siren.MIDIDevice
Category: MusicIO-MIDI
It implements the special commands available here (like note commands with fractional pitch and given duration).
2n k f v d1 d2 = cmd:channel, noteNum, frac, vel, durLow, durHigh
send FB01-specific code for note with fraction and duration
2n k f v d1 d2 = cmd:channel, noteNum, frac, vel, durLow, durHigh
MetaClass: MIDIFB01 class
Instance Variables:
updating
Superclass: Model
Category: MusicIO-MIDI
Instance variables: eventList live notesOn startedAt
Imports: private MIDICommands.*
verbose
live
eventList
notesOn
startedAt
The model (port) changed; add the event to our event list.
initialize release
Setup the receiver's instance variables.
accessing
eventList: aValue
live: aValue
MetaClass: MIDIDump class
instance creation
examples
Set up a MIDI dump object as a dependent of the input port. Dump for 10 seconds,
then turn off. The default update: method just dumps the MIDI packet into the transcript;
customize this by writing your own update: method.
exampleEditor
Set up a MIDI dump object as a dependent of the input port. Capture it to an event list and update the view in real time BROKEN.
exampleList
Set up a MIDI dump object as a dependent of the input port. Capture it to an event list.
Class: PortMIDIPort
Instance Variables:
Shared Variables:
open/close
Superclass: Siren.MIDIPort
Category: MusicIO-MIDI
Instance variables: driver
Imports: private MIDICommands.* private MIDIioctls.*
private GeneralMIDIMap.* private GeneralMIDIDrums.*
driver
Devices
Streams
Close MIDI.
close: stream
Close MIDI.
open
Open the MIDI driver -- start the lower-level driver up.
openInput: dev
Open the MIDI driver -- start the lower-level driver up.
openOutput: dev
Open the MIDI driver -- start the lower-level driver up.
terminate
Close MIDI.
ioctl
The MIDI driver input process loop.
startControllerCaching
Start caching MIDI controller in the driver.
stopControllerCaching
Stop caching MIDI controller in the driver.
initialize release
Setup the receiver's instance variables.
release
Release--break and dependencies on the error value.
read/write
Play the argument on the receiver--no duration-->no note-off.
playOff: streamID pitch: pitch amp: amp voice: voice
Play the argument on the receiver.
playOn: aPitch amp: anAmp voice: aVoice
Play the argument on the receiver--no duration-->no note-off.
playOn: streamID pitch: pitch amp: amp voice: voice
Play the argument on the receiver--no duration-->no note-off.
put: streamID data: data length: size
Send the argument (a ByteArray for historical reasons) to the receiver now.
put: data length: size
Send the argument (a ByteArray for historical reasons) to the receiver now.
readControllersFrom: lo to: hi into: array
Read a range of controllers
accessing
Answer whether the receiver is active.
MetaClass: PortMIDIPort class
examples
Open MIDI, play a note.
class initialization
Set up the class defaults.
Class: MIDIVoice
Instance variables:
initialize-release
Superclass: Siren.Voice
Category: MusicIO-MIDI
Instance variables: currentTime
Class instance variables: default
Class variables: Instance UseSingleton
I store a MidiDevice (with a MIDIPort) in my instrument variable and play events onto it when asked to.
instrument
Close the stream, device, or whatever.
initialize
Set up a MIDIVoice's time counter.
reset
Reset my time.
events
Expand the list and play it now.
playEvent: anEvent at: aTime
Send the given Event to the instrument.
accessing
Answer my channel or icon number
MetaClass: MIDIVoice class
examples
Play some random notes on a voice on a device on a port.
scaleExample
Play a scale on a voice on a device on a port to the Apple MIDI Mgr.
voiceInspect
MIDIVoice voiceInspect
instance creation
Answer the default MIDIVoice.
named: aName onDevice: aMidiDevice channel: aChannel
set up a MidiVoice on the given device and channel
new
Cache the latest instance.
on: aMidiDevice
Answer up a MidiVoice on the given device.
on: aMidiDevice channel: aChannel
set up a MidiVoice on the given device and channel
class initialization
Answer the class's default intertface # (use external device list to get the right value).
flushDefault
Reset the class's default instance.
initialize
Reset the class's default instance.
Class: OSCByteConvertor
Instance Variables:
stream
Superclass: Object
Category: MusicIO-OSC
Instance variables: packetData
packetData
next: t1 put: t2
nextPut: t1
nextPutAll: t1
nextPutType: char
Transcript show: (String with: char); space.
position
initialize-release
MetaClass: OSCByteConvertor class
instance creation
Class: OSCPort
Instance Variables:
Shared Variables:
accessing
Superclass: Siren.PortModel
Category: MusicIO-OSC
Instance variables: socket address
socket
address
DefaultIP
DefaultPort
Reset the receiver's UDP socket port number
actions
Send something
initialize-release
Set up
MetaClass: OSCPort class
instance-creation
Answer the default port for CSL
default
Answer the default instance
localhost
Answer an OSC port on the local host
scHost
Answer the default OSC server reference
to: t1
Open a port on the given device
to: ip port: port
^an OSCPort with the given attributes
toHostName: t1
Answer an instance on the given host
toHostName: aHostName portNumber: aPort
^an OSCPort
Convenience method
toLocalhostPortNumber: aPort
^an OSCPort
Convenience method
defaults
Answer the class var default
defaultIP: value
Set the class var default
defaultPort
Answer the class var default
defaultPort: value
Set the class var default
defaultSCOSCPort
Answer the default port for OSC
examples
OSCPort demo
demo2
OSCPort demo2
sendFreq
PSCPort sendFreq
sendStart
OSCPort sendstop
sendStop
Send a stop message
Class: OSCVoice
Instance Variables:
events
Superclass: Siren.NotelistVoice
Category: MusicIO-OSC
Instance variables: port
Indexed variables: objects
port
Answer a message for the given event by passing it to my parameter-mapper block
play: anEL
Expand the list and play it now.
playAssociation: ass in: list
Play the association...
playEvent: event at: start
Expand the list and play it at the given time.
waitTill: time
utilities
Send an OSC command with the given arguments
accessing
Return the OSCPort
port: aPort
Set the OSCPort
MetaClass: OSCVoice class
examples
Play a few random notes on the CSL FM instrument
fmExample2
Play molto legato notes on 4 CSL FM instruments and loop until interrupted
fmExample3
Play a long CSL FM note and apply some real-time control functions to it
fmExample4
Play an FM bell using CSL; fork a block that plays a note and waits a bit;
stop the scheduler to stop the block.
functionExample
Play a function out to OSC
midiScaleExample
OSCVoice midiScaleExample
sndExample1
Play random notes on the CSL sound file instruments
sndExample2
Play random notes on the CSL sound file instruments; loop until interrupted
sosExample1
Play random notes on the CSL sum-of-sines instruments; loop until interrupted
instance creation
Answer an OSC voice for use with OSC-to-MIDI by default.
localhost
Answer an instance on the local host
map: mapSelector
Answer a default instance that uses the given parameter map name
onPort: pt
Answer an instance on the given port
scHost
Answer the default voice for SC over OSC
parameter maps
Answer the default parameterMap for use with OSC.
pMapForCSLAdditive
Answer the default parameterMap for use with the CSL sum-of-sines instrument.
This creates an OSC bundle with a 'ps' message for the spectrum followed
by a 'pn' message to play a note.
CSL SOSInstrument args: dur, ampl, freq, pos, [att, dec, sus, rel]
pMapForCSLFM
Answer the default parameterMap for use with the CSL FM example instrument.
pMapForCSLSimpleFM
Answer the default parameterMap for use with the CSL FM example instrument.
pMapForCSLSnd
Answer the default parameterMap for use with the CSL FM example instrument.
pMapForMIDI
Answer the default parameterMap for use with OSC-to-MIDI.
In this class, we create and return a OSCMessage with data taken from the given event.
pMapForMIDItoFM
Answer the default parameterMap for use with the CSL FM example instrument.
pMapWithBundle
Answer the default parameterMap for use with OSC-to-MIDI. In this class, we create and return a TypedOSCMessage with data taken from the given event. This allows us to have other versions that create OSC bundles.
Class: AbstractOSCPacket
Subclasses must implement the following messages:
Instance Variables:
osc
Superclass: Object
Category: MusicIO-OSC
Instance variables: oscBytes
osc>>toOSCBytes:
oscBytes
accessing
oscSize
initialize-release
MetaClass: AbstractOSCPacket class
Instance Variables:
Shared Variables:
osc
Superclass: Siren.AbstractOSCPacket
Category: MusicIO-OSC
Instance variables: messages time
Class variables: MillisecScale MillisecToNTP SecsInAYear
messages
time
MillisecScale
MillisecToNTP
SecsInAYear
Store a time thingy into the given convertor
toOSCBytes: aConvertor
^self
initialize-release
init: aCollection time: aTime
Initialize the receiver.
MetaClass: OSCBundle class
instance creation
with: aCollection at: aTimestamp
support
Convert aTimestamp to the OSC representation of the same
asSecondsSince1900: aTimestamp
Convert aTimestamp to seconds since 1900
timestampToOSC: aTimestamp
Convert aTimestamp to the OSC representation of the same
class initialization
Initialize the values of the shared variables.
examples
Simple example
example2
Class: OSCMessage
Instance Variables:
osc
Superclass: Siren.AbstractOSCPacket
Category: MusicIO-OSC
Instance variables: address arguments
address
arguments
Convert the address to the OSC format
argumentsToOSCBytes: convertor
Add the type tags, then the arguments
toOSCBytes: converter
Convert myself to OSC format
typesToOSC: converter
printing
initialize-release
MetaClass: OSCMessage class
instance-creation
for: addr with: args
Answer a TOM with the given address and arguments
examples
OSCMessage example1
example2
OSCMessage example2
example3
OSCMessage example3
Class: TypedOSCMessage
osc
Superclass: Siren.OSCMessage
Category: MusicIO-OSC
Convert the args and type string to OSC format
typesToOSC: converter
Convert the arguments to an OSC type string.
MetaClass: TypedOSCMessage class
examples
TypedOSCMessage changeFreq
scDecreaseVolume
TypedOSCMessage scDecreaseVolume
scIncreaseVolume
TypedOSCMessage scIncreaseVolume
scRun
TypedOSCMessage scRun
scStop
TypedOSCMessage scStop
start
TypedOSCMessage start
Class: SoundPort
Concrete subclasses add primitive interfaces to special devices such as audio ports or coprocessors.
open/close
Superclass: Siren.PortModel
Category: MusicIO-Sound
Close the receiver sound port
open
Open the receiver sound port
start
Start the receiver sound port
stop
Stop the receiver sound port
initialize/release
Answer an initialized version of the receiver.
release
Terminate and release the receiver.
play/record
Play the argument on the receiver over the DACs.
play: aSound from: start to: stop
Play the argument on the receiver over the DACs.
record: aSound
Record into the argument via the receiver.
MetaClass: SoundPort class
class initialization
Set up the defaults for the class constants.
instance creation
Answer the appropriate subclass.
default
Answer a default instance of the appropriate subclass.
defaultOrNil
Answer the default instance of the appropriate subclass if it's set up.
Class: PortAudioPort
Instance Variables:
Shared Variables:
open/close
Superclass: Siren.SoundPort
Category: MusicIO-Sound
Instance variables: rate format outChannels interface isOpen isRunning
bufferSize
device
rate
format
outChannels
interface
isOpen
isRunning
bufferSize
Devices
Close the receiver sound port
open
Open the receiver sound port
start
Start the receiver sound port
stop
Stop the receiver sound port
terminate
Shut down the receiver.
accessing
format: aValue
outChannels
outChannels: aValue
rate
rate: aValue
initialize/release
Answer an initialized version of the receiver.
play/record
Play the argument on the receiver over the DACs.
play: aSound from: start to: stop
Play the argument on the receiver over the DACs.
MetaClass: PortAudioPort class
initialize/release
Stop and close the running instance
examples
Play a swept sine wave using the simple output-only port audio port.
playSweepLong
Play a *long* swept sine wave using the simple output-only port audio port.
Class: SoundFile
Instance variables:
accessing
Superclass: Siren.AbstractEvent
Category: MusicIO-Sound
Instance variables: name mode fileFormat sampleFormat rate channels size
index position sound
Indexed variables: objects
Class variables: FileFormats Interface SampleFormats
They handle formatting, headers and I/O.
sound
rate
channels
fileName
file
position
headerSize
properties
format
size
Answer the instance variable 'channels'.
channels: theChannels
Accept the argument, 'theChannels', as the new instance variable 'channels'.
fileFormat
fileFormat: aValue
format
mode: theMode
Set the receiver's mode to #read or #write
name
Answer the instance variable 'name'.
name: theFileName
Accept the argument, 'theFileName', as the new instance variable 'name'.
rate
Return the instance variable 'rate'.
rate: aRate
Set the instance variable 'rate'.
sampleFormat
sampleFormat: aValue
samples
Return the instance variable 'samples'.
size
Answer the number of sample frames in the file.
size: aNumber
Set the number of sample frames in the file.
sizeInSamples
Answer the number of sample frames in the file.
sound
Answer the instance variable 'sound'.
sound: theSound
Accept the argument, 'theSound', as the new instance variable 'sound'.
read/write
Read samples from the file into the sample buffer.
readSamples: sndClass
Read samples from the file into the sample buffer.
saveSound: snd
Write samples from the given sound to the receiver file.
printing
Format and print the receiver on the argument.
initialize-release
Close the receiver's file.
initialize
Set up the instance variables of a default sound file.
open
Open the named file and read the header
openForReading
Open the named file and read the header
MetaClass: SoundFile class
instance creation
Open the given file (EBICSF, SPARC, or NeXT soundfile format)
openFileNamed: nameString
Open the given file (EBICSF, SPARC, AIFF, or NeXT soundfile format)
readFileNamed: nameString
Open the given file (EBICSF, SPARC, or NeXT soundfile format)
readFileNamed: nameString answer: theClass
Open the given file (EBICSF, SPARC, or NeXT soundfile format)
releaseFileIndex: index
Free the given sound file index
class initialization
Set up the file format and sample format dictionaries to interface with libsndfile.
Class: SoundEvent
accessing
Superclass: Siren.ActionEvent
Category: MusicIO-Sound
Instance variables: sound
Indexed variables: objects
sound: aSnd
MetaClass: SoundEvent class
examples
Create and play an event list that plays the same file a few times.
exampleLoops
Create and play an event list that loops 2 samples, with one of the loops starting with a rest.
instance creation
Create and answer a new sound event for the given sound
Class: SmartAudioPort
Instance Variables:
play/record
Superclass: Siren.PortAudioPort
Category: MusicIO-Sound
Instance variables: inChannels callbackBlock useProcess ioProcess
ioSemaphore inClient outClients inBuffer outBuffer
counter
inChannels
ioSemaphore
inClient
outClients
ioProcess
inBuffer
outBuffer
Handle a callback from PortAudio; this is sent an an external callback
doIO
Handle a callback from PortAudio; this is sent an an external callback through the class
nextInBuffer
Get the next input buffer for the clients from the interface.
nextOutBuffer
Get the next output buffer from the clients and sum it into my buffer for playing.
play: aSound
Play the argument on the receiver over the DACs.
record: aSound
Record into the argument via the receiver.
start: duration
Start the receiver's IO loop for the given duration.
accessing
inChannels: aValue
outClients
setInputDevice
Set the port to use the default input device
open/close
Close the receiver sound port
open
Open the receiver sound port
initialize/release
Answer an initialized version of the receiver.
MetaClass: SmartAudioPort class
examples
Test playing a sound through the call-back interface
testRecord
SmartAudioPort testRecord
callbacks
Forward the callback to an instance
instance creation
Answer a new instance, or the singleton
Class: SirenExternalInterface
class var accessing
initialization
Superclass: ExternalInterface
Category: MusicIO-External
Imports: private Siren.SirenExternalInterfaceDictionary.*
Attributes:
#(#(#includeFiles #()) #(#includeDirectories #()) #(#libraryFiles #()) #(#libraryDirectories #()) #(#beVirtual false) #(#optimizationLevel #full))
SirenExternalInterface unload
Class: LibSndFileInterface
procedures
Superclass: Siren.SirenExternalInterface
Category: MusicIO-External
Class variables: SF_Constants
Imports: private Siren.LibSndFileInterfaceDictionary.*
Attributes:
#(#(#includeFiles #('sndfile_lite.h')) #(#includeDirectories #('Siren7.5/DLLCC')) #(#libraryFiles #('libsndfile.dylib' 'sndfile_lite.dylib')) #(#libraryDirectories #('/usr/local/lib')) #(#beVirtual false) #(#optimizationLevel #full))
lsf_create: name with: mode with: format with: rate with: channels
lsf_get_channels: which
lsf_get_format: which
lsf_get_frames: which
lsf_get_rate: which
lsf_open: name with: mode
lsf_read_Fsamples: which with: where with: count
lsf_read_Isamples: which with: where with: count
lsf_seek: which with: pos with: key
lsf_write_Fsamples: which with: where with: count
lsf_write_Isamples: which with: where with: count
MetaClass: LibSndFileInterface class
class initialization
initialize
Set up the class constants dictionary
examples
Demonstrate using the LibSndFileInterface; this will dump some messages to the transcript
Class: PortMidiInterface
types
Superclass: Siren.SirenExternalInterface
Category: MusicIO-External
Imports: private Siren.PortMidiInterfaceDictionary.*
Attributes:
#(#(#includeFiles #('portmidi_lite.h')) #(#includeDirectories #('Siren7.5/DLLCC')) #(#libraryFiles #('portmidi_lite.dylib' 'portmidi.dylib' 'CoreMIDI')) #(#libraryDirectories #('/usr/local/lib' '/System/Library/Frameworks/CoreMIDI.framework/Versions/Current')) #(#beVirtual false) #(#optimizationLevel #full))
procedures
pm_count_devices
pm_default_input_device
pm_default_output_device
pm_dev_dir: which
pm_get: which
pm_get_name: which
pm_has_error: which
pm_initialize
pm_open: device with: direction
pm_poll: which
pm_read: which
pm_read_controllers: which with: fromController with: toController with: data
pm_start_controller_cacheing
pm_stop_controller_cacheing
pm_terminate
pm_test
pm_write_data2: which with: d1 with: d2
pm_write_data3: which with: d1 with: d2 with: d3
pm_write_long: which with: msg with: length
pm_write_short: which with: msg
MetaClass: PortMidiInterface class
examples
Demonstrate using the PortMidiInterface
testMIDI
Demonstrate using the PortMidiInterface to call the test note function in the driver
testMIDI2
Demonstrate using the PortMidiInterface to play a note on/off cmd pair
Class: PortAudioInterface
types
Superclass: Siren.SirenExternalInterface
Category: MusicIO-External
Instance variables: cbProcess ioSemaphore
Class variables: PA_Constants
Imports: private Siren.PortAudioInterfaceDictionary.*
Attributes:
#(#(#includeFiles #('portaudio_lite.h')) #(#includeDirectories #('Siren7.5/DLLCC')) #(#libraryFiles #('portaudio_lite.dylib' 'libportaudio.dylib')) #(#libraryDirectories #('/usr/local/lib')) #(#beVirtual false) #(#optimizationLevel #full))
CallbackFcn
OEoop
procedures
pa_dev_in: which
pa_dev_out: which
pa_dev_rate: which
pa_get_name: which
pa_get_name: which with: resultString
pa_initialize
pa_in_device
pa_in_rate
pa_num_devices
pa_num_in
pa_num_out
pa_open_p: device with: out_ch with: format with: rate with: blockSize
pa_open_s: device with: in_ch with: out_ch with: format with: rate with: blockSize with: cbBlock with: in_buffer with: out_buffer
pa_out_device
pa_out_rate
pa_play: out_buffer with: numChannels with: numFrames
pa_play: out_buffer with: numChannels with: numFrames with: swap
pa_start
pa_stop
pa_terminate
accessing
cbProcess: aValue
ioSemaphore
ioSemaphore: aValue
MetaClass: PortAudioInterface class
class initialization
initialize
Set up the class constants dictionary (PortAudio 19)
examples
Demonstrate using the PortAudioInterface with the simple interface
example2
Demonstrate using the PortAudioInterface with the non-semaphore-signalling interface
Class: FFTWInterface
procedures
Superclass: Siren.SirenExternalInterface
Category: MusicIO-External
Imports: private Siren.FFTWInterfaceDictionary.*
Attributes:
#(#(#includeFiles #('fftw_lite.h')) #(#includeDirectories #('Siren7.5/DLLCC')) #(#libraryFiles #('fftw_lite.dylib' 'libfftw3f.a')) #(#libraryDirectories #('/usr/local/lib')) #(#beVirtual false) #(#optimizationLevel #full))
fftw_forward_transform
fftw_initialize: size with: samples with: spectrum
fftw_mag_spectrum: data
fftw_phas_spectrum: data
fftw_reverse_transform
fftw_short_to_float: data
MetaClass: FFTWInterface class
examples
Demonstrate using the FFTWInterface by taking the FFT of a sawtooth wave
Class: DisplayList
Instance Variables:
accessing
Superclass: DependentComposite
Category: MusicUI-DisplayLists
Instance variables: offset
offset
flatten
Answer a copy of the receiver with its hierarchy flattened.
itemsFromX: x1 toX: x2
Answer the list of items whose offsets are within the given X range.
itemsIntersecting: rect
Answer the list of items whose boundingBoxes intersect the given rectangle.
Clip them to the box's border if necessary.
itemsWithin: rect
Answer the list of items whose boundingBoxes are entirely within the given rectangle.
itemsWithin: dist of: point
Answer the list of items whose boundingBoxes are entirely within the given rectangle.
itemWithin: dist of: point
Answer the list of items whose boundingBoxes are entirely within the given rectangle.
modelsFromX: x1 toX: x2
Answer the list of model-space-items whose offsets are within the given X range.
nodeAt: aPath
Answer the element described by the collection of items in the argument.
nodeFor: aModel
Answer the element whose model is the argument.
offset
Answer the receiver's offset.
offset: aPoint
Set the receiver's offset.
wrapperClass
Raise an error.
transforming
Scale the receiver's offset by the argument.
translateBy: aPoint
Translate the receiver's offset by the argument.
printing
Descend the hierarchy printing on the stream.
printCompletePostScriptOn: aStream depth: depth
Descend the hierarchy printing on the stream.
printOn: aStream
Print the receiver on the argument using the recursive method.
printPostScriptOn: aStream
Print the receiver on the argument using the recursive method.
testing
Answer whether or not the receiver has items or components.
isEmpty
Amswer whether the receiver has any items.
bounds accessing
Compute the receiver's preferredBounds
extent
Answer the extent of the receiver.
enumerating
Iterate the argument block over the receiver's components.
displaying
Open a DisplayListView on the receiver.
displayNonCached
Open a DisplayListView on the receiver.
displayOn: aGraphicsContext
Display each of the receiver's components.
displayPostScriptOn: aPostscriptContext
Display each of the receiver's components.
adding-removing
Add the argument to the receiver.
add: aVisualComponent at: aPoint
Add aVisualComponent to the receiver's components with its offset set to aPoint.
add: anItem atPath: aPath
Add the first argument at the node described by the second.
addAll: aCollection
Add the argument to the receiver.
addComponent: aVisualComponent
Add the argument to the receiver.
addWrapper: aVisualWrapper
Raise an error.
MetaClass: DisplayList class
examples
Create and answer a large display list with a lines, strings, and visuals.
gridExample
Create and answer a large display list with lines and strings.
gridExampleX: x byY: y
Create and answer a large display list with lines and strings.
polylineExample
Answer a display list with randomly-placed random-color polylines over the given extent.
polylineExampleHuge
Answer a display list with randomly-placed random-color polylines over the given (very large) extent.
polylinesX: x byY: y
Answer a display list with randomly-placed random-color polylines over the given extent.
polylinesX: x byY: y items: num
Answer a display list with randomly-placed random-color polylines over the given extent.
postScriptExample
Create and answer a large display list with a lines, strings, and visuals.
randomExample
Create and answer a large display list with a lines, strings, and visuals.
rectangleExample
Answer a display list with randomly-placed random-color rectangles over the given extent.
rectanglesX: x byY: y
Answer a display list with randomly-placed random-color rectangles over the given extent.
stringExample
Open a display list view with randomly-placed random-color strings over the given extent.
stringsX: x byY: y
Answer a display list with randomly-placed random-color strings over the given extent.
visualsX: x byY: y
Answer a display list with randomly-placed random-color visuals over the given extent.
Class: DisplayItem
Instance Variables:
The subclasses add special display-related state and behavior such as an extent point and display method, or a visual item such as a string or image to display.
This implementation is MODE 1.1, STEIM, Amsterdam, May/June 1990; updated at the Lagoon in Palo Alto, July, 1991-May, 1992.
The entirety of this software is Copyright (c) 1990, Stephen Travis Pope, Nomad Object Design/Nomad Computer Music Research.
transforming
Superclass: DependentPart
Category: MusicUI-DisplayLists
Instance variables: offset color
These are done this way because I don't think wrappers are right for use in display lists.
offset
color
They generally implement displayOn: aGraphicsContext and bounds accessing methods.
All Rights Reserved.
Answer an encapsulated version of the receiver which understands
VisualComponent protocol.
scaleBy: aPoint
Translate the receiver's offset by the argument.
scaledBy: aPoint
Translate the receiver's offset by the argument.
translateBy: aPoint
Translate the receiver's offset by the argument.
printing
Print the receiver in the given Stream.
printOn: aStream
Print the receiver in the given Stream.
accessing
Answer the receiver's display color.
color: aVal
Set the receiver's display color to the argument.
extent
Answer the extent of the receiver (dummy in this class).
extent: aPoint
Ignored
offset
Answer the receiver's offset.
offset: aPoint
Set the receiver's offset to the argument.
testing
Answer whether the receiver is a kind of DisplayItem
initialize-release
Initialize the instance variables of the receiver.
displaying
Display the receiver on the argument.
displayPostScriptOn: aPostScriptContext
Display the receiver on the argument in PostScript.
copying
Answer a shallow copy of the receiver.
bounds accessing
Answer the receiver's bounds--hack.
MetaClass: DisplayItem class
instance creation
Answer an instance of DisplayItem with the given instance variables.
offset: aPt
Answer an instance of DisplayItem with the given instance variables.
Class: DisplayVisual
Instance Variables:
accessing
Superclass: Siren.DisplayItem
Category: MusicUI-DisplayLists
Instance variables: visual
Imports: MusicConstants
visual
Answer the visual's bounds translated by the receiver's translation.
visual
Answer the receiver's visual.
visual: aVisual
Set the receiver's visual.
printing
Print the receiver in the given Stream.
storeOn: aStream
Print the receiver in the given Stream.
displaying
Display the receiver's visual on the given graphics context.
displayPostScriptOn: aPostscriptContext
Display the receiver on the argument as a PostScript item.
MetaClass: DisplayVisual class
examples
Convert all the forms to opaque forms
displayMusicConstants
Draw a nice table of the hierarchical image dictionary.
storeMusicConstants
Write out all the forms to opaque forms
visualExample
Open a display list view with randomly-placed random-color visuals over the given extent.
instance creation
Answer an instance of DisplayItem with the given instance variables.
visual: aV
Answer an instance of DisplayItem with the given instance variables.
visual: aV offset: aPt
Answer an instance of DisplayItem with the given instance variables.
visual: aV origin: aPt
Answer an instance of DisplayItem with the given instance variables.
Class: DisplayLine
Instance Variables:
accessing
Superclass: Siren.DisplayItem
Category: MusicUI-DisplayLists
Instance variables: width extent
width
extent
Set the corner of the receiver (offset + extent).
extent
Answer the extent of the receiver.
extent: aPoint
Set the extent of the receiver.
width: aVal
printing
Print the receiver in the given Stream.
displaying
Display a line between startPoint and endPoint.
displayPostScriptOn: aPostscriptContext
Display the receiver on the argument as a PostScript item.
bounds accessing
Answer the receiver's bounds.
MetaClass: DisplayLine class
instance creation
Answer an initialized instance.
offset: oPoint extent: ePoint
Answer an initialized instance.
Class: DisplayString
Instance Variables:
accessing
Superclass: Siren.DisplayItem
Category: MusicUI-DisplayLists
Instance variables: string font
string
font
Answer a rectangle that circumscribes the receiver.
extent
Answer a rectangle that circumscribes the receiver.
font
Answer the receiver's font.
font: aFont
Set the receiver's font.
string
Answer the receiver's string.
string: aString
Set the receiver's string.
printing
comment stating purpose of message
displaying
display the receiver on the argument.
displayPostScriptOn: aPostscriptContext
Display the receiver on the argument as a PostScript item.
initialize-release
Initialize the instance variables of the receiver.
MetaClass: DisplayString class
examples
Open a display list view with randomly-placed random-color strings over the given extent.
instance creation
Answer a new initialized instance.
string: aString
Answer a new instance with the argument as its string.
string: aString offset: oPoint
Answer a new instance with the arguments as its string and offset point.
Class: DisplayRectangle
Instanve Variables:
accessing
Superclass: Siren.DisplayLine
Category: MusicUI-DisplayLists
Instance variables: fill stroke
fill
Set the receiver's filling Boolean.
stroke: aNum
Set the receiver's stroke line thickness.
displaying
Display a line between startPoint and endPoint.
displayPostScriptOn: aPostscriptContext
Display the receiver on the argument as a PostScript item.
MetaClass: DisplayRectangle class
examples
Open a display list view with randomly-placed random-color rectangles over the given extent.
Class: DisplayPolyline
Instance Variables:
accessing
Superclass: Siren.DisplayRectangle
Category: MusicUI-DisplayLists
Instance variables: vertices
vertices
Answer the receiver's bounds.
extent
Answer the receiver's extent.
vertices: pointArray
Set the receiver's vertices.
transforming
Scale all the receiver's points by the argument; answer a copy.
displaying
Stroke the receiver's edges on the supplied GraphicsContext.
MetaClass: DisplayPolyline class
instance creation
Answer a new DisplayPolyline with the arguments as its vertices.
vertices: arrayOfPoints
Answer a new DisplayPolyline with the arguments as its vertices.
examples
Open a display list view with randomly-placed random-color polylines over the given extent.
Class: DisplayListTracker
Instance Variables:
private
Superclass: SelectionTracker
Category: MusicUI-DisplayListViews
Instance variables: inside
inside
events
redButtonPressedEvent: aMouseButtonEvent
MetaClass: DisplayListTracker class
Instance Variable:
accessing
Superclass: Siren.EditorModel
Category: MusicUI-DisplayListViews
Instance variables: list
It handles selection and operation on the list.
It adds itself as a dependent of the list and echoes its change messages (i.e., the update: message says self changed).
list
selection
Answer the receiver's list.
list
Answer the receiver's list.
list: aList
Set the receiver's list, removing the dependency to the former list if necessary.
moveSelectionTo: newPoint
Move the editor's selection to the new point in the list.
initialize-release
Remove the dependency to the list.
editing
inspect button
doEdit
edit button
doFile
file i/o button
doInspect
Inspect the editor (if shiftDown) or the model.
doZoom
zoom button
updating
Echo the model's changes, assuming a view is a dependent of the receiver.
MetaClass: DisplayListEditor class
instance creation
Class: DisplayListView
Subclasses generally override the displayOn: or displayOnImage methods, and add initialization or transformation methods.
Instance Variables
See the class examples for numerous ways of using display list views.
The subclasses add knowledge of smart display list generation, background pixmap generation (e.g., gridding), display of item or x/y-range selection, x- or y-scaling or step/grid, property->color mapping, "clef forms" or other special pixmaps, multiple-model viewing, etc.
accessing
Superclass: AutoScrollingView
Category: MusicUI-DisplayListViews
Instance variables: displayList pixmap background page zoom grid extent inset
backgroundColor foregroundColor redrawn cache
Class variables: MusicConstants
Using their page offset, they can scroll over very large display lists.
They can have colored or gridded background pixmaps and can scroll/page on demand; they display their lists on their graphics contexts.
displayList
pixmap
background
zoom
pageOffset
backgroundColor
foregroundColor
redrawn
cache
Set the receiver's 'background' to be anObject.
backgroundColor
Answer the receiver's backgroundColor or the default.
bounds: aRectangle
Set the receiver's bounds (and page offset).
cache: aBoolean
Set the receiver's 'cache' to be aBoolean.
displayList
Answer the receiver's display list.
displayList: anObject
Set the receiver's 'displayList' to be anObject.
foregroundColor
Answer the receiver's foregroundColor or the default.
inset: aPoint
Set the receiver's inset to aPoint (pixels).
list
Answer the receiver's display list.
pageOffset
Answer the receiver's 'pageOffset'.
pageOffset: anObject
Set the receiver's 'pageOffset' to be anObject.
pixmap: aPMorNil
Set (or destroy) the receiver's cached pixmap.
preferredBounds
Answer the displayList's bounds.
zoom: aPoint
Set the receiver's 'zoom' to be aPoint.
private
Answer the extent of the receiver's display object bounding box.
setModel: aModel
visibleExtent
Answer the extent of the receiver's clipping box.
controller access
transformPoint: aPoint
zoom, scroll, and page the given point, used for hit-detection.
initialize-release
Answer a DLView for use as a component.
initialize
Initialize the receiver's instance variables--the default is not to cache.
initializeCache
Initialize the receiver's instance variables for cacheing the pixmap during display.
initializeWithGrid: gPoint color: gColor
Initialize the receiver's instance variables--the default is to cache.
release
Remove the receiver as a dependent of its model.
displaying
displaySelectionOn: aGC
Display the model's selection using some form of highlighting.
invalidate
MetaClass: DisplayListView class
instance creation
Answer a DLView for use as a component.
componentOnList: dlist withGrid: gPoint inColor: gColor
Answer a DLView for use as a component.
on: anEditor
open4SquareOn: aDisplayList
Open the receiver on the given display list.
openOn: aDisplayList
Open the receiver on the given display list.
constant access
Answer the default background color for display list views.
constants
constants: aDictionary
defaultCacheExtent
Answer the default extent of the receiver's instances' cache.
foregroundColor
Answer the default foreground color for display list views.
inset
Answer the default display inset.
class initialization
Init the class
examples
DisplayListView classListExample
classTreeExample
DisplayListView classTreeExample
colorClassListExample
DisplayListView colorClassListExample
exampleHierarchical
DisplayListView exampleHierarchical
Class: DisplayListController
By default, a simple YellowButton menu allows for group/inspect/redraw/zoom.
Instance Variables:
menu messages
Superclass: ControllerWithMenu
Category: MusicUI-DisplayListViews
Instance variables: selOffset
The RedButton is used for display item selection (by pointing or boxing-in).
LeftShift extends the selection, and dragging a selection moves it.
selection
Repeat the last operation
copyItem
Copy the selection.
cutItem
Cut the selection.
doInspect
Inspect the view (if leftShiftDown) or the model.
flattenItems
Flatten the hierarchy of the selection.
groupItems
Group the selection.
inspectDisplayList
Inspect the display list.
inspectEditor
Inspect the display list editor.
inspectModel
Inspect the model.
optionsDialog
Run the options dialog box.
pasteFromBuffer
Paste the selection.
pasteItem
Paste the selection.
redraw
Redraw the view and clear the selection.
redrawView
redraw the display list.
undo
Un-do the last operation
ungroupItems
Un-group the selection.
zoom
Prompt the user for a scale point, zoom the view's scale, and redraw.
zoomInPoint
Zoom the view's scale, and redraw.
zoomOutPoint
Zoom the view's scale, and redraw.
zoomTo1
Zoom the view's scale, and redraw.
control defaults
Drag scroll amplified by 2@2 with the blue button.
redButtonActivity
Hit-detect items from the display list or drag a selection.
redButtonPressedAt: pt
Handle the red mouse click
yellowButtonActivity0
Drag scroll amplified by 2@2 with the blue button.
selecting
Hit-detect the model for the given pt.
selectFromPoint: aPoint toPoint: anotherPoint
Hit-detect the model for the given range.
selectRangeWhile: durationBlock
Hit-detect items from the display list or drag a selection as long as the block is true.
accessing
Answer the receiver's 'selection'.
selection: anObject
Set the receiver's instance variable 'selection' to be anObject.
selectionTracker
events
Dragging is event oriented.
mouseMovedEvent: anEvent
Mouse dragging
redButtonPressedEvent: event
redButtonReleasedEvent: event
selectEvent: anEvent
initialize-release
Set up the receiver's YellowButtonMenu
MetaClass: DisplayListController class
resources
MenuEditor new openOnClass: self andSelector: #defaultEditMenu
Class: DisplayListSubcanvas
Instance Variables:
actions
Superclass: ApplicationModel
Category: MusicUI-DisplayListViews
Instance variables: displayList componentPart displayListView scroller
vZoom hZoom
displayList comment
componentPart
displayListView
scroller my scroller (container)
vZoom
hZoom
This stub method was generated by UIDefiner
prevPage
This stub method was generated by UIDefiner
zoomChanged
Sent when the users moves the zoom sliders.
zoomTo1
Sent when the users presses the zoom-to-1 button.
zoomToLast
This stub method was generated by UIDefiner
aspects
Create and answer the receiver's display list view
hZoom
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
setComponent: aComponent
Set the receiver's component part
setDisplayList: aDisplayList
Set the receiver's display list
vZoom
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
MetaClass: DisplayListSubcanvas class
interface specs
Answer the user's favorite window layout
windowSpec4Square
UIPainter new openOnClass: self andSelector: #windowSpec4Square
windowSpecLeftBottom
Tools.UIPainter new openOnClass: self andSelector: #windowSpecLeftBottom
instance creation
openOnList: aDisplayList
DisplayListSubcanvas openOnList: (DisplayList rectanglesX: 6000 byY: 6000)
Class: StructureAccessor
InstanceVariableNames:
Superclass: Object
Category: MusicUI-Layout
Instance variables: subject itemGenerator
The basic display item generating protocol is:
(aStructureAccessor itemFor: aModelNode).
subject
Answer the iG of the receiver.
itemGenerator: anObject
Set the iG of the receiver.
subject
Answer the subject of the receiver.
subject: anObject
Set the subject of the receiver.
item accessing
Answer a display item for the argument
MetaClass: StructureAccessor class
InstanceVariableNames:
accessing
Superclass: Siren.StructureAccessor
Category: MusicUI-Layout
Instance variables: terminalQuery childAccessor
The basic display tree walking protocol is:
(aSTreeAccessor childrenOf: aModelNode); and
(aSTreeAccessor isTerminal: aModelNode).
terminalQuery
childAccessor
Model items are passed to these (if they're Blocks),
or have to perform: them (if they're Symbols).
Set the cA of the receiver.
terminalQuery: anObject
Set the tQ of the receiver.
treeAccessor
Answer the receiver.
tree accessing
Answer the children of the argument by using the child accessor.
isTerminal: aNode
Answer whether the argument is terminal by using the terminal query.
leavesOf: aRoot
Answer the leaves of the argument by using the child accessor.
MetaClass: STreeAccessor class
instance creation
Answer an initialized instance.
Class: LayoutManager
Instance Variables:
Look for class references to the LayoutManager classes (mostly from DisplayListView classes), for lots of examples of the use of LayoutManagers.
This implementation is Topaz 0, STEIM, Amsterdam, May/June 1990.
The entirety of this software is Copyright (c) 1990, Stephen Travis Pope, Nomad Object Design/Nomad Computer Music Research.
accessing
Superclass: Object
Category: MusicUI-Layout
Instance variables: view orientation itemAccessor
This is David's miraculous idea and the heart of the Navigator architecture.
view
orientation
itemAccessor
All Rights Reserved.
Answer the receiver's display list (generated).
displayListFor: aView
Answer the receiver's display list (generated).
orientation: aSymbol
Set the receiver's orientation.
view: aView
Set the receiver's view.
generating
Add the given item to the display list.
generateDisplayList
Generate and answer the receiver's display list.
MetaClass: LayoutManager class
Instance Variables:
accessing
Superclass: Siren.LayoutManager
Category: MusicUI-Layout
Instance variables: length xStep yStep treeAccessor
length
xStep
yStep
treeAccessor
Set the receiver's tree accessor to the argument.
xStep: aNumber
Set the receiver's x step size to the argument.
yStep: aNumber
Set the receiver's y step size to the argument.
generating
Add the given item to the display list.
addItem: aModelNode atNode: aPath in: aDisplayList
Add the given item to the display list.
displayPositionFor: aPath
Answer the display position of the element at the given path.
generateDisplayList
Generate and answer the receiver's display list.
MetaClass: HierarchyLayoutManager class
generating
Superclass: Siren.HierarchyLayoutManager
Category: MusicUI-Layout
Answer the display position of the element at the given path.
displayPositionFor: aPath
Answer the display position of the element at the given path.
MetaClass: IndentedListLayoutManager class
examples
IndentedListLayoutManager colorListExample display
listExample
IndentedListLayoutManager listExample display
Class: TimeSequenceLayoutManager
Instance Variables:
generating
Superclass: Siren.LayoutManager
Category: MusicUI-Layout
Instance variables: timeScale timeOffset
timeScale
timeOffset
Add the given item to the display list.
displayPointFor: anAss
Answer the display point for the argument.
accessing
Set the receiver's time offset.
timeScale: aNumber
Set the receiver's time scale.
MetaClass: TimeSequenceLayoutManager class
Instance Variables:
accessing
Superclass: Siren.TimeSequenceLayoutManager
Category: MusicUI-Layout
Instance variables: pitchScale pitchOffset
The default layout is linear pitch-to-y, like piano-roll or Hauer-Steffens notation.
pitchScale
pitchOffset
Set the receiver's pitch offset.
pitchScale: aNumber
Set the receiver's pitch scale.
generating
Answer the display point for the argument.
MetaClass: PitchTimeLayoutManager class
generating
Superclass: Siren.PitchTimeLayoutManager
Category: MusicUI-Layout
Answer the display point for the argument.
MetaClass: PositionTimeLayoutManager class
generating
Superclass: Siren.IndentedListLayoutManager
Category: MusicUI-Layout
Instance variables: list
Add the given item to the display list.
generateDisplayList
Generate and answer the receiver's display list.
MetaClass: IndentedTreeLayoutManager class
examples
IndentedTreeLayoutManager listExample display
Class: EventListTreeItem
initialize-release
Superclass: ApplicationModel
Category: MusicUI-Editors
Instance variables: lists
accessing
hasChildren
MetaClass: EventListTreeItem class
accessing
Superclass: Siren.SoundFileViewer
Category: MusicUI-Editors
actions
Edit the selected sound file
loadFile
Load the selected file into the SirenSession
playFile
Play the selected sound file
MetaClass: EventListFileViewer class
accessing
tabLabel
Class: EventListText
accessing
Superclass: ApplicationModel
Category: MusicUI-Editors
Superclass: ApplicationModel
Category: MusicUI-Editors
Instance variables: scoreView listTree
Answer up the score view
aspects
Answer up the event list dictionary tree
initialize/release
EventListTreeEditor open
MetaClass: EventListTreeEditor class
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
resources
Class: EventListPanel
accessing
Superclass: ApplicationModel
Category: MusicUI-Editors
Instance variables: editorView scoreView textView
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
scoreView
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
textView
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
MetaClass: EventListPanel class
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
Class: ScoreView
menu messages
Superclass: ApplicationModel
Category: MusicUI-Editors
Superclass: Siren.DisplayListController
Category: MusicUI-Editors
Inspect the editor (if leftShiftDown) or the list.
group
Group the current selection as a separate sub-event list in the model.
pan
Pan the view in x highlighting the time value until mouse press.
play
Play the list.
readList
Copy the model list from the global dictionary.
storeList
Copy the model list into the global dictionary.
selecting
Hit-detect the model for the given range.
initialize-release
Set up the receiver's YellowButtonMenu
MetaClass: TimeSequenceController class
selecting
Superclass: Siren.TimeSequenceController
Category: MusicUI-Editors
Hit-detect the model for the given range.
MetaClass: PitchTimeController class
Instance Variables:
Superclass: Siren.DisplayListView
Category: MusicUI-Editors
Instance variables: clefForm xScaleDefault xScale xColor yColor headColor
clefColor itemAccessors
Time may run horizontally (default) or vertically, depending on the layout manager.
clefForm
Display the receiver on the argument.
displayOnImage
Display the receiver on its cached form.
highlightFrom: pt1 to: pt2
Show selection of the range pt1--pt2.
highlightTime: value
Show selection of the time value value.
reallyDisplayOn: gc
Display the receiver on its cached form.
zoom: aPoint
Set the receiver's 'zoom' to be aPoint.
accessing
Answer the receiver's cached pixmap.
clefColor
Answer the receiver's 'clefColor'.
clefColor: anObject
Set the receiver's 'clefColor' to be anObject.
clefForm
Answer the receiver's clef form.
clefWidth
Answer the receiver's clef form width.
headColor
Answer the receiver's 'headColor'.
headColor: anObject
Set the receiver's 'headColor' to be anObject.
xColor
Answer the receiver's 'xColor'.
xColor: anObject
Set the receiver's 'xColor' to be anObject.
xScale
Answer the receiver's 'xScale'.
xScale: anObject
Set the receiver's 'xScale' to be anObject.
yColor
Answer the receiver's 'yColor'.
yColor: anObject
Set the receiver's 'yColor' to be anObject.
transforming
take a note's time and return a display point x coordinate relative to the form.
timeFromX: aNumber
Answer an event list time from the argument.
layout manager access
Answer the correct visual item for the given assoc. (sent from layoutManagers).
itemFor: anAss
Answer the correct visual item for the given assoc. (sent from layoutManagers).
layoutManager
Answer a default layout manager for the receiver.
initialize-release
Initialize the instance variables of the receiver.
controller access
Answer the class of the default controller for the receiver.
updating
Redraw the display
MetaClass: TimeSequenceView class
examples
Open a sequence view on a random event list.
instance creation
Open the receiver on the given event list.
constant access
Answer the default extent of the receiver's instances' cache.
inset
Answer the default display inset.
Class: PitchTimeView
Instance Variables:
displaying
Superclass: Siren.TimeSequenceView
Category: MusicUI-Editors
Instance variables: pitchOffset yScale yScaleDefault
The relationship may be a function (as in piano-roll and Hauer-Steffens notation), or involve a look-up table (as in CMN).
pitchOffset
Show selection of the range pt1--pt2
zoom: aPoint
Set the receiver's 'zoom' to be aPoint.
transforming
Answer the transformed pitch represented by the y-coordinate of the argument.
layout manager access
Answer the correct visual item for the given assoc. (sent from layoutManagers).
itemFor: anAss
Answer the correct visual item for the given assoc. (sent from layoutManagers).
layoutManager
Answer a default layout manager for the receiver.
initialize-release
Initialize the instance variables of the receiver.
controller access
Answer the class of the default controller for the receiver.
MetaClass: PitchTimeView class
examples
Open a p-t view on a random event list.
randomExampleLong
Open a p-t view on a random event list.
instance creation
Answer the view label for the receiver's instances.
subview creation
Add the default button panel to the instance in the given rectangle.
Class: HauerSteffensView
initialize-release
Superclass: Siren.PitchTimeView
Category: MusicUI-Editors
Initialize the instance variables of the receiver.
private
Display a C clef for the given octave at the given point.
drawStaff
Display a Hauer-Stephens-type staff onto the given pixmap.
initForm
Copy the default backgroundForm and draw a H-S staff on it.
MetaClass: HauerSteffensView class
examples
Open a HSView on two merged random event lists.
randomSWSSExample
Open a HSView on two merged random event lists.
instance creation
Answer the view label for the receiver's instances.
constant access
Answer the default extent of the receiver's instances' cache.
inset
Answer the default display inset.
Class: PhraseView
layout manager access
Superclass: Siren.TimeSequenceView
Category: MusicUI-Editors
Answer the correct visual item for the given assoc. (sent from layoutManagers).
itemFor0: anAss
Answer the correct visual item for the given assoc. (sent from layoutManagers).
itemFor: anAss
Answer the correct visual item for the given assoc. (sent from layoutManagers).
MetaClass: PhraseView class
examples
PhraseView example
Class: PositionTimeView
layout manager access
Superclass: Siren.PitchTimeView
Category: MusicUI-Editors
Answer a default layout manager for the receiver.
initialize release
Initialize the instance variables of the receiver.
MetaClass: PositionTimeView class
Instance variables:
list access
Superclass: Siren.DisplayListEditor
Category: MusicUI-Editors
Instance variables: eventList ostinato defaultEvent
They hold onto EventLists and send messages to them.
list
ostinato
selection
ampl
Add the given EventAssociation to the model list.
doInspect
Inspect the receiver's list.
eraseList
Flush the receiver's list.
play
Play the receiver's eventList.
remove: anEvent
Remove the given event from the receiver's list
startStop
If not playing, create ostinato and start; if playing, stop and release.
links and groups
Group the event list argument within the receiver's list.
link: anEvent with: anOtherEvent
Set up a link between the two events or lists.
select: anAorEL
Add the given association to the list of selected items.
accessing
Answer the amplitude of the default event.
ampl: newValue
Set the amplitude of the default event.
defaultEvent
Answer the receiver's default event.
defaultEvent: anEvent
Set the receiver's default event.
displayList
Answer nil.
eventList
Answer the receiver's subject eventList.
eventList: anEL
Set the given EventList as the receiver's model.
items
Answer the subject eventList's events.
initialize-release
Release the receiver's list.
MetaClass: EventListEditor class
menu messages
MusicUI-Functions
Superclass: Siren.DisplayListController
Category: MusicUI-Functions
Instance variables: modelIndex
Add a new function to the view's model array.
clearFunction
Clear the current function to the view's model array.
doInspect
Inspect the receiver's array of models
enterFunction
Add a new function to the view's model array after typing in its breakpoints.
redraw
Redraw the view and clear the selection.
setAScale
comment stating purpose of message
private
Add a new point to the model near the current point.
dragPoint: cPoint
Drag the current point.
rubberBandLinesBetween: p1 and: p2 and: p3
Drag two lines between the given end- and middle-points;
answer the final mid-point
selectModel: index
Set the model index of the receiver to the argument.
control defaults
Hit-detect items from the display list or drag a selection.
selectAtPoint: aPoint
Hit-detect the model for the given pt.
events
Mouse dragging
accessing
Answer the view's model at the receiver's model index.
initialize-release
initializeMenu
Set up the receiver's YellowButtonMenu
MetaClass: FunctionController class
Instance variables:
accessing
Superclass: Siren.DisplayListView
Category: MusicUI-Functions
Instance variables: models aScale vRange hRange colors normalize lineWidth
Class variables: LineWidth
They can display up to 4 model functions on a fixed-size non-scrolling field.
models
aScale
vRange
hRange
colors
normalize <
Answer the receiver's 'aScale'.
aScale: anObject
Set the receiver's instance variable 'aScale' to be anObject.
colors
Answer the receiver's color array.
colors: anArrayOfSize4
Set the receiver's color array to the argument.
displayExtent
Answer the receiver's visual extent.
dontNormalize: aNumber
hRange
Answer the receiver's 'hRange'.
hRange: aNumber
Set the receiver's horizontal extent to aNumber.
lineWidth: aNumber
Set the receiver's line width to the argument.
model
Answer the fisrt element from receiver's array of models.
modelAt: anIndex
Answer the receiver's model at the given index.
modelAt: anIndex put: aFunction
Set the receiver's model at the given index to the given function.
models
Answer the receiver's first model.
models: anArray
Set the receiver's array of models to the argument.
normalize: aNumber
normalizeArray: arrayOfBooleans
Set the receiver's array of normalization switches.
vRange
Answer the receiver's 'vRange'.
vRange: aNumber
Set the receiver's vertical extent to aNumber.
displaying
Display the gridding for the receiver on its cached form.
displayOn: aGraphicsContext
Transcript show: 'FcnView size: ', hRange printString, ' @ ', vRange printString; cr.
displayOnImage
Display the receiver on its cached form.
updateBetween: p1 and: p2 with: color on: gc
Display the receiver on its cached form.
initialize-release
Initialize the receiver's instance variables for cacheing the pixmap during display.
initializeCacheing
Initialize the receiver's instance variables for cacheing the pixmap during display.
initializeCacheingSmall
Initialize the receiver's instance variables for cacheing the pixmap during display.
initializeCacheSized: x by: y
Initialize the receiver's instance variables for cacheing the pixmap during display.
setPixmap
Reset the receiver's pixmap display cache after changing its size.
private
Set the receiver's model to be aModel
source
controller access
Set the receiver's bounds.
defaultControllerClass
MetaClass: FunctionView class
instance creation
componentOnFunctions: functionArray withColors: colorArray normalize: normArray x: x y: y
componentOnFunctions: functionArray withColors: colorArray x: x y: y
onFunction: function
FunctionView example
onFunction: function normalize: norm
FunctionView example
onFunction: function x: x y: y
FunctionView onFunction: (LinearFunction from: #((0@0) (0.1@1.0)
(0.15@0.75) (0.75@0.5) (1@0)))
x: 256 y: 128
onFunctions: functionArray
FunctionView onFunctions: (Array
with: (LinearFunction from: #((0@0) (0.15@1.0) (0.25@0.75) (0.75@0.5) (1@0)))
with: (LinearFunction from: #((0@0.1) (0.3@0.7) (0.7@0.45) (1@0)))
with: (LinearFunction from: #((0@0) (0.05@1) (0.2@0.35) (1@0)))
with: (LinearFunction from: #((0@0.2) (0.6@0.3) (1@0.3))))
onFunctions: functionArray normalize: normArray
FunctionView onFunctions: (Array
with: (LinearFunction from: #((0@0) (0.15@1.0) (0.25@0.75) (0.75@0.5) (1@0)))
with: (LinearFunction from: #((0@0.1) (0.3@0.7) (0.7@0.45) (1@0)))
with: (LinearFunction from: #((0@0) (0.05@1) (0.2@0.35) (1@0)))
with: (LinearFunction from: #((0@0.2) (0.6@0.3) (1@0.3))))
onFunctions: functionArray withColors: colorArray normalize: normArray x: x y: y
FunctionView onFunctions: (Array
with: (LinearFunction from: #((0@0) (0.15@1.0) (0.25@0.75) (0.75@0.5) (1@0)))
with: (LinearFunction from: #((0@0.1) (0.3@0.7) (0.7@0.45) (1@0)))
with: (LinearFunction from: #((0@0) (0.05@1) (0.2@0.35) (1@0)))
with: (LinearFunction from: #((0@0.2) (0.6@0.3) (1@0.3))))
withColors: (Array with: ColorValue blue with: ColorValue red
with: ColorValue cyan with: ColorValue green)
normalize: #(false false false false)
x: 512 y: 256
onFunctions: functionArray withColors: colorArray x: x y: y
FunctionView onFunctions: (Array
with: (LinearFunction from: #((0@0) (0.15@1.0) (0.25@0.75) (0.75@0.5) (1@0)))
with: (LinearFunction from: #((0@0.1) (0.3@0.7) (0.7@0.45) (1@0)))
with: (LinearFunction from: #((0@0) (0.05@1) (0.2@0.35) (1@0)))
with: (LinearFunction from: #((0@0.2) (0.6@0.3) (1@0.3))))
withColors: (Array with: ColorValue blue with: ColorValue red
with: ColorValue cyan with: ColorValue green)
x: 512 y: 256
onFunctions: functionArray x: x y: y
FunctionView onFunctions: (Array
with: (LinearFunction from: #((0@0) (0.15@1.0) (0.25@0.75) (0.75@0.5) (1@0)))
with: (LinearFunction from: #((0@0.1) (0.3@0.7) (0.7@0.45) (1@0)))
with: (LinearFunction from: #((0@0) (0.05@1) (0.2@0.35) (1@0)))
with: (LinearFunction from: #((0@0.2) (0.6@0.3) (1@0.3))))
x: 512 y: 256
openOn: function
smallOnFunction: function
FunctionView example
examples
FunctionView example
expSegExample
Demonstrate an ExpSeg function with different weights.
fileExample
Read an extracted envelope as floating-point data from a file.
linSegExample
FunctionView linSegExample
multiFunctionExample
Open a function editor on 4 different functions.
smallFileExample
Read an extracted envelope as floating-point data from a file.
smallMultiFunctionExample
Open a function editor on 4 different functions.
class initialization
Set up the defaults
constant access
Answer the default color array for the 4 functions.
inset
Answer the default display inset.
lineWidth
Answer the default line width for fnuction plots.
lineWidth: anInteger
Set the default line width for fnuction plots.
Class: SoundEditor
Instance Variables:
interaction
Superclass: Siren.EditorModel
Category: MusicUI-Sound
Instance variables: sound undoSound markers lastSelection changed
copyBuffer
sound
markers
selection1
selection2
lastSelection
view
changed
Copy the current selection into the temporary copy buffer.
cut
Cut out the current selection.
file
Save the receiver's sound to a file.
newCopy
Make a fresh copy of the receiver's model's sound.
play
Play the receiver's sound
playAll
Play the receiver's sound
playSelection
Play the receiver's sound
spawn
Open a soundfile editor.
accessing
Flush the selection and markers
list
mark: aSampleNumber
Set the receiver's model
markChanged: aBoolean
Set the flag to tell the receiver that the model's been changed.
markers
Answer the receiver's markers
markers: aCollection
Set the receiver's marker collection.
selection1
Answer the receiver's primary selection.
selection1: anInteger
Set the receiver's primary selection.
selection2
Answer the receiver's 2nd-ary selection.
selection2: anInteger
Set the receiver's secondary selection.
selectionStart
selectionStop
setModel: aModel
Set the receiver's model.
size
sound
Answer the receiver's model
sound: aSound
Set the receiver's model to be the given sound
view: aView
Set the receiver's view to be the given view
initialize release
Set up the proper default values for the receiver.
reinitialize
Set up the proper default values for the receiver.
selection
Take a mouse point and place a marker on the sound sample there.
selectedSound
Answer a sound from the receiver view's selection.
setSelection: aMarker
Set the primary selection to be the given marker.
MetaClass: SoundEditor class
instance creation
Answer an initialized instance.
Class: SoundController
menu messages
Superclass: ControllerWithMenu
Category: MusicUI-Sound
Instance variables: selection tracking
Flush the selection and markers
copy
copy the selected sound
cut
cut the selected segment out of the receiver's model sound
doInspect
Inspect the view.
fadeIn
Apply a ramp fade-in envelope to the receiver's sound.
fadeOut
Apply a ramp fade-out envelope to the receiver's sound.
file: ignored
Open the file dialog
inspect: ignored
Inspect the view.
menu
newCopy: ignored
Make a fresh copy of the receiver's model's sound.
paste
paste the selected sound into the model at the current selected marker
play: ignored
play the model
playAll
play the model
playSelection
play the model
reset
Clear the model's selections and markers
save
Save a copy of the model to the disk.
setHscale
set the horizontal scale of the view
setVscale
set the vertical scale of the view
spawn
Edit a copy of the model.
control defaults
set a marker with the red button
selectMarkerAt: x
Select the marker at the given x value.
event driven
redraw the view to clear the position display.
mouseMovedEvent: aMouseMovedEvent
redButtonPressedEvent: event
set a marker with the red button
MetaClass: SoundController class
Instance variables:
converting indeces
Superclass: Siren.DisplayListView
Category: MusicUI-Sound
They can do horizontal scrolling and scaling.
step
scale
Answer the sample under the point with x = xValue.
xForSample: sample
Answer the xValue of the sample with the given index.
accessing
Set the receiver's bounds.
markerColor
Answer the color for selection markers.
preferredBounds
Answer the extent of the receiver's display object bounding box.
scale
Return the vertical scale.
scale: theScale
Accept the argument, 'theScale', as the new instance variable 'scale'.
sound
Answer the model's sound.
sound: aSound
Set the model's sound.
step
Return the horizontal sample-per-pixel scale
step: theStep
Accept the argument, 'theStep', as the new instance variable 'step'.
text
Answer the default display text for the receiver's sound.
viewExtent
Answer the extent of the receiver's display object bounding box.
selection
take a mouse point and place a marker on the sound sample there
selectBetween: startValue and: stopValue
take a mouse region and place a marker on the sound sample there
showMarkerAt: xValue
take a mouse point and place a marker on the sound sample there
displaying
Show the selections (up to 2 markers) in the current sound
displayOn: aGraphicsContext
Display the receiver's sound on the argument
displayOnGC: aGC
Show the receiver's sound on the GC.
displayPosition: pos
Display the mouse pos in the corner of my display
invalidate
Redisplay the receiver's sound
redraw
Redisplay the receiver's sound
initialize-release
Set up the proper default values for the receiver.
controller access
Answer the default controller class for use with the receiver.
private
Answer the extent of the receiver's display object bounding box.
visibleExtent
Answer the extent of the receiver's clipping box.
MetaClass: SoundView class
instance creation
Answer a DLView for use as a component.
componentOnSoundNoFrills: aSound
Answer a DLView for use as a component.
openOn: aSound
Take the sound as model and open a SoundView
soundViewOn: aSound
Take the sound as model and open a SoundView
examples
Open a sound view on the example sound file.
example2
Open a sound view on the a sound from a file.
exampleLong
Open a sound view on the a sound from a file.
exampleRamp
Open a sound view on the a sound with a slow ramp.
Class: SoundCanvas
Instance Variables:
actions
Superclass: ApplicationModel
Category: MusicUI-Sound
Instance variables: vZoom hZoom soundView scroller componentPart
vZoom
hZoom
soundView
scroller
componentPart
ignored
zoomToZero
This stub method was generated by UIDefiner
aspects
hZoom
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
preferredBounds
setComponent: aComponent
Set the receiver's component part
vZoom
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
initialize
Create and answer the receiver's sound view
MetaClass: SoundCanvas class
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
Class: SoundFileViewer
accessing
Superclass: Tools.FileTools.FileInformationViewer
Category: MusicUI-Sound
actions
Delete the selected sound file
editFile
Edit the selected sound file
loadFile
Load the selected file into the SirenSession
makeS7
Take the selected file anem make an s7 directory for it
playFile
Play the selected sound file
MetaClass: SoundFileViewer class
accessing
tabLabel
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
Class: SpectrumView
accessing
Superclass: Siren.SoundView
Category: MusicUI-Sound
Instance variables: isColor
set the color/bw switch
displaying
Answer the color to use for the given data value
displayOnGC1: aGC
Show the receiver's sound on the GC.
displayOnGC: aGC
Show the receiver's sound on the GC.
controller access
Answer the default controller class for use with the receiver.
MetaClass: SpectrumView class
instance creation
Open a SpectrumView
spectrumViewOn: aSpectrum
Take the given spectrum as model and open a SpectrumView
Class: CSLUnitGenerator
accessing
Superclass: Siren.AbstractEvent
Category: MusicApps-CSL
Instance variables: name scale offset inputs
inputs: aValue
name
name: aValue
offset
offset: aValue
scale
scale: aValue
MetaClass: CSLUnitGenerator class
accessing
Superclass: Siren.CSLUnitGenerator
Category: MusicApps-CSL
Instance variables: ugens envelopes parameters
Imports: Siren.CSL.*
parameters
ugens
initialize-release
Set up the receiver's default state
performance
Start the receiver
MetaClass: CSLGraph class
examples
Create and run a CSL DSP graph consisting of white noise sent through a filter with dynamic
center freq. and bandwidth.
testFM
Create and run a CSL DSP graph for the canonical FM example (see BeepDemo.cpp).
testMIDIOscillatorBank
Create and run a CSL DSP graph with 16 sine waves under MIDI fader control.
testMIDIOscillatorBank1
Create and run a CSL DSP graph with 16 sine waves under MIDI fader control.
testMIDIOscillatorBank2
Create and run a CSL DSP graph with 16 sine waves under MIDI fader control.
testOscillatorBank
Create and run a CSL DSP graph with 50 sine waves with random-walk frequencies and positions.
testSimpleGraph
Create and run a simple CSL DSP graph consisting of a Sine wave with an ADSR envelope.
testSoundFile
Create and run a CSL DSP graph consisting of white noise sent through a filter with dynamic
center freq. and bandwidth.
testStaticFilter
Create and run a simple CSL DSP graph consisting of a Sine wave with an ADSR envelope.
Class: LorisConfigurationEditor
aspects
Superclass: ApplicationModel
Category: MusicApps-Loris
Instance variables: freqDrift maxFreq resolution amplFloor freqFloor
minFreq bwScale saveSDIF amplEnv saveOutput playOutput
freqEnv config editor
amplFloor
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
bwScale
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
freqDrift
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
freqEnv
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
freqFloor
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
maxFreq
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
minFreq
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
playOutput
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
resolution
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
saveOutput
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
saveSDIF
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
accessing
configurationChanged
Update the receiver's configuration model
editor: anEditor
interface opening
actions
runAnalysis
MetaClass: LorisConfigurationEditor class
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
Class: LorisSpectralView
controller access
Superclass: Siren.DisplayListView
Category: MusicApps-Loris
Indexed variables: objects
Imports: Siren.Loris.*
display
Show the receiver's Loris spectrum.
displayOn: aGraphicsContext
Show the receiver's Loris spectrum.
MetaClass: LorisSpectralView class
instance creation
Answer a DLView for use as a component.
Class: LorisAnalysisConfiguration
Instance Variables:
accessing
Superclass: Object
Category: MusicApps-Loris
Instance variables: resolution amplEnv freqEnv freqDrift freqFloor
amplFloor minFreq maxFreq hopTime cropTime windowWidth
sidelobeLevel bwRegionWidth bwScale saveSDIF
saveOutput playResults openEditor
Indexed variables: objects
Imports: Siren.Loris.*
resolution
amplEnv
freqEnv
freqDrift
freqFloor
amplFloor
minFreq
maxFreq
hopTime
cropTime
windowWidth
sidelobeLevel
bwRegionWidth
bwScale
saveSDIF
saveOutput
playResults
openEditor
amplEnv: aValue
amplFloor
amplFloor: aValue
bwRegionWidth
bwRegionWidth: aValue
bwScale
bwScale: aValue
cropTime
cropTime: aValue
freqDrift
freqDrift: aValue
freqEnv
freqEnv: aValue
freqFloor
freqFloor: aValue
hopTime
hopTime: aValue
maxFreq
maxFreq: aValue
minFreq
minFreq: aValue
openEditor
openEditor: aValue
playResults
playResults: aValue
resolution
resolution: aValue
saveOutput
saveOutput: aValue
saveSDIF
saveSDIF: aValue
sidelobeLevel
sidelobeLevel: aValue
windowWidth
windowWidth: aValue
initialize-release
Set the default analyzer configuration
printing/storing
Write the receiver out; this assumes setters for all instVars.
storeOnFile: aName
Write the receiver out; this assumes setters for all instVars.
MetaClass: LorisAnalysisConfiguration class
instance creation
Answer the default settings
new
Answer the default settings
res: res drift: drift floor: floor minF: minF maxF: maxF
Answer settings built frmo the arguments
silent
Answer settings that do the analysis and save the SDIF files, but don't play or open the GUI
simple
Answer settings that do the analysis and save the files, but don't open the GUI
Class: LorisEditorController
accessing
Superclass: Siren.DisplayListController
Category: MusicApps-Loris
Superclass: Siren.MusicEvent
Category: MusicApps-Loris
Superclass: Siren.MusicEvent
Category: MusicApps-Loris
Superclass: ApplicationModel
Category: MusicApps-Loris
Instance variables: soundA soundB soundViewA soundViewB fcnView
spectrumView freqOp amplOp timeOp analysisOp
selectionStopIndex
sound
Answer the receiver's sound instVar
soundA
Answer the receiver's sound instVar
soundA: aSound
Set the receiver's sound instVar
soundB
Answer the receiver's sound instVar
soundB: aSound
Set the receiver's sound instVar
soundViewA
Answer the receiver's sound view, initializing it lazily
soundViewB
Answer the receiver's sound view, initializing it lazily
interface opening
Answer the function view for the upper pane
createSoundView1
Create the first sound view
createSoundView2
Create the second sound view
createSpectrumView
Answer the function view for the bottom pane
postBuildWith: aBuilder
This message is sent by the builder when it has completed work on
either a complete window or a SubCanvas.
actions
Prompt for a scale value and apply a threshold to the receiver's sound
configureAnalyzer
Edit the receiver's configuration
dilateTime
Prompt for before/after time maps and dilate the receiver's sound
harmonifyFreq
Harmonify the receiver's sound
maskAmpl
Prompt for a value and apply a threshold to the receiver's sound
menuPick: arg with: selector
Respond to a menu pick in the editor's menu bar.
playResynth
Play the original sound
playSound
Play the original sound
runAnalyzer
Run the sound's analysis
runSynthesis
Resynthesize the receiver's B sound
saveAs
Save the receiver's sound set to a new file name
scaleAmpl
Prompt for a scale value and amplify the receiver's sound
scaleBW
Prompt for a scale value and scale the receiver's sound's noise bandwidth
scaleTime
Prompt for scale value and dilate the receiver's sound
spectralContour
Prompt for a scale value and transpose the receiver's sound
transposeFreq
Prompt for a scale value and transpose the receiver's sound
viewDialog
This stub method was generated by UIDefiner
aspects
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
analysisOp
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
freqOp
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
timeOp
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
MetaClass: LorisAnalysisEditor class
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
windowSpec1Pane
Tools.UIPainter new openOnClass: self andSelector: #windowSpec1Pane
windowSpec2
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
resources
Tools.MenuEditor new openOnClass: self andSelector: #amplMenu
analysisMenu
Tools.MenuEditor new openOnClass: self andSelector: #analysisMenu
freqMenu
Tools.MenuEditor new openOnClass: self andSelector: #freqMenu
timeMenu
Tools.MenuEditor new openOnClass: self andSelector: #timeMenu
Class: LorisMorphEditor
interface opening
Superclass: Siren.LorisAnalysisEditor
Category: MusicApps-Loris
Instance variables: ampFcn freqFcn bwFcn
Answer the function view for the upper pane
MetaClass: LorisMorphEditor class
Instance Variables:
synthesis
Superclass: Siren.SampledSound
Category: MusicApps-Loris
Instance variables: partials configuration outputSnd
Indexed variables: objects
Imports: Siren.Loris.*
partials
configuration
Play the source sound
playResynthesized
Play the processed sound
synthesize
Resynthesize the receiver and answer a sound.
synthesize: rat toFile: nam
Resynthesize the receiver and answer a sound.
printing/storing
Copy all the files associated with the receiver to the given basename
edit
Open a LorisAnalysisEditor on the receiver.
loadConfiguration: confName
Load the analysis configuration from a text file.
loadEnvelopes: envName
Load the ampl/freq envelopes from a text file.
saveEnvelopes: envName
Load the ampl/freq envelopes from a text file.
saveSDIF: nam
Save the receiver as an SDIF file.
analysis
Run the Loris analyzer using the receiver's configuration, then coallate and distill;
save SDIF and/or AIFF files and play the output, dependng on the configuration
harmonify
Justify the receiver's partials to be harmonic overtones
loadEnvelopes: analyzer size: dsize
Load the ampl and freq envelopes frmo the analyzer
accessing
Iterate over all the partials evaluating the given 1-argument block for each breakpoint
configuration
Answer the receiver's LorisAnalysisConfiguration.
configuration: conf
Set the receiver's analysis configuration to the given LorisAnalysisConfiguration.
maxAmplitude
Answer the receiver's max BP amplitudes.
outputSound
Answer the receiver's resynthesized output sound.
outputSound: aSound
Set the receiver's resynthesized output sound.
partials
Answer the receiver's Loris data (partial struct).
partials: dat
Set the receiver's Loris data (partial struct).
processing
Compress the receiver's amplitudes by the given factor
dilateFrom: startMap to: targetMap
Map the time from the start map to the targetMap.
maskAmp: threshold
Apply the given threshold to the receiver's amplitudes
scaleAmp: ampEnv
Scale the receiver's amplitudes by the given linear envelope or scalar value
scaleBW: noizEnv
Scale the receiver's noise bandwidth by the given linear envelope or scalar value
scaleFreq: frqEnv
Scale the receiver's frequencies by the given linear envelope or scalar value
shiftPitch: frqEnv
Scale the receiver's freq values by the given linear envelope
morphing
Morph between the receiver and the target using the given envelope.
MetaClass: LorisSound class
instance creation
Create and answer a new instance read from the given file; print out the analyzer settings,
then coallate and distill; store an SDIF file and a re-syn file; answer the sound obj.
fromFile: nam configuration: config
Create and answer a new instance read from the given file; use the default analyzer settings,
then coallate and distill; edit or answer the sound obj.
fromSDIF: nam
Load a new instance read from the given SDIF file.
credo
LorisSound fromFile: '1.2a1.aiff' configuration: LorisAnalysisConfiguration new
LorisSound fromFile: '1.1a.aiff' configuration:
(LorisAnalysisConfiguration res: 70 drift: 10 floor: -70 minF: 80 maxF: 140)
[LorisSound fromFile: 'horns1c.aiff' configuration:
((LorisAnalysisConfiguration res: 70 drift: 10 floor: -36 minF: 80 maxF: 140) bwScale: 6.0) ]
(Sound fromFile: '1.2a1.out.aiff') edit
LorisSound fromSDIF: '1.2a1.sdif'
LorisSound fromSDIF: 'horns1c.sdif'
Class: LPCView
Instance Variables:
accessing
Superclass: Siren.DisplayListView
Category: MusicApps-LPC
Instance variables: winSize editor
winSize
editor
display
Show the receiver's pitch function and smoothed versions.
draw: data into: list color: co scale: yScale dots: showD
Answer a display list with the receiver's pitch function.
MetaClass: LPCView class
interface opening
Superclass: ApplicationModel
Category: MusicApps-LPC
Instance variables: sound showSmoothed2 showResid showRMS showSmoothed
showRunning showPitch
Instance Variables:
sound
showSmoothed2
showResid
showRMS
showSmoothed
showRunning
showPitch
sound: aSound
theLPCView
aspects
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
showResid
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
showRMS
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
showRunning
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
showSmoothed
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
showSmoothed2
This method was generated by UIDefiner. Any edits made here
may be lost whenever methods are automatically defined. The
initialization provided below may have been preempted by an
initialize method.
actions
close view
overwritePitch
Store the smoothed pitch into the model sound
redraw
Redisplay
save
Store the model data to a new file.
MetaClass: LPCEditor class
interface specs
Tools.UIPainter new openOnClass: self andSelector: #windowSpec
interface opening
LPCEditor openOn: LPCSound someInstance.
Class: LPCFrame
Instance Variables:
accessing
Superclass: Siren.MusicEvent
Category: MusicApps-LPC
Instance variables: srate npoles rmsO rmsR err coefficients
srate
npoles
rmsO
rmsR
err
coefficients
coefficients: aValue
err
err: aValue
npoles
npoles: aValue
pitch
pitch: aValue
rmsO
rmsO: aValue
rmsR
rmsR: aValue
srate
srate: aValue
printing
Format and print the receiver on the argument.
MetaClass: LPCFrame class
Instance Variables:
smoothing
Superclass: Siren.MusicEvent
Category: MusicApps-LPC
Instance variables: filename filesize srate frate npoles nframes frames
pchMax pchMin pitchRange rmsRange residRange
filename
filesize
srate
frate
npoles
nframes
frames
pchMax
pchMin
pitchRange
rmsRange
residRange
filter the data
smoothAvg: data into: res
filter the data
smoothPitch
filter the data
smoothRunning: data into: res
filter the data
writePitch: howSmooth
Replace the pitch values in the receiver's frames with a smoothed version selected by the argument.
printing
Format and print the receiver on the argument.
storeFile
Store the receiver as a Csound format LPC file.
storeOn: aStream
Store the receiver on the argument as a Csound format LPC file.
accessing
filename
filename: aValue
filesize
filesize: aValue
float: ind from: data
Answer the swapped float from the data at the index.
floatAt: ind put: value in: data
Store the swapped float into the data at the index.
frameAt: ind put: frame
frames
frames: aValue
frate
frate: aValue
long: ind from: data
Answer the swapped long int from the data at the index.
longAt: ind put: value in: data
Store the swapped long int into the data at the index.
nframes
nframes: aValue
npoles
npoles: aValue
srate
srate: aValue
statistics
Compute the max and min-non-0 pitch values for later.
MetaClass: LPCSound class
instance creation
Read in an lpc sound from the given Csound format file.
Class: SHARCInstrument
initialize-release
Superclass: Object
Category: MusicApps-SHARC
Instance variables: name directory range samples
Class variables: SHARCOrchestra
accessing
Answer the receiver's 'directory'.
directory: anObject
Set the receiver's instance variable 'directory' to be anObject.
name
Answer the receiver's 'name'.
name: anObject
Set the receiver's instance variable 'name' to be anObject.
range
Answer the receiver's 'range'.
range: anObject
Set the receiver's instance variable 'range' to be anObject.
sampleNamed: n
Answer the receiver's sample by the given name.
samples
Answer the receiver's 'samples'.
samples: anObject
Set the receiver's instance variable 'samples' to be anObject.
sampleWithKey: k
Answer the receiver's sample by the given name.
converting
MetaClass: SHARCInstrument class
class constants
SHARCInstrument loadOrchDir: 'sharc'
orchestra
SHARCInstrument orchestra inspect
instance creation
Answer a SHARC instrument group read from the CONTENTS file in the
given directory. The contents file describes a number of samples, each
of which has a description file with its overtones.
Class: SHARCSample
initialize-release
Superclass: Siren.Function
Category: MusicApps-SHARC
Instance variables: name pitch key nHarm ampl noPitch rePitch centroid
Indexed variables: objects
Initialize the receiver for the given size.
accessing
Add newObject to the end of the receiver.
ampl
Answer the receiver's 'ampl'.
ampl: anObject
Set the receiver's instance variable 'ampl' to be anObject.
centroid
Answer the receiver's 'centroid'.
centroid: anObject
Set the receiver's instance variable 'centroid' to be anObject.
key
Answer the receiver's 'key'.
key: anObject
Set the receiver's instance variable 'key' to be anObject.
name
Answer the receiver's 'name'.
name: anObject
Set the receiver's instance variable 'name' to be anObject.
nHarm
Answer the receiver's 'nHarm'.
nHarm: anObject
Set the receiver's instance variable 'nHarm' to be anObject.
noPitch
Answer the receiver's 'noPitch'.
noPitch: anObject
Set the receiver's instance variable 'noPitch' to be anObject.
pitch
Answer the receiver's 'pitch'.
pitch: anObject
Set the receiver's instance variable 'pitch' to be anObject.
rePitch
Answer the receiver's 'rePitch'.
rePitch: anObject
Set the receiver's instance variable 'rePitch' to be anObject.
arithmetic
Concert a minus-dB amplitude to an amplitude scale.
converting
Answer a SOS-format description of the receiver.
asWavetable: len
Answer a wavetable derived from the receiver.
MetaClass: SHARCSample class
instance creation
Read a sample's data from the given directory based on the given line from the contents file.