Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIFmodEventInstance Class Reference
Inheritance diagram for MOAIFmodEventInstance:
MOAITransform MOAITransformBase MOAINode MOAIInstanceEventSource MOAIEventSource

List of all members.

Function List

  isValid
  stop
  pause
  mute
  getVolume
  setVolume
  getPitch
  setPitch
  getParameter
  setParameter
  keyOff
  unloadOnSilence
  getName
  getNumChannels
  getTime
  getDominantFrequency
  getTempo
  getBeatFraction
  getMeasureFraction

Function Documentation

Returns the beat fraction of this Event Instance (useful for music)


function getBeatFraction ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
beatFraction ( number )

Returns the fundamental frequency of this Event Instance.


function getDominantFrequency ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
frequency ( number )

Returns the measure fraction of this Event Instance (useful for music)


function getMeasureFraction ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
measureFraction ( number )

Get the name of the Event.


function getName ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
name ( string )

Get the number of Channels in this Event's Channel Group.


function getNumChannels ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
channels ( number )

Gets the value (a number) of an Event parameter.


function getParameter ( MOAIFmodEventInstance self, string parameterName )
Parameters:
self ( MOAIFmodEventInstance )
parameterName ( string ) The name of the Event Parameter
Returns:
paramValue ( number )

Gets the pitch of the Event Instance.


function getPitch ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
pitch ( number )

Returns the tempo of this Event Instance (useful for music)


function getTempo ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
tempo ( number )

Returns time within the Event, or if useSubsoundTime, will return the time within the *the first subsound only*.


function getTime ( MOAIFmodEventInstance self [, boolean useSubsoundTime ] )
Parameters:
self ( MOAIFmodEventInstance )
useSubsoundTime ( boolean ) Optional. If true, will return the time within the first subsound only (Default: false)
Returns:
time ( number )

Gets the volume of the Event Instance.


function getVolume ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
volume ( number )

Checks to see if the instance is valid (i.e., currently playing)


function isValid ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
valid ( boolean )

Sets the Event Instance to key off based on the passed in Event Parameter.


function keyOff ( MOAIFmodEventInstance self, string parameterName )
Parameters:
self ( MOAIFmodEventInstance )
parameterName ( string ) The name of the Event Parameter
Returns:
nil

Mutes the Event Instance currently playing.


function mute ( MOAIFmodEventInstance self [, boolean setting ] )
Parameters:
self ( MOAIFmodEventInstance )
setting ( boolean ) Optional. Whether to mute or unmute. Defaults to true (mute).
Returns:
nil

Pauses the Event Instance currently playing.


function pause ( MOAIFmodEventInstance self [, boolean setting ] )
Parameters:
self ( MOAIFmodEventInstance )
setting ( boolean ) Optional. Whether to pause or unpause. Defaults to true (pause).
Returns:
nil

Sets the value (a number) of an Event parameter.


function setParameter ( MOAIFmodEventInstance self, string parameterName, number paramValue )
Parameters:
self ( MOAIFmodEventInstance )
parameterName ( string ) The name of the Event Parameter
paramValue ( number ) New value of the Event Parameter
Returns:
nil

Sets the pitch of the Event Instance.


function setPitch ( MOAIFmodEventInstance self, number pitch )
Parameters:
self ( MOAIFmodEventInstance )
pitch ( number ) A pitch level, from 0.0 to 10.0 inclusive. 0.5 = half pitch, 2.0 = double pitch. Default = 1.0
Returns:
nil

Sets the volume of the Event Instance.


function setVolume ( MOAIFmodEventInstance self, number volume )
Parameters:
self ( MOAIFmodEventInstance )
volume ( number ) Volume is a number between 0 and 1 (where 1 is at full volume).
Returns:
nil

Stops the Event Instance from playing.


function stop ( MOAIFmodEventInstance self )
Parameters:
self ( MOAIFmodEventInstance )
Returns:
nil

For streaming sounds -- unloads the Event from memory on silence. (A good guideline to use is: for sounds that don't repeat often)


function unloadOnSilence ( MOAIFmodEventInstance self [, boolean setting ] )
Parameters:
self ( MOAIFmodEventInstance )
setting ( boolean ) Optional. Whether to unload on silence or not (Default: true)
Returns:
nil