Embedding or linking to audio files

I am super new here. Initially, I plan to use Tinderbox to plan and run some tabletop (well, Zoom-based at least until we’re allowed to see people in person again) role playing games.

Can I store and launch an audio file from within TB? I played around with this but only ended up with a note that had the same name as my song.

Barring that, is there a way to link to an audio file that exists in my Mac’s file system?

My use case is simple: I want to launch thematic music or special effects noises when I am running specific scenes in the game.

Thank you and it’s nice to meet you all!

  • chatty

I don’t believe Tinderbox note text spaces are (currently) deigned for drag-drop multimedia. But there are other solutions. Using a File-type attribute as a Displayed Attribute for the note, you can click on the folder-like icon. That action basically asks finder to ‘open’ that file. As it is a sound file, Finder will choose the app associated with that file type.

If you have several sound files for one note you can create additional File-typed User attributes.

. There is a current OS issue in macOS Big Sur that means the button is there but the icon doesn’t draw: this is being addressed at present.

Thank you! I will give this a try.

Honestly, I’m happier linking to an external library of media files than stuffing them into Tinderbox even in this era of cheap storage.

1 Like

I’m sure there will be some trial and error. For example Finder may open an app but not the one you want. So, the early stage is Finding this stuff out.

If you are going to read/present from the Preview pane (i.e. the ‘web’ representation) of your note you may find there are different options for calling your sound file.

So, whilst I don’t know the definitive answer as I write this, I’m sure a workable solution is possible—with ‘some construction’ necessary.

cool idea

The best way to do this, IMHO, is to use the attribute $File to hold the location of the sound file. Make $File a Displayed Attribute, then drop the sound file onto it.

To play the sound, click the file icon to open the file.

this is what I do now.

also I clearly pasted the wrong link when I originally posted 2 years ago. I was using https://roll20.net

If you want custom voice messages, another recent possibility is to use String.speak(["voice"]).

if($Success==false{
   var vMsg = "You should have taken the blue pill";
   vMsg.speak;
}

or, here also specifying a non-default voice (my UK system only has Daniel and Kate)

if($Success==false{
   $Text("some message").speak("Kate");
}

Note that you can’t chain .speak() to a literal string :

"Hello".speak(): // DOES NOT WORK!

If you made a Dictionary of short strings, you could then make a function where you pass in the key for the message (and optionally a voice name), and have the relevant message for that key read for you (in the voice specified).

†. @eastgate, noting this as an exception. IIIRC most string operators can chain off a literal string. Here, a var routes around needed an attribute.