2020-04-01 06:04:22 +02:00
|
|
|
[gd_scene load_steps=6 format=2]
|
2020-02-24 08:32:11 +01:00
|
|
|
|
|
|
|
[ext_resource path="res://material_maker/nodes/audio.gd" type="Script" id=1]
|
2020-04-01 06:04:22 +02:00
|
|
|
[ext_resource path="res://material_maker/nodes/audio_keyboard.gd" type="Script" id=2]
|
2020-02-24 08:32:11 +01:00
|
|
|
|
|
|
|
[sub_resource type="AudioStreamGenerator" id=1]
|
2020-04-01 06:04:22 +02:00
|
|
|
buffer_length = 0.05
|
2020-02-24 08:32:11 +01:00
|
|
|
|
|
|
|
[sub_resource type="Shader" id=2]
|
|
|
|
resource_local_to_scene = true
|
|
|
|
|
|
|
|
[sub_resource type="ShaderMaterial" id=3]
|
|
|
|
resource_local_to_scene = true
|
|
|
|
shader = SubResource( 2 )
|
|
|
|
|
2020-04-01 06:04:22 +02:00
|
|
|
[node name="Audio" type="GraphNode" groups=[
|
|
|
|
"preview",
|
|
|
|
]]
|
2020-02-24 08:32:11 +01:00
|
|
|
margin_right = 96.0
|
|
|
|
margin_bottom = 115.0
|
|
|
|
title = "Audio"
|
|
|
|
show_close = true
|
|
|
|
slot/0/left_enabled = true
|
|
|
|
slot/0/left_type = 4
|
|
|
|
slot/0/left_color = Color( 1, 1, 0, 1 )
|
|
|
|
slot/0/right_enabled = false
|
|
|
|
slot/0/right_type = 0
|
|
|
|
slot/0/right_color = Color( 1, 1, 1, 1 )
|
|
|
|
slot/1/left_enabled = false
|
|
|
|
slot/1/left_type = 0
|
|
|
|
slot/1/left_color = Color( 1, 1, 1, 1 )
|
|
|
|
slot/1/right_enabled = false
|
|
|
|
slot/1/right_type = 0
|
|
|
|
slot/1/right_color = Color( 1, 1, 1, 1 )
|
2020-04-01 06:04:22 +02:00
|
|
|
slot/2/left_enabled = false
|
|
|
|
slot/2/left_type = 0
|
|
|
|
slot/2/left_color = Color( 1, 1, 1, 1 )
|
|
|
|
slot/2/right_enabled = false
|
|
|
|
slot/2/right_type = 0
|
|
|
|
slot/2/right_color = Color( 1, 1, 1, 1 )
|
2020-02-24 08:32:11 +01:00
|
|
|
script = ExtResource( 1 )
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false,
|
|
|
|
"_editor_description_": ""
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="Button" type="Button" parent="."]
|
|
|
|
margin_left = 16.0
|
|
|
|
margin_top = 24.0
|
|
|
|
margin_right = 80.0
|
|
|
|
margin_bottom = 44.0
|
|
|
|
text = "Play"
|
|
|
|
|
2020-04-01 06:04:22 +02:00
|
|
|
[node name="Midi" type="CheckBox" parent="."]
|
|
|
|
margin_left = 16.0
|
|
|
|
margin_top = 45.0
|
|
|
|
margin_right = 80.0
|
|
|
|
margin_bottom = 69.0
|
|
|
|
text = "MIDI"
|
|
|
|
|
2020-02-24 08:32:11 +01:00
|
|
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
|
|
|
stream = SubResource( 1 )
|
|
|
|
|
|
|
|
[node name="ViewportContainer" type="ViewportContainer" parent="."]
|
|
|
|
margin_left = 16.0
|
2020-04-01 06:04:22 +02:00
|
|
|
margin_top = 70.0
|
2020-02-24 08:32:11 +01:00
|
|
|
margin_right = 80.0
|
2020-04-01 06:04:22 +02:00
|
|
|
margin_bottom = 134.0
|
2020-02-24 08:32:11 +01:00
|
|
|
rect_min_size = Vector2( 64, 64 )
|
|
|
|
mouse_filter = 2
|
|
|
|
|
|
|
|
[node name="Viewport" type="Viewport" parent="ViewportContainer"]
|
|
|
|
size = Vector2( 64, 64 )
|
|
|
|
transparent_bg = true
|
|
|
|
handle_input_locally = false
|
2020-03-28 10:04:53 +01:00
|
|
|
keep_3d_linear = true
|
2020-02-24 08:32:11 +01:00
|
|
|
render_target_v_flip = true
|
|
|
|
render_target_update_mode = 3
|
|
|
|
|
|
|
|
[node name="ColorRect" type="ColorRect" parent="ViewportContainer/Viewport"]
|
|
|
|
material = SubResource( 3 )
|
|
|
|
margin_right = 64.0
|
|
|
|
margin_bottom = 64.0
|
|
|
|
rect_min_size = Vector2( 64, 64 )
|
|
|
|
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
|
|
wait_time = 0.1
|
|
|
|
one_shot = true
|
2020-04-01 06:04:22 +02:00
|
|
|
|
|
|
|
[node name="Keyboard" type="Node2D" parent="."]
|
|
|
|
visible = false
|
|
|
|
position = Vector2( -174.468, 146.693 )
|
|
|
|
script = ExtResource( 2 )
|
2020-02-24 08:32:11 +01:00
|
|
|
[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"]
|
2020-04-01 06:04:22 +02:00
|
|
|
[connection signal="toggled" from="Midi" to="." method="_on_Midi_toggled"]
|
2020-02-24 08:32:11 +01:00
|
|
|
[connection signal="timeout" from="Timer" to="." method="update_shader"]
|