From eb81cf5820770c54d33facaf09f7f79a17e272ed Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 10 Jan 2011 17:04:54 +0100 Subject: 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) --- synth/note_skel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'synth/note_skel.cpp') 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; } + -- cgit v1.2.3