Skip to content

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.

Declaration
public static class AudityGlobal

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).

Declaration
public static void SetTempo(double bpm, int beatsPerBar = 4)
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.

Declaration
public static void SetTransport(string name, double bpm, int beatsPerBar = 4, int phraseBars = 4, ulong? anchorDspSample = null)
Type Name
System.String name
System.Double bpm
System.Int32 beatsPerBar
System.Int32 phraseBars
System.Nullable<System.UInt64> anchorDspSample

Removes a transport. Grids usually outlive tracks - clear only when the grid itself is over.

Declaration
public static void ClearTransport(string name)
Type Name
System.String name

Removes every transport (level teardown / tests).

Declaration
public static void ClearAllTransports()

TryGetTransport(string, out AudityTransportDesc)

Section titled “TryGetTransport(string, out AudityTransportDesc)”

Reads back a transport (empty/null name = the default channel).

Declaration
public static bool TryGetTransport(string name, out AudityTransportDesc transport)

System.Boolean

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.

Declaration
public static void PublishDrive(AudityTransportSettings settings, AudityQuantize startQuantize = AudityQuantize.Immediate)
Type Name
DarkEffekt.Audity.AudityTransportSettings settings
DarkEffekt.Audity.AudityQuantize startQuantize

The current mix position in the transport clock domain.

Declaration
public static ulong NowDspSample()

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.

Declaration
public static ulong NextBoundary(in AudityTransportDesc transport, ulong dspSample, AudityQuantize quantize)

System.UInt64

Type Name
DarkEffekt.Audity.AudityTransportDesc transport
System.UInt64 dspSample
DarkEffekt.Audity.AudityQuantize quantize

Sets a live parameter’s value for every currently playing instance that references it, unless that instance has already received a local parameter override.

Declaration
public static void SetParameter(AudityParameterId id, float value)
Type Name
DarkEffekt.Audity.AudityParameterId id
System.Single value

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.

Declaration
public static void SetParameter(string name, float value)
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.

Declaration
public static bool TryGetParameter(AudityParameterId id, out float value)

System.Boolean: False if the parameter has never been set (no value has been mirrored to any instance).

Type Name
DarkEffekt.Audity.AudityParameterId id
System.Single value

Clears all global parameter values, tempo, and transports (used by tests and play-enter).

Declaration
public static void Reset()