TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 6 of 6

Thread: Songs and Song Schemas

  1. #1
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements

    Songs and Song Schemas

    I thought I would post all that I have learned about songs so that those who know more can correct me and fill in the pieces, and those who know less than I do can learn at least as much as I know.

    NOTE: This thread pertains to the original LGS song compiler and song player. It does not relate to the use of Telliamed's song compiler. That is a different animal. I took the approach that the LGS song compiler works just fine and we don't need a new one. All we needed was to understand the grammar of their schema files and how to use them. With 1.19 there are new capabilities which enabled the discovery of that grammar.


    To start things off, I used the new DromEd command "songschema_dumpmono <name_of_song.snc_file>" to decompile all the T2 and SS2 songs I could find and dump the results to monolog. Those song schemas are found at the bottom of this post, giving us a good set of working examples to look at.

    Overview
    The Dark Engine has a "song player" which can play background music based on a special kind of playlist called a "song schema". You write the song schema in a simplistic human readable language designed specifically for the creating a playlist that can be sensitive to "events" occurring during gameplay. Once you have written the "song schema" you have to compile it into a binary file that the game uses. The DromEd command rebuild_songs is used to perform that compile and create the binary files for all the song schemas found in your songsrc directory. The binary files that get created are called a "songs" and are placed in your song directory by rebuild_songs. A mission can have only one song (playlist).

    DromEd Aspects
    The song to be used by a mission is specified using Editors > Mission Parameters > Song Parameters; just type the name of the song that you want he mission to use, and that song will automatically start to play when the mission starts. If you don't want music to start up right away, do what LGS did and start all your songs with a silent wav sound file. More about this later.

    To send an "event" to the song so that it can respond and change what is playing, you place an ambientSound marker (fnord > ambientSound) and add the AmbientHacked property to it, setting the radius that the player must intrude, the Flags set to "Music", and the Schema set to the name of the event you want triggered. For example, in the T2 song M04SONG, if you want the "start" event to be triggered, you would put "start" as the Schema Name. So it would look like this:

    Click image for larger version. 

Name:	AmbientHacked Song.png 
Views:	195 
Size:	4.3 KB 
ID:	1426

    Events are not responded to immediately. The currently playing wav file has to complete before the song player looks for new events. If multiple events are sent while a wav is playing, only most recently received event is responded to. So you probably shouldn't place your song ambientSound markers close to one another, and you probably shouldn't make your wav files such that they play for hours and hours before ending.

    Writing Song Schemas
    A song schema is a text file with a sns suffix found in your songsrc directory. It is a human readable file comprised of "song statements" and you can use Notepad or Notepad++ or equivalent to write it (I prefer Notepad++ and highly recommend it for this and other needs).

    There are a very limited set of song statements, and I am not certain of the usage for all of them, but what I do know I will share. Note: carets (<, >) are used to bracket required parameter values.

    • Song <name_of_song>
    • DeclareSections <list of section_names separated by spaces>
    • DeclareEvents * * * UNKNOWN FORMAT AND USAGE * * *
    • Section <section_name>
    • Sample <"name_of_wav">
    • Silence * * * UNKNOWN FORMAT AND USAGE * * *
    • Seconds * * * UNKNOWN FORMAT AND USAGE * * *
    • Samples * * * UNKNOWN FORMAT AND USAGE * * *
    • LoopCount <integral_number_of_times_to_loop>
    • Immediate * * * UNKNOWN FORMAT AND USAGE * * *
    • OnEvent <"theme event_name">
    • GotoSection <section_name> Probability <percentage_value_ending_in_%>
    • GoToEnd * * * UNKNOWN FORMAT AND USAGE * * *
    • Volume * * * NOT IMPLEMENTED OR NOT WORKING * * *
    • Pan * * * NOT IMPLEMENTED OR NOT WORKING * * *
    • // <comment-text> -- I also think you can use a semi-colon after any other statement to add a comment to that line, but I have not tested that


    A song schema must begin with a Song statement naming the song.

    Following the Song statement you should have a DeclareSections statement listing all the different song sections in the song schema.

    Following the DeclareSections statement come the song sections. A song section defines the wav to be played and what to do after playing the wav.

    A song section starts with a Section statement defining the section name. This name is used by GotoSection statements which branch between the song sections.

    Following the Section statement you can specify the number of times for the section to be played before testing events using the optional LoopCount statement (if omitted the section's sample, see the Sample statement below, is played only once before testing for events)

    Next comes the Sample statement defining the name of the wav to be played by the section. The name of the wav must be enclosed in quotes. So if you want the wav file "begin.wav" to play, your Sample statement would be:

    Sample "begin.wav"


    Following the Sample statement comes a series of OnEvent blocks. You should have an OnEvent block for every possible event in every song section. That way there is always an appropriate branch to take no matter what event a player happens to trip.

    An OnEvent block begins with an OnEvent statement defining the event that triggers the following statements. If the current event is not the event named in the OnEvent statement, then the next OnEvent statement is examined until a match is found. The empty string ("") is used to define the block of statements to execute if there is no event that has been flagged, and the OnEvent "" statement should always be the first one found in each section. When you are define an OnEvent statement for an event, the keyword OnEvent must be followed by the word "theme" and the event_name, all enclosed in quotes. So if the event to be looked for is "start", the OnEvent statement is:

    OnEvent "theme start"


    After the OnEvent statement a series of one or more GotoSection statements constitute the remainder of the OnEvent block. If you always want to branch to the section referred to in the GotoSection statement you should define the Probability to be 100%. If you want the song player to have multiple options for branching, you just use multiple GotoSection statements where the sum of the probabilities add up to 100%. Take a look at SS2's ENGSONG and ENGSONG2 for examples.

    The Empty Section
    LGS typically uses a special section called "empty" as the very first section. This section plays a silent wav until one of the possible mission events occurs. Take a look at any of the schemas below. This effectively keeps all music from playing until some event takes place.

    Special Considerations
    All wave files used in a song must have the exact same format. So, for example, if you use LGS's empty.wav, all of the other wavs that you use must be Microsoft PCM format Codec, 22050 sample rate, and 2 channels (stereo). Otherwise your custom wav files may play weirdly or not at all. And be sure to save your wav files to your snd directory. You can use a separate sub-directory just for your song if you wish, or just save them inside of snd.

    Testing Your New Song in DromEd
    You have all your wav files in snd, you have written your song schema, saved it to your songsrc directory as a sns file, compiled it using the DromEd command rebuild_songs, and checked that the binary snc file was written to your song directory. Now you want to test it out without going to all the trouble of placing ambientSound markers and having to walk all over your map. Fortunately there are a series of DromEd commands to help out. These are all the song related DromEd commands that I have found:

    Code:
    load_song song_name....................Load the song, song_name
    play_song..............................Play the loaded song
    rebuild_songs..........................Recompile all songs into the compiled binary format and save to the song directory
    song_dumpmono..........................Dump info about current song to mono
    song_event "theme event_name"..........Send an event, event_name, to the currently playing song. The quotes and the keyword, theme, are necessary
    stop_song..............................Stop the currently playing song
    songschema_dumpmono song.snc_file_name.Decompile the song binary into a song schema file and write it to mono
    First you load the song using the load_song command. The song_name is the name of the snc file without the snc extension. So if your song binary is TESTSONG.snc, you would use the command

    load_song testsong

    Next, play the song using the play_song command. If you don't hear anything, that's probably because you copied LGS and started your song schema with a silent section, and only want to make noise after the player triggers an event. So you need to emulate the triggering of an event. That's what the song_event command is for. Suppose you have an event called "start". To trigger it, you would type,

    song_event "theme start"

    This will not trigger a change in sounds immediately; the current section needs to complete before the song player will test for a new event. So wait a bit, and you should hear the new section start up soon. In this manner you can test each event and make sure it does what you want before you start placing ambientSound markers.

    If your song doesn't play, try loading one of the T2 songs and testing it. If that plays fine, then the problem may be with your wav files or with your song schema and you need to look closely at them. If an original T2 song doesn't play, then there may be something wrong with your DromEd setup. That's outside the scope of this tutorial.







    SS2 - ENGSONG
    Code:
    Song engsong
    
    DeclareSections empty quiet pulse beet1 beet1a beet1b beet2 beet3 beet4 break breakfill end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection quiet Probability 100%
        OnEvent "theme break"
            GotoSection quiet Probability 100%
        OnEvent "theme beet"
            GotoSection break Probability 100%
    
    Section quiet
        Sample "e1quiet.wav"
        OnEvent ""
            GotoSection quiet Probability 30%
            GotoSection pulse Probability 70%
        OnEvent "theme beet"
            GotoSection beet1 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section pulse
        Sample "e1pulse.wav"
        OnEvent ""
            GotoSection quiet Probability 70%
            GotoSection pulse Probability 30%
        OnEvent "theme beet"
            GotoSection beet1 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet1
        Sample "e1beet1.wav"
        OnEvent ""
            GotoSection beet1 Probability 60%
            GotoSection beet2 Probability 20%
            GotoSection beet3 Probability 10%
            GotoSection beet4 Probability 10%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet1a
        Sample "e1beet1a.wav"
        OnEvent ""
            GotoSection beet1a Probability 70%
            GotoSection beet3 Probability 15%
            GotoSection beet4 Probability 15%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet1b
        Sample "e1beet1b.wav"
        OnEvent ""
            GotoSection beet1b Probability 80%
            GotoSection beet1 Probability 20%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet2
        Sample "e1beet2.wav"
        OnEvent ""
            GotoSection beet1 Probability 10%
            GotoSection beet2 Probability 50%
            GotoSection beet3 Probability 15%
            GotoSection beet4 Probability 10%
            GotoSection beet1a Probability 15%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet3
        Sample "e1beet3.wav"
        OnEvent ""
            GotoSection beet2 Probability 10%
            GotoSection beet3 Probability 35%
            GotoSection beet4 Probability 20%
            GotoSection break Probability 35%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet4
        Sample "e1beet4.wav"
        OnEvent ""
            GotoSection beet1 Probability 15%
            GotoSection beet2 Probability 15%
            GotoSection beet3 Probability 10%
            GotoSection beet4 Probability 30%
            GotoSection break Probability 30%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section break
        Sample "e1brk.wav"
        OnEvent ""
            GotoSection break Probability 50%
            GotoSection beet3 Probability 15%
            GotoSection beet1a Probability 15%
            GotoSection breakfill Probability 20%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section breakfill
        Sample "e1brkfil.wav"
        OnEvent ""
            GotoSection beet1 Probability 50%
            GotoSection beet1a Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "e1end.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme break"
            GotoSection break Probability 100%
    SS2 - ENGSONG2
    Code:
    Song engsong2
    
    DeclareSections empty begin loop loopr end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "e2begin.wav"
        OnEvent ""
            GotoSection loop Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section loop
        Sample "e2loop.wav"
        OnEvent ""
            GotoSection loop Probability 60%
            GotoSection loopr Probability 30%
            GotoSection end Probability 10%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section loopr
        Sample "e2loopr.wav"
        OnEvent ""
            GotoSection loop Probability 30%
            GotoSection loopr Probability 60%
            GotoSection end Probability 10%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "e2end.wav"
        OnEvent ""
            GotoSection empty Probability 100%
    T2 - M01SONG
    Code:
    Song m01song
    
    DeclareSections empty mel1 mel1a mel2 mel2a end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme start"
            GotoSection mel1 Probability 100%
    
    Section mel1
        Sample "s01mel1.wav"
        OnEvent ""
            GotoSection mel1a Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel1a
        Sample "s01mel1.wav"
        OnEvent ""
            GotoSection mel2 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel2
        Sample "s01mel2.wav"
        OnEvent ""
            GotoSection mel2a Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel2a
        Sample "s01mel2.wav"
        OnEvent ""
            GotoSection mel1 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
    T2 - M04SONG
    Code:
    Song m04song
    
    DeclareSections empty s0400 s04gap s0401 s0402 s0403 s0404 s0405 s0406 s0407end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme start"
            GotoSection s0400 Probability 100%
    
    Section s0400
        Sample "s0400.wav"
        OnEvent ""
            GotoSection s04gap Probability 100%
        OnEvent "theme end"
            GotoSection empty Probability 100%
    
    Section s04gap
        LoopCount 12
        Sample "empty.wav"
        OnEvent ""
            GotoSection s0401 Probability 100%
        OnEvent "theme end"
            GotoSection empty Probability 100%
    
    Section s0401
        Sample "s0401.wav"
        OnEvent ""
            GotoSection s0402 Probability 100%
        OnEvent "theme end"
            GotoSection s0407end Probability 100%
    
    Section s0402
        Sample "s0402.wav"
        OnEvent ""
            GotoSection s0403 Probability 100%
        OnEvent "theme end"
            GotoSection s0407end Probability 100%
    
    Section s0403
        Sample "s0403.wav"
        OnEvent ""
            GotoSection s0404 Probability 100%
        OnEvent "theme end"
            GotoSection s0407end Probability 100%
    
    Section s0404
        LoopCount 4
        Sample "s0404.wav"
        OnEvent ""
            GotoSection s0405 Probability 65%
            GotoSection s0406 Probability 35%
        OnEvent "theme end"
            GotoSection s0407end Probability 100%
    
    Section s0405
        LoopCount 3
        Sample "s0405.wav"
        OnEvent ""
            GotoSection s0406 Probability 65%
            GotoSection s0404 Probability 35%
        OnEvent "theme end"
            GotoSection s0407end Probability 100%
    
    Section s0406
        LoopCount 4
        Sample "s0406.wav"
        OnEvent ""
            GotoSection s0404 Probability 65%
            GotoSection s0405 Probability 35%
        OnEvent "theme end"
            GotoSection s0407end Probability 100%
    
    Section s0407end
        Sample "s0407end.wav"
        OnEvent ""
            GotoSection empty Probability 100%
    SS2 - SONG02
    Code:
    Song song02
    
    DeclareSections empty begin
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "02all.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme end"
            GotoSection empty Probability 100%

    SS2 - SONG03
    Code:
    Song song03
    
    DeclareSections empty begin
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "03all.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme end"
            GotoSection empty Probability 100%

    SS2 - SONG04
    Code:
    Song song04
    
    DeclareSections empty begin
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "04all.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme end"
            GotoSection empty Probability 100%

    SS2 - SONG05
    Code:
    Song song05
    
    DeclareSections empty begin
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "05all.wav"
        OnEvent ""
            GotoSection empty Probability 100%

    SS2 - SONG06
    Code:
    Song song06
    
    DeclareSections empty begin space grv end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme quiet"
            GotoSection grv Probability 50%
            GotoSection space Probability 50%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "06beg.wav"
        OnEvent ""
            GotoSection space Probability 100%
        OnEvent "theme quiet"
            GotoSection grv Probability 50%
            GotoSection space Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section space
        Sample "06space.wav"
        OnEvent ""
            GotoSection grv Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section grv
        Sample "06grv.wav"
        OnEvent ""
            GotoSection grv Probability 60%
            GotoSection space Probability 40%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "06end.wav"
        OnEvent ""
            GotoSection empty Probability 100%

    SS2 - SONG07
    Code:
    Song song07
    
    DeclareSections empty begin quiet quietlo end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme quiet"
            GotoSection quiet Probability 100%
        OnEvent "theme quietlo"
            GotoSection quietlo Probability 100%
    
    Section begin
        Sample "07beg.wav"
        OnEvent ""
            GotoSection quiet Probability 100%
        OnEvent "theme quiet"
            GotoSection quiet Probability 100%
        OnEvent "theme quietlo"
            GotoSection quietlo Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section quiet
        Sample "07quiet.wav"
        OnEvent ""
            GotoSection quiet Probability 60%
            GotoSection begin Probability 40%
        OnEvent "theme quietlo"
            GotoSection quietlo Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section quietlo
        Sample "07lo.wav"
        OnEvent ""
            GotoSection quietlo Probability 100%
        OnEvent "theme quiet"
            GotoSection quiet Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "07end.wav"
        OnEvent ""
            GotoSection empty Probability 100%

    SS2 - SONG08 (Yeah, I see that it says Song06, but the file this came from was SONG08.SNC)
    Code:
    Song song06
    
    DeclareSections empty empty2 begin rock rock2 rock3 rock4 beet bells bellsr dist ring end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme restart"
            GotoSection beet Probability 100%
        OnEvent "theme quiet"
            GotoSection bells Probability 100%
    
    Section empty2
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty2 Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "08beg.wav"
        OnEvent ""
            GotoSection rock Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section rock
        Sample "08rock.wav"
        OnEvent ""
            GotoSection rock Probability 25%
            GotoSection rock2 Probability 75%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section rock2
        Sample "08rock2.wav"
        OnEvent ""
            GotoSection rock Probability 25%
            GotoSection rock3 Probability 75%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section rock3
        Sample "08rock3.wav"
        OnEvent ""
            GotoSection rock Probability 10%
            GotoSection rock3 Probability 40%
            GotoSection rock4 Probability 40%
            GotoSection ring Probability 10%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section rock4
        Sample "08rock4.wav"
        OnEvent ""
            GotoSection rock4 Probability 20%
            GotoSection beet Probability 40%
            GotoSection bellsr Probability 30%
            GotoSection ring Probability 10%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet
        Sample "08beet.wav"
        OnEvent ""
            GotoSection beet Probability 60%
            GotoSection rock Probability 10%
            GotoSection dist Probability 20%
            GotoSection ring Probability 10%
        OnEvent "theme quiet"
            GotoSection bells Probability 50%
            GotoSection rock Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section bells
        Sample "08bells.wav"
        OnEvent ""
            GotoSection rock Probability 100%
        OnEvent "theme quiet"
            GotoSection bellsr Probability 100%
        OnEvent "theme restart"
            GotoSection beet Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section bellsr
        Sample "08bellsr.wav"
        OnEvent ""
            GotoSection bellsr Probability 70%
            GotoSection rock Probability 30%
        OnEvent "theme quiet"
            GotoSection bellsr Probability 100%
        OnEvent "theme restart"
            GotoSection beet Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section dist
        Sample "08dist.wav"
        OnEvent ""
            GotoSection beet Probability 25%
            GotoSection dist Probability 25%
            GotoSection bellsr Probability 25%
            GotoSection rock Probability 25%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section ring
        Sample "08ring.wav"
        OnEvent ""
            GotoSection ring Probability 75%
            GotoSection rock4 Probability 25%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "08end.wav"
        OnEvent ""
            GotoSection empty2 Probability 100%

    SS2 - SONG09
    Code:
    Song song09
    
    DeclareSections empty bass bassr bassw dmsbw beet beet2 dms1 dms2 dmsw windy windy2 end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme bass"
            GotoSection bass Probability 100%
        OnEvent "theme windy"
            GotoSection windy2 Probability 100%
    
    Section bass
        Sample "09bass.wav"
        OnEvent ""
            GotoSection bass Probability 50%
            GotoSection bassr Probability 50%
    
    Section bassr
        Sample "09bassr.wav"
        OnEvent ""
            GotoSection bassr Probability 50%
            GotoSection bassw Probability 50%
    
    Section bassw
        Sample "09bassw.wav"
        OnEvent ""
            GotoSection bassw Probability 50%
            GotoSection dmsbw Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section dmsbw
        Sample "09dmsbw.wav"
        OnEvent ""
            GotoSection beet Probability 50%
            GotoSection dmsbw Probability 50%
    
    Section beet
        Sample "09beet.wav"
        OnEvent ""
            GotoSection beet2 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet2
        Sample "09beet2.wav"
        OnEvent ""
            GotoSection dms1 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section dms1
        Sample "09dms1.wav"
        OnEvent ""
            GotoSection dms1 Probability 50%
            GotoSection dms2 Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section dms2
        Sample "09dms2.wav"
        OnEvent ""
            GotoSection dms1 Probability 30%
            GotoSection dms2 Probability 30%
            GotoSection dmsw Probability 40%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section dmsw
        Sample "09dmsw.wav"
        OnEvent ""
            GotoSection dmsw Probability 30%
            GotoSection beet Probability 20%
            GotoSection windy Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section windy
        Sample "09windy.wav"
        OnEvent ""
            GotoSection bassr Probability 50%
            GotoSection dmsbw Probability 50%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section windy2
        Sample "09windy.wav"
        OnEvent ""
            GotoSection windy Probability 80%
            GotoSection dms1 Probability 20%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "09end.wav"
        OnEvent ""
            GotoSection empty Probability 100%

    SS2 - SONG10
    Code:
    Song song10
    
    DeclareSections empty begin beet1 beet2 beet3 beet4 soft mel1 mel2 mel3 mel4 end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
    
    Section begin
        Sample "10beg.wav"
        OnEvent ""
            GotoSection beet1 Probability 100%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet1
        Sample "10beet1.wav"
        OnEvent ""
            GotoSection beet2 Probability 100%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet2
        Sample "10beet2.wav"
        OnEvent ""
            GotoSection beet3 Probability 70%
            GotoSection mel3 Probability 30%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet3
        Sample "10beet3.wav"
        OnEvent ""
            GotoSection beet4 Probability 100%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet4
        Sample "10beet4.wav"
        OnEvent ""
            GotoSection beet3 Probability 60%
            GotoSection mel1 Probability 40%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section soft
        Sample "10soft.wav"
        OnEvent ""
            GotoSection soft Probability 60%
            GotoSection begin Probability 20%
            GotoSection beet1 Probability 20%
        OnEvent "theme begin"
            GotoSection beet1 Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel1
        Sample "10mel1.wav"
        OnEvent ""
            GotoSection mel2 Probability 75%
            GotoSection beet1 Probability 25%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel2
        Sample "10mel2.wav"
        OnEvent ""
            GotoSection beet1 Probability 50%
            GotoSection mel3 Probability 50%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel3
        Sample "10mel3.wav"
        OnEvent ""
            GotoSection mel4 Probability 100%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section mel4
        Sample "10mel4.wav"
        OnEvent ""
            GotoSection soft Probability 100%
        OnEvent "theme soft"
            GotoSection soft Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "10mel4.wav"
        OnEvent ""
            GotoSection empty Probability 100%

    SS2 - SONG11
    Code:
    Song song11
    
    DeclareSections empty begin end begin2 end2 begin3 end3
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme begin2"
            GotoSection begin Probability 100%
        OnEvent "theme begin3"
            GotoSection begin3 Probability 100%
    
    Section begin
        Sample "11all.wav"
        OnEvent ""
            GotoSection end Probability 100%
    
    Section end
        Sample "empty.wav"
        OnEvent ""
            GotoSection end Probability 100%
        OnEvent "theme begin2"
            GotoSection begin2 Probability 100%
        OnEvent "theme begin3"
            GotoSection begin3 Probability 100%
    
    Section begin2
        Sample "11all2.wav"
        OnEvent ""
            GotoSection end2 Probability 100%
    
    Section end2
        Sample "empty.wav"
        OnEvent ""
            GotoSection end2 Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme begin3"
            GotoSection begin3 Probability 100%
    
    Section begin3
        Sample "05all.wav"
        OnEvent ""
            GotoSection end3 Probability 100%
    
    Section end3
        Sample "empty.wav"
        OnEvent ""
            GotoSection end3 Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme begin2"
            GotoSection begin2 Probability 100%

    SS2 - SONG13
    Code:
    Song song13
    
    DeclareSections empty begin begin2 hvy hvy2 hvy3 wah beet beet2 hvya eq break end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection begin Probability 100%
        OnEvent "theme restart"
            GotoSection begin2 Probability 100%
    
    Section begin
        Sample "13beg.wav"
        OnEvent ""
            GotoSection begin Probability 100%
        OnEvent "theme begin2"
            GotoSection begin2 Probability 100%
        OnEvent "theme end"
            GotoSection begin2 Probability 100%
    
    Section begin2
        Sample "13beg2.wav"
        OnEvent ""
            GotoSection hvy Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section hvy
        LoopCount 2
        Sample "13hvy.wav"
        OnEvent ""
            GotoSection hvy2 Probability 50%
            GotoSection hvy3 Probability 50%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section hvy2
        LoopCount 4
        Sample "13hvy2.wav"
        OnEvent ""
            GotoSection wah Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section hvy3
        LoopCount 4
        Sample "13hvy3.wav"
        OnEvent ""
            GotoSection wah Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section wah
        Sample "13wah.wav"
        OnEvent ""
            GotoSection beet Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet
        LoopCount 3
        Sample "13beet.wav"
        OnEvent ""
            GotoSection beet2 Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section beet2
        Sample "13beet2.wav"
        OnEvent ""
            GotoSection hvya Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section hvya
        Sample "13hvy.wav"
        OnEvent ""
            GotoSection eq Probability 100%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section eq
        LoopCount 8
        Sample "13eq.wav"
        OnEvent ""
            GotoSection wah Probability 33%
            GotoSection hvy3 Probability 33%
            GotoSection break Probability 34%
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section break
        Sample "13end.wav"
        OnEvent "theme restart"
            GotoSection begin Probability 100%
        OnEvent ""
            GotoSection begin2 Probability 100%
    
    Section end
        Sample "13end.wav"
        OnEvent ""
            GotoSection empty Probability 100%

    SS2 - SONG14
    Code:
    Song song14
    
    DeclareSections empty grv space end
    
    Section empty
        Sample "empty.wav"
        OnEvent ""
            GotoSection empty Probability 100%
        OnEvent "theme begin"
            GotoSection grv Probability 100%
    
    Section grv
        LoopCount 2
        Sample "06grv.wav"
        OnEvent ""
            GotoSection space Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section space
        Sample "06space.wav"
        OnEvent ""
            GotoSection grv Probability 100%
        OnEvent "theme end"
            GotoSection end Probability 100%
    
    Section end
        Sample "06end.wav"
        OnEvent ""
            GotoSection empty Probability 100%
    Last edited by LarryG; 1st Jun 2015 at 01:03. Reason: typos & formatting

  2. #2
    Member
    Registered: Jul 2010
    Location: Le Havre (France, 76)
    Where i can find the lgs song compiler?

  3. #3
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Quote Originally Posted by Le MAlin 76 View Post
    Where i can find the lgs song compiler?
    You don't have to find it. It's built into DromEd. It is executed by the rebuild_songs DromEd command

  4. #4
    Member
    Registered: Jul 2010
    Location: Le Havre (France, 76)
    Ok, thank you !

  5. #5
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Added a testing section to the first post.

  6. #6
    Member
    Registered: Jul 2010
    Location: Le Havre (France, 76)
    In fact you can use other extension and codecs (i have tested with .ogg / so i have created a new empty sound file)

    But like it was said, all files used by a one song schema must have the same extension, codec and bitrate.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •