A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Dynamic Music Variation (fully working)

Author Topic: Dynamic Music Variation (fully working) (2 messages, Page 1 of 1)
Moderators: Dennis

Jade
Joined: Jan 19, 2020


Posted: May 14, 2020 08:45 AM    Msg. 1 of 2       
We can have up to 4 sound loopings playing at once. Render your song in pieces, each piece the same length, and we will mute/unmute them depending on whats happening. The sound must be 22khz stereo, and the class must be set to "scripted dialog force".


(script startup startstuff
(sound_looping_start "a1\peril_choir_pizz_strings" "none" 1)
(sound_looping_start "a1\peril_bass_tamb" "none" 1)
(sound_looping_start "a1\peril_synth" "none" 0)
)

(script static void perilsynth_volume_higher
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 1)
(sound_looping_set_scale "a1\peril_bass_tamb" 1)
(sound_looping_set_scale "a1\peril_synth" 0.10)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.90)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.90)
(sound_looping_set_scale "a1\peril_synth" 0.20)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.80)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.80)
(sound_looping_set_scale "a1\peril_synth" 0.30)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.70)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.70)
(sound_looping_set_scale "a1\peril_synth" 0.40)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.60)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.60)
(sound_looping_set_scale "a1\peril_synth" 0.50)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.50)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.50)
(sound_looping_set_scale "a1\peril_synth" 0.60)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.40)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.40)
(sound_looping_set_scale "a1\peril_synth" 0.70)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.30)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.30)
(sound_looping_set_scale "a1\peril_synth" 0.80)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.20)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.20)
(sound_looping_set_scale "a1\peril_synth" 0.90)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.10)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.10)
(sound_looping_set_scale "a1\peril_synth" 1)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0)
(sound_looping_set_scale "a1\peril_bass_tamb" 0)
)

(script static void perilsynth_volume_lower
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.10)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.10)
(sound_looping_set_scale "a1\peril_synth" 1)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.20)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.20)
(sound_looping_set_scale "a1\peril_synth" 0.90)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.30)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.30)
(sound_looping_set_scale "a1\peril_synth" 0.80)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.40)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.40)
(sound_looping_set_scale "a1\peril_synth" 0.70)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.50)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.50)
(sound_looping_set_scale "a1\peril_synth" 0.60)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.60)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.60)
(sound_looping_set_scale "a1\peril_synth" 0.50)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.70)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.70)
(sound_looping_set_scale "a1\peril_synth" 0.40)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.80)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.80)
(sound_looping_set_scale "a1\peril_synth" 0.30)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.90)
(sound_looping_set_scale "a1\peril_bass_tamb" 0.90)
(sound_looping_set_scale "a1\peril_synth" 0.20)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 1)
(sound_looping_set_scale "a1\peril_bass_tamb" 1)
(sound_looping_set_scale "a1\peril_synth" 0.10)
(sleep 4)
(sound_looping_set_scale "a1\peril_synth" 0)
)



(script static void peril_volume_higher
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.10)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.20)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.30)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.40)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.50)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.60)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.70)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.80)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.90)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 1)
)

(script static void peril_volume_lower
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 1)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.90)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.80)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.70)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.60)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.50)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.40)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.30)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.20)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0.10)
(sleep 4)
(sound_looping_set_scale "a1\peril_choir_pizz_strings" 0)
)

(script continuous dynamic_music_variation
(if (and (<= (ai_status blue) 2)
(!= (ai_status blue) 0)
)
(begin
(if (< (objects_distance_to_object (ai_actors blue) (player0)) 5)
(begin
(peril_volume_lower)
(sleep_until (or (> (objects_distance_to_object (ai_actors blue) (player0)) 5)
(> (ai_status blue) 2)
)
)
(peril_volume_higher)
)
)
)
)
)

(script continuous dynamic_music_variation2
(if (and (= (volume_test_objects vol0 (player0)) true)
(> (objects_distance_to_object (ai_actors blue) (player0)) 10)
)
(begin
(perilsynth_volume_higher)
(sleep_until (= (volume_test_objects vol0 (player0)) false) 1)
)
)
(if (and (= (volume_test_objects vol0 (player0)) false)
(> (objects_distance_to_object (ai_actors blue) (player0)) 10)
)
(begin
(perilsynth_volume_lower)
(sleep_until (= (volume_test_objects vol0 (player0)) true) 1)
)
)
)


video:
https://youtu.be/hYPduY35URo

test map:
https://drive.google.com/open?id=1TovDFO1CiNFZUcSK2WkNCVrCYBh9SSYu

Edited by Jade on May 16, 2020 at 05:37 PM
Edited by Jade on May 16, 2020 at 05:38 PM
Edited by Jade on May 16, 2020 at 05:40 PM


Spiral
Joined: Apr 3, 2011

I hope i'm out of the way


Posted: May 16, 2020 10:19 PM    Msg. 2 of 2       
Ay that looks fantastic!
Good stuff you are putting out for us, thank you!

 

 
Previous Older Thread    Next newer Thread







Time: Mon May 25, 2020 4:47 PM 93 ms.
A Halo Maps Website