Remove bad comments

This commit is contained in:
Isaac Shoebottom 2024-06-27 00:12:18 -03:00
parent f91e3ddf2b
commit 36a3175cbd
11 changed files with 40 additions and 13 deletions

View File

@ -13,6 +13,9 @@ config_version=5
config/name="Omnichord Godot" config/name="Omnichord Godot"
run/main_scene="res://scenes/Omnichord.tscn" run/main_scene="res://scenes/Omnichord.tscn"
config/features=PackedStringArray("4.2", "GL Compatibility") config/features=PackedStringArray("4.2", "GL Compatibility")
boot_splash/show_image=false
boot_splash/fullsize=false
boot_splash/use_filter=false
config/icon="res://icons/icon.svg" config/icon="res://icons/icon.svg"
[autoload] [autoload]

View File

@ -1,8 +1,12 @@
[gd_scene load_steps=6 format=3 uid="uid://b4fgp0mhbgkfw"] [gd_scene load_steps=10 format=3 uid="uid://b4fgp0mhbgkfw"]
[ext_resource type="Script" path="res://scripts/StopController.gd" id="1_5jtep"] [ext_resource type="Script" path="res://scripts/StopController.gd" id="1_5jtep"]
[ext_resource type="Script" path="res://scripts/ChordVolume.gd" id="1_fjurg"]
[ext_resource type="Script" path="res://scripts/RhythmController.gd" id="2_3cx1r"] [ext_resource type="Script" path="res://scripts/RhythmController.gd" id="2_3cx1r"]
[ext_resource type="Script" path="res://scripts/NoteVolume.gd" id="2_3uvfe"]
[ext_resource type="Script" path="res://scripts/LoopController.gd" id="3_5v5ci"] [ext_resource type="Script" path="res://scripts/LoopController.gd" id="3_5v5ci"]
[ext_resource type="Script" path="res://scripts/RhythmVolume.gd" id="3_m8wj7"]
[ext_resource type="Script" path="res://scripts/TempoController.gd" id="4_auq1v"]
[ext_resource type="Script" path="res://scripts/ChordController.gd" id="4_xrjq4"] [ext_resource type="Script" path="res://scripts/ChordController.gd" id="4_xrjq4"]
[ext_resource type="Script" path="res://scripts/NoteController.gd" id="5_x2vij"] [ext_resource type="Script" path="res://scripts/NoteController.gd" id="5_x2vij"]
@ -47,15 +51,19 @@ size_flags_vertical = 4
[node name="ChordVolume" type="HSlider" parent="App/Sliders/GridContainer"] [node name="ChordVolume" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2 layout_mode = 2
script = ExtResource("1_fjurg")
[node name="NoteVolume" type="HSlider" parent="App/Sliders/GridContainer"] [node name="NoteVolume" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2 layout_mode = 2
script = ExtResource("2_3uvfe")
[node name="RhythmVolume" type="HSlider" parent="App/Sliders/GridContainer"] [node name="RhythmVolume" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2 layout_mode = 2
script = ExtResource("3_m8wj7")
[node name="RhythmTempo" type="HSlider" parent="App/Sliders/GridContainer"] [node name="RhythmTempo" type="HSlider" parent="App/Sliders/GridContainer"]
layout_mode = 2 layout_mode = 2
script = ExtResource("4_auq1v")
[node name="Buttons" type="HBoxContainer" parent="App"] [node name="Buttons" type="HBoxContainer" parent="App"]
layout_mode = 2 layout_mode = 2

View File

@ -1,10 +1,8 @@
extends Node extends Node
# Add asset here
var ChordPlayer: AudioStreamPlayer var ChordPlayer: AudioStreamPlayer
var ChordAudio: AudioStreamOggVorbis var ChordAudio: AudioStreamOggVorbis
# Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
ChordPlayer = get_node("/root/Control/ChordPlayer") ChordPlayer = get_node("/root/Control/ChordPlayer")
var resource_string = "res://audio/%s/%s-chord.ogg" % [self.name, self.name] var resource_string = "res://audio/%s/%s-chord.ogg" % [self.name, self.name]
@ -14,7 +12,6 @@ func _ready():
Global.loop_changed.connect(loop_changed) Global.loop_changed.connect(loop_changed)
func button_pressed(): func button_pressed():
# Play chord
ChordPlayer.stream = ChordAudio ChordPlayer.stream = ChordAudio
ChordPlayer.play() ChordPlayer.play()
Global.chord_changed.emit(self.name) Global.chord_changed.emit(self.name)

7
scripts/ChordVolume.gd Normal file
View File

@ -0,0 +1,7 @@
extends Node
func _ready():
self.value_changed.connect(slider_change)
func slider_change(vol: float):
Global.chord_volume.emit(vol)

View File

@ -1,6 +1,5 @@
extends Node extends Node
# Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
self.toggled.connect(on_toggle) self.toggled.connect(on_toggle)

View File

@ -3,14 +3,12 @@ extends Node
var NotePlayer: AudioStreamPlayer var NotePlayer: AudioStreamPlayer
var NoteAudio: AudioStreamOggVorbis var NoteAudio: AudioStreamOggVorbis
# Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
NotePlayer = get_node("/root/Control/NotePlayer") NotePlayer = get_node("/root/Control/NotePlayer")
Global.chord_changed.connect(chord_changed) Global.chord_changed.connect(chord_changed)
self.pressed.connect(button_pressed) self.pressed.connect(button_pressed)
func button_pressed(): func button_pressed():
# Play chord
NotePlayer.stream = NoteAudio NotePlayer.stream = NoteAudio
NotePlayer.play() NotePlayer.play()

7
scripts/NoteVolume.gd Normal file
View File

@ -0,0 +1,7 @@
extends Node
func _ready():
self.value_changed.connect(slider_change)
func slider_change(vol: float):
Global.note_volume.emit(vol)

View File

@ -1,10 +1,8 @@
extends Node extends Node
# Add asset here
var RhythmPlayer: AudioStreamPlayer var RhythmPlayer: AudioStreamPlayer
var RhythmAudio: AudioStreamOggVorbis var RhythmAudio: AudioStreamOggVorbis
# Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
RhythmPlayer = get_node("/root/Control/RhythmPlayer") RhythmPlayer = get_node("/root/Control/RhythmPlayer")
var resource_string = "res://audio/rhythm/%s.ogg" % self.name var resource_string = "res://audio/rhythm/%s.ogg" % self.name
@ -13,7 +11,6 @@ func _ready():
self.pressed.connect(button_pressed) self.pressed.connect(button_pressed)
func button_pressed(): func button_pressed():
# Play chord
RhythmPlayer.stream = RhythmAudio RhythmPlayer.stream = RhythmAudio
RhythmAudio.loop = true RhythmAudio.loop = true
RhythmPlayer.play() RhythmPlayer.play()

7
scripts/RhythmVolume.gd Normal file
View File

@ -0,0 +1,7 @@
extends Node
func _ready():
self.value_changed.connect(slider_change)
func slider_change(vol: float):
Global.rhythm_volume.emit(vol)

View File

@ -1,11 +1,9 @@
extends Node extends Node
# Add asset here
var RhythmPlayer: AudioStreamPlayer var RhythmPlayer: AudioStreamPlayer
var ChordPlayer: AudioStreamPlayer var ChordPlayer: AudioStreamPlayer
var NotePlayer: AudioStreamPlayer var NotePlayer: AudioStreamPlayer
# Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
RhythmPlayer = get_node("/root/Control/RhythmPlayer") RhythmPlayer = get_node("/root/Control/RhythmPlayer")
ChordPlayer = get_node("/root/Control/ChordPlayer") ChordPlayer = get_node("/root/Control/ChordPlayer")
@ -13,7 +11,6 @@ func _ready():
self.pressed.connect(button_pressed) self.pressed.connect(button_pressed)
func button_pressed(): func button_pressed():
# Play chord
RhythmPlayer.stop() RhythmPlayer.stop()
ChordPlayer.stop() ChordPlayer.stop()
NotePlayer.stop() NotePlayer.stop()

View File

@ -0,0 +1,7 @@
extends Node
func _ready():
self.value_changed.connect(slider_change)
func slider_change(tempo: float):
Global.rhythm_tempo.emit(tempo)