USB Audio VU meter

XCore Project reviews, ideas, videos and proposals.
User avatar
infiniteimprobability
XCore Expert
Posts: 672
Joined: Thu May 27, 2010 10:08 am
Contact:

USB Audio VU meter

Postby infiniteimprobability » Wed Sep 30, 2015 3:50 pm

Version: 1.1
Status: Alpha
License: BSD
Download: /files/project_builds/vu.zip

This project uses one of the low cost 128 x 64 OLED dsiaplays that can be found on ebay to give a VU meter for USB audio devices.


The display uses the SSD1306 controller IC connected via I2C and is connected to the XMOS MFA USB audio ref design.


It uses a function inline with the I2S loop to peak hold and decay. A separate task reads this info and sends it out to the display. It manages about 40 FPS (limited by I2C write speed @ 400Kbp) so quite a convincing effect. I tried and it does actually manage 1Mbps, but do so at your own risk!


Video here - www.youtube.com/watch?v=S7VSKjkmqRs


Video:

Images:
User avatar
infiniteimprobability
XCore Expert
Posts: 672
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Mon Oct 12, 2015 1:24 pm

Source code has been added. See readme.txt for guidance. You will need the USB Audio firmware first, which you can get from xmos.com (requires a license)


User avatar
infiniteimprobability
XCore Expert
Posts: 672
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Tue Oct 27, 2015 10:21 am

I have extended the SSD1306 library to support printing text now (basic implementation currently but works).


Gives you a 21 x 8 line console, which can be used to redicrect printf etc.


If there is interest in this, let me know and I'll tidy it and post it.


dweeb4
Active Member
Posts: 44
Joined: Mon Jan 19, 2015 12:47 pm

Postby dweeb4 » Fri Nov 27, 2015 5:11 am

I get errors during build:


../src/extensions/vu_task.xc:91:20: error: use of undeclared identifer `LEFT_VU'

        xscope_int(LEFT_VU, left_vu);                       //Show on xscope

 

../src/extensions/vu_task.xc:92:20: error: use of undeclared identifer `RIGHT_VU'

        xscope_int(RIGHT_VU, right_vu);

../src/extensions/vu_task.xc:97:20: error: use of undeclared identifer `LEFT'

        xscope_int(LEFT, left);

../src/extensions/vu_task.xc:98:20: error: use of undeclared identifer `RIGHT'

        xscope_int(RIGHT, right);

User avatar
infiniteimprobability
XCore Expert
Posts: 672
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Mon Nov 30, 2015 10:18 am

Hi - sorry about that. It is just debuf stuff (so I was able to view the signals graphically in real-time). You can either comment those lines out, or try the updated version attached. The difference is that I have included config.xscope which describes the xscope probes referred to in those lines that caused error. 


 


dweeb4
Active Member
Posts: 44
Joined: Mon Jan 19, 2015 12:47 pm

Postby dweeb4 » Mon Nov 30, 2015 4:17 pm

Thanks - I didn't know it wa sthat simple a fix - from looking at the code (I'm only newe to this) I thought it was doing something integral to the VU meter calcs - didn't realise XScope was a JTag debugging tool. I've a lot to learn still :) 


Cal1sto
New User
Posts: 2
Joined: Fri Apr 15, 2016 2:16 pm

Postby Cal1sto » Sun Jan 15, 2017 12:54 am

Search a way to run the vu_calc(sampleOut) inline function into an other logical core than the audio one , it seems that the lmul call take time on Audio part and destroy the data flow when i run my dac on PCM 768khz, without the both lmul call it run perfectly (with it will generate noise output) , so i search  a way to set this function into an other non blocking logical core, so the audio core will not be impacted by it, some idea there ?



Return to “Projects”

Who is online

Users browsing this forum: No registered users and 4 guests