/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / MP3 Player Recorder

Username:     
Password:     
             

Forum

# 1   2009-02-06 18:56:18 MP3 Player Recorder

ericambrosino
New member
Registered: 2009-02-06
Posts: 2

MP3 Player Recorder

Hi I'm new today,                           02/06/2009

Is there an app or source code for an MP3 player/recorder that will record in high quality digital audio like 96ksp in 24 BIT and will rip to MP3 and or WAV formats?

I would like to record a stereo signal in and have it format to MP3 on the SD card. Then be able to play it back in high quality via the stereo 16 Ohm headphone output. That would be very cool!

Thanks,

   Eric  A.

Offline

 

# 2   2009-02-06 19:03:08 MP3 Player Recorder

sjoerd
Member
From: Stad aan het Haringvliet
Registered: 2008-09-04
Posts: 65

Re: MP3 Player Recorder

it's quite a challenge to get a mp3 decoder working with 128kb ram.
I'm not familiar with encoding but I guess it's the same issue.

There's already source code available for recording PCM data on the Primer2.
encode/decode is up to a volunteer wink

Offline

 

# 3   2009-02-07 00:47:53 MP3 Player Recorder

chico
New member
Registered: 2009-02-02
Posts: 4

Re: MP3 Player Recorder

Why 128kb? Primer2 has 64kb RAM, right?

But nevertheless you will not get 24bit without external hardware, because there is no 24-bit ADC included.

Offline

 

# 4   2009-02-07 08:02:37 MP3 Player Recorder

sjoerd
Member
From: Stad aan het Haringvliet
Registered: 2008-09-04
Posts: 65

Re: MP3 Player Recorder

you're right. 64kb.. so even harder to get it done wink

Last edited by sjoerd (2009-02-07 08:04:00)

Offline

 

# 5   2009-02-09 15:13:53 MP3 Player Recorder

ericambrosino
New member
Registered: 2009-02-06
Posts: 2

Re: MP3 Player Recorder

Eric Here,

Thanks guys,

Okay, so in keeping with the 16 BIT ADC and sampling at 48Khz, what about adding RAM to the expansion board or even NAND FLASH for an internal storage that can be used in addtion to the SD Card?

I have SMT capabilities in my Lab and I'm a hardware engineer. This ST STM Processor device seems like quite a good chip to master and ST has put it in a very attractive development package.

So, is even a 16 BIT 48Khz a possibility by adding a meg or two of static RAM to the processor? Looks like we would need the STM32 Pro Version that lets development and debug take place at all memory locations. I presume it will allow external memory applications as well.

Thanks again,

   Eric A Hardware Guy

Last edited by ericambrosino (2009-02-09 15:18:39)

Offline

 

# 6   2009-02-09 16:29:49 MP3 Player Recorder

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: MP3 Player Recorder

The STM32 features an external bus (FSMC), but it is unfortunately NOT connected to extension connector (20 pin HE14 onnector) that provides only serial communcation ports: UART, I2C, SPI.. and IO (digital/analog). It is not possible to connect a static RAM.

Offline

 

# 7   2009-02-09 17:04:05 MP3 Player Recorder

krzysiu-m
New member
Registered: 2009-02-02
Posts: 8

Re: MP3 Player Recorder

sjoerd :

it's quite a challenge to get a mp3 decoder working with 128kb ram.
I'm not familiar with encoding but I guess it's the same issue.

There's already source code available for recording PCM data on the Primer2.
encode/decode is up to a volunteer wink

Hi,  sjoerd

Can you send me a link for this project with recording PCM data ??

Best !!

Offline

 

# 8   2009-02-16 11:10:10 MP3 Player Recorder

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: MP3 Player Recorder

For the MP3 'Player' it seems that the 64KB of embedded RAM should be enough. There is an application note on the NXP site:
http://www.standardics.nxp.com/support/ … n10583.pdf (see page 5)
that provides some interesting numbers for a similar project (33KB of RAM is ok for the player).

Offline

 

# 9   2009-02-16 12:09:47 MP3 Player Recorder

sjoerd
Member
From: Stad aan het Haringvliet
Registered: 2008-09-04
Posts: 65

Re: MP3 Player Recorder

That's interesting. Looking at the code, porting should be possible but I think a mallocer would be very nice if we want to do it clean.

Offline

 

# 10   2009-02-16 12:34:51 MP3 Player Recorder

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: MP3 Player Recorder

If we want to make the MP3 player as a standard application (i.e. not embedded in CircleOS), the mallocer can be linked with the application. At the moment, CircleOS reserves the upper 16KB, but the rest of the memory (48KB) are fully available for the launched application (and the stack). If we consider that a few KB should be kept for the stack, we still have around 45KB for the application.

Offline

 

# 11   2009-02-17 17:18:31 MP3 Player Recorder

klausr
Member
Registered: 2008-01-19
Posts: 18

Re: MP3 Player Recorder

You can look at the shine integer encoder, which was written as a small example
for a MP3 encoder by one of the Lame MP3 encoder authors.
http://www.mp3-tech.org/programmer/encoding.html
It was ported to ARM assembly (StrongARM). The assembly language differs to
the one used in STM32 Cortex-M, which uses Thumb2. The sound quality of the
shine encoder is not good, but it may be a starting point.
For quality issues, look here:
http://www.hydrogenaudio.org/forums/ind … opic=15035
Gabriel is the shine author.

I think there is _no_ chance to get a descent MP3 encoder like LAME running on the Primer2.

-Klaus

Offline

 

# 12   2009-02-18 16:27:07 MP3 Player Recorder

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: MP3 Player Recorder

Hello,
I made an mp3 player on the STM3210E-Eval board in keil using the helix lib, it is possible, however it could be difficult to get running under circle os...
But maybe with some support of DMA to get the decoded pcm data to the codec the cpu load will be lower...

I will investigate when i get my primer2, hopefully i get it this week...

for your recoard:
Program Size: Code=62196 RO-data=14240 RW-data=192 ZI-data=52896

Offline

 

# 13   2009-04-22 19:11:54 MP3 Player Recorder

Saulis
Member
From: Lithuania
Registered: 2009-04-09
Posts: 34

Re: MP3 Player Recorder

By using mp3,

i'm a bit confused on the current selected audio codec. i understand the use of ST production, but leaving for Stm32 manager task, audio codec should be VS1053 or similar... Implementing audio would be a lot easier task. wink

Offline

 

Board footer