Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
biquadFilter,
createNode,
gain as gainNode,
oscillator,
stereoPanner,
} from 'virtual-audio-graph'
import frequencyToPitch from '../../../audioHelpers/frequencyToPitch'
import pitchToFrequency from '../../../audioHelpers/pitchToFrequency'
const lfoNode = createNode(({frequency, gain, type}) => ({
0: gainNode('output', {gain}),
1: oscillator(0, {frequency, type}),
}))
const osc = createNode(({detune, frequency, gain, pan, pitch, startTime, stopTime, type}) => ({
0: gainNode('output', {gain}),
1: stereoPanner(0, {pan}),
2: oscillator(1, {
detune,
frequency: pitchToFrequency(frequencyToPitch(frequency) + pitch),
startTime,
stopTime,
type,
}),
}))
import {
biquadFilter,
createNode,
gain as gainNode,
oscillator,
stereoPanner,
} from 'virtual-audio-graph'
import frequencyToPitch from '../../../audioHelpers/frequencyToPitch'
import pitchToFrequency from '../../../audioHelpers/pitchToFrequency'
const lfoNode = createNode(({frequency, gain, type}) => ({
0: gainNode('output', {gain}),
1: oscillator(0, {frequency, type}),
}))
const osc = createNode(({detune, frequency, gain, pan, pitch, startTime, stopTime, type}) => ({
0: gainNode('output', {gain}),
1: stereoPanner(0, {pan}),
2: oscillator(1, {
detune,
frequency: pitchToFrequency(frequencyToPitch(frequency) + pitch),
startTime,
stopTime,
type,
}),
}))
export default ({filter, lfo, master, oscillatorSingles, oscillatorSupers}, notes) =>
notes.reduce((acc, {frequency, gain, id, startTime, stopTime}) => {
const noteGainId = `noteGain-${id}`
acc[noteGainId] = gainNode('filter', {gain})
import {createStore, connect} from 'st88'
import ControlModule, {Range, Select} from '../../components/organisms/ControlModule'
import createVirtualAudioGraph, {
createNode,
gain as gainNode,
oscillator,
stereoPanner,
} from 'virtual-audio-graph'
const audioContexts = new WeakMap()
const notes = new WeakMap()
const outputs = new WeakMap()
const virtualAudioGraphs = new WeakMap()
const stores = new WeakMap()
const oscBank = createNode(({
carrierDetune,
carrierOscType,
gain,
frequency,
masterGain,
masterPan,
modulatorDetune,
modulatorOscType,
modulatorRatio,
startTime,
stopTime,
}) => ({
0: gainNode(['masterPan'], {gain}),
1: oscillator(0, {
detune: carrierDetune,
frequency,