Guide for using OSC

Fri Jun 11, 2021 8:31 pm

Hey, I'm trying to use OSC to control a playlist of scenes in MMV. I am currently using Lioranboard to control visibility of scenes and sources. I have been playing with trying to send custom OSC messages to MMV so that I can send messages to change the playlist directly.

The simplest solution I have for sending OSC messages from Lioranboard is by using a OSC Sender CLI that Christinna from Lioranboard suggested: https://github.com/russellmcc/oscurl

I can get MMV to listen to the OSC message, but not respond more than once after that. I've read the user manual section on OSC about 15 times trying to understand what I'm doing wrong here, but just simply don't get it.

Attached is a screenshot of what this looks like (including the CLI call itself), any suggestions on why MMV isn't changing on additional calls?
Attachments
osc-mmv-cli.png
OSC CLI & MMV
osc-mmv-cli.png (170.75 KiB) Viewed 594 times
chabuku
 
Posts: 13
Joined: Tue Apr 27, 2021 6:39 pm

Re: Guide for using OSC

Fri Jun 11, 2021 11:48 pm

I've only used learned prev/next buttons to control the playlist from TouchOSC and it has always worked flawlessly for hours.

In your case I don't think you need to learn, just type 'scene' and then issue these commands.

oscurl 127.0.0.1:8000 scene 1
oscurl 127.0.0.1:8000 scene 2

If I understand correctly, your mistake is to send the string 'scene1' to MMV, which the learn function detects but the playlist doesn't know what to do with it. The playlist needs numbers to change to a specific entry.
Sadler
 
Posts: 891
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Guide for using OSC

Sat Jun 12, 2021 6:32 am

Sadler wrote:In your case I don't think you need to learn, just type 'scene' and then issue these commands.

oscurl 127.0.0.1:8000 scene 1
oscurl 127.0.0.1:8000 scene 2


Unfortunately this does not work. I tried several different iterations of your suggestion and I had tried this previously, but wanted to do it from a clean slate.

I'm testing all this right now in a brand new Project and creating two scenes with default names.

I add OSC port 8000 to Input Sources menu, then "Show MIDI/OSC Config" from the Playlist Menu, click "Learn..." from there and click start. Send the first command: "oscurl 127.0.0.1:8000 scene 1" and then click "Use"

What happens is then I send the first command once again and "Scene 0" gets the blue selection background. When I try to send "oscurl 127.0.0.1:8000 scene 2" nothing changes, if I switch directly to "Scene 1" and then run the first set of code it will go back to "Scene 0" but it doesn't seem to be switching to the second scene.

I'm at a loss on what I'm doing wrong.
chabuku
 
Posts: 13
Joined: Tue Apr 27, 2021 6:39 pm

Re: Guide for using OSC

Sat Jun 12, 2021 8:37 am

Try prefixing (and suffixing) 'scene' with / e.g. '/scene/'? Test with another program e.g. TouchOSC or Chataigne.

[Edit] It seems the / isn't required, just tested in TouchOSC:

osc_playlist.jpg
osc_playlist.jpg (176.43 KiB) Viewed 583 times
Sadler
 
Posts: 891
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Guide for using OSC

Sat Jun 12, 2021 5:15 pm

Also remember that playlist numbers start at 0, so if you have only two scenes, their numbers are 0 and 1, not 1 and 2. So in this case, the OSC message "scene 2" would do nothing.
Eric
Site Admin
 
Posts: 3174
Joined: Wed Apr 09, 2014 9:28 pm

Re: Guide for using OSC

Sat Jun 12, 2021 10:05 pm

The method I've used for operating the playlist from an external OSC source is as follows:

Software (in this case "Chataigne"):
Ensure a module is sending across OSC to the local address (ie 127.0.0.1)
The custom message that OSC should be sending = /myMessage (or something similar)
Set the message to send as a float parameter, such as 0.0, 1.0, 2.0 etc

In Magic Music Visuals: (Performer Edition)
Open the Playlist editor - show MIDI/OSC Config...
Choose the corresponding OSC device, and ensure the field is set to /myMessage as previously defined in the external software.
The playlist entries will now correspond to the value being sent. (ex. 2.0 will transition to the scene set in playlist item labeled "2".

------------------------------------------------


From the user manual:
The "Prev entry" and "Next entry" buttons are not the only Playlist functions that can be controlled by MIDI or OSC. Advanced users can configure their MIDI/OSC device to select any individual playlist entry at any time, rather than merely nagivating backward or forward.

There are two ways to select an individual playlist entry: using a global MIDI/OSC command whose value corresponds to the entry number, or using a unique learnable MIDI/OSC command for each specific entry (see next section). For users with MIDI/OSC devices whose messages are configurable, the global command is usually the easier method, because all the entries can be set at once.

When the Show MIDI/OSC Config option is enabled, the configuration options are visible at the top of the Playlist Window, as shown below. These indicate the settings that can be used to select an individual playlist entry...

----------------------------------------------------------------------------

...To control the Playlist with Open Sound Control instead of MIDI, simply configure the desired source in the Input Sources Window:

The Playlist Window will then allow an OSC command to be entered, as shown below:

In the above case, Magic will listen for all OSC messages on port 8000 and starting with the "/toggleA_1" pattern. The playlist entry # will be selected based on the value of the message's first argument.
sjdacruz
 
Posts: 35
Joined: Sat May 30, 2020 4:53 am

Re: Guide for using OSC

Sun Jun 13, 2021 3:13 pm

Thanks for all the help on this. I have had a heck of a time trying to get it to work.

I don't have a hardware controller for this stuff I'm trying to route through Lioranboard and the Command Line.

In the middle of typing this message out I decided I'd check in with Lioranboard Discord again and was given a good idea on where to look for another OSC sender. I found this one which seems to work consistently:

https://github.com/nulltask/osc-cli

Seems like the sender I was using was just not sending things correctly. I was also hoping to not have to dig into too much code to get this done and that was a success. Appreciate the testing from everyone.

Hopefully that link will help someone in the future trying to send OSC commands. For now I've got it working.
chabuku
 
Posts: 13
Joined: Tue Apr 27, 2021 6:39 pm

Return to General Discussion

© 2021 Color & Music, LLC • This web site is mobile-friendly