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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
kernighan
Novice


Joined: 14 May 2004
Posts: 37

PostPosted: Fri Nov 03, 2006 3:48 am   

CMud and Sound
 
Is using MSP supposed to work in CMud yet? Because when I went to set up MSP sounds, it (a) wanted me to load in WAV files one at a time (i.e., wouldn't let me tell it the directory/subdirectories of sounds to pull from), and (b) it wouldn't add the WAV files I selected anyway.
_________________
Kernighan's Medievia Scriptorium
http://www.geocities.com/mishikal
Reply with quote
SkicoreSK
Newbie


Joined: 03 Nov 2006
Posts: 6

PostPosted: Fri Nov 03, 2006 10:55 am   
 
I found that wav files that some wav files would not work where others did. A file that has an audio format "microsoft ADPCM". The audio format can be seen from summary of the files properties in windows XP. Do not sound when called by the Play command. (the file I have of this format has been drawn from the windows sounds.
Other wav files that I use have an audio format of PCM work as expected.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Nov 03, 2006 5:38 pm   
 
Not what you mean by "when I went to set up MSP sounds". MSP in CMUD works the same as in zMUD. You need to put the sounds into a "sounds" subdirectory of your character folder, or within the character folder itself. That's where it looks for the sounds. You shouldn't need to "set them up".

The difference between zMUD and CMUD is that CMUD uses DirectX (DirectSound and DirectShow) and will play any sound that you have the proper driver/codec for on your system. For example, CMUD allows MP3 files in MSP and can play multiple MP3s simultaneously. zMUD could only handle a limited uncompressed 8-bit wav format.
Reply with quote
kernighan
Novice


Joined: 14 May 2004
Posts: 37

PostPosted: Fri Nov 03, 2006 9:09 pm   
 
I don't want to put "sounds" into every single character subfolder. ZMud let me set, in the *general* preferences, a single folder to use for sounds, which is what I do. I have 10+ characters on the main mud I play, and it is much simpler to have an overall sounds directory to use, than to have to create multitudes of shortcuts.
_________________
Kernighan's Medievia Scriptorium
http://www.geocities.com/mishikal
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Fri Nov 03, 2006 10:58 pm   
 
Um, why would you just have a C:\CMUD\Game\Sounds directory and put all your Package/Session/etc files in the C:\CMUD\Game directory? That's the general idea, as far as I can tell.
Reply with quote
SkicoreSK
Newbie


Joined: 03 Nov 2006
Posts: 6

PostPosted: Fri Nov 03, 2006 11:00 pm   
 
kernighan wrote:
I don't want to put "sounds" into every single character subfolder. ZMud let me set, in the *general* preferences, a single folder to use for sounds, which is what I do. I have 10+ characters on the main mud I play, and it is much simpler to have an overall sounds directory to use, than to have to create multitudes of shortcuts.


#play C:\sounds\hit.wav for example should do what you want

Zugg I can play all my wav files via winamp player. Just the sound files from windows sound do not function via C mud. Including the default close session chime.wav. I thought this a little odd seeing as they are all wav files. So I dug a little deeper and discovered that they had different name for their audio format.
The following information is from; http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/compressing_sound_files.mspx?mfr=true

This is the file type that I can run via other media players (and Zmud) but not via Cmud. The location this type was drawn from was window XP sounds.

Microsoft ADPCM
The Microsoft Adaptive Delta Pulse Code Modulation (ADPCM) codec provides high-quality 4:1 for compression, in both real-time and otherwise, and is best for audio streams associated with high bit rate video.

This is the file type that most wav files I have are and Cmud has no problems with them. Sounds I use of this format where self recorded or drawn from sorces that where self recorded.

PCM
The Microsoft Pulse-Code Modulation (PCM) Converter provides uncompressed audio for higher bit rate content. With PCM, you can play an audio sample at one kilohertz rate on a sound card that supports another rate. For example, 8-bit cards can play 16-bit samples by reducing the quality of the audio to match the sound card's capabilities.
Reply with quote
kernighan
Novice


Joined: 14 May 2004
Posts: 37

PostPosted: Fri Nov 03, 2006 11:02 pm   
 
You are confused, and don't understand what I'm talking about. This has nothing to do with using #play. It has to do with setting up MSP triggers to work with Muds that support MSP.

--Kernighan
_________________
Kernighan's Medievia Scriptorium
http://www.geocities.com/mishikal
Reply with quote
bortaS
Magician


Joined: 10 Oct 2000
Posts: 320
Location: Springville, UT

PostPosted: Fri Nov 03, 2006 11:04 pm   
 
I think a couple people in the thread are confusing MSP setups with the regular #PLAY command. MSP is driven by the MUD, and that's why the files have to be in the specific directory. #PLAY is driven by the zMUD/cMUD user, so they can put the sound files anywhere they want.
_________________
bortaS
~~ Crusty Klingon Programmer ~~
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Nov 04, 2006 12:15 am   
 
I think what kernighan is asking for is one more level of searching for sounds. While this could, and perhaps should, be done through proper use of packages to divide tasks correctly between different characters all working in the same directory. I believe it is quite a bit simpler to understand that a sound requested by MSP will first be checked for in the Character Defined Directory\Sounds folder, then subsequent parents until the CMUD application folder itself. The pattern being: Character Defined Directory\Sounds, Character Defined Directory,Character Defined Directory\..\Sounds,Character Defined Directory\.., etc. In this case if the character files were split off into My Documents then that folder would become the limit before checking CMud application directory\Sounds and CMud application directory.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Nov 04, 2006 12:55 am   
 
kernighan wrote:
You are confused, and don't understand what I'm talking about. This has nothing to do with using #play. It has to do with setting up MSP triggers to work with Muds that support MSP.

--Kernighan

Not that you were talking to me, but please try not to use such vague subjects to your threads then, if it is possible, and maybe people won't get confused and start posting their problems in your thread. This thread could just have been called "[1.12] MSP question / issues" and would at least be a bit less vague than "CMud and Sound". Wink
Reply with quote
kernighan
Novice


Joined: 14 May 2004
Posts: 37

PostPosted: Sat Nov 04, 2006 1:17 am   
 
Sure I can do that, although I'll note the very first sentence of my original post says:
"Is using MSP supposed to work in CMud yet?"

If that isn't a pretty strong hint this is about MSP sounds, what is? ;)

--Kernighan
_________________
Kernighan's Medievia Scriptorium
http://www.geocities.com/mishikal
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Nov 04, 2006 1:27 am   
 
Obviously not strong enough for SkicoreSK. Anyway, it's much more helpful to people browsing the forum or going through forum search results.
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Nov 04, 2006 6:34 am   
 
You don't have to have a different folder for each character. If each character is on the same MUD, then each *.PKG session file is within the same directory (named for the MUD), and the SINGLE /sounds subdirectory of that folder is where it gets the sounds. This is needed to avoid MSP sounds on different MUDs from overwriting each other.

In other words, you should have the following file structure:

CMUD Directory
MUDName folder
Character1.PKG session settings for character 1 on MUDName
Character2.PKG session settings for character 2 on MUDName
Sounds folder
*.WAV files for MUDName MSP

This is the directory structure that both zMUD and CMUD expect. Each character on the same MUD has it's own session preferences in the *.PKG file, but they are all within the same subdirectory named for the MUD itself.

Also, I assume you have already gone to the Sounds preferences and set the Sound Directory there? If it's not searching that directory for sounds too, then that's a bug.

And people, let's stay polite here. The reason people use the #PLAY command as an example is that the #PLAY command uses the same code as MSP to play sounds. The #PLAY command is like the user interface to access MSP. So if a sound doesn't work with #PLAY, then it won't work with MSP.

And #PLAY *does* support the Sound directory in the preferences. If I set the sound directory to C:/WINDOWS/Media and then say "#PLAY ding.wav" then it works fine, and so MSP should be doing this too.
Reply with quote
SkicoreSK
Newbie


Joined: 03 Nov 2006
Posts: 6

PostPosted: Sat Nov 04, 2006 10:20 am   
 
Rather than making a new thread I will comment again on this one.
Sound triggers do not function when Cmud is not window on top for some reason.
I use sound triggers to draw my attention back to the mud I play for example if someone wakes me up when I am sleeping. I get bored easy and go off and look at something like these forums. Currently this does not work Sad
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Nov 04, 2006 5:55 pm   
 
I think this is the normal way DirectX works. Usually only the active application can use sounds. But I know some games get around this somehow and I'll try to figure out how to do it for a future version.
Reply with quote
kernighan
Novice


Joined: 14 May 2004
Posts: 37

PostPosted: Sat Nov 04, 2006 8:08 pm   
 
Zugg, thanks for the explanation. I'll play more with getting MSP sounds to work. I still think the area under MSP Sounds in the default config area isn't working right, but I'll work to give you a reproducable set of steps if I can confirm that.

+1 on the getting the direct X Sound when not the foreground app fixed, I too tend to depend on hearing sound when ZMud is not in front. Just when I was getting excited about maybe writing a CMud MP3 player so I could stop using the odd Winamp COM interface. ;)
_________________
Kernighan's Medievia Scriptorium
http://www.geocities.com/mishikal
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sun Nov 05, 2006 2:01 am   
 
Yeah, I use play a sound when an enemy enters the room in case I'm afk or in another window. Although I'm not sure the "Uh-oh" sound I use really helps me fight!
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 08, 2006 7:14 pm   
 
Zugg I thought I would post this tidbit here when you are ready to change the settings for sound when cmud loses focus. If this stuff is useless then just ignore this post :p

From http://www.codeproject.com/cs/media/AmbientSounds.asp
GlobalFocus MSDN

// Holds a DirectSound SecondaryBuffer.
private Microsoft.DirectX.DirectSound.Buffer m_SoundBuffer;

// Describe the capabilities of this buffer.
BufferDescription bufferDescription = new BufferDescription();
bufferDescription.ControlVolume = true; // Let's us control the volume.
bufferDescription.ControlPan = true; // Let's us control the panning.
bufferDescription.ControlFrequency = true; // Let's us control the frequency.

// Tells the primary buffer to continue
// play this buffer, even if the app loses focus.
bufferDescription.GlobalFocus = true;

// Pass in the path to the wav file, the buffer description,
// and the Device we created above.
m_SoundBuffer = new SecondaryBuffer(m_FilePath,
bufferDescription, m_ApplicationManager.SoundDevice);
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Dec 08, 2006 10:44 pm   
 
Cool, thanks for the info. This was trivial to fix, so I have it fixed for 1.22 thanks to you!
Reply with quote
ajk282
Newbie


Joined: 24 Dec 2009
Posts: 1

PostPosted: Thu Dec 24, 2009 1:25 pm   
 
I'm using Cmud in a windows vista ultimate OS and playing Midkemia Online. What I wanted to do was set up a trigger that changes the color of the pattern AND plays a sound but I can't get it to work. The trigger is set up in the following way.

#TRIGGER {You pray for the divine protection} {#play DIARMOR1.wav} {#COLOR cyan}

After reading some of the above posts I don't see any character folder inside the package for Midkemia and I simply have all my sounds in the CMUD root directory. The trigger fires off and changes the pattern to cyan but no sound. What am I doing wrong?
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Thu Dec 24, 2009 5:12 pm   
 
Did you try that as {#play DIARMOR1.wav;#COLOR cyan}?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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