Adaptive Generative Audio Tonal Environment

Download Report

Transcript Adaptive Generative Audio Tonal Environment

AGATE
Adaptive, Generative Audio Tonal
Environment
Why do we want this?
• We want music because it can
support the emotional experience of
the player.
• But, repetitious or emotionally
inappropriate music can distract
the player from their actual
emotional experience.
The Nature of audio repetition
• Identical audio repetition =
bad (usually).
• The more traditionally
“composed” music is, the less
it bears repetition.
• Usual solutions?
– Buy MUCH music
– Hope no one notices until it is
too late
Money For Music
• Music = $1,500 / minute...
•Minimal coverage for 30-hour game:
30 minutes music = $45,000
MMO Money For Music
• MMO gameplay can easily exceed 1000
hours.
• Heavy usage: 7000 hours or more!
• Full coverage: all new music all
the time = 420,000 minutes of music
• 420,000 minutes of music =
$630,000,000.
Forget Games, Invade A Country!
ANSWER:
GENERATIVE MUSIC
• Think of it as wind chimes: Never
repeating but always familiar.
• Not good for highly-structured,
intensely-composed music
(“cinematic”).
• Very good at loosely-structured
static mood music (“ambient”).
• VERY well-suited to MMO game
environments.
Adaptive Generative Audio Tonal Environment
Composer
provides
Music
Sounds
provides
Music
Data
• Density
• Pitch
• Tempo
• Randomized
Sound selection
• etc.
informs
Game
Data
• Combat
• Time of day
• Weather
• Location
• Anything
Create
Audio
Output
plays
AGATE
controls
High-level
script from in-house
audio lead
What else?
•Sequences
•Keymapping
•Totally awesome lasers
•Etc.
AGATE = World Music
• Good for the background; the
primary voice and spirit of your
game world.
• Important: Vary the delivery of the
music:
– Fade your world music in and out.
– Bring in bits of more
traditionally-composed music to
accentuate specific things.
SO EASY AND LIGHT
• One programmer
• One audio designer
• Several weeks of less-than-100%
man-hours * two people, mostly
research and design-iteration
• System = < 10kbytes
• CPU usage is so small it is
difficult to measure
CHRISTOPHER MAYER
Contract Programmer
Adaptive Generative Audio Tonal Environment
Composer
provides
Music
Sounds
provides
Music
Data
• Density
• Pitch
• Tempo
• Randomized
Sound selection
• etc.
informs
Game
Data
• Combat
• Time of day
• Weather
• Location
• Anything
create
Audio
Output
plays
AGATE
controls
High-level
script from in-house
audio lead
WHERE DID THE TIME GO?
Edit Tool
AGATE
Game
hooks
1st - FMOD Events, AGATE 1, Game Hooks, Editor
2 months part time
2nd - XACT, AGATE 2, Editor
2 weeks part time
3rd - FMOD Ex, AGATE 3, Editor
5 hours
SAMPLE MOOD FILE
Soundbank: C:\Soundbanks\TestBank.fsb
Tempo:
360
Volume:
.5
GuitarG3
5
64
1
Seq
1
1
-1
1 -12
12 952
ViolaG3
20
16
2
Seq
.5
1
-1
1 -12
12 952
PianoG3
35
4
4 Chord .5
1
-1
1 -12
12 952
100
1
8 Chord .5
1
-1
1 -12
12 FFF
Snare
void main(int argc, char *argv[])
{
audioInit();
agateLoadMood(argv[1]);
while (!_kbhit())
{
agateLoop();
audioLoop();
}
agateUnloadMood();
audioExit();
}
void audioInit(void);
void audioLoop(void);
void audioExit(void);
void audioLoadSoundbank(const char *file);
void audioPlay(int index, float frequency, float volume, float
pan);
int audioGetIndex(const char *soundname);
typedef struct
{
int soundIndex;
int probability;
int nNotes;
int beat;
bool chord;
int nQueued;
float volMin, volMax;
float panMin, panMax;
int pitchMin, pitchMax;
int pitchScale;
int *pitchList;
int pitchListSize;
}
//
//
//
//
//
//
//
//
//
//
0 to 100
0 to ?
1 to ?
chord or sequence
0 to nNotes
0.0 to +1.0
-1.0 to +1.0
-12 to +12
12 bits
cents
AGATE_SOUND;
void agateLoadMood(const char *filename);
void agateUnloadMood(void);
void agateLoop(void);
void agatePlay(int i)
{
float
frequency = (float)_mood[i].pitchList[rand() %
_mood[i].pitchListSize];
float
volume = randFloat(_mood[i].volMin,
_mood[i].volMax);
float
pan = randFloat(_mood[i].panMin, _mood[i].panMax);
audioPlay(_mood[i].soundIndex, frequency, volume, pan);
}
void agateLoop(void) {
for (unsigned int i=0; i<_mood.size(); i++) {
if (_beat % _mood[i].beat) continue;
if (rand()%100 < _mood[i].probability)
if (_mood[i].chord)
for (int j=0; j<(rand()%_mood[i].nNotes)+1; j++)
agatePlay(i);
else if (_mood[i].nQueued == 0)
for (int j=0; j<(rand()%_mood[i].nNotes)+1; j++)
_mood[i].nQueued++;
if (_mood[i].nQueued) {
_mood[i].nQueued--;
agatePlay(i);
}
}
_beat++;
Sleep(60000/_tempo);
}
Who would compose music with this?
• Composer should be:
– Comfortable with non-linear, nontraditional music and methods
– Technically savvy (?)
– Games-oriented
– Familiar with ambient music
– Familiar with generative music
– Enjoys helping to design new
technology
JIM HEDGES
Independent Composer
and sound-designer
San Francisco, CA
How is this different from other
forms of adaptive music?




“Vertical” approach: Layering and cross
fading tracks
“Horizontal” approach: Starting and
stopping cues
Often the two are combined
Both approaches tend to rely on through
composed, long “stems”
How is this different from other
forms of adaptive music?



AGATE uses smaller elements, from short
clips to individual notes
It combines these elements both
horizontally and vertically i.e it starts/stops
and layers elements
It combines pre-determined elements with
probability and randomization
Why use middleware intended
for sound design?




This kind of music has much in common with
sound design approaches and practices
Avoiding repetition and producing variety while
retaining a recognizable identity
Collections of small elements, recombined at
run time using randomization and probability
AGATE leverages these strengths of sound
design middleware for creating music
Musical examples: Interlocking rhythm
Musical examples: Interlocking rhythm
Musical examples: Interlocking rhythm
Musical examples: Interlocking rhythm
Musical examples: Interlocking rhythm
Musical Examples: Timbre
Musical Examples: Melody
Prime
Musical Examples: Melody
Musical Examples: Melody
Prime
Musical Examples: Melody
Up
4
Prime
Musical Examples: Melody
Up
4
Prime
Down 4
Musical Examples: Melody
Up
4
Prime
Down 4
Musical Examples: Stingers
Conclusion: Impressions




Forces composer to think primarily in terms
of timbre, density and orchestration
A more “sound design” approach to
composition
Learn how to work with semi-randomness
Be comfortable adapting one's approach
during the compositional process
Conclusion: Impressions
• “Each thing you add modifies the whole set
of things that went before and you suddenly
find yourself at a place that you couldn't
possibly have conceived of, a place that's
strange and curious to you. That sense of
mystery, learning to live with it and make
use of it, is extremely important.”
- Brian Eno
HOW TO GET APPROVAL:
EXPLAIN WHAT PROBLEMS YOUR
AUDIO TECH WILL SOLVE
What this can do for the player and
for your company:
• It will make your players much less
likely to turn off the music or
even all the sound.
– Informal poll: Everquest guild of
100+ people: 92% said they had
music turned off, 74% said they
had ALL sound off!
What this can do for the player and
for your company:
• It will make the game directly,
viscerally pleasurable to play
– Better reviews
– Better word-of-mouth
• Infinite minutes of music in finite
storage and RAM
• Large coverage with very reasonable
amount of work from composer
What this can do for the player and
for your company:
• Increased sales for games with ingame purchase model. See Julian
Treasure’s “Sound Business” for
extensive research references.
AGATE: YOU LIKE IT
HERE
Or perhaps, “You like it hear”