From 3eb0824c6477bc7720b3ed0ac49f58a34cfa0546 Mon Sep 17 00:00:00 2001 From: Grant Shangreaux Date: Fri, 17 Dec 2021 20:41:38 -0600 Subject: Add: more detailed Risset's Bell implementation also hooks duration up to the main synth to control the length of the Instrument notes that get played, since they aren't subject to the ADSR envelope --- klangfarb/main.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'klangfarb') diff --git a/klangfarb/main.gd b/klangfarb/main.gd index 46c8c0b..d36a49e 100644 --- a/klangfarb/main.gd +++ b/klangfarb/main.gd @@ -11,7 +11,8 @@ export(bool) var apply_bend = false export(Vector2) var phasor_bend = Vector2(0.5, 0.5) # duration related export(bool) var continuous = true -export(int, 0, 5000, 100) var duration = 3000 +# Used for the total duration of an Instrument note +export(int, 0, 30000, 100) var duration = 3000 #Attack/Decay/Release/Sustain export(int, 0, 5000, 100) var attack = 100 export(int, 0, 5000, 100) var decay = 100 @@ -71,6 +72,7 @@ func _process(_delta): synth.set_sustain(sustain) synth.set_release(release) synth.play_instrument(play_instrument) + synth.duration(duration) _check_waveform() _fill_buffer() -- cgit v1.2.3