I wanted to share my efforts to port the VASynth from @StaffanMelin’s OscPocketD over to Daisy Pod. My main motivation is that the Pollen8 no longer works with the new codex on the latest batch of Daisy Seeds, and I wanted a replacement for myself (I fried my old Seed ). I noticed that @NilPointer2000 and @gevietor were also trying to get Pollen working on a new seeds, so I figured there would be some folks who would benefit from this as well. Thank you to @hammondeggsmusic for the original Pollen8; your code is no doubt much more logical than mine!
Before you touch any of this, please be aware that I do not know what I’m doing when it comes to coding in C++. I certainly picked up a lot which working on this, but I lack a lot of the basic instincts and understanding of a software engineer. I mostly took code from examples and tried my best to get this working, tiny step by tiny step. So a few things probably don’t work as well as they could, nor are all features represented here. I’m hoping that others will be able to take this an improve upon it. If not, I know at the very least that this is in good enough shape for people to use and enjoy it.
Here is the code:
The major feature that is missing is the ability to save your patch. You can cycle through some presets, but no saving and recalling. My efforts to get the QSPI working were in vain, and whenever I read through the documentation about saving to SD Card, I feel a little woozy. So, if I have one big ask, I’m hoping someone can help me figure out that piece of the puzzle.
Anyway, I hope some people can enjoy this and I want to give a big thank you to Staffan Melin for making the base code and sharing it.
Thanks for this; I have a post-Pollen8 Daisy Pod, and I’ve been looking out for a simple synth to get started. I’ve flashed my Pod with the .bin file, and I can change the lights, but I haven’t got any sound out of it yet; earbuds plugged into the headphone socket and MIDI keyboard plugged into a tested/working TRS/MIDI adaptor. Is there anything else I need to do, or should I just be able to power up and play…?
crud. Yeah it should just start up and make sound. This is probably an issue on my end, so I’ll check it out a little later today. In the meantime, some things you can try:
-right when you boot up try wiggling both knobs and/or set the right knob all the way clockwise (if it already is, move it first and then move it back)
-try turning the enocder, which cycles through presets and see if that does anything
-if you want to verify that your setup works as-is (I’m sure it does but just in case), try flashing one of the Electrosmith test programs, such as “Midi” (which uses the mod wheel to sweep a filter) or “Synth Voice” and just make sure all is working.
You could even try downloading the bin for the original OscPocketD/VASynth which isn’t designed for pod and you can’t change any parameters but it should still make sound when you play midi into it. This works also just help verify that everything on your end is working ok.
Again this is likely the fault of my shoddy code. I’ma novice at all this so I’m kind of figuring this out as I go, but stick with me and I’m sure we can get this working.
I’d be interested in trying to compile/flash this from the source. I’ve been able to compile/flash the standard examples via Studio Code by following these steps:
…but not sure how to repeat the trick with this one…?
Glad to hear that it’s working. Hopefully I’ll be able to release a version soon where you can save presets etc.
As for compiling, if you have the Daisy Examples folder downloaded, you can download all the files and put them together in a folder and drop that folder in the same folder as other Pod examples and try to compile from there. If you put it in the correct folder, the makefile should be able to find libDaisy and DaisySP.
Another option is to edit the Makefile and type in location of wherever you have the libDaisy and DaisySP folders stored. Those are the only two missing pieces needed to correctly compile (assuming you have the toolchain installed as well).
I’m interested in the patch-saving question, but I don’t want to clutter the thread with newbie posts so perhaps you’d rather discuss elsewhere…? I noticed the post from hammondeggs about switching from FatFS to QSPI for patch management in Pollen8, but was wondering if you’d considered FatFS for this…?
I think it’s fine to post any thoughts here. The more public the ideas are, the more likely we’ll get a solution figured, I think.
To more directly address your question, I read that same thread you were talking about and I think either option would be fine. I was defaulting to QSPI because that’s what was functional in the original code. I was kinda hoping that someone who knew more than I do would be like “oh you just have to enable such and such or change this or that and the code will work”.
I think what I need to do is hunt down some code that successfully uses FAT to see how all the pieces fit together. When I read through the documentation I get more than a bit lost.
In short, I’m open to any and all options if I can get something working!
OK! So…going back to to basics, have you basically taken a synth based on Seed + custom controls and remapped these so that it works on Seed + Pod…? And the original had a working QSPI patch load/save function…?
I think you’re planning to implement it in such a way that rotating the ‘push/pot’ loads successive patches with press-to-save…? And what was the stumbling block that you hit with that…? Does the QSPI handling in the original still basically work, or does it need modifying as a result of changes to the hardware, eg like the one that broke Pollen8…?
Does the save/load function basically pack/unpack all the synth parameters into some data structure and save that as a single file…? And are the parameters/variables still the same as the original…?
The plan was, as you say, to use the encoder to save and load patches. All the code for this is present from the original version. Here is the problem I ran into:
When I was first modifying the code, I changed #include daisy_seed.h to #include daisy_pod. I figured this was necessary to get easy access to the pod’s hardware. However, next time I tried to compile, I received the error that “daisy_pos” didn’t include the class QSPI (or maybe the class was specifically called something else, I’m having trouble remembering). So I added “#include daisy_seed.h” back in along with “daisy_pod.h”. I called daisy pod “hardware” and daisy seed was “hw”. So for example the code says hardware.UpdateLeds(); but hw.qspi.write(); if that makes sense.
The code compiled successfully. Then I wrote the code so that when I pressed the encoder down, the preset would save, but when I tested it, as soon as I pressed the encoder, the audio changed to a faint high pitch whine and the whole system just hung.
So I’m guessing I either:
made a error including both daisy_pod.h and daisy_seed.h or,
the code I wrote to make the encoder save is messed up somehow. I think I put it in the audiocallback which I’m not sure is the correct way to do it.
My plan was to mess around with it a bit more and test and mess around and test etc. but I haven’t had much time. Hopefully this all makes sense!
Ok, not to ignore your previous questions, but I had a minor breakthrough and got saving and loading working (sort of). I had to initialize QSPI manually and it seemed to work. I’m not sure if I did it exactly right. Either way, I have rough functionality implemented if you download the current code (main.cpp is the only thing that changed). It works like this:
Turn encoder right to load
Turn encoder left to save
Push encoder to change save slot (it cycles 0-16)
The reason I did it this way instead of turning the encoder to both change save slot and load at the same time, is that if I try to load an “empty” slot, the Daisy crashes and I have to restart. So I needed some way to select a “slot” and then save to it. There is probably a way to check and verify if there is data to load, but that will take much more learning on my part. In the meantime, I wanted to get something out that was working.
…brilliant, nice one. I’ll be interested to study this. It’s working fine for me.
(I found I had to start with a series of left/click/left/click/left etc with the encoder to fill the 16 slots; as you say, it doesn’t seem to like empty slots, and it settled down after that.)
Glad to hear it works. One thing to note is that not all parameters are saved at the moment (most notably the delay and reverb level) so you may see a patch load imperfectly. I’ll push out a minor update soon to fix that.
Next step is to figure out if there is a way to check for empty or incompatible data before trying to load and crashing. I’m just glad it’s working for now.
Edit: if you are interested in studying what I did, check out lines 274-283 to see the lines I added. If I am understanding it correctly, they basically map and initialize the pins of the flash memory.
Great! (Mastering QSPI with the Daisy Pod is a valuable step forward. I feel this functionality ought to be directly available within Daisy_Pod without having to borrow material from Daisy_Seed, but it’s beyond me to see how, and I haven’t found any other examples yet.)
Hey,
really looking forward to this.
The same happend to me, killed an “old” daisy. Pollen doesn’t work anymore and I wanted a synth for my pod. I already build a VASynth on breadboard but even with the lcd and buttons it often crashed an didn’t work to well. On the pod it seems to work a little smoother for me.
How does the saving work in the moment? Isn’t the encoder used for changing the presets?
As above; turn the encoder a notch right to load, left to save, and click to cycle through the 16 slots. It’s the simplest way to set up load, save, and select patch slot from the one control.
Can I put in a request for you to tackle the sampler module from this project next…?!