Replies: 138 comments 290 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.
-
|
Confirmed now in ABL3 and also on the Donner B1 (clone-ish analog) the ENV MOD knob does affect ACCENT, but the DEC knob doesn't affect ACCENT in any way. Having a second ACCENT_DEC control would be nice though, with minimum setting at correct emulation fixed length. In the Phoscyon soft synth there is an ACCENT_DEC control and that is a nice control to have. Likely easier to make that a control while tuning it to proper fixed length anyway. |
Beta Was this translation helpful? Give feedback.
-
|
How about simplifying the envelopes like this to make them easier to deal with?:
That seems simpler, and thus easier to adjust and fine tune later. |
Beta Was this translation helpful? Give feedback.
-
|
On the prior edition of Synthvoice (before that new AD), I had added this scalar to make the ENV_MOD sound more correct: |
Beta Was this translation helpful? Give feedback.
-
|
I can't get focused on the problem right now, and I can't remember what are those corrections for different cutoff values causing unwanted coupling. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for confirming that. Massaged the code some hours more today, and now it sounds much closer to how I wanted it to. Still planning to add a second envelope for Accent though, as it's simply not supposed to be affected by ENV_DEC and because I like having a control for Accent anyway. Thanks again for posting that code and maintaining these nice projects! |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Today been working for hours to eliminate those short click sounds. What I have figured out is that those click sounds seem to only occur on some slide/glide notes (which slide notes may vary depending on BPM). So not seemingly related to accented notes. Only notes that are slide/glide notes. Currently trying different solutions. Any recommendation? |
Beta Was this translation helpful? Give feedback.
-
|
And why do this?: |
Beta Was this translation helpful? Give feedback.
-
|
Did about 9 hours of work on this today to simply try to get that glide behavior functioning proper. Made an elaborate explanation for 3 of the most popular AI models and they all failed HORRIBLY (numerous times). At one point grok 3 did a long analysis for more than 4 minutes and then posted functional (after I edited it), but very wrong code. I made an explainer (without AI) to map the sequence of function calls, so I could isolate where the glides and noteoffs and so on happen. Anyway, here is that map of the sequence of function calls I made before asking the AI to analyze it:
‘void AD_env::retrigger(bool hard) { FUNCTIONS: static void OMNI_do_midi_start() { //send_midi_start(); actually seems to only have been declared, so it doesn’t seem to do anything void OMNI_run_tick() { /* If MIDI is playing, then check for tick / static void OMNI_do_midi_tick() { midi_tick++; //OMNI EDIT: ADDING noteOff halfway between 16th notes: //OMNI EDIT 03272025: } if (midi_tick >= MIDI_TICKS_PER_16TH) { } } ‘OMNI_sequencer_step(byte step)’ contains this conditional: MOST IMPORTANT FOR GLIDES SEEMINGLY: static void instr_noteon_raw(byte instr, byte note, byte vol, byte do_glide) { } static void send_midi_noteon(byte chan, byte note, byte vol) { inline void handleNoteOn(uint8_t inChannel, uint8_t inNote, uint8_t inVelocity) { inline void SynthVoice::on_midi_noteON(uint8_t note, uint8_t velocity) bool slide = (mva1.n > 1); void SynthVoice::mva_note_on(mva_data *p, uint8_t note, uint8_t accent) // shift all notes back This is seemingly the most important noteOn function: // if(OMNI_memories[0].patterns[0].glides[past_midi_step] == 0){ } static void instr_noteon_raw(byte instr, byte note, byte vol, byte do_glide) { // All instruments are monophonic, so noteoff before noteon } |
Beta Was this translation helpful? Give feedback.
-
|
Observations at this point (prior to the mip-map oscillator on S3-regular):
|
Beta Was this translation helpful? Give feedback.
-
|
Ah, I see now that clicks happen in that June edition of S3-regular repo when envelope ramps are too fast over a large range. |
Beta Was this translation helpful? Give feedback.
-
|
That simple diode clipper I made sounds good on saw waves, but not on square waves. I suppose that is because the waves that are more square have more upper harmonics and maybe those are "folding back into" the output samples as fake (alias) lower frequency waves. |
Beta Was this translation helpful? Give feedback.
-
|
Right, but this square wave isn’t so square if it’s an accurate emulation.
Is it actually a normal square wave in this emulation?
Using a soft clipper had more of a consistent effect on both waves,
although hard clipper sounds better on saw wave. May make a toggle to
switch between those, for now.
…On Sat, Aug 16, 2025 at 5:20 PM copych ***@***.***> wrote:
The matter is that simple clipper has almost no affect on a square signal,
cause clipping by its nature is making any signal square, while square
signal is already of this kind.
—
Reply to this email directly, view it on GitHub
<#30 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJ7JDSWM5X4NU4OG4MYRMD3N3STZAVCNFSM6AAAAAB7P2HRIGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMJSGQ3TAOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Hi! Today tried adding this to SynthVoice::getSample() to boost the reso on accented notes, but it seems maybe that is too much for the CPU to handle. Is that why didn't include accent modulation of resonance before?: |
Beta Was this translation helpful? Give feedback.
-
|
I had tried that also. and it was still a little noisy. I guess I can
remove the MIDI CC middleman call to make it more efficient and see how
that sounds though.
Obviously the P4 should make it possible to do that on every sample, add
more effects, and A LOT more than that also.
…On Mon, Aug 25, 2025 at 7:05 PM copych ***@***.***> wrote:
You shouldn't compute this for every sample, just set this in control
thread on noteOn
—
Reply to this email directly, view it on GitHub
<#30 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJ7JDSFHODBOAQRLNAKBKD3PLNW7AVCNFSM6AAAAAB7P2HRIGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMRQHEYDAOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
By the way, if have any friends in russia with access to buttons to launch nukes to nuke china, tell them that sadly too many chinese are evil and china ABSOLUTELY should be nuked TODAY. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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