VS1010 RecPlayExample

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
User avatar
Henrik
VLSI Staff
Posts: 1147
Joined: Tue 2010-06-22 14:10

VS1010 RecPlayExample

Post by Henrik » Fri 2019-07-26 14:55

Hello!

I present you with the first pre-release of a new VS1010 program collection, the VS1010 RecPlayExample.

The RecPlayExample shows an example of an Voice / MP3 player that can also record voice files in 8 kHz IMA ADPCM WAV format to SD cards. If connect to a PC through USB, the player shows up as a High-Speed USB disk. The demo software is intended to be run on the VS1010 Developer Board, where it uses buttons B0 through B3, as well as the Green LED1 and Red LED3.

Instructions on use are below:

Code: Select all

RecPlayExample is collection of programs that can play back MP3 music files
and WAV voice files, and record WAV voice files at 8 kHz IMA ADPCM WAV files
at 32 kbit/s. The example is designed to run on the VS1010 Developer Board.

To use, copy all .dlx files in this package to your S:SYS folder, then
create a S:CONFIG.TXT file with the three following lines:
TreePlayer2
RecADPCM
@

The software has four modes. Button B0 switches between modes 0-3. Mode 4 is
activated by connecting the board to a PC through USB.
1) Voice playback mode (.WAV files)
2) MP3 playback mode (.MP3 files)
3) Voice recording mode (.WAV files)
4) Computer file copy USB mode

1) Voice playback mode, indicated by Green Led LED1:

When in pause mode, LED1 is lit, when playing LED1 blinks.

Control buttons are:
- B0 short: Next mode
- B1 short: Pause on/off
- B2 short: Previous file
- B2 long: Volume up
- B3 short: Next file
- B3 long: Volume down

If the board is connected to a PC through UART, USB mode is activated.


2) MP3 playback mode, indicated by Green Led LED1:

When in pause mode, LED1 is lit, when playing LED1 blinks.

Control buttons are the same as in Voice playback mode.

If the board is connected to a PC through UART, USB mode is activated.


3) Voice recording mode, indicated by Green and Red Leds LED1 & LED3.

Voice recorder starts in pause / monitoring mode.

Control buttons are:
- B0 short: Next mode
- B1 short: Record / Stop
The playback part of RecPlayExample uses Aleksi's Music Player from here as its basis:
viewtopic.php?f=15&t=2430

I hope this piece of software is useful, or at least a good starting point for your own projects!

Kind regards,
- Henrik
Attachments
RecPlayExample001.zip
VSIDE solutions with binaries. Copy all .dlx files to S:SYS/
(178.65 KiB) Downloaded 21 times
REC0011.WAV
Example file recorded with VS1010 RecPlayExample
(18.31 KiB) Downloaded 12 times
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1147
Joined: Tue 2010-06-22 14:10

Re: VS1010 RecPlayExample v0.10

Post by Henrik » Tue 2019-08-06 13:26

Hi!

Back from the holidays with a new version 0.10 of RecPlayExample, the Voice Recorder / Voice/MP3 player for the VS1010 Developer Board. There are several new features and changes to this version:
  • The Voice Recorder has now an option to record at 16 kHz instead of 8 kHz. 16 kHz is the new default.
  • There is a new Project, RecPlay.dlx, which acts as a Master Control Program for the other Solutions. A looping config.txt is no longer required.
  • All the VSIDE Solutions are collected to one big Solution with several Projects.
  • Some cleanup of the code.
The relevant part of the README.TXT provided in the package is quoted below:

Code: Select all

                  RecPlay 0.10
                  ------------
                   for VS1010
            2019-07-26 VLSI Solution



INTRODUCTION

RecPlay is a collection of projects that can play back MP3 music files and
WAV voice files, and record WAV voice files at 8 kHz IMA ADPCM WAV files
at 32 kbit/s. The example is designed to run on the VS1010 Developer Board.

To use, copy all six .dlx files in this package to your S:SYS/ folder. If
you want the project to start automatically, create a S:CONFIG.TXT file with
the following line:
RecPlay

Alternatively, you can start the project by booting the VS1010 Developer
Board, then pressing Enter to get to the command mode, then giving the
following command to the prompt:
VS1010>RecPlay

When you start RecPlay, you will be greeted with the following message:
*** RecPlay v0.10, welcome! ***
followed by more messages.



HOW TO USE

The software has four modes. Button B0 switches between modes 0-3. Mode 4 is
activated by connecting the board to a PC through USB.
1) Voice playback mode (.WAV files)
2) MP3 playback mode (.MP3 files)
3) Voice recording mode (.WAV files)
4) Computer file copy USB mode

1) Voice playback mode, indicated by Green Led LED1:

When in pause mode, LED1 is lit, when playing LED1 blinks.

Control buttons are:
- B0 short: Next mode
- B1 short: Pause on/off
- B2 short: Previous file
- B2 long: Volume up
- B3 short: Next file
- B3 long: Volume down

If the board is connected to a PC through UART, USB mode is activated.


2) MP3 playback mode, indicated by Green Led LED1:

When in pause mode, LED1 is lit, when playing LED1 blinks.

Control buttons are the same as in Voice playback mode.

If the board is connected to a PC through UART, USB mode is activated.


3) Voice recording mode, indicated by Green and Red Leds LED1 & LED3.

Voice recorder starts in pause / monitoring mode.

Control buttons are:
- B0 short: Next mode
- B1 short: Record / Stop


To exit the RecPlay software, push Esc at any time.



SELECTING VOICE RECORDING SAMPLE RATE AND BIT RATE

This version records by default at 16 kHz, which creates ADPCM files of
approximately 65 kbit/s. Alternatively, the software can record at 8 kHz,
halving the file sizes. To select between these two options, you may
change the definition of the symbol HIGH_SAMPLE_RATE in the RecAdpcm
project file main.c. The ramifications are as follows:

If HIGH_SAMPLE_RATE is set:
- Use 16 kHz recording sample rate.
- Recording bit-rate is approximately 64.9 kbit/s.
- Example file: docs/Recording_16kHz.wav.

If HIGH_SAMPLE_RATE is not set:
- Use 8 kHz recording sample rate.
- Recording bit-rate is approximately 32.4 kbit/s.
- Example file: docs/Recording_08kHz.wav.

The example files are actual RecPlay recordings made in normal office
conditions using the on-board MEMS microphone provided on the VS1010
Developer Board. No post-processing or other tricks have been applied.



PROJECTS IN THE RECPLAY SOLUTION

There are several projects in this solution, all needed to get RecPlay
working properly. They are listed below:
- RecPlay.dlx: Wrapper calling TreePlayer2 and RecAdpcm
- TreePlayer2.dlx: A player program for voice .WAV and MP3 playback
- RecAdpcm.dlx: An IMA ADPCM .WAV recorder program
- ums.dlx: Usb Mass Storage device driver for when connected to PC
- USBPROBE.dlx: Probe what is connected to USB
- USBHDD.dlx: USB Host driver for a situation where a USB stick is inserted
To get an idea of the bit-rates, if using a small 8 GB SD card, and recording at 16 kHz, the total voice recording time is over 11 days. At 8 kHz, total voice recording time is over 22 days.

As usual, I hope this software package is useful to you!

Kind regards,
- Henrik
Attachments
RecPlayExample010.zip
RecPlay v0.10. Read the README.TXT for instructions on how to use.
(224.4 KiB) Downloaded 15 times
Recording_08kHz.wav
An example IMA ADPCM recording made with the 8 kHz option.
(21.81 KiB) Downloaded 10 times
Recording_16kHz.wav
An example IMA ADPCM recording made with the new 16 kHz option.
(50.06 KiB) Downloaded 10 times
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1147
Joined: Tue 2010-06-22 14:10

Re: VS1010 RecPlayExample v0.20

Post by Henrik » Wed 2019-09-18 12:05

Hello!

Attached to this message is version 0.20 of RecPlayExample, the Voice Recorder / Voice/MP3 player for the VS1010 Developer Board. This version contains the following enhancements:
  • Added 24 kHz recording option to the older 8 and 16 kHz options, and made it the default mode.
  • Enhanced low frequency reproduction of 16 kHz recording.
  • Moved sample rate configuration to RecAdpcm/configure.h.
  • Included newest versions of TreePlayer2, USBPROBE, and USBHDD. This greatly enhances compatibility with different USB memory stick brands.
  • Re-recorded example audio samples, and added 24 kHz to the collection. Tehy are also separately attached to this message.
A summary of the recording sample rate options and their file sizes is presented in the table below.
Adpcm.png
Adpcm.png (16.68 KiB) Viewed 57 times

I hope this version provides useful to you!

Kind regards,
- Henrik
Attachments
RecPlayExample020.zip
RecPlay v0.10. Read the README.TXT for instructions on how to use.
(295.65 KiB) Downloaded 8 times
Recording_08kHz.wav
An example IMA ADPCM recording made with the 8 kHz option.
(17.06 KiB) Downloaded 4 times
Recording_16kHz.wav
An example IMA ADPCM recording made with the 16 kHz option.
(39.06 KiB) Downloaded 4 times
Recording_24kHz.wav
An example IMA ADPCM recording made with the all-new 24 kHz option.
(54.31 KiB) Downloaded 4 times
Good signatures never die. They just fade away.

Post Reply