Use case
For binaural beats, where a specific frequency is played isolated in each ear to create the perceived wobble, it can be useful to slide a tone to a new frequency over time. The .bend method on the TrackBuilder pitch shifts smoothly, but it is measured in semitones. I tried using an online calculator in this instance to slide the second tone from 200 to 205 hertz, but it overshoots it, so I'm not sure what is inaccurate there.
comp.track("tone1").note(&[205.0], 20.0).pan(-1.0);
comp.track("tone2")
.bend(0.4275) // Not actually the correct interval
.note(&[200.0], 20.0)
.pan(1.0);
The .interpolate (and .slide) methods have hertz for the frequency argument, but instead of actually sliding they are restarting the tone at each interval and create a buzzing noise:
comp.track("tone1").note(&[205.0], 20.0).pan(-1.0);
comp.track("tone2")
.slide(200.0, 205.0, 20.0)
.pan(1.0);
Possible solutions
- Improve interpolate so that it uses the same strategy as pitch bends
- Add a helper function for converting hz to semitones in the same way the engine presumably does with .bend
Use case
For binaural beats, where a specific frequency is played isolated in each ear to create the perceived wobble, it can be useful to slide a tone to a new frequency over time. The .bend method on the TrackBuilder pitch shifts smoothly, but it is measured in semitones. I tried using an online calculator in this instance to slide the second tone from 200 to 205 hertz, but it overshoots it, so I'm not sure what is inaccurate there.
The .interpolate (and .slide) methods have hertz for the frequency argument, but instead of actually sliding they are restarting the tone at each interval and create a buzzing noise:
Possible solutions