Marxon Posted December 21, 2013 Report Share Posted December 21, 2013 Hi all, To be short: :happy: I have five leds. Each one controlled by a midi note. EVENT_LED id=1 type=NoteOn key=1 chn=1 EVENT_LED id=2 type=NoteOn key=2 chn=1 EVENT_LED id=3 type=NoteOn key=3 chn=1 EVENT_LED id=4 type=NoteOn key=4 chn=1 EVENT_LED id=5 type=NoteOn key=5 chn=1 Now i want that led 1 - 4 only turn on if the appropriate key and key 5 are received at the same time. I think the best way is to use Sender_ and Receiver_ instead of Led_events. But i dont get it working. May someone can help me out? Thanks a lot! Best regards Marxon Quote Link to comment Share on other sites More sharing options...
TK. Posted December 21, 2013 Report Share Posted December 21, 2013 The problem is, that events are never received at the same time. There is always a sequential order which is controlled by the MIDI device which sends the events, and this has to be considered when working with conditions. If the order is randomly (e.g. because the keys are played by a human ;-)), then I don't see a proper way with the existing MBNG functions. Therefore the question: is the order - and maybe also the events which are sent - under your control? Resp. what is your exact use case? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Marxon Posted December 21, 2013 Author Report Share Posted December 21, 2013 (edited) Hi Thorsten, this is my situation: led id=5 is a blinking "beat" led to visualize bpm which gets triggered with a repeating midi note Key=5. Now, if i send midi note Key=1 then i want led id=1 to blink at the same speed like led id=5 and turn off if i release Key=1. If i send midi note Key=2 then i want led id=2 to blink at the same speed like led id=5 and turn off if i release Key=2... This should be no big "timing issue", right? Edited December 22, 2013 by Marxon Quote Link to comment Share on other sites More sharing options...
TK. Posted December 22, 2013 Report Share Posted December 22, 2013 Sorry, I don't see a solution for this. It would require logic combinations in the EVENT conditions, and recalculations on each incoming event. Such a customization would require a dedicated firmware enhancement, or (what I would prefer) direct control of the LEDs from the host side. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
kpete Posted December 22, 2013 Report Share Posted December 22, 2013 This could be done with some external IC's gates rather than software changes. From the Dout board, connect 4 of these outputs to the input of 4 "OR" gates. Then take the single BPM output (LED5) and connect it to each of the gate inputs. Now take the output of the 4 gates and connect them to the LED's with resistors. If you wanted to send Midi messages, just connect the gate outputs to 4 inputs of a Din board. Its not an elegant solution but should work as you described. Pete Quote Link to comment Share on other sites More sharing options...
Marxon Posted December 22, 2013 Author Report Share Posted December 22, 2013 Thanks for your suggestion Pete! Using a hardware workaround is a good idea. Google will know it for sure. But some minutes ago i ad this idea: What if i use the BPM output to cycle between two banks? EVENT_LED id=1 type=Meta meta=CycleBank EVENT_LED id=2 hw_id=2 bank=1 type=NoteOn key=2 chn=1 Rgb=15:0:0 EVENT_LED id=3 hw_id=2 bank=2 type=NoteOn key=2 chn=1 Rgb=0:0:0 Quote Link to comment Share on other sites More sharing options...
TK. Posted December 22, 2013 Report Share Posted December 22, 2013 Yes, this should work as well! :) But please take AND gates, otherwise the LED would be active if either key1 OR key5 is pressed. Best Regards, Thorsten.Clever! But CycleBank is not the right meta event, because it could get out of sync with the key5 activation. SetBank would be better Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
kpete Posted December 23, 2013 Report Share Posted December 23, 2013 But please take AND gates, otherwise the LED would be active if either key1 OR key5 is pressed. Best Regards, Thorsten.. The reason I indicated to use the OR gate was because I thought that the LED's turned ON when the shift register output went to 0 volts (active low). My mistake here. Pete Quote Link to comment Share on other sites More sharing options...
Marxon Posted December 25, 2013 Author Report Share Posted December 25, 2013 Clever! But CycleBank is not the right meta event, because it could get out of sync with the key5 activation. SetBank would be better Best Regards, Thorsten. Ok i will give it a try. Post results tomorrow. By the way: Happy Christmas to all! Quote Link to comment Share on other sites More sharing options...
Marxon Posted December 27, 2013 Author Report Share Posted December 27, 2013 Works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.