Sound clips

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Sound clips

Post by jfrazierjr »

Scubba wrote:OK, fresh on the heels of a gaming session last night, here are the sorts of things I want, high-level functionality-wise:
  • Having audio associated with a token, playable via a right-click action ("signature" audio)
"Go for the eyes Boo!"
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: Sound clips

Post by dorpond »

I did a whole mockup a long while ago of how I'd like to do sound in Maptool:
Discussion: http://forums.rptools.net/viewtopic.php?f=3&t=2417
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

User avatar
aku
Dragon
Posts: 856
Joined: Wed Nov 15, 2006 9:03 am
Contact:

Re: Sound clips

Post by aku »

another thing to consider, is what file formats to support. if memory serves corectly (when does it) some formats (ala .mp3) are not open license encode/decode, in other words, in order to have support for them in a program, there needs to be a licensing fee paid.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Sound clips

Post by Azhrei »

Yeah, this gets tricky. The only file formats that would work across platforms would be the very basic stuff: WAV and AU, basically. But those things are huge.

Ideally we'd be able to use Vorbis in an Ogg container. They support variable bit rate sounds as well as constant bit rate, so the file size can be much smaller than MP3 for complex musical scores. Add in the variable compression techniques (the user can compress by quality, size, or bit rate) and you get a very flexible system. Especially since the sounds would need to be treated just like any other asset and stored in the campaign file (Bloat Alert!).

I suppose sounds could be on a repository, but it's probably best if they are downloaded after connecting to the server and not waiting until they're needed. Otherwise a lagging 'net connection could make playing sounds super distracting. :?

I read the first page of the thread dorpond linked to -- there's some very good stuff there and I'm going to have to go back and read the other pages as well. Lots of things to keep in mind as we restructure the MT code...

User avatar
Scubba
Cave Troll
Posts: 90
Joined: Fri Oct 30, 2009 12:47 pm
Location: Oakland, CA

Re: Sound clips

Post by Scubba »

Thanks, Dorpond! I guess I should have bothered to look to see what ideas had gone before when I responded to stevebygodsmith.

I like the features described in the thread, they are akin to the vision and lighting effects--the sort of "professional" features that set MapTools apart from a lot of hobbyist efforts.

But that being said, it is also the simplest ideas that excite me as well: simple GM-triggered sounds, Initiative-based sounds, etc.

Once again, I suppose this is a "1.4" sorta thing. I'm putting whatever fractional vote I have for sound support.

User avatar
taspoff
Kobold
Posts: 15
Joined: Fri Mar 19, 2010 10:27 am
Location: France (Guyancourt / Limoges)
Contact:

Re: Sound clips

Post by taspoff »

Hello,

I made a test some times ago with VideoLAN, which is working on linux, windows, and Mac (VLC):
- There is a http interface inside VLC. This second interface is started from main interface, or from command line
For Linux:

Code: Select all

./vlc --http-host 127.0.0.1:8081 --extraintf http &
or for Windows

Code: Select all

start  "VLC Maptool" "C:\..\VideoLAN\VLC\vlc.exe" --extraintf http --http-port 127.0.0.1:8081 
)
- this HTTP interface can be accessed via a MT macrolink or from a button. VLC allow making a webpage playing a mp3 location in URL parameter (like http://localhost:8081/MaptoolMusic.html?C:\MySong.mp3" ). It's not hard to make a property on a token tagged "music" and only visible from the GM, wich can give the location of a MP3 file on hard disk, and which can be concatened in a MT macro.

So my idea was to put 3 (or more) VLC working in parrallel, one for ambient music (with loop option enabled), and 2 for FX, on separate ports (say 8081 for Music, 8082 and 8083 for FX), so I could launch different sounds, while music or natural sounds are in background without leaving Maptool...

This is working for local playing, and VLC is able to stream music on the net, so I guess it could be usable for on the net playing too....

Only problem I did't solved yet : I failed with MP3s with space or special caracters inside name...(well, I'm a noob with HTML, Url parameters ,encode/decode etc). Any help would be great.

Here is the code to put inside the ../VLC/http repertory as MaptoolMusic.html file in my exemple

Code: Select all

<html>
<head>
  <title>VLC media player - Web Maptool Interface</title>
</head>   
	   <body>   
	<br>
	playing for Maptool [<vlc id="value" param1="url_value" />]

		<br>
		<vlc id="rpn" param1="playlist_empty" />
		<vlc id="rpn" param1="url_value value 'MaptoolCurrentMusic' playlist_add " />
		<vlc id="rpn" param1="vlc_play" />
	   </body>
 </html>
	   
That was my 2 cents (and sorry for my baaaad english)

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Sound clips

Post by Azhrei »

taspoff wrote:I made a test some times ago with VideoLAN, which is working on linux, windows, and Mac (VLC):
- There is a http interface inside VLC.
Oh man, this is a great idea! And it doesn't require any direct support from MT beyond the ability to send URLs to a particular IP address/port (which is part of the basic browser support).

In the OSX version of VLC v1.1.3 I can start the web interface from the application menu under Add Interface > Web interface.

VLC can stream using a variety of different protocols. I think it might be nice if it can be piggy-backed on MT's TCP/IP stream since that wouldn't require any other setup of the user's network configuration.
this HTTP interface can be accessed via a MT macrolink or from a button.
Yeah, this is what makes it such a great idea!
So my idea was to put 3 (or more) VLC working in parrallel
Is that really needed? I think VLC can be playing multiple streams at once so a single instance of VLC should be plenty. Although I don't know if that capability is exposed via the web interface...
Only problem I did't solved yet : I failed with MP3s with space or special caracters inside name...(well, I'm a noob with HTML, Url parameters ,encode/decode etc). Any help would be great.
Put your URL into the encode function and out comes a URL with all the proper conversions. :)

Code: Select all

[h: url = "http://some/url/here" ]
[h: url = encode(url) ] 
That was my 2 cents (and sorry for my baaaad english)
Heh. Your "bad English" is 100x better than my French! (I don't know French at all, so it would be a Babelfish translation!) 8)

User avatar
JonathanTheBlack
Dragon
Posts: 544
Joined: Mon Jun 28, 2010 12:12 pm
Location: I'm the worm...

Re: Sound clips

Post by JonathanTheBlack »

I'd love to add streaming battle music to my combats that I could change as needed as the tide of battle shifts. I just don't know how to go about doing that with VLC... :cry:

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Sound clips

Post by wolph42 »

I gather that with VLC we can already make use of sound in MT within macros? But I'm not entirely following the how-to. Can someone give a step by step example?

edit: and that was my 1000th post. :shock:

User avatar
taspoff
Kobold
Posts: 15
Joined: Fri Mar 19, 2010 10:27 am
Location: France (Guyancourt / Limoges)
Contact:

Re: Sound clips

Post by taspoff »

Hi!

Glad to see it was a good idea.... :)
Quote:
So my idea was to put 3 (or more) VLC working in parrallel

Is that really needed? I think VLC can be playing multiple streams at once so a single instance of VLC should be plenty. Although I don't know if that capability is exposed via the web interface...
I don't think there is an option to "mix" music (something slow and enigmatic), natural ambiant (like water dropping in a sewer), and FX (a Raptor screaming) at the same time with VLC. Beside, 3 or 4 concurrent VLC , on different ports, are easy to start in a .bat or a .sh (dunno for Mac...) with command-lines...And they're easy to target in the macro to construct URL...
Put your URL into the encode function and out comes a URL with all the proper conversions.


Code:
[h: url = "http://some/url/here" ]
[h: url = encode(url) ]
Problem for me wasn't on MT side, I definitively blocked on the VLC Side : I 'm very ignorant about subtetly of HTML / javascript, and I got very hard time to make the simple MaptoolMusic.html above.... It's this file which cannot read space or special caracters.... :(

There is the Doc (in english) for STREAMING with VLC and another one for Building this darn http VLC File... I admit to have abandonned the idea to do more, due to my low skills, and the newly born baby / new house didn't helped to give me spare time for that :)

[edit:] For Streaming : just add for every VLC GM Server the option to output the sound on a stream (different port, again), and ask the players to start the same amount of VLC clients in listening streams, than you have as streaming servers (music, ambient, FX1,FX2)... Playing a sound on VLC streaming server should so be played too on VLC client...never tested, but i think it shoud works...

T.

User avatar
JonathanTheBlack
Dragon
Posts: 544
Joined: Mon Jun 28, 2010 12:12 pm
Location: I'm the worm...

Re: Sound clips

Post by JonathanTheBlack »

Hopefully someone with some time on their hands can sort out how to make this work and create a set of clear english steps to set it up. Even if it requires formatting the mp3 files a specific way without spaces or special characters.

User avatar
taspoff
Kobold
Posts: 15
Joined: Fri Mar 19, 2010 10:27 am
Location: France (Guyancourt / Limoges)
Contact:

Re: Sound clips

Post by taspoff »

Not sure it will be clear english, but there are pictures ;)
I made a short doc to install/use HERE


User avatar
taspoff
Kobold
Posts: 15
Joined: Fri Mar 19, 2010 10:27 am
Location: France (Guyancourt / Limoges)
Contact:

Re: Sound clips

Post by taspoff »

wolph42 wrote:thnx, but the picture is unreadable (too low res)
Did you downloaded the whole PDF?


Post Reply

Return to “MapTool”