|
Post by lightingboy on Aug 25, 2018 22:46:50 GMT
I owned MidiFire and it is the perfect tool for useing my launchpad to control my lighting desk. The problem I have is to send sysex command to the launchpad when button is pressed.
From manual: Text scrolling $ Launchpad Pro natively supports scrolling text. ASCII text can be embedded in a System Exclusive message. Additional bytes are reserved to change the colour, whether it loops and the scroll speed. ! ! Start text scrolling $ Host >> Launchpad Pro: F0h 00h 20h 29h 02h 10h 14h <Colour> <Loop> <Text> F7h (240, 0, 32, 41, 2, 16, 20, <Colour>, <Loop>, <Text>, 247) <Colour> - Scroll text colour 00h – 7Fh (0 – 127) <Loop> - Set to 01h (1) to loop the message In addition to the standard ASCII characters, Launchpad Pro recognises plain values 1 – 7 as speed commands (where 1 is the slowest and 7 is fastest). This allows the scrolling speed to be manipulated mid-text. The default speed is 4.
How do I send this command and how to replace the text command? Thx
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 26, 2018 9:03:18 GMT
Hi lightingboy , You would use the Stream Byter and a SND command. Try this out: - Drop a Stream Byter onto the canvas and also the Launchpad destination (out) - Connect the Stream Byter to the Launchpad port - Open up the Stream Byter (use the 'cog' button) and paste this in: IF LOAD SND F0 00 20 29 02 10 14 +F SND 40 01 48 65 6C 6C 6F F7 +F END- Press 'Install Rules' and in theory the Launchpad should display some (looping) text in whatever colour 40h maps to. So, how does this work? The SND command issues an arbitrary MIDI message defined by the bytes that follow. For setting the Launchpad text, the first part is fixed and will always be the same: F0 00 20 29 02 10 14 +FThe +F flag allows us to split the message over multiple SND lines. The maximum number of bytes that can follow one SND is 16 so longer messages need to be split. Although I didn't need to split for the above (15 byte message) I did so to increase readability and demonstrate this The next byte (first byte in second SND) is the text colour - I don't know what these map to so I picked the mid-point (40h). You can experiment with this value to get the colour you want After that is the 'loop' byte which is either 00 (don't loop) or 01 (loop) Next is the message and you have to specify each character in hex. Use this table: Hexadecimal - Character
00 NUL 01 SOH 02 STX 03 ETX 04 EOT 05 ENQ 06 ACK 07 BEL 08 BS 09 HT 0A NL 0B VT 0C NP 0D CR 0E SO 0F SI 10 DLE 11 DC1 12 DC2 13 DC3 14 DC4 15 NAK 16 SYN 17 ETB 18 CAN 19 EM 1A SUB 1B ESC 1C FS 1D GS 1E RS 1F US 20 SP 21 ! 22 " 23 # 24 $ 25 % 26 & 27 ' 28 ( 29 ) 2A * 2B + 2C , 2D - 2E . 2F / 30 0 31 1 32 2 33 3 34 4 35 5 36 6 37 7 38 8 39 9 3A : 3B ; 3C < 3D = 3E > 3F ? 40 @ 41 A 42 B 43 C 44 D 45 E 46 F 47 G 48 H 49 I 4A J 4B K 4C L 4D M 4E N 4F O 50 P 51 Q 52 R 53 S 54 T 55 U 56 V 57 W 58 X 59 Y 5A Z 5B [ 5C \ 5D ] 5E ^ 5F _ 60 ` 61 a 62 b 63 c 64 d 65 e 66 f 67 g 68 h 69 i 6A j 6B k 6C l 6D m 6E n 6F o 78 x 79 y 7A z 7B { 7C | 7D } 7E ~ 7F DEL
Finally, F7 terminates the sysex. The above example will set the text each time you press the 'Install Rules' button or if loaded from a saved scene at load time. You can of course put the SND rule to set the text in response to a MIDI message that could be fed in externally into the Stream Byter. Hopefully, that is enough to get you started. Any questions (I did not cover changing the speed of the loop) just post away.
Regards, Nic.
|
|
|
Post by lightingboy on Aug 27, 2018 5:06:53 GMT
hey thank you very much, i try to test it but i got an error message! i uploaded a screenshot for u Attachments:
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 27, 2018 6:59:37 GMT
Oops, sorry.
The second SND also needs a +F flag. I adjusted the test code above, so please try again.
Regards, Nic.
|
|
|
Post by lightingboy on Aug 27, 2018 15:09:38 GMT
the error is gone now but it did not cause any action on lauchnchpad :-( i tried another syses command from the lauchnchpad pro programmers reference guid and it works fine. maybe it has something to do with the text conversion?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 27, 2018 16:02:15 GMT
Hi lightingboy , You mean you tried the other sysex command from MidiFire Stream Byter or from something else? Can you try this out of interest? IF LOAD SND F0 00 20 29 02 10 14 40 01 04 48 65 6C 6C 6F F7 +F ENDI just downloaded the programmer's guide and I see that their example is pretty similar to what I came up with bar an explicit loop speed (which are meant to be optional). Unfortunately I only have a Launchpad S here and not a Pro, so I cannot verify/test myself. Regards, Nic.
|
|
|
Post by lightingboy on Aug 27, 2018 22:04:51 GMT
OMG it works, thanks a lot! But if i try some longer text and i have to split the command with +F it will not work :-( after some testing i could just send 5 letters with stream byter.
Yea I tried to light all buttons with stream byter in blue and it also works!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 28, 2018 8:00:47 GMT
Hi lightingboy , Right, so something is meddling around with the split message. Maybe there are other messages going through (clock? active sense?) or your routing is setup so that the Launchpad is receiving the sysex messages twice. Not sure, but we can workaround this sneakily so you can send longer messages: 1. Add a 'MidiFire' source (in) port to the canvas and connect to our Stream Byter. Your routing should look like: MidiFire -> Stream Byter -> Launchpad2. Replace the rules with this: IF LOAD SND F0 00 20 29 02 10 14 +F +I SND 40 01 48 65 6C 6C 6F F7 +F +I END IF M0 != F0 XX = XX +B ENDNow, when you press 'Install Rules' the two part sysex is fed back into MidiFire via CoreMIDI loopback and assembled into a single message before being sent on to the Launchpad. Give this a go and let me know how you get on. Regards, Nic.
|
|
|
Post by lightingboy on Aug 28, 2018 10:24:25 GMT
Ok will try this But can I link the send command to a button push on lunchpad when I use MidiFire as input?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 28, 2018 10:46:39 GMT
Hi lightingboy , Yes, you certainly can! First, you need to determine what the hex code is for the button you wish to map. Hook up an Event Monitor to the Launchpad and press the button. Open the Event Monitor detail (press cog) and you'll see the hex code. I think it will be a note on and off event as you push/release the button. You're only interested in the note on event. You then take the note on hex code, let's say for argument's sake it's middle C (hex: 90 3C nn) then you would hook things up like so on the MidiFire canvas: Launchpad -> Stream Byter -> Launchpad ^ Midifire |and then in the Stream Byter you would use code like: IF M0 == 90 3C IF M2 > 0 SND F0 00 20 29 02 10 14 +F +I SND 40 01 48 65 6C 6C 6F F7 +F +I END END IF M0 != F0 XX = XX +B ENDNow, when you press that button on the Launchpad, the Stream Byter will trigger the injected sysex message which gets fed back to Launchpad. Regards, Nic.
|
|
|
Post by lightingboy on Aug 29, 2018 22:34:42 GMT
Great!! Scrolling longer text works fine with MidiFire input and IF LOAD. THX a lot But a soon as launchpad input is joining the game things went wrong See the picture for my configuration btw: i am sorry to get on your nerves Attachments:
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 30, 2018 7:01:29 GMT
Hi lightingboy , Don't worry about getting on my nerves - I'm exceedingly patient! So, what happens when you add the LP as an input that goes wrong exactly? If you hook up an Event Monitor to the Stream Byter output you should only see the sysex messages coming out. The rules at the bottom are meant to block anything coming from the LP being sent back to the LP and hooking up the monitor should tell us whether I got that right or not (looks correct to me). Are you running any other apps at the same time? Could one of these be forwarding stuff from the LP back to itself? Regards, Nic.
|
|
|
Post by razmataz77 on Feb 2, 2020 20:54:54 GMT
would be very handy to have a script that makes the Launchpad responsive to lights and editable to notes cc or pc.
|
|