This should've been a part of the "About FCEUX's sound" thread, I made a year ago, but it's long dead, so I made another one, specifically for this question.
Is it possible to play different waveforms in FCEUX using Lua scripts? FCEUX basically uses specific algorithms to generate the different waveforms, the NES produces (particularly the ones, that the core 2A03 chip uses). So is it possible to recreate these algorithms with Lua scripts and then alter them a bit to create different sounds? For instance, at one point Channel 1 is playing a 25% Square wave. The code in the Lua script is sort of a counterpart of FCEUX's own sound script, so the script reads the data in the addresses for Channel 1 and it plays that channel, but instead of a pulse wave, it's playing a saw wave.
Sure, the sound may play separately from FCEUX's own audio, but that doesn't matter. If this is possible, without modifying FCEUX's code code, some interesting stuff can be created with that. Useless, but still interesting. And if Lua scripts allow for playing sound files, a sample based NES Audio system could be created.
This all seems a bit far-fetched, but it might be possible. Is it? I'd like to know.
Thanks.
Is it possible to play different waveforms in FCEUX using Lua scripts? FCEUX basically uses specific algorithms to generate the different waveforms, the NES produces (particularly the ones, that the core 2A03 chip uses). So is it possible to recreate these algorithms with Lua scripts and then alter them a bit to create different sounds? For instance, at one point Channel 1 is playing a 25% Square wave. The code in the Lua script is sort of a counterpart of FCEUX's own sound script, so the script reads the data in the addresses for Channel 1 and it plays that channel, but instead of a pulse wave, it's playing a saw wave.
Sure, the sound may play separately from FCEUX's own audio, but that doesn't matter. If this is possible, without modifying FCEUX's code code, some interesting stuff can be created with that. Useless, but still interesting. And if Lua scripts allow for playing sound files, a sample based NES Audio system could be created.
This all seems a bit far-fetched, but it might be possible. Is it? I'd like to know.
Thanks.