Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Pages: [1] 2  All

Author Topic: [PlugIn] aMUSE  (Read 29959 times)

0 Members and 1 Guest are viewing this topic.

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
[PlugIn] aMUSE
« on: April 15, 2011, 10:37:07 PM »

aMUSE
====

Current Version : v0.284 Download here!


=======
ChangeLog
=======
v 0.284
+   Added function isChannelPaused
+   Added function isChannelPlaying
+   Added function isChannelStopped

v 0.252
+   Added function channelSetLoop
+   Added fucntion channelRemoveLoop

v 0.249
!   adding a Channel that already exist will remove the old channel properly before.
!   renamed function channelPosSet to channelPosSetByte
!   renamed function channelPosGet to channelPosGetByte
+   Added function channelPosSetMS
+   Added function channelPosGetMS
+   Added check if a channel really exists for all functions
+   Fixed bug with Saving games crashing the games under certain conditions

v0.236 - Initial Release


============
Description / Usage
============


aMUSE v0.284
============

aMUSE is a Plugin that replaces the WME Internal music system. It also supports serialization and
deserialization ( saving and loading games ). This PlugIn is using the BASS Audio Library ( bass.dll ), please
note that you need to buy a License if you want to use BASS on a commercial Project. Same goes for the MP3 De-
coder included in BASS. See bass_license.txt for further information.

The main purpose for me was, that it was note possible with WME to play a number of music files 100%
synchronous, they always were 10-50 ms asynchronous. The following fileformats are supported ( according
to the Author of BASS Library, I did not test them all :) WAV/AIFF/MP3/MP2/MP1/OGG/XM/IT/S3M/MOD/MTM/UMX

I'm using this for example, to fade-in an additional musictrack containg just a single instrument when
the Character starts walking.

Please note that this Plugin is under heavy development, may contain bugs and hidden features ;) Use at your own risk.

To use this plugin, you should write the following lines in your scripts:

// base.inc
global muse;

// game.script, in the on "QuitGame" Section
  {
    // quit the game
   muse.shutDown();            // <--- ADD THIS LINE
    Game.QuitGame();
  }
 
 // game.script, or where ever you want to initialize the music system, add:
muse = new aMUSE();



Now, these are the functions included so far:

*********** GENERIC FUNCTIONS ***********
====== addChannel(int ChannelNo, string filename);
Creates a new Channel <ChannelNo> using the file <filename>

====== freeChannel(int ChannelNo);
Stops playback of Channel <ChannelNo> and removes the Data from Memory.

====== play(int ChannelNo, bool loop);
Starts playback of Channel <ChannelNo>, if loop is true then...guess...right, it will loop :)

====== stop(int ChannelNo);
Stops playback of Channel <ChannelNo>, does NOT reset the Streams current position.

======= shutdown();
Removes all streams from memory and shuts down aMUSE . Use this function on QuitGame Event in your game.script.

*********** VOLUME FUNCTIONS ***********
====== channelVolInc(int ChannelNo, int value);
Increases Volume of Channel <ChannelNo> by <value> percent.

====== channelVolDec(int ChannelNo, int value);
Decreases Volume of Channel <ChannelNo> by <value> percent.

====== channelVolFadeTo(int ChannelNo, int value, int time);
Fades Volume of Channel <ChannelNo> to <value> (percent), in the given amount of <time> ( milliseconds ).

====== channelVolGet(int ChannelNo);
Returns the current Volume of Channel <ChannelNo> in percent.

====== channelVolSet(int ChannelNo, int value);
Sets the Volume of Channel <ChannelNo> to <value> in percent.

====== crossFade(int chanFrom, int chanTo, int value);
Crossfades from Channel <chanFrom> to Channel <chanTo> in the given Amount of <time> (milliseconds);
The Target Channel will have the same volume after crossfading as the source channel had.


*********** POSITIONING FUNCTIONS ***********
======= channelPosSetByte(int ChannelNo, string Value);
Sets the Byteposition of Channel <ChannelNo>. The string has to represent a valid number ( will be converted to unsigned long long.

======= channelPosGetByte(int ChannelNo);
Returns the Byteposition of Channel <ChannelNo>.

======= channelPosSetMS(int ChannelNo, string Value);
Sets the Position of Channel <ChannelNo> in Milliseconds. The string has to represent a valid number ( will be converted to unsigned long long.

======= channelPosGetMS(int ChannelNo);
Returns the Position of Channel <ChannelNo> in Milliseconds.


*********** Looping functions ***************
======= channelSetLoop(int ChannelNo, string start, string end);
Lets Channel <ChannelNo> loop between <start> and <end> ( in ms ). Is not affected by the "loop" flag in the play function.

======= channelRemoveLoop(int ChannelNo);
Removes the Loop on Channel <ChannelNo);


*********** Channel Information *************
======= isChannelPlaying(int ChannelNo);
Returns 1 if <channel> is currently playing, otherwise 0

======= isChannelPaused(int ChannelNo);
Returns 1 if <channel> is currently paused, otherwise 0

======= isChannelStopped(int ChannelNo);
Returns 1 if <channel> is currently stopped, otherwise 0



Cheers,

Spellbreaker
« Last Edit: February 18, 2012, 09:34:56 PM by Spellbreaker »
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
[PlugIn] aMUSE
« Reply #1 on: July 11, 2011, 05:21:55 PM »

Initial Release v0.236 released.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 302
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: [PlugIn] aMUSE
« Reply #2 on: July 13, 2011, 02:28:44 AM »

What do you use to make this plugin ?
Logged

thamesonfire

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: [PlugIn] aMUSE
« Reply #3 on: July 14, 2011, 09:25:39 PM »

Wow... nice work!

Two questions...

1) What do you mean by getting BytePosition? Is it possible to get position in micro-seconds?

2) I know that WME Lite doesn't support plugins, but it would be great to have more reliable music technology cross-platform. Is this possible?

Thanks so much for this!
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #4 on: July 17, 2011, 02:48:29 PM »

Hey there!

WME Lite is actually build with the BASS Library, the same that wme_aMUSE Plugin uses, so you could code your functions yourself if you need them. I don't know about WME2 .

I'll add the possibility to get / set music position with time soon. I don't know whats the smallest unit is, I guess it will be milli or microseconds.
The new Version will be available tonight or tomorrow .

Cheers :)
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #5 on: July 17, 2011, 02:49:36 PM »


What do you use to make this plugin ?

It's developed using Microsoft Visual C++ 2010 Express Edition, and uses Boost Library and the BASS Audio Library.
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #6 on: July 17, 2011, 07:50:02 PM »

v0.249 released
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #7 on: July 22, 2011, 09:34:52 PM »

v0.252 released
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #8 on: October 24, 2011, 10:22:08 PM »

v0.284 released
Logged

timofonic

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Posts: 4
    • View Profile
Re: [PlugIn] aMUSE
« Reply #9 on: May 23, 2012, 08:56:21 AM »

What do you think on this? Would you consider donate the source code and/or help him to adapt your plugin to his effort?

http://summermute2012.blogspot.com

https://github.com/somaen/scummvm/tree/wintermute

(You can contact him if you want about this, he's not an occasional contributor for this GSoC but already did some occasional coding for both ScummVM and ResidualVM sister project)
« Last Edit: May 23, 2012, 12:12:38 PM by timofonic »
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #10 on: May 24, 2012, 12:06:16 PM »

Since WME Lite does not support Plugins, it would not make sense. WME Lite already uses BASS Library for Audiooutput, so I personally think, it's not necessary to port aMUSE to WME Lite.

If ScummVM is working, and RotT is ready, we'll port it to scummVM for sure, because there are other things we have to rework ( like video playback for example ).

Greets,

Spellbreaker
Logged

timofonic

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Posts: 4
    • View Profile
Re: [PlugIn] aMUSE
« Reply #11 on: May 24, 2012, 03:29:31 PM »

Since WME Lite does not support Plugins, it would not make sense. WME Lite already uses BASS Library for Audiooutput, so I personally think, it's not necessary to port aMUSE to WME Lite.

If ScummVM is working, and RotT is ready, we'll port it to scummVM for sure, because there are other things we have to rework ( like video playback for example ).

Greets,

Spellbreaker

Hello.

I guess certain features could be added to the WME Lite based engine for ScummVM if being necessary, that's something already discussed in the ScummVM forums. I'm not sure about what does aMUSE plugin does or how it works internally (by the name, I guess it adds imuse-like features to the audio subsystem), that's something you know for sure. AGS engine implemented back plugins back into the main code (this is mostly done by the JJS fork, focused on portability to platforms like Android/PSP/iOS).

But why removing improvements the aMUSE plugin offered to WME instead of adding them to Wintermute's ScummVM?

BASS is not available for certain platforms ScummVM is ported to, also isn't open source at all. It's going to be replaced by different code, and I see there's quite probably available source code for play those audio file formats that could be adapted to ScummVM too. Except mod formats (that are being used by some few games from other engines like AGS. there's a WIP implementation by fuzzie) it seems most of them are already implemented by own code or external dependencies like libraries.

I ask if you and/or your development team are open to collaboring in some way, like adding the necessary features so users can be able to play games like this in all it's glory with the cool features aMUSE provides or giving information so another developer could reimplement the aMUSE features. The code is there in Github :)

I would not like to see a stripped down version because lack of features in WME's ScummVM, it would be cool to see the engine with the improvements you made and play the game in all it's glory. Also, this can be a great opportunity for the Wintermute community to have the games available on lots of different platforms (a more democratic way, so the user can choose where to play the games on).

It's just a personal question because I'm quite interested in RotT as a game to play and would like to be able to play it in ScummVM. It's a comfortable way to play games, also able to play them on my Wii or Linux box (and continue on a portable platform like Android) makes gaming a lot easier when moving.
« Last Edit: May 24, 2012, 03:57:14 PM by timofonic »
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: [PlugIn] aMUSE
« Reply #12 on: May 24, 2012, 07:41:18 PM »

Sure I would help, but I don't know what I could help. You know, the only Problem with WME was that it was not possible to play several ogg tracks synchronously. Thats why I made aMUSE ( it's clearly NOT a iMUSE, it's more than a name-joke ). You can see what aMUSE can do in the first post.

Since now WME Lite depends on BASS, I guess the Sync-problem does not exist anymore, and I don't think it will exist in the ScummVM port of WME Lite.

Greets, Spellbreaker
Logged

timofonic

  • Lurker
  • *
  • Karma: -1
  • Offline Offline
  • Posts: 4
    • View Profile
Re: [PlugIn] aMUSE
« Reply #13 on: May 25, 2012, 07:59:07 AM »

Sure I would help, but I don't know what I could help. You know, the only Problem with WME was that it was not possible to play several ogg tracks synchronously. Thats why I made aMUSE ( it's clearly NOT a iMUSE, it's more than a name-joke ). You can see what aMUSE can do in the first post.

Since now WME Lite depends on BASS, I guess the Sync-problem does not exist anymore, and I don't think it will exist in the ScummVM port of WME Lite.

Greets, Spellbreaker

Well, the work is in WIP state. He's in a GSoC task, so not sure about that.

I guess extensive testing of Wintermute's games will be necessary, for example. Also, a game development team (and others too) could collaborate to guide in a practical way about the features or things to improve in the engine itself.

Anyway, maybe it's still too early. We'll see the results and then things will happen when the task is done and the engine merged to the main ScummVM code base.

EDIT: There's a reply from somaen (the student behind the GSoC task of porting WME Lite to the ScummVM infraestructure) that looks quite positive here. You may read it if you want, I put a copy here for making it easier...

Quote from: somaen
Hi I'm the guy doing the wintermute-port for ScummVM as GSoC this summer.

Quote from: Spellbreaker
So, if you really get Video Playback running on WME Lite, I would absolutely port the game to WME Lite. ( e.g. 1024x768 resolution, and dropping some music effects due to the wme amuse plugin).

Given the current progress, I'm quite sure that movie-playback will be integrated along with the rest of the engine, perhaps even some more of the removed features from Wintermute.

Now, plugins as plugins are not doable for ScummVM, as ScummVM is supposed to be quite portable. BUT, that doesn't mean the end, I can always integrate whatever plugins people have used into the engine in some way, as long as I can get the source code for the plugin (and that source code released under GPLv2).

I don't really know if there are other roadblocks for compatibility, as I haven't tested a wide range of games against WME Lite yet (nor compared them to WME full). The only other one I can come up with, is using system fonts, those won't be available on most platforms ScummVM runs on, so your game should preferably contain it's own fonts in the data files.
« Last Edit: May 29, 2012, 10:44:34 AM by timofonic »
Logged

somaen

  • Lurker
  • *
  • Karma: 3
  • Offline Offline
  • Posts: 11
    • View Profile
Re: [PlugIn] aMUSE
« Reply #14 on: May 29, 2012, 03:43:30 PM »

ScummVM does not use BASS at all, in any version or platform.

Also, a bit OT, but regarding video-playback, why would you need to change any of that from your current solution?
Logged
Pages: [1] 2  All
 

Page created in 0.043 seconds with 21 queries.