Class AudityGlobal
Global live parameters. Values set here reach every playing Audity instance whose
program references the parameter and has not received a local override (mirrored down
each instance’s pipe on the next control update). For per-voice control use
DarkEffekt.Audity.AuditySource.SetParameter(DarkEffekt.Audity.AudityParameterId%2cSystem.Single%2cSystem.Single%2cSystem.Int32).
Main thread only.
Assembly: DarkEffekt.Audity.Runtime
Section titled “Assembly: DarkEffekt.Audity.Runtime”public static class AudityGlobalMethods
Section titled “Methods”SetTempo(double, int)
Section titled “SetTempo(double, int)”Set the tempo used by quantized triggers on all playing instances. The moment
each instance receives the change becomes beat 0 of its grid - instances do
NOT phase-agree. Legacy per-instance grid; prefer DarkEffekt.Audity.AudityGlobal.SetTransport(System.String%2cSystem.Double%2cSystem.Int32%2cSystem.Int32%2cSystem.Nullable%7bSystem.UInt64%7d)
for anything musical across instances (this override wins where both exist).
public static void SetTempo(double bpm, int beatsPerBar = 4)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Double |
bpm |
System.Int32 |
beatsPerBar |
SetTransport(string, double, int, int, ulong?)
Section titled “SetTransport(string, double, int, int, ulong?)”Publish (or re-anchor) a named transport - a shared musical grid every instance quantizes against sample-exactly. The anchor is the DSP sample of beat 0; omit it to anchor “now”. Empty/null name = the default channel (what unauthored graphs follow). Grids are anchor math: they keep advancing while nothing referencing them plays, and late-created instances land on the identical grid.
public static void SetTransport(string name, double bpm, int beatsPerBar = 4, int phraseBars = 4, ulong? anchorDspSample = null)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
name |
System.Double |
bpm |
System.Int32 |
beatsPerBar |
System.Int32 |
phraseBars |
System.Nullable<System.UInt64> |
anchorDspSample |
ClearTransport(string)
Section titled “ClearTransport(string)”Removes a transport. Grids usually outlive tracks - clear only when the grid itself is over.
public static void ClearTransport(string name)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
name |
ClearAllTransports()
Section titled “ClearAllTransports()”Removes every transport (level teardown / tests).
public static void ClearAllTransports()TryGetTransport(string, out AudityTransportDesc)
Section titled “TryGetTransport(string, out AudityTransportDesc)”Reads back a transport (empty/null name = the default channel).
public static bool TryGetTransport(string name, out AudityTransportDesc transport)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
name |
| DarkEffekt.Audity.AudityTransportDesc | transport |
PublishDrive(AudityTransportSettings, AudityQuantize)
Section titled “PublishDrive(AudityTransportSettings, AudityQuantize)”Tier-0 Drive publication: make a graph’s authored
grid THE grid on its transport channel - first track anchors it, later tracks
re-anchor it (last driver wins; at the OLD grid’s boundary when
startQuantize aligns the start). No-op for None/Follow.
Called by DarkEffekt.Audity.AuditySource on Play and by the editor audition
paths, so auditioning a Drive track behaves like the game.
public static void PublishDrive(AudityTransportSettings settings, AudityQuantize startQuantize = AudityQuantize.Immediate)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityTransportSettings | settings |
| DarkEffekt.Audity.AudityQuantize | startQuantize |
NowDspSample()
Section titled “NowDspSample()”The current mix position in the transport clock domain.
public static ulong NowDspSample()Returns
Section titled “Returns”System.UInt64
NextBoundary(in AudityTransportDesc, ulong, AudityQuantize)
Section titled “NextBoundary(in AudityTransportDesc, ulong, AudityQuantize)”DSP sample of the next quantize boundary of
transport at or after dspSample -
the same anchor math the realtime side uses, exposed for game-side
scheduling and Drive re-anchoring.
public static ulong NextBoundary(in AudityTransportDesc transport, ulong dspSample, AudityQuantize quantize)Returns
Section titled “Returns”System.UInt64
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityTransportDesc | transport |
System.UInt64 |
dspSample |
| DarkEffekt.Audity.AudityQuantize | quantize |
SetParameter(AudityParameterId, float)
Section titled “SetParameter(AudityParameterId, float)”Sets a live parameter’s value for every currently playing instance that references it, unless that instance has already received a local parameter override.
public static void SetParameter(AudityParameterId id, float value)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityParameterId | id |
System.Single |
value |
SetParameter(string, float)
Section titled “SetParameter(string, float)”Sets a live parameter’s value by name for every currently playing instance that references it, unless that instance has already received a local parameter override.
public static void SetParameter(string name, float value)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
name |
System.Single |
value |
TryGetParameter(AudityParameterId, out float)
Section titled “TryGetParameter(AudityParameterId, out float)”Reads back the last value set for a global parameter.
public static bool TryGetParameter(AudityParameterId id, out float value)Returns
Section titled “Returns”System.Boolean: False if the parameter has never been set (no value has been mirrored to any instance).
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityParameterId | id |
System.Single |
value |
Reset()
Section titled “Reset()”Clears all global parameter values, tempo, and transports (used by tests and play-enter).
public static void Reset()