Hi there folks,
I’m an Open University student in the UK, and after too many years of study, I’m working on the final project for my degree. I’m aiming to develop an API and class library to make it easier for people to use procedurally generated, adaptive or generative music in games. I’m going to be implementing it in Java, and I’m just beginning the design process.
I’m here to try to do a bit of research with potential users of the system - this is an academic project, but ideally I’d like it to be something that’s actually useful for people, that I might be able to Open Source and release for use at some point in the future. In my searches, I’ve come across this thread, which suggests that there’s a demand for this sort of library, but it doesn’t look as if a library or API has come out of that project (correct me if I’m wrong?)
Rather than reinvent my existing description of what I’m working on, this is my problem statement from my project so far (apologies for the more formal than normal style, and references that don’t go anywhere from here):
[quote]Modern computer games are fully multimedia experiences, featuring high quality graphics, sound effects and soundtracks. Traditional music composition techniques can cause problems when used in game soundtracks for a variety of reasons, such as being unable to predict how long a player will be in a particular scene, or the music composed for a scene not matching the events in game at a particular time (Berndt et al., 2012). Procedural Music generation has been used since the 1980s to alleviate some of these issues (Collins, 2009). A variety of algorithms and techniques have been developed which allow music to be varied within given parameters, or generated and adapted based on events in the game (Berndt et al., 2012; Brown & Kerr 2009).
Despite the advantages which procedural music offers in games, it is not used as often as may be expected. Collins (2009, p12) states that “games often do not have budgets or scheduling to allow for the time that it takes to instigate complex control logics”, while Plans & Morelli (2012, p197) said “the state of the art still relies on engines such as iMuse, technology from 1991”. They go on to point out that the libpd composition environment can be embedded within programming languages. This method, however, still requires music and adaptive algorithms to be developed in a separate programming environment, to then be linked to through the game source code using libpd as a bridge (Brinkmann et al, 2011).
The proposed solution is to design and implement a Java class library to allow a programmer to define parameters within which a game soundtrack can be generated. It will then give the programmer the facility to vary the music, in ways determined by a set of defined procedural music algorithms. These actions should all be possible by use of an Application Program Interface (API), without detailed knowledge of the method or logic used by the algorithms.
Definition of the parameters to be used, the code to control playback, and execution of the algorithms should all be possible within the game code being written, with no need for external tools. It should also be possible to define new algorithms to be used by the library using only Java code.
The aim of the project is to simplify the use of procedural music techniques and to allow them to be used by game developers without expending large quantities of time developing and implementing their own code to allow this, and without requiring them to learn to use another programming language or environment specifically for the task. Ease of use and adaptability should be the primary concerns of the interface.
To deliver this aim, the code library will be accompanied by documentation. This will take the form of documentation of the code in the form of Javadoc files, as well as a Report to Stakeholders which will provide descriptions and examples of how the code should be used.
The scope of the project shall be limited to defining and implementing the code libraries and interfaces to be used, and the documentation of these. While it may be possible, and necessary, to define some algorithms within the library to demonstrate its use, the focus of the project will not be developing new, complex algorithms to generate music.
[/quote]
I’ve got some use cases and requirements that I’ve drawn up myself, but rather than state these here I’d like to keep things fairly open to begin with to see what sorts of answers I get to see if I’m on the right track.
Things I’d like feedback on if, people can spare the time to answer (feel free to answer any, all or none of the questions - I’m more than happy to have general conversation around the subject as well if people don’t have specific feedback on these points):
- Have you made use of procedural/generative music in your games? How did you accomplish this if you have?
- If you haven’t, but would like to, what stops you from doing so?
- Is a procedural music API something that you would like to have available for use in your games?
- What features would be the ‘must have’ core functionality for it to be useful for you?
I would reiterate that my project is to define the framework and interface at this stage - implementing a collection of algorithms using Markov chains, genetic algorithms and statistical processing to generate chord sequences and melodies is beyond what I’ll have time to do. The project is meant to be in the region of 300 hours work, and the initial research etc has been around 100 of those so far. Having said that, see the intro paragraph above - I’d like this to be something that I can continue to work on. Once I have the API defined and project written up, starting to work on algorithms would be the next step to making it useful. Feedback in the form of ‘It’d need to allow use of xyz algorithm to generate a nice tune’ will be interpreted as ‘It would need to support the ability to define xyz algorithm’ for now. Hope that makes sense
Thanks for reading, and thanks in advance to anyone who can spare the time to give me some ideas of what people would like to see