Replies: 109 comments 236 replies
-
I am definitely not able of debugging the provided code, but I can roughly describe the process of building an Arduino project. All the ino modules are joined into one file. First goes the file with the project name, all the others are joined in alphabetical order. Header files are processed after processing # directives, so #defines should be in effect already. C and cpp files are processed separately. Libraries can be cross-referenced directly from each other. |
Beta Was this translation helpful? Give feedback.
-
For example, the first compiler error: So I renamed general.ino to general.c and added some declarations, but then general.c couldn't find "Drums" after that in the AcidBox.ino because I guess .c files don't automatically get access to .ino files or some such nonsense. Really the Arduino IDE should get rid of the .ino format seemingly. That format seems to cause coding messes. |
Beta Was this translation helpful? Give feedback.
-
About the mentioned error, I see some ways of fixing.
|
Beta Was this translation helpful? Give feedback.
-
Alright, I stripped it down to only one synth and discovered that the slowness is seemingly an issue with assigning tasks to different cores. I don't know if touchscreen synth sliders and knobs are possible on ESP32 in Arduino IDE because of that limitation, unless using RTOS tasks assigned to specific cores. That is A LOT more involved than I had hoped and it seems maybe easier to simply port that diodeladder filter from soundpipe and make a more efficient synth with that and a diode clipper and basic reverb and delay. Anyway, wish the results had been better. I imagine it will run on an ESP32-P4 touchscreen, although still likely necessary to put GUI on another core for touchscreen sliders and knobs to function properly at full app speed. |
Beta Was this translation helpful? Give feedback.
-
To my mind, touch gui is too much for the single esp32. I'd add another mcu for gui and control. Communication can be midi or whatever. |
Beta Was this translation helpful? Give feedback.
-
That "vibrato" frequency of the noise in background of the synth (oddly ONLY when amp is on and it changes in volume with the synth) is turning on and off at the interval the display GUI refreshes. Still hoping there is some way to use one of the amp declickers or other parameter in the project to solve that, so recommendations on how to are welcome. Tomorrow may look at putting the GUI on whatever core the synth isn't running on. |
Beta Was this translation helpful? Give feedback.
-
I think that under the hood GUI library also creates RTOS tasks with some given priority, so they compete for the processor ticks. And if you want them to run on one ESP32, you'll have to figure out what task runs where. |
Beta Was this translation helpful? Give feedback.
-
I did try that moog ladder filter yesterday. Sounded better (more appropriate than expected, although maybe because of the overdrive and wavefolder). I don't know what the wavefolder does, although it sounds pretty similar to a diode clipper when combined with that overdrive. Honestly that diode ladder filter emulation and diode clipper that were ported to soundpipe are likely more efficient when those are used together solo, to produce a similar sound. I am being more kind to My body today and this weekend, so I may have a go at porting one or both of those later in the weekend or next week. Yesterday I also tried putting the GUI calls on audiotask1 and then audiotask2 also, but neither actually ran. Had put it in before the while loops, so maybe that wasn't the correct place. Anyway, later today may do some experiments with putting processes on specific cores. I assume if I put the synth's audiotask on the same core as the ESP tasks, then the GUI code would run on the core I assign to run the arduino code. That should eliminate the periodic silent points in that background noise, but I don't know where that background "amp noise" is coming from. Any theories? Although I already deactivated a lot of things and looked through a lot of that code, I am not a DSP expert yet so there were some things I am still learning about. I am thankfully pretty expert at music production and synthesis though, and have built an electronic synth (and various oscillators) from scratch, so I suppose learning DSP style C for a week is a worthwhile investment so I can make synths without having to trudge through codebases. I know that a transfer function is basically mapping a change in frequency amplitudes (and phase offsets?), but I am still learning how to do that with discreet samples. |
Beta Was this translation helpful? Give feedback.
-
I recommend you to look through this example https://github.com/copych/ESP32-dualcore-i2s . This is what I wrote to understand how to use both cores for sound synthesis. |
Beta Was this translation helpful? Give feedback.
-
Tonight THANKFULLY got that functioning after made a new GUI task and put it on one core and the synth on the other core. OBVIOUSLY have looked through most of the codebase, but still haven't found WHERE to find that HORRIBLE automated volume level in acidbanger. WHERE THE F is that??? That volume modulation is SO annoying. I don't know if I know of any popular commercial song that has ever changed the volume of such a synth dynamically. Usually there is CO knob modulation, but NOT the volume knob. Partially because the volume knob included overdrive at the top of the volume. By the way, most club sound systems (pretty sure anyway) are monophonic. |
Beta Was this translation helpful? Give feedback.
-
Probably this is a compressor gained by a sidechain. Check the end of the mixing routines. |
Beta Was this translation helpful? Give feedback.
-
I mapped an encoder to Synth1.SetCutoff(); and that is thankfully functioning. I tried mapping the SetAccentLevel, but it didn't seem to do anything in the 0 to 1.0 range. Is the range much larger or does the jukebox very rarely add any accented notes? And is already a function to change the entire volume level of the Sampler (Drums)? Thanks in advance👍🏻 |
Beta Was this translation helpful? Give feedback.
-
Check midi_config.h for the assignments |
Beta Was this translation helpful? Give feedback.
-
Recommend how best to adjust the compressor or filter so it doesn't do the standard bass/volume attenuation when resonance is high? Some filter emulations have a bool or var to control that seemingly. Most producers use a compressor. And yes, talking about when the CO knob is turned up and reso is high. |
Beta Was this translation helpful? Give feedback.
-
By the way, now with control over the CO and od and disto, it sounds nice generally (aside from some attenuation when reso is high, but that is what the analog circuit sadly does also...thus compressors). Main thing that seems to need to be tuned sound-wise is the accent. Can explain some about how the accent emulation is designed? Saw there is Accent Level and "accentation". What are those? By the way, the worst part of the Korg volca bass is the added "attack" control. Recommend removing that ramp from acidbanger, because changing that param from 0 or near 0 certainly doesn't seem to make "bangers". |
Beta Was this translation helpful? Give feedback.
-
EDITED because still comparing sound and adjusting parameters. |
Beta Was this translation helpful? Give feedback.
-
To make the synth tuning more convenient it would be wise to exclude multiple compilings just to change some variable a bit. For that case there is a |
Beta Was this translation helpful? Give feedback.
-
Actually seems that the resonance control has a cap to prevent it from going beyond a certain point, so about 1.0 to 1.5 seems to be max possible. There is likely a line I can change somewhere in the filter or synthvoice to allow more reso though. |
Beta Was this translation helpful? Give feedback.
-
So tired of the jooz' wars. Sigh...2 of them happening in different parts of the World. That international cabal MUST BE STOPPED!!! (Edited to prevent any from that cabal from false flagging the thread, as they sadly have rampantly censored youtube and so on) |
Beta Was this translation helpful? Give feedback.
-
So is that resonance code to edit to get more resonance likely
|
Beta Was this translation helpful? Give feedback.
-
Sigh...tuning an emulation of that analog synth is kind of silly beyond a certain point, because most of the analog synths sound slightly different anyway. When I changed something to make it sound more "accurate", sometimes I maybe don't actually LIKE how it sounds more than how it did before. Regardless of it being a more "accurate" emulation. |
Beta Was this translation helpful? Give feedback.
-
Yes, this guarantees that the whole midi cc range 0-127 will fully map to 0-1 range for the filter input. Line 102 of rosic_TeeBeeFilter.ino
you can try to push the limit and apply some multiplicator to the resulting PS. I've tested it with a pot, and my ceiling was about 1.02f for the mentioned multiplier, after that it became unstable. Difference though isn't that great |
Beta Was this translation helpful? Give feedback.
-
Thanks! I may have a look at that later today.
|
Beta Was this translation helpful? Give feedback.
-
Recommend easiest way to add a boost to the amp envelope on accented notes in GetAmpEnv()? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Is setting that CC dec at 30 in do_midi_start() an estimate of dec at max on a standard roland, or...? |
Beta Was this translation helpful? Give feedback.
-
Does a note with a slide on it, and either a 0 note or the same note on next step do the same thing as a td-3's whole note? I guess by default all the notes in acidbox are whole notes. I added half notes, and it seems likely that using a slide that way should make a "whole note". Seems weird that roland would have included a whole note option if slide did that already though. |
Beta Was this translation helpful? Give feedback.
-
Wow, the call list to play a note, starting at acidbox.ino, is about 9 or 10 functions deep. I guess there was a lot of "separation of concerns" going on in that code. |
Beta Was this translation helpful? Give feedback.
-
I tried to implement the logics described here https://www.antonsavov.net/articles/303andmidi/ . AcidBanger at first was chosen just because it already could produce a lot of different events to test the sound and to debug AcidBox. I suspect that you'll have to either double the pattern to 32 steps, or at least to double the midi ticking, cause AFAIR I've minimized it to the 1 tick per 1/16 note... (but maybe not) |
Beta Was this translation helpful? Give feedback.
-
BTW, it seems that I've managed to fit all the stuff onto a single core, so it opens a field for experiments. |
Beta Was this translation helpful? Give feedback.
-
Tonight stripped out 1 of the synths and after that was functioning nicely, had a go at adding a GUI by merging a functional LVGL GUI ui.ino file with that functional AcidBox.ino. Sadly that caused Me to find out about what a horrible mess the Arduino IDE can apparently be, as the IDE stopped being able to include the code in the other AcidBox files. Apparently it's a known problem with #includes in some Arduino projects. First the compiler couldn't find function definitions in the other files, then when renamed that other file to .c and added an #include statement for that file, then it couldn't find #define preprocessor directives in config.h. And it sadly seemed to be a HUGE LONG MESS of similar compiler disaster after that.
Some info:
https://forum.arduino.cc/t/define-and-include-directives-in-arduino-ide/187059/32
Here is the AcidBox.ino that the Arduino IDE was having problems with. I thought it was going to be (IT SHOULD HAVE BEEN!!!) vastly easier to simply merge in that ui.ino, before that compiler mess happened:
Beta Was this translation helpful? Give feedback.
All reactions