How do you avoid MIDI feedback?

Home Forums General General MIDI discussion How do you avoid MIDI feedback?

Tagged: 

Viewing 6 posts - 21 through 26 (of 26 total)
  • Author
    Posts
  • #71871
    Mr.ToR
    Participant
      • Topics: 7
      • Replies: 51
      • Total: 58

      I’ve been working on a panel for a Roland MKS-80.
      MKS-80 squirts out SysEx when you change a tone parameter or a patch program.
      Panel can detect and relevant modulators are updated.
      I have a Method called SysExReceived which first disables midi output, then does its thing with the received messages and at the end enables midi back again.
      — Disable MIDI-OUT
      panel:setPropertyInt(“panelMidiPauseOut”,1)

      — code here —

      — Enable MIDI-OUT
      panel:setPropertyInt(“panelMidiPauseOut”,0)

      The SysExReceived method is called from panel’s ‘luaPanelMidiReceived’ handler.
      This works very well to stop the panel from sending the received stuff when modulators are updated. However this works when the data is initiated from the synth. This is half of the problem. I can avoid synth to get back what its sending.
      The problem is just the opposite. When a modulator value is manually changed, it sends the relevant data, synth updates it but because a tone parameter has changed on the synth, it squirts our relevant SysEx data to who might be listening, in our case back to us. 🙂

      With the SysExReceived trick, since i’m doing the receiving with code, and updating all modulators with code as well, i can controll the modulators not to send aynthing during execution of the code.

      The problem is, when a modulators value is manually changed, i’m not controlling the sending operation so i can not do a stop receiving while sending 🙁

      i would appreciate any help on this matter.

      Thnx

      • This reply was modified 6 years, 11 months ago by Mr.ToR.
      #71929
      opuswerk
      Participant
        • Topics: 7
        • Replies: 102
        • Total: 109
        • ★★

        @Mr.ToR: Are you using many uiCombo boxes? I believe the panelMidiPauseOut is broken for those. This might be what’s causing the feedback. i’m currently trying to wrap my head around this issue myself for my MKS70.

        http://opuswerk.tumblr.com
        www.soundcloud.com/opuswerk
        www.facebook.com/opuswerk

        #71930
        human fly
        Participant
          • Topics: 124
          • Replies: 1070
          • Total: 1194
          • ★★★★

          MrTor, i just tried that, very cool, thanks – idea for the day..
          it at least stops my panel from sending out a MIDI message while
          my temporary reset button does its stuff.

          #71931
          human fly
          Participant
            • Topics: 124
            • Replies: 1070
            • Total: 1194
            • ★★★★

            just a thought: how does MIDI Thru work?

            some logic? are you sending sysex via ‘MIDI message’?
            if you use ‘lua modulator value changed’ and pause MIDI receive
            while method is sending sysex?

            #71935
            Mr.ToR
            Participant
              • Topics: 7
              • Replies: 51
              • Total: 58

              In my case, actually, I don’t have any problems with either
              panel:setPropertyInt(“panelMidiPauseOut”,1)
              or
              panel:setPropertyInt(“panelMidiPauseIn”,1)

              I have many comboBoxes and sliders.

              Here is how my panel looks for now.
              https://goo.gl/photos/preZiaPazi5VRocT6

              I’m thinking of using the ‘luaModulatorValueChange’ to run a method that will disable the MIDI input and enable back in 10 or 20 ms with a timer.
              The problem is, I don’t know which happens first, as in ‘luaModulatorValueChange’ or Modulator MIDI message out.
              If ‘luaModulatorValueChange’ is before Modulator MIDI message out, then this should work.
              If Modulator MIDI message out is before luaModulatorValueChange then maybe we should try ‘luaModulatorGetValueForMIDI’ since it is for manipulating the MIDI value to be sent, so it is definately before sending that MIDI 🙂 We don’t need to change anything about the MIDI value but from there we can enable panelMidiPauseIn for a duration like 10ms. or 20ms. and that should fix midi loopback.

              Also one other thing to try would be to change the MIDI Input Device to NONE instead of using panelMidiPauseIn.

              I’m working on the library data handling functions of my Panel so there will be some time before I can try these things.

              Please post here if anyone tries it 🙂

              #71963
              human fly
              Participant
                • Topics: 124
                • Replies: 1070
                • Total: 1194
                • ★★★★

                look at:
                https://sourceforge.net/p/ctrlrv4/code/HEAD/tree/nightly/Source/Core/CtrlrModulator/CtrlrModulator.h#l166

                ‘getRestoreState

                return true if the modulator is in restore state, otherwise false.
                In restore state no MIDI is transmitted’

                what is ‘restore state’ -by definition – ?

                a function you see a lot for ‘panel loaded’ methods is:

                — –This variable stops index issues during panel bootup
                — if
                — panel:getRestoreState() == true or
                — panel:getProgramState() == true
                — then
                — return
                — end

                i don’t really know how to use this, or what return does here.
                (eg: what index issues does this refer to?)
                are there other posts here that talk about this?

                if you can put any modulator/component into MIDI in or out
                suspend by making its individual restore state ‘true’, you
                don’t have to disable the entire midi bus, only components
                you selecty…?maybe?

                MrTor, that file is worth close examination, look at comments.

              Viewing 6 posts - 21 through 26 (of 26 total)
              • The forum ‘General MIDI discussion’ is closed to new topics and replies.
              There is currently 0 users and 64 guests online
              No users are currently active
              Forum Statistics
              Threads: 2,495, Posts: 17,374, Members: 77,605
              Most users ever online was 12 on January 22, 2019 3:47 pm
              Ctrlr