Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:25 29 Aug 2026 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 : Playing Audio Files

Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2069
Posted: 08:38pm 26 Aug 2026
Copy link to clipboard 
Print this post

Do we have some kind of a pointer to indicate where we are in the audio file so that we might trigger an event?
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2241
Posted: 09:41pm 26 Aug 2026
Copy link to clipboard 
Print this post

Phenix thats today's job as I ran out of time yesterday and didn't get a bluetooth speaker as claude did work while I was away   now got .uf2 with bluetooth audio and it will be interesting to see if the keyboard/mouse also works.

Now if you can explain what events when you want triggered for example if the track

"We will will rock you" is played a rock comes up on the screen  

Or if the audio is speech a particular word is spoken the an event is triggered.

Regards Bryan
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3366
Posted: 09:55pm 26 Aug 2026
Copy link to clipboard 
Print this post

Not that I know of.
Work-arounds.

1) Reset the Timer when you start Play. Poll the timer to trigger the event at the right time.
Won't be exact but may be near enough.

2) Make a new audio file with the audio on one channel and control tones on the other.
Loop that channel back to an AIN pin (via a filter if PWM) to monitor the tones.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2069
Posted: 11:08pm 26 Aug 2026
Copy link to clipboard 
Print this post

@Phil99

1) my thoughts
2) Yes. For live performance, stereo is pointless and so I like one channel to provide prompts to IEM (in ear monitor) and pan the actual audio to the other channel.

Instead of tap dancing on floor switches, I want to automate my patch switching via MIDI (thinking of VS1053).

Pretty certain that TIMER will be more precise than me stomping on a floor switch  😁
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3366
Posted: 11:32pm 26 Aug 2026
Copy link to clipboard 
Print this post

  Quote  Loop that channel back to an AIN pin (via a filter if PWM) to monitor the tones.
Could the signal on the looped back pin be used to trigger the patch switching?

A DIN could trigger an interrupt to do the switching.
The audio control tone, after filtering to remove the PWM carrier, could be AC coupled to a rectifier to trigger the DIN pin.

Edited 2026-08-27 09:57 by phil99
 
grumpyoldgeek
Regular Member

Joined: 30/07/2018
Location: United States
Posts: 58
Posted: 12:15am 27 Aug 2026
Copy link to clipboard 
Print this post

  phil99 said  Not that I know of.
Work-arounds.

1) Reset the Timer when you start Play. Poll the timer to trigger the event at the right time.
Won't be exact but may be near enough.

2) Make a new audio file with the audio on one channel and control tones on the other.
Loop that channel back to an AIN pin (via a filter if PWM) to monitor the tones.


Or better yet, SMPTE time code.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2069
Posted: 08:05am 27 Aug 2026
Copy link to clipboard 
Print this post

I was curious as to whether we had undocumented hooks that would also allow jumping to a random location in the audio file.

Not a big deal. What we have already is pretty awesome.  
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9088
Posted: 09:18am 27 Aug 2026
Copy link to clipboard 
Print this post

Peter  has said previously that jumping to a position within an audio file isn't possible. I can only assume that that's still the case. I assume it's because the entire file isn't in RAM, you are playing it from a buffer that is "topped up" from the actual data periodically.

If you wanted to know the position in the file being played you would probably have to count the bytes as they are passed through from the buffer - a serious and almost certainly unacceptable overhead!
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2069
Posted: 11:22am 27 Aug 2026
Copy link to clipboard 
Print this post

@Mixtel90

Makes sense It's a feature that I've never needed but if it was available, I would make it usable.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2069
Posted: 11:26am 27 Aug 2026
Copy link to clipboard 
Print this post

  Bryan1 said  now got .uf2 with bluetooth audio


Struggling to keep up  

Is this Pico BT or a BT dongle plugged in the USB hub?
 
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 2026