Announcement

Collapse
No announcement yet.

how to make a simple toggle led using only touchosc and osculator?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to make a simple toggle led using only touchosc and osculator?

    Hi,

    I would like to make a simple toggle led, so when I press a normal push button a led will stay lit till I press it again. It´s for key combo´s sent to an application so there will be no feedback to osculator. I think this would be a simple task but I cant get it to work..

    I would prefer not to use a toggle button in Touchosc.

    Cheers

    OKK

  • #2
    Hi OKK,

    Usually, this kind of feedback is provided by the device your control. In this case, the is no actual device that will provide the feedback you need, therefor you need to configure OSCulator to simulate such feedback.

    You can follow the configuration of this example by viewing side by side the attached files.

    The first thing is that you want to update the state of a LED. To do this, you must define two OSC Routings (in the Parameters Window, OSC tab): one for turning the led on, and one for turning the led off.

    After this, you need to configure the message coming from your push button. In the main list, select the message of your push button and duplicate it 4 times, so you have 0 (the original message), 0>0 (the first duplicate), 0>1, 0>2, and 0>3 (the fourth duplicate).
    • For the slot 0, assign your Key Combo.
    • For the first duplicate 0>0, assign a OSC Routing event, and choose the OSC Routing that disables the led.
    • For the second duplicate 0>1, assign a OSC Routing event, and choose the OSC Routing that enables the led.
      • Uncheck the Enable check box (first column in the list) to disable this message.
    • For the third duplicate, assign a Enable Toggle event, and choose the duplicate 0>0 as a target.
    • For the last duplicate, assign a Enable Toggle event, and choose the duplicate 0>1 as a target.
    Now when you press the push button, the key combo is activated, and the led is turned on. On the next press, the key combo is activated again, and the led is turned off.


    Best Regards,
    Cam

    Update:
    I've noticed a display bug when using this technique: when you open the attached file, the Enable Toggle events' names are both "0>0", instead of "0>0" and "0>1". However, the routing works properly. I will see what is happening here...
    Attached Files
    Last edited by camille; 03-04-2012, 11:26 PM.

    Comment


    • #3
      Hi Cam,

      Thanks a lot!! I even think I understand what you are saying...
      I´m going to try this out right now. How if I want to have another series of key combo´s to trigger ONLY when the led goes from on to off?

      Cheers
      Okk

      Comment


      • #4
        It would have been much more easier to use a toggle button for this and don't use a LED.
        I could explain to you how to do this, but I find it too convoluted.

        Please consider this solution with a toggle button:
        • Register your toggle button in OSCulator, and select the corresponding message.
        • Press Control-D (or choose Edit->Demux) on this message, it will turn purple.
        • Now, press the toggle button again two times, this will reveal the values sent by the button: 0 and 1. The value 0 corresponds to when the button is off, and 1 when the button is on.
        • Now select the value 0 or 1 and duplicate it for as many key combos you want to trigger, then assign the key combos.

        Something like this:
        Toggle Key Combos.png

        Comment


        • #5
          ok thx! got it working now.. both as a LED and a toggle, but they sare the same problem..
          I use it to automate som stuff in adobe audition and one of the edits I call is insert silence. The time it takes for audition to preform the insert makes it "forget" the following commands (goto end and deselect).. I tried to insert a delay applescript but it does not seem to delay the key combo´s... Anything I can do?
          Cheers and thanks for a very nice piece of software!
          OKK

          Comment


          • #6
            Hi,

            I just wanted to say that I scipted my way out. I made a toggle button with the off state executing applescript keys and delays to make it work. Thanks a lot for your help making me understand the toggle demux

            Cheers
            Okk

            Comment


            • #7
              This raises the question of delays within keyboard shortcuts.
              It would be interesting to introduce a simple delay "event value" within a string of duplicates, what do you think?


              Best,
              Cam

              Comment


              • #8
                For sure!. It would be nice to set delay times between events, maybe also repeat cycles that could retrigger events.

                On a side note on new features.. I would be nice to have OSCulator jump to the OSC message in the list when it´s pressed on your controller. I have a rather long list now and use a fair amount of time scrolling up and down to find my targets. Just as a option.

                Cheers
                Okk

                Comment


                • #9
                  In the main window, click on the second table header, just above the activity monitor.
                  OSC messages will be sorted by activity.


                  Best,
                  Cam

                  Comment


                  • #10
                    aahaaaaaaaaa!

                    Comment


                    • #11
                      I found more use for a wait/repeat command..
                      I wanted to make a "zoom out to show all" in Live, and as Live only has key commands for single step in and out , this was a small problem.

                      I made an applescript but it was not working so well, so I used the key combo to send it direct to Live.
                      The combo´s are triggering too fast for it to work optimal, so in a perfect world there would be an event type like this:
                      "app to receive" + "key combo" + "repeat count" + "delay between repeats"
                      This could also work as a simple "delay" between other events.

                      Just some input... Love OSCulator already

                      OKK

                      Comment

                      Working...
                      X