Increasing max number of waveforms on AOM

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Increasing max number of waveforms on AOM
#1
Josh,

Basically I'm just tinkering so I can better understand how these things work.  I wanted to see if it was possible to increase the number of sounds (waveforms) the AOM can play running the BpodAudioPlayer_Live firmware.  I presume the two lines I need to adjust are:

const byte maxWaves = 20;
const uint32_t bufSize = 2000;

As currently configured almost all the teensy 3.6's memory is used up.  Therefore I figured if I wanted to increase the number of waves I'd need to decrease the buffer size.  And while I can decrease the buffer size to 1000 (things still play fine if maxWaves stays at 20), and I can decrease the maxWaves value below 20 (things play fine keeping maxWaves at 20 even if I increase bufSize above 2000), if I try to increase the maxWaves, say to 21 or 22 and decrease bufSize so a comparable amount of memory is used ~95%, the sounds simply don't play.  There are no errors in either Arduino when compiling and uploading, or matlab when running, just no sound output. Is there another variable or line I need to change?

Thoughts?

On a related note, are there any thoughts to upgrading Bpod and modules to run with teensy 4x at its core (high clock speed and more onboard memory could mean more sounds sampled at a higher rate than 44.1kHz)?

Thanks
Chuck
Reply
#2
Hi Chuck,

The 2000 sample buffer per sound is necessary to ensure that sounds continue to play without interruption while the next trial's sound data is being loaded to the device. I wouldn't decrease it.


We're eagerly anticipating Teensy 4.1, which will have an onboard microSD card to store sound data. I confirmed that Teensy 4.0's increased USB bandwidth allows for similar loading times despite the increased sampling rate. We'll also look into a board that uses an audio DAC, for a cleaner signal (anti-aliasing, etc).

-Josh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)