Compare commits
2 Commits
c44f710d7e
...
27bf8b453a
Author | SHA1 | Date |
---|---|---|
Martyn | 27bf8b453a | |
Martyn | 5b86523b48 |
|
@ -37,6 +37,9 @@ margin_top = 100.0
|
||||||
margin_right = 240.0
|
margin_right = 240.0
|
||||||
margin_bottom = 140.0
|
margin_bottom = 140.0
|
||||||
text = "Record"
|
text = "Record"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="SaveButton" type="Button" parent="."]
|
[node name="SaveButton" type="Button" parent="."]
|
||||||
margin_left = 120.0
|
margin_left = 120.0
|
||||||
|
@ -61,6 +64,9 @@ margin_right = 420.0
|
||||||
margin_bottom = 140.0
|
margin_bottom = 140.0
|
||||||
disabled = true
|
disabled = true
|
||||||
text = "Play"
|
text = "Play"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="PlayMusic" type="Button" parent="."]
|
[node name="PlayMusic" type="Button" parent="."]
|
||||||
margin_left = 120.0
|
margin_left = 120.0
|
||||||
|
@ -68,6 +74,9 @@ margin_top = 260.0
|
||||||
margin_right = 240.0
|
margin_right = 240.0
|
||||||
margin_bottom = 300.0
|
margin_bottom = 300.0
|
||||||
text = "Play Music"
|
text = "Play Music"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Status" type="Label" parent="."]
|
[node name="Status" type="Label" parent="."]
|
||||||
margin_left = 120.0
|
margin_left = 120.0
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
# Declare member variables here. Examples:
|
||||||
|
# var a = 2
|
||||||
|
# var b = "text"
|
||||||
|
|
||||||
|
var spectrum_play
|
||||||
|
var spectrum_record
|
||||||
|
var recorder
|
||||||
|
var raw_recording
|
||||||
|
var raw_recording_data
|
||||||
|
var playable_recording_data
|
||||||
|
|
||||||
|
var position_changing_by_code
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
#var GDS = VideoStreamGDNative.new()
|
||||||
|
#GDS.set_file(OS.get_user_data_dir()+"/converted.mpg")
|
||||||
|
#$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.set_stream(load(GDS.get_file()))
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.set_stream(load(OS.get_user_data_dir()+"/converted.webm"))
|
||||||
|
print($MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.stream.to_string())
|
||||||
|
#$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPosSlider.max_value = 364
|
||||||
|
#print($MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.to_string())
|
||||||
|
var idx = AudioServer.get_bus_index("Record")
|
||||||
|
recorder = AudioServer.get_bus_effect(idx, 0)
|
||||||
|
spectrum_play = AudioServer.get_bus_effect_instance(0,0)
|
||||||
|
spectrum_record = AudioServer.get_bus_effect_instance(1,1)
|
||||||
|
position_changing_by_code = false
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
var magnitude: float = spectrum_play.get_magnitude_for_frequency_range(0,11050.0).length()
|
||||||
|
var energy = clamp((60 + linear2db(magnitude)) / 60, 0, 1)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer/PlaybackMeter.value = energy * 100
|
||||||
|
magnitude = spectrum_record.get_magnitude_for_frequency_range(0,11050.0).length()
|
||||||
|
energy = clamp((60 + linear2db(magnitude)) / 60, 0, 1)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2/RecordMeter.value = energy * 100
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer2/VideoPos.text = "Video Pos : "+String($MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.stream_position)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer2/AudioPos.text = "Audio Pos : "+String($AudioStreamPlayer.get_playback_position())
|
||||||
|
if !position_changing_by_code:
|
||||||
|
position_changing_by_code = true
|
||||||
|
#$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPosSlider.value = $MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.stream_position
|
||||||
|
position_changing_by_code = false
|
||||||
|
|
||||||
|
|
||||||
|
func _on_RecButton_pressed():
|
||||||
|
if recorder.is_recording_active():
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.stop()
|
||||||
|
raw_recording = recorder.get_recording()
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/PlayButton.disabled = false
|
||||||
|
recorder.set_recording_active(false)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/RecordButton.text = "Record"
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/Status.text = ""
|
||||||
|
else:
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.play()
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/PlayButton.disabled = true
|
||||||
|
recorder.set_recording_active(true)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/RecordButton.text = "Stop"
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/Status.text = "Recording..."
|
||||||
|
|
||||||
|
|
||||||
|
func _on_PlayButton_pressed():
|
||||||
|
var data = raw_recording.get_data()
|
||||||
|
$AudioStreamPlayer.stream = raw_recording
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.play()
|
||||||
|
$AudioStreamPlayer.play()
|
||||||
|
#$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPosSlider.editable = true
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer/DelaySlider.editable = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_BackgroundaudioSlider_changed(value):
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.volume_db = linear2db(value/100)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_VocalSlider_value_changed(value):
|
||||||
|
$AudioStreamPlayer.volume_db = linear2db(value/100)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_DelaySlider_value_changed(value):
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer/Label.text = "Audio Delay: "+String(value/1000)+"s"
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.paused = true
|
||||||
|
$AudioStreamPlayer.stream_paused = true
|
||||||
|
$AudioStreamPlayer.seek($MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.stream_position + value/1000)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.paused = false
|
||||||
|
$AudioStreamPlayer.stream_paused = false
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func _on_VideoPosSlider_value_changed(value):
|
||||||
|
if !position_changing_by_code:
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.paused = true
|
||||||
|
$AudioStreamPlayer.stream_paused = true
|
||||||
|
position_changing_by_code = true
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.streamseek(value)
|
||||||
|
$AudioStreamPlayer.seek(value + $MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer/DelaySlider.value/1000)
|
||||||
|
$MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPlayer.paused = false
|
||||||
|
position_changing_by_code = false
|
||||||
|
$AudioStreamPlayer.stream_paused = false
|
|
@ -0,0 +1,280 @@
|
||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://main_menu.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://PlayVideoRecordAudio.gd" type="Script" id=3]
|
||||||
|
[ext_resource path="res://UI/src/meter.png" type="Texture" id=4]
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamMicrophone" id=1]
|
||||||
|
|
||||||
|
[node name="Control" type="Control"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_right = -6.10352e-05
|
||||||
|
rect_pivot_offset = Vector2( -138.227, 18.34 )
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_left = 5.0
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = -5.0
|
||||||
|
margin_bottom = -5.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 590.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
margin_right = 989.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
|
||||||
|
margin_right = 989.0
|
||||||
|
margin_bottom = 15.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
bbcode_text = "[center]SANG YOA <3 OUT!!![/center]"
|
||||||
|
text = "SANG YOA <3 OUT!!!"
|
||||||
|
fit_content_height = true
|
||||||
|
scroll_active = false
|
||||||
|
|
||||||
|
[node name="Quit" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
margin_left = 993.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
text = "X"
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
margin_top = 24.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 305.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 281.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="VideoPlayer" type="VideoPlayer" parent="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 261.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="VideoPosSlider" type="HSlider" parent="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
|
margin_top = 265.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 281.0
|
||||||
|
rect_min_size = Vector2( 500, 0 )
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
max_value = 10.0
|
||||||
|
step = 0.01
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
margin_top = 309.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 590.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 281.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="RecordButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 28.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 48.0
|
||||||
|
text = "Record"
|
||||||
|
|
||||||
|
[node name="PlayButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 52.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 72.0
|
||||||
|
disabled = true
|
||||||
|
text = "Play"
|
||||||
|
|
||||||
|
[node name="Status" type="RichTextLabel" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 76.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 91.0
|
||||||
|
fit_content_height = true
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 95.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 111.0
|
||||||
|
|
||||||
|
[node name="Playbacklabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer"]
|
||||||
|
margin_right = 110.0
|
||||||
|
margin_bottom = 15.0
|
||||||
|
rect_min_size = Vector2( 110, 0 )
|
||||||
|
size_flags_vertical = 0
|
||||||
|
visible_characters = 28
|
||||||
|
text = "Playback meter : "
|
||||||
|
fit_content_height = true
|
||||||
|
scroll_active = false
|
||||||
|
|
||||||
|
[node name="PlaybackMeter" type="TextureProgress" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer"]
|
||||||
|
margin_left = 114.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 16.0
|
||||||
|
rect_min_size = Vector2( 0, 16 )
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 0
|
||||||
|
texture_progress = ExtResource( 4 )
|
||||||
|
nine_patch_stretch = true
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 115.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 131.0
|
||||||
|
|
||||||
|
[node name="Recordlabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2"]
|
||||||
|
margin_right = 110.0
|
||||||
|
margin_bottom = 16.0
|
||||||
|
rect_min_size = Vector2( 110, 0 )
|
||||||
|
text = "Record meter :"
|
||||||
|
fit_content_height = true
|
||||||
|
|
||||||
|
[node name="RecordMeter" type="TextureProgress" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2"]
|
||||||
|
margin_left = 114.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 16.0
|
||||||
|
rect_min_size = Vector2( 0, 16 )
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 0
|
||||||
|
texture_progress = ExtResource( 4 )
|
||||||
|
nine_patch_stretch = true
|
||||||
|
|
||||||
|
[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 135.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 235.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3"]
|
||||||
|
margin_right = 620.0
|
||||||
|
margin_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="BackgroundaudioSlider" type="VSlider" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer"]
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 100.0
|
||||||
|
rect_min_size = Vector2( 0, 100 )
|
||||||
|
value = 50.0
|
||||||
|
|
||||||
|
[node name="VocalSlider" type="VSlider" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer"]
|
||||||
|
margin_left = 20.0
|
||||||
|
margin_right = 36.0
|
||||||
|
margin_bottom = 100.0
|
||||||
|
rect_min_size = Vector2( 0, 100 )
|
||||||
|
max_value = 100.0
|
||||||
|
value = 50.0
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer"]
|
||||||
|
margin_left = 40.0
|
||||||
|
margin_right = 540.0
|
||||||
|
margin_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer"]
|
||||||
|
margin_right = 500.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Audio Delay : 0s"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="DelaySlider" type="HSlider" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer"]
|
||||||
|
margin_top = 18.0
|
||||||
|
margin_right = 500.0
|
||||||
|
margin_bottom = 34.0
|
||||||
|
rect_min_size = Vector2( 500, 0 )
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
max_value = 1000.0
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="VBoxContainer2" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer"]
|
||||||
|
margin_left = 544.0
|
||||||
|
margin_right = 620.0
|
||||||
|
margin_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="AudioPos" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer2"]
|
||||||
|
margin_right = 76.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Audio Pos : "
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="VideoPos" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer2"]
|
||||||
|
margin_top = 18.0
|
||||||
|
margin_right = 76.0
|
||||||
|
margin_bottom = 49.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Video Pos :
|
||||||
|
"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="HBoxContainer4" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||||
|
margin_top = 239.0
|
||||||
|
margin_right = 1013.0
|
||||||
|
margin_bottom = 253.0
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer4"]
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
rect_min_size = Vector2( 16, 0 )
|
||||||
|
text = "B"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer4"]
|
||||||
|
margin_left = 20.0
|
||||||
|
margin_right = 36.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
rect_min_size = Vector2( 16, 0 )
|
||||||
|
text = "V"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
|
||||||
|
[node name="AudioStreamRecorder" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = SubResource( 1 )
|
||||||
|
autoplay = true
|
||||||
|
bus = "Record"
|
||||||
|
|
||||||
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/Quit" to="MarginContainer/VBoxContainer/HBoxContainer2/Quit" method="_on_Quit_pressed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/VideoPosSlider" to="." method="_on_VideoPosSlider_value_changed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/RecordButton" to="." method="_on_RecButton_pressed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/PlayButton" to="." method="_on_PlayButton_pressed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/BackgroundaudioSlider" to="." method="_on_BackgroundaudioSlider_changed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VocalSlider" to="." method="_on_VocalSlider_value_changed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer3/HBoxContainer/VBoxContainer/DelaySlider" to="." method="_on_DelaySlider_value_changed"]
|
|
@ -1,14 +1,23 @@
|
||||||
[gd_resource type="AudioBusLayout" load_steps=2 format=2]
|
[gd_resource type="AudioBusLayout" load_steps=4 format=2]
|
||||||
|
|
||||||
[sub_resource type="AudioEffectRecord" id=1]
|
[sub_resource type="AudioEffectSpectrumAnalyzer" id=1]
|
||||||
resource_name = "Record"
|
resource_name = "SpectrumAnalyzer"
|
||||||
|
|
||||||
|
[sub_resource type="AudioEffectRecord" id=4]
|
||||||
|
|
||||||
|
[sub_resource type="AudioEffectSpectrumAnalyzer" id=3]
|
||||||
|
resource_name = "SpectrumAnalyzer"
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
bus/0/effect/0/effect = SubResource( 1 )
|
||||||
|
bus/0/effect/0/enabled = true
|
||||||
bus/1/name = "Record"
|
bus/1/name = "Record"
|
||||||
bus/1/solo = false
|
bus/1/solo = false
|
||||||
bus/1/mute = true
|
bus/1/mute = true
|
||||||
bus/1/bypass_fx = false
|
bus/1/bypass_fx = false
|
||||||
bus/1/volume_db = 0.0
|
bus/1/volume_db = 0.0
|
||||||
bus/1/send = "Master"
|
bus/1/send = "Master"
|
||||||
bus/1/effect/0/effect = SubResource( 1 )
|
bus/1/effect/0/effect = SubResource( 4 )
|
||||||
bus/1/effect/0/enabled = true
|
bus/1/effect/0/enabled = true
|
||||||
|
bus/1/effect/1/effect = SubResource( 3 )
|
||||||
|
bus/1/effect/1/enabled = true
|
||||||
|
|
|
@ -36,9 +36,9 @@ func _on_Control_ready():
|
||||||
# line = o.get_line()
|
# line = o.get_line()
|
||||||
# print(line)
|
# print(line)
|
||||||
#print(OS.get_user_data_dir())
|
#print(OS.get_user_data_dir())
|
||||||
$HTTPRequest.request("http://127.0.0.1:10435/get?url=https://www.youtube.com/watch?v=x1T6QFpd0J4")
|
|
||||||
#$HTTPRequest.request("http://127.0.0.1:10435/get?url=https://player.vimeo.com/video/459151338")
|
#$HTTPRequest.request("http://127.0.0.1:10435/get?url=https://player.vimeo.com/video/459151338")
|
||||||
#https://www.youtube.com/watch?v=x1T6QFpd0J4
|
#https://www.youtube.com/watch?v=x1T6QFpd0J4
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
func _on_HTTPRequest_request_completed(result, response_code, headers, body):
|
func _on_HTTPRequest_request_completed(result, response_code, headers, body):
|
||||||
|
@ -58,3 +58,8 @@ func _on_HTTPRequest_request_completed(result, response_code, headers, body):
|
||||||
|
|
||||||
func _on_DownloadProgress_changed():
|
func _on_DownloadProgress_changed():
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Button_pressed():
|
||||||
|
print("http://127.0.0.1:10435/get?url="+$HBoxContainer/TextEdit.text)
|
||||||
|
$HTTPRequest.request("http://127.0.0.1:10435/get?url="+$HBoxContainer/TextEdit.text)
|
||||||
|
|
|
@ -45,7 +45,41 @@ __meta__ = {
|
||||||
margin_right = 624.0
|
margin_right = 624.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 14.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
|
margin_left = 1.0
|
||||||
|
margin_top = 379.0
|
||||||
|
margin_right = 1023.0
|
||||||
|
margin_bottom = 394.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||||
|
margin_right = 45.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
rect_min_size = Vector2( 45, 0 )
|
||||||
|
size_flags_vertical = 3
|
||||||
|
text = "URL: "
|
||||||
|
valign = 1
|
||||||
|
|
||||||
|
[node name="TextEdit" type="TextEdit" parent="HBoxContainer"]
|
||||||
|
margin_left = 49.0
|
||||||
|
margin_right = 985.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "https://www.youtube.com/watch?v=x1T6QFpd0J4"
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="HBoxContainer"]
|
||||||
|
margin_left = 989.0
|
||||||
|
margin_right = 1022.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
text = "GO"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="HTTPRequest" type="HTTPRequest" parent="."]
|
[node name="HTTPRequest" type="HTTPRequest" parent="."]
|
||||||
[connection signal="ready" from="." to="." method="_on_Control_ready"]
|
[connection signal="ready" from="." to="." method="_on_Control_ready"]
|
||||||
[connection signal="changed" from="VBoxContainer2/DownloadProgress" to="." method="_on_DownloadProgress_changed"]
|
[connection signal="changed" from="VBoxContainer2/DownloadProgress" to="." method="_on_DownloadProgress_changed"]
|
||||||
|
[connection signal="pressed" from="HBoxContainer/Button" to="." method="_on_Button_pressed"]
|
||||||
[connection signal="request_completed" from="HTTPRequest" to="." method="_on_HTTPRequest_request_completed"]
|
[connection signal="request_completed" from="HTTPRequest" to="." method="_on_HTTPRequest_request_completed"]
|
||||||
|
|
|
@ -25,3 +25,7 @@ func _on_Button_pressed():
|
||||||
|
|
||||||
func _on_MicTest_pressed():
|
func _on_MicTest_pressed():
|
||||||
get_tree().change_scene("res://MicRecord.tscn")
|
get_tree().change_scene("res://MicRecord.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_DownloadPlayVid2_pressed():
|
||||||
|
get_tree().change_scene("res://PlayVideoRecordAudio.tscn")
|
||||||
|
|
|
@ -10,25 +10,36 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 0.033
|
anchor_bottom = 1.0
|
||||||
margin_bottom = 0.200001
|
margin_left = 5.0
|
||||||
alignment = 1
|
margin_top = 5.0
|
||||||
|
margin_right = -5.0
|
||||||
|
margin_bottom = -5.0
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
margin_right = 1000.0
|
margin_right = 1014.0
|
||||||
|
margin_bottom = 590.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
margin_right = 1014.0
|
||||||
|
margin_bottom = 20.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
margin_right = 990.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
alignment = 1
|
|
||||||
|
|
||||||
[node name="RichTextLabel" type="RichTextLabel" parent="HBoxContainer/VBoxContainer"]
|
[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
|
||||||
margin_top = 2.0
|
margin_right = 990.0
|
||||||
margin_right = 1000.0
|
margin_bottom = 15.0
|
||||||
margin_bottom = 17.0
|
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
bbcode_text = "[center]MAIN MENU[/center]"
|
bbcode_text = "[center]MAIN MENU[/center]"
|
||||||
|
@ -36,32 +47,51 @@ text = "MAIN MENU"
|
||||||
fit_content_height = true
|
fit_content_height = true
|
||||||
scroll_active = false
|
scroll_active = false
|
||||||
|
|
||||||
[node name="Quit" type="Button" parent="HBoxContainer"]
|
[node name="Quit" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||||
margin_left = 1004.0
|
margin_left = 994.0
|
||||||
margin_right = 1024.0
|
margin_right = 1014.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 20.0
|
||||||
text = "X"
|
text = "X"
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="GridContainer" type="GridContainer" parent="."]
|
[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
anchor_right = 1.0
|
margin_top = 24.0
|
||||||
anchor_bottom = 0.815
|
margin_right = 1014.0
|
||||||
margin_top = 50.0
|
margin_bottom = 111.0
|
||||||
margin_bottom = -3.05176e-05
|
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="DownloadPlayVid" type="Button" parent="GridContainer"]
|
[node name="RichTextLabel2" type="RichTextLabel" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
margin_right = 109.0
|
margin_right = 1014.0
|
||||||
margin_bottom = 20.0
|
margin_bottom = 15.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
bbcode_text = "Complete Test Scenarios in order, 2 depends on 1 having worked..."
|
||||||
|
text = "Complete Test Scenarios in order, 2 depends on 1 having worked..."
|
||||||
|
fit_content_height = true
|
||||||
|
scroll_active = false
|
||||||
|
|
||||||
|
[node name="DownloadPlayVid" type="Button" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
margin_top = 19.0
|
||||||
|
margin_right = 1014.0
|
||||||
|
margin_bottom = 39.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
text = "Test scenario 1"
|
text = "Test scenario 1"
|
||||||
|
|
||||||
[node name="MicTest" type="Button" parent="GridContainer"]
|
[node name="DownloadPlayVid2" type="Button" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
margin_top = 24.0
|
margin_top = 43.0
|
||||||
margin_right = 109.0
|
margin_right = 1014.0
|
||||||
margin_bottom = 44.0
|
margin_bottom = 63.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Test scenario 2"
|
||||||
|
|
||||||
|
[node name="MicTest" type="Button" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
margin_top = 67.0
|
||||||
|
margin_right = 1014.0
|
||||||
|
margin_bottom = 87.0
|
||||||
text = "Mic Test"
|
text = "Mic Test"
|
||||||
[connection signal="pressed" from="HBoxContainer/Quit" to="HBoxContainer/Quit" method="_on_Quit_pressed"]
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/Quit" to="MarginContainer/VBoxContainer/HBoxContainer2/Quit" method="_on_Quit_pressed"]
|
||||||
[connection signal="pressed" from="GridContainer/DownloadPlayVid" to="." method="_on_Button_pressed"]
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/DownloadPlayVid" to="." method="_on_Button_pressed"]
|
||||||
[connection signal="pressed" from="GridContainer/MicTest" to="." method="_on_MicTest_pressed"]
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/DownloadPlayVid2" to="." method="_on_DownloadPlayVid2_pressed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/MicTest" to="." method="_on_MicTest_pressed"]
|
||||||
|
|
|
@ -32,7 +32,6 @@ margin_bottom = 612.0
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="SceneChangeTimer" type="Timer" parent="."]
|
[node name="SceneChangeTimer" type="Timer" parent="."]
|
||||||
wait_time = 5.0
|
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="StartDlServerTimer" type="Timer" parent="."]
|
[node name="StartDlServerTimer" type="Timer" parent="."]
|
||||||
|
|
Loading…
Reference in New Issue