A simple wave recorder & player

Overview

A simple wave recorder & player is a audio project with mbed and some additional components.

It can record audio contents to .WAV files and play from .WAV files directly.

The hardware is really simple. So you can try to make it in a short time. :)

Enjoy!

Focus and Non-Focus

Focus

  • Develop a re-usable wave file software module.
  • Show how to create recording and playing feature with the software module.

Non-Focus

  • High bit rate audio.
    • Because the I/O throughput on the file system interface is slow. (The interface is serialized 1-bit SPI.)
    • Because the I/O scheme in the library is slow. (The data I/O scheme is byte-read and byte-write.)
  • High quality audio.

Circuit block

The circuit block on this project consists of 4 blocks, audio input, mbed, audio output and mbed.

/media/uploads/shintamainjp/circuit-block.png

Audio input block

Audio input block consists of three parts.

/media/uploads/shintamainjp/audio-input-block.png

mbed and SD card

You know !

Audio output block

/media/uploads/shintamainjp/audio-output-block.png

The tiny wav I/O module library

Re-usable wav library available on the page.

The license of the library is MIT.

So you can use it in your project freely. :)

Import librarywavfile

The tiny wav I/O module is the most simple wav file I/O module you've ever seen.

The library work on your mbed also on your PC (Windows, Linux, MacOS...).

Sample program

Import programSimpleWaveRecorderPlayer

The simple wave recorder and player project is a audio mini-project.

Features

  • Performance check (Write/Read)
  • Record 30 seconds.
  • Playback it.

Capture

/media/uploads/shintamainjp/example-output.png

The FAT file system library and the I/O throughput

The I/O frequency of the SDFileSystem changed to 20MHz.

Import librarySDHCFileSystem

Local copy of the SDHCFileSystem. But changed the I/O frequency to 20MHz.

Yeah.

It means "We need high class SD card" you are right.

/media/uploads/shintamainjp/sdfilesystem-changed.png


10 comments on A simple wave recorder & player:

07 Sep 2012

Hi, Just wana see thanx for the upload, program works perfectly fine :D

Im trying to create a program that plays a folder in the SD card only, how can i adapt your program to do this ?

so to remove the recording element :D

26 Oct 2012

i kindly request u sir can u tell me what type of instrumentation need for a simple wave recorder and player project

12 Apr 2013

Trying to use this on the kl25z and doesn't seem to work - I can generate sounds on the analog output using simple programs and read/write and sd card could the read speed for a flash card under spi mode be an issue ?

13 Jun 2013

Dear shintamainjp if i want to record for more then 1 hour, then what will i do...???

13 Oct 2013

is it possible to play a wave without an SD Card?

04 Feb 2014
09 May 2015

Hi I try to compile your SimpleWaveRecorderPlayer, but the compiler comes up with the following: Cannot open soure input file "cmsis.h", in resource PinNames.h in Folder extras/mbed_737756e0b479 followed by This declaration has no storage class or type specifier "FileBase & operator = (const FileBase&);"

Updating the mbed library just makes it much worse

Any suggestions on what to do? Thank you Juerg

14 Aug 2015

Kindly tell the values of components in above circuits diagrams..

14 Aug 2015

and hell lot of noises are coming...kindly help....

20 Aug 2015

my mbed analog in section has stopped working kindly suggest. I was using the same above code in my mbed board till yesterday..and it was working fine.. today morning when i start using it again with same existing connection the adcin is not taking any of my analog input.

when i here the file generated it is just kinda blank...

kindly help...

Please log in to post comments.