Options
All
  • Public
  • Public/Protected
  • All
Menu

Muses

Index

Functions

  • createAudioMixer(context?: AudioContext): AudioMixer
  • Create a new audio-mixer to start adding channels with controllers (gain, panning and basic EQ).

    example

    Standard JavaScript

    // Import muses globally with <script> tag in your HTML file.
    // Then just use it in any script or file.
    const mixer = muses.createAudioMixer( ) ;
    example

    Module Import

    import { createAudioMixer } from "@corpsemedia/muses" ;
    const mixer = createAudioMixer( ) ;

    Parameters

    • Optional context: AudioContext

    Returns AudioMixer

  • getAudioContext(): AudioContext
  • Get an audio-context instance.

    Returns AudioContext

  • getMicStreamNode(): Promise<MediaStreamAudioSourceNode>
  • Request the microphone audio-stream to connect with a mixer's channel. This method will request the user permission automatically.

    example

    Promise Based

    muses
    .getMicStreamNode( )
    .then( streamNode => {
    channel.input( streamNode ) ;
    } )
    .catch( err => {
    console.error( "GET_MIC_STREAM_ERROR ~>", err ) ;
    } ) ;
    example

    Async Call

    const micNode = await muses.getMicStreamNode( ) ;
    channel.input( micNode ) ;

    Returns Promise<MediaStreamAudioSourceNode>

    • The final audio-node to connect with a mixer's channel.

Generated using TypeDoc