Hi,Robin already gave a pretty good answer. About your formula, the parentheses need to balance. The formula should be: toggle(midi.note(1,12)+midi.note(2,97))
If you want the first note to activate and require the 2nd note to turn off, instead of using the toggle function (which toggle each time either midi note is on), you can use the counter function like this:
noLoopCounter(0,1,onbeat(midi.note(1,12)), onbeat(midi.note(2,97))) > 0This way, you can press the midi.note(1,12) any number of times to activate and you must always press the midi.note(2,97) to turn it off.
On Monday, January 20, 2020 at 7:24:13 PM UTC-5, Chris W wrote:Hi folksI would like to trigger two midi notes from the same pad press on my Novation Launchpad. The first Midi note will set the colour of the pad when it is pressed the second midi note will trigger a playback on my lighting desk. I also want it to toggle so second key press is required to return the state to normal. I had thought the code would look like this but Lightjams dosent like the code.toggle((midi.note(1,12)+(midi.note(2,97))What do I need to change?Thanks for your helpChris
--
You received this message because you are subscribed to a topic in the Google Groups "Lightjams" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lightjams/c3Ulve7GZVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lightjams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightjams/b87eb81a-8e02-4a4b-af5b-38cab18203be%40googlegroups.com.
Chris Wemyss
Venue Manager
Mac Arts
Bridge Street,
Galashiels
TD1 1SP
TEL: 01896 756852 MOBILE: 07818284922
EMAIL: ch...@macarts.scot
WEB: www.macarts.scot
Registered Scottish Charity SC043299
Company Reg. No. 412818
This e-mail (which includes any files transmitted with it) is intended for the above named only. It may contain privileged or confidential information. If you are not the intended recipient please notify the sender immediately either by e-mail or by telephone and confirm that all copies have been destroyed and it has been deleted from your computer system. If you are not the intended recipient, you are notified that any review, dissemination or copying of this e-mail is prohibited. This e-mail is protected by copyright.
--
You received this message because you are subscribed to a topic in the Google Groups "Lightjams" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lightjams/c3Ulve7GZVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lightjams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightjams/148c87d5-f90a-471e-aed7-2e9df68baa8e%40googlegroups.com.
You're right Robin. A source just crunches numbers and doesn't output anything like DMX, MIDI, OSC, etc. To output MIDI, you do like when wanting to output DMX, that is you patch (for example) a generic dimmer and select the proper MIDI note channel as the universe. The address is the note index in this case (from 1 to 128). Then put your attribute on a grid to be in the range of the source.All MIDI devices (with output enabled in LJ) will receive the MIDI output of Lightjams. So make sure to not send a MIDI note to the console that is also used by your MIDI controller for MIDI feedback.
--
You received this message because you are subscribed to a topic in the Google Groups "Lightjams" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lightjams/c3Ulve7GZVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lightjams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightjams/b7b128b4-590d-418f-8032-88dd526c836e%40googlegroups.com.
Hi Chris,The formula toggle(midi.note(1,12)+midi.note(2,97)) doesn't output MIDI. The part "midi.note(1,12)+midi.note(2,97)" adds two number together as the + is really the addition operator. So basically this means that either note 12 or 97 do the toggling. It's not what you seem to want as you want to output note 97 when you're receiving note 12.
To output MIDI in order to activate the LED of a MIDI launchpad, you do it the same way you'd control a light. The only difference is that instead of patching your light in a DMX universe, you select a MIDI note universe.That means that to send the note 97 with a value equal to the state of the toggle, you:- add a source- select the power slider- enter the formula with the toggle like this: toggle(midi.note(1,12))- patch a generic dimmer (or a generic effect would be better since it would not be affected by the master intensity) and select the MIDI note C2 (for channel 2) universe, set the address to be 97 (for note 97)- back to the grid with the source, put the generic dimmer over the source.In this example, the toggle is inverted each time note 12 from channel 1 is pressed. Modify it to fit what you need or use the noLoopCounter as shown in a previous post.The help for the formulas is here: https://www.lightjams.com/commandline.html
--
You received this message because you are subscribed to a topic in the Google Groups "Lightjams" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lightjams/c3Ulve7GZVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lightjams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightjams/37a67a17-e714-4249-8cb9-edfd3270e639%40googlegroups.com.
To send two midi notes with one source, you do it the same way as controlling two lights: put the two attributes corresponding to the midi notes on the grid and trigger them with the same source.
--
You received this message because you are subscribed to a topic in the Google Groups "Lightjams" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lightjams/c3Ulve7GZVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lightjams+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightjams/6b17262e-e33e-4c2d-9f06-52d6acd4db13%40googlegroups.com.