Jibble

Author Topic: MODULE: AGSMuse v1.0  (Read 6948 times)

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
MODULE: AGSMuse v1.0
« on: 02 Nov 2006, 21:45 »
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
« Last Edit: 18 Nov 2006, 15:58 by monkey_05_06 »

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re: MODULE: AGSMuse v1.0
« Reply #1 on: 02 Nov 2006, 21:52 »
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

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #2 on: 02 Nov 2006, 22:02 »
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.
« Last Edit: 02 Nov 2006, 22:08 by monkey_05_06 »

modgeulator

  • (modgeulator@ yahoo.com.au)
    • modgeulator worked on one or more games that won an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #3 on: 02 Nov 2006, 22:06 »
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

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #4 on: 02 Nov 2006, 22:10 »
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

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re: MODULE: AGSMuse v1.0
« Reply #5 on: 02 Nov 2006, 22:23 »
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

  • (modgeulator@ yahoo.com.au)
    • modgeulator worked on one or more games that won an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #6 on: 02 Nov 2006, 23:55 »
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

  • Guest
Re: MODULE: AGSMuse v1.0
« Reply #7 on: 03 Nov 2006, 00:06 »
one definite benefit is that crossfading midi is not yet possible in ags. i'll give it a go, it sounds interesting.

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #8 on: 03 Nov 2006, 03:35 »
Well blame any defects on khnum. It's his script. :P

Re: MODULE: AGSMuse v1.0
« Reply #9 on: 03 Nov 2006, 15:49 »
 :( 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

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #10 on: 03 Nov 2006, 18:25 »
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

Re: MODULE: AGSMuse v1.0
« Reply #11 on: 07 Mar 2011, 15:42 »
um so i was wanting to use this but all the links appear to be broken
currently on an indefinite hold.

Dualnames

  • Local Moderator
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #12 on: 07 Mar 2011, 18:23 »
No more military army stuff. I'm alive and back.

currently on an indefinite hold.

currently on an indefinite hold.

Dualnames

  • Local Moderator
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #15 on: 08 Mar 2011, 23:09 »
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.
No more military army stuff. I'm alive and back.

Monsieur OUXX

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #16 on: 03 Jun 2012, 19:01 »
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
« Last Edit: 08 Jun 2012, 10:05 by Monsieur OUXX »
 

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #17 on: 07 Jun 2012, 03:30 »
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

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: MODULE: AGSMuse v1.0
« Reply #18 on: 07 Jun 2012, 12:21 »
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
« Last Edit: 07 Jun 2012, 12:23 by Monsieur OUXX »