November 17th, 2011, 14:57
|
#49
|
|
Sober coder
Join Date: Aug 2010
Location: London, UK
Posts: 433
|
Quote:
Originally Posted by paul_nicholls
eg. a typical ADSR envelope which could modulate a waveform's output amplitude might look like this:
Code:
volume
1 /\
| / \_______
| / \
| / \
0 A D S R
I hope this makes sense?
|
Got that thanks
Quote:
Originally Posted by paul_nicholls
So, for a 1 second sound encoded with my current scheme requires:
44100 x 1 (bytes per sample) x 1 (number of channels), or around 4.4KB.
|
That's 43 KB no?
Quote:
Originally Posted by paul_nicholls
We could reduce this by using 22050 sampling rate instead...it is entirely up to us (or the creator of the emulator) as to what sound quality we use 
|
Wait, the sample frequency depends on the game and how it chooses to store its samples, not the emulator, right?
__________________
tchip16 (chip16 assembler) Js16 (browser chip16 emulator)
mash16 (chip16 emulator) img16 (chip16 sprite converter)
______________________________________
Desktop: i5 750 @ 3.6 Ghz, 4GB ram, GTX 570 OC | Windows 7 Pro 64
Laptop: (Thinkpad) i5 430M, 4GB ram, Intel IGP | Arch Linux, Windows 7 Pro 64
|
|
|