chokes & dies with MIDI buffer overload
  • I know I’m messing around with an extreme case, but I noticed if you send the shruti-1 too much MIDI too fast it will just hang and require a restart…

    I’m sequencing via a bend matrix, just playing around, and the MIDI output can get pretty insanely dense if you want. I was getting some really great interesting stuff but I really have to watch it because settings I make will be trashed if I have to restart…

    Having lots of fun, though, destroying video and sequencing the shruti with the same data…

  • Ahah! Someone else reported a crash and I suspected MIDI overload…

    I will try to reproduce this bug tonight – if I can reproduce it I’ll immediately fix – so you won’t have to worry about it anymore.

    Is there any procedure that works particularly well at crashing it? Does it happen with a specific message type only (CC? NRPN?) or can it also happen with notes (just to rule out a NRPN controller writing random crap in RAM).

  • It’s sending both clock and note data, but ONLY that. It happens when the MIDI data is really fast. What I could do, if you wanted to reproduce it, is record some of the MIDI coming out of my bend matrix in a sequencer and send you a file that should make your synth puke too… ? helpful?

  • Deal.
    You send me a .mid that triggers a problem.
    I send you back a .mid that solves it!

  • OK. having a little trouble recording the MIDI. Playing around with the behavior though. It also crashes when it’s only note-on data. And it seems to only crash when I have greater than some critical number of notes currently on… Seems like it has to be tracking at least 10-20 notes on before it dies…

    If I had to take a guess it’s whatever data structure, a stack or however it’s implemented, used for the voice-stealing stuff. But then I didn’t code this thing…

  • so this should do it. Actually I take back what I said just now. It seems that I can have a dense pattern with lots of held notes, it’s when it goes above a certain rate that it bombs. You’ll notice I left a little dense stuff in the beginning, mine runs for a little while until the tempo of teh pattern increases

    anyway here you go

  • just to reiterate though: it is an extreme case. !!

  • Will have a look at it tonight…

  • Ok, reproduced the crash! having a way of consistently reproducing a bug is 50% of the work in fixing it!

  • It’s actually both: the high rate makes the sequencer/generator drop notes, so we have note ons without matching note offs and there’s a very rare case where it triggers a thing that makes the notes linked list bites its tail (and a never ending loop). Fixing…

  • Fixed…

    The Shruti-1 firmware was not emptying the MIDI buffer fast enough so it overflowed and some bytes from the MIDI stream were dropped. As a result, a 0x00 byte from a velocity message or pitch bend message ended up in the position of a note off message, so the voice (stealing) controller tried to remove a note 0 from the data structure storing the keys being pressed. Note 0 had a special meaning in my code – it meant “free slot”, so a free slot was unlinked from the data structure, which caused in some cases circular links. And an infinite loop in the code traversing the structure.

    Fix: use “note == 0xff” as a special code for identifying free slots in the structure. Also increased serial input buffer size to avoid dropping too much stuff…

  • As an apology for such a nasty bug, you’ll have a new waveform :D

  • Damn Oliver, Nice bug fix schedule.. * CommentTime1 hour ago (reproduced the crash) * CommentTime37 minutes ago * CommentTime10 minutes ago (Fixed…)

  • yeah… truly amazing! now I’ve got to get my bend matrix firmware updated so I can assign whatever note I want to each button…
    exciting exciting

  • I’ll post the update tonight after more tests… at the very beginning the code cross-compiled on OS X/linux and I had unit tests for most of the classes, but I dropped that – I should have kept the testing harness alive… If I had a way of creating test cases with simavr, I would do it.

    The new waveform is a stack of 4 detuned sawtooth waves. Obviously, doing that in the tight space of one oscillator means not using all the anti-aliased wavetable stuff for the saw. So I would not call that a supersaw… But played in the low range it sounds quite fat – the good point being that it can be doubled at the octave or fifth by a PWM’ed sawtooth on the second oscillator, and it sounds quite ambient’y…

  • I agree; kudos to you, pichenettes! I love how involved and attentive you are! Bugfixes, new features…just like that!
    My mouth is watering just thinking about the new oscillators.

  • Wanna try the fix and the new waveform?

    http://mutable-instruments.net/static/firmware/

    That’s the 0.55b file…

  • OK. I’ve uploaded 0.55b and I can happily report that the craziest MIDI I can pump out of the Bend Matrix no longer crashes the Shruti! Thanks!!!

    which is great, because i’m incidentally working on a performance I’ve got next tuesday, involving bend matrix annihalating video with a bent video processor, sequencing an atari synthcart (generating sound and video), and sending MIDI to the Shruti-1 for a 2nd voice. Hope to record the performance and share with y’all

  • yes, that would be great!

  • Yeah, we need some details of this “bend matrix”.

  • http://4mspedals.com/bendmatrix.php

    It’s one of these, except I’ve modified mine to have two MT-8816 crosspoint switches controlled through the single interface. DB-25 outputs on the back accept connections to various circuit-bent/sequencable pieces of mine (currently, 2 video processors, SK1, and atari)...

    It’s also got 1/4”, 1/8”, RCA, BNC, and banana plug connectors…

  • That’s mighty perdy, sir. Mighty perdy.
    Never heard of this bend matrix, but it’s a bender’s dream. The things it does to video is amazing! Thanks for introducing this to me.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion