From bce46185071500f91689e5fdb067a48c3a4b3c23 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Tue, 11 Oct 2022 22:15:52 -0400 Subject: [PATCH] Most beuatiful sounds --- Player.gd | 1 + Player.tscn | 26 ++++++++++++++++++++++---- Scenes/Enemy.tscn | 3 +++ Test_Scene.tscn | 1 + default_bus_layout.tres | 9 ++++++++- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Player.gd b/Player.gd index 8877989..91e8bb8 100644 --- a/Player.gd +++ b/Player.gd @@ -37,6 +37,7 @@ onready var AudioMegaSlap = $AudioMegaSlap onready var hitbox = $Head/Camera/HitBox onready var slap_cooldown = $SlapCooldown onready var AudioCharge = $AudioCharge +onready var Music = $Music onready var Steps = [ $Step1, $Step2, $Step3, $Step4 ] var rng = RandomNumberGenerator.new() diff --git a/Player.tscn b/Player.tscn index 0aae30f..f456203 100644 --- a/Player.tscn +++ b/Player.tscn @@ -149,10 +149,17 @@ anims/basic_slap = SubResource( 6 ) [node name="AudioSlap" type="AudioStreamPlayer3D" parent="."] stream = ExtResource( 5 ) +attenuation_model = 2 +unit_db = 80.0 +max_db = 6.0 bus = "SFX" [node name="AudioMegaSlap" type="AudioStreamPlayer3D" parent="."] stream = ExtResource( 6 ) +attenuation_model = 2 +unit_db = 60.0 +max_db = 4.0 +pitch_scale = 2.0 bus = "SFX" emission_angle_enabled = true doppler_tracking = 2 @@ -170,29 +177,40 @@ wait_time = 0.5 [node name="Step2" type="AudioStreamPlayer3D" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5, 0 ) stream = ExtResource( 8 ) -unit_db = 6.0 +attenuation_model = 2 +unit_db = 80.0 +max_db = 6.0 bus = "SFX" [node name="Step3" type="AudioStreamPlayer3D" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5, 0 ) stream = ExtResource( 9 ) -unit_db = 6.0 +attenuation_model = 2 +unit_db = 80.0 +max_db = 6.0 bus = "SFX" [node name="Step1" type="AudioStreamPlayer3D" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5, 0 ) stream = ExtResource( 11 ) -unit_db = 6.0 +attenuation_model = 2 +unit_db = 80.0 +max_db = 6.0 bus = "SFX" [node name="Step4" type="AudioStreamPlayer3D" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5, 0 ) stream = ExtResource( 10 ) -unit_db = 6.0 +attenuation_model = 2 +unit_db = 80.0 +max_db = 6.0 bus = "SFX" [node name="AudioCharge" type="AudioStreamPlayer3D" parent="."] stream = ExtResource( 12 ) +attenuation_model = 2 +unit_db = 60.0 +max_db = 4.0 pitch_scale = 0.79 bus = "SFX" doppler_tracking = 2 diff --git a/Scenes/Enemy.tscn b/Scenes/Enemy.tscn index cc2b1fa..55654f0 100644 --- a/Scenes/Enemy.tscn +++ b/Scenes/Enemy.tscn @@ -103,8 +103,11 @@ wait_time = 3.0 [node name="Explosion" type="AudioStreamPlayer3D" parent="."] stream = ExtResource( 7 ) +attenuation_model = 2 unit_db = 80.0 max_db = 6.0 +pitch_scale = 1.5 bus = "SFX" +attenuation_filter_db = 0.0 [connection signal="timeout" from="DeathTimer" to="." method="_on_DeathTimer_timeout"] diff --git a/Test_Scene.tscn b/Test_Scene.tscn index ef480c1..0fb0af8 100644 --- a/Test_Scene.tscn +++ b/Test_Scene.tscn @@ -67,6 +67,7 @@ material = ExtResource( 3 ) [node name="CSGBox3" type="CSGBox" parent="CSGCombiner"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 7.54811, 16 ) +visible = false height = 14.0 depth = 14.0 material = SubResource( 3 ) diff --git a/default_bus_layout.tres b/default_bus_layout.tres index 53aa55c..80f3532 100644 --- a/default_bus_layout.tres +++ b/default_bus_layout.tres @@ -1,4 +1,4 @@ -[gd_resource type="AudioBusLayout" load_steps=3 format=2] +[gd_resource type="AudioBusLayout" load_steps=4 format=2] [sub_resource type="AudioEffectCompressor" id=1] resource_name = "Compressor" @@ -10,6 +10,11 @@ resource_name = "Reverb" room_size = 1.0 hipass = 0.29 +[sub_resource type="AudioEffectCompressor" id=3] +resource_name = "Compressor" +threshold = -20.2 +gain = 12.4 + [resource] bus/0/effect/0/effect = SubResource( 1 ) bus/0/effect/0/enabled = false @@ -21,6 +26,8 @@ bus/1/volume_db = 6.02 bus/1/send = "Master" bus/1/effect/0/effect = SubResource( 2 ) bus/1/effect/0/enabled = false +bus/1/effect/1/effect = SubResource( 3 ) +bus/1/effect/1/enabled = false bus/2/name = "Music" bus/2/solo = false bus/2/mute = false