diyelectromusic / picodexed

Port of Synth_Dexed to the Raspberry Pi PIco
MIT License
15 stars 1 forks source link

Option to switch off Serial/USB MIDI, and also to add a MIDI player? #5

Closed nyh-workshop closed 1 month ago

nyh-workshop commented 1 month ago

Hello Kevin, first of all thanks for the PicoDexed app for the Raspberry Pico!

I have ported your app for Raspberry Pico 2 and called it Pico2Dexed, and the performance is suspected to be much better than the first Pico. I have not done any benchmarks yet, but for some instruments, it does not stutter anymore on a 10-note polyphony on 44100Hz sampling rate.

Also is there an option to switch off Serial/USB MIDI, and also to add a MIDI player? Temporarily I'm testing the synth using Len Shustek's Miditones and it would be fun to add a MIDI file player with the synth too. :D

diyelectromusic commented 1 month ago

Ah that's interesting - yes having a go with a Pico 2 is on my todo list at some point.

I've no further plans to develop PicoDexed yet other than keep it as a pretty minimal sound engine. There are many alternatives out there already - MicroDexed for a more full-featured, twin TG; MiniDexed for the 8 TG version with built-in UI; right up to Dexed on Zynthian for a Pi 4 or 5.

I do want to come back to it at some point though, so then will decide what is a next useful step. To be honest, I really need Synth_Dexed to be a little more cross-MCU friendly, but we have some ideas for how we might be able to do that, but right now, I've other projects on the go! :)

Kevin

nyh-workshop commented 1 month ago

Hi Kevin,

Thank you and appreciate the feedback. 👍 Your port of the MicroDexed is much better than my original port on the ESP32 which I did in 2019. Apart from it - I'll add the features myself along the way too.

I have a demo playing a song using the Pico2Dexed at Youtube too. Not sure if the E.Piano actually sounded this way - I do not have a DX7 to compare with. But, at least it didn't stutter!

diyelectromusic commented 1 month ago

Yes, that E.Piano sounds to me like it is playing too fast. I haven't looked through your code yet to see what you've changed but I wonder if there is something there that isn't matching the faster clock speed of the Pico2 with the expected sample rate of Synth_Dexed...

But it still sounds pretty good to me.

It might be worth hard-coding in a known tone output - e.g. "Concert A" at 440Hz and checking with an oscilloscope?

Kevin

nyh-workshop commented 1 month ago

Hi, thanks for examining the video. :D

During the porting process I did not modify the main Dexed code - it was taken from the MicroDexed recent git snapshot c30955409a.

The settings at the config.h:

#define DEXED_SAMPLE_RATE    44100
#define DEXED_POLYPHONY      10
#define DEXED_OVERCLOCK      1

#define AUDIO_PWM       1
#define AUDIO_I2S       2

#define AUDIO_OUTPUT    AUDIO_I2S

Also, I can get my oscilloscope to test the 440Hz too. I'll check back later with a screenshot of that waveform too. :D

nyh-workshop commented 1 week ago

Hi Kevin, apologies for the late reply.

I managed to get a close-up view of the E.Piano at 440Hz:

image

image

image