Sending a Text string not working

We have a media player that can be controlled by OSC command. Down under you will find an overview of the commands and arguments. Now I would like to create an internal web server that preferably boots from the command line. Here would then come a simple view with a few buttons to control the player from an external web browser.

Commands whit a Integer argument are working wel but a string whit text is a problem.

How can I best approach this project. Any help is welcome.

Osc Command
/video videofile name (text)
/videoloop videofile name (text)
/dir folder name (text)
/stop 0 (integer)
/quit 0 (integer)
/volume 0-100 (float)

What seems to be the issue here is that the string commands have 2 arguments, where by default most widgets send only one argument (except xy pads for example but that another subject). In open stage control you can send multiple arguments in an osc message either by using the widget’s preArgs property (to prepend arbitrary arguments to the widget’s actual value or by using the widget’s script property.

Example

Sending /video videofile name with a single button widget (assuming either the widget’s target or the server’s ̀send` option is already set).

With preArgs: set the properties as follow

  • mode: tap
  • address: /video
  • preArgs: videofile
  • on: name

With script: set the properties as follow

  • mode: tap
  • script: send("/video", videofile, name)

If I misunderstood it and “videofile name” is actually supposed to be a single argument, then simply leave the preArgs property empty, or remove the second argument in the send() function of the script.

Hi Jean,
First at all thanks for the fast feedback.

a small correction. there is no second argument just one.

for example:
address (argument): /video
text (string) command: film-1.mp4

Ive whe would like to play another movie there is another button whit a new text (string) command: film-2.mp4 etc .

What do you mean whit te mode and on

  • mode : tap
  • address : /video
  • preArgs : videofile
  • on : name

Is it possible to make a small example how it works?

Again thanks a lot.

Ok it works.

Mode is the function of te button like toggle and push.

And you have to give the name in the Button: ON inputbox.

Ignore Defaults en bypass in the OSC tab has to be False

And at least i give the Widget ID the name of the command. That gives also a error.

What's the error ? The id is only used as the osc address if the address property is not set.

Just to know its name ?
Cheers

Whe made our own configuration based on the OMX player. A programmer made it for us and whe use these setup for our own projects. But the magic is a script that OSC or MQTT input commends linked to the standard functions of OMX.

It was not a error. sorry for the miscommunication :slight_smile:

OMX player.
ok cool.

Open source it please !!! :slight_smile:
Looking for a light "headless" audio player to be controlled via open sound control to create a project where people can launch samples into a room.

Point is we have paid for the programmer to create these configuration. But ive you take a look to omx triggered by osc in Google. You will find a few opensource projects.

For me it was to difficult as non-programmer to make it working.

But you will find a few sollutions whit soure-code.

ok no pb at all :slight_smile:
just note https://github.com/popcornmix/omxplayer/blob/master/COPYING
so :
The GNU GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license. There are multiple variants of the GNU GPL, each with different requirements.

so maybe you should open sourced it.
By the way,

Note: omxplayer is being deprecated and resources are directed at improving vlc.

so now i have to look for vlc with open sound control or another program.
best regards

The development is not Raspbian, OMX, and OSC or the PI-4 that whe use. It is the combination of all these ellements and the differrent scribts as Python that brings al these separate applications together. And that is where the programmer did these job. As you no programmers are not working for free.

So yes whe use open-source applications. But whe use these free ellements to create a sollution for our projects. Whe not selling the player and the software. It is a part for a bigger (commercial) project in example experinence centre and museums where whe earn the money

A lot off commercial products our running on Linux. I belive it is the same thing. Al the credits will go to the developers of Linux. Samething for webdevelopers. The use also Wordpress to create commercial websites. :wink:

Whe can always share the cost for the programmer ive you need a compleet solluttion. :wink:

« When distributing derived works ». There no legal obligation to do so.