No announcement yet.

Split fader into ranges

  • Filter
  • Time
  • Show
Clear All
new posts

  • Split fader into ranges


    I'm new to this forum. And I tried to search my answer first with no luck so far.
    As the applescript cannot be used to in combination with an OSC fader.
    Therefore I'm looking for a solution where I can make ranges on the same fader to trigger different applescripts if the fader is positioned in a range.
    An easy example would be:
    Divide a volume fader into 10 ranges and for each range trigger another script to set the volume in another package.
    Is this possible?

    Thanks for your help.


  • #2
    Hi Marc,

    It only a matter of personal taste, but I would not recommend using a fader to trigger individual events.
    Anyway, here is a recipe to do this.

    Considering the default layout Beatmachine, I am using the yellow fader to split in 10 elements.

    - first of all, I register the fader in OSCulator, and change its Output Max scaling to 10. If you touch the fader and use the Quick Look window (press space bar) you will see that the fader goes from 0.0 to 10.0 with all the floating point values in between. We want to convert them to integers.
    - open the Parameters Window, and go to the OSC tab. In the second target, click on the gear menu and select "localhost:8000 (this document)".
    - create a new OSC routing by clicking on the '+' button, and change its rewrite address to "/integer<address>". Also, remove the <all args> token, drag and drop the arg[0] token, and change its to integer like in this picture:
    arg type.png

    - close the Parameters Window, and go back to the main list.
    - assign the newly created OSC routing to the /1/fader1 message and touch the fader in TouchOSC. A new message will be create named, /integer/1/fader1. If you use Quick Look on that message, you will notice that its values go incrementally from 0 to 10. We converted the floating point argument as an integer number.
    - now we need to extract the values. For this, you must use the "demux" function. Select the "/integer/1/fader1" message and in the Edit menu, choose Demux. Now touch the fader again all along its range. You should see the values appearing in the main window, like this:

    You can now assign any event you would like to each of the demux'ed values.

    Please see attached file for the complete configuration.

    Attached Files


    • #3
      Thanks very much with this useful info and detailed help!
      I'm making a remote camera control. I'll try it out.
      For example 50% is stop, going to 0% is Zoom wide with different speeds, the same for Tele going to 100%.

      In the weekend I experimented with the Spacenavigator, and used the axes to be able to setup focus and zoom control creating ranges by using multiple splits and changing the scale values in the input sides. To trigger different values in scripts at different values of the axes.
      It works a bit but not like it should. It needs some kind of hysteresis, as when coming back after rotating an X, Y or Z to a max value, coming back it's not triggering the other values anymore.
      It is only taking control again when I turn the knob in the other direction.
      Around the 0.5 value I made two splits, to make sure the "stop" command is always triggered releasing the knob, but they start oscillating for some reason.

      What I'm also looking for is a way to use the value of a fader / button / Spacenavigator and use those values as a variables into an Applescript.
      Maybe I need to make another thread for this question?


      • #4
        You can not at the moment execute AppleScripts with input values.
        The only way AppleScripts are executed by triggering them.


        • #5
          Ok, thanks.


          • #6
            The solution works great with the Fader & SpaceNavigator now!

            Great tool!