SonoraFX - Actions Guide
1. Specific Channel Actions (Channel 1 to 48, or 0 for Free Channel)
- Play Audio (Ch, File, Loop, Start, End, Vol, Freq): Requests audio playback. Set
Ch = 0 to automatically pick the lowest available free channel without interrupting background music.
Loop Flag: 0 = Infinite Loop (BGM), 1 = Play Once (SFX), N = Play N times.
- Stop / Pause / Resume Audio (Ch): Controls playback state for a specific channel.
- Set Volume (Ch, Volume): Sets channel volume (0 to 100).
- Set Frequency / Sweep (Ch, TargetFreq, Speed, Direction): Adjusts pitch or starts a frequency sweep / LFO.
Direction Modes: 0 = Return to origin, 1 = Slide Up, -1 = Slide Down, 2 = Sine LFO, 3 = Knockout (Slide to 0), 4 = Triangle LFO, 5 = Square LFO, 6 = Sawtooth LFO.
- Set Panning (Ch, Pan): Adjusts stereo panning (-100 Left, 0 Center, 100 Right).
- Enable Tremolo LFO (Ch, Rate, Depth): Applies a classic volume tremolo LFO.
- Fade Channel (Ch, TargetVol, Speed, State): Fades volume in or out dynamically.
- Playlist - Add Track / Clear Queue (Ch, File): Adds sound tracks to a sequential channel playlist. When a track finishes, the next queued track automatically plays!
- Set ADSR Envelope (Ch, A, D, S, R): Applies a synthesizer Attack-Decay-Sustain-Release volume envelope.
- Randomize Pitch (Ch, Range): Adds organic pitch variations (±Range Hz) to sound effects to avoid audio monotony.
- Crossfade Channels (FromCh, ToCh, Speed): Seamlessly transitions audio from one channel to another.
- Set Channel Stopped (Ch): Notifies C++ that a channel has stopped playing natively, releasing it immediately.
2. All Channels Actions (Global Controls)
Convenient global controls that target all 48 channels simultaneously without requiring channel ID parameters.
- Stop All Channels: Immediately stops audio across all channels.
- Pause / Resume All Channels: Pauses or resumes all channels.
- Set All Volumes: Adjusts master volume across all channels.
- Set All Frequency Sweeps / Panning / Tremolos: Applies pitch sweeps, panning, or tremolo effects to all channels.
- Fade All Channels: Initiates a master volume fade across all active channels.