[split] NES audio emulation library?
Moderator: Moderators
Well, my core is perfect and matches all blargg's tests. I have problems with the Windows sound output only, but my core is 100% accurate.
Zepper
RockNES author
RockNES author
What do we lack regarding sound emulation? We've got almost every detail of the NES APU, including behavior of the sound channels and the mixer. On the emulation side, several band-limited synthesis methods are available: linear interpolation, oversampling followed by downsampling and filtering, and band-limited impulse train. All of these synthesis methods allow for cycle-accurate APU emulation without much trouble or processor load.
Last edited by blargg on Thu Jan 11, 2007 4:48 pm, edited 2 times in total.
The Nes_Apu and Nes_Cpu components of Game_Music_Emu can be used to make this (there's also a standalone Nes_Apu in Nes_Snd_Emu, but I haven't updated that in a while). I can easily put together what you described and post it here. Can you be more specific about the requirements? For example, would the NES have a PPU, or just the CPU, APU, and 2K of low memory? Would it have a simple interrupt like in an NSF, that calls a routine at a specified rate? Hmmm, are you simply wanting to play an NSF programatically? If so, just use Game_Music_Emu as-is, which will allow you to load the NSF from a block of memory, seek anywhere (runs about 800x real-time internally, so it's quite fast), adjust the song tempo, and mute channels.
I'm wanting to rewrite the NSF with various "play", adjust the tempo as the user drags sliders, change between sections of the song as the user presses previous and next, modify instruments in real time as the user drags sliders, mute virtual instruments (which the NSF engine multiplexes into hardware instruments), and modify the song itself as the user enters notes on a keyboard. This may require real-time communication between the program in the NSF and the music editor.blargg wrote:Hmmm, are you simply wanting to play an NSF programatically?
"Adjust the song tempo" how?If so, just use Game_Music_Emu as-is, which will allow you to load the NSF from a block of memory, seek anywhere (runs about 800x real-time internally, so it's quite fast), adjust the song tempo, and mute channels.
Yes. I can handle the emulation/synthesis back-end, if someone can do the Windows GUI/VST interface, and someone can write the NSF driver. The point is that the NES sound emulation stuff is available.tepples wrote:I'm wanting to [...] mute virtual instruments (which the NSF engine multiplexes into hardware instruments), and modify the song itself as the user enters notes on a keyboard. This may require real-time communication between the program in the NSF and the music editor.
By changing the rate at which the NSF's play routine is called, as set by the play rate value in the NSF header. GME allows this to be adjusted as the track is playing (I think Kode54's foo_gep release menioned above has a tempo slider now)."Adjust the song tempo" how?