No announcement yet.

Creating Midi out to light LEDS

  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating Midi out to light LEDS


    What I am trying to do is permanently light up my controller's LEDs (A&H Xone: K2)
    I am using Serato, which doesn't have a midi out, so I must use Osculator to light them up.

    What I currently have is the raw midi data, that is then fed back directly to the K2.
    This works, but it only light up the button when I press it.

    What I want is the opposite, I would like it to stay lit all the time, and go out when pressed. (i.e, invert the midi data)

    Is there any way of doing this in Osculator?

    (please find my OSC file attached)


    Last edited by KD1011; 04-10-2012, 08:10 AM.

  • #2
    Hi KD,

    In the attached file, I can see your are feeding a MIDI output directly into a MIDI input.
    Is that what you really want?

    This means that you transmit exactly the same data that comes on the input to the output. If you want to have a control on the MIDI data, you need to display what is in the raw stream and "interpret" that data. You will then be able to transform the specific MIDI CCs you are looking for. In this case, it should only be a matter of switching the Output Min and Output Max values.



    • #3
      hi Cam,

      What i really want is for all the buttons to stay lit all the time.

      I tried to interpret the data, but I wasn't able to make any of them light, even when pressed.

      Can you tell me how to do this?

      Edit: On the Xone K2, to light a particular button, you just send back the same midi note, (i.e a button that transmits C2, lights up with C2)

      Thanks, KD
      Last edited by KD1011; 04-10-2012, 10:10 AM.


      • #4
        ok, I understand.

        Are you trying to force your controller to turn off the leds instead of turning them on?
        I am almost sure you can not do this. This sounds like an option that you should be able to toggle on or off, and if the manufacturer of your controller has not anticipated this possibility, then you are out of luck.

        Also, there is no way to change the behavior of the leds all at once because MIDI does not specifiy what message is a LED or a fader or a button, therefore you'd have to do this for each LED one by one.


        • #5
          I'm not trying to force my controller to turn off it's LEDs, they are off by default.

          I want them to light up, and only when pushed, do I want them to turn off (momentarily)

          This is how it should work:

          1) Osculator permanently sends a Midi note to K2 (which lights up the button)

          2) When the button is pressed, the K2 sends a particular note to Osculator, Osculator then ceases to send the same note back to the K2 (meaning the LED goes off temporarily)

          3) Once the button is no longer sending a midi note to Osculator, Osculator will once more send the note back to the button, (lighting it up)

          Hopefully this should clear up what I'm trying to achieve.


          • #6
            I am sorry, I have no idea of how to do this, I am not syre if OSCulator is the right tool for this job. But here's something you can try:

            So you have this message /midi/note/15, which represents the notes sent from your controller on channel 15.

            Assign a event of type "Note Params" on the pitch, and choose as the Value "Pitch". Do the same for velocity, and for trigger, assign an event of type "MIDI Note w/ Params", and choose /midi/note/15 as the value.

            Finally, go to the Scaling Page (Command-F or choose View->Flip to Scalings Page) and invert the output min and output max values (that is, output min should be 1.0 and output max should 0.0).

            This means that when OSCulator receive a note-on, it will generate the same note but off, and vice-versa.
            Let's hope it works!


            • #7
              THANK YOU!

              Your idea seems to have worked, but the lighting is in reverse, i.e It lights up when pushed.

              When I try to invert the scaling, it doesn't seem to work quite right, which is strange...
              Other than that, Thank you so much, this is alot cleaner than what I was trying only a few minutes before...

              Here's my file WITHOUT the scaling adjustment:

              K2 V2.oscd


              • #8
                Good, I see you have adjusted the MIDI channel to 15, which is something I forgot to mention.
                At this stage, I think it would be useful to have a look at the documentation of the device, maybe there is something that explains when led are on and when they are off so we can generate the exact MIDI we need.


                • #9
                  I have the manual right here:

                  As far as I can see, If Osculator can make the right button light up temporarily, I'm not sure why it can't be reversed :S

                  Here it is:


                  Once again, thank you so much for your help!


                  OK, From testing with midi monitor, it appears that Osculator is sending a 'note off' back to the K2, I think this might be the problem?
                  Last edited by KD1011; 04-10-2012, 11:04 AM.


                  • #10
                    Your welcome, and yes, the documentation is very sparse on that subject.
                    It does not suggest a way to turn the leds off. And each color corresponds to a different MIDI note. Would that mean that the LED are only turned on temporarily?


                    • #11
                      Yep, currently, the LED turn on only when the corresponding button is pressed

                      Here's what I think is the problem, from watching midi monitor:

                      Right now:

                      Xone K2 sends note on, Osculator send note off = GOOD
                      Xone K2 send notes off, Osculator sends note off = problem

                      What should happen:
                      When K2 sends note off, Osculator sends note on, not note off.

                      Could this be the problem?


                      • #12
                        Ahh, I think I know what happens.
                        If the velocity is 0, I think OSCulator sends a MIDI note-off message.
                        Can you try to see what are the exact velocity values, or try to simply invert their scale as well?


                        • #13

                          Very weird, If I invert velocity as well, it works perfectly, but only for a particular button, the moment I press another, it goes out.

                          The buttons are not velocity sensitive, they go from 0 to 127 (on/off)

                          here's a screenshot of midi monitor, when I press one button (C1), then another (C#1).
                          Screen Shot 2012-04-10 at 7.20.38 PM.png

                          It seems Osculator is sending a note off for C1 twice, meaning only one button is lit at a time.


                          • #14
                            Weird, it seems the pitches are shifted.
                            Have you changed the pitch scaling inadvertently?


                            • #15
                              I think that might be Osculator turning off a button I had pressed earlier, in this case B0...
                              Pitch scaling is unchanged.

                              Here's me pressing C1 twice, then C#1:
                              Screen Shot 2012-04-10 at 7.29.16 PM.png