Utter noob here, just bashing around trying to figure out how things work with this nifty device.
Did not see any example/samples of audio running on this, despite the unit having an amp and speaker? Did not see any posts on the forum about Galactic Unicorn audio, either.
Looks like the Raspberry Pi Pico W uses audio samples in byte array format? But not sure what tools are available to convert WAV files to compatible format.
Or how to transfer the compatible file to the GU and then invoke playback.
Saw these pages: pico-pwm-audio and
playing with pico audio
But those examples might not necessarily apply to the built in audio amp.
Thanks in advance for any help or suggestions.
Ah. I2S audio on Pico/RP2040 is not currently supported in MicroPython
But this seems to say that I2S does work on RP boards with the MAX98357A except that an SD card is required for file storage?
I2S Support
So, in order to use the audio on the GU, I would have to use circuitpython?
I found this: MP3 Playback
I would just like for the GU to play the odd beep bloop, but not seeing a clear example of how that would work.
There is a feature test with audio example. I haven’t tried it, think I might though now that I see its there. =)
pimoroni-pico/feature_test_with_audio.py at main · pimoroni/pimoroni-pico (github.com)
1 Like
Yes, thanks! I tried it, and it works as advertised, producing synth sounds, which I will further experiment with.
But it does not provide an example of playing a pre-recorded audio sample, as I was hoping for.
Thanks again!
I think I found a tool to convert wav files to suitable pwm files:
WAV to PWM
So now I have to figure out how to try to use one of the those provided samples to make a noise using whatever I2S functions are included in the pirate version of MicroPython.
And then figure out how to use the tool to convert my desired wav file to pwm.
My goal is to be able to play a 39 kB wav file of the bridge scanner from ST TOS on a loop while the 80s super computer animation is on the GU display.
80’s Super Computer is what mine boots to now. It’s plugged into my Pi 400’s USB port. It’s on when the Pi 400 is on. It’s positioned under my monitor facing me.
It was a quick and dirty find a use for it, as I have other stuff on the go. I’m going to try a few other things once I get some free time to tinker with it.
1 Like