How to use the virtual-audio-graph.oscillator function in virtual-audio-graph

To help you get started, we’ve selected a few virtual-audio-graph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github benji6 / andromeda / src / plugins / instruments / Ariadne.js View on Github external
modulatorDetune,
  modulatorOscType,
  modulatorRatio,
  startTime,
  stopTime,
}) => ({
  0: gainNode(['masterPan'], {gain}),
  1: oscillator(0, {
    detune: carrierDetune,
    frequency,
    startTime,
    stopTime,
    type: carrierOscType,
  }),
  2: gainNode({destination: 'frequency', key: 1}, {gain: 1024}),
  3: oscillator(2, {
    detune: modulatorDetune,
    frequency: frequency * modulatorRatio,
    startTime,
    stopTime,
    type: modulatorOscType,
  }),
  masterGain: gainNode(['output'], {gain: masterGain}),
  masterPan: stereoPanner(['masterGain'], {pan: masterPan}),
}))
github benji6 / andromeda / src / plugins / instruments / Prometheus / notesToGraph.js View on Github external
const lfoNode = createNode(({frequency, gain, type}) => ({
  0: gainNode('output', {gain}),
  1: oscillator(0, {frequency, type}),
}))
github benji6 / andromeda / src / plugins / instruments / Ariadne.js View on Github external
const oscBank = createNode(({
  carrierDetune,
  carrierOscType,
  gain,
  frequency,
  masterGain,
  masterPan,
  modulatorDetune,
  modulatorOscType,
  modulatorRatio,
  startTime,
  stopTime,
}) => ({
  0: gainNode(['masterPan'], {gain}),
  1: oscillator(0, {
    detune: carrierDetune,
    frequency,
    startTime,
    stopTime,
    type: carrierOscType,
  }),
  2: gainNode({destination: 'frequency', key: 1}, {gain: 1024}),
  3: oscillator(2, {
    detune: modulatorDetune,
    frequency: frequency * modulatorRatio,
    startTime,
    stopTime,
    type: modulatorOscType,
  }),
  masterGain: gainNode(['output'], {gain: masterGain}),
  masterPan: stereoPanner(['masterGain'], {pan: masterPan}),
github benji6 / andromeda / src / plugins / instruments / Prometheus / notesToGraph.js View on Github external
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,
  }),
}))