More Godot 4 fixes

This commit is contained in:
Haoyu Qiu 2022-11-21 10:02:06 +08:00
parent 835e8dfd97
commit 3d59d2fcad
3 changed files with 10 additions and 57 deletions

View File

@ -162,9 +162,9 @@ func _drag_motion(motion: InputEventMouseMotion) -> void:
var v := factor * (max_value - min_value) + min_value var v := factor * (max_value - min_value) + min_value
var snap := motion.is_command_or_control_pressed() or motion.shift_pressed var snap := motion.is_command_or_control_pressed() or motion.shift_pressed
if snap and not (is_equal_approx(v, min_value) or is_equal_approx(v, max_value)): if snap and not (is_equal_approx(v, min_value) or is_equal_approx(v, max_value)):
if motion.shift and motion.command: if motion.shift_pressed and motion.is_command_or_control_pressed():
v = round(v * 1000.0) * 0.001 v = round(v * 1000.0) * 0.001
elif motion.shift: elif motion.shift_pressed:
v = round(v * 100.0) * 0.01 v = round(v * 100.0) * 0.01
else: else:
v = round(v * 10.0) * 0.1 v = round(v * 10.0) * 0.1
@ -179,7 +179,7 @@ func _show_text_edit() -> void:
_line_edit.text = str(value) _line_edit.text = str(value)
_line_edit.set_position(gr.position) _line_edit.set_position(gr.position)
_line_edit.set_size(gr.size) _line_edit.set_size(gr.size)
_line_edit.show_modal() _line_edit.show() # FIXME: no suitable solution for `show_modal` yet
_line_edit.select_all() _line_edit.select_all()
_line_edit.grab_focus() _line_edit.grab_focus()
_line_edit.focus_next = find_next_valid_focus().get_path() _line_edit.focus_next = find_next_valid_focus().get_path()

View File

@ -18,12 +18,10 @@ script = ExtResource("2")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
[node name="Toolbar" type="HBoxContainer" parent="."] [node name="Toolbar" type="HBoxContainer" parent="."]
layout_mode = 2
offset_right = 1152.0 offset_right = 1152.0
offset_bottom = 31.0 offset_bottom = 31.0
[node name="New" type="Button" parent="Toolbar"] [node name="New" type="Button" parent="Toolbar"]
layout_mode = 2
offset_right = 8.0 offset_right = 8.0
offset_bottom = 31.0 offset_bottom = 31.0
tooltip_text = "New" tooltip_text = "New"
@ -31,7 +29,6 @@ script = ExtResource("1")
icon_name = "New" icon_name = "New"
[node name="Load" type="Button" parent="Toolbar"] [node name="Load" type="Button" parent="Toolbar"]
layout_mode = 2
offset_left = 12.0 offset_left = 12.0
offset_right = 20.0 offset_right = 20.0
offset_bottom = 31.0 offset_bottom = 31.0
@ -40,7 +37,6 @@ script = ExtResource("1")
icon_name = "Load" icon_name = "Load"
[node name="Save" type="Button" parent="Toolbar"] [node name="Save" type="Button" parent="Toolbar"]
layout_mode = 2
offset_left = 24.0 offset_left = 24.0
offset_right = 32.0 offset_right = 32.0
offset_bottom = 31.0 offset_bottom = 31.0
@ -49,7 +45,6 @@ script = ExtResource("1")
icon_name = "Save" icon_name = "Save"
[node name="Extra" type="MenuButton" parent="Toolbar"] [node name="Extra" type="MenuButton" parent="Toolbar"]
layout_mode = 2
offset_left = 36.0 offset_left = 36.0
offset_right = 44.0 offset_right = 44.0
offset_bottom = 31.0 offset_bottom = 31.0
@ -58,13 +53,11 @@ script = ExtResource("1")
icon_name = "GuiTabMenuHl" icon_name = "GuiTabMenuHl"
[node name="VSeparator" type="VSeparator" parent="Toolbar"] [node name="VSeparator" type="VSeparator" parent="Toolbar"]
layout_mode = 2
offset_left = 48.0 offset_left = 48.0
offset_right = 52.0 offset_right = 52.0
offset_bottom = 31.0 offset_bottom = 31.0
[node name="Play" type="Button" parent="Toolbar"] [node name="Play" type="Button" parent="Toolbar"]
layout_mode = 2
offset_left = 56.0 offset_left = 56.0
offset_right = 97.0 offset_right = 97.0
offset_bottom = 31.0 offset_bottom = 31.0
@ -74,7 +67,6 @@ script = ExtResource("1")
icon_name = "Play" icon_name = "Play"
[node name="Restore" type="Button" parent="Toolbar"] [node name="Restore" type="Button" parent="Toolbar"]
layout_mode = 2
offset_left = 101.0 offset_left = 101.0
offset_right = 169.0 offset_right = 169.0
offset_bottom = 31.0 offset_bottom = 31.0
@ -85,13 +77,11 @@ script = ExtResource("1")
icon_name = "Reload" icon_name = "Reload"
[node name="VSeparator2" type="VSeparator" parent="Toolbar"] [node name="VSeparator2" type="VSeparator" parent="Toolbar"]
layout_mode = 2
offset_left = 173.0 offset_left = 173.0
offset_right = 177.0 offset_right = 177.0
offset_bottom = 31.0 offset_bottom = 31.0
[node name="Filename" type="Label" parent="Toolbar"] [node name="Filename" type="Label" parent="Toolbar"]
layout_mode = 2
offset_left = 181.0 offset_left = 181.0
offset_top = 2.0 offset_top = 2.0
offset_right = 1148.0 offset_right = 1148.0
@ -101,7 +91,6 @@ text = "Unsaved sound"
clip_text = true clip_text = true
[node name="VersionButton" parent="Toolbar" instance=ExtResource("6")] [node name="VersionButton" parent="Toolbar" instance=ExtResource("6")]
layout_mode = 2
offset_left = 1152.0 offset_left = 1152.0
offset_top = 15.0 offset_top = 15.0
offset_right = 1152.0 offset_right = 1152.0
@ -109,79 +98,67 @@ offset_bottom = 15.0
website = "https://github.com/timothyqiu/gdfxr" website = "https://github.com/timothyqiu/gdfxr"
[node name="HSeparator" type="HSeparator" parent="."] [node name="HSeparator" type="HSeparator" parent="."]
layout_mode = 2
offset_top = 35.0 offset_top = 35.0
offset_right = 1152.0 offset_right = 1152.0
offset_bottom = 39.0 offset_bottom = 39.0
[node name="Editor" type="HBoxContainer" parent="."] [node name="Editor" type="HBoxContainer" parent="."]
layout_mode = 2
offset_top = 43.0 offset_top = 43.0
offset_right = 1152.0 offset_right = 1152.0
offset_bottom = 648.0 offset_bottom = 648.0
size_flags_vertical = 3 size_flags_vertical = 3
[node name="Generators" type="VBoxContainer" parent="Editor"] [node name="Generators" type="VBoxContainer" parent="Editor"]
layout_mode = 2
offset_right = 101.0 offset_right = 101.0
offset_bottom = 605.0 offset_bottom = 605.0
[node name="Button" type="Button" parent="Editor/Generators"] [node name="Button" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_right = 101.0 offset_right = 101.0
offset_bottom = 31.0 offset_bottom = 31.0
text = "Pickup/Coin" text = "Pickup/Coin"
[node name="Button2" type="Button" parent="Editor/Generators"] [node name="Button2" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 35.0 offset_top = 35.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 66.0 offset_bottom = 66.0
text = "Laser/Shoot" text = "Laser/Shoot"
[node name="Button3" type="Button" parent="Editor/Generators"] [node name="Button3" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 70.0 offset_top = 70.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 101.0 offset_bottom = 101.0
text = "Explosion" text = "Explosion"
[node name="Button4" type="Button" parent="Editor/Generators"] [node name="Button4" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 105.0 offset_top = 105.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 136.0 offset_bottom = 136.0
text = "Powerup" text = "Powerup"
[node name="Button5" type="Button" parent="Editor/Generators"] [node name="Button5" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 140.0 offset_top = 140.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 171.0 offset_bottom = 171.0
text = "Hit/Hurt" text = "Hit/Hurt"
[node name="Button6" type="Button" parent="Editor/Generators"] [node name="Button6" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 175.0 offset_top = 175.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 206.0 offset_bottom = 206.0
text = "Jump" text = "Jump"
[node name="Button7" type="Button" parent="Editor/Generators"] [node name="Button7" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 210.0 offset_top = 210.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 241.0 offset_bottom = 241.0
text = "Blip/Select" text = "Blip/Select"
[node name="HSeparator" type="HSeparator" parent="Editor/Generators"] [node name="HSeparator" type="HSeparator" parent="Editor/Generators"]
layout_mode = 2
offset_top = 245.0 offset_top = 245.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 249.0 offset_bottom = 249.0
[node name="Button8" type="Button" parent="Editor/Generators"] [node name="Button8" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 253.0 offset_top = 253.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 284.0 offset_bottom = 284.0
@ -189,7 +166,6 @@ size_flags_horizontal = 3
text = "Mutate" text = "Mutate"
[node name="Button9" type="Button" parent="Editor/Generators"] [node name="Button9" type="Button" parent="Editor/Generators"]
layout_mode = 2
offset_top = 288.0 offset_top = 288.0
offset_right = 101.0 offset_right = 101.0
offset_bottom = 319.0 offset_bottom = 319.0
@ -197,14 +173,12 @@ size_flags_horizontal = 3
text = "Randomize" text = "Randomize"
[node name="ScrollContainer" type="ScrollContainer" parent="Editor"] [node name="ScrollContainer" type="ScrollContainer" parent="Editor"]
layout_mode = 2
offset_left = 105.0 offset_left = 105.0
offset_right = 1152.0 offset_right = 1152.0
offset_bottom = 605.0 offset_bottom = 605.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[node name="Params" type="HBoxContainer" parent="Editor/ScrollContainer"] [node name="Params" type="HBoxContainer" parent="Editor/ScrollContainer"]
layout_mode = 2
offset_left = 17.0 offset_left = 17.0
offset_top = 182.0 offset_top = 182.0
offset_right = 1029.0 offset_right = 1029.0
@ -213,19 +187,16 @@ size_flags_horizontal = 6
size_flags_vertical = 6 size_flags_vertical = 6
[node name="Envolope" type="VBoxContainer" parent="Editor/ScrollContainer/Params"] [node name="Envolope" type="VBoxContainer" parent="Editor/ScrollContainer/Params"]
layout_mode = 2
offset_right = 246.0 offset_right = 246.0
offset_bottom = 241.0 offset_bottom = 241.0
[node name="ParamSlider" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_right = 246.0 offset_right = 246.0
offset_bottom = 31.0 offset_bottom = 31.0
label = "Attack Time" label = "Attack Time"
parameter = "p_env_attack" parameter = "p_env_attack"
[node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_top = 35.0 offset_top = 35.0
offset_right = 246.0 offset_right = 246.0
offset_bottom = 66.0 offset_bottom = 66.0
@ -233,7 +204,6 @@ label = "Sustain Time"
parameter = "p_env_sustain" parameter = "p_env_sustain"
[node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_top = 70.0 offset_top = 70.0
offset_right = 246.0 offset_right = 246.0
offset_bottom = 101.0 offset_bottom = 101.0
@ -241,7 +211,6 @@ label = "Sustain Punch"
parameter = "p_env_punch" parameter = "p_env_punch"
[node name="ParamSlider4" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider4" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_top = 105.0 offset_top = 105.0
offset_right = 246.0 offset_right = 246.0
offset_bottom = 136.0 offset_bottom = 136.0
@ -249,7 +218,6 @@ label = "Decay Time"
parameter = "p_env_decay" parameter = "p_env_decay"
[node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_top = 140.0 offset_top = 140.0
offset_right = 246.0 offset_right = 246.0
offset_bottom = 171.0 offset_bottom = 171.0
@ -258,7 +226,6 @@ parameter = "p_arp_mod"
bipolar = true bipolar = true
[node name="ParamSlider6" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider6" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_top = 175.0 offset_top = 175.0
offset_right = 246.0 offset_right = 246.0
offset_bottom = 206.0 offset_bottom = 206.0
@ -266,7 +233,6 @@ label = "Change Speed"
parameter = "p_arp_speed" parameter = "p_arp_speed"
[node name="ParamSlider7" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")] [node name="ParamSlider7" parent="Editor/ScrollContainer/Params/Envolope" instance=ExtResource("3")]
layout_mode = 2
offset_top = 210.0 offset_top = 210.0
offset_right = 246.0 offset_right = 246.0
offset_bottom = 241.0 offset_bottom = 241.0
@ -274,20 +240,17 @@ label = "Volume"
parameter = "sound_vol" parameter = "sound_vol"
[node name="Frequency" type="VBoxContainer" parent="Editor/ScrollContainer/Params"] [node name="Frequency" type="VBoxContainer" parent="Editor/ScrollContainer/Params"]
layout_mode = 2
offset_left = 250.0 offset_left = 250.0
offset_right = 494.0 offset_right = 494.0
offset_bottom = 241.0 offset_bottom = 241.0
[node name="ParamSlider" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_right = 244.0 offset_right = 244.0
offset_bottom = 31.0 offset_bottom = 31.0
label = "Start Frequency" label = "Start Frequency"
parameter = "p_base_freq" parameter = "p_base_freq"
[node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_top = 35.0 offset_top = 35.0
offset_right = 244.0 offset_right = 244.0
offset_bottom = 66.0 offset_bottom = 66.0
@ -295,7 +258,6 @@ label = "Min Frequency"
parameter = "p_freq_limit" parameter = "p_freq_limit"
[node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_top = 70.0 offset_top = 70.0
offset_right = 244.0 offset_right = 244.0
offset_bottom = 101.0 offset_bottom = 101.0
@ -304,7 +266,6 @@ parameter = "p_freq_ramp"
bipolar = true bipolar = true
[node name="ParamSlider4" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider4" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_top = 105.0 offset_top = 105.0
offset_right = 244.0 offset_right = 244.0
offset_bottom = 136.0 offset_bottom = 136.0
@ -313,7 +274,6 @@ parameter = "p_freq_dramp"
bipolar = true bipolar = true
[node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_top = 140.0 offset_top = 140.0
offset_right = 244.0 offset_right = 244.0
offset_bottom = 171.0 offset_bottom = 171.0
@ -321,7 +281,6 @@ label = "Vibrato Depth"
parameter = "p_vib_strength" parameter = "p_vib_strength"
[node name="ParamSlider6" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider6" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_top = 175.0 offset_top = 175.0
offset_right = 244.0 offset_right = 244.0
offset_bottom = 206.0 offset_bottom = 206.0
@ -329,7 +288,6 @@ label = "Vibrato Speed"
parameter = "p_vib_speed" parameter = "p_vib_speed"
[node name="ParamSlider7" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")] [node name="ParamSlider7" parent="Editor/ScrollContainer/Params/Frequency" instance=ExtResource("3")]
layout_mode = 2
offset_top = 210.0 offset_top = 210.0
offset_right = 244.0 offset_right = 244.0
offset_bottom = 241.0 offset_bottom = 241.0
@ -337,20 +295,17 @@ label = "Repeat Speed"
parameter = "p_repeat_speed" parameter = "p_repeat_speed"
[node name="Waveform" type="VBoxContainer" parent="Editor/ScrollContainer/Params"] [node name="Waveform" type="VBoxContainer" parent="Editor/ScrollContainer/Params"]
layout_mode = 2
offset_left = 498.0 offset_left = 498.0
offset_right = 727.0 offset_right = 727.0
offset_bottom = 241.0 offset_bottom = 241.0
[node name="WaveformOption" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("4")] [node name="WaveformOption" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("4")]
layout_mode = 2
offset_right = 229.0 offset_right = 229.0
offset_bottom = 31.0 offset_bottom = 31.0
options = ["Square", "Sawtooth", "Sine", "Noise"] options = ["Square", "Sawtooth", "Sine", "Noise"]
parameter = "wave_type" parameter = "wave_type"
[node name="ParamSlider" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")] [node name="ParamSlider" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")]
layout_mode = 2
offset_top = 35.0 offset_top = 35.0
offset_right = 229.0 offset_right = 229.0
offset_bottom = 66.0 offset_bottom = 66.0
@ -358,7 +313,6 @@ label = "Square Duty"
parameter = "p_duty" parameter = "p_duty"
[node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")] [node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")]
layout_mode = 2
offset_top = 70.0 offset_top = 70.0
offset_right = 229.0 offset_right = 229.0
offset_bottom = 101.0 offset_bottom = 101.0
@ -367,7 +321,6 @@ parameter = "p_duty_ramp"
bipolar = true bipolar = true
[node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")] [node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")]
layout_mode = 2
offset_top = 105.0 offset_top = 105.0
offset_right = 229.0 offset_right = 229.0
offset_bottom = 136.0 offset_bottom = 136.0
@ -376,7 +329,6 @@ parameter = "p_pha_offset"
bipolar = true bipolar = true
[node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")] [node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Waveform" instance=ExtResource("3")]
layout_mode = 2
offset_top = 140.0 offset_top = 140.0
offset_right = 229.0 offset_right = 229.0
offset_bottom = 171.0 offset_bottom = 171.0
@ -385,20 +337,17 @@ parameter = "p_pha_ramp"
bipolar = true bipolar = true
[node name="Filter" type="VBoxContainer" parent="Editor/ScrollContainer/Params"] [node name="Filter" type="VBoxContainer" parent="Editor/ScrollContainer/Params"]
layout_mode = 2
offset_left = 731.0 offset_left = 731.0
offset_right = 1012.0 offset_right = 1012.0
offset_bottom = 241.0 offset_bottom = 241.0
[node name="ParamSlider" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")] [node name="ParamSlider" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")]
layout_mode = 2
offset_right = 281.0 offset_right = 281.0
offset_bottom = 31.0 offset_bottom = 31.0
label = "Low-pass Cutoff" label = "Low-pass Cutoff"
parameter = "p_lpf_freq" parameter = "p_lpf_freq"
[node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")] [node name="ParamSlider2" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")]
layout_mode = 2
offset_top = 35.0 offset_top = 35.0
offset_right = 281.0 offset_right = 281.0
offset_bottom = 66.0 offset_bottom = 66.0
@ -407,7 +356,6 @@ parameter = "p_lpf_ramp"
bipolar = true bipolar = true
[node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")] [node name="ParamSlider5" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")]
layout_mode = 2
offset_top = 70.0 offset_top = 70.0
offset_right = 281.0 offset_right = 281.0
offset_bottom = 101.0 offset_bottom = 101.0
@ -415,7 +363,6 @@ label = "Low-pass Resonance"
parameter = "p_lpf_resonance" parameter = "p_lpf_resonance"
[node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")] [node name="ParamSlider3" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")]
layout_mode = 2
offset_top = 105.0 offset_top = 105.0
offset_right = 281.0 offset_right = 281.0
offset_bottom = 136.0 offset_bottom = 136.0
@ -423,7 +370,6 @@ label = "High-pass Cutoff"
parameter = "p_hpf_freq" parameter = "p_hpf_freq"
[node name="ParamSlider4" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")] [node name="ParamSlider4" parent="Editor/ScrollContainer/Params/Filter" instance=ExtResource("3")]
layout_mode = 2
offset_top = 140.0 offset_top = 140.0
offset_right = 281.0 offset_right = 281.0
offset_bottom = 171.0 offset_bottom = 171.0

7
example/Example.gd Normal file
View File

@ -0,0 +1,7 @@
extends CenterContainer
func _ready() -> void:
var audio := load("res://example/example.sfxr") as AudioStreamSample
print(audio)
audio.save_to_wav("/home/timothy/Desktop/foo.wav")
$AudioStreamPlayer.stream = audio