Setting up interactive audio stream for volunteer room in testing scene
This commit is contained in:
parent
259e466f26
commit
31cbc43c51
|
|
@ -0,0 +1,26 @@
|
||||||
|
extends AudioStreamPlayer
|
||||||
|
|
||||||
|
@onready var _playback: AudioStreamInteractive = stream
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
Scenes.scene_starting.connect(on_scene_srart)
|
||||||
|
|
||||||
|
func on_scene_srart(scene_id: Scenes.id, _is_repeating):
|
||||||
|
match scene_id:
|
||||||
|
Scenes.id.ADULT_DND:
|
||||||
|
_playback.play_stream("Dnd Fmaj")
|
||||||
|
Scenes.id.ADULT_VOLUNTARY:
|
||||||
|
_playback.play_stream("Voluntary Fmaj To Dmin")
|
||||||
|
Scenes.id.ADULT_AUTISM:
|
||||||
|
_playback.play_stream("Autism Dmin")
|
||||||
|
Scenes.id.ADULT_EATING:
|
||||||
|
_playback.play_stream("Eat Disorder Dmin")
|
||||||
|
Scenes.id.ADULT_SELF_ADVOCACY:
|
||||||
|
_playback.play_stream("Self Ad Dmin")
|
||||||
|
Scenes.id.ADULT_THERAPY_VOLUNTEER, Scenes.id.ADULT_THERAPY_UNI:
|
||||||
|
_playback.play_stream("Therapy Fmaj")
|
||||||
|
Scenes.id.ADULT_BURNOUT:
|
||||||
|
_playback.play_stream("Burnout Dmin")
|
||||||
|
|
||||||
|
func _on_text_finished():
|
||||||
|
_playback.play_stream("Room Theme Fmaj")
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://c6nxw0djkjyq4
|
||||||
|
|
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/burnout_Dmin_110bpm.ogg-acf1091b0eb63e674b280
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0.0
|
loop_offset=0.0
|
||||||
bpm=110.0
|
bpm=110.0
|
||||||
beat_count=324
|
beat_count=320
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@ dest_files=["res://.godot/imported/dnd_Fmaj_113bpm.ogg-dd2a7d361f0c689413595ba6c
|
||||||
loop=true
|
loop=true
|
||||||
loop_offset=0.0
|
loop_offset=0.0
|
||||||
bpm=113.0
|
bpm=113.0
|
||||||
beat_count=68
|
beat_count=272
|
||||||
bar_beats=4
|
bar_beats=24
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ loop=true
|
||||||
loop_offset=0.0
|
loop_offset=0.0
|
||||||
bpm=112.0
|
bpm=112.0
|
||||||
beat_count=394
|
beat_count=394
|
||||||
bar_beats=4
|
bar_beats=8
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/flashback_FmajToDmin_108bpm.ogg-80c13606bfa4f
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0.0
|
loop_offset=0.0
|
||||||
bpm=108.0
|
bpm=108.0
|
||||||
beat_count=572
|
beat_count=582
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,141 @@
|
||||||
|
[gd_resource type="AudioStreamInteractive" format=3 uid="uid://snrqv8f07m4b"]
|
||||||
|
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bvoiq2iplmdly" path="res://base-environments/volunteer_room/sounds/roomTheme_Fmaj_105bpm.ogg" id="1_fvnh7"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://d157aoncmj06t" path="res://base-environments/volunteer_room/sounds/dnd_Fmaj_113bpm.ogg" id="2_xis7q"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://nrrdbd8ihe4s" path="res://base-environments/volunteer_room/sounds/flashback_FmajToDmin_108bpm.ogg" id="3_nvt5v"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://3ixdnrtq0l22" path="res://base-environments/volunteer_room/sounds/x-mas_Dmin_110bpm.ogg" id="4_dbl7i"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://br54eltrpq1pe" path="res://base-environments/volunteer_room/sounds/burnout_Dmin_110bpm.ogg" id="5_a4htg"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://0tdgc4nsbmxg" path="res://base-environments/volunteer_room/sounds/eatDisorder_Dmin_112bpm.ogg" id="6_str1k"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dg2kgovwft22o" path="res://base-environments/volunteer_room/sounds/selfAd_Dmin_111bpm.ogg" id="7_lg4sk"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dkoosrw2dsa03" path="res://base-environments/volunteer_room/sounds/therapy_Fmaj_105bpm.ogg" id="8_acocb"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://loe33m4an13g" path="res://base-environments/volunteer_room/sounds/transitionDtoF_95bpm.ogg" id="9_ye60w"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://du8bsdq83pnv0" path="res://base-environments/volunteer_room/sounds/transitionFtoD_95bpm.ogg" id="10_nwjl0"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
clip_count = 10
|
||||||
|
clip_0/name = &"Room Theme Fmaj"
|
||||||
|
clip_0/stream = ExtResource("1_fvnh7")
|
||||||
|
clip_0/auto_advance = 0
|
||||||
|
clip_1/name = &"Dnd Fmaj"
|
||||||
|
clip_1/stream = ExtResource("2_xis7q")
|
||||||
|
clip_1/auto_advance = 0
|
||||||
|
clip_2/name = &"Voluntary Fmaj To Dmin"
|
||||||
|
clip_2/stream = ExtResource("3_nvt5v")
|
||||||
|
clip_2/auto_advance = 0
|
||||||
|
clip_3/name = &"Autism Dmin"
|
||||||
|
clip_3/stream = ExtResource("4_dbl7i")
|
||||||
|
clip_3/auto_advance = 0
|
||||||
|
clip_4/name = &"Burnout Dmin"
|
||||||
|
clip_4/stream = ExtResource("5_a4htg")
|
||||||
|
clip_4/auto_advance = 0
|
||||||
|
clip_5/name = &"Eat Disorder Dmin 112 Bpm"
|
||||||
|
clip_5/stream = ExtResource("6_str1k")
|
||||||
|
clip_5/auto_advance = 0
|
||||||
|
clip_6/name = &"Self Ad Dmin"
|
||||||
|
clip_6/stream = ExtResource("7_lg4sk")
|
||||||
|
clip_6/auto_advance = 0
|
||||||
|
clip_7/name = &"Therapy Fmaj"
|
||||||
|
clip_7/stream = ExtResource("8_acocb")
|
||||||
|
clip_7/auto_advance = 0
|
||||||
|
clip_8/name = &"Transition Dto F"
|
||||||
|
clip_8/stream = ExtResource("9_ye60w")
|
||||||
|
clip_8/auto_advance = 0
|
||||||
|
clip_9/name = &"Transition Fto D"
|
||||||
|
clip_9/stream = ExtResource("10_nwjl0")
|
||||||
|
clip_9/auto_advance = 0
|
||||||
|
_transitions = {
|
||||||
|
Vector2i(0, 1): {
|
||||||
|
"fade_beats": 2.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(0, 2): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 1,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(0, 3): {
|
||||||
|
"fade_beats": 0.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"filler_clip": 9,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1,
|
||||||
|
"use_filler_clip": true
|
||||||
|
},
|
||||||
|
Vector2i(0, 4): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 2,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(0, 5): {
|
||||||
|
"fade_beats": 4.0,
|
||||||
|
"fade_mode": 2,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(0, 6): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 2,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(0, 7): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(1, 0): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(2, 0): {
|
||||||
|
"fade_beats": 12.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"filler_clip": 8,
|
||||||
|
"from_time": 1,
|
||||||
|
"to_time": 1,
|
||||||
|
"use_filler_clip": true
|
||||||
|
},
|
||||||
|
Vector2i(3, 0): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"filler_clip": 9,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1,
|
||||||
|
"use_filler_clip": true
|
||||||
|
},
|
||||||
|
Vector2i(4, 0): {
|
||||||
|
"fade_beats": 4.0,
|
||||||
|
"fade_mode": 2,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 1
|
||||||
|
},
|
||||||
|
Vector2i(5, 0): {
|
||||||
|
"fade_beats": 2.0,
|
||||||
|
"fade_mode": 2,
|
||||||
|
"filler_clip": 8,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 2,
|
||||||
|
"use_filler_clip": true
|
||||||
|
},
|
||||||
|
Vector2i(6, 0): {
|
||||||
|
"fade_beats": 2.0,
|
||||||
|
"fade_mode": 3,
|
||||||
|
"filler_clip": 8,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 0,
|
||||||
|
"use_filler_clip": true
|
||||||
|
},
|
||||||
|
Vector2i(7, 0): {
|
||||||
|
"fade_beats": 4.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 2,
|
||||||
|
"to_time": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,4 +16,4 @@ loop=true
|
||||||
loop_offset=0.0
|
loop_offset=0.0
|
||||||
bpm=105.0
|
bpm=105.0
|
||||||
beat_count=336
|
beat_count=336
|
||||||
bar_beats=4
|
bar_beats=7
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/selfAd_Dmin_111bpm.ogg-3958d045cdca7b4e79fbae
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=111.0
|
||||||
beat_count=0
|
beat_count=374
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/x-mas_Dmin_110bpm.ogg-0fd7d7cc7f64151f71c566c
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=110.0
|
||||||
beat_count=0
|
beat_count=320
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://bcdye1g10mnhq"]
|
[gd_scene format=3 uid="uid://bcdye1g10mnhq"]
|
||||||
|
|
||||||
[ext_resource type="AudioStream" uid="uid://bvoiq2iplmdly" path="res://base-environments/volunteer_room/sounds/roomTheme_Fmaj_105bpm.ogg" id="1_voojx"]
|
[ext_resource type="AudioStream" uid="uid://bvoiq2iplmdly" path="res://base-environments/volunteer_room/sounds/roomTheme_Fmaj_105bpm.ogg" id="1_voojx"]
|
||||||
[ext_resource type="Script" uid="uid://bso71xkb3xqnb" path="res://dev-util/audio-track.gd" id="2_llw42"]
|
[ext_resource type="Script" uid="uid://bso71xkb3xqnb" path="res://dev-util/audio-track.gd" id="2_llw42"]
|
||||||
[ext_resource type="Script" uid="uid://qgitde4nibng" path="res://dev-util/filler-track.gd" id="4_u5yqc"]
|
[ext_resource type="Script" uid="uid://qgitde4nibng" path="res://dev-util/filler-track.gd" id="4_u5yqc"]
|
||||||
[ext_resource type="Script" uid="uid://cmp8dth4cvo28" path="res://dev-util/music_mix_helper.gd" id="5_q6wlk"]
|
[ext_resource type="Script" uid="uid://cmp8dth4cvo28" path="res://dev-util/music_mix_helper.gd" id="5_q6wlk"]
|
||||||
[ext_resource type="Script" uid="uid://7v24sdisnbia" path="res://dev-util/bpm_timer.gd" id="6_cv4e8"]
|
[ext_resource type="Script" uid="uid://7v24sdisnbia" path="res://dev-util/bpm_timer.gd" id="6_cv4e8"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://snrqv8f07m4b" path="res://base-environments/volunteer_room/sounds/interactive_audio_stream.tres" id="7_cn15y"]
|
||||||
[ext_resource type="Script" uid="uid://c05ftj6kxhpil" path="res://dev-util/music_mixer.gd" id="10_cqqvs"]
|
[ext_resource type="Script" uid="uid://c05ftj6kxhpil" path="res://dev-util/music_mixer.gd" id="10_cqqvs"]
|
||||||
|
|
||||||
[sub_resource type="AudioStreamPolyphonic" id="AudioStreamPolyphonic_cv4e8"]
|
[sub_resource type="AudioStreamPolyphonic" id="AudioStreamPolyphonic_3vkoc"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cv4e8"]
|
[sub_resource type="Resource" id="Resource_cv4e8"]
|
||||||
script = ExtResource("2_llw42")
|
script = ExtResource("2_llw42")
|
||||||
|
|
@ -19,13 +20,31 @@ script = ExtResource("10_cqqvs")
|
||||||
tracks = Array[ExtResource("2_llw42")]([SubResource("Resource_cv4e8")])
|
tracks = Array[ExtResource("2_llw42")]([SubResource("Resource_cv4e8")])
|
||||||
metadata/_custom_type_script = "uid://c05ftj6kxhpil"
|
metadata/_custom_type_script = "uid://c05ftj6kxhpil"
|
||||||
|
|
||||||
[node name="MixedAudioHelper" type="AudioStreamPlayer"]
|
[sub_resource type="GDScript" id="GDScript_0ksph"]
|
||||||
stream = SubResource("AudioStreamPolyphonic_cv4e8")
|
script/source = "@tool
|
||||||
|
extends AudioStreamPlayer
|
||||||
|
|
||||||
|
@export var current_clip_id: int = 0:
|
||||||
|
set(new_id):
|
||||||
|
current_clip_id = new_id
|
||||||
|
if get_stream_playback() != null:
|
||||||
|
print(\"Transition to Track \", new_id)
|
||||||
|
get_stream_playback().switch_to_clip(new_id)
|
||||||
|
else:
|
||||||
|
print(\"fuck\")
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="MixedAudioHelper" type="AudioStreamPlayer" unique_id=567986276]
|
||||||
|
stream = SubResource("AudioStreamPolyphonic_3vkoc")
|
||||||
bus = &"music"
|
bus = &"music"
|
||||||
script = ExtResource("5_q6wlk")
|
script = ExtResource("5_q6wlk")
|
||||||
actual_stream = SubResource("AudioStream_cn15y")
|
actual_stream = SubResource("AudioStream_cn15y")
|
||||||
metadata/_custom_type_script = "uid://cmp8dth4cvo28"
|
metadata/_custom_type_script = "uid://cmp8dth4cvo28"
|
||||||
|
|
||||||
[node name="Timer" type="Timer" parent="."]
|
[node name="Timer" type="Timer" parent="." unique_id=336769596]
|
||||||
wait_time = 0.5
|
wait_time = 0.5
|
||||||
script = ExtResource("6_cv4e8")
|
script = ExtResource("6_cv4e8")
|
||||||
|
|
||||||
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1925480254]
|
||||||
|
stream = ExtResource("7_cn15y")
|
||||||
|
script = SubResource("GDScript_0ksph")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue