Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: I am not a scientist or a musician of renown but.............  (Read 4636 times)

Toastergargletop

  • Bay Watcher
    • View Profile
I am not a scientist or a musician of renown but.............
« on: September 25, 2010, 10:15:19 pm »

how would one create a program that read the program (like DFHack and stone sense and the like) and composed music based on that information?  For example;  a deep bass rhythm is the sound of your industrious fortress.  Its tempo is controlled by the number of dwarves working/inactive.  The busier your fort is the faster the beat.  The presence of certain types of monsters; Undead and Megabeasts, or conditions such as sieges or the appearance of snatchers would control melody.  More would be possible:  seasons, weather and traders could all effect the music in different ways.

The result would be an algorithm that produces an ever changing musical accompaniment to your game.  Each time you play the music would be unique (as much as possible).

BUT like I said, I have no idea of how this can be done, but if someone wants to run with the idea, I would like to help where I could!
Logged

Gearheart

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #1 on: September 25, 2010, 10:30:52 pm »

Soundsense seems to be the kind of thing you're looking for?

It reads the game log and plays sounds based on that. Look it up in the modding subforum.
Logged

Logical2u

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #2 on: September 25, 2010, 11:41:15 pm »

Soundsense I think is just audio cues for different announcements?

But this sounds like a dynamically generated streaming music file based on conditions in dwarf fortress. This would almost certainly require moderate-to-expert knowledge of the memory locations for things like "active dwarves", "working dwarves", "number of active jobs", that sort of thing, then the ability to use that to define, let's go with midi files. So essentially you'd need to understand memory hacking/reading along with dynamic music generation.

Kind of like the opposite of audiosurf, to be honest. Check out http://en.wikipedia.org/wiki/Algorithmic_composition if you're still curious.
Logged
This account is defunct - please contact me through other means.

Toastergargletop

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #3 on: September 26, 2010, 01:57:24 am »

Still very curious!  But like I said, I lack the expertise and time to deliver such a program.

I would like to know how other people would see this working..................................
Logged

Daetrin

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #4 on: September 26, 2010, 10:03:43 am »

It'd be nifty to take the idea of In Bb and set it up so the different tracks represented different jobs being done.
Logged
All you need to know about Ardentdikes
It is really, really easy to flood this place with magma fwiw.

Doors stop fire, right?

Heliman

  • Bay Watcher
  • I knew you were coming. Nonetheless, welcome.
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #5 on: September 26, 2010, 02:41:16 pm »

Hmmm...
The basic requirement would be specific tunes/instruments played for mining and masonry and such all set to start on a certain note after the job is tasked,

Also what would be critical is allowing a degree of customization by allowing the volume for certain jobs:
1. to be lowered manually by the player
2. to be automatically raised based on
      A: the amount of workers doing it in proportion to the amount that would be expected.
      B: the maximum volume, so job tasks can't become too loud and break the player's speakers


Aside from that, Bonuses would include:
1. including sounds for unconsciously preformed jobs like eating, drinking or sleeping that:
      A: does not raise as high as tones from "real" jobs
      B: is not too complicated a tune, due to how much the player would potentially be hearing it
2. tempo changes from fast to slow depending on #'s of idle dwarves
3. Added sounds from other civilizations on map entering (changing tune based on intent of said civilizations is an added bonus)
3. Added sounds from warring dwarves/ megabeast arrivals.


All this could become a large undertaking, but should prove a challenge to anyone with the skill.
« Last Edit: September 26, 2010, 02:54:37 pm by Heliman »
Logged

Cyntrox

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #6 on: September 26, 2010, 03:23:47 pm »

I wouldn't play specific notes at specific jobs, rather I'd alter the general mood of the song based on various criteria.

I might take a look at this.
Logged
"[...] begin to seek immortality, the secrets of which they can receive directly from any available death god [...]" -Toady

Heliman

  • Bay Watcher
  • I knew you were coming. Nonetheless, welcome.
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #7 on: September 26, 2010, 03:28:10 pm »

I didn't mean individual notes, but whole instruments/sounds starting when the job is started and ending when the job is finished. If you have several jobs at once, which most people usually do, it will synthesize all these sound sources to make the general mood you were looking for.

I can see what you mean though Cyn, letting there be no preset ditties at work and letting the algorithmic composer do it's work to make it's own tune, and that could work also.  though having a preset instrument playing can have both the effect of playing a song and telling you when a job is started/done without the use of announcements.

EDIT: Out of curiosity, how would we be able to cognate all these changing variables? where are they kept and how can one view them?
« Last Edit: September 26, 2010, 03:32:51 pm by Heliman »
Logged

Cyntrox

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #8 on: September 26, 2010, 03:36:26 pm »

EDIT: Out of curiosity, how would we be able to cognate all these changing variables? where are they kept and how can one view them?
Most DF apps read from DF memory. Some read log files.
Logged
"[...] begin to seek immortality, the secrets of which they can receive directly from any available death god [...]" -Toady

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #9 on: September 26, 2010, 04:03:49 pm »

I've never thought of playing a game that had a sound-based pseudo-interface like this.

Are there any games that actually do something similar to this?
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Heliman

  • Bay Watcher
  • I knew you were coming. Nonetheless, welcome.
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #10 on: September 26, 2010, 04:39:47 pm »

Closest would be Beathazard or audiosurf, where the entire game is shaped by the song you play. the idea presented here would be the logistical opposite, where the entire song is based off the game you play. (Soviet Russia, anyone?)
Logged

Toastergargletop

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #11 on: September 26, 2010, 06:34:55 pm »

perhaps the best place to start would be to choose one aspect of the data to reflect in music and just go with a retro sounding 8-bit track with tempo modified by variable X.

I also don't think linking to specific jobs would be a great idea, seeing as there are custom workshops and labors now.

Fortress happiness would be awesome to work out.  tantrum spirals could be auditory madness :D
Logged

AlthorEnchantor

  • Escaped Lunatic
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #12 on: September 26, 2010, 09:48:04 pm »

I've never thought of playing a game that had a sound-based pseudo-interface like this.

Are there any games that actually do something similar to this?
Imperial TIE Fighter, the old LucasArts starfighter flight simulator did something not entirely unlike this.

Twenty years ago!

http://en.wikipedia.org/wiki/IMUSE

Short Version: Wasn't procedurally-generated, but it calculated how to segue seamlessly between different orchestral tracks. So it'd play an ambient "on your guard" track before combat, various "theme music" when certain factions showed up ("Imperial March" when a Star Destroyer hyperspaced in, for example), combat music during dogfights, and this triumphant yet super relaxing victory fanfare that seemed to scream "Whew! Close one!" when you won. It was pretty cool.
« Last Edit: September 26, 2010, 09:49:51 pm by AlthorEnchantor »
Logged

vogonpoet

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #13 on: September 27, 2010, 02:08:14 am »

This thread reminds me of the software Anthem. Anyone trying to program such a thing to read DF should seriously consider receiving delivery of any new sofas they have ordered before they commence work.

Logged
Everything I know about reality, I learned from Dwarf Fortress.

truckman1

  • Bay Watcher
    • View Profile
Re: I am not a scientist or a musician of renown but.............
« Reply #14 on: September 27, 2010, 06:17:30 pm »

So this would not be unlike the audio cues in L4D? In the sense that over time, musical cues will subconsciously alert you to whatever thing is connected to the leitmotif playing?


Or a perhaps better comparison: the dynamic music system in http://en.wikipedia.org/wiki/LSD_(video_game)? I feel that's very similar to this idea in that there's like, only one song in it (maybe a few more I forget) that's just played different ways.
Logged
Spoiler (click to show/hide)
That's the point, it wouldn't be as fun to crush their souls if they didn't have souls to begin with.
Pages: [1] 2 3