Function panner

  • Parameters

    • sound_name: string

      audio clip name - case sensitive

    • Optionalattributes: {
          coneInnerAngle: undefined | string;
          coneOuterAngle: undefined | string;
          coneOuterGain: undefined | string;
          distanceModel: undefined | string;
          maxDistance: undefined | string;
          panningModel: undefined | string;
          refDistance: undefined | string;
          rolloffFactor: undefined | string;
      }

      the panner attributes to set

      • coneInnerAngle: undefined | string

        A parameter for directional audio sources, this is an angle, in degrees, inside of which there will be no volume reduction.

      • coneOuterAngle: undefined | string

        A parameter for directional audio sources, this is an angle, in degrees, outside of which the volume will be reduced to a constant value of coneOuterGain.

      • coneOuterGain: undefined | string

        A parameter for directional audio sources, this is the gain outside of the coneOuterAngle. It is a linear value in the range [0, 1].

      • distanceModel: undefined | string

        Determines algorithm used to reduce volume as audio moves away from listener. Can be linear, inverse or exponential. @param {string} [attributes.maxDistance=10000] - The maximum distance between source and listener, after which the volume will not be reduced any further. @param {string} [attributes.refDistance=1] - A reference distance for reducing volume as source moves further from the listener. This is simply a variable of the distance model and has a different effect depending on which model is used and the scale of your coordinates. Generally, volume will be equal to 1 at this distance. @param {string} [attributes.rolloffFactor=1] - How quickly the volume reduces as source moves from listener. This is simply a variable of the distance model and can be in the range of [0, 1]withlinearand[0, ∞]withinverseandexponential. @param {string} [attributes.panningModel="HRTF"] - Determines which spatialization algorithm is used to position audio. Can be HRTForequalpower`.

      • maxDistance: undefined | string
      • panningModel: undefined | string
      • refDistance: undefined | string
      • rolloffFactor: undefined | string
    • Optionalid: number

      the sound instance ID. If none is passed, all sounds in group will be changed.

    Returns Object

    current panner attributes.

    me.audio.panner("cling", {
    panningModel: 'HRTF',
    refDistance: 0.8,
    rolloffFactor: 2.5,
    distanceModel: 'exponential'
    });