Generating Audiostrobe Frequencies
I quite fancy having a dabble making my own editor so I figured I'd start with creating some audiostobe signals.
I know the frequency is 19200, so I started experimenting with some frequency modulation to conbtrol the flashing, but it wasn't that great - too rampy on slower speeds, unless I made the frequency difference larger but then it bacame audible. I dabbled with switching amplitudes to 0 and back but it was too clicky on bright settings...
...so how is it best done? Is it some really slow square wave, is it some appropriate adsr notes being played or something altogether different?
I hope that makes sense
Re: Generating Audiostrobe Frequencies
Amplitude modulation. Use a square (or other waveform) as an LFO to modulate volume. Make sense?
Re: Generating Audiostrobe Frequencies
It does. thanks. That will keep me on the right track. C++ is what doesn't make sense! (as well as the library only seeming to have frequency modulation, but I'll dig deeper) But it helps to be able to just focus on making that bit work. Thanks again :D
Re: Generating Audiostrobe Frequencies
Access the volume property of the 19200khz sine you are producing then create another sine wave at a frequency of say 10hz to start and multiply it by the volume, scaling if necessary. A sine wave is in a range from -1 to 1. So with it you can get a representation of the volume in that range (or muliply the sine wave by a pre-scaler) then you can relate them.
Say volume is an 8 bit unsigned integer thus 0-255, you would want to wrap this to a signed scale (8 bit signed integer). Then the range would be -128 to 128. Then the ranges of volume and the sine wave can be compared.
For a square, it is only 1 bit, 0 or 1, on or off. So volume would be either 0 or 255.
Re: Generating Audiostrobe Frequencies
Gnh. I need to go back to school! Or bed at least. That kind of makes sense, but when I tried to apply what I think you said I just made some hideous noise and the glasses just plain freaked out.