Libraries.Sound.Note Documentation

This class represents a single note to be played.

Inherits from: Libraries.Language.Object, Libraries.Sound.Playable, Libraries.Sound.MusicEvent

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Copy()Perform a deep copy of this object.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetConstantPitchBend()Get the constant pitch bend of this event in cents.
GetEventType()Returns the event type for this event.
GetHashCode()This action gets the hash code for an object.
GetLength()Get the length of the note.
GetPitch()Get the pitch for this particular note.
GetPrePitchBend()Get the pre pitch bend of this event in cents.
GetPrePitchBendLength()Get the duration of pre pitch bend.
GetStartTime()Get the start time of the note.
GetVolume()Get the volume of the note.
SetConstantPitchBend(integer constantBend)Sets the constant pitch bend of this event in cents.
SetEventType(integer eventType)Set the event type for this event.
SetLength(number len)Set the length of the note.
SetPitch(integer pitch)Set the pitch for this particular note.
SetPrePitchBend(integer preBend)Sets the pre pitch bend of this event in cents.
SetPrePitchBendLength(integer preBendLength)Set the duration of the pre pitch bend.
SetStartTime(integer time)Set the start time of the note.
SetVolume(number vol)Set the volume of the note.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Copy()

Perform a deep copy of this object.

Return

Libraries.Language.Object: the new No

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetConstantPitchBend()

Get the constant pitch bend of this event in cents.

Return

integer: the pitch be

GetEventType()

Returns the event type for this event.

Example Code

use Libraries.Sound.MusicEvent

        MusicEvent event
        output event:GetEventType

Return

integer: the event type.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetLength()

Get the length of the note.

Return

number: the leng

GetPitch()

Get the pitch for this particular note. See the Music class's documentation on specifying pitches.

Return

integer: the pitch (0 to 12

GetPrePitchBend()

Get the pre pitch bend of this event in cents.

Return

integer: the pre pitch bend in cent

GetPrePitchBendLength()

Get the duration of pre pitch bend. The duration specifies how long it takes the bend to reach its target note.

Return

integer: the duration of the pre pitch ben

GetStartTime()

Get the start time of the note.

Return

integer: the start ti

GetVolume()

Get the volume of the note.

Return

number: the volume of the not

SetConstantPitchBend(integer constantBend)

Sets the constant pitch bend of this event in cents.

Parameters

SetEventType(integer eventType)

Set the event type for this event.

Example Code

use Libraries.Sound.MusicEvent

        MusicEvent event
        event:SetEventType(

Parameters

SetLength(number len)

Set the length of the note.

Parameters

SetPitch(integer pitch)

Set the pitch for this particular note. See the Music class's documenation on specifying pitches.

Parameters

SetPrePitchBend(integer preBend)

Sets the pre pitch bend of this event in cents.

Parameters

SetPrePitchBendLength(integer preBendLength)

Set the duration of the pre pitch bend. The duration specifies how long it takes the bend to reach its target note.

Parameters

SetStartTime(integer time)

Set the start time of the note.

Parameters

SetVolume(number vol)

Set the volume of the note.

Parameters