C# Class GAudio.GATRealTimeADSR

Wrapper that adds realtime ADSR controls to IGATDataOwner objects( GATData or IGATProcessedSample ). In addition, zero crossings are automatically found for the sustain loop, and a sustain loop crossfade can be adjusted.
Afficher le fichier Open project: gregzo/G-Audio

Méthodes publiques

Méthode Description
GATRealTimeADSR ( IGATDataOwner dataOwner ) : System.Collections

Wrap a GATData or a IGATProcessedSample object for ADSR playback.

PlayThroughTrack ( GATPlayer player, int trackNb, float gain = 1f ) : void

Starts playback through the user specified player.

PlayThroughTrack ( int trackNb, float gain = 1f ) : void

Starts playback through the default player.

Release ( ) : void

If playback is in the loop crossfade part of the envelope, the sample will loop one last time and release from the sustain index.

TrySetEnvelope ( int offset, int attack, int decay, int sustain, int release, int loopCrossfade = -1 ) : bool

Call TrySetEnvelope before playing. Processing of the sample occurs in real time, but the envelope parameters cannot be modified while the sample is playing. Note 1: a sustain of 0 is valid and will result in one shot playback. Note 2: if no loopCrossfade parameter is passed, loopCrossfade will equal sustain. Note 3: offset + attack + decay must be greater than loopCrossfade.

Private Methods

Méthode Description
PlayerWillMixSample ( IGATBufferedSample sample, int length, float audioBuffer ) : bool
UpdateZeroCrossings ( ) : void

Method Details

GATRealTimeADSR() public méthode

Wrap a GATData or a IGATProcessedSample object for ADSR playback.
public GATRealTimeADSR ( IGATDataOwner dataOwner ) : System.Collections
dataOwner IGATDataOwner
Résultat System.Collections

PlayThroughTrack() public méthode

Starts playback through the user specified player.
public PlayThroughTrack ( GATPlayer player, int trackNb, float gain = 1f ) : void
player GATPlayer
trackNb int
gain float
Résultat void

PlayThroughTrack() public méthode

Starts playback through the default player.
public PlayThroughTrack ( int trackNb, float gain = 1f ) : void
trackNb int
gain float
Résultat void

Release() public méthode

If playback is in the loop crossfade part of the envelope, the sample will loop one last time and release from the sustain index.
public Release ( ) : void
Résultat void

TrySetEnvelope() public méthode

Call TrySetEnvelope before playing. Processing of the sample occurs in real time, but the envelope parameters cannot be modified while the sample is playing. Note 1: a sustain of 0 is valid and will result in one shot playback. Note 2: if no loopCrossfade parameter is passed, loopCrossfade will equal sustain. Note 3: offset + attack + decay must be greater than loopCrossfade.
public TrySetEnvelope ( int offset, int attack, int decay, int sustain, int release, int loopCrossfade = -1 ) : bool
offset int
attack int
decay int
sustain int
release int
loopCrossfade int
Résultat bool