import { wave } from 'https://unpkg.com/ixfx/dist/modulation.js';
import { resolveFields } from 'https://unpkg.com/ixfx/dist/data.js';
const state = {
intensity: wave({secs: 2, shape: `sine` }),
someOtherState: 10
}
const use = async () {
const { intensity } = await resolveFields(state);
// Do something with intensity value...
}
Creates a wave modulator. Defaults to 5-second sine wave.