GEMP: Embedded Media Player

Gerikes

User of Run-on Sentences.
Joined
Jul 26, 2005
Messages
1,753
Location
Massachusetts
GEMP: ("GEMP's an Embedded Media Player")
For the GEMP Default Frontend, click here

What is GEMP?

GEMP is a python library for Civilization IV meant to help provide means to easily create graphical frontends to it's embedded media player. These front-ends will act like playlists and media controls for users who wish for more control over their music than the default "Custom Music Directory" option in the Audio Options tab while playing Civilization IV. GEMP provides the ability to store a playlist, do basic playlist management, play and seek through mp3's, and more.

What is GEMP not?

Note that GEMP is the "back-end" system. Imagine a back-end system as all the wiring and circuitry that goes on within a television. Essentially, it does nothing unless you have a tube and dials. The tube and dials is the "front-end", which provides the graphical interface to use the system. In this case, GEMP is the wiring and circuitry inside a television. So, to answer your question, GEMP is not a fully-functional media player with a screen (the "tube and dials") that pops up in your Window. That screen would be a GEMP Front-end. Check out here for the default Front-end that I am also working on.

How it Works:

In a few files (specifically, some of the currently disabled Pitboss python files), the wxWidgets library is used. wxWidgets is a cross-platform GUI library with built-in components for quick and easy GUI building. As it turns out, wxWidgets comes equipped with a pretty powerful media player class, wxMediaCtrl. GEMP simply wraps playlist capabilities using normal python data structures with this class to provide a very simple yet powerful utility.

Installation

GEMP is easy to install for those wishing to make their own Front-end for it. Simply put the gemp.py files into your Python/System folder (note that this will have to be the C:\Program Files\Firaxis....Python\System folder. This is because putting it in other folders will cause it not to be found since there's no file by the same name in the main Python\System folder). After that is done, start using it in any python file by calling:

Code:
from gemp import GempInstance

Then, call functions simply by using...

Code:
GempInstance().FunctionYouWantToRun()

A complete list of functions with documentation are available in the README.txt file that comes with the package. Note reloading python files currently affects GEMP so that GEMP is no longer usable. This appears to be a problem with the wx libraries, but I'm still not sure. Until this gets fixed, try to code the interface without calling any GEMP functions or importing GEMP, so that when the python files are reloaded on the fly, GEMP does not have to be reloaded on the fly as well. Check out the README.txt for more info.
 

Attachments

GEMP-DF (GEMP's Default Front-end)

This is the official default Front-end of GEMP. It's currently in development, and not available for download, but here is a screenshot of it to give you an idea of GEMP's ability.
 

Attachments

  • GempDefaultFrontend.JPG
    GempDefaultFrontend.JPG
    106.4 KB · Views: 315
nice work. snaps for hunting through the unused code
 
Back
Top Bottom