audio-voltage
Automatable DC voltage for modulation of Web Audio API AudioParams.
npm
Install via$ npm install audio-voltage
Example
var audioContext = var AudioVoltage = { var oscillator = audioContext // use input var midiVoltage = midiVoltagegainvalue = 69 // set base note (440hz middle A) // normalize to 0 var offset = offsetgainvalue = -69 midiVoltage // multiply by 100 and connect to oscillator detune var centMultiplier = audioContext centMultipliergainvalue = 100 offset centMultiplier // export param oscillatormidiNote = midiVoltagegain return oscillator} // create an instancevar oscillator = oscillatoroscillatorstart // automate the midi note with a slidervar slider = documentslidertype = 'range'slidermin = 0; slidermax = 127slidervalue = oscillatormidiNotevalueslider{ oscillatormidiNotevalue = }documentbody
To run the example clone the repo and npm install && npm run example
then navigate to http://localhost:9966/.