Browse Source

Improved detection of input nodes to allow expansion, added update notes to the updates available window

Jonathan Higgins 6 months ago
parent
commit
bf0a2578a6

+ 5 - 2
scenes/Nodes/check_for_updates.gd

@@ -28,9 +28,11 @@ func _on_request_completed(result, response_code, headers, body):
 
 
 	var latest_version = response.get("tag_name", "")
 	var latest_version = response.get("tag_name", "")
 	print("Latest GitHub version: ", latest_version)
 	print("Latest GitHub version: ", latest_version)
+	
+	var update_notes = response.get("body", "")
 
 
 	if _version_is_newer(latest_version, current_version):
 	if _version_is_newer(latest_version, current_version):
-		_show_update_popup(latest_version)
+		_show_update_popup(latest_version, update_notes)
 		
 		
 func _version_is_newer(latest: String, current: String) -> bool:
 func _version_is_newer(latest: String, current: String) -> bool:
 	#clean up version tags remove -alpha -beta and v and split the number sup
 	#clean up version tags remove -alpha -beta and v and split the number sup
@@ -58,8 +60,9 @@ func trim_suffix(text: String, suffix: String) -> String:
 		return text.substr(0, text.length() - suffix.length())
 		return text.substr(0, text.length() - suffix.length())
 	return text
 	return text
 	
 	
-func _show_update_popup(new_version: String):
+func _show_update_popup(new_version: String, update_notes: String):
 	$UpdatePopup/Label.text = "A new version of SoundThread (" + new_version + ") is available to download."
 	$UpdatePopup/Label.text = "A new version of SoundThread (" + new_version + ") is available to download."
+	$UpdatePopup/UpdateNotes.text = "[b]Update Details[/b] \n" + update_notes
 	$UpdatePopup.popup_centered()
 	$UpdatePopup.popup_centered()
 
 
 func _on_open_audio_settings_button_down() -> void:
 func _on_open_audio_settings_button_down() -> void:

+ 4 - 0
scenes/Nodes/nodes.tscn

@@ -42,6 +42,7 @@ slot/1/right_icon = null
 slot/1/draw_stylebox = true
 slot/1/draw_stylebox = true
 script = ExtResource("3_uv17x")
 script = ExtResource("3_uv17x")
 metadata/command = "inputfile"
 metadata/command = "inputfile"
+metadata/input = true
 
 
 [node name="Control" type="Control" parent="inputfile"]
 [node name="Control" type="Control" parent="inputfile"]
 layout_mode = 2
 layout_mode = 2
@@ -179,6 +180,7 @@ slot/12/draw_stylebox = true
 script = ExtResource("3_0jqh0")
 script = ExtResource("3_0jqh0")
 metadata/command = "outputfile"
 metadata/command = "outputfile"
 metadata/utility = true
 metadata/utility = true
+metadata/input = false
 
 
 [node name="Control" type="Control" parent="outputfile"]
 [node name="Control" type="Control" parent="outputfile"]
 layout_mode = 2
 layout_mode = 2
@@ -274,6 +276,7 @@ slot/0/draw_stylebox = true
 script = ExtResource("3_uv17x")
 script = ExtResource("3_uv17x")
 metadata/command = "notes"
 metadata/command = "notes"
 metadata/utility = true
 metadata/utility = true
+metadata/input = false
 
 
 [node name="CodeEdit" type="CodeEdit" parent="notes"]
 [node name="CodeEdit" type="CodeEdit" parent="notes"]
 custom_minimum_size = Vector2(0, 10)
 custom_minimum_size = Vector2(0, 10)
@@ -319,6 +322,7 @@ slot/2/draw_stylebox = true
 script = ExtResource("4_0jqh0")
 script = ExtResource("4_0jqh0")
 metadata/command = "note_to_hz"
 metadata/command = "note_to_hz"
 metadata/utility = true
 metadata/utility = true
+metadata/input = false
 
 
 [node name="Note" type="ItemList" parent="note_to_hz"]
 [node name="Note" type="ItemList" parent="note_to_hz"]
 layout_mode = 2
 layout_mode = 2

+ 11 - 3
scenes/main/control.tscn

@@ -389,7 +389,7 @@ script = ExtResource("7_1kc3g")
 auto_translate_mode = 1
 auto_translate_mode = 1
 title = "New Update Available"
 title = "New Update Available"
 initial_position = 2
 initial_position = 2
-size = Vector2i(379, 100)
+size = Vector2i(379, 300)
 visible = false
 visible = false
 transient = true
 transient = true
 exclusive = true
 exclusive = true
@@ -408,11 +408,19 @@ autowrap_mode = 2
 
 
 [node name="OpenAudioSettings" type="Button" parent="CheckForUpdates/UpdatePopup"]
 [node name="OpenAudioSettings" type="Button" parent="CheckForUpdates/UpdatePopup"]
 offset_left = -2.0
 offset_left = -2.0
-offset_top = 69.0
+offset_top = 270.0
 offset_right = 382.0
 offset_right = 382.0
-offset_bottom = 100.0
+offset_bottom = 301.0
 text = "Get the update"
 text = "Get the update"
 
 
+[node name="UpdateNotes" type="RichTextLabel" parent="CheckForUpdates/UpdatePopup"]
+offset_left = 6.0
+offset_top = 62.0
+offset_right = 374.0
+offset_bottom = 262.0
+bbcode_enabled = true
+text = "Update details:"
+
 [node name="Settings" parent="." groups=["popup_windows"] instance=ExtResource("8_16l5g")]
 [node name="Settings" parent="." groups=["popup_windows"] instance=ExtResource("8_16l5g")]
 visible = false
 visible = false
 
 

+ 172 - 0
scenes/main/process_help.json

@@ -2810,6 +2810,178 @@
 	"subcategory": "reverb",
 	"subcategory": "reverb",
 	"title": "Reverb"
 	"title": "Reverb"
   },
   },
+  "multiosc_multiosc_3": {
+	"category": "time",
+	"description": "This synth node contains four oscillators. Oscillator 1 is the carrier - the oscillator we listen to - and oscillators 2, 3, and 4 are modulators. The modulators modulate the frequency of the previous oscillator. Frequency modulation adds new overtones to the sound. Simple ratios i.e. frequencies that are integer multiplications of the carriers frequency, will generally produce overtones that align to the harmonic series. More complex ratios will produce inharmonic overtones. This is an effective way of quickly making a very complex tone.",
+	"inputtype": "[]",
+	"outputtype": "[0]",
+	"parameters": {
+	  "param1": {
+		"paramname": "Output Duration",
+		"paramdescription": "The length in seconds to generate the waveform for",
+		"automatable": false,
+		"outputduration": true,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.5,
+		"maxrange": 720.0,
+		"step": 0.01,
+		"value": 30.0,
+		"exponential": true,
+		"uitype": "hslider"
+	  },
+	  "param2": {
+		"paramname": "Carrier Frequency",
+		"paramdescription": "The pitch of the oscillator that we listen to in Hz",
+		"automatable": true,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 20.0,
+		"maxrange": 10000.0,
+		"step": 0.01,
+		"value": 110.0,
+		"exponential": true,
+		"uitype": "hslider"
+	  },
+	  "param3": {
+		"paramname": "Modulator 1 Frequency",
+		"paramdescription": "The frequency of the first modulator in Hz",
+		"automatable": true,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.01,
+		"maxrange": 10000.0,
+		"step": 0.01,
+		"value": 1046.0,
+		"exponential": true,
+		"uitype": "hslider"
+	  },
+	  "param4": {
+		"paramname": "Modulator 1 Amplitude",
+		"paramdescription": "The amount of modulation applied to the carrier",
+		"automatable": false,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.0,
+		"maxrange": 0.5,
+		"step": 0.01,
+		"value": 0.1,
+		"exponential": false,
+		"uitype": "hslider"
+	  },
+	  "param5": {
+		"paramname": "Modulator 2 Frequency",
+		"paramdescription": "The frequency of the second modulator in Hz",
+		"automatable": true,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.01,
+		"maxrange": 10000.0,
+		"step": 0.01,
+		"value": 888.0,
+		"exponential": true,
+		"uitype": "hslider"
+	  },
+	  "param6": {
+		"paramname": "Modulator 2 Amplitude",
+		"paramdescription": "The amount of modulation applied to modulator 1",
+		"automatable": false,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.0,
+		"maxrange": 0.5,
+		"step": 0.01,
+		"value": 0.03,
+		"exponential": false,
+		"uitype": "hslider"
+	  },
+	  "param7": {
+		"paramname": "Modulator 3 Frequency",
+		"paramdescription": "The frequency of the third modulator in Hz",
+		"automatable": true,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.01,
+		"maxrange": 10000.0,
+		"step": 0.01,
+		"value": 1.0,
+		"exponential": true,
+		"uitype": "hslider"
+	  },
+	  "param8": {
+		"paramname": "Modulator 3 Amplitude",
+		"paramdescription": "The amount of modulation applied to modulator 2",
+		"automatable": false,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.0,
+		"maxrange": 0.5,
+		"step": 0.01,
+		"value": 0.0,
+		"exponential": false,
+		"uitype": "hslider"
+	  },
+	  "param9": {
+		"paramname": "Sample Rate",
+		"paramdescription": "The sample rate of the output file",
+		"automatable": false,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 48000.0,
+		"maxrange": 96000.0,
+		"step": 48000.0,
+		"value": 48000.0,
+		"exponential": false,
+		"uitype": "hslider"
+	  },
+	  "param10": {
+		"paramname": "Splice Length",
+		"paramdescription": "The length of the fade in at the start and end of the file in ms",
+		"automatable": false,
+		"outputduration": false,
+		"time": false,
+		"min": false,
+		"max": false,
+		"flag": "",
+		"minrange": 0.0,
+		"maxrange": 50.0,
+		"step": 1.0,
+		"value": 50.0,
+		"exponential": false,
+		"uitype": "hslider"
+	  }
+	},
+	"short_description": "Four operator FM tone generator",
+	"stereo": true,
+	"subcategory": "synthesis",
+	"title": "Four Op FM"
+  },
   "synth_wave_4": {
   "synth_wave_4": {
 	"category": "time",
 	"category": "time",
 	"description": "This process generates a constant ramp tone. The pitch of the ramp tone as well as its amplitude can be set to vary over time.",
 	"description": "This process generates a constant ramp tone. The pitch of the ramp tone as well as its amplitude can be set to vary over time.",

+ 4 - 0
scenes/main/scripts/graph_edit.gd

@@ -109,6 +109,10 @@ func _make_node(command: String, skip_undo_redo := false) -> GraphNode:
 			#set meta data for the process
 			#set meta data for the process
 			graphnode.set_meta("command", command)
 			graphnode.set_meta("command", command)
 			graphnode.set_meta("stereo_input", stereo)
 			graphnode.set_meta("stereo_input", stereo)
+			if inputs.size() == 0 and outputs.size() > 0:
+				graphnode.set_meta("input", true)
+			else:
+				graphnode.set_meta("input", false)
 			
 			
 			#adjust size, position and title of the node
 			#adjust size, position and title of the node
 			graphnode.title = title
 			graphnode.title = title

+ 2 - 2
scenes/main/scripts/run_thread.gd

@@ -806,8 +806,8 @@ func path_exists_through_all_nodes() -> bool:
 			all_nodes[name] = child
 			all_nodes[name] = child
 
 
 			var command = child.get_meta("command")
 			var command = child.get_meta("command")
-			var type = command.get_slice("_", 0)
-			if command == "inputfile" or type == "synth" or type == "synspline":
+			var input = child.get_meta("input")
+			if input:
 				input_node_names.append(name)
 				input_node_names.append(name)
 			elif command == "outputfile":
 			elif command == "outputfile":
 				output_node_name = name
 				output_node_name = name