VGA + VS1053B

Place your projects here
User avatar
cicciocb
Site Admin
Posts: 1989
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 426 times
Been thanked: 1329 times
Contact:

Re: VGA + VS1053B

Post by cicciocb »

For the lucky owners of the VGA output, try this code : :lol: (pumped from elsewhere)

Code: [Local Link Removed for Guests]

vga.pinout 4,5,6, 7,15,16, 17, 18, 8,3
vga.delete
vga.init 2, 2
vs1053.setup 38, 39, 40
vs1053.volume 5
vs1053.stream "https://radioitaliasmi.akamaized.net/hls/live/2093120/RISMI/stream01/streamPlaylist.m3u8"
'vs1053.stream "http://hirschmilch.de:7000/chillout.mp3"
vga.fill 0
RX=640:RY=480:CX=RX\2:CY=RY\2
r=(2*Pi)/25:x=0:v=0:t=0:SC=RY\4

Dim CV(15)
For i=0 To 15
 Read CV(i)
Next i
Data &H0000, &H001F, &H0200, &H03E0
Data &H0400, &H07E0, &H07E0, &H7FFF
Data &HF800, &HFF1F, &HFC00, &HFF9F
Data &HFE00, &HFFDF, &HFFC0, &HFFFF

b = 0
Do 
 vga.writepage b
 vga.fill 0 
 c=1
 For i=50 To 80 Step 2
   For j=50 To 100 Step 1
     u=Sin(i+v)+Sin(r*i+x)
     v=Cos(i+v)+Cos(r*i+x)
     x=u+t
     vga.Pixel CX+u*SC,CY+v*SC,CV(c)
   Next j
   Incr c: If c>15 Then c=1
 Next i
Incr t,0.0025
vga.showpage b
b = 1-b
Loop

User avatar
Electroguard
Posts: 855
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: VGA + VS1053B

Post by Electroguard »

Mesmerising. And that's even without the VS1053 which I only just ordered today... I do love the VGA capability.
User avatar
cicciocb
Site Admin
Posts: 1989
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 426 times
Been thanked: 1329 times
Contact:

Re: VGA + VS1053B

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Jan 15, 2024 9:07 pm Have you tried pairing the sounds to a bluetooth speaker device yet ?
Never tested but the Bluetooth functionality requires too much memory so is much easier to use an external Bluetooth adapter sold for very cheap. In this specific case (the vs1053b) it is the only option as the sound is generated externally.
Anyway, I'll give a try.
User avatar
cicciocb
Site Admin
Posts: 1989
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 426 times
Been thanked: 1329 times
Contact:

Re: VGA + VS1053B

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Jan 15, 2024 10:43 pm Mesmerising. And that's even without the VS1053 which I only just ordered today... I do love the VGA capability.
Just for fun, for a pure performance exercise, I did the same using javascript :D

[Local Link Removed for Guests]
User avatar
Electroguard
Posts: 855
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: VGA + VS1053B

Post by Electroguard »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Tue Jan 16, 2024 9:18 am Just for fun, for a pure performance exercise, I did the same using javascript :D
[Local Link Removed for Guests]
Wow, some sentence... doing javascript purely as a fun performance exercise !
The demo is great BTW, so could be useful to post its code in HTML Stuff for us to look at and perhaps learn from.
User avatar
cicciocb
Site Admin
Posts: 1989
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 426 times
Been thanked: 1329 times
Contact:

Re: VGA + VS1053B

Post by cicciocb »

The term "performance" was related to the graphic performances of the browser :D

The code source is very simple, you can just obtain it doing right click on the page and then "view page source".
It is essentially the same code for the basic plus some additional html elements.

You can eventually copy / paste it into a file.html and then play freely with it.
User avatar
Electroguard
Posts: 855
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: VGA + VS1053B

Post by Electroguard »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Tue Jan 16, 2024 7:27 am Never tested ... the Bluetooth functionality requires too much memory. Anyway, I'll give a try.
S3 N16R8 is about as powerful and capable as Annex gets, so should be an interesting test.

BTW, just had confirmation from JLCPCB that their incorrect SMT assembly weight over-estimate resulted in 200% price overestimate, so instead of ten S3 N16R8 VGA PCBs with the SMT VGA resistors pre-installed costing 40€ (with slow delivery) it will now cost less than 20€, which is much more acceptable. Could be a welcome precedent for anyone who has been previously put off SMT pre-assembly by over-priced estimates.
User avatar
cicciocb
Site Admin
Posts: 1989
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 426 times
Been thanked: 1329 times
Contact:

Re: VGA + VS1053B

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Jan 15, 2024 8:16 am I've got one of the red boards the same as Electroguard's on which I did a (very fiddly) cut and link hardware mod to make it boot up in serial mode with access to the midi instruments over serial interface for a simple rhythm generator box. Francesco, does your support for this chip give access to the instrument wavetables?
I've a good news for you, I've implemented the support for the midi files and also the access to the midi command (notes, instruments , ..)
AndyGadget
Posts: 222
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 124 times
Been thanked: 132 times

Re: VGA + VS1053B

Post by AndyGadget »

[/quote]
I've a good news for you, I've implemented the support for the midi files and also the access to the midi command (notes, instruments , ..)
[/quote]

WOW! The man is unbelievable :D
Ordering a couple of new VS1053 boards today. And a couple of S3 boards too.
User avatar
cicciocb
Site Admin
Posts: 1989
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 426 times
Been thanked: 1329 times
Contact:

Re: VGA + VS1053B

Post by cicciocb »

You don't need a -S3, it will work also with the classic ESP32 (probably all the ESP32)
Post Reply