summaryrefslogtreecommitdiff
path: root/synth/channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'synth/channel.cpp')
-rw-r--r--synth/channel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/synth/channel.cpp b/synth/channel.cpp
index 8ff615e..c2d0793 100644
--- a/synth/channel.cpp
+++ b/synth/channel.cpp
@@ -345,7 +345,12 @@ void Channel::set_portamento(int val)
void Channel::set_portamento_time(int val)
{
- portamento_frames2=samp_rate*val*max_port_time_sec/128;
+ set_portamento_time_sec(val*max_port_time_sec/128.0);
+}
+
+void Channel::set_portamento_time_sec(float val)
+{
+ portamento_frames2=samp_rate*val;
if (do_portamento)
set_real_portamento_frames();
}