Welcome, Guest
Username: Password: Remember me

TOPIC: Audio: Guitar Spectrum Meter (16x16 Resolution)

Audio: Guitar Spectrum Meter (16x16 Resolution) 3 months 1 week ago #1875

  • Ray
  • Ray's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 682
  • Thank you received: 146
  • Karma: 40
This code is very similar to www.electrosmash.com/forum/arduino-audio...eter-32x8-resolution

In this program the frequency response is a bit more limited as the guitar does not cover the whole audio range, fom 0 to 10KHz is more than enough.
This is why in the code you will see:
		    // 1st column, up		
        lc.setColumn(0, 7, bitswap(bar(av(fht_log_out, 0, 4) * 1)));
        lc.setColumn(0, 6, bitswap(bar(av(fht_log_out, 5, 9) * 1)));
        lc.setColumn(0, 5, bitswap(bar(av(fht_log_out, 10, 14) * 1))); 
        lc.setColumn(0, 4, bitswap(bar(av(fht_log_out, 15, 19) * 1)));
        lc.setColumn(0, 3, bitswap(bar(av(fht_log_out, 20, 24) * 1.4)));
        lc.setColumn(0, 2, bitswap(bar(av(fht_log_out, 25, 29) * 1.4)));
        lc.setColumn(0, 1, bitswap(bar(av(fht_log_out, 30, 34) * 1.4)));
        lc.setColumn(0, 0, bitswap(bar(av(fht_log_out, 35, 39) * 1.4)));      
        // 2nd column, up
        lc.setColumn(1, 7,bitswap(bar(av(fht_log_out, 40, 44) * 2)));
        lc.setColumn(1, 6,bitswap(bar(av(fht_log_out, 45, 49) * 2)));
        lc.setColumn(1, 5,bitswap(bar(av(fht_log_out, 50, 54) * 2)));
        lc.setColumn(1, 4,bitswap(bar(av(fht_log_out, 55, 59) * 2)));
        lc.setColumn(1, 3,bitswap(bar(av(fht_log_out, 60, 64) * 2.1)));
        lc.setColumn(1, 2,bitswap(bar(av(fht_log_out, 65, 69) * 2.1)));
        lc.setColumn(1, 1,bitswap(bar(av(fht_log_out, 70, 74) * 2.1)));
        lc.setColumn(1, 0,bitswap(bar(av(fht_log_out, 75, 100) * 2.1)));

Reaching up to "75" instead of the higher frequency "124" that you can see on www.electrosmash.com/forum/arduino-audio...eter-32x8-resolution.
  • You can also play with the multiplication factors 1, 1.4, 2, 2.1, etc They will give more/less enphasis to certain frequency ranges
  • With the gain potentiometer you can let more signal into the program.
  • All the libraries are included in the folder, you just need to unzip and compile

Hope you enjoy it:

File Attachment:

File Name: Spectrum_meter_16x16.zip
File Size: 588 KB



spectrum16x16.jpg
Last Edit: 3 months 6 days ago by Ray.
The administrator has disabled public write access.
Time to create page: 0.596 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio