Midi IN activity led

Home Forums General General MIDI discussion Midi IN activity led

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #69740
    Sylvain Fortin
    Participant
      • Topics: 3
      • Replies: 11
      • Total: 14

      I search how to make a MIDI IN activity led.
      Where to start?
      What is component?
      I need LUA?
      I started like that but how to complete?
      Thanks

      Attachments:
      You must be logged in to view attached files.
      #69744
      goodweather
      Participant
        • Topics: 45
        • Replies: 550
        • Total: 595
        • ★★★

        Hi/Bonjour,
        you will need Lua for sure but what do you want to achieve?
        A LED lighting ON when a Midi msg is received? When should it turn OFF (midi messages are going very fast)?
        Should it react on all messages or only on some?

        The general principle should be:

        • create a uiImageSlider modulator with a png image containing the LED ON and the LED OFF (vertical stacked
        • create a method MidiMessageReceived that you attach to the panel property “Called when the panel receives a Midi message”
        • In that method, you can build an if…elseif..elseif…end structure to sort the messages received based on their length or some byte
        • within each elseif you can decide to set your LED uiImageSlider value to 1 and you could launch a timer to leave it on for x ms
        • In the timer method, you stop the timer and set the LED value to 0 which will change the picture of the LED so it shows OFF

        For the LED, look at my Step by step guide

        Good luck…Dominique

        #69745
        Sylvain Fortin
        Participant
          • Topics: 3
          • Replies: 11
          • Total: 14

          Hi goodweather
          First, thanks a lot for your great help !

          I want to achieve 16 independent leds. One for each channel.
          The led of first channel will goes on when MIDI msg are receive on channel 1 and goes off with no activity. CC With NOTES and others are rejected.
          The result is like pulsing led. “000101011110101000000010100101”

          And i have to read the huge work of Step by step guide…
          Some interesting hours in front of me.
          😉

          #69748
          goodweather
          Participant
            • Topics: 45
            • Replies: 550
            • Total: 595
            • ★★★

            Then you can proceed as I explained above…

            • 16 uiImageSliders components (1 by LED)
            • 1 LED image with 2 frames (On/Off)
            • MidiMessageReceived method reacting on the messages you want (if…elseif…) and within each “if” a call to another function that you give the LED number in argument. This function would change the value of the LED whatever On or Off. The advantage of a separate function is that you need to code the if channel==1 then elseif channel==2 then… only once 🙂

            FYI,I’m busy to write Step by Stepo guide 2.0 and it will be probably 3x bigger because full of Lua explanations…

            #69751
            Sylvain Fortin
            Participant
              • Topics: 3
              • Replies: 11
              • Total: 14

              Hi goodweather,
              With your help and your great information i go to read and test with error.
              In this method i will learn more.

              Thanks a lot
              Hi-tech

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