C# 클래스 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.
파일 보기 프로젝트 열기: gregzo/G-Audio

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
PlayerWillMixSample ( IGATBufferedSample sample, int length, float audioBuffer ) : bool
UpdateZeroCrossings ( ) : void

메소드 상세

GATRealTimeADSR() 공개 메소드

Wrap a GATData or a IGATProcessedSample object for ADSR playback.
public GATRealTimeADSR ( IGATDataOwner dataOwner ) : System.Collections
dataOwner IGATDataOwner
리턴 System.Collections

PlayThroughTrack() 공개 메소드

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

PlayThroughTrack() 공개 메소드

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

Release() 공개 메소드

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
리턴 void

TrySetEnvelope() 공개 메소드

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
리턴 bool