|
Forum Index : Microcontroller and PC projects : Playing Audio Files
| Author | Message | ||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2069 |
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: AustraliaPosts: 2241 |
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: AustraliaPosts: 3366 |
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 KingdomPosts: 2069 |
@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: AustraliaPosts: 3366 |
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 StatesPosts: 58 |
Or better yet, SMPTE time code. |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2069 |
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 KingdomPosts: 9088 |
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 KingdomPosts: 2069 |
@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 KingdomPosts: 2069 |
Struggling to keep up Is this Pico BT or a BT dongle plugged in the USB hub? |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |