Coder Social home page Coder Social logo

nikita-kun / webaudiosurroundtemplates Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 17.36 MB

Simulate custom sound environments in a browser with stereo or multichannel output. Demo: https://nikita-kun.github.io/WebAudioSurroundTemplates

Home Page: https://nikita-kun.github.io/WebAudioSurroundTemplates

License: MIT License

JavaScript 94.01% HTML 5.99%
webaudio surround-sound audio-player browser javascript event-simulation html

webaudiosurroundtemplates's Introduction

WebAudioSurroundTemplates

A simple browser class for playing customizable sound templates on multichannel equipment.

Sound templates are written in JSON. Templates reference URLs of audio files and specify playback logic. State transitions and sound events are modeled using random processes from the embedded jstat/jstat library.

Demo

Multichannel support (depending on a browser):

  • Mono
  • Stereo
  • 4.0
  • 5.1
  • and other discrete sound configurations.

State transitions

  • Time-scheduled state transitions (e.g. go to state X at 21:00, go to state Y or Z every 30 minutes)
  • Random state transitions (sampling of state duration from a distribution)

webaudiosurroundtemplates's People

Contributors

nikita-kun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

webaudiosurroundtemplates's Issues

Chrome 79 and macOS 10.14.6: surround channels not playing

User Agent: Google Chrome Version 79.0.3945.130 (Official Build) (64-bit)
Operating System: macOS 10.14.6
WebAudioSurroundTemplates version: https://github.com/nikita-kun/WebAudioSurroundTemplates/tree/36ffa8fccc8dc521696bcfbbb2c50f8544a919c5
Template: channel_test

Channels playing: 1, 2, 3
Not installed, unknown: 4
Not playing: 5, 6

Log:

WebAudioTemplatePlayer Initializing. Channels: 6. Sample rate: 44100

player.context.destination -> AudioDestinationNode {
numberOfInputs: 1
numberOfOutputs: 0
channelCount: 6
channelCountMode: "explicit"
channelInterpretation: "speakers"
...}
player.merger -> ChannelMergerNode {
numberOfInputs: 6
numberOfOutputs: 1
channelCount: 1
channelCountMode: "explicit"
channelInterpretation: "speakers"
...}

Is this a problem with context.listener?
Examples work on Firefox 79 on the same OS, where the number of channels is also detected as 6.
player.context.listener in Chrome has many instantiated properties, while in Firefox it is empty.

Safari 12.1.2 and macOS 10.14.6: Fixed stereo

player.context.channelCount always has a value of 2.
maxChannelCount is 0.

AudioDestinationNode {maxChannelCount: 0, context: webkitAudioContext, numberOfInputs: 1, numberOfOutputs: 0, channelCount: 2, …}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.