Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:38 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite - adventures in sound

     Page 1 of 3    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 12:33pm 08 Nov 2023
Copy link to clipboard 
Print this post




I've been playing with the VS1053 module from LC (this one )

So far I've managed to get it playing back mp3, flac and wav files from SDcard with, of course, better audio quality than the native PicoMite audio.
In addition I've got it supporting real-time midi. i.e. you can send it the various midi instructions (note on, note off, channel, etc.) and it will interpret them. The chip supports a maximum polyphony of 64, and the maximum sustained polyphony is 40.
the instruments supported are as below.
If I can get the various wrinkles sorted out I will include full support for this board into the PicoMite firmware




Edited 2023-11-08 22:34 by matherp
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 358
Posted: 01:24pm 08 Nov 2023
Copy link to clipboard 
Print this post

 
PilotPirx

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 68
Posted: 01:59pm 08 Nov 2023
Copy link to clipboard 
Print this post

Sounds great  
Ideal for midi files in the background.
Next PicoMite board with this chip?
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 03:13pm 08 Nov 2023
Copy link to clipboard 
Print this post

nice  

Datasheet
Edited 2023-11-09 01:14 by Martin H.
'no comment
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 358
Posted: 04:31pm 08 Nov 2023
Copy link to clipboard 
Print this post

Newer datasheet.
VS1053.PDF
Don't know if any significant differences compared to Martin's.

Fred
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 358
Posted: 04:36pm 08 Nov 2023
Copy link to clipboard 
Print this post

Sorry, link was not Ok.  


VS1053 (1).PDF
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 06:23pm 08 Nov 2023
Copy link to clipboard 
Print this post

If anyone has got one of these here is some firmware to play with


PicoMite.zip

PLAY VS1053 XCSpin, XDCSpin, DREQpin, XRSTpin [, fname$ [,interrupt]]


NB: OPTION SYSTEM SPI must be set up and wired to the MISO, MOSI, and SCK pins on the module
NB: OPTION AUDIO does not need to be set to use the VS1053
NB: maximum CPU speed for this module is 252MHZ

modes of use:

File playback
PLAY VS1053 XCSpin, XDCSpin, DREQpin, XRSTpin , fname$ [,interrupt]
Plays the file fname$ in the background. This can be a FLAC, MP3, WAV or MIDI file.
NB: The MIDI file must be in format 0, i.e. all tracks interleaved.
Use the optional parameter interrupt to trigger an MMBasic interrupt when playback is complete.


Real time MIDI
PLAY VS1053 XCSpin, XDCSpin, DREQpin, XRSTpin
This opens the VS1053 in real time MIDI mode meaning it responds to MIDI commands. To support this use:
PLAY NOTE ON channel, note, velocity
PLAY NOTE OFF channel, note [,velocity]
PLAY CMD cmd, data1 [,data2]


Together these allow you to use all the channels, instruments and notes the VS1053 is capable off

Use PLAY STOP to exit this mode

Feedback appreciated

Edited 2023-11-09 04:27 by matherp
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1109
Posted: 10:27pm 08 Nov 2023
Copy link to clipboard 
Print this post

There's a version of these VS1053 boards with a line in jack and an SD card slot. Are these usable too?

Is microphone support possible?
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 08:46am 09 Nov 2023
Copy link to clipboard 
Print this post

Should work but no promises. The issue is that connections to the VS1053 I/O pins configure how it behaves on boot. My code overrides these default configurations but I can't guarantee that I've caught them all. Hopefully I have as the board I picture is known to have an unusual default configuration which I had to override to get it to play mp3 etc.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 10:36am 09 Nov 2023
Copy link to clipboard 
Print this post

Lots of midi files posted seem to be the wrong format for the VS1053 so I've included a format conversion program in MMB4W. Uses too much memory to be included in the PicoMite.

Use

PLAY CONVERT fname1$,fname2$



MMBasic.zip
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:41pm 09 Nov 2023
Copy link to clipboard 
Print this post

Is the file in that zip supposed to be MMBasic.exp (that is, exp rather than exe)?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 12:44pm 09 Nov 2023
Copy link to clipboard 
Print this post

Oops


MMBasic.zip
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 04:23pm 20 Nov 2023
Copy link to clipboard 
Print this post

Hi Pete

I have the same configuration
MAKER PI PICO card
Pico 2040
sound card as your (gp9,gp8,gp7,gp6)
PicoMite MMBasic Version 5.07.08RC20
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP15

you wrote

NB: OPTION SYSTEM SPI must be set up and wired to the MISO, MOSI, and SCK pins on the module
NB: OPTION AUDIO does not need to be set to use the VS1053
NB: maximum CPU speed for this module is 252MHZ


for that I send midi command and I receive

> play vs1053 gp9,gp8,gp7,gp6
Error : Audio not enabled
>


if I put option audio, I receive that

> option audio spi gp9,gp6,gp7
PicoMite MMBasic Version 5.07.08RC20
Copyright 2011-2023 Geoff Graham
Copyright 2016-2023 Peter Mather

> play vs1053 gp9,gp8,gp7,gp6
Error : Unknown command
>


where I make mistake ??
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 04:37pm 20 Nov 2023
Copy link to clipboard 
Print this post

See here
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 04:44pm 20 Nov 2023
Copy link to clipboard 
Print this post


> option list
PicoMite MMBasic Version 5.07.08RC20
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP15
>
> option audio vs1053 gp10,gp11,gp12,gp9,gp8,gp7,gp6
Error : Pin 14/GP10 is in use
>

Edited 2023-11-21 02:48 by goc30
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 05:01pm 20 Nov 2023
Copy link to clipboard 
Print this post

From the referenced post
  Quote  Note that like the MCP4822 the VS1053 uses a separate SPI port from that specified by OPTION SYSTEM SPI. A dedicated SPI channel is essential to allow it to be used in a H/W interrupt routine.
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 05:03pm 20 Nov 2023
Copy link to clipboard 
Print this post

You wrote at the top of this page

NB: OPTION SYSTEM SPI must be set up and wired to the MISO, MOSI, and SCK pins on the module


and on yours pictures VScard is connected on the same SPI as sdcard
Edited 2023-11-21 03:05 by goc30
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 05:20pm 20 Nov 2023
Copy link to clipboard 
Print this post

Yes but this thread refers to an experimental test version. As always the final version will be in the release candidate thread and documented there.
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 06:00pm 20 Nov 2023
Copy link to clipboard 
Print this post

now it work


> option list
PicoMite MMBasic Version 5.07.08RC20
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP15
OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1
>
> play mp3 "b:track0002.mp3"



pb of doc not very clear
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 830
Posted: 01:03pm 29 Nov 2023
Copy link to clipboard 
Print this post

Hi,

is it possible to start an MP3 file at a certain point or can the file only be started from the beginning?

It would be great to build an audiobook reader that can memorize the position in the MP3 file and play it back from that position after switching it on again.

Would that be possible?

Frank
 
     Page 1 of 3    
Print this page
© JAQ Software 2024