usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

LOMultiSceneProvider Class Reference

This provider allows multiple scenes to be mixed with a scene master. More...

#import <LOMultiSceneProvider.h>

Inheritance diagram for LOMultiSceneProvider:

< LOChannelProvider >

Public Member Functions

(id) - init
 Initilise the provider ready to be used.
(id) - initWithSize:
 Initilise the provider ready to be used.
(void) - addScene:
 Add a scene into the provider.
(void) - removeLastScene
 Remove the lat scene from the provider.
(unsigned) - count
 Return the number of scenes in the provider.
(unsigned char) - master
 Get the master value.
(void) - setMaster:
 Set the master value, update the output and notifies the channel manager.
(LOScene *) - sceneForNumber:
 Get the actual scene for a given scene in the provider.
(void) - replaceSceneAtNumber:withScene:
 Repalce the scene with a new one.
(unsigned char) - levelForScene:
 Get the value for a given scene.
(void) - setLevel:forScene:
 Set the value for a scene, update the output and notifies the channel manager.
(void) - updateOutput
 This method recalculates the output cache, and if any channel output has changed will notify the channel manager.
(void) - updateOutputForScene:
(void) - setProviderID:
 Set the provider ID to be something other that the default.
(id) - chaseDelegate
 Get the current chase master delegate.
(void) - setChaseDelegate:
 Set a new chase master delegate object.

Protected Attributes

LOChannelManagerchannelManager
 The channel manager.
NSMutableArray * sceneProviders
 The scene Providers.
LOScenecachedScene
 The cached value of the current output.
unsigned char master
 The master value to scale all channel data by.
int providerID
 The ID of this provider.
id chaseDelegate
 The chase master delegate.

Detailed Description

This provider allows multiple scenes to be mixed with a scene master.

It implements what might be called a memory bank on a desk. It works on a and HTP basis, and only intensity channels are passed through the master fader

Initially the master value is set to 0.


Member Function Documentation

- (void) addScene: (LOScene *)  aScene  

Add a scene into the provider.

Parameters:
aScene The scene to add
See also:
- removeLastScene

- count:

- (id) chaseDelegate  

Get the current chase master delegate.

Returns:
The delegate object
See also:
- setChaseDelegate:

NSObject(LOChaseIntensityMasterDelegate) in LOChaseIntensityProvider.h

- (unsigned) count  

Return the number of scenes in the provider.

Returns:
The number of scenes

- (id) init  

Initilise the provider ready to be used.

This method registeres the provider with the channel manager.

Returns:
The initilised provider

- (id) initWithSize: (unsigned)  theSize  

Initilise the provider ready to be used.

This method registeres the provider with the channel manager.

The initial number of scenes is set to theSize.

Parameters:
theSize The number of scenes to be used
Returns:
The initilised provider

- (unsigned char) levelForScene: (unsigned)  sceneNumber  

Get the value for a given scene.

Parameters:
sceneNumber The scene number, 0 indexed
Returns:
The current level
See also:
- setLevel:forScene:

- (unsigned char) master  

Get the master value.

Returns:
The current master value
See also:
- setMaster:

- (void) removeLastScene  

Remove the lat scene from the provider.

See also:
- addScene:

- count:

- (void) replaceSceneAtNumber: (unsigned)  sceneNumber
withScene: (LOScene *)  newScene 

Repalce the scene with a new one.

See also:
- sceneForNumber:

- (LOScene *) sceneForNumber: (unsigned)  sceneNumber  

Get the actual scene for a given scene in the provider.

Parameters:
sceneNumber The scene number, 0 indexed
Returns:
The current scene
See also:
- addScene:

- count:

- levelForScene:

- (void) setChaseDelegate: (id)  aDelegate  

Set a new chase master delegate object.

Once set this delegate will be used for all chases in the scene.

If you wanted the chases to follow the master fader for this scene provider you could add this provider as the delegate for the chases.

Parameters:
aDelegate The object to receive all delegate messages
See also:
chaseDelegate:

NSObject(LOChaseIntensityMasterDelegate) in LOChaseIntensityProvider.h

- (void) setLevel: (unsigned char)  theLevel
forScene: (unsigned)  sceneNumber 

Set the value for a scene, update the output and notifies the channel manager.

Parameters:
theLevel The value to set
sceneNumber The scene number, 0 indexed
See also:
- levelForScene:

- (void) setMaster: (unsigned char)  theMaster  

Set the master value, update the output and notifies the channel manager.

Parameters:
theMaster The value to set
See also:
master:

- (void) setProviderID: (int)  theProviderID  

Set the provider ID to be something other that the default.

- (void) updateOutput  

This method recalculates the output cache, and if any channel output has changed will notify the channel manager.

This function is called automatically when the master or a scene level value changes. Its very unlikley that you would want to call this directly.


The documentation for this class was generated from the following files: