Bladeren bron

modes utilities into their own scenes called from global script

Jonathan Higgins 2 maanden geleden
bovenliggende
commit
9137d66109

+ 14 - 0
global/utilities.gd

@@ -0,0 +1,14 @@
+extends Node
+
+var nodes := {} #stores all scenes that can be loaded as utilities
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+	#check utilities folder for all scenes and load into nodes dictionary
+	var dir = DirAccess.open("res://scenes/Nodes/utilities/")
+	if dir:
+		for file in dir.get_files():
+			if file.ends_with(".tscn"):
+				var name = file.get_basename()
+				var path = "res://scenes/Nodes/utilities/" + file
+				nodes[name] = load(path)

+ 1 - 0
global/utilities.gd.uid

@@ -0,0 +1 @@
+uid://bivqc6xwt4kl0

+ 1 - 1
project.godot

@@ -25,7 +25,7 @@ boot_splash/minimum_display_time=500
 
 ConfigHandler="*res://global/config_handler.gd"
 Global="*res://global/global.gd"
-Nodes="*res://scenes/Nodes/nodes.tscn"
+Utilities="*res://global/utilities.gd"
 
 [display]
 

+ 4 - 1
scenes/Nodes/node_logic.gd

@@ -53,7 +53,10 @@ func _on_slider_value_changed(value: float, changed_slider: HSlider) -> void:
 	#checks if the slider moved has min or max meta data
 	var is_min = changed_slider.get_meta("min")
 	var is_max = changed_slider.get_meta("max")
-	var is_outputduration = changed_slider.get_meta("outputduration")
+	var is_outputduration = false
+	
+	if changed_slider.has_meta("outputduration"):
+		is_outputduration = changed_slider.get_meta("outputduration")
 	
 	#if not exits function
 	if not is_min and not is_max:

+ 0 - 856
scenes/Nodes/nodes.tscn

@@ -1,856 +0,0 @@
-[gd_scene load_steps=9 format=3 uid="uid://duy5epq25pj8u"]
-
-[ext_resource type="Script" uid="uid://bifsyv5gxrddm" path="res://scenes/Nodes/inputfile.gd" id="1_8x08j"]
-[ext_resource type="PackedScene" uid="uid://csapiqka522fh" path="res://scenes/Nodes/audioplayer.tscn" id="2_b6nw4"]
-[ext_resource type="Script" uid="uid://cqwwhjwatkghf" path="res://scenes/Nodes/outputfile.gd" id="3_0jqh0"]
-[ext_resource type="Script" uid="uid://cdbx1dt3ohqte" path="res://scenes/Nodes/node_logic.gd" id="3_uv17x"]
-[ext_resource type="Script" uid="uid://cy8x5wubj2kr6" path="res://scenes/Nodes/notes_to_hz.gd" id="4_0jqh0"]
-[ext_resource type="FontFile" uid="uid://bfnlymfdfb0e7" path="res://theme/BravuraText_SoundThread.otf" id="5_0jqh0"]
-[ext_resource type="Script" uid="uid://cuk68115uw1ge" path="res://scenes/Nodes/convert_time.gd" id="7_w2x51"]
-[ext_resource type="Script" uid="uid://catbcnplcacvv" path="res://scenes/Nodes/calculator.gd" id="8_5syjs"]
-
-[node name="Control" type="Control"]
-layout_mode = 3
-anchors_preset = 15
-anchor_right = 1.0
-anchor_bottom = 1.0
-grow_horizontal = 2
-grow_vertical = 2
-
-[node name="inputfile" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 21.0
-offset_top = 6.0
-offset_right = 449.0
-offset_bottom = 236.0
-tooltip_text = "Stores your input file to be processed. Supports mono and stereo .wav files."
-title = "Input File"
-slot/0/left_enabled = false
-slot/0/left_type = 0
-slot/0/left_color = Color(1, 1, 1, 1)
-slot/0/left_icon = null
-slot/0/right_enabled = true
-slot/0/right_type = 0
-slot/0/right_color = Color(1, 1, 1, 0.564706)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-slot/1/left_enabled = false
-slot/1/left_type = 0
-slot/1/left_color = Color(1, 1, 1, 1)
-slot/1/left_icon = null
-slot/1/right_enabled = false
-slot/1/right_type = 0
-slot/1/right_color = Color(1, 1, 1, 1)
-slot/1/right_icon = null
-slot/1/draw_stylebox = true
-script = ExtResource("1_8x08j")
-metadata/command = "inputfile"
-metadata/input = true
-
-[node name="Control" type="Control" parent="inputfile"]
-layout_mode = 2
-
-[node name="AudioPlayer" parent="inputfile" groups=["inputnode"] instance=ExtResource("2_b6nw4")]
-layout_mode = 2
-size_flags_horizontal = 4
-metadata/loadenable = true
-metadata/inputfunction = "audioplayer"
-
-[node name="preview" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 26.0
-offset_top = 283.0
-offset_right = 454.0
-offset_bottom = 513.0
-tooltip_text = "Stores your input file to be processed. Supports mono and stereo .wav files."
-title = "Preview"
-slot/0/left_enabled = true
-slot/0/left_type = 0
-slot/0/left_color = Color(1, 1, 1, 1)
-slot/0/left_icon = null
-slot/0/right_enabled = false
-slot/0/right_type = 0
-slot/0/right_color = Color(1, 1, 1, 0.564706)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-slot/1/left_enabled = false
-slot/1/left_type = 0
-slot/1/left_color = Color(1, 1, 1, 1)
-slot/1/left_icon = null
-slot/1/right_enabled = false
-slot/1/right_type = 0
-slot/1/right_color = Color(1, 1, 1, 1)
-slot/1/right_icon = null
-slot/1/draw_stylebox = true
-script = ExtResource("3_uv17x")
-metadata/command = "preview"
-metadata/input = false
-
-[node name="Control" type="Control" parent="preview"]
-layout_mode = 2
-
-[node name="AudioPlayer" parent="preview" groups=["inputnode"] instance=ExtResource("2_b6nw4")]
-layout_mode = 2
-size_flags_horizontal = 4
-metadata/inputfunction = "audioplayer"
-
-[node name="outputfile" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 523.0
-offset_top = 6.0
-offset_right = 959.0
-offset_bottom = 555.0
-tooltip_text = "Handles everything to do with audio output. "
-title = "Output File"
-slot/0/left_enabled = true
-slot/0/left_type = 0
-slot/0/left_color = Color(1, 1, 1, 0.564706)
-slot/0/left_icon = null
-slot/0/right_enabled = false
-slot/0/right_type = 0
-slot/0/right_color = Color(1, 1, 1, 1)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-slot/1/left_enabled = false
-slot/1/left_type = 0
-slot/1/left_color = Color(1, 1, 1, 1)
-slot/1/left_icon = null
-slot/1/right_enabled = false
-slot/1/right_type = 0
-slot/1/right_color = Color(1, 1, 1, 1)
-slot/1/right_icon = null
-slot/1/draw_stylebox = true
-slot/2/left_enabled = false
-slot/2/left_type = 0
-slot/2/left_color = Color(1, 1, 1, 1)
-slot/2/left_icon = null
-slot/2/right_enabled = false
-slot/2/right_type = 0
-slot/2/right_color = Color(1, 1, 1, 1)
-slot/2/right_icon = null
-slot/2/draw_stylebox = true
-slot/3/left_enabled = false
-slot/3/left_type = 0
-slot/3/left_color = Color(1, 1, 1, 1)
-slot/3/left_icon = null
-slot/3/right_enabled = false
-slot/3/right_type = 0
-slot/3/right_color = Color(1, 1, 1, 1)
-slot/3/right_icon = null
-slot/3/draw_stylebox = true
-slot/4/left_enabled = false
-slot/4/left_type = 0
-slot/4/left_color = Color(1, 1, 1, 1)
-slot/4/left_icon = null
-slot/4/right_enabled = false
-slot/4/right_type = 0
-slot/4/right_color = Color(1, 1, 1, 1)
-slot/4/right_icon = null
-slot/4/draw_stylebox = true
-slot/5/left_enabled = false
-slot/5/left_type = 0
-slot/5/left_color = Color(1, 1, 1, 1)
-slot/5/left_icon = null
-slot/5/right_enabled = false
-slot/5/right_type = 0
-slot/5/right_color = Color(1, 1, 1, 1)
-slot/5/right_icon = null
-slot/5/draw_stylebox = true
-slot/6/left_enabled = false
-slot/6/left_type = 0
-slot/6/left_color = Color(1, 1, 1, 1)
-slot/6/left_icon = null
-slot/6/right_enabled = false
-slot/6/right_type = 0
-slot/6/right_color = Color(1, 1, 1, 1)
-slot/6/right_icon = null
-slot/6/draw_stylebox = true
-slot/7/left_enabled = false
-slot/7/left_type = 0
-slot/7/left_color = Color(1, 1, 1, 1)
-slot/7/left_icon = null
-slot/7/right_enabled = false
-slot/7/right_type = 0
-slot/7/right_color = Color(1, 1, 1, 1)
-slot/7/right_icon = null
-slot/7/draw_stylebox = true
-slot/8/left_enabled = false
-slot/8/left_type = 0
-slot/8/left_color = Color(1, 1, 1, 1)
-slot/8/left_icon = null
-slot/8/right_enabled = false
-slot/8/right_type = 0
-slot/8/right_color = Color(1, 1, 1, 1)
-slot/8/right_icon = null
-slot/8/draw_stylebox = true
-slot/9/left_enabled = false
-slot/9/left_type = 0
-slot/9/left_color = Color(1, 1, 1, 1)
-slot/9/left_icon = null
-slot/9/right_enabled = false
-slot/9/right_type = 0
-slot/9/right_color = Color(1, 1, 1, 1)
-slot/9/right_icon = null
-slot/9/draw_stylebox = true
-slot/10/left_enabled = false
-slot/10/left_type = 0
-slot/10/left_color = Color(1, 1, 1, 1)
-slot/10/left_icon = null
-slot/10/right_enabled = false
-slot/10/right_type = 0
-slot/10/right_color = Color(1, 1, 1, 1)
-slot/10/right_icon = null
-slot/10/draw_stylebox = true
-slot/11/left_enabled = false
-slot/11/left_type = 0
-slot/11/left_color = Color(1, 1, 1, 1)
-slot/11/left_icon = null
-slot/11/right_enabled = false
-slot/11/right_type = 0
-slot/11/right_color = Color(1, 1, 1, 1)
-slot/11/right_icon = null
-slot/11/draw_stylebox = true
-slot/12/left_enabled = false
-slot/12/left_type = 0
-slot/12/left_color = Color(1, 1, 1, 1)
-slot/12/left_icon = null
-slot/12/right_enabled = false
-slot/12/right_type = 0
-slot/12/right_color = Color(1, 1, 1, 1)
-slot/12/right_icon = null
-slot/12/draw_stylebox = true
-slot/13/left_enabled = false
-slot/13/left_type = 0
-slot/13/left_color = Color(1, 1, 1, 1)
-slot/13/left_icon = null
-slot/13/right_enabled = false
-slot/13/right_type = 0
-slot/13/right_color = Color(1, 1, 1, 1)
-slot/13/right_icon = null
-slot/13/draw_stylebox = true
-script = ExtResource("3_0jqh0")
-metadata/command = "outputfile"
-metadata/utility = true
-metadata/input = false
-
-[node name="Control" type="Control" parent="outputfile"]
-layout_mode = 2
-
-[node name="Label2" type="Label" parent="outputfile"]
-layout_mode = 2
-text = "File Name:"
-
-[node name="MarginContainer5" type="MarginContainer" parent="outputfile"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="FileNameField" type="LineEdit" parent="outputfile" groups=["outputnode"]]
-layout_mode = 2
-tooltip_text = "Your output file name, cannot contain special characters"
-metadata/outputfunction = "filename"
-
-[node name="MarginContainer3" type="MarginContainer" parent="outputfile"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 5
-
-[node name="RunProcess" type="Button" parent="outputfile" groups=["outputnode"]]
-custom_minimum_size = Vector2(0, 43)
-layout_mode = 2
-tooltip_text = "Runs the CDP commands in the thread."
-text = "Run Thread"
-metadata/outputfunction = "runprocess"
-
-[node name="DeleteIntermediateFilesToggle" type="CheckButton" parent="outputfile" groups=["outputnode"]]
-custom_minimum_size = Vector2(0, 43)
-layout_mode = 2
-tooltip_text = "SoundThread makes a lot of files. When toggled on this deletes everything but the output file."
-text = "Delete Intermediate Files"
-expand_icon = true
-metadata/outputfunction = "deleteintermediate"
-
-[node name="ReuseFolderToggle" type="CheckButton" parent="outputfile" groups=["outputnode"]]
-custom_minimum_size = Vector2(0, 43)
-layout_mode = 2
-tooltip_text = "Stops you from being prompted for new folder each time you run a thread."
-text = "Reuse Last Output Folder"
-expand_icon = true
-metadata/outputfunction = "reusefolder"
-
-[node name="OutputFolderMargin" type="MarginContainer" parent="outputfile"]
-layout_mode = 2
-theme_override_constants/margin_left = 7
-theme_override_constants/margin_top = 6
-theme_override_constants/margin_right = 7
-theme_override_constants/margin_bottom = 9
-
-[node name="OutputFolderLabel" type="Label" parent="outputfile/OutputFolderMargin"]
-layout_mode = 2
-size_flags_horizontal = 3
-clip_text = true
-text_overrun_behavior = 3
-
-[node name="OpenOutputFolder" type="Button" parent="outputfile" groups=["outputnode"]]
-custom_minimum_size = Vector2(0, 43)
-layout_mode = 2
-tooltip_text = "Opens the folder on your computer where the output file is saved."
-text = "Open Folder"
-metadata/outputfunction = "openfolder"
-
-[node name="MarginContainer2" type="MarginContainer" parent="outputfile"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 5
-
-[node name="HBoxContainer" type="HBoxContainer" parent="outputfile"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="outputfile/HBoxContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "Rendered Output File:"
-
-[node name="Autoplay" type="CheckButton" parent="outputfile/HBoxContainer" groups=["outputnode"]]
-layout_mode = 2
-text = "Autoplay"
-
-[node name="MarginContainer4" type="MarginContainer" parent="outputfile"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="AudioPlayer" parent="outputfile" groups=["outputnode"] instance=ExtResource("2_b6nw4")]
-layout_mode = 2
-size_flags_horizontal = 4
-metadata/outputfunction = "audioplayer"
-
-[node name="notes" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 1042.0
-offset_top = 32.0
-offset_right = 1425.0
-offset_bottom = 329.0
-tooltip_text = "A node just for taking notes."
-title = "Notes"
-slot/0/left_enabled = false
-slot/0/left_type = 1
-slot/0/left_color = Color(0, 0, 0, 1)
-slot/0/left_icon = null
-slot/0/right_enabled = false
-slot/0/right_type = 1
-slot/0/right_color = Color(0, 0, 0, 1)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-script = ExtResource("3_uv17x")
-metadata/command = "notes"
-metadata/utility = true
-metadata/input = false
-
-[node name="CodeEdit" type="CodeEdit" parent="notes"]
-custom_minimum_size = Vector2(0, 10)
-layout_mode = 2
-size_flags_vertical = 3
-wrap_mode = 1
-
-[node name="note_to_hz" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 1528.0
-offset_top = 31.0
-offset_right = 1911.0
-offset_bottom = 257.0
-tooltip_text = "Converts from a musical note to Hz"
-title = "Convert Note to Hz"
-slot/0/left_enabled = false
-slot/0/left_type = 1
-slot/0/left_color = Color(0, 0, 0, 1)
-slot/0/left_icon = null
-slot/0/right_enabled = false
-slot/0/right_type = 1
-slot/0/right_color = Color(0, 0, 0, 1)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-slot/1/left_enabled = false
-slot/1/left_type = 0
-slot/1/left_color = Color(1, 1, 1, 1)
-slot/1/left_icon = null
-slot/1/right_enabled = false
-slot/1/right_type = 0
-slot/1/right_color = Color(1, 1, 1, 1)
-slot/1/right_icon = null
-slot/1/draw_stylebox = true
-slot/2/left_enabled = false
-slot/2/left_type = 0
-slot/2/left_color = Color(1, 1, 1, 1)
-slot/2/left_icon = null
-slot/2/right_enabled = false
-slot/2/right_type = 0
-slot/2/right_color = Color(1, 1, 1, 1)
-slot/2/right_icon = null
-slot/2/draw_stylebox = true
-script = ExtResource("4_0jqh0")
-metadata/command = "note_to_hz"
-metadata/utility = true
-metadata/input = false
-
-[node name="Note" type="ItemList" parent="note_to_hz"]
-layout_mode = 2
-theme_override_font_sizes/font_size = 20
-allow_search = false
-auto_height = true
-item_count = 7
-max_columns = 7
-same_column_width = true
-fixed_column_width = 45
-icon_mode = 0
-item_0/text = "A"
-item_1/text = "B"
-item_2/text = "C"
-item_3/text = "D"
-item_4/text = "E"
-item_5/text = "F"
-item_6/text = "G"
-
-[node name="Accidental" type="ItemList" parent="note_to_hz"]
-custom_minimum_size = Vector2(0, 40)
-layout_mode = 2
-theme_override_fonts/font = ExtResource("5_0jqh0")
-theme_override_font_sizes/font_size = 30
-allow_search = false
-auto_height = true
-item_count = 7
-max_columns = 7
-same_column_width = true
-fixed_column_width = 45
-icon_mode = 0
-item_0/text = ""
-item_1/text = ""
-item_2/text = ""
-item_3/text = ""
-item_4/text = ""
-item_5/text = ""
-item_6/text = ""
-
-[node name="FreqOutput" type="CodeEdit" parent="note_to_hz"]
-custom_minimum_size = Vector2(0, 10)
-layout_mode = 2
-size_flags_vertical = 3
-editable = false
-wrap_mode = 1
-
-[node name="convert_time" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 1982.0
-offset_top = 34.0
-offset_right = 2365.0
-offset_bottom = 330.0
-tooltip_text = "Converts between various units of time"
-title = "Convert Time Units"
-slot/0/left_enabled = false
-slot/0/left_type = 1
-slot/0/left_color = Color(0, 0, 0, 1)
-slot/0/left_icon = null
-slot/0/right_enabled = false
-slot/0/right_type = 1
-slot/0/right_color = Color(0, 0, 0, 1)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-script = ExtResource("7_w2x51")
-metadata/command = "convert_time"
-metadata/utility = true
-metadata/input = false
-
-[node name="VBoxContainer" type="VBoxContainer" parent="convert_time"]
-layout_mode = 2
-
-[node name="HBoxContainer" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "Milliseconds"
-
-[node name="MsEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time in ms"
-
-[node name="MarginContainer5" type="MarginContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="HBoxContainer2" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer2"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "Seconds"
-
-[node name="SEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer2"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time in seconds"
-
-[node name="MarginContainer4" type="MarginContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="HBoxContainer7" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer7"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "1/4 Notes"
-
-[node name="CrotchetEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer7"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time as a number of 1/4 notes at the given BPM"
-
-[node name="Label2" type="Label" parent="convert_time/VBoxContainer/HBoxContainer7"]
-layout_mode = 2
-text = "at"
-
-[node name="BPMEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer7"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The BPM to calculate 1/4 notes at"
-
-[node name="MarginContainer6" type="MarginContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="HBoxContainer3" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer3"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "Hertz"
-
-[node name="HzEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer3"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time in Hz"
-
-[node name="MarginContainer3" type="MarginContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="HBoxContainer4" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer4"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "MIDI Note"
-
-[node name="MIDIEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer4"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time as a MIDI note number"
-
-[node name="MarginContainer2" type="MarginContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="HBoxContainer5" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer5"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "Samples"
-
-[node name="SampleNoEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer5"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time as a number of samples at the given sample rate"
-
-[node name="Label2" type="Label" parent="convert_time/VBoxContainer/HBoxContainer5"]
-layout_mode = 2
-text = "at"
-
-[node name="SampleRateEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer5"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The sample rate to calculate samples at"
-
-[node name="MarginContainer" type="MarginContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 2
-
-[node name="HBoxContainer6" type="HBoxContainer" parent="convert_time/VBoxContainer"]
-layout_mode = 2
-
-[node name="Label" type="Label" parent="convert_time/VBoxContainer/HBoxContainer6"]
-custom_minimum_size = Vector2(120, 0)
-layout_mode = 2
-text = "% of Time (s)"
-
-[node name="PercentEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer6"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time as a percentage of the given time in seconds"
-
-[node name="Label3" type="Label" parent="convert_time/VBoxContainer/HBoxContainer6"]
-layout_mode = 2
-text = "of"
-
-[node name="LengthEdit" type="LineEdit" parent="convert_time/VBoxContainer/HBoxContainer6"]
-layout_mode = 2
-size_flags_horizontal = 3
-tooltip_text = "The length of time in seconds to a percentage of"
-
-[node name="calculator" type="GraphNode" parent="."]
-layout_mode = 0
-offset_left = 2453.0
-offset_top = 33.0
-offset_right = 2836.0
-offset_bottom = 330.0
-tooltip_text = "A simple calculator for quick maths"
-title = "Calculator"
-slot/0/left_enabled = false
-slot/0/left_type = 1
-slot/0/left_color = Color(0, 0, 0, 1)
-slot/0/left_icon = null
-slot/0/right_enabled = false
-slot/0/right_type = 1
-slot/0/right_color = Color(0, 0, 0, 1)
-slot/0/right_icon = null
-slot/0/draw_stylebox = true
-slot/1/left_enabled = false
-slot/1/left_type = 0
-slot/1/left_color = Color(1, 1, 1, 1)
-slot/1/left_icon = null
-slot/1/right_enabled = false
-slot/1/right_type = 0
-slot/1/right_color = Color(1, 1, 1, 1)
-slot/1/right_icon = null
-slot/1/draw_stylebox = true
-slot/2/left_enabled = false
-slot/2/left_type = 0
-slot/2/left_color = Color(1, 1, 1, 1)
-slot/2/left_icon = null
-slot/2/right_enabled = false
-slot/2/right_type = 0
-slot/2/right_color = Color(1, 1, 1, 1)
-slot/2/right_icon = null
-slot/2/draw_stylebox = true
-slot/3/left_enabled = false
-slot/3/left_type = 0
-slot/3/left_color = Color(1, 1, 1, 1)
-slot/3/left_icon = null
-slot/3/right_enabled = false
-slot/3/right_type = 0
-slot/3/right_color = Color(1, 1, 1, 1)
-slot/3/right_icon = null
-slot/3/draw_stylebox = true
-slot/4/left_enabled = false
-slot/4/left_type = 0
-slot/4/left_color = Color(1, 1, 1, 1)
-slot/4/left_icon = null
-slot/4/right_enabled = false
-slot/4/right_type = 0
-slot/4/right_color = Color(1, 1, 1, 1)
-slot/4/right_icon = null
-slot/4/draw_stylebox = true
-slot/5/left_enabled = false
-slot/5/left_type = 0
-slot/5/left_color = Color(1, 1, 1, 1)
-slot/5/left_icon = null
-slot/5/right_enabled = false
-slot/5/right_type = 0
-slot/5/right_color = Color(1, 1, 1, 1)
-slot/5/right_icon = null
-slot/5/draw_stylebox = true
-slot/6/left_enabled = false
-slot/6/left_type = 0
-slot/6/left_color = Color(1, 1, 1, 1)
-slot/6/left_icon = null
-slot/6/right_enabled = false
-slot/6/right_type = 0
-slot/6/right_color = Color(1, 1, 1, 1)
-slot/6/right_icon = null
-slot/6/draw_stylebox = true
-script = ExtResource("8_5syjs")
-metadata/command = "calculator"
-metadata/utility = true
-metadata/input = false
-
-[node name="Screen" type="CodeEdit" parent="calculator"]
-custom_minimum_size = Vector2(0, 100)
-layout_mode = 2
-theme_override_font_sizes/font_size = 25
-editable = false
-
-[node name="MarginContainer7" type="MarginContainer" parent="calculator"]
-layout_mode = 2
-theme_override_constants/margin_bottom = 4
-
-[node name="HBoxContainer" type="HBoxContainer" parent="calculator"]
-custom_minimum_size = Vector2(0, 50)
-layout_mode = 2
-
-[node name="Button" type="Button" parent="calculator/HBoxContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "("
-metadata/calc = "("
-
-[node name="Button2" type="Button" parent="calculator/HBoxContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = ")"
-metadata/calc = ")"
-
-[node name="Button3" type="Button" parent="calculator/HBoxContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "C"
-metadata/calc = "clear"
-
-[node name="Button4" type="Button" parent="calculator/HBoxContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "⌫"
-metadata/calc = "del"
-
-[node name="HBoxContainer5" type="HBoxContainer" parent="calculator"]
-custom_minimum_size = Vector2(0, 50)
-layout_mode = 2
-
-[node name="Button" type="Button" parent="calculator/HBoxContainer5"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "7"
-metadata/calc = "7"
-
-[node name="Button2" type="Button" parent="calculator/HBoxContainer5"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "8"
-metadata/calc = "8"
-
-[node name="Button3" type="Button" parent="calculator/HBoxContainer5"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "9"
-metadata/calc = "9"
-
-[node name="Button4" type="Button" parent="calculator/HBoxContainer5"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "÷"
-metadata/calc = "/"
-
-[node name="HBoxContainer2" type="HBoxContainer" parent="calculator"]
-custom_minimum_size = Vector2(0, 50)
-layout_mode = 2
-
-[node name="Button" type="Button" parent="calculator/HBoxContainer2"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "4"
-metadata/calc = "4"
-
-[node name="Button2" type="Button" parent="calculator/HBoxContainer2"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "5"
-metadata/calc = "5"
-
-[node name="Button3" type="Button" parent="calculator/HBoxContainer2"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "6"
-metadata/calc = "6"
-
-[node name="Button4" type="Button" parent="calculator/HBoxContainer2"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "×"
-metadata/calc = "*"
-
-[node name="HBoxContainer3" type="HBoxContainer" parent="calculator"]
-custom_minimum_size = Vector2(0, 50)
-layout_mode = 2
-
-[node name="Button" type="Button" parent="calculator/HBoxContainer3"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "1"
-metadata/calc = "1"
-
-[node name="Button2" type="Button" parent="calculator/HBoxContainer3"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "2"
-metadata/calc = "2"
-
-[node name="Button3" type="Button" parent="calculator/HBoxContainer3"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "3"
-metadata/calc = "3"
-
-[node name="Button4" type="Button" parent="calculator/HBoxContainer3"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "-"
-metadata/calc = "-"
-
-[node name="HBoxContainer4" type="HBoxContainer" parent="calculator"]
-custom_minimum_size = Vector2(0, 50)
-layout_mode = 2
-
-[node name="Button" type="Button" parent="calculator/HBoxContainer4"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "0"
-metadata/calc = "0"
-
-[node name="Button2" type="Button" parent="calculator/HBoxContainer4"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "."
-metadata/calc = "."
-
-[node name="Button3" type="Button" parent="calculator/HBoxContainer4"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "="
-metadata/calc = "="
-
-[node name="Button4" type="Button" parent="calculator/HBoxContainer4"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "+"
-metadata/calc = "+"
-
-[connection signal="focus_exited" from="outputfile/FileNameField" to="outputfile" method="_on_file_name_field_focus_exited"]
-[connection signal="text_submitted" from="outputfile/FileNameField" to="outputfile" method="_on_file_name_field_text_submitted"]
-[connection signal="toggled" from="outputfile/DeleteIntermediateFilesToggle" to="outputfile" method="_on_delete_intermediate_files_toggle_toggled"]
-[connection signal="toggled" from="outputfile/ReuseFolderToggle" to="outputfile" method="_on_reuse_folder_toggle_toggled"]
-[connection signal="toggled" from="outputfile/HBoxContainer/Autoplay" to="outputfile" method="_on_autoplay_toggled"]
-[connection signal="item_selected" from="note_to_hz/Note" to="note_to_hz" method="_on_item_list_item_selected"]
-[connection signal="item_selected" from="note_to_hz/Accidental" to="note_to_hz" method="_on_item_list_2_item_selected"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer/MsEdit" to="convert_time" method="_on_ms_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer/MsEdit" to="convert_time" method="_on_ms_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer2/SEdit" to="convert_time" method="_on_s_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer2/SEdit" to="convert_time" method="_on_s_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer7/CrotchetEdit" to="convert_time" method="_on_crotchet_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer7/CrotchetEdit" to="convert_time" method="_on_crotchet_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer7/BPMEdit" to="convert_time" method="_on_bpm_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer7/BPMEdit" to="convert_time" method="_on_bpm_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer3/HzEdit" to="convert_time" method="_on_hz_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer3/HzEdit" to="convert_time" method="_on_hz_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer4/MIDIEdit" to="convert_time" method="_on_midi_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer4/MIDIEdit" to="convert_time" method="_on_midi_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer5/SampleNoEdit" to="convert_time" method="_on_sample_no_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer5/SampleNoEdit" to="convert_time" method="_on_sample_no_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer5/SampleRateEdit" to="convert_time" method="_on_sample_rate_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer5/SampleRateEdit" to="convert_time" method="_on_sample_rate_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer6/PercentEdit" to="convert_time" method="_on_percent_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer6/PercentEdit" to="convert_time" method="_on_percent_edit_text_submitted"]
-[connection signal="focus_exited" from="convert_time/VBoxContainer/HBoxContainer6/LengthEdit" to="convert_time" method="_on_length_edit_focus_exited"]
-[connection signal="text_submitted" from="convert_time/VBoxContainer/HBoxContainer6/LengthEdit" to="convert_time" method="_on_length_edit_text_submitted"]

+ 229 - 0
scenes/Nodes/utilities/calculator.tscn

@@ -0,0 +1,229 @@
+[gd_scene load_steps=2 format=3 uid="uid://c3l60mjrsen1d"]
+
+[ext_resource type="Script" uid="uid://catbcnplcacvv" path="res://scenes/Nodes/calculator.gd" id="1_gvrl8"]
+
+[node name="calculator" type="GraphNode"]
+offset_left = 2453.0
+offset_top = 33.0
+offset_right = 2836.0
+offset_bottom = 330.0
+tooltip_text = "A simple calculator for quick maths"
+title = "Calculator"
+slot/0/left_enabled = false
+slot/0/left_type = 1
+slot/0/left_color = Color(0, 0, 0, 1)
+slot/0/left_icon = null
+slot/0/right_enabled = false
+slot/0/right_type = 1
+slot/0/right_color = Color(0, 0, 0, 1)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+slot/1/left_enabled = false
+slot/1/left_type = 0
+slot/1/left_color = Color(1, 1, 1, 1)
+slot/1/left_icon = null
+slot/1/right_enabled = false
+slot/1/right_type = 0
+slot/1/right_color = Color(1, 1, 1, 1)
+slot/1/right_icon = null
+slot/1/draw_stylebox = true
+slot/2/left_enabled = false
+slot/2/left_type = 0
+slot/2/left_color = Color(1, 1, 1, 1)
+slot/2/left_icon = null
+slot/2/right_enabled = false
+slot/2/right_type = 0
+slot/2/right_color = Color(1, 1, 1, 1)
+slot/2/right_icon = null
+slot/2/draw_stylebox = true
+slot/3/left_enabled = false
+slot/3/left_type = 0
+slot/3/left_color = Color(1, 1, 1, 1)
+slot/3/left_icon = null
+slot/3/right_enabled = false
+slot/3/right_type = 0
+slot/3/right_color = Color(1, 1, 1, 1)
+slot/3/right_icon = null
+slot/3/draw_stylebox = true
+slot/4/left_enabled = false
+slot/4/left_type = 0
+slot/4/left_color = Color(1, 1, 1, 1)
+slot/4/left_icon = null
+slot/4/right_enabled = false
+slot/4/right_type = 0
+slot/4/right_color = Color(1, 1, 1, 1)
+slot/4/right_icon = null
+slot/4/draw_stylebox = true
+slot/5/left_enabled = false
+slot/5/left_type = 0
+slot/5/left_color = Color(1, 1, 1, 1)
+slot/5/left_icon = null
+slot/5/right_enabled = false
+slot/5/right_type = 0
+slot/5/right_color = Color(1, 1, 1, 1)
+slot/5/right_icon = null
+slot/5/draw_stylebox = true
+slot/6/left_enabled = false
+slot/6/left_type = 0
+slot/6/left_color = Color(1, 1, 1, 1)
+slot/6/left_icon = null
+slot/6/right_enabled = false
+slot/6/right_type = 0
+slot/6/right_color = Color(1, 1, 1, 1)
+slot/6/right_icon = null
+slot/6/draw_stylebox = true
+script = ExtResource("1_gvrl8")
+metadata/command = "calculator"
+metadata/utility = true
+metadata/input = false
+
+[node name="Screen" type="CodeEdit" parent="."]
+custom_minimum_size = Vector2(0, 100)
+layout_mode = 2
+theme_override_font_sizes/font_size = 25
+editable = false
+delimiter_strings = Array[String](["\" \"", "' '"])
+
+[node name="MarginContainer7" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_bottom = 4
+
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
+custom_minimum_size = Vector2(0, 50)
+layout_mode = 2
+
+[node name="Button" type="Button" parent="HBoxContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "("
+metadata/calc = "("
+
+[node name="Button2" type="Button" parent="HBoxContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = ")"
+metadata/calc = ")"
+
+[node name="Button3" type="Button" parent="HBoxContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "C"
+metadata/calc = "clear"
+
+[node name="Button4" type="Button" parent="HBoxContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "⌫"
+metadata/calc = "del"
+
+[node name="HBoxContainer5" type="HBoxContainer" parent="."]
+custom_minimum_size = Vector2(0, 50)
+layout_mode = 2
+
+[node name="Button" type="Button" parent="HBoxContainer5"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "7"
+metadata/calc = "7"
+
+[node name="Button2" type="Button" parent="HBoxContainer5"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "8"
+metadata/calc = "8"
+
+[node name="Button3" type="Button" parent="HBoxContainer5"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "9"
+metadata/calc = "9"
+
+[node name="Button4" type="Button" parent="HBoxContainer5"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "÷"
+metadata/calc = "/"
+
+[node name="HBoxContainer2" type="HBoxContainer" parent="."]
+custom_minimum_size = Vector2(0, 50)
+layout_mode = 2
+
+[node name="Button" type="Button" parent="HBoxContainer2"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "4"
+metadata/calc = "4"
+
+[node name="Button2" type="Button" parent="HBoxContainer2"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "5"
+metadata/calc = "5"
+
+[node name="Button3" type="Button" parent="HBoxContainer2"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "6"
+metadata/calc = "6"
+
+[node name="Button4" type="Button" parent="HBoxContainer2"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "×"
+metadata/calc = "*"
+
+[node name="HBoxContainer3" type="HBoxContainer" parent="."]
+custom_minimum_size = Vector2(0, 50)
+layout_mode = 2
+
+[node name="Button" type="Button" parent="HBoxContainer3"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "1"
+metadata/calc = "1"
+
+[node name="Button2" type="Button" parent="HBoxContainer3"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "2"
+metadata/calc = "2"
+
+[node name="Button3" type="Button" parent="HBoxContainer3"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "3"
+metadata/calc = "3"
+
+[node name="Button4" type="Button" parent="HBoxContainer3"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "-"
+metadata/calc = "-"
+
+[node name="HBoxContainer4" type="HBoxContainer" parent="."]
+custom_minimum_size = Vector2(0, 50)
+layout_mode = 2
+
+[node name="Button" type="Button" parent="HBoxContainer4"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "0"
+metadata/calc = "0"
+
+[node name="Button2" type="Button" parent="HBoxContainer4"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "."
+metadata/calc = "."
+
+[node name="Button3" type="Button" parent="HBoxContainer4"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "="
+metadata/calc = "="
+
+[node name="Button4" type="Button" parent="HBoxContainer4"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "+"
+metadata/calc = "+"

+ 190 - 0
scenes/Nodes/utilities/convert_time.tscn

@@ -0,0 +1,190 @@
+[gd_scene load_steps=2 format=3 uid="uid://dyfxgme5wwxp1"]
+
+[ext_resource type="Script" uid="uid://cuk68115uw1ge" path="res://scenes/Nodes/convert_time.gd" id="1_44i0u"]
+
+[node name="convert_time" type="GraphNode"]
+offset_left = 1982.0
+offset_top = 34.0
+offset_right = 2365.0
+offset_bottom = 330.0
+tooltip_text = "Converts between various units of time"
+title = "Convert Time Units"
+slot/0/left_enabled = false
+slot/0/left_type = 1
+slot/0/left_color = Color(0, 0, 0, 1)
+slot/0/left_icon = null
+slot/0/right_enabled = false
+slot/0/right_type = 1
+slot/0/right_color = Color(0, 0, 0, 1)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+script = ExtResource("1_44i0u")
+metadata/command = "convert_time"
+metadata/utility = true
+metadata/input = false
+
+[node name="VBoxContainer" type="VBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "Milliseconds"
+
+[node name="MsEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time in ms"
+
+[node name="MarginContainer5" type="MarginContainer" parent="VBoxContainer"]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "Seconds"
+
+[node name="SEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer2"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time in seconds"
+
+[node name="MarginContainer4" type="MarginContainer" parent="VBoxContainer"]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="HBoxContainer7" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer7"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "1/4 Notes"
+
+[node name="CrotchetEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer7"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time as a number of 1/4 notes at the given BPM"
+
+[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer7"]
+layout_mode = 2
+text = "at"
+
+[node name="BPMEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer7"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The BPM to calculate 1/4 notes at"
+
+[node name="MarginContainer6" type="MarginContainer" parent="VBoxContainer"]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "Hertz"
+
+[node name="HzEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer3"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time in Hz"
+
+[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer"]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer4"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "MIDI Note"
+
+[node name="MIDIEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer4"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time as a MIDI note number"
+
+[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer"]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="HBoxContainer5" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer5"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "Samples"
+
+[node name="SampleNoEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer5"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time as a number of samples at the given sample rate"
+
+[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer5"]
+layout_mode = 2
+text = "at"
+
+[node name="SampleRateEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer5"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The sample rate to calculate samples at"
+
+[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="HBoxContainer6" type="HBoxContainer" parent="VBoxContainer"]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer6"]
+custom_minimum_size = Vector2(120, 0)
+layout_mode = 2
+text = "% of Time (s)"
+
+[node name="PercentEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer6"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time as a percentage of the given time in seconds"
+
+[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer6"]
+layout_mode = 2
+text = "of"
+
+[node name="LengthEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer6"]
+layout_mode = 2
+size_flags_horizontal = 3
+tooltip_text = "The length of time in seconds to a percentage of"
+
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer/MsEdit" to="." method="_on_ms_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer/MsEdit" to="." method="_on_ms_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer2/SEdit" to="." method="_on_s_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer2/SEdit" to="." method="_on_s_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer7/CrotchetEdit" to="." method="_on_crotchet_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer7/CrotchetEdit" to="." method="_on_crotchet_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer7/BPMEdit" to="." method="_on_bpm_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer7/BPMEdit" to="." method="_on_bpm_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer3/HzEdit" to="." method="_on_hz_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer3/HzEdit" to="." method="_on_hz_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer4/MIDIEdit" to="." method="_on_midi_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer4/MIDIEdit" to="." method="_on_midi_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer5/SampleNoEdit" to="." method="_on_sample_no_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer5/SampleNoEdit" to="." method="_on_sample_no_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer5/SampleRateEdit" to="." method="_on_sample_rate_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer5/SampleRateEdit" to="." method="_on_sample_rate_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer6/PercentEdit" to="." method="_on_percent_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer6/PercentEdit" to="." method="_on_percent_edit_text_submitted"]
+[connection signal="focus_exited" from="VBoxContainer/HBoxContainer6/LengthEdit" to="." method="_on_length_edit_focus_exited"]
+[connection signal="text_submitted" from="VBoxContainer/HBoxContainer6/LengthEdit" to="." method="_on_length_edit_text_submitted"]

+ 42 - 0
scenes/Nodes/utilities/inputfile.tscn

@@ -0,0 +1,42 @@
+[gd_scene load_steps=3 format=3 uid="uid://b5206beyyhfvl"]
+
+[ext_resource type="Script" uid="uid://bifsyv5gxrddm" path="res://scenes/Nodes/inputfile.gd" id="1_bcco2"]
+[ext_resource type="PackedScene" uid="uid://csapiqka522fh" path="res://scenes/Nodes/audioplayer.tscn" id="2_xjpp1"]
+
+[node name="inputfile" type="GraphNode"]
+offset_left = 21.0
+offset_top = 6.0
+offset_right = 449.0
+offset_bottom = 236.0
+tooltip_text = "Stores your input file to be processed. Supports mono and stereo .wav files."
+title = "Input File"
+slot/0/left_enabled = false
+slot/0/left_type = 0
+slot/0/left_color = Color(1, 1, 1, 1)
+slot/0/left_icon = null
+slot/0/right_enabled = true
+slot/0/right_type = 0
+slot/0/right_color = Color(1, 1, 1, 0.564706)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+slot/1/left_enabled = false
+slot/1/left_type = 0
+slot/1/left_color = Color(1, 1, 1, 1)
+slot/1/left_icon = null
+slot/1/right_enabled = false
+slot/1/right_type = 0
+slot/1/right_color = Color(1, 1, 1, 1)
+slot/1/right_icon = null
+slot/1/draw_stylebox = true
+script = ExtResource("1_bcco2")
+metadata/command = "inputfile"
+metadata/input = true
+
+[node name="Control" type="Control" parent="."]
+layout_mode = 2
+
+[node name="AudioPlayer" parent="." groups=["inputnode"] instance=ExtResource("2_xjpp1")]
+layout_mode = 2
+size_flags_horizontal = 4
+metadata/loadenable = true
+metadata/inputfunction = "audioplayer"

+ 92 - 0
scenes/Nodes/utilities/note_to_hz.tscn

@@ -0,0 +1,92 @@
+[gd_scene load_steps=3 format=3 uid="uid://bvsb3gn3dmrw1"]
+
+[ext_resource type="Script" uid="uid://cy8x5wubj2kr6" path="res://scenes/Nodes/notes_to_hz.gd" id="1_crv77"]
+[ext_resource type="FontFile" uid="uid://bfnlymfdfb0e7" path="res://theme/BravuraText_SoundThread.otf" id="2_e08fm"]
+
+[node name="note_to_hz" type="GraphNode"]
+offset_left = 1528.0
+offset_top = 31.0
+offset_right = 1911.0
+offset_bottom = 257.0
+tooltip_text = "Converts from a musical note to Hz"
+title = "Convert Note to Hz"
+slot/0/left_enabled = false
+slot/0/left_type = 1
+slot/0/left_color = Color(0, 0, 0, 1)
+slot/0/left_icon = null
+slot/0/right_enabled = false
+slot/0/right_type = 1
+slot/0/right_color = Color(0, 0, 0, 1)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+slot/1/left_enabled = false
+slot/1/left_type = 0
+slot/1/left_color = Color(1, 1, 1, 1)
+slot/1/left_icon = null
+slot/1/right_enabled = false
+slot/1/right_type = 0
+slot/1/right_color = Color(1, 1, 1, 1)
+slot/1/right_icon = null
+slot/1/draw_stylebox = true
+slot/2/left_enabled = false
+slot/2/left_type = 0
+slot/2/left_color = Color(1, 1, 1, 1)
+slot/2/left_icon = null
+slot/2/right_enabled = false
+slot/2/right_type = 0
+slot/2/right_color = Color(1, 1, 1, 1)
+slot/2/right_icon = null
+slot/2/draw_stylebox = true
+script = ExtResource("1_crv77")
+metadata/command = "note_to_hz"
+metadata/utility = true
+metadata/input = false
+
+[node name="Note" type="ItemList" parent="."]
+layout_mode = 2
+theme_override_font_sizes/font_size = 20
+allow_search = false
+auto_height = true
+item_count = 7
+max_columns = 7
+same_column_width = true
+fixed_column_width = 45
+icon_mode = 0
+item_0/text = "A"
+item_1/text = "B"
+item_2/text = "C"
+item_3/text = "D"
+item_4/text = "E"
+item_5/text = "F"
+item_6/text = "G"
+
+[node name="Accidental" type="ItemList" parent="."]
+custom_minimum_size = Vector2(0, 40)
+layout_mode = 2
+theme_override_fonts/font = ExtResource("2_e08fm")
+theme_override_font_sizes/font_size = 30
+allow_search = false
+auto_height = true
+item_count = 7
+max_columns = 7
+same_column_width = true
+fixed_column_width = 45
+icon_mode = 0
+item_0/text = ""
+item_1/text = ""
+item_2/text = ""
+item_3/text = ""
+item_4/text = ""
+item_5/text = ""
+item_6/text = ""
+
+[node name="FreqOutput" type="CodeEdit" parent="."]
+custom_minimum_size = Vector2(0, 10)
+layout_mode = 2
+size_flags_vertical = 3
+editable = false
+wrap_mode = 1
+delimiter_strings = Array[String](["\" \"", "' '"])
+
+[connection signal="item_selected" from="Note" to="." method="_on_item_list_item_selected"]
+[connection signal="item_selected" from="Accidental" to="." method="_on_item_list_2_item_selected"]

+ 31 - 0
scenes/Nodes/utilities/notes.tscn

@@ -0,0 +1,31 @@
+[gd_scene load_steps=2 format=3 uid="uid://cyoj8c0wdbp36"]
+
+[ext_resource type="Script" uid="uid://cdbx1dt3ohqte" path="res://scenes/Nodes/node_logic.gd" id="1_tyh4w"]
+
+[node name="notes" type="GraphNode"]
+offset_left = 1042.0
+offset_top = 32.0
+offset_right = 1425.0
+offset_bottom = 329.0
+tooltip_text = "A node just for taking notes."
+title = "Notes"
+slot/0/left_enabled = false
+slot/0/left_type = 1
+slot/0/left_color = Color(0, 0, 0, 1)
+slot/0/left_icon = null
+slot/0/right_enabled = false
+slot/0/right_type = 1
+slot/0/right_color = Color(0, 0, 0, 1)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+script = ExtResource("1_tyh4w")
+metadata/command = "notes"
+metadata/utility = true
+metadata/input = false
+
+[node name="CodeEdit" type="CodeEdit" parent="."]
+custom_minimum_size = Vector2(0, 10)
+layout_mode = 2
+size_flags_vertical = 3
+wrap_mode = 1
+delimiter_strings = Array[String](["\" \"", "' '"])

+ 236 - 0
scenes/Nodes/utilities/outputfile.tscn

@@ -0,0 +1,236 @@
+[gd_scene load_steps=3 format=3 uid="uid://b4guh667l4mex"]
+
+[ext_resource type="Script" uid="uid://cqwwhjwatkghf" path="res://scenes/Nodes/outputfile.gd" id="1_ah4r5"]
+[ext_resource type="PackedScene" uid="uid://csapiqka522fh" path="res://scenes/Nodes/audioplayer.tscn" id="2_pq06c"]
+
+[node name="outputfile" type="GraphNode"]
+offset_left = 523.0
+offset_top = 6.0
+offset_right = 959.0
+offset_bottom = 555.0
+tooltip_text = "Handles everything to do with audio output. "
+title = "Output File"
+slot/0/left_enabled = true
+slot/0/left_type = 0
+slot/0/left_color = Color(1, 1, 1, 0.564706)
+slot/0/left_icon = null
+slot/0/right_enabled = false
+slot/0/right_type = 0
+slot/0/right_color = Color(1, 1, 1, 1)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+slot/1/left_enabled = false
+slot/1/left_type = 0
+slot/1/left_color = Color(1, 1, 1, 1)
+slot/1/left_icon = null
+slot/1/right_enabled = false
+slot/1/right_type = 0
+slot/1/right_color = Color(1, 1, 1, 1)
+slot/1/right_icon = null
+slot/1/draw_stylebox = true
+slot/2/left_enabled = false
+slot/2/left_type = 0
+slot/2/left_color = Color(1, 1, 1, 1)
+slot/2/left_icon = null
+slot/2/right_enabled = false
+slot/2/right_type = 0
+slot/2/right_color = Color(1, 1, 1, 1)
+slot/2/right_icon = null
+slot/2/draw_stylebox = true
+slot/3/left_enabled = false
+slot/3/left_type = 0
+slot/3/left_color = Color(1, 1, 1, 1)
+slot/3/left_icon = null
+slot/3/right_enabled = false
+slot/3/right_type = 0
+slot/3/right_color = Color(1, 1, 1, 1)
+slot/3/right_icon = null
+slot/3/draw_stylebox = true
+slot/4/left_enabled = false
+slot/4/left_type = 0
+slot/4/left_color = Color(1, 1, 1, 1)
+slot/4/left_icon = null
+slot/4/right_enabled = false
+slot/4/right_type = 0
+slot/4/right_color = Color(1, 1, 1, 1)
+slot/4/right_icon = null
+slot/4/draw_stylebox = true
+slot/5/left_enabled = false
+slot/5/left_type = 0
+slot/5/left_color = Color(1, 1, 1, 1)
+slot/5/left_icon = null
+slot/5/right_enabled = false
+slot/5/right_type = 0
+slot/5/right_color = Color(1, 1, 1, 1)
+slot/5/right_icon = null
+slot/5/draw_stylebox = true
+slot/6/left_enabled = false
+slot/6/left_type = 0
+slot/6/left_color = Color(1, 1, 1, 1)
+slot/6/left_icon = null
+slot/6/right_enabled = false
+slot/6/right_type = 0
+slot/6/right_color = Color(1, 1, 1, 1)
+slot/6/right_icon = null
+slot/6/draw_stylebox = true
+slot/7/left_enabled = false
+slot/7/left_type = 0
+slot/7/left_color = Color(1, 1, 1, 1)
+slot/7/left_icon = null
+slot/7/right_enabled = false
+slot/7/right_type = 0
+slot/7/right_color = Color(1, 1, 1, 1)
+slot/7/right_icon = null
+slot/7/draw_stylebox = true
+slot/8/left_enabled = false
+slot/8/left_type = 0
+slot/8/left_color = Color(1, 1, 1, 1)
+slot/8/left_icon = null
+slot/8/right_enabled = false
+slot/8/right_type = 0
+slot/8/right_color = Color(1, 1, 1, 1)
+slot/8/right_icon = null
+slot/8/draw_stylebox = true
+slot/9/left_enabled = false
+slot/9/left_type = 0
+slot/9/left_color = Color(1, 1, 1, 1)
+slot/9/left_icon = null
+slot/9/right_enabled = false
+slot/9/right_type = 0
+slot/9/right_color = Color(1, 1, 1, 1)
+slot/9/right_icon = null
+slot/9/draw_stylebox = true
+slot/10/left_enabled = false
+slot/10/left_type = 0
+slot/10/left_color = Color(1, 1, 1, 1)
+slot/10/left_icon = null
+slot/10/right_enabled = false
+slot/10/right_type = 0
+slot/10/right_color = Color(1, 1, 1, 1)
+slot/10/right_icon = null
+slot/10/draw_stylebox = true
+slot/11/left_enabled = false
+slot/11/left_type = 0
+slot/11/left_color = Color(1, 1, 1, 1)
+slot/11/left_icon = null
+slot/11/right_enabled = false
+slot/11/right_type = 0
+slot/11/right_color = Color(1, 1, 1, 1)
+slot/11/right_icon = null
+slot/11/draw_stylebox = true
+slot/12/left_enabled = false
+slot/12/left_type = 0
+slot/12/left_color = Color(1, 1, 1, 1)
+slot/12/left_icon = null
+slot/12/right_enabled = false
+slot/12/right_type = 0
+slot/12/right_color = Color(1, 1, 1, 1)
+slot/12/right_icon = null
+slot/12/draw_stylebox = true
+slot/13/left_enabled = false
+slot/13/left_type = 0
+slot/13/left_color = Color(1, 1, 1, 1)
+slot/13/left_icon = null
+slot/13/right_enabled = false
+slot/13/right_type = 0
+slot/13/right_color = Color(1, 1, 1, 1)
+slot/13/right_icon = null
+slot/13/draw_stylebox = true
+script = ExtResource("1_ah4r5")
+metadata/command = "outputfile"
+metadata/utility = true
+metadata/input = false
+
+[node name="Control" type="Control" parent="."]
+layout_mode = 2
+
+[node name="Label2" type="Label" parent="."]
+layout_mode = 2
+text = "File Name:"
+
+[node name="MarginContainer5" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="FileNameField" type="LineEdit" parent="." groups=["outputnode"]]
+layout_mode = 2
+tooltip_text = "Your output file name, cannot contain special characters"
+metadata/outputfunction = "filename"
+
+[node name="MarginContainer3" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_bottom = 5
+
+[node name="RunProcess" type="Button" parent="." groups=["outputnode"]]
+custom_minimum_size = Vector2(0, 43)
+layout_mode = 2
+tooltip_text = "Runs the CDP commands in the thread."
+text = "Run Thread"
+metadata/outputfunction = "runprocess"
+
+[node name="DeleteIntermediateFilesToggle" type="CheckButton" parent="." groups=["outputnode"]]
+custom_minimum_size = Vector2(0, 43)
+layout_mode = 2
+tooltip_text = "SoundThread makes a lot of files. When toggled on this deletes everything but the output file."
+text = "Delete Intermediate Files"
+expand_icon = true
+metadata/outputfunction = "deleteintermediate"
+
+[node name="ReuseFolderToggle" type="CheckButton" parent="." groups=["outputnode"]]
+custom_minimum_size = Vector2(0, 43)
+layout_mode = 2
+tooltip_text = "Stops you from being prompted for new folder each time you run a thread."
+text = "Reuse Last Output Folder"
+expand_icon = true
+metadata/outputfunction = "reusefolder"
+
+[node name="OutputFolderMargin" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_left = 7
+theme_override_constants/margin_top = 6
+theme_override_constants/margin_right = 7
+theme_override_constants/margin_bottom = 9
+
+[node name="OutputFolderLabel" type="Label" parent="OutputFolderMargin"]
+layout_mode = 2
+size_flags_horizontal = 3
+clip_text = true
+text_overrun_behavior = 3
+
+[node name="OpenOutputFolder" type="Button" parent="." groups=["outputnode"]]
+custom_minimum_size = Vector2(0, 43)
+layout_mode = 2
+tooltip_text = "Opens the folder on your computer where the output file is saved."
+text = "Open Folder"
+metadata/outputfunction = "openfolder"
+
+[node name="MarginContainer2" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_bottom = 5
+
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="Label" type="Label" parent="HBoxContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+text = "Rendered Output File:"
+
+[node name="Autoplay" type="CheckButton" parent="HBoxContainer" groups=["outputnode"]]
+layout_mode = 2
+text = "Autoplay"
+
+[node name="MarginContainer4" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_bottom = 2
+
+[node name="AudioPlayer" parent="." groups=["outputnode"] instance=ExtResource("2_pq06c")]
+layout_mode = 2
+size_flags_horizontal = 4
+metadata/outputfunction = "audioplayer"
+
+[connection signal="focus_exited" from="FileNameField" to="." method="_on_file_name_field_focus_exited"]
+[connection signal="text_submitted" from="FileNameField" to="." method="_on_file_name_field_text_submitted"]
+[connection signal="toggled" from="DeleteIntermediateFilesToggle" to="." method="_on_delete_intermediate_files_toggle_toggled"]
+[connection signal="toggled" from="ReuseFolderToggle" to="." method="_on_reuse_folder_toggle_toggled"]
+[connection signal="toggled" from="HBoxContainer/Autoplay" to="." method="_on_autoplay_toggled"]

+ 41 - 0
scenes/Nodes/utilities/preview.tscn

@@ -0,0 +1,41 @@
+[gd_scene load_steps=3 format=3 uid="uid://bpl41kynk1eax"]
+
+[ext_resource type="Script" uid="uid://cdbx1dt3ohqte" path="res://scenes/Nodes/node_logic.gd" id="1_v172w"]
+[ext_resource type="PackedScene" uid="uid://csapiqka522fh" path="res://scenes/Nodes/audioplayer.tscn" id="2_8s0kc"]
+
+[node name="preview" type="GraphNode"]
+offset_left = 26.0
+offset_top = 283.0
+offset_right = 454.0
+offset_bottom = 513.0
+tooltip_text = "Stores your input file to be processed. Supports mono and stereo .wav files."
+title = "Preview"
+slot/0/left_enabled = true
+slot/0/left_type = 0
+slot/0/left_color = Color(1, 1, 1, 1)
+slot/0/left_icon = null
+slot/0/right_enabled = false
+slot/0/right_type = 0
+slot/0/right_color = Color(1, 1, 1, 0.564706)
+slot/0/right_icon = null
+slot/0/draw_stylebox = true
+slot/1/left_enabled = false
+slot/1/left_type = 0
+slot/1/left_color = Color(1, 1, 1, 1)
+slot/1/left_icon = null
+slot/1/right_enabled = false
+slot/1/right_type = 0
+slot/1/right_color = Color(1, 1, 1, 1)
+slot/1/right_icon = null
+slot/1/draw_stylebox = true
+script = ExtResource("1_v172w")
+metadata/command = "preview"
+metadata/input = false
+
+[node name="Control" type="Control" parent="."]
+layout_mode = 2
+
+[node name="AudioPlayer" parent="." groups=["inputnode"] instance=ExtResource("2_8s0kc")]
+layout_mode = 2
+size_flags_horizontal = 4
+metadata/inputfunction = "audioplayer"

+ 6 - 3
scenes/main/scripts/control.gd

@@ -33,7 +33,6 @@ var save_load
 
 # Called when the node enters the scene tree for the first time.
 func _ready() -> void:
-	Nodes.hide()
 	$mainmenu.hide()
 	$NoLocationPopup.hide()
 	$Console.hide()
@@ -144,7 +143,7 @@ func new_patch():
 	graph_edit.scroll_offset = Vector2(0, 0)
 	
 		#Generate input and output nodes
-	var effect: GraphNode = Nodes.get_node(NodePath("inputfile")).duplicate()
+	var effect = Utilities.nodes["inputfile"].instantiate()
 	effect.name = "inputfile"
 	get_node("GraphEdit").add_child(effect, true)
 	effect.connect("open_help", Callable(open_help, "show_help_for_node"))
@@ -153,7 +152,7 @@ func new_patch():
 	effect.position_offset = Vector2(20,80)
 	default_input_node = effect #store a reference to this node to allow for loading into it directly if software launched with a wav file argument
 	
-	effect = Nodes.get_node(NodePath("outputfile")).duplicate()
+	effect = Utilities.nodes["outputfile"].instantiate()
 	effect.name = "outputfile"
 	get_node("GraphEdit").add_child(effect, true)
 	effect.init() #initialise ui from user prefs
@@ -501,6 +500,7 @@ func _on_save_dialog_file_selected(path: String) -> void:
 		currentfile = "none" #reset current file to none for save tracking so user cant save over help file
 		save_load.load_graph_edit(helpfile)
 	elif savestate == "quit":
+		undo_redo.free()
 		await get_tree().create_timer(0.25).timeout #little pause so that it feels like it actually saved even though it did
 		get_tree().quit()
 	elif savestate == "saveas":
@@ -627,6 +627,7 @@ func _on_save_changes_button_down() -> void:
 			currentfile = "none" #reset current file to none for save tracking so user cant save over help file
 			save_load.load_graph_edit(helpfile)
 		elif savestate == "quit":
+			undo_redo.free()
 			await get_tree().create_timer(0.25).timeout #little pause so that it feels like it actually saved even though it did
 			get_tree().quit()
 			
@@ -644,6 +645,7 @@ func _on_dont_save_changes_button_down() -> void:
 		currentfile = "none" #reset current file to none for save tracking so user cant save over help file
 		save_load.load_graph_edit(helpfile)
 	elif savestate == "quit":
+		undo_redo.free()
 		get_tree().quit()
 	
 	savestate = "none"
@@ -661,6 +663,7 @@ func _notification(what):
 			$SaveChangesPopup.popup_centered()
 			#$HelpWindow.hide()
 		else:
+			undo_redo.free()
 			get_tree().quit() # default behavior
 			
 func _open_output_folder():

+ 2 - 1
scenes/main/scripts/graph_edit.gd

@@ -50,7 +50,8 @@ func _make_node(command: String, skip_undo_redo := false) -> GraphNode:
 		if node_info.get("category", "") == "utility":
 			#Find utility node with matching name and create a version of it in the graph edit
 			#and position it close to the origin right click to open the menu
-			var effect: GraphNode = Nodes.get_node(NodePath(command)).duplicate()
+			#var effect: GraphNode = Nodes.get_node(NodePath(command)).duplicate()
+			var effect = Utilities.nodes[command].instantiate()
 			effect.name = command
 			add_child(effect, true)
 			if command == "outputfile":