// Auditory streaming — an alternating tone pair fuses into one stream or splits into two. // Run: node examples/streaming.js 240 4 15s // Run: node examples/streaming.js tempo=240 interval=4 -d 15s // Keys: q quit import { AudioContext } from 'web-audio-api' import { init } from './graphs/streaming.js' import { args, sec, keys, clearLine, help } from './utils.js' help({ description: 'alternate two tones and hear them fuse or split into streams', usage: ['', '[tempo] [interval] [duration]', 'tempo=240 interval=4 dur=15s'], options: [ ['tempo=', 'note tempo (default: 240)'], ['interval=', 'pitch interval between the two tones (default: 4)'], ['-d, --duration