Skip to content

Main content

Random Spatial Audio Event Layout Generator

Generate fictional source positions and nominal listener levels under an explicit free-field distance model with bounded separation search.

Loading tool…

Description

Generate fictional source positions and nominal listener levels under an explicit free-field distance model with bounded separation search.

A physical-model fixture draws inputs under explicit units and delegates a stated idealized calculation. Computed values follow that model; they are separate from measurements, calibration, and environmental effects omitted by the assumptions.

Generate fictional source positions and nominal listener levels under an explicit free-field distance model with bounded separation search.

When to use this tool

Use this generator to create reproducible spatial audio event layout cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply count, listener, sourceX, sourceY, sourceZ, referenceLevelDb, referenceDistanceMeters, minimumDistanceMeters, maximumAttemptsPerEvent in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read listener, events. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Sample Cartesian source positions in meters and reference sound levels in dB. Reject a position below minimumDistanceMeters, retry up to the supplied cap, and add the delegated inverse-square level change from referenceDistanceMeters to the sampled listener distance.1

Delegated operations used for this result: inverse square law level change. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
countRequested count; the mechanics explain whether one draw expands into several returned records.Required. Safe integer; minimum 1; maximum 64.
listenerListenerRequired. Object; no unknown keys.
listener.xXRequired. Finite number.
listener.yYRequired. Finite number.
listener.zZRequired. Finite number.
sourceXSource XRequired. Object; no unknown keys.
sourceX.minimumMinimumRequired. Finite number.
sourceX.maximumMaximumRequired. Finite number.
sourceYSource YRequired. Object; no unknown keys.
sourceY.minimumMinimumRequired. Finite number.
sourceY.maximumMaximumRequired. Finite number.
sourceZSource ZRequired. Object; no unknown keys.
sourceZ.minimumMinimumRequired. Finite number.
sourceZ.maximumMaximumRequired. Finite number.
referenceLevelDbReference Level DbRequired. Object; no unknown keys.
referenceLevelDb.minimumMinimumRequired. Finite number.
referenceLevelDb.maximumMaximumRequired. Finite number.
referenceDistanceMetersReference Distance MetersRequired. Finite number; strictly above 0.
minimumDistanceMetersMinimum Distance MetersRequired. Finite number; strictly above 0.
maximumAttemptsPerEventMaximum Attempts Per EventRequired. Safe integer; minimum 1; maximum 128.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
listenerListenerRequired. Object; no unknown keys.
listener.xXRequired. Finite number.
listener.yYRequired. Finite number.
listener.zZRequired. Finite number.
eventsEventsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 64.
events[].indexIndexRequired. Safe integer; minimum 0; maximum 63.
events[].sourceSourceRequired. Object; no unknown keys.
events[].source.xXRequired. Finite number.
events[].source.yYRequired. Finite number.
events[].source.zZRequired. Finite number.
events[].distanceMetersDistance MetersRequired. Finite number; strictly above 0.
events[].referenceLevelDbReference Level DbRequired. Finite number.
events[].levelChangeDbLevel Change DbRequired. Finite number.
events[].nominalListenerLevelDbNominal Listener Level DbRequired. Finite number.
events[].attemptsAttemptsRequired. Safe integer; minimum 1; maximum 128.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "count": 1,
    "listener": {
      "x": 0,
      "y": 0,
      "z": 0
    },
    "sourceX": {
      "minimum": 3,
      "maximum": 3
    },
    "sourceY": {
      "minimum": 4,
      "maximum": 4
    },
    "sourceZ": {
      "minimum": 0,
      "maximum": 0
    },
    "referenceLevelDb": {
      "minimum": 80,
      "maximum": 80
    },
    "referenceDistanceMeters": 1,
    "minimumDistanceMeters": 1,
    "maximumAttemptsPerEvent": 8,
    "seed": 42
  },
  "output": {
    "listener": {
      "x": 0,
      "y": 0,
      "z": 0
    },
    "events": [
      {
        "index": 0,
        "source": {
          "x": 3,
          "y": 4,
          "z": 0
        },
        "distanceMeters": 5,
        "referenceLevelDb": 80,
        "levelChangeDb": -13.979400086720377,
        "nominalListenerLevelDb": 66.02059991327963,
        "attempts": 1
      }
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • This is a free-field nominal level model, not acoustic rendering or an exposure assessment. It ignores reflections, directivity, absorption, and obstacles. An exhausted distance-rejection budget returns an error.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Spatial Audio Event Layout Generator — tool.io

  2. Calculation or validation: acoustics/inverse-square-law-level-change — tool.io

Similar or alternative tools