MusicKit  0.0.0
Public Member Functions | Protected Attributes
SndEnvelope Class Reference

Provide enveloping data for audio streams. More...

#import <SndEnvelope.h>

Inheritance diagram for SndEnvelope:
<SndEnveloping> <SndEnveloping>

List of all members.

Public Member Functions

(int) - breakpointIndexBeforeOrEqualToX:
 Returns the index of the first breakpoint with an x value greater than the given xVal.
(int) - breakpointIndexAfterX:
 Returns the x value corresponding to the requested breakpoint.
(float) - lookupYForBreakpoint:
 Returns the y value corresponding to the requested breakpoint.
(int) - insertXValue:yValue:flags:
 Creates a new breakpoint in the envelope and returns the new breakpoint index.
(int) - insertXValue:yValue:flags:atBreakpoint:
 Creates a new breakpoint with the given data, and inserts it in the envelope at the specified location.
(BOOL) - removeBreakpoint:
 Removes the breakpoint at the specified index.
(BOOL) - removeBreakpointsBefore:
 Removes all breakpoints with index less than (not including) the index specified.
(BOOL) - removeBreakpointsAfter:
 Removes all breakpoints with index greater than (not including) the index specified.
(BOOL) - replaceXValue:yValue:flags:atBreakpoint:
 Changes the values at a specified breakpoint.
(int) - breakpointIndexBeforeOrEqualToX:
 Returns the index of the first breakpoint with an x value greater than the given xVal.
(int) - breakpointIndexAfterX:
 Returns the x value corresponding to the requested breakpoint.
(float) - lookupYForBreakpoint:
 Returns the y value corresponding to the requested breakpoint.
(int) - insertXValue:yValue:flags:
 Creates a new breakpoint in the envelope and returns the new breakpoint index.
(int) - insertXValue:yValue:flags:atBreakpoint:
 Creates a new breakpoint with the given data, and inserts it in the envelope at the specified location.
(BOOL) - removeBreakpoint:
 Removes the breakpoint at the specified index.
(BOOL) - removeBreakpointsBefore:
 Removes all breakpoints with index less than (not including) the index specified.
(BOOL) - removeBreakpointsAfter:
 Removes all breakpoints with index greater than (not including) the index specified.
(BOOL) - replaceXValue:yValue:flags:atBreakpoint:
 Changes the values at a specified breakpoint.

Protected Attributes

NSLock * lock
NSMutableArray * breakpoints

Detailed Description

Provide enveloping data for audio streams.

SndEnvelope is the reference implementation of the SndEnveloping protocol, and the default class used by SndAudioFader for the real time shaping of audio streams.

One of the primary aims of this class is speed, so the access to the underlying arrays of SndBreakpoints has been optimised with the use of selector caching.

For full documentation, see the documentation for the SndEnveloping protocol.


Member Function Documentation

- (int) breakpointIndexAfterX: (double)  xVal

Returns the x value corresponding to the requested breakpoint.

See also:
the SndEnveloping protocol.
Parameters:
xValSee the SndEnveloping protocol
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (int) breakpointIndexAfterX: (double)  xVal

Returns the x value corresponding to the requested breakpoint.

See also:
the SndEnveloping protocol.
Parameters:
xValSee the SndEnveloping protocol
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (int) breakpointIndexBeforeOrEqualToX: (double)  xVal

Returns the index of the first breakpoint with an x value greater than the given xVal.

See also:
the SndEnveloping protocol.
Parameters:
Seethe SndEnveloping protocol
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (int) breakpointIndexBeforeOrEqualToX: (double)  xVal

Returns the index of the first breakpoint with an x value greater than the given xVal.

See also:
the SndEnveloping protocol.
Parameters:
Seethe SndEnveloping protocol
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (int) insertXValue: (double)  xVal
yValue: (float)  yVal
flags: (int)  flags 

Creates a new breakpoint in the envelope and returns the new breakpoint index.

See also:
the SndEnveloping protocol.
Parameters:
xVal
yVal
flags
Returns:
Returns new breakpoint index

Reimplemented from <SndEnveloping>.

- (int) insertXValue: (double)  xVal
yValue: (float)  yVal
flags: (int)  flags 

Creates a new breakpoint in the envelope and returns the new breakpoint index.

See also:
the SndEnveloping protocol.
Parameters:
xVal
yVal
flags
Returns:
Returns new breakpoint index

Reimplemented from <SndEnveloping>.

- (int) insertXValue: (double)  xVal
yValue: (float)  yVal
flags: (int)  flags
atBreakpoint: (int)  bp 

Creates a new breakpoint with the given data, and inserts it in the envelope at the specified location.

See also:
the SndEnveloping protocol.
Parameters:
xVal
yVal
flags
bp
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (int) insertXValue: (double)  xVal
yValue: (float)  yVal
flags: (int)  flags
atBreakpoint: (int)  bp 

Creates a new breakpoint with the given data, and inserts it in the envelope at the specified location.

See also:
the SndEnveloping protocol.
Parameters:
xVal
yVal
flags
bp
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (float) lookupYForBreakpoint: (int)  bp

Returns the y value corresponding to the requested breakpoint.

See also:
the SndEnveloping protocol.
Parameters:
bpSee the SndEnveloping protocol
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (float) lookupYForBreakpoint: (int)  bp

Returns the y value corresponding to the requested breakpoint.

See also:
the SndEnveloping protocol.
Parameters:
bpSee the SndEnveloping protocol
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) removeBreakpoint: (int)  aBreakpoint

Removes the breakpoint at the specified index.

See also:
the SndEnveloping protocol.
Parameters:
aBreakpoint
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) removeBreakpoint: (int)  aBreakpoint

Removes the breakpoint at the specified index.

See also:
the SndEnveloping protocol.
Parameters:
aBreakpoint
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) removeBreakpointsAfter: (int)  aBreakpoint

Removes all breakpoints with index greater than (not including) the index specified.

See also:
the SndEnveloping protocol
Parameters:
aBreakpoint
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) removeBreakpointsAfter: (int)  aBreakpoint

Removes all breakpoints with index greater than (not including) the index specified.

See also:
the SndEnveloping protocol
Parameters:
aBreakpoint
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) removeBreakpointsBefore: (int)  aBreakpoint

Removes all breakpoints with index less than (not including) the index specified.

See also:
the SndEnveloping protocol.
Parameters:
aBreakpoint
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) removeBreakpointsBefore: (int)  aBreakpoint

Removes all breakpoints with index less than (not including) the index specified.

See also:
the SndEnveloping protocol.
Parameters:
aBreakpoint
Returns:
See the SndEnveloping protocol

Reimplemented from <SndEnveloping>.

- (BOOL) replaceXValue: (double)  xVal
yValue: (float)  yVal
flags: (int)  flags
atBreakpoint: (int)  bp 

Changes the values at a specified breakpoint.

See also:
the SndEnveloping protocol.
Parameters:
xVal
yVal
flags
bp
Returns:
Returns a BOOL.

Reimplemented from <SndEnveloping>.

- (BOOL) replaceXValue: (double)  xVal
yValue: (float)  yVal
flags: (int)  flags
atBreakpoint: (int)  bp 

Changes the values at a specified breakpoint.

See also:
the SndEnveloping protocol.
Parameters:
xVal
yVal
flags
bp
Returns:
Returns a BOOL.

Reimplemented from <SndEnveloping>.


Member Data Documentation

- (NSMutableArray *) breakpoints [protected]

SndBreakpoint objects

- (NSLock *) lock [protected]

locks changes to the envelope objects


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