Haptic or Sound Feedback on tablet possible?

Is it possible on the server side, so using an iPad or touch tablet to connect to my Master PC via browser to use OSC. Is it possible when a button is pressed to send haptic feedback or atleast a sound to the tablet to confirm a button is pressed?

My workaround for now is I can attach a small AHK script to play a windows event sound which will come through the master. But I was curious to know if there was another way to do it through the tablet even?

Thanks! :smiley:

Nope, not in open stage control.

1 Like

Maybe, as a workaround, you can use a frame element and include a sound in it?

Thanks for the suggestion! I’ll have to give it a go and try. At the moment I’m unsure exactly how that will function. Reading the documentation on frame element that it uses local addresses to call. I’m wondering how I could open a specific sound file via addresses.

At the moment the work-around I’ve been using (but there is a few hundred miliseconds of delay) is running a script. With OSC I use AutoHotKey for alot of scripts and commands. So, I basically let AHK after executing a script to also play a sound file to let me know it’s been executed. It’s a workaround but not the cleanest and there is the delay. :sweat_smile:

Edit: Okay, so is it as simple as placing it in the Value: box. I can’t get it to work just yet, but say I have it in a folder in the directory like this ..Sounds/CLK_LOGIC2.wav. How would you direct the file to play it?

In fact, I though it couldn’t work because browsers have disabled autoplay…

but it seems to work at least in electron

Sorry @jean-emmanuel for my crappy javascript…

So put this in sound.html:

<script type="text/javascript">
function playsound() {
var urlParams = new URLSearchParams(window.location.search);
s = urlParams.getAll('sound')[0];
document.getElementById('a').innerHTML = '<audio controls autoplay><source src="'+s+'.wav" type="audio/wav"></audio>';
document.addEventListener("DOMContentLoaded", playsound);
<div id="a"></div>

Put some sounds like sound1.wav or sound2.wav in the same dir

Next, add a frame and put this in value:

<YOUR PATH> .. sound.html?sound=sound1

It should disply and play sound1.wav automatically

after that, you can alter the query string dynamically with open-stage-control

Sorry it is just a workaround…

Thanks for the reply and your workaround JS @cyberic

The only thing I’m stuck trying to figure out is what you meant by <YOUR PATH> in the frame value.

I’m assuming creating a sound.html and adding sound1.wav in the same directory as the OSC.json session-file. So my assumption would be:
<C:\Users\Dillon\Dropbox\OSC Templates> .. sound.html?sound=sound1

This however must not be the case since the frame isn’t working. Unless, the autoplay function doesn’t work in chrome. Do I have the PATH set right?

Thanks! :smiley:

The frame’s value must be an http address, you must have a http server running to serve sound.html.

So, I basically let AHK after executing a script to also play a sound file to let me know it’s been executed

Having the script that runs the action play the sound is the most effective and clean way to do what you want, if there is delay maybe the playing method can be improved.

1 Like

@jean-emmanuel would you consider adding a new widget, a bit like a frame, but which could contain arbitrary HTML?

This way, having a web server could be avoided for some use cases

1 Like