summaryrefslogtreecommitdiff
path: root/synth/note_skel.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-10 17:04:54 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-10 17:04:54 +0100
commiteb81cf5820770c54d33facaf09f7f79a17e272ed (patch)
treea87028cc6235d980e52a04e47ebadbc26320d4fa /synth/note_skel.cpp
parentdf97e0ebb7f6591c50f3a588cb2a74901d38ac4a (diff)
Implemented handler for soft-pedal
Controller 67 aka soft-pedal now can reduce the note's volume by half TODO: - let the user set the percentage for the volume, either per controller (per channel) or per CLI (global)
Diffstat (limited to 'synth/note_skel.cpp')
-rw-r--r--synth/note_skel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/synth/note_skel.cpp b/synth/note_skel.cpp
index b028ca4..988f994 100644
--- a/synth/note_skel.cpp
+++ b/synth/note_skel.cpp
@@ -62,6 +62,14 @@ void NoteSkel::set_vel(float v)
apply_pfactor();
}
+void NoteSkel::set_vol_factor(float vol_fac)
+{
+ volume_factor=vol_fac;
+
+ recalc_factors();
+ apply_pfactor();
+}
+
void NoteSkel::set_portamento_frames(jack_nframes_t t)
{
portamento_frames=t;
@@ -72,3 +80,4 @@ int NoteSkel::get_program()
{
return program;
}
+