From b75bdf9ddcf2d6fc40782d519dfefad2a0654c25 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Tue, 2 Nov 2021 23:03:05 -0400 Subject: Bending it like Beckham --- klangfarb/Main.tscn | 3 ++- klangfarb/libklangfarbrs.so | Bin 20146368 -> 20305280 bytes klangfarb/main.gd | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'klangfarb') diff --git a/klangfarb/Main.tscn b/klangfarb/Main.tscn index 95d51f7..896aa8c 100644 --- a/klangfarb/Main.tscn +++ b/klangfarb/Main.tscn @@ -6,5 +6,6 @@ [node name="Audio" type="AudioStreamPlayer"] stream = SubResource( 1 ) -volume_db = -7.38 +volume_db = -13.216 script = ExtResource( 2 ) +freq = 130.0 diff --git a/klangfarb/libklangfarbrs.so b/klangfarb/libklangfarbrs.so index 9070316..ee0ba0e 100755 Binary files a/klangfarb/libklangfarbrs.so and b/klangfarb/libklangfarbrs.so differ diff --git a/klangfarb/main.gd b/klangfarb/main.gd index cf3d8c1..439bb50 100644 --- a/klangfarb/main.gd +++ b/klangfarb/main.gd @@ -2,6 +2,7 @@ extends AudioStreamPlayer # controllable frequency interface export(float, 20, 8000, 5) var freq = 440.0 +export(float, 0, 1, 0.1) var bend = 0.5 # control wave form export(String, "sine", "square", "triangle", "sawtooth") var waveform = "sine" @@ -21,7 +22,7 @@ func _fill_buffer() -> void: # ask Rust to generate N frames at freq # Array gets pushed to the # playback stream buffer - playback.push_buffer(wave.frames(freq, to_fill)) + playback.push_buffer(wave.frames(freq, to_fill, bend)) func _check_waveform(): if waveform == "square": -- cgit v1.2.3