audioplayer.tscn 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. [gd_scene load_steps=2 format=3 uid="uid://csapiqka522fh"]
  2. [ext_resource type="Script" uid="uid://clmtlg8via3qn" path="res://scenes/Nodes/audioplayer.gd" id="1_yprak"]
  3. [node name="Control" type="Control"]
  4. custom_minimum_size = Vector2(400, 0)
  5. layout_mode = 3
  6. anchors_preset = 15
  7. anchor_right = 1.0
  8. anchor_bottom = 1.0
  9. offset_right = -880.0
  10. offset_bottom = -568.0
  11. grow_horizontal = 2
  12. grow_vertical = 2
  13. script = ExtResource("1_yprak")
  14. metadata/loadenable = false
  15. [node name="Panel" type="Panel" parent="."]
  16. layout_mode = 0
  17. offset_right = 400.0
  18. offset_bottom = 96.0
  19. [node name="Label" type="Label" parent="."]
  20. visible = false
  21. layout_mode = 0
  22. offset_left = 8.0
  23. offset_top = 5.0
  24. offset_right = 232.0
  25. offset_bottom = 28.0
  26. text = "Drop files here or load below"
  27. [node name="FileDialog" type="FileDialog" parent="."]
  28. title = "Select input file"
  29. use_native_dialog = true
  30. [node name="LoadButton" type="Button" parent="."]
  31. layout_mode = 0
  32. offset_top = 104.0
  33. offset_right = 128.0
  34. offset_bottom = 147.0
  35. text = "Load File"
  36. [node name="RecycleButton" type="Button" parent="." groups=["outputnode"]]
  37. layout_mode = 0
  38. offset_top = 104.0
  39. offset_right = 128.0
  40. offset_bottom = 147.0
  41. tooltip_text = "Copies your output file back to your input for further processing."
  42. text = "Recycle File"
  43. metadata/outputfunction = "recycle"
  44. [node name="PlayButton" type="Button" parent="."]
  45. layout_mode = 0
  46. offset_left = 136.0
  47. offset_top = 104.0
  48. offset_right = 264.0
  49. offset_bottom = 147.0
  50. text = "Play"
  51. [node name="StopButton" type="Button" parent="."]
  52. layout_mode = 0
  53. offset_left = 272.0
  54. offset_top = 104.0
  55. offset_right = 400.0
  56. offset_bottom = 147.0
  57. text = "Stop"
  58. [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
  59. [node name="WavError" type="Window" parent="."]
  60. title = "Wrong File Type"
  61. initial_position = 2
  62. size = Vector2i(350, 100)
  63. visible = false
  64. exclusive = true
  65. unresizable = true
  66. borderless = true
  67. always_on_top = true
  68. popup_window = true
  69. [node name="Label" type="Label" parent="WavError"]
  70. offset_right = 349.0
  71. offset_bottom = 58.0
  72. text = "Wrong file type
  73. Only WAV files are supported"
  74. horizontal_alignment = 1
  75. vertical_alignment = 1
  76. autowrap_mode = 2
  77. [node name="CloseButton" type="Button" parent="WavError"]
  78. offset_left = 143.0
  79. offset_top = 62.0
  80. offset_right = 207.0
  81. offset_bottom = 93.0
  82. text = "Ok"
  83. [node name="WaveformPreview" type="TextureRect" parent="."]
  84. layout_mode = 0
  85. offset_right = 400.0
  86. offset_bottom = 96.0
  87. expand_mode = 2
  88. [node name="Playhead" type="Line2D" parent="."]
  89. points = PackedVector2Array(0, 0, 0, 96)
  90. width = 2.0
  91. default_color = Color(1, 1, 1, 0.541176)
  92. [connection signal="button_down" from="LoadButton" to="." method="_on_load_button_button_down"]
  93. [connection signal="button_down" from="RecycleButton" to="." method="_on_recycle_button_button_down"]
  94. [connection signal="button_down" from="PlayButton" to="." method="_on_play_button_button_down"]
  95. [connection signal="button_down" from="StopButton" to="." method="_on_stop_button_button_down"]
  96. [connection signal="button_down" from="WavError/CloseButton" to="." method="_on_close_button_button_down"]