EDITOR PLUGIN: Media Manager 1.0a (for AGS 3.0.1+)

Started by smiley, Tue 13/11/2007 02:19:22

Previous topic - Next topic

smiley

The Media Manager editor plugin allows you to manage your audio/video files from within the editor.
Discontinued

Khris

Very nice work! This is extremely helpful.

Minor suggestion: right-clicking an item opens the menu for the selected item, not the one under the mouse.

VK Dan

#2
Great plugin! This solves one of my biggest problems with AGS.  ;D I have gotten a couple errors with it though.

1. It doesn't seem to be able to play .OGG files on my computer (XP Home, AGS 3.0 beta 15). It gives me the error:
Code: ags

---------------------------
AudioManager
---------------------------
A problem occurred in initializing MCI.
---------------------------
OK   
---------------------------


2. Every now and then when playing a sound I get this error.
Code: ags

Error: Value of '373' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
Parameter name: Value
Version: AGS 3.0.0.15

System.ArgumentOutOfRangeException: Value of '373' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
Parameter name: Value
   at System.Windows.Forms.TrackBar.set_Value(Int32 value)
   at AGS.Plugin.AudioManager.AMPane.moveTrackbar(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


EDIT: Hmm, I found another small bug. It also shows non-sound files inside the list as long as they begin with "Sound". For example, it shows 'SoundList.dat', 'SoundCode.dat', and 'SoundCode.txt', but not the 'readme.txt' I was using earlier to keep track of sounds.

smiley

Thanks for the feedback!

@KhrisMUC:
Right, somehow I forgot to change that. In the new version the row is selected on right-click.

@VK Dan:
1.
You probably need this DirectShow filter for ogg files:
http://www.illiminable.com/ogg/oggcodecs_0.71.0946.exe

2.
I can't reproduce the error message, but it should be fixed now.

3.
Yeah, the filter was a bit too sloppy. It's stricter (but not perfect) now.

VK Dan

#4
Quote from: smiley on Tue 13/11/2007 10:39:39
Thanks for the feedback!

@KhrisMUC:
Right, somehow I forgot to change that. In the new version the row is selected on right-click.

@VK Dan:
1.
You probably need this DirectShow filter for ogg files:
http://www.illiminable.com/ogg/oggcodecs_0.71.0946.exe

2.
I can't reproduce the error message, but it should be fixed now.

3.
Yeah, the filter was a bit too sloppy. It's stricter (but not perfect) now.

Thanks, it's working better now. I do have another bug report though. When I play a sound with the volume low, it is loud for about half a second, before going to the lower volume.

EDIT: Another small suggestion. The '-' button on the library bar should probably change to a '+' when the library is collapsed.

subspark

#5
I think the plugin should be renamed in the editor pane like this:

I made you an AGS 3.0 style icon for the plugin:
http://www.shuugouteki.net/paul/Images/audio.ico

Wonderful work, smiley!

EDIT: Instead of a category field, could we perhaps have separate sections for more comfortable viewing. For example:


Here are the category icons if you wish to use them.
http://www.shuugouteki.net/paul/Images/Music.ico
http://www.shuugouteki.net/paul/Images/Sound.ico
http://www.shuugouteki.net/paul/Images/Speech.ico

Cheers,
Paul.

Pumaman

Nice work smiley, this is something that AGS has needed for a long time :)

VK Dan

Quote from: subspark on Tue 13/11/2007 16:25:31
EDIT: Instead of a category field, could we perhaps have separate sections for more comfortable viewing. For example:


Or maybe they could all be subnodes in the audio node. For example
Code: ags

+-Audio
----Music
----Sound
----Speech


Double clicking on Audio could open up the library. That would solve any problem of having all four categories on one page crowding the UI too much.

Rui 'Trovatore' Pires

Great work. Mind you, though, if the OGG codec is needed for OGG operations, maybe it should be also available in a zip file...?

I don't need it, meself, 'cause I already have that codec, but it's always more friendly.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

smiley

#9
@VK Dan:
Thanks for reporting. Didn't happened in my tests, but it should be fixed now.

@subspark:
Nice icons! Thanks a lot.

@Rui
Done. Next releases will maybe also come as a bundled installer or will include an integrated downloader/installer. The next release's going to use irrKlang and doesn't need additional codecs.


As Dan suggested, the plugin now allows you to view music/sound/speech files separatly by double clicking the nodes. The library is only displayed in the all files section or if you activate it in the options menu (right click on Audio->Options->Always show library)

GarageGothic

This looks like a great plugin. I'll definitely be using it as soon as the final version of 3.0 is out, I've been a bit reluctant to do any actual work on my game in the betas.

Shane 'ProgZmax' Stevens

Very nice work, even though I still get an MCI error in spite of having the codecs installed.  I'm glad I didn't follow through with making this plugin now!  One thing I would like to see is better organization of the names; right now it doesn't properly list the titles because music0-9/sound0-9 are not labelled music00, music01, etc.  As a result they are moved into the tens places on the list.  This is a minor complaint, however.

smiley

Since RC1 broke the plugin, here's a new (earlier than planned) release.
Besides the compatibility issue, it's now using an audio library called irrKlang for all audio formats expect midi and voc (btw. is anyone using voc?).

@ProgZmax:
Should both be fixed now.

Shane 'ProgZmax' Stevens


subspark

Looking good looking good. Nice multi-tri-icon smiley! Sorry I didn't think of making one for you but you seem to have done an outstanding job instead.
Congrats to Smiley for our new Audio Manager!!!!

Cheers,
Paul.

Shane 'ProgZmax' Stevens

I noticed something with the sound playback.  Certain sound files (and really short sound files) will not play with the built-in player, though externally I can play them with winamp and they work fine in the game.  Here are two examples:

http://members.cox.net/progzmax/movies/sound0.mp3

http://members.cox.net/progzmax/movies/sound1.mp3

I'm not sure if you can correct this since it has something to do with the sound library.

smiley

Hmm, strange. That didn't happen with any of my files...
Looks like it plays them too fast (100x and 1000x faster).

Encoding them again with Audacity and Lame seems to fix that.
Alternatively you can replace the plugin with this version:
http://ueberlicht.googlepages.com/AGS.Plugin.AudioManager.dll
and delete ikpMP3.dll. So the plugin uses MCI again for mp3 files.

Shane 'ProgZmax' Stevens


subspark

BUG: EGO0.wav can't be called in the dialog editor. If used &0 the game will crash when it loads that sound file. AGS thinks its an invalid number. I'm not sure what happened here as soon as I installed the latest sound manager it shifted the order of all my voice files around.

Cheers,
Paul.

smiley

#19
Quote from: subspark on Thu 29/11/2007 10:10:30
BUG: EGO0.wav can't be called in the dialog editor. If used &0 the game will crash when it loads that sound file. AGS thinks its an invalid number.
Oops, my fault. Thanks for reporting. The lowest number for speech files is 1 not 0. This will be fixed in the next release.

Quote from: subspark
I'm not sure what happened here as soon as I installed the latest sound manager it shifted the order of all my voice files around.
The files are no longer sorted alphabetically (DOS-Style).
e.g.:
speech1.mp3
speech10.mp3
speech2.mp3
speech20.mp3

They are sorted by their number (logical/Windows Explorer-Style)
e.g.:
speech1.mp3
speech2.mp3
speech10.mp3
speech20.mp3

subspark

Okay. I like that. Even if it means readjusting my dialog voice sample references.
I'm all smiles  :D

Cheers man!

smiley

*bump*
New version 0.5 with two major new features:

-Search for usage of file in script and dialog

-Audio files can now be given a script name which is declared as an enum. So in the script you can use it like that: "PlaySound(sndBoom)". (Thanks to RickJ for the suggestion.)


Pumaman

Nice work! Clever stuff getting the zoom to script thing to work, I don't think I actually exposed that on the interface!

Couple of minor things that I found:

1. If you scroll down the list of sounds and select one, then switch to another tab and switch back, the list scrolls back to the top

2. I got this when previewing a sound:

Error: Arithmetic operation resulted in an overflow.
Version: AGS 3.0.0.22

System.OverflowException: Arithmetic operation resulted in an overflow.
   at AGS.Plugin.AudioManager.Audio.get_Position()
   at AGS.Plugin.AudioManager.AMPane.moveTrackbar(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

smiley

Quote from: Pumaman on Thu 17/01/2008 18:43:58
Nice work! Clever stuff getting the zoom to script thing to work, I don't think I actually exposed that on the interface!
The editor itself exposes the method "GUIController.ZoomToFile". But I was surprised that it really worked...

Quote
1. If you scroll down the list of sounds and select one, then switch to another tab and switch back, the list scrolls back to the top
Will be fixed in the next release.

Quote
2. I got this when previewing a sound:
Hmm, the only thing I'm doing there is a conversion from uint to int, so is the sound over 596 hours long? ;)
Can you please upload the file, because I can't reproduce that.

Pumaman


smiley

Fixed in the new version.

Thanks for reporting.

Pumaman

Quote from: smiley on Thu 17/01/2008 21:32:05
The editor itself exposes the method "GUIController.ZoomToFile". But I was surprised that it really worked...

I'd advise against using reflection to call random methods, because I might refactor the editor code at any time and break your plugin. I'd much prefer you to make a request for me to add the method to the interface, which I will then make sure is properly supported in future versions.


smiley


Shane 'ProgZmax' Stevens

This is such a useful addition to ags that I really think it should become part of the distribution package rather than a separate download!


SSH

12

edmundito

Oh, sweet! I'm glad someone took over my unworkable Media Manager and actually made it work! I was just thinking about it the other day, and I even saw the code in my thumb drive... I guess I'm off the hook :P
The Tween Module now supports AGS 3.6.0!

smiley

Another release, another audio library. This time it's FMOD Ex.

Big new feature:
You can now add new subnodes to the Audio node. These nodes come in three flavours: Lists, Filters and Folders. Files have to be added manually to lists (-> file context menu), filters get them automatically if they match the conditions (-> filter context menu).

Dualnames

This will help me bundle lc3 speech...Thanks a lot dude.
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)

Rui 'Trovatore' Pires

This is very good, but I've now become rather confused due to the lack of documentation.

What is the use of lists, filters, and the library?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

smiley

If you have a seperate folder on your harddrive with all your audio files (with more descriptive names than 'music1.ogg') you want to use in your game, you can set this folder as the library.

Lists & filters should help you organize your files. Lists are pretty much the same as playlists in normal music players, so you have to add and remove entries manually. Filters are 'automatic lists', so e.g. you want a pane that only shows the files which descriptions contain the word 'Background', you can set this as a filter rule (right click on the filter node->edit filter).

smiley

*bump for 0.7*

New feature:
Create and edit Pamela lipsync files. Futhermore, the plugin is now aware of .pam files and renames/deletes them if the corresponding speech file is renamed/deleted.

Creating Pamela files currently uses a third-party tool which uses Microsoft's Speech SDK, so if you're not running XP or Vista, you probably have to install Microsoft's Speech 5.1 Redistributables (speechsdk51msm.exe).



smiley

#38
*bump for 1.0*

New feature:
You can now manage your video and flic files (hence the name change).
By default, the plugin searches the Compiled folder + subfolders for video files and the game folder for flics.

Mantra of Doom

This is a really cool plugin and something I've been meaning to look for... but once I installed it, opened up my game to change something and then save it, I get this Error:

Code: ags

Error: Unable to generate a temporary class (result=1).
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.DurationSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.SizeSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.DescriptionSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.ScriptNameSpecified' cannot be assigned to -- it is read only

Version: AGS 3.0.2.44

System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.DurationSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.SizeSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.DescriptionSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.ScriptNameSpecified' cannot be assigned to -- it is read only
 ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.DurationSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.SizeSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.DescriptionSpecified' cannot be assigned to -- it is read only
error CS0200: Property or indexer 'MediaManager.Common.Data.FileProperties.ScriptNameSpecified' cannot be assigned to -- it is read only

   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)
   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace, String location, Evidence evidence)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location, Evidence evidence)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlRootAttribute root)
   at MediaManager.Common.Data.MediaPlugin.ToXml(XmlTextWriter writer)
   at MediaManager.Common.Component.BaseComponent.ToXml(XmlTextWriter writer)
   at AGS.Editor.ComponentController.NotifySavingGame(XmlTextWriter writer)
   at AGS.Editor.ApplicationController._events_SavingGame(XmlTextWriter writer)
   at AGS.Editor.EditorEvents.OnSavingGame(XmlTextWriter writer)
   at AGS.Editor.AGSEditor.SaveGameFilesProcess(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Not really sure what that means, I'm running Vista Ultimate (64) on Build 3.0.2.44 of AGS. I've never had an error like this before. In the meantime, I'm going to uninstall this so I can continue working on my game.
"Imitation is the sincerest form of imitation."

smiley

I've uploaded a new version. Could you please check if that fixes it?

Mantra of Doom

"Imitation is the sincerest form of imitation."

Dualnames

Thanks a lot for upgrading this. It's a must..
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)

Ghost

And to think that I could've had this so much longer before! Dual's right, this is a must. Thanks a lot for sharing!

Nickydude

This is fantastic! I always though it would be better if you could use descriptive filenames, and nnow you can! Well done. :)
Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Knoodn

i posted this in the 3.1.2 release thread:


the media manager plugin doesn't work for me. there are no soundfiles listed. and when i try to import manually this is shown:

Error: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
Version: AGS 3.1.2.80

System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
   bei System.ThrowHelper.ThrowArgumentOutOfRa ngeException(ExceptionArgument argument, ExceptionResource resource)
   bei System.ThrowHelper.ThrowArgumentOutOfRa ngeException()
   bei MediaManager.Audio.Pane.AddFileToGameFo lder(String path, String type)
   bei MediaManager.Audio.Pane.Toolbar_AddToFo lder(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.Rais eEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem. OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.Hand leClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.Hand leMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.Fire EventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.Fire Event(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseU p(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown. OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl. WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown. WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNat iveWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNat iveWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callb ack(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

there were no problems with media manager in 3.1.1

smiley

#46
Did you move the game folder?

If so:
1) make a backup of Game.agf
2) open Game.agf in a text editor
3) search for: <Folder Path
4) replace the old path with the new one. E.g.: "C:\OldGamePath\Music" -> "C:\NewGamePath\Music"
5) repeat step 3 till you reach the end of the file.
6) save the file

Knoodn

thanks a lot. yes, i did change the game folder, that was the problem.
there were no "<Folder Path" in the Game.agf.
i had to insert the lines:

<Folders>
  <Folder Path="D:\MyGamePath\MyNewestGame\Speech" IncludeSubfolder="False">
    <Files />
  </Folder>
</Folders>

and so on for sound and music. now it's working again.

thanks for fast reply and this great plugin.

Knoodn

computernerdsa

hi,

Where can I download this plug in for the latest version of AGS ?

Thank you

subspark

You dont need it for the latest version of ags. This is an old thread btw.

NiksterG

I know you said it was discontinued, but would it be possible to upload a copy of the plugin for people who are using older versions of AGS?
Check out my games! (Not all made with AGS)


SMF spam blocked by CleanTalk