Pico 2 W running the Audio Library

I found the issue, I had to remove the CMIS library from the IDE now that you added the headers in our lib.
I pushed some changes, the check for Pico 2W / the use of __enable_irq and __disable_irq in the audio objects / edit to the PolySynth example to simplify while increasing number of voices thanks to a Mixer template class from @manicksan.

I'll leave you make a PR to add your dual core example so you are credited in the commit.
 
Great news. I was using a fairly clean environment because I’d had teething issues with a clash with the original Teensy Audio library, so didn’t have the CMSIS library in scope.

When I’m back at the keyboard I’ll do a dual-core example, with big warnings in :) The solution may be to use the Pico mutex library instead of disabling interrupts, but care is probably necessary to avoid deadlocks. The real trick would be to allocate e.g. some voice processing for your PolySynth to each core, while leaving enough time for MIDI processing on the core that’s running on.
 
Speaking on behalf of @ghostintranslation (because I'm a few time zones ahead :giggle: ), no, this doesn't support the RP2040. It sort of could, but whereas the RP2350 is a Cortex M33 and has support for the DSP instructions, the RP2040 core is a Cortex M0, so would struggle to process much audio. There is limited support in the Audio library for the Teensy LC, which was an M0 core, but it looks a bit half-hearted (TBF, I haven't really explored it, came straight in with a 4.1 and never looked back).

The good news is that WaveShare do an RP2350 Zero, so ... just use one of those! It's only $1 more (y)
 
SHOULD THIS REALLY BE CONTINUED ON THE TEENSY FORUM?
IT DOESN'T SEEM TO SUPPORT OR BE ABOUT THE PJRC PRODUCT RANGE!
 
…and so do I. I’ve spent much more effort and cash on the Teensy community than I have on the Pico…

Even if not directly benefitting PJRC and Teensy, this effort does make use of the Audio library, and may well result in improvements to it that could feed back to future products, for example if there were to be a multi-core Teensy.
 
Ok, this one by example ?
Well, that looks like a counterfeit of the WaveShare product, for not much less than the real thing. Try here.
With the RP2350, it's possible to change the rate as it's possible with the Teensy and TeensyVariablePlayBack ?
Haven’t tried that, it might need a bit of porting. And you’d need fast SD access, again untried by me on a Pico. Essentially all of this effort is very much “bleeding edge”, so unless you’re willing to put in a lot of effort trying stuff for yourself, it’s much better to stay within the Teensy ecosystem where there’s plenty of prior experience.
 
Thanks @h4yn0nnym0u5e I was not watching the forum for a while.

@pierrotm777 Regarding audio rate, if you meant changing the value of AUDIO_SAMPLE_RATE then yes you can change it. I did try a while ago and it would then work for other values, right now it is set to 96000 (96kHz) here:

But as mentioned by @h4yn0nnym0u5e then I think it depends what you do in your sketch, when I tried various values I was only using an oscillator and envelope, nothing reading from an SD card.

@BriComp Anything related to the Audio library is related to PJRC as the Audio library is at the heart of why Teensy is awesome. I use Teensy and will still use it. Despite you seem to see the Pico as a "threat" it is really not intended for the same use cases. Pico has much less power and a not as good ADC, than Teensy and can't be used for the projects where Teensy actually makes sense by beating the other microcontrollers.
 
Back
Top