All Projects → benji6 → cycle-audio-graph

benji6 / cycle-audio-graph

Licence: MIT license
Audio graph driver for Cycle.js based on virtual-audio-graph

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cycle-audio-graph

react-redux-webaudio
An event manager for the Web Audio API, integrated with react-redux.
Stars: ✭ 23 (+21.05%)
Mutual labels:  web-audio, web-audio-api
chords
Text-based chord progression editor
Stars: ✭ 25 (+31.58%)
Mutual labels:  web-audio, web-audio-api
ember-audio
An Ember addon that makes working with the Web Audio API super EZ.
Stars: ✭ 33 (+73.68%)
Mutual labels:  web-audio, web-audio-api
AudioMasher
Generative Audio Playground
Stars: ✭ 50 (+163.16%)
Mutual labels:  web-audio, web-audio-api
Comet
Web Synthesis on steroids
Stars: ✭ 18 (-5.26%)
Mutual labels:  web-audio, web-audio-api
cycle-gun
A cycle.js driver wrapping gun.js storage
Stars: ✭ 26 (+36.84%)
Mutual labels:  cyclejs
cycle-snabbdom-examples
Cycle.js Component Examples with Routing & Transitions!
Stars: ✭ 13 (-31.58%)
Mutual labels:  cyclejs
angular-audio-context
An Angular wrapper for the Web Audio API's AudioContext.
Stars: ✭ 20 (+5.26%)
Mutual labels:  web-audio
simple-waveform-visualizer
JS Audio API 놀이터
Stars: ✭ 31 (+63.16%)
Mutual labels:  web-audio-api
generative.fm
A platform for playing generative music in the browser.
Stars: ✭ 1,557 (+8094.74%)
Mutual labels:  web-audio-api
mm-components
Music Markups components
Stars: ✭ 50 (+163.16%)
Mutual labels:  web-audio-api
WebAudioEvaluationTool
A tool based on the HTML5 Web Audio API to perform perceptual audio evaluation tests locally or on remote machines over the web.
Stars: ✭ 101 (+431.58%)
Mutual labels:  web-audio-api
spaghetti-audio
A Web Audio and canvas experiment
Stars: ✭ 94 (+394.74%)
Mutual labels:  web-audio-api
unmute-ios-audio
Enable/unmute WebAudio on iOS, even while mute switch is on
Stars: ✭ 96 (+405.26%)
Mutual labels:  web-audio
media-player
An modern, clean media player built using web technologies
Stars: ✭ 44 (+131.58%)
Mutual labels:  web-audio
extendable-media-recorder
An extendable drop-in replacement for the native MediaRecorder.
Stars: ✭ 123 (+547.37%)
Mutual labels:  web-audio
cycle-hn
Hackernews Clone Using CycleJS
Stars: ✭ 42 (+121.05%)
Mutual labels:  cyclejs
cyclejs-sortable
Makes all children of a selected component sortable
Stars: ✭ 16 (-15.79%)
Mutual labels:  cyclejs
PxtoneJS
Play Pxtone Collage files in Web Audio API.
Stars: ✭ 32 (+68.42%)
Mutual labels:  web-audio
WebAudio-Modem
Modem implementation with WebAudio (JavaScript)
Stars: ✭ 30 (+57.89%)
Mutual labels:  web-audio

cycle-audio-graph

npm version Build Status

Audio graph driver for Cycle.js based on virtual-audio-graph.

Check out Awesome Cycle.js for more Cycle.js resources.

Installation

npm i -S cycle-audio-graph

Usage

makeAudioGraphDriver

The default export of cycle-audio-graph is makeAudioGraphDriver which takes an optional configuration object with two optional key-value pairs:

import makeAudioGraphDriver from 'cycle-audio-graph'

const audioContext = new AudioContext()

// if no configuration object is provided the defaults
// detailed below will be used
makeAudioGraphDriver({
  // if audioContext is not provided then cycle-audio-graph
  // will attempt to construct its own instance
  audioContext,
  // output could be any valid AudioNode destination.
  // If not provided then cycle-audio-graph will use
  // the destination of its audioContext instance
  output: audioContext.destination,
})

Very Basic Example

import {run} from '@cycle/core'
import makeAudioGraphDriver from 'cycle-audio-graph'

const audioContext = new AudioContext()

const main = responses => {
  // ... example$ could be some sort of user input
  graph$ = example$.map(_ => {
    // ...
    const {currentTime} = audioContext
    return {
      0: ['gain', 'output', {gain: 0.2}],
      1: ['oscillator', 0, {
        type: 'square',
        frequency: 440,
        startTime: currentTime + 1,
        stopTime: currentTime + 2,
      }],
    }
  })
  return {
    audioGraph: graph$,
    // ... etc.
  }
}

const drivers = {
  audioGraph: makeAudioGraphDriver({
    audioContext,
    output: audioContext.destination,
  }),
  // ... etc.
}

run(main, drivers)

virtual-audio-graph

For more info on the graph objects in the graph$ check out the documentation for virtual-audio-graph.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].