Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
thegto
Beginner


Joined: 12 Jun 2007
Posts: 20

PostPosted: Mon Sep 28, 2009 6:17 pm   

How to add sound in zmud ?
 
could somebody give some example how to add sound while I am fighting, and theme music when I change area ?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Sep 28, 2009 7:14 pm   
 
You'll want to look at the #PLAY and #MEDIA commands. Also if you MUD supports MSP zMUD can automatically the sounds you MUD sends.
_________________
Asati di tempari!
Reply with quote
LordFett213
Novice


Joined: 20 Aug 2008
Posts: 34

PostPosted: Mon Sep 28, 2009 7:19 pm   
 
Code:
#VAR sound1 {C:\Documents and Settings\User\My Documents\sound1.wav}
#TRIGGER {Trigger text} {#play @sound1}
Reply with quote
thegto
Beginner


Joined: 12 Jun 2007
Posts: 20

PostPosted: Tue Sep 29, 2009 5:14 am   How to add sound in zmud ?
 
Code:

#CLASS {souldeffects}
#VAR Elightning {C:\aardwolfsounds\fighting\lightning01.wav}
#VAR Tblank {C:\aardwolfsounds\themesong\blank.mid}
#VAR TCayon {C:\aardwolfsounds\themesong\elementalcanyon.mid}
#VAR Tdeadlands {C:\aardwolfsounds\themesong\deadlands.mid}
#VAR Teternal {C:\aardwolfsounds\themesong\eternalhalls.mid}
#VAR Efire {C:\aardwolfsounds\fighting\fireball.wav}
#TRIGGER {^You swing hard at} {#play @Tdeadlands}
#TRIGGER {^Your spear of lightning} {#play @Elightning} "" {skip|param=4}
#TRIGGER {^The Grand City of Aylor ~(G~)$} {#play @tcayon}
#TRIGGER {^The Aardwolf Plaza Hotel ~(G~)$} {#play @Teternal}
#TRIGGER {is DEAD!!$} {#play @Tblank}
#TRIGGER {(*) is burnt to a crisp by Odin's spear! It is DEAD!$} {#play @Tblank}
#TRIGGER {^Your backstab misses} {#play @Tdeadlands}
#TRIGGER {^Your shroud of flame} {#play @Efire} "" {skip|param=4}
#TRIGGER {^You breathe forth a huge blast of fire.$} {#play @Tdeadlands}
#TRIGGER {(*) is burnt to a crisp by Odin's spear! He is DEAD!$} {#play @Tblank}
#TRIGGER {(*) is burnt to a crisp by Odin's spear! She is DEAD!$} {#play @Tblank}
#CLASS 0



Thank you very much

I tried to make sound effect during combat.
I make background sound or "theme" with Midi file format, about 4 min when I start to fight, but I don't know how to stop when "#TRIGGER {^* is DEAD!!$}"
Is there any command to stop the sound or somehow to make the Midi theme slightly vanish.

and my Fire sound effect it seems too loud, is there anyway to adjust the volume ?
I'm not sure if it's because of I got multiple line of "Your shroud of flame" from MUD so Trigger is firing many times.

Thank you in advance
Very Happy

-----------------------------------------------------------------------------------------------------------------
Edit:-
Ok, I made a blank Midi file from blank.txt-->blank.mid and #play blank.mid also stop my theme song :)
for the effect that was too loud, I encoded file to get the level of volume I need.

Script above I have just updated,
It will fire when I change Area or when I am fighting

if anyone has any suggestion, I will be appreciated.


Last edited by thegto on Tue Sep 29, 2009 5:19 pm; edited 1 time in total
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Sep 29, 2009 5:10 pm   
 
Code:
#PLAY off
should the trick.
_________________
Asati di tempari!
Reply with quote
thegto
Beginner


Joined: 12 Jun 2007
Posts: 20

PostPosted: Tue Sep 29, 2009 5:37 pm   
 
Tech wrote:
Code:
#PLAY off
should the trick.


ahh thanks this is much easier, why help file hasn't told like this -,-!
Is there any other parameter that I can play with #PLAY ?

Ermm, I'm a bit curious about, *.MID file can play just once a time but *.WAV can play same time together with MID ?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Sep 29, 2009 6:15 pm   
 
That's because of sound processing components used in zMUD. CMUD can play both simultaneously because it uses the Direct X interface.

[P.S] It was on my to do list to update the documentation so I'll do it now.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Sep 30, 2009 4:46 pm   
 
zMUD can play up to 10 WAV files at the same time if they are all just 8-bit uncompresses wav files. Other formats may not play at the same time. Only one MID file can play at once.

CMUD uses DirectSound and DirectPlay for sounds and can play any number of simultaneous audio files of almost any format (including MP3)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net