Page 1 of 1
Posted: Tue Jan 09, 2007 5:18 pm
by Jagasian
Any chance you will work your magic on improving the standard of NES's audio emulation?
Posted: Wed Jan 10, 2007 4:48 am
by Zepper
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.
Posted: Wed Jan 10, 2007 8:28 am
by blargg
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.
Posted: Wed Jan 10, 2007 9:00 pm
by Richter X
Now if only Kode54 would update foo_gep....and upload the special in_gsf that has bandlimited synthesis for GB Audio.
Posted: Thu Jan 11, 2007 11:48 am
by kode54
Please die in a fire.
Can we split this already?
I've uploaded a new version, although I'm not really satisfied with the stupid mute/tempo dialog I've added, I'm sure everybody will love it just the way it is, until I decide to completely change it.
Posted: Thu Jan 11, 2007 1:45 pm
by tepples
What is missing is a library that I can plug into, say, a Windows based music editor to emulate the CPU and audio of an NES that is communicating with the PC program through, say, a bank of shared memory in $6000-$7FFF.
Posted: Thu Jan 11, 2007 2:25 pm
by blargg
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.
Posted: Thu Jan 11, 2007 4:12 pm
by tepples
blargg wrote:Hmmm, are you simply wanting to play an NSF programatically?
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.
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.
"Adjust the song tempo" how?
Posted: Thu Jan 11, 2007 4:47 pm
by blargg
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.
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.
"Adjust the song tempo" how?
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).