Jump to content


Photo

Sxms V3.0.6.1 (beta) - Audio Dll


  • Please log in to reply
400 replies to this topic

#1 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 25 October 2005 - 05:32 AM

(LAST UPDATE - November 24th, 2006)
Updated SXMS to version 3.0.6.1b, check the linked post for more information.

Shaltif's Xtreme Music and Sound
The Fmod / WinAmp Wrapper for GAME MAKER
Brandon Rohrer -- Version 3.0.6.1 Beta
========================================

(Link to post when version 3.0.6.1 Beta was released -> here)
(Changes can be found -> here)

Audio Formats:
Fmod - mod, s3m, xm, it, midi, wav, ogg, mp3, wma, cda, flac
WinAmp - nsf, spc, gym, psf, usf, (and many others, depending on in_ plugins)

Features:
-Able to play a large (and ever expanding) amount of audio formats.
-Easier to use with new sxeasy_ scripts.
-More direct to Fmod Ex's API, even includes Fmod's full help documentation for advanced users.
-All Fmod's formats can be played with the exact same API (no MC, ST, SA, etc functions anymore)
-Can stream audio right from the hard drive (or even over a network/internet)
-Includes Hardware, Software and Virtual channel support.
-Full visualization analysis for any of Fmod's formats.
-Record from any of Windows' input devices with ease. (mic, line-in, stereo mix, etc)
-Able to setup multiple system objects for multi-instancing Fmod.
-Fmod DSP support using Pre-Included DSP units
-Mono, Stereo, Quad, Surround, 5.1, 7.1 and Prologic output support.
-Ability to set and get the panning, frequency, volume, position and priority of any playing sound.
-Channel grouping support, to have groups of channels which can all be effected (like a Parent > Child setup)
-All new constant flags for easier using of scripts.
-WinAmp compatable. Able to play using most in_ and out_ plugins avaliable.
-Full FSB support, allowing multiple audio files to be packed in a single file.

And of course, it has audio playback :D

(Coming in a future release)
-Geometry support (For full 3D capabilites)
-External DSP plugin support (so users can make there own DSP plugins for Fmod)

Introduction:
...and here we are again with another installment of the ever so popular SXMS wrapper for Fmod Ex / WinAmp. The long awaited SXMS, an advanced/altnerative audio system for Game Maker, is now avaliable to the public for beta testing.

Beta:
As of this writing, SXMS is still in the beta testing stage. Cause of this, not everything is fully implimented yet. Also, it may still be buggy (as there is a lot of scripts to test), so if you notice any problems, please inform me so that it may be corrected.

Script Types:

This version of the SXMS API contains three (3) main script types. sxfmod, sxwamp and sxeasy.

sxfmod - These scripts control the Fmod Ex side of SXMS.
sxwamp - These scripts control the WinAmp side of SXMS.
sxeasy - A set of "wrapper" scripts for the Fmod Ex side which are "easier" to use for a new user.

Documentation:
There is currently no external documentation as of this version. However, every script has detailed infomration on it's arguments, returns and what it's used for. So feel free to open a script up in question and read away.
*The sxeasy_ scripts have yet to include such documentation, as they have yet to be finalized.

The Fmod Ex documentation has been included to aid those using SXMS and/or to show users what Fmod Ex can really do. Feel free to reference to this as it probably contains more/better information than I could possibly place inside a single script.

Examples:
The package contains two (2) examples (one using sxeasy, another using sxwamp). I HIGHLY recommend you check these examples out, to see how things are done. Even experienced SXMS users should at least look over them, as function calls are completely different time time around.

To run the example:
1. Run the program, making sure everything is unzipped and together in the same folder.
2. It will ask you which example to view (1 is sxeasy, 2 is sxwamp).
3. Follow the on-screen instructions.

Note: The sxwamp example is "still" a bit thrown together, so here is a bit of an explination about what is going on. When you choose the 2nd example (sxwamp), a dialog will appear asking for an output plugin (out_) file. Go to the sxwamp plugins folder and select out_ds.dll (or any of the others). Then it will ask for an input plugin (in_) file. Again, go to the sxwamp plugins folder and select the perfered input plugin. then follow the on-screen instructions.

MAKE SURE TO READ THE README!
I have the readme in two (2) spots. In a text file called readme.txt and as the script sxms_readMe(); So make sure to READ IT. It explains how to install the scripts into your project, along with other important information.

Please report any bugs, comments or suggestions in this topic. I will update this post whenever a new version is avaliable.

And the download is...where?
If you view my signature, you will see a link called "SXMS v3.0.0.3 Beta - Audio DLL Download". Just click there and away you go. Do NOT go to my website, since the files there are outdated.

Additional Information:
As of yet, there is no official documentation on the flags/contant types. For a list of the avaliable ones, open up sxms_internal() and just scroll down. They are all listed at the top (in CAP like fashion). Any function that "requires" a flag will tell you the type it's looking for (like FMOD_DSP_TYPE_). If you need exact meanings for any, you can either ask me or consult the Fmod Ex help documentation.

Since no example of the sxfmod_ functions has been made, here is a basic setup of how it's done.
//Before anything, you need to create SXMS
sxms_create(working_directory+"\SXMS-3.dll",1);
//Create a sxfmod system object
sxfmod_system_create();
//Set the output to WINMM (DSound currently doesn't work with GM 6.x)
sxfmod_system_setOutput(sxms.FMOD_OUTPUTTYPE_WINMM);
//Initialize the system object
sxfmod_system_init(32,sxms.FMOD_INIT_NORMAL,0);

//Then from here, create a sound (we are assigning the index as 0)
sxfmod_system_createSound("c:\mysong.mp3",sxms.FMOD_SOFTWARE|sxms.FMOD_CREATESTREAM|sxm
s.FMOD_2D,0);

//Then to play
sxfmod_system_playSound(0,0);
Thank you everyone! From the developers of recent to the users way back on EzBoard supporting VMod Player. It's cause of you that I continue to develop this project. I also want to thank everyone for being so patient with my development schedule. Thank you all, once again.

Enjoy the ride,
~Brandon
  • 0

#2 PLAY: More

PLAY: More

    Press F8 to enter BIOS

  • New Member
  • 824 posts

Posted 25 October 2005 - 07:16 AM

YAY! FIRST POST! ^_^ :D
On topic:
Thanks. You just docked 5 megs off my shooting game replacing mp3's with ogg files and WAVs with WMAs.
Edit: My opinion.
:D
This DLL allows you to play many different types of music/SFX and lowers your file size significantly. Very good & useful.

:)
It's very very very confusing for a first-time user. However, it was worth learning it.

Rating: 9/10

Edit 2: I found no bugs yet.

Edited by PLAY: More, 25 October 2005 - 07:21 AM.

  • 0

#3 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 25 October 2005 - 01:04 PM

Great job!!!

As always :D

Keep it up!

Can we expect a sxms player4??
  • 0

#4 andrewmc

andrewmc

    GMC Member

  • New Member
  • 440 posts

Posted 25 October 2005 - 04:59 PM

Very good job, I'm impressed.
  • 0

#5 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 25 October 2005 - 05:03 PM

It's very very very confusing for a first-time user. However, it was worth learning it.

Ya, as of it's current state, it is quite a task for a new comer to get started with it. The comments in the scripts (if you know which ones to look for) help now, but a full Help Document is in the planning with full examples.

Glad to hear you found no bugs and that it appears to be working smoothly! Keep me informed if anything comes up.

Can we expect a sxms player4??

Not anytime soon, but eventually I plan to upgrade my media player with this version of SXMS and SCC 3.0. One major improvement, is that MOD files now display a time/length in ms, rather than having to use the old "orders" deal. So I can't wait to have that in my media player. Downside though is that DirectSound no longer works with Game Maker (I think Game Maker is doing something to DirectSound to hinder Fmod from using it, as all my C/C++ tests with Fmod's DirectSound work perfectly).

EDIT:

Very good job, I'm impressed.

Thanks for your comments :). I need to post faster next time :D


Btw, I'm not sure if you guys caught this, but the example 1 (using sxeasy) has 3 built-in visuals you may check out while playing a song. Just load up your song, play and then press 1,2 or 3. Each one uses a different method of visual processing, and the first one shows the new "Stereo" support for visual return.

~Brandon

Edited by Shaltif, 25 October 2005 - 05:06 PM.

  • 0

#6 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 25 October 2005 - 05:54 PM

Too bad that FMOD is 1,000$ per licence...
A waste of potential for commercial games. :D
Making better possibilities for audio settings for games with this, is better.

Edited by Shinnoki, 25 October 2005 - 05:56 PM.

  • 0

#7 Kaleta

Kaleta

    GMC Member

  • New Member
  • 211 posts

Posted 25 October 2005 - 05:56 PM

Well, you put pretty much work into it, but still, there is possible to perform a critics.


Its a pity, I want nothing more than dll able to play mp3 and midi FROM RESOURCE DIRECTORY, other things "can be stolen" of me. (I have wav one already) Is it possible? Such trivial requirement... I have no idea why to complicate my life by playing sounds included in GM file by anything else than GM file.
It even can't play two songs together, to make a rota (canon).

No, its not apparent, how to play a sound from the directory. I have tried several dll's, some didn't worked, some worked weirdly, but finally I used one by roachofdeath (this one at least worked weirdly). I deleted useless scripts with frequency and panning features and changed 0 to 1 somewhere, to make it suddenly work. And that was all, what I had to do.
DirectX, FmodEx, those are just another english words to read, for me.

Yes, it would be good, if it can PAUSE midi and mp3 songs, for example, you are in main base room, there is -naturally- groovy music, and when you exit it and enter again, you don't have to listen it from beginning. It was one of success reasons of HOMAM 3.

I like the visualisations... maybe someone could use it in game, as visualisation of sound output. But only, if it is able to visualizate all audio output, a mix of music, shooting and explosions.

Edited:
I even can't delete the directory where it was placed.

Edited by Kaleta, 25 October 2005 - 06:07 PM.

  • 0

#8 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 25 October 2005 - 06:30 PM

I'm not sure I follow Kaleta.

SXMS-3 can play up to 1024 songs at once, if you wanted. You can start a song from any position (ex: Play then Seek). You can pause any/all sounds at anytime (you can even start the song paused). You can't play from resources stored within the GM game itself cause that type of information can't be pulled from the compiled EXE. All audio formats are treated the same, so pausing/seeking a midi works just like an mp3.

After reading your post, I don't think you gave this much of a chance (or at least experiemented with it). Almost everything you said it "couldn't do" it can do just fine. It uses FmodEx, which is used in many commerical ventures (World of Warcraft uses FMOD) and is cross platform (there are xbox 360, GameCube, PS2, PSP, Linux, Mac versions...although this build is around Win32). So it isn't just a simple "play music" DLL, nor was it designed to be. As I always say to everyone "It's a completely alternate audio system for Game Maker".

As for the edit, make sure you're not currently running it.

~Brandon
  • 0

#9 Blijbol

Blijbol

    Happy business

  • GMC Member
  • 313 posts

Posted 25 October 2005 - 06:35 PM

Really nice! Can't wait to see an SXMS Player 4. (you're breaking news by the way :D)
  • 0
Blijbol OnScore 2 Extend your games with online highscore lists! New version!

Joystick OEM Name DLL Controller name as in Control Panel.
Registry Reader DLL Full read access to the Windows Registry.
Game Appearance Extension Control the game window and taskbar button in detail!
INI Data Structure Extension Much better than GM's INI functions.

Games and software: Slimeball Deluxe (digital arcade volleyball) Blijbol Snake 2 (traditional snake including a Maze Editor) Flood (try to escape from the water) Blijbol Memory (find the pairs) Game Maker Quiz (test your GM knowledge) More at Games.Blijbol.nl and Software.blijbol.nl
My website: Blijbol.nl (English/Dutch) | User of Game Maker 7.0 Pro | Moderator of the Dutch Game Maker Community

#10 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 25 October 2005 - 09:03 PM

Finally! Dude this is awesome shaltif...

10/10 :D

~Derek~
  • 0

#11 EricDB

EricDB

    Eric Burgess

  • GMC Elder
  • 920 posts
  • Version:GM8

Posted 26 October 2005 - 01:35 AM

Too bad that FMOD is 1,000$ per licence...
A waste of potential for commercial games. :D
Making better possibilities for audio settings for games with this, is better.

<{POST_SNAPBACK}>


Only $100 if it's a shareware game, and free for free games.
  • 0

#12 Flashback

Flashback

    Lord of the Ferrets

  • New Member
  • 489 posts
  • Version:Unknown

Posted 30 October 2005 - 02:14 PM

Congratulations, Shaltif! You've really pulled this off well.

I'm glad to see you've solved my compatibility issue.

Below is a comparison with my current sound system, Super Sound:

Functionality:
I only need to play OGGs in my game.
Super Sound: Plays mono OGGs, but murders stereo OGGs.
SXMS 3 Beta: Plays mono OGGs, but murders stereo OGGs.

Pet peeves for functionality:
Super Sound: Fine, I can live without stereo OGGs. But crashing when I try to loop when you're not in focus?
SXMS: Oh c'mon, I had SOME hope that you could play stereo OGGs better than Super Sound.

(And I know that stereo OGGs work. Irfanview plays the OGG perfectly)

Basically a tie, as I have a workaround for the looping problem.

Size:
Super Sound: 154kb
SXMS (for my purposes): 53.5kb+232kb

Super Sound wins.

Now, while both have their pros and cons, Super Sound comes out on top for my purposes. However, if you're using files OTHER than OGG, SXMS is the best way to go.

~~Flashback
  • 0

#13 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 30 October 2005 - 04:27 PM

SXMS 3 Beta: Plays mono OGGs, but murders stereo OGGs.

~~Flashback

<{POST_SNAPBACK}>


I fully tested my SXMS-3.dll with the OGG format (in Mono, Stereo, Multi-Channel, Internet, etc) and had no problems at all playing anything. The same thing happening in both DLL's makes me believe something else is the cause of your OGG stereo issue. Just curious, could you possibly link me to the OGG in question (or a OGG having issues) so I can do further testing. Cause all OGGs I've tested (a few hundred) all worked flawlessly, and I can't really point to any cause for your issue unless it's a badly encoded OGG file. Also, could you make a recording of how it sounds on your end? So I can do compare and contrast.

I'm glad to hear the compatability issue has worked out, I spent a lot of time trying to wrap this without it causing errors like my previous issue and of course, it using Fmod Ex probably helped as well :lol:

~Brandon
  • 0

#14 wolf_N32

wolf_N32

    GMC Member

  • GMC Member
  • 273 posts
  • Version:GM:Studio

Posted 31 October 2005 - 09:46 AM

There is simply NO dll like Shaltif's superb SXMS. This is THE dll to use for the great games concerning music and sound. Supporting a variety if formats and expandable thru Winamp plugins, this is mostly what you need.

10/10
  • 0

#15 Bowex

Bowex

    Digital-X

  • New Member
  • 462 posts

Posted 31 October 2005 - 10:43 AM

finally version 3 !! awesome stuff !
  • 0

#16 blaster-gamer

blaster-gamer

    GMC Member

  • New Member
  • 33 posts

Posted 31 October 2005 - 10:46 AM

hey this is cool...but i have a question:
You can load songs into the program that's cool, but can you also play songs which are in the Exe or some songs in the same folder which are loading automatically ? I mean the usual musicway of Gamemaker...i tried it but i don't get the great visualisations =( ? why ?
  • 0

#17 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 31 October 2005 - 04:16 PM

hey this is cool...but i have a question:
You can load songs into the program that's cool, but can you also play songs which are in the Exe or some songs in the same folder which are loading automatically  ? I mean the usual musicway of Gamemaker...i tried it but i don't get the great visualisations =( ? why ?

<{POST_SNAPBACK}>

A DLL cannot gain access to the internal resources inside the .EXE, so loading music which is in your .gm6/.exe is impossible. Likewise, the visualization support only works with audio which plays through SXMS.

~Brandon
  • 0

#18 Notorious

Notorious

    GMC Member

  • New Member
  • 3 posts

Posted 02 November 2005 - 03:50 PM

Do you have any idea when we can expect some tutorials or examples?

Edited by Notorious, 02 November 2005 - 03:51 PM.

  • 0

#19 Yoshi 15

Yoshi 15

    Indeedy!

  • New Member
  • 68 posts

Posted 02 November 2005 - 08:10 PM

Not really an error, but you have a typo in sxfmod_sound_setLoopCount:

/*Shaltif's Xtreme Music and Sound
--The Fmod / WinAmp Wrapper for Game Maker
--Brandon Rohrer © 2003-2005
============================================
argument0 = REAL - A sound index.
argument0 = REAL - The number of times the sound should loop.
===
return = REAL - Whether successful (1) or failed (0)
===
//Com:
      You can set how many times a sound should loop before stopping by
      using this function.  This is the number of times it should loop.  So
      a 1 would make it loop once, while a setting of 0 would make it play
      and stop at end.  If you pass a -1, the sound will loop indefinately.
      (-1 is the default setting).
*/

You have 2 argument0's.

Otherwise, this is very good, not to mention the file size is actually SMALLER than SXMS2.
  • 0
Current Projects:
Sonic Ze DX

Crinis Blaze.
Comming soon!

#20 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 03 November 2005 - 07:15 AM

Thank's Yoshi 15, I'll get right on fixing that :huh:. It's mistakes like that I'm glad to fix (cause a mispelling in comments is better than one in actual code).

Notorious, it does come with 1 example currently, which I plan to later on expand when I have time (to show off other aspects). As for a tutorial, I think the example covers that enough. For a time schedule, I have no idea when I'll get around to it. It's enough trying to get time to work on the actual SXMS-3.dll, let alone the examples/documentation.

~Brandon
  • 0

#21 TheRealMethuselah

TheRealMethuselah

    ber geek

  • GMC Member
  • 486 posts
  • Version:GM:Studio

Posted 05 November 2005 - 02:57 AM

Awesome my friend, simply awesome, I've been waiting for the getting/setting position part of this.. w00t!
  • 0

#22 Notorious

Notorious

    GMC Member

  • New Member
  • 3 posts

Posted 05 November 2005 - 11:06 AM

Alright, I see.
I'll try to figure it out by your example then.

Greetings,
  • 0

#23 armigus

armigus

    GMC Member

  • New Member
  • 94 posts

Posted 05 November 2005 - 12:02 PM

I'm probably going to have to make a test harness before trying this in my main project to get the hang of it. If I can unload some of my larger sounds from the executable then load times drop. Streaming should also improve performance and allow higher quality music and big sfx.

I may have some conversion work to do with the large wav files.

Your prayers would be appreciated at this time.
  • 0

#24 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 13 November 2005 - 05:02 PM

:) :) :P ---nvm solved --- read below .. im a moron ... no need to keep this long ass post still up here ...

Edited by kow, 15 November 2005 - 02:16 AM.

  • 0

#25 takua108

takua108

    GMC Member

  • GMC Member
  • 582 posts

Posted 13 November 2005 - 05:51 PM

IDK, but you could try clicking on the "click here" thingus and post the hex code or whatever shows up...
  • 0

#26 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 14 November 2005 - 08:46 PM

hey you know what ? ... im sorry .. but i found the problem ... turns out i accidentaly un-commented a line i had to external_free another DLL i have.. the web.dll that porfirio made some time ago .. and thats what was causing the error message ....

so double kudos to you, your DLL seems flawless after all with a huge improvement to simplicity! now to delve into the features a little deeper.

and as for takua108 ... thanks .. if i hadnt looked at the exageratedly long error message that came up when i clicked on that "here" link i wouldnt have figured out the problem. =P
  • 0

#27 Eletron

Eletron

    789 Programmer

  • New Member
  • 282 posts

Posted 14 November 2005 - 11:42 PM

I'm creating my 4th MediaPlayer - xWave. I'm using sxms, and it's working GREAT!!!! Keep it up, Shaltif. I'm impressed.
  • 0

#28 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 15 November 2005 - 12:21 AM

--- edit-- nvm
( dont you hate it when you spend 4 hours searching for an answer then find it 4 minutes after you post ? )


[edit again] ok i got another question ... how can i play a stereo sound, on the front 2 speakers ... the back 2 speakers .. and have it play as mono on center and bass ?

i cant seem to get anything working.

Edited by kow, 15 November 2005 - 01:04 AM.

  • 0

#29 takua108

takua108

    GMC Member

  • GMC Member
  • 582 posts

Posted 15 November 2005 - 03:03 AM

First off, kow, when I suggested you look at the cause of the error, I was thinking that there was some sort of internal error caused by Shaltif's SXMS (seeing as how, ya'know, it's in beta stages right now). I wasn't suggesting you be able to glean anything from it, but the developer might.

As to your current question, I believe there's a setting (marked with a constant) for the type of sound setup being used (2-speaker,5.1 surround,etc.), but I'll have to check up on it.
  • 0

#30 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 15 November 2005 - 04:10 AM

for speaker setting im using
sxfmod_system_setSpeakerMode(sxms.FMOD_SPEAKERMODE_RAW)
or
sxfmod_system_setSpeakerMode(sxms.FMOD_SPEAKERMODE_5POINT1)


i dont know if
sxfmod_system_setOutput(sxms.FMOD_OUTPUTTYPE_WINMM)
has anything to do with it .. perhaps the effect i want can only be achieved with
sxfmod_system_setOutput(sxms.FMOD_OUTPUTTYPE_DSOUND)
which doesnt work with gamemaker 6.0 for some reason. the only working one is the WINMM.

i believe winamp uses Dsound with hardware support to give the 2 front and rear speakers the same sound with center and sub. but i want to try to avoid using the winamp DLL's unless i absolutely have to us em.... or is there perhaps a way to get spectrum data to fmod while using the DLL's ? ( ill still have to test if they do the speaker thing outside of actual winamp)


im trying the following to try to play the music file .. but all my results no matter how i alter the code either get me hearing only the front left speaker when in 3dmode or the 2 front when in 2d mode. it DOES play .. perfectly .. just only on 2 max


ok what i have just done was make a test game .. just one object and 1 room .. merged it with the example ( has all the scripts neatly sorted in folders =P )
and put the following code in ....
sxms_create(working_directory+"\SXMS-3.dll",1);
sxfmod_system_create()
sxfmod_system_setOutput(sxms.FMOD_OUTPUTTYPE_WINMM)
//sxfmod_system_setSpeakerMode(sxms.FMOD_SPEAKERMODE_RAW)
//sxfmod_system_setSoftwareFormat(48000,FMOD_SOUND_FORMAT_PCMFLOAT,2,6,FMOD_DSP_
RESAMPLER_NOINTERP)
sxfmod_system_init(32,sxms.FMOD_INIT_NORMAL,0);


alarm[0] = 5

the above in room 1 in the single object i made ... in its create event ...and the below... is in its alarm 0

sxeasy_stop();
sxfmod_system_createSound(working_directory+"\title.mp3",sxms.FMOD_ACCURATETIME|sxms.FMOD_LOOP_NORMAL,
15);
sxms.easyChannel = sxfmod_system_playSound(15,1)
sxfmod_channel_setVolume(sxms.easyChannel,1)
   sxfmod_channel_setSpeakerLevels(sxms.easyChannel,sxms.FMOD_SPEAKER_BACK_RIGHT,
2,0,1)
   //sxfmod_channel_set3DAttributes(sxms.easyChannel,0,0,0,-1)
   sxfmod_channel_setSpeakerMix(sxms.easyChannel,1,1,1,1,1,1,1,1)

sxfmod_channel_setPaused(sxms.easyChannel,0);

Edited by kow, 15 November 2005 - 04:13 AM.

  • 0

#31 TheRealMethuselah

TheRealMethuselah

    ber geek

  • GMC Member
  • 486 posts
  • Version:GM:Studio

Posted 15 November 2005 - 11:08 PM

How would I clear a channel? I've tried what I thought was correct but I keep getting an error when I try to load another song into that channel.

Edited by TheRealMethuselah, 15 November 2005 - 11:24 PM.

  • 0

#32 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 16 November 2005 - 12:05 AM

thats because theres channels ... and channel handles!
.. notice above when i load a song into slot 15...
then notice when i do afterwards..
sxms.easyChannel = sxfmod_system_playSound(15,1)
when i check in the debug .. i see that sxms.easyChannel = 1 ( i guess thats the hardware channel number. ) which is reffered to as the channel handle.
keep that in mind as some functions ask for channel handle as input while others ask for song index (which would be the 15 in my case)..

so if the function isnt working that might explain why ....
if you posted because you didnt know what the function was ...

to remove a song i use:
sxfmod_sound_release(15)

to pause i use :
sxfmod_channel_setPaused(sxms.easyChannel,1);

so .. did i solve your problem ? ( maybe i went overboard ?)

======
[EDIT] on a side note .. i wish this would play Dsound. that way i could have the nice speaker effects which the winamp DLL's play with .. and with dsound i could get spectrum data. after much research i find that WINMM sucks. its only stereo AND it has a HUGE latency to start playing sounds, easily over a second..

someone please tell me theres hope!

Edited by kow, 16 November 2005 - 12:27 AM.

  • 0

#33 zmaj

zmaj

    GMC Member

  • GMC Member
  • 327 posts
  • Version:Unknown

Posted 18 November 2005 - 12:09 AM

BRAVO !!!

But Shaltif where is old equaliser and echo stuff ???
Are we loosing them???

That is BAAAADDD !!!


ZMAJ !
  • 0

zmmaj

Leader of ZmajSoft team at

http://www.zmajsoft.com

I-Goo creator and author at

http://i-goo.tk


#34 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 18 November 2005 - 06:04 AM

Amazing how when you're here, nothing really happens, but the moment you go away for a bit, everyone wants/needs you. Sorry for the delay in my response everyone!

ok, now to business

TRM:

You shouldn't have to clear channels. After you stop playing audio in a channel, it becomes available for any other sound automatically (or it should). The method FMOD EX handles channels is different than the previous version so kinda bare with me on responding to this. I'll look into a possible coding issue. However, could you possibly show me exactly what you're coding?

kow:

DSOUND does not work in GameMaker 6.x (for reasons I am unable to figure out, as it's a problem with GM using DSOUND for it's audio purposes not allowing for FMOD to use it). So for now, we are stuck with WINMM. I'm constantly trying to figure out how I could solve this but when FMOD works fine in C/C++ applications, I can't call FMOD to fault. WINMM should support what you're asking, but again, I haven't done much testing on this either.

Spectrum data is only for audio that goes thru FMOD. There is a cheap way to get WinAmp audio into FMOD, but it's not easy. You basically have to play in WinAmp the desired audio, have FMOD recording from Stereo Mix, and then while recording, play back in a muted mixer so the visualizer kicks in without Fmod actually outputing any audio. this gives you a slightly delayed visual (not to mention the visual will also pick up any sound going thru the speakers) but that's how my SXMS Player 3.0 does it.

I am not sure if FMOD supports audio just coming out of certian speakers unless you go into 3D processing. When you play a sound on a channel, you might be able to set which speaker that channel comes out of...I didn't do extensive research on that aspect yet (as I was to busy just getting the general wrapper to work with GM.

If I confused you more, let me know =)


zmaj:

They aren't "gone" but rather I just haven't fully implimented them yet (nor has FMOD last I checked). They are in the DSP section of FMOD which is uncovered currently. Also, at this moment they only work on DSOUND (oh boy) however, last I checked they were making the functions work without the hardware (or software run) which could potentially mean that DSOUND is optional as an output.


Thanks for the replies (sorry for my delay) and hopefully, we can work to get this thing more stable, more functions, and get you on your way. Thanks for everyone beta testing.

~Brandon
  • 0

#35 adam1111

adam1111

    GMC Member

  • New Member
  • 17 posts

Posted 18 November 2005 - 07:38 AM

Okay, I was planning to record from the stereo mix channel, how do I do that? I mean, if I use sxfmod_system_getRecordDriverName, it won't always return "stereo mix" will it?
  • 0

#36 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 18 November 2005 - 07:29 PM

Okay, I was planning to record from the stereo mix channel, how do I do that? I mean, if I use sxfmod_system_getRecordDriverName, it won't always return "stereo mix" will it?

<{POST_SNAPBACK}>

You basically have to ask the user to go into their sound properties and select Stereo Mix. Fmod doesn't allow (to my knowledge) the ability to change which recording source to pull from internally. Once that's set, you just use the recording functions to record from the indicated source.

~Brandon
  • 0

#37 adam1111

adam1111

    GMC Member

  • New Member
  • 17 posts

Posted 18 November 2005 - 07:55 PM

Darn, that really makes it harder for the user. Ah well, worth a shot. ^_^

Jolly good anyways ;)
  • 0

#38 Obiki_San

Obiki_San

    GMC Member

  • New Member
  • 136 posts

Posted 18 November 2005 - 09:30 PM

I'm using SXMS v2.x for current project. I haven't tried 3.0 as of yet, but i wanted to ask this quick question. Is it that much different from 2.x and will I have to change alot of codes to switch over to 3.0? And seeing as how 3.0 is in Beta right now, it wouldn't be such a good idea to use it in projects yet?
  • 0

#39 sn0wb0arder381

sn0wb0arder381

    GMC Member

  • New Member
  • 1153 posts

Posted 18 November 2005 - 09:44 PM

i like sxms 2 better :-) im using it for my project, i like 2 better
  • 0

#40 Spikehead777

Spikehead777

    GMC Member

  • GMC Member
  • 496 posts
  • Version:GM:Studio

Posted 19 November 2005 - 03:52 AM

I was experimenting abit with your .dll and my Nintendo DS and Super Mario 64 DS. I plugged a connector cable between my DS and my sound-in port of my computer. I want to record from the line-in port, and simultaneously get the visualization and play the recorded sound. How would I do this, if possible? I can't get this to work.
  • 0

#41 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 19 November 2005 - 06:08 PM

YES Finnaly .. your back .. i was starting to think you were going to go on a nice long vacation =P ( im sure youd like one too!)

while you were gone i read the entire fmod manual cover to cover, tried almost all the functions out from your scripts and also read most of the fmod forums.. so i think im well informed now =P

ok first question .. you say Dsound is used by GM, so fmod cant use it ...
now i ask ... so how come the winamp DLL's work when fmod loads em? out_ds.dll uses direct sound output. and it works with the hardware either on or off ( im talking about the dll config), though doesnt do the speaker thing when its in software. point though is it works.. why ?

http://www.fmod.org/.....hlight=*winmm
i see you been busy dealing with the problem.. and found no solution for quite some time... ( i see you! )

anywho ok on to the second question...
again im not sure why the winamp DLL can use dsound and it doesnt work with fmod, but im curios to know ... is there a way to use
sxfmod_system_loadPlugin to load the winamp output (out_ds.dll) for audio output as a workaround without loading the input? or MUST it have the input as well for it to work ( which will force us back to the *amp scripts)? if it worked it would do 2 things for me ... the speaker thing(sound from all speakers), and save me the extra needed proccesor usage on recording for spectrum data. i think i can get it to load .. but nothing comes out.. so i gave up on that fast .. i have no idea how to send data to plugin.

ok third question...
Fmod DOES support sound comming out of any speaker, in fact you can set any channel ( left or right) to any speaker up to 7.1 configuration. i believe your scripts are working ... but im PREATTY sure WINMM only supports the first 2 audio channels on a sound card (ei:left and right for stereo) similar to the wave_out.dll from winamp.
again i know im driving you nuts here ... bear with me =P in this question what im looking to know is ... am i wrong ? ( and i hope i am) is there a way to get 5.1 sound using winMM?


ok now below im going to show you a few things i tried. and a few notes i have
http://www.darksweep...or/Kow/test.gm6
heres the test file i have to demonstrate everything ..
( im saying it idiot proof for anyone else trying this shaltif .. dont think im insulting your intelligence lol )
all you have to do to follow along or try stuff is uncomment lines and comment others in the groups their in. (youll see what i mean when you open it) ..

to use this file youll need in your working_directory:
fmodex.dll
SXMS-3.dll
out_ds.dll // i got it copied from the most recent winamp's folder
in_mp3.dll // i got it copied from the most recent winamp's folder
any mp3 song// youll need to change the first line of PLAY_SCRIPT to the name of your MP3.
use the arrow keys and Z and X to move around the 3d coordinates
press enter to unload and reload your song
press spacebar to pause and unpause your song.

-----------------------------
1)i find it intersting to note how nice and convieniant it is how it allows you to winamp_init AND fmod_init and have no problems =) thats a plus i guess which isnt mentioned
2)channel panning doesnt work WHILE playing a song .. nor in 2d mode
its hard to tell in 3dmode cause i only get 1 speaker working and i didnt try all modes with it but im preatty sure its broken period! i set it to xx in the script that plays and the alarm[2] event. i dont know if its your code, mine, or fmod.


if anyone see's a mistake i made in code, or can make all speakers work right with fmod let me know so i can smack you .. i mean thank you! =)

have a nice day ... sorry i drive you nuts .. just that i had one whole day with NOTHING to do but this ...

Edited by kow, 19 November 2005 - 06:15 PM.

  • 0

#42 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 19 November 2005 - 09:21 PM

Wow, very nice and informative reply. I will note that I'm writting this post without checking your example (sorry, I don't have the time at this very moment to check it out, but I will when I can).

As you can see, I have tried to solve the DSOUND in GM issue, why FMOD has this problem is beyond me. All I have figured out is that when using pure C/C++ applications using FMOD, DSOUND works perfectly, but when GM, it does not. I concluded that this is possibly because of GM's new audio configuration...but again, you bring up a good point that how WinAmp is able to function. I'll continue to work on this matter.

Unfortunitly, FMOD can only load plugins that were either designed for FMOD (as in, that function) or WinAmp DSP dll's (which are dsp_ dlls, not in_ or out_). So there is no direct way to play winamp audio using FMOD's mixer.

I'm very glad to see you read the FMOD documentation (which is probably more updated than the current version my SXMS-3.dll wraps) so you have a much more understanding of FMOD's potential (and what I can/cannot wrap). But keep in mind that not all functions I have covered yet, so if you see a possible solution to something I haven't wrapped yet, let me know and I can get to work on wrapping it, or find a way I've wrapped already =).

WINMM should support it, but again, you might be right on the assumption that only the stereo channels are supported. FMOD has an internal mixer which it then sets to the output, so I was assuming that was all done mixing side and the output just outputed where it was told to do so, but again, I too am used to using DSOUND. Darn I wish I could figure out why that doesn't work =/. Maybe I should try it via GM5.3a or GM6.0 and see my results (to make it compatable to GM5.3a, you need to change all the hex values for the constants to reals)

Anyway, I'm short on time so I'll have to leave my response to that currently. Keep me informed of your progress and/or problems.

I was experimenting abit with your .dll and my Nintendo DS and Super Mario 64 DS. I plugged a connector cable between my DS and my sound-in port of my computer. I want to record from the line-in port, and simultaneously get the visualization and play the recorded sound. How would I do this, if possible? I can't get this to work.

<{POST_SNAPBACK}>


Set the recording device in the system audio properties to line-in (or the source the audio is coming from). In FMOD, you need to record from this source, then playback the audio to have it visualize (so, while recording, you play what you just recorded). You then either disconnect the mixer DSP (or mute it) so FMOD's playback isn't made audiable. This will give you the visualization you want on the live recording (about a bit behind, like 50-100ms delay).

If you don't want to do that whole mess, you can download the SXMS Player 3.0, get a song that requires it's WinAmp support, play the song until the visual starts reacting then stop the song. The visualization is recording from whatever source you have selected, thus you'll see SXMS Player 3.0's visuals visualizing the recorded audio (this is how I got WinAmp audio to go thru the visualizer). So yes, fully possible.

I'm using SXMS v2.x for current project. I haven't tried 3.0 as of yet, but i wanted to ask this quick question. Is it that much different from 2.x and will I have to change alot of codes to switch over to 3.0? And seeing as how 3.0 is in Beta right now, it wouldn't be such a good idea to use it in projects yet?


It is very different, as it's made to wrap Fmod Ex (4.0) rather then just Fmod (3.0). So it's not easy to easily just switch from one to the other (although SXMS-3.dll is much easier to use). And feel free to use it for your projects. Basically, beta means that I'm still developing it, so you can expect errors and/or incomplete area's of the API.

~Brandon
  • 0

#43 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 23 November 2005 - 10:20 PM

i havnt made much progress sound wise .. been busy in other areas .. just reviving an old thread in search of answers ...


any luck ?


[edit] question .. how many sounds can the winamp dll's handle playing at a time ? any clue there ? ill be using them meanwhile, so i want to know what to set a limit at.

Edited by kow, 24 November 2005 - 01:38 AM.

  • 0

#44 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 24 November 2005 - 09:30 PM

[edit] question .. how many sounds can the winamp dll's handle playing at a time ? any clue there ? ill be using them meanwhile, so i want to know what to set a limit at.

<{POST_SNAPBACK}>


WinAmp support is made for 1 song playback only. Basically, the input dll parses the file to play, converts it to raw PCM (or so I assume) and then passes it off to the output dll, which controls how it's heard.

As for progress on SXMS, that has been none. With me moving to a new house and the holidays, I haven't had much time to SXMS (let alone the PC) so my work as well has been slow. Don't worry, I'll probably get faster progress after the holidays are over, and I've had time to settle into the new place.

~Brandon
  • 0

#45 Ghostkeeper

Ghostkeeper

    That's Logic

  • New Member
  • 189 posts

Posted 27 November 2005 - 12:41 PM

Yahoo!®
Finally!
I was working with SXMS 2.02, but it seems though that I'll have to start all over again to imput SXMS 3.0.0.0.0.0.0.0.0.0 (or how many .0's?). I'm lucky that I mainly started with the skinning engine. I'll wait for it to come out in alpha.
  • 0

#46 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 27 November 2005 - 09:26 PM

heya! ...me again .. ive stumbled on a little something and would like a little help on it ..

http://www.fmod.org/...torials/fsb.htm
FSB sounds from fmod. you can create them from the tools folder when you install fmod.. how exactly do you make the fsb files though?
i cant seem to create an fsb file with the tools there let alone load one into fmod. can you take a look at it ? maybe it requires a compiler ( which i dont have at the moment but will attain if neccesery) since i see some libs.

perhaps you can help me shed some light on how i can create an fsb file from the example in that tools folder and how i can load it using your sxms wrapper to play.

i tried standard loading and it dont work .. and i cant see how to do raw loading .. search FMOD_CREATESOUNDEXINFO in the manual .. i suppose this can be another feature request from me .. but only if it will load fsb files .. else i dont think ill need it.

and to save you some time ... i did some research for you on fsb in case you dont know what it is does or its uses.

basicly an FSB file is an "Fmod Sound bank" file
think of it as how a midi file plays tracks .. drums on one track .. horn on another..
well fsb plays wavs mp3's or just about anything on multiple tracks (which you can of cource set pan, volume, ect in detail to each track from within fmod =)
the best feature of all, is the fsb's are not decompilable. they are read only. and fmod will not release a decompiler for it. so it will keep all my sounds safe.

so as you can see this is a super nifty feature you can add to your sxms as well !=P please look into it when you get a chance and let me know!. and if you need help with ANYTHING let me know =P

i can live without 3d sound, i would much rather have this =P
  • 0

#47 MarioSonic

MarioSonic

    Fastest Plumber

  • New Member
  • 20 posts

Posted 28 November 2005 - 10:53 PM

I found an odd bug with ogg files.

The player plays ogg files fine, however, all the folders leading up to the directory where the ogg files are CANNOT be deleted after using the sxms. The file will delete fine, but the folders won't delete unless you restart your computer. I tried both the standard system, and the sxwamp ways of playing a file, but both resulted in an undeletable folder.
  • 0

#48 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 29 November 2005 - 01:33 AM

kow:

FSB I have not implimented but plan to do so, I just got to figure out a way to have it supported. I originally was planning to allow FSB support in SXMS 2.02 but was unable to figure out how to load them up correctly (since a created FSB creates a lib and header file to use in your c/c++ application...)

I have yet to see how FSB are fully supported in Fmod Ex, so I may be overshooting here about if I can support it. But yes, if I can support it, I will.

It looks like I need to get back into working on SXMS. It's been about a month now with almost no major progress, I'll see what I can do.


MarioSonic:

That does sound bizarre Oo. Since you released the file and deleted it fine, I couldn't possibly understand why the folder could not be deleted (assuming it's empty after all files are removed).

Since the file is deletable, it's not the fault of SXMS since it is truely released from SXMS and SXMS does nothing to a directory you point to. So this makes me either wonder if it's the code you're using to delete the folder or if something else is causing the folder conflict (of course, I'll look into this myself just to make sure SXMS is not at fault).

I assume that ogg is the only problem? Have you tried other formats without issue? If so, it might be Fmod and the new way ogg is being decoded (I may have to update to a newer version of Fmod Ex to resolve this issue). I'll look into it, thanks for the report.


Ghostkeeper:

The reason the version is 3.0.0.0 b is because it's M.m.b.r or Major, Minor, Build, Release (with an ending b for beta). So 3.2.5.2 would be the 3 major version, 2 minor versions as the 5th build and the 2nd release of this build. So for example, if I did a bug fix, it would be released as 3.0.0.1 b since it would be a new release of the same build. If I rebuilt, I would do 3.0.1.0 b. If I made many changes, but not enough to call it a major change, it's a minor change (3.1.0.0 b) and if I completely re-write the thing from scratch, it's a major change, thus (4.0.0.0 b)

~Brandon
  • 0

#49 MarioSonic

MarioSonic

    Fastest Plumber

  • New Member
  • 20 posts

Posted 29 November 2005 - 02:47 AM

In case your wondering, I used your example. I also looked at Fmod's website, and somewhere in the forums someone's having the same problems with oggs. Wmas work fine and so does everything else.

Edited by MarioSonic, 29 November 2005 - 02:47 AM.

  • 0

#50 kow

kow

    GMC Member

  • New Member
  • 334 posts

Posted 29 November 2005 - 04:27 AM

(since a created FSB creates a lib and header file to use in your c/c++ application...)


check this out .. dont think im rushing you or anything lol .. i just happen to have way too much time on my hands recently.
but anyways heres what ive done.. and what ive found out.. i hope everyone is up to date after this :)

i made a file out of the 2 sounds in that \fsbanklib folder .. i get the following out of it..

test (notice no extension)
test.h

no lib! ( must be a new feature :D )

and this is the contents of the header .. which was using the music in that folder.
#ifndef _TEST_H
#define _TEST_H

#define DRUMLOOP            0
#define JBTENNIS            1


#endif

now call me a dummy .. but doesnt that just recognize its own existance and then tells you what song is what number to use for selecting the subsound ? =P

so you dont really need this if you ask me.. except to know your numbers. the users can figure that out themselfs.

i went through all the .h scripts in that \fsbanklib folder .. they are code to compile the fsb the same way the exe program in the previous directory does. i guess with the actual compile code users can customize the process...

the 2 libs in there im assuming are the core to the process.
fsbanklibexMTD.lib
fsbanklibexMT.lib

i opened them in notepad and though most everything is garbled, based on what i could read they are for encoding files into and the actual writing of the fsb.




in other news ... i found this thread in fmod forums .. though its old ..
http://www.fmod.org/...ight=fsb create
its regarding some guy trying to load fsb's into his project ... now tha part that bothers me is how the mod is explaining putting the 6 channels onto each speaker of his winMM loaded project ... :)
makes ya wonder after all the fuss and testing i did ...


~~~~~ :(
cheers! happy holidays!

Edited by kow, 29 November 2005 - 04:30 AM.

  • 0