-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
morse-to-text and text-to-morse modes completed
- Loading branch information
1 parent
61274d5
commit 27cd837
Showing
19 changed files
with
513 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
extends Node | ||
|
||
|
||
@export var frequency : int | ||
@export var wpm : int | ||
@export var musicVolume : float | ||
@export var soundVolume : float | ||
@export var musicBusStr : String | ||
@export var soundBusStr : String | ||
@export var muteWhenUnfocused : bool | ||
@export var sampleRate : int | ||
@export var morseFilename: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://bb4i75ikns07x"] | ||
|
||
[ext_resource type="Script" path="res://GlobalVariables.gd" id="1_iec42"] | ||
[ext_resource type="Script" path="res://GlobalVariablesScene.gd" id="1_qk7lj"] | ||
|
||
[node name="GlobalVariables" type="Node"] | ||
script = ExtResource("1_iec42") | ||
script = ExtResource("1_qk7lj") | ||
frequency = 800 | ||
wpm = 12 | ||
musicVolume = 0.3 | ||
soundVolume = 0.7 | ||
musicBusStr = "Music" | ||
soundBusStr = "Sound" | ||
muteWhenUnfocused = true | ||
sampleRate = 48000 | ||
morseFilename = "./morse.wav" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
extends Node2D | ||
|
||
@export var lobbyScene : String | ||
var morsePosition: float = 0.0 | ||
|
||
|
||
func _process(_delta): | ||
func _ready(): | ||
$"/root/UtilsScene".pause_music() | ||
|
||
|
||
func _process(_delta: float) -> void: | ||
if Input.is_key_pressed(KEY_ESCAPE): | ||
get_tree().change_scene_to_file(lobbyScene) | ||
|
||
|
||
func _on_generate_button_button_up(): | ||
$"ParentMarginContainer2/ContentVerticalContainer/IOHorizontalContainer/OutputTextEdit".text = $"/root/UtilsScene".morse_to_text($"ParentMarginContainer2/ContentVerticalContainer/IOHorizontalContainer/InputTextEdit".text) | ||
$"/root/UtilsScene".generate_morse_audio($"ParentMarginContainer2/ContentVerticalContainer/IOHorizontalContainer/OutputTextEdit".text) | ||
$Morse.stream = $"/root/UtilsScene".load_audio_stream_from_file($"/root/GlobalVariablesScene".morseFilename) | ||
|
||
|
||
func _on_play_button_button_up(): | ||
$Morse.play() | ||
|
||
|
||
func _on_pause_button_button_up(): | ||
morsePosition = $Morse.get_playback_position() | ||
$Morse.stop() | ||
|
||
|
||
func _on_resume_button_button_up(): | ||
if not $Morse.playing: | ||
$Morse.play(morsePosition) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.