Author Topic: Full-Speed NPRN dump crashing  (Read 2990 times)

feijai

  • Team member
  • *
  • Posts: 25
    • View Profile
Full-Speed NPRN dump crashing
« on: July 31, 2017, 06:25:50 PM »
It looks like I can't send a full NRPN dump to the PreenFM2 at full MIDI speed.  It crashes about one times in five.

I'm testing this on my patch editor written for Edisyn, and when I do "randomize" (which sends a random valid patch to the PreenFM2), it'll crash hard at about that rate.  If I force Edisyn to only send out NRPN once every 1ms (ugh) then the PreenFM2 doesn't appear to die.  Keep in mind that MIDI is about one byte every 1/3ms.  This means I have to wait for about two seconds :-( :-( to update a patch, whereas at full MIDI speed it'd be a small fraction of a second.

This looks like a buffer overflow.  All told I'm sending (I believe) 227 NRPN messages, so 908 CC messages or 2724 bytes.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Full-Speed NPRN dump crashing
« Reply #1 on: August 03, 2017, 04:14:38 PM »

You can try to increase the midi in buffer size and see if that fixes your problem :
https://github.com/Ixox/preenfm2/blob/master/src/PreenFM_irq.c#L24

If there's not enough CCM memory anymore try to remove "__attribute__ ((section(".ccmnoload")));"

Xavier