MODULE: AGSMuse v1.0

Started by monkey0506, Thu 02/11/2006 21:45:03

Previous topic - Next topic

monkey0506

Based on scripts by khnum, the AGSMuse module is designed to emulate the iMuse effect within AGS.

Not entirely sure what iMuse does, I can't guarantee any form of authenticity here, I'm just taking khnum at his word. Basically the module just fades out any currently playing music, and fades in a new track (at the same MIDI/MP3/OGG position or MOD/XM pattern).

The module should support MIDI, MOD, MP3, OGG, and XM sound, though it was only actually tested with MIDI and MP3.

AGS v2.71 or higher is required!

Download the module (Copy and paste!)
Mirror Thanks Neole!
Read the AGSMuse manual online

Rui 'Trovatore' Pires

Heh, not quite what iMuse did.

What iMuse did was, when you left a location and entered one with different music, the music would kinda "switch over" not by fading but by actually playing a little segment that connected both tunes.

http://en.wikipedia.org/wiki/IMuse

Good module, though. :=
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

monkey0506

#2
Blasted khnum! >:(

Heheh....I didn't think that this was quite what it did...but...eh.

[EDIT:]

Something I've just noticed is that the module will only correctly seek out the correct position when the type of the previous track is the same as the one it's moving to. I could probably do something to fix that...later.

modgeulator

It looks interesting. I'll have to try this sometime. But AGS can already crossfade music tracks, what does this do differently? Does it keep the tracks you are crossfading between in perfect sync somehow so that you could have two different arrangements of the music and seemlessly switch between them?

monkey0506

Interesting question. No cross-fading actually takes place...but the new track is automatically started from the same position as the previous one...

I didn't really know what the code was meant to do. It just seemed like a good thing to modularize.

Rui 'Trovatore' Pires

Oh. If the new track is automatically started from same position, then my bad - it can emulate one element of iMuse (the one that lets you add/remove "instruments" to a scene) quite well.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

modgeulator

The problem with getmp3posmillis and seekmp3posmillis is that they are both very inaccurate. Using these two commands to try to switch between different arrangements does not produce anything like a subtle change in the music. It sounds like a total mess while switching music tracks this way, unfortunately.

Ghost

one definite benefit is that crossfading midi is not yet possible in ags. i'll give it a go, it sounds interesting.

monkey0506

Well blame any defects on khnum. It's his script. :P

khnum

 :( I never said it was exactly like iMuse, it was just my workaround to the problem of the inaccuration of seekmp3posmillis. Anyway there are a few bugs: sincevwhen using digital music setting master volume to 0 doesn't completely silence the music, i had to lower the digital master volume (from 100 to 50), so if there's some voice or fx playing, it will affect this changing;

another problem is the room's music level: my script only works well with normal, and needs some fixes to work with other levels (don't know if monkey_05_06 fixed it in the module)

monkey0506

Hehe...just joshing. ;)

I didn't really make too many modifications to the code, but I didn't realize master volume won't completely silence digital music, so I should fix that. I'm not entirely sure how to fix the problem regarding the room's music level, but if anyone has any ideas how to fix this feel free to speak up.

Like I said before, I just thought this code would be a nice thing to have in a module. It's really just a slightly modified version of khnum's script that I don't entirely understand.

modgeulator, I don't really understand why using [Get/Seek]MP3PosMillis is so inaccurate. Presumably you would have two audio tracks, one with instrument A, and another with instrument A and B, both synchronized to the same timing and what-not. It would be possible to add a waitPos parameter to wait for a certain MIDI/MP3/OGG position or MOD/XM pattern before making the switch between tracks. Granted it would take some calculation by the user to determine where this should be, but it would make the transition smooth instead of just adding instrument B whenever the function is called.

I'm open to any ideas on how to make the module better, and if anyone is really feeling ambitious, the module is open-source, so anyone is free to write a new version.

~monkey

Jackpumpkinhead

um so i was wanting to use this but all the links appear to be broken
currently on an indefinite hold.

Dualnames

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)



Dualnames

Quote from: Jackpumpkinhead on Tue 08/03/2011 22:17:29
Quote from: Jackpumpkinhead on Mon 07/03/2011 21:14:20
Quote from: Dualnames on Mon 07/03/2011 18:23:59
http://www.mediafire.com/?14rsy2nckc3i0ea

There you go.

Thanx

does this include the manual

Frankly, most likely, though I have no idea. But that's the files that monkey was giving out. I recall a txt, but I may be wrong. Why don't you check it out. It's not like it's a big file or anything.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Monsieur OUXX

#16
Hi all,


AGSstrippedMuse 2.0 (I changed the name to avoid confusion with that oher AGSMuse 2.0, completely unrelated: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45579.msg612038#msg612038 )

I've upgraded this source code to AGS 3.2 standards (using audioClips, etc.).
I've named it AGSstrippedMuse 2.0 because it's the exact same code as before, just using the new features of AGS.
But keep in mind that it's still not anywhere close to providing the functionalities of the real iMuse. It's more of a "cross-fading music, with the new tune starting at the same position as the previous tune" thingie.

Actually it doesn't even cross-fade, it just fades out then in -- But it might be my fault, I suspect that khnum was using the MasterVolume and MusicVolume settings simultaneously as a "hack" in order to achieve cross-fading on MIDIs, and this subtlety might have been lost in translation. I don't know.

I didn't make any effort whatsoever to improve the original module. It might have been nice to use the Tween Module in this, but, eh. It was a nice warm-up to start toying around with channels. I'm considering coding a real iMuse for AGS.

Demo Game: here
Module :here
 

monkey0506

Hey, thanks for taking some interest in this. I actually did release a completely unrelated AGSMuse v2.0 that implemented some other obscure feature. I'd like to revisit this sometime and see what I could actually do to make it more iMuse-esque, but I am currently preoccupied with other projects. :)

Monsieur OUXX

#18
Quote from: monkey_05_06 on Thu 07/06/2012 03:30:47
I actually did release a completely unrelated AGSMuse v2.0

Did you ? I searched the forums before starting and overlooked it.
EDIT: Found it here: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45579.msg612038#msg612038
 

SMF spam blocked by CleanTalk