User Tools

Site Tools


tutorial:2:a

This is an old revision of the document!


Using TouchOSC with Logic Pro (Part 1)

In this tutorial we will show how to setup a two-way link between your iphone or iPod Touch and Logic Pro 8.

:?: Why a two-way link is better than a one-way link?
Because controlled parameters will be perfectly and instantly synchronized on each device.

What is needed:

  • an iPhone or iPod Touch with OS 2.0 or later
  • a Macintosh with WiFI (standalone or via a wireless router) ans Mac OS X 10.4 (Tiger) or higher
  • TouchOSC on your iPhone / iPod Touch
  • OSCulator on your Mac
  • LogicPro 8 on your Mac

Connection setup between TouchOSC and OSCulator

To connect the two software together, your iPhone and Mac must be on the same network. If your iPhone is connected to a wireless router (or access point), your Mac must be connected to this router as well so they can communicate together. You Mac can use an Ethernet cable or a wireless connection as long as they are connected to the same router1).

Creating a WiFI network

If you are on the road and don't have an access to a wireless router, you can create a network with your Mac and connect your iPhone to it. To create such a network, click on the Airport icon in the menu bar2), and choose “Create Network …”. Now configure the network with your own settings (name, encryption, etc.), and click OK. You can now connect your iPhone to this network.

This solution is very simple, but there is a drawback: you must reconfigure the network on each system restart.

Creating a WiFI network that survives system restarts

  • go in the System Preferences application;
  • click on the “Sharing” Preferences Pane, and select “Internet Sharing”;
  • in this panel, choose to share your Internet connection from Ethernet to computers using Airport;
  • now, follow the usual procedure to configure the custom network, and there you go.

This custom network will be active after each system restarts. Note that with this method, you won't be able to connect your Macintosh to Internet using a wireless network3), unless you deactivate Internet Sharing.

Configuring TouchOSC

Now that your iPhone and Macintosh are connected to the same network, launch OSCulator on your Mac, and then launch TouchOSC on your iPhone.

  • In TouchOSC, click on the button under “Network” and choose the option corresponding to OSCulator (see picture above). TouchOSC will automatically fill the fields required for the network communications.
  • In the “Port (incoming)” field, enter 9000. This can be actually any port number you wish. 9000 is cool.
  • From there your settings page should look like this (your “Host” field can be different, due to network configuration differences).

Back to TouchOSC main preference page, now choose a “Layout”. I would suggest “Mix 16”, then press “Done”.

Configuring OSCulator

Open OSCulator and create a new document using the “File” menu.

Check that the incoming OSC port is set to 8000:

On your iPhone, select page 2:

Moving the first fader should create a new entry in OSCulator:

Now letʼs move the 8 faders :

Because Logic Pro can only be controlled by MIDI messages, we will use OSCulator to translate OSC messages into MIDI. In OSCulator, Select items /fader1 to /fader8 then click in “Event Type”, and choose “MIDI CC”:

There are several kinds of MIDI messages, like MIDI notes or pitch bend, MIDI CC means MIDI Continuous Controller. There are 128 Continuous Controllers numbers (from 0 to 127) for each of the 16 MIDI channels. So we can use up to 2048 controllers (128×16).

Letʼs choose which MIDI CC will be used to translate each OSC message. We suggest MIDI CC number 6 for the 8 faders of page 2, like this:

:!: Do not use CC 7 or 11 because they are hard-wired in Logic Pro to Volume and Pan.

To make the difference between each faders we will use different MIDI channels, like this:

Open Logic Pro then create an empty project with 8 audio tracks (either mono or stereo).

Learn MIDI Assignments in Logic

Select the first audio track in the Mixer, move the fader, and go to “Control Surfaces”, or just type ⌘L.

:!: Warning, OSCulator uses this key stroke to lock the active document, as you are going to switch between these two applications very frequently, stay careful.

A new window should appear, like this one:

Donʼt touch anything on the iPhone, switch to “Expert View”:

Logic Pro is still in “Learn Mode”, so now move fader 1 on your iPhone. You should now see this:

Quit the “Learn Mode”.

Now we wil have to make some changes in this window to tell Logic Pro what we actually want. We want MIDI CC 6 on channel 1 to control Volume on audio track 1, letʼs do it.

:!: DO NOT FORGET TO TURN OFF «Learn Mode» before going on

Proceed with track 2 in Logic Pro. Move its volume fader, type ⌘L, move fader 2 on the iPhone, and change the parameters as shown:

Quit the “Learn Mode”.

Repeat these steps for audio tracks 3 to 8.

Configuring the feedback from Logic to the iPhone

Now itʼs time to setup the midi feedback from LogicPro to your iPhone. Because Logic was formerly a MIDI only application, many years before audio support came, it is organized around a powerful core, the “Environment”.

You display it via the “Window” menu.

The environment is where you link audio objects like audio tracks to midi objects. To get the feedback from Logic Pro to TouchOSC we will need to create some objects. First we will create one “Instrument” for each OSCulator MIDI channel.

Create a total of 8 Instruments then name them “OSCulator Ch1 … Ch8” (:!: To name an object you can use “Text Tool”).

Select all the 8 instruments then assign “OSCulator In (8000)” as the MIDI port:

Now we have 8 object ready to send midi to OSCulator. Just like we did in OSCulator, we will use a different MIDI channel for each of them. Deselect all the 8 Instruments, and select the first on the left then change its “Channel” to 1.

Repeat this operation it for the next Instruments using Channels 2 to 8.

There is a very usefull tool in the environment menu called “Monitor”. Just create one using the “New” menu then plug the output (triangle at top right corner) of audio track 1 in audio track 1 into it.

Move “Audio 1” volume fader.
As you can see, this audio track sends controller 7 on Channel 1 when you move its fader.

To monitor exactly what is going on and to help further developments, it is suggested to create one “monitor” object for each audio track.

To use OSCulator “MIDI to OSC translation” scheme, we must send it the same CC number. We used the CC 6 for OSC to MIDI, we get CC 7 from Logic Pro so we need something to transform CC 7 into CC 6.

This tool exists in the Envrionment, it is called the “Transformer”. Create one via “New” menu, double click this new object and then change its parameters like this:

Now we have to cable the Transformer between monitor object and OSCulator Ch1 object and name the transformer “Volume”.

Moving the Audio 1 fader will create a new item in OSCulator. Try to move the fader in Logic Pro, and a new event will be created in OSCulator:

Now, move the fader again, and you should see this action reflecting on the iPhone.

Duplicate the Transformer for every “OSCulator Ch…” objects then cable them for every Audio track.

Don't worry about the messy cables, you can hide them via the “View” menu.

Once you have moved every faders in Logic Pro, OSCulator should look like this now:

Thanks to this routing OSCulator will translate MIDI from Logic into OSC to the iPhone so the faders will follow Logic Pro.

This is everything for the first part of this tutorial, now you can read on to the second part of the tutorial:
How to control the mute buttons in Logic Pro.

1)
please note that some routers actually don't allow WiFI hosts to communicate with cabled hosts, in this case, connect your Mac to the WiFI network
2)
the one that looks like a radar scan
3)
only on a network using an Ethernet cable
tutorial/2/a.1244761480.txt.gz · Last modified: 2009/06/12 01:04 by camille