cs2261_32_sound

cs2261_32_sound - CS2261 Sound Sound Basics The Digital...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2261 Sound
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sound Basics
Background image of page 2
The Digital Process A / D Fs D / A Sound pressure fluctuations Sound pressure fluctuations Analog voltage Digital voltage Sampling frequency Sampled signal Analog voltage
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
GBA Sound Four legacy sound effect channels We won't use these Dual digital channels Direct Sound A Direct Sound B Each has an 8-bit digital-to-analog converters (DACs) Play any sounds you want Well, at least within the capabilities of 8 bit sound
Background image of page 4
Sound Step by Step
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Getting the Sound Obtain an 8-bit .wav file Convert to .bin using wav2gba.exe wav2gba <input.wav> <output.bin> Convert .bin to .c using bin2c.exe bin2c <input.bin> <output.c> Add the c file to your project Will be unsigned chars. .. Don't forget to extern it in your main file
Background image of page 6
Sound Devices are Sensitive Sensitive Sound Device (DAC etc.) FIFO QUEUE FIFO QUEUE FIFO QUEUE FIFO QUEUE TIMER
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Calculating Timer Timing Set up a timer to send samples from FIFO to the sound chip at the right frequency Bit 10: Sound A sampling rate Timer Bit 14: Sound B sampling rate Timer 0 or 1 in each bit for Timer 0 or 1 Figure out clock cycles per sample 2^24 / soundSamplingRate = cycles / sample Set up a timer to overflow after that many cycles Initialize timer to value of 65536 – (# of cycles)
Background image of page 8
Example At 16.7 MHz, the CPU has exactly 16777216
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/19/2009 for the course CM 2261 taught by Professor Omiensci during the Fall '09 term at Georgia Tech.

Page1 / 33

cs2261_32_sound - CS2261 Sound Sound Basics The Digital...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online