AudioPlayer unexpected behavior

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AudioPlayer unexpected behavior
#1
Hi,

We are using an Analog Output Module with AudioPlayer to control LED waveforms.  We realized that, when we upload an updated waveform to the module, somehow the offset of the LED in the next trial shows an unexpected behavior, as if the module is still partially remembering the previous waveform. 

For example, after using it for presenting 0->5V 1-sec ramp, if I upload an updated waveform of 0->1V 1-sec ramp, the LED works as expected for 1 second, but at the end of the ramp, it suddenly gives a brief flash with 5-V intensity.  This happens only at the first trial after the waveform change, and it works without problem afterward.  However, if I switch back again to 0->5V 1-sec ramp, then in the next trial the LED gives a strange 1-V intensity flash at the end of the ramp.  

Do you have an explanation for this strange behavior?

Thanks,
HK
Reply
#2
Hi HK,

I'm not sure why you're seeing that behavior. One thought - if you have the AudioPlayer_Live version of the firmware installed, you need to send a '*' to the analog module from the state machine (or alternatively, from MATLAB, run A.push() where A is an BpodAudioPlayer object), to make it use the most recently uploaded sounds.

If this doesn't fix the issue and you're not playing audio, I'd consider swapping back to the default WavePlayer firmware and BpodWavePlayer class.

-Josh
Reply
#3
(01-29-2020, 11:45 PM)Josh Wrote: Hi HK,

I'm not sure why you're seeing that behavior. One thought - if you have the AudioPlayer_Live version of the firmware installed, you need to send a '*' to the analog module from the state machine (or alternatively, from MATLAB, run A.push() where A is an BpodAudioPlayer object), to make it use the most recently uploaded sounds.

If this doesn't fix the issue and you're not playing audio, I'd consider swapping back to the default WavePlayer firmware and BpodWavePlayer class.

-Josh

We didn't install the Live version firmware, so probably that's not the case.  We can try the WavePlayer firmware. 

Thanks,
HK
Reply
#4
Sounds good.
Please note that the serial interface for WavePlayer is slightly different.
With AudioPlayer, to play sound 2, you'd use:
{'AudioPlayer1', ['P' 1]} % Note that sounds are 0-indexed on the Arduino side
With WavePlayer, you'd use
{'WavePlayer1', ['P' 3 1]} % 3 is translated to bits, indicating which channels to play on (in this case, 3 = '11' = channels 1 and 2). The 2 indicates waveform#3.

-Josh
Reply
#5
Hi Josh,

Thanks!  I could get rid of the issue with WavePlayer.

HK
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)