Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Sound storage and playback

Sound storage and playback

2007-09-29 by usafcjf2003

Hey Guys, I am looking for a way to store audio on my ATmega64L board
and then play it back thru a peripheral module.  I have been crawling
google for a few hours and havent found anything.  Anyone ever done
this before and had any luck?

Ohh yea, i have only been using AVR for about 2 months now, but I
understand the basics.... We will be going into interrupts in class
next week.

Re: Sound storage and playback

2007-09-29 by usafcjf2003

Yes and no.... I went thru some of them, and I found something that
does sine wave note building, But i am finding it hard to port to my
board.  IE, they use registers and variables that arn't defined for my
ATmega64L.  

Also, i think I might .... might be able to use this sine wave output,
if i could figure out how to parse RAW (wav???) data to the SRAM.

Re: Sound storage and playback

2007-09-29 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "usafcjf2003" <usafcjf2003@...> wrote:
> if i could figure out how to parse RAW (wav???) data to the SRAM.
The GoldWave audio editor (free download at http://www.goldwave.com) 
can be used to generate a series of datapoints representing the 
instantaneous relative amplitude of an audio signal.

Once you have the series of datapoints, you can then use a digital-to-
analog conversion technique (e.g. PWM) to regenerate the audio 
signal.  This is the general idea implemented in the PlaySound() 
subroutine in the ZBasic System Library 
(see http://www.zbasic.net/doc/ZBasicSysLib.php?page=169).

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Re: [AVR-Chat] Sound storage and playback

2007-09-29 by John Samperi

At 08:33 AM 30/09/2007, you wrote:
>  I have been crawling
>google for a few hours and havent found anything.

Have you been crawling Atmel's application notes?


Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Re: Sound storage and playback

2007-09-30 by John Samperi

At 09:35 AM 30/09/2007, you wrote:
>IE, they use registers and variables that arn't defined for my
>ATmega64L.

ALL REGISTERS are the same in ALL AVRs no matter the size of the chip.
What do you mean variables that are not defined? Variable have nothing
to do with the chip type but are only tags for the assembler or C compiler.

>  might be able to use this sine wave output,

If you are working with C look at app note AVR335, if with ASM then there is
a design note DN39 that you can download from AVRfreaks.

Of course you will/may have to do some adaptation to your environment
but that's half of the fun...

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.