Interactive Controllers with TouchOSC

labs-icon.pngLightform Labs Feature

What is OSC?

"Open Sound Control (OSC) is a protocol for communication among computers, sound synthesizers, and other multimedia devices that is optimized for modern networking technology. Bringing the benefits of modern networking technology to the world of electronic musical instruments, OSC's advantages include interoperability, accuracy, flexibility, and enhanced organization and documentation." Read more here.


How does TouchOSC work with Lightform Creator?

You can communicate with the Lightform device using OSC messages. Each effect has various exposed parameters that you can adjust (e.g., speed and size). To get Lightform Creator ready for OSC messages:

  • go to the Help menu and enable Labs in Lightform Creator
  • when an effect or generator has been applied to a surface, in its properties enable Live

enable-LabsLive_1x.png

Now the effect/generator will be computed in real-time during project playback by the Lightform device and you can adjust the effect's parameters using OSC messages simultaneously during playback.

Learn more about Editing OSC Mappings in Lightform Creator


Using the TouchOSC Mobile App

Step 1 Download the TouchOSC Mobile App 

To control your Lightform device via a mobile device, you can use the TouchOSC app available for both iOS and Android.

To learn more about TouchOSC visit their website.

osc-download.png

Step 2 Configure TouchOSC 

Once you have the TouchOSC app downloaded and installed on your mobile device

  1. Connect your mobile device to the same WiFi network that your Lightform device and computer are connected to
  2. In the TouchOSC app, tap the OSC line under CONNECTIONS and enter the following information:

    Hostname:
    <Your Lightform device IP address> (You can find your device's IP address in Lightform Creator on the Control Page, or by looking on the projected Testcard.)
    Outgoing Port: 8000
    Incoming Port: 9099
         
  3.   Press < TouchOSC in the upper left to go back to the main settings page

touchOSC-infoInput_1x.png

You should now be connected to your Lightform via OSC!

Please note:
The Lightform device will not show up in 'Found Hosts' but if the information has been entered correctly, it will work

 

Step 3 Choose Layout

You can start by using the Lightform layout which can be downloaded here:

Lightform TouchOSC Layout

Installing on:

  • Android
    Install this file directly by downloading it on your phone.
  • iOS
    Download the file to your computer, then use iTunes to copy the file to your phone.

Once the file is on your device, you need to set it as the current layout by tapping the line under Layout and selecting Lightform-0.9.6.

touchOSC-selectLayout_1x.png

Tap < TouchOSC to return to the main menu and tap Done.

touchOSC-LightformLayout_1x.png

Custom Layouts

You can create custom layouts to have more control over your projects by downloading the TouchOSC Editor. Refer to the TouchOSC documentation for layouts to learn more.

Please note:
When creating your own TouchOSC layout, if using buttons (e.g., for play/stop/next slide/etc), you must turn off "Send on Release" — see this article: https://hexler.net/docs/touchosc-controls-reference#push. If you don't do this, pressing and then releasing a button will generate 2 events (e.g., pressing a button for "next slide" would actually advance you 2 slides instead of 1).

Another thing to keep in mind is that TouchOSC only lets you define 1D and 2D sliders and toggle/momentary buttons. This means that not all of our OSC controllable parameters will work with Touch OSC.

With TouchOSC, you can use a fader (or most other controls) to control 1D parameters such as 'Line Width' or 'Zoom'. However, something like 'Hue/Sat/Lum. Offset' is 3D and therefore will not work with Touch OSC. The graphic below shows some examples of different parameter types.

touchOSC-inputTypes_1x.png

 

Step 4 Map OSC Controls in Lightform Creator

Make sure you have Labs enabled and Live turned on (refer to the beginning of this tutorial for more details).

Please note:
At the moment Lightform Creator only supports one Live effect per slide. The same surface can have a different Live effect on a different slide.

  1. Publish your project with at least one Live effect on
  2. Switch to the Control Page and open the OSC Mappings Window
  3. Click Learn next to the parameter that you’d like to connect to a control in the TouchOSC app
  4. Touch one of the buttons in the app or move one of the sliders to associate that control with the parameter that your Lightform device is learning
  5. Now when you use that control, the parameter will change in realtime on your Lightform device

 


Using the TouchOSC for Slide Management

The Lightform layout in TouchOSC can be easily used to control slide management and playback in a project.

  1. Set up your scene and in your project make sure you have more than one slide with content. In this demo, we are mapping a 3D object that has 3 slides, each with a different effect
  2. Publish your project and in the Control Page, click Edit OSC Mappings
  3. Click Learn next to Next Slide and hit the next icon on your mobile device.
    Click Learn next to Previous Slide and hit the previous icon on your mobile device.
    The address path will change from '/next' to '/playback/next' and from 'prev' to '/playback/prev'
    prev_buttons_1x.png
  4. The effect is now mapped. Every time you press the icons on your mobile device, the Lightform will move between slides.

osc_slide_demo.gif

 


Using the TouchOSC for Manipulating Effects

The Lightform layout in TouchOSC can be easily used to manipulate effect and generator properties. In this demo, we are mapping a 3D object that has the Voronoi generator.

  1. Set up your scene and in your project make sure you have more at least one 'Live' effect or generator enabled.
  2. Publish your project and in the Control Page, scroll to the Slide number with the Live Voronoi effect properties
  3. Click Learn next to Variance and drag a slider on your mobile device.
    Click Learn next to Width and drag another slider on your mobile device.
    The address path will change from '/Slide/variance' to '/fader1' and from '/Slide/zoom' to '/fader4'
    map_effectManipulate_1x.png
  4. The properties are now mapped. Every time you drag the sliders on your mobile device, the Lightform will change the variance and zoom level of the Voronoi effect.
    osc_effect_demo.gif
Was this article helpful?
12 out of 13 found this helpful

Sign in to make a suggestion to improve this article

  • Comment actions Permalink
    Avatar
    Jimmy Gillies Gillies

    Hi,

    Can you advise if there is a way of integrating audio, into a effect, or any suggestions on how to apply audio in general, to a timeline.., thanks much ..,Much Appreciated :) ?

    Cheers

    Jimmy

  • Comment actions Permalink
    Avatar
    Brittany Factura

    Hey Jimmy, 

    We do not support audio with Lightform Creator but one of our favorite things to do is to publish Live Effects and modify their parameters via OSC based on a soundtrack using either Vezer or Abelton

    You can read a bit more on how to set this up in these articles:

    We plan to publish more tutorials on these kinds of audio-based workflows soon!

  • Comment actions Permalink
    Avatar
    Enrico Corelli

    Is possible to connect physical button to move between transiction or recognize the moving of one hand in some specific are of projection to choose some others slide? 

  • Comment actions Permalink
    Avatar
    Brittany Factura

    Hi Enrico!

    As long as the button can send OSC messages, it should be able to communicate with the LF1. 

    You can find the editable OSC mappings in the Control Page. Click the Edit OSC Mappings button to map controls to OSC. For example, advancing to the next slide or going back to the previous slide are available OSC Mappings. If you press the Learn button, the LF1 will accept the next incoming OSC message and that will be used to control the function. You can read more about the OSC mappings here: https://guide.lightform.com/hc/en-us/articles/360009083473#h_419968065181536364095100

    The LF1 cannot detect hand gestures or hand movement to interact with slides or control any function.

  • Comment actions Permalink
    Avatar
    Marc Syp

    Do you have any plans to provide timeline shuttle control to the live effects, which then could be controlled via OSC?  In architectural visualization, this would let us do a sun path study, for instance, which represents time of day.  Having a shuttle would essentially let us "move the sun".

     

    Thanks,

    Marc

  • Comment actions Permalink
    Avatar
    Brittany Factura

    Hey Marc!

    That sounds like an awesome addition. Could you elaborate a little more on what you'd want out of the feature and the use case you're envisioning? We'd love to learn more to add this onto our product's list of potential feature requests.

  • Comment actions Permalink
    Avatar
    Ellen Byrne

    Hi there, is it possible to trigger a particular slide with OSC? 

  • Comment actions Permalink
    Avatar
    Kevin

    Hi Ellen- Yes, this is possible. In the Control Page of Lightform Creator, after you publish a project to your device, open up the "Edit OSC Mappings" dialog. From there, you can set the mappings for "next slide" and "previous slide", as well as "slide index" where you can send the slide number directly.

     

  • Comment actions Permalink
    Avatar
    Bastian Waidelich

    Hi,

    I bought the TouchOSC app but I couldn't get it to work with Android (the comments at https://guide.lightform.com/hc/en-us/community/posts/360028937613-Touch-OSC didn't help).

     

    I just tried it with the free "OSC Controller" app instead and that works almost out of the box, using 8000 as port.

     

    PS: In the description above Incoming & Outgoing Port is not in sync with the screenshot, I think they are flipped

     

     

  • Comment actions Permalink
    Avatar
    Ashley Russell

    Hi Bastian, 

    Thanks for this feedback. I'll share it with the team so we can get those resources updated.

    Best,

    Ashley