Wave Phasing
✓ Published0🌍 Public
Aalexmacy
Last edited Jun 9, 2017
Created on Feb 11, 2017
Two waveforms, each generated by applying a different D3 easing function to a sawtooth wave, are drawn as dashed gray lines and summed into a solid red wave. Drop-down menus select the easing functions and the phase offset speed, while a button starts and stops animation and audio playback. The code uses D3 v4’s `d3.line`, `d3.timer`, and `d3.scaleLinear`, and the Web Audio API to generate and loop the sound, with a circle marker tracking the summed wave’s value.
AI-generated descriptionThe first two drop-downs change the wave combination. The third drop-down adjusts the phase.
mit Licensed