Is it possible to thin data or add a delay between CC messages in streams ?

Home Forums General Programming Is it possible to thin data or add a delay between CC messages in streams ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #85173
    zmix
    Participant
      • Topics: 9
      • Replies: 65
      • Total: 74

      I’m working on a panel for a MIDI controllable guitar pedal (the “Thermae” by Chase Bliss Audio), and having issues where it will stop responding to CC data. The designer suggested that it’s possible the pedal’s MIDI buffer is overflowing and suggested I insert a delay between messages. I can see that there is a provision for doing this when sending SYSEX data, but is it also possible when sending CC data?

      #85175
      daimondamps
      Participant
        • Topics: 8
        • Replies: 80
        • Total: 88

        You could use a Timer and a table of CC messages. When timer reach max count send the message and restart the timer. Add + 1 to table counter.

        function timerStart()
        
        	timer:setCallback (4, queryNextParametersFromList)
        	timer:stopTimer(4)
        	timer:startTimer(4,timerQueryTime)
        	console("TimerStart")
        end
        function queryNextParametersFromList()
        
        	local isConnectedBtn=panel:getModulatorByName("StartComm"):getValue()
        
        	if isConnectedBtn ==1 and isMessageProcessed==true then
        
        		
        		queryCounterUpdate()
        		sendMidiSysex(queryList[queryIndex])
        		
        
        	end 
        end
        function queryCounterUpdate()
        
        	if queryIndex<queryListSize then
        
        		queryIndex=queryIndex+1
        
        	else 
        		
        		queryIndex = 1
        
        	end
        
        end
        • This reply was modified 5 years, 7 months ago by daimondamps.
        #85183
        zmix
        Participant
          • Topics: 9
          • Replies: 65
          • Total: 74

          Excellent advice, thank you!!

          #85222
          Puppeteer
          Participant
            • Topics: 16
            • Replies: 185
            • Total: 201
            • ★★

            I had to do a similar thing for my Jupiter 8 plugin.

            What I ended up doing was essentially not having the controls send MIDI directly.

            I set up a timer that sampled all parameters at a set rate. If they had changed since the last sample, I sent out an update.

            It’s important to implement the timer in a callback otherwise the panel will be frozen until the timer expires.

            The Puppeteer
            http://godlike.com.au

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The forum ‘Programming’ is closed to new topics and replies.
          There is currently 0 users and 85 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