Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:18 18 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2 Question: ADC on PLAY SOUND output?

Author Message
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 03:12pm 30 Mar 2021
Copy link to clipboard 
Print this post

Is there a way to digitize the output of the PLAY SOUND command using the ADC command?

E.g. is the L & R output voltage of the PLAY SOUND  command available on the I/O pins so they can be looped back for reading with the ADC command? Maybe there is a way to perform the loopback in software?

In either case, would this operation be "non-blocking" l.e.will the ADC command work properly while PLAY SOUND is running?

The use case is to create a little oscilloscope display of the audio waveform that is playing. Any guidance would be appreciated!
Enjoy Every Sandwich / Joe P.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10597
Posted: 05:19pm 30 Mar 2021
Copy link to clipboard 
Print this post

  Quote  Is there a way to digitize the output of the PLAY SOUND command using the ADC command?

E.g. is the L & R output voltage of the PLAY SOUND  command available on the I/O pins so they can be looped back for reading with the ADC command? Maybe there is a way to perform the loopback in software?

In either case, would this operation be "non-blocking" l.e.will the ADC command work properly while PLAY SOUND is running?

The use case is to create a little oscilloscope display of the audio waveform that is playing. Any guidance would be appreciated!


Like this?

The code is  on TBS here
Edited 2021-03-31 03:27 by matherp
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 05:39pm 30 Mar 2021
Copy link to clipboard 
Print this post

Peter, thanks - almost like that, but simpler (basic waveforms via PLAY SOUND instead of MP3 playback, and a time series display instead of frequency domain).

But, yeah, pretty much the desired effect - the FFT will be a nice "flourish" :)
Enjoy Every Sandwich / Joe P.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025