From b9559897c05b8c2f67e34372685952d586af5c3d Mon Sep 17 00:00:00 2001 From: Grant Shangreaux Date: Sat, 30 Oct 2021 23:28:56 -0500 Subject: Add: restructured Osc class preparing for more wave forms --- klangfarb/Osc.gdns | 8 ++++++++ klangfarb/SineWave.gdns | 8 -------- klangfarb/main.gd | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 klangfarb/Osc.gdns delete mode 100644 klangfarb/SineWave.gdns (limited to 'klangfarb') diff --git a/klangfarb/Osc.gdns b/klangfarb/Osc.gdns new file mode 100644 index 0000000..65d44ef --- /dev/null +++ b/klangfarb/Osc.gdns @@ -0,0 +1,8 @@ +[gd_resource type="NativeScript" load_steps=2 format=2] + +[ext_resource path="res://klangfarbrs.gdnlib" type="GDNativeLibrary" id=1] + +[resource] +resource_name = "Osc" +class_name = "Osc" +library = ExtResource( 1 ) diff --git a/klangfarb/SineWave.gdns b/klangfarb/SineWave.gdns deleted file mode 100644 index e220a2e..0000000 --- a/klangfarb/SineWave.gdns +++ /dev/null @@ -1,8 +0,0 @@ -[gd_resource type="NativeScript" load_steps=2 format=2] - -[ext_resource path="res://klangfarbrs.gdnlib" type="GDNativeLibrary" id=1] - -[resource] -resource_name = "SineWave" -class_name = "SineWave" -library = ExtResource( 1 ) diff --git a/klangfarb/main.gd b/klangfarb/main.gd index fb29c8c..f91dbb7 100644 --- a/klangfarb/main.gd +++ b/klangfarb/main.gd @@ -4,9 +4,9 @@ extends AudioStreamPlayer export(float, 20, 8000, 10) var freq = 440.0 # load the GDNative script connected to the rust lib -var SineWave = preload("res://SineWave.gdns") +var Osc = preload("res://Osc.gdns") # make an instance of our one "class" in rust lib -var wave = SineWave.new() +var wave = Osc.new() # initialize the Godot stream we fill up with samples var playback: AudioStreamPlayback = null -- cgit v1.2.3