SFML and PN noise (8-bit emulation) -
i have had absurd idea write commodore vic-20 emulator, first computer.
everything has gone quite until sound emulation time has come! vic-20 has 3 voices (square waveform) , noise speaker. searching net found pn generator (somewhere called "white" noise).
i know white noise not frequency driven, put specific frequency value noise register (poke 36877,x
command). formula is:
freq = cpu_speed/(127 - x)
(more details on vic-20 programmer's guida, mos6560/6561 vic-i chip)
where x 7-bit value of noise register (bit 8 noise on/off switch)
i have 1024 pre-generated buffer of numbers (the pseudo-random sequence), question is: how can correlate frequency (freq) create sample buffer pass sound card (in case sf::soundbuffer
accepts sf::int16
(aka unsigned short
) values?
i guess of had commodore vic-20 or c64 @ home , played old poke
instruction... can of me in understanding step?
edit:
searching on internet found c64 programmer's guida shows waveform graph of noise generator. can recognize kind of wave/perturbation etc...? waveform seems periodic (with period of freq), how tu generate such wave?
Comments
Post a Comment