
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
web-audio-assembler
Advanced tools
This is not even alpha software. It's an exploration of an idea
The aim of this project is answer the question: how to convert the highly imperative web audio api into something more compatible with a functional programming approach? In fact, the first purpose of this project is to access Web Audio API from Elm lang.
The idea it's old and popular: instead of use the API, create an object with the description of what you want and let web-audio-assembler to do the work.
Requirements:
You can see the Live Examples or read the generated API documentation
Create simple nodes
Use the assemble function to create a function that returns a node:
var ac = new AudioContext()
var Assembler = require('web-audio-assembler')
var Osc = Assembler.assemble({
node: 'oscillator',
type: 'sine',
frequency: 400,
connect: '$context'
})
var osc = Osc(ac)
osc.start()
Create more complex node graphs
You can create a complex node graph by using an object. Also you can use the connect property to connect one node to the other:
var Synth = Assembler.assemble({
name: 'microsynth',
amp: {
node: 'gain',
connect: '$context'
},
filter: {
node: 'filter',
type: 'lowpass',
frequency: '500',
connect: 'amp'
},
osc: {
node: 'oscillator',
type: 'sine'
connect: 'filter'
}
})
var synth = Synth(ac)
synth.osc.start(ac.currentTime)
// or
Assembler.start(synth, ac.currentTime) // start all startable nodes (oscillators, audio sources, envelopes)
Assembler.stop(synth, ac.currentTime) // stop all stoppable nodes
Assembler.dispoase(synth) // dispose all nodes
There's a way to schedule updates in the node. You pass an array with update objects with the form { target: <node.path>, time: <relative time in secs>, ...}:
Assembler.schedule(synth, ac.currentTime, [
{ target: 'filter.frequency', value: 400, time: 0 },
{ target: 'osc', trigger: 'start', time: 0 },
{ target: 'filter.frequency', value: 400, time: 1 }
])
Notice the time value of the update events are relative to the time passed to the schedule function.
Clone this repository and run npm install && npm test. You can open the .html files of the examples directory directly (no server required).
MIT License
FAQs
Assemble web audio nodes
We found that web-audio-assembler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.