Superseded: Bees-in-the-Trees 3.z: the post-antepenultimate v3 release candidate


hey if anybody volunteers giving me a quick introduction to how this works and tells me where I can find a proper programmer FTDI-board, I’m in! But be warned, I tend to brick things :slight_smile:


sixty_n andrumpelfilter, just give me a day or so to try to track down the cause of the crash reported by Bmhot, and to finish implementing the meta-sequencer, and then I’ll send you links to updated WAV files. The proof-of-concept for the meta-sequencer works nicely: you can specify four oscillator models (MSQ1 to MSQ4) in the settings menu. Then when the meta-sequencer mode is enabled (MSEQ=ON), each time a trigger is received on the trigger input, the oscillator model advances one step in the sequence of models you have specified. I’ll extend it to a sequence of eight models, and add a few other elaborations, but it is pretty nifty if I say so myself. I haven’t pushed any of this code to GitHub yet.


many thanks, the mseq does sound like a nifty addition to what is already a super nifty job by yourself


BB, I think I just ran over the same META mode bug thatbmhot found. META mode with MOD1 and MOD2 in LFO mode. Picture of the module enclosed. Looks like it crashed while in or switching to a VOSM/VOWL/VFOF patch. @bhot, what was on your front panel when the Braids crashed? This bug looks repeatable. After power cycling my rig and letting things play for a while, I had another crash. See pic #2. Time to reboot and try for 3 out of three. My kingdom for a console and instrumented code! Loving what you’ve done though…


Not seeing those pictures, let’s try again


stevenb, OK, thanks - but no pictures attached.stevencrichton has also reported crashes (as has Bmhot), although in his case it may be related to the random envelopes - I looked at the code I wrote for that and realised it was quite wrong, but happen to give the desired effect by chance. I’ll re-write that… But yes, there quite a lot of overhead when switching into some of the oscillator models, as various things are initialised, and that may be too much for it. In fact, even with the factory firmware, you can here pops and clicks when in META mode in some circumstances as the audio buffer undress while the new model is initialised. But the factory firmware doesn’t completely crash, and B-in-T shouldn’t either. Several solutions spring to mind. One thing I will try is to render the internal modulators less often. At the moment, they are rendered for every iteration of the main RenderBlock() loop, which runs at 4kHz (I think). That allows the LFOs to go up to low audio rates, but that isn’t really necessary - they are supposed to be LFOs, or envelopes, not sources of audio rate modulation. Rendering each of the LFO/envelopes on alternate cycles of the main Render() loop would probably suffice, and should reduce the CPU load imposed by them by one half. The other strategy is replace one of the LFOs/envelopes with a step sequencer, that steps each time a trigger is received on the trigger input. I’ve already done a proof-of-concept of that for stepping through a user-defined list of oscillator models, as mentioned above, and it works a treat. That should also dramatically reduce CPU load. If CPU load is actually the problem, that is…


OK, see the pictures now. As you said, it looks like the UI class was in the middle of spelling out VOSM or VOWL when it turned up its toes.


Bmhot, thanks for the video! It looks like both you and stevenb have encountered the same problem. I think I have enough information now to reproduce it, and then try to fix it. I'd suggest that you go back to the latest version of the 1.7 factory firmware for now, and I'll spend some time on the problem this weekend. Many thanks to both you, andstevenb, and @stevencrichton for your testing efforts, much appreciated!


I’m able to reliably replicate the crash in META mode when both LFOs are running. Now to try to fix it…


Great! At least I am not just a hamfisted buffoon :slight_smile:


The best product testers are hamfisted buffoons… Much refactoring of the main RenderBlock() is now underway, to try to make all the code I have added to it more efficient. If that fails, then one LFO will have to go, but I’ll add a step sequencer with similar features in its place.


In case you needed any more data points…

  1. I had MOD 1&2 on and set to LFO and ⇑SH1 ⇓SH1, and ⇑SH2 ⇓SH2 were all set to RNDM
  2. FMCV was set to META
    Last night I turned down the FM knob some after a reboot and did not see crash. I Let it play for 45 minutes. Came home from work tonight and turned up the FM knob. Started modulating and after about 5-10 minutes, a crash.


@stevenb, I think I’ve fixed it. It was a stupid typo which resulted in MacroOscillator parameter_2 (color) going out-of-bounds. It didn’t have any effect on most of the oscillator models, but it caused VFOF to hang. I’ll just do a bit more QA on it then push it to GitHub and send you and the other B-in-T testers links to fresh WAV compiled firmware files.


OK, I have pushed Bees-in-Trees version 3w to GitHub. There is now a simple meta-sequencer. There are eight steps in the sequence available, and the sequence is advanced by triggers received on the trigger input jack. The MSEQ setting enables the meta-sequencer. The value, from 1 to 8, sets the number of steps. The settings MSQ1, MSQ2…MSQ8 allow the oscillator model for each step to be chosen. The settings MSL1 to MSL8 set the number of trigger inputs that each step is held for - they all default to 1. Thus, MSL3=3 means that the sequence of oscillator models will stay on step 3 for 3 input triggers. Thus a rhythm of oscillator models can be set up, even when the triggers come from a regular clock signal. Note that if MSEQ is enabled, then FMCV=META mode is overridden.


Excellent! I have a few hours of playtime scheduled for tomorrow morning. Let’s see what we shall see. Look forward to the META Sequencer stuff. Great fun to be had with that one. I’ve been driving the FM input with a sequencer output to get control of the sound changes. Being able to do that internally and in time is cool.


Bees-in-Trees version 3w in my braids via .wav file, test with META mode, no crash, everything is ok, nice fix
let’s test the the meta-sequencer :wink:


@Bmhot, I am much relieved that it doesn’t crash any more, The meta-sequencer is very simple but it’s all that would fit in the remaining space.


@BB, things look stable here too. No crashes. One request would be for a “silent” choice for each step in the meta sequencer. Great fun, thanks!


@stevenb, glad you couldn’t crash it. Hmmm, the “correct” way to implement your suggestion would be by adding an oscillator model called ZERO, which fills the buffer with zeroes… that might be within the bounds of my very limited DSP coding skills… (Olivier has actually already provided exactly such a model in comments in the source code, as scaffolding for user-defined models. We’ll just use the scaffolding…)


OK, I have pushed Bees-in-Trees version 3x to GitHub. It adds the ZERO oscillator model, which renders silence. I have sent PMs to testers with links to the compiled WAV files for it.