diff options
author | Florian Jung <flo@thinkpad.(none)> | 2011-01-10 17:04:54 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2011-01-10 17:04:54 +0100 |
commit | eb81cf5820770c54d33facaf09f7f79a17e272ed (patch) | |
tree | a87028cc6235d980e52a04e47ebadbc26320d4fa /note_compiler/main.cpp | |
parent | df97e0ebb7f6591c50f3a588cb2a74901d38ac4a (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 'note_compiler/main.cpp')
-rw-r--r-- | note_compiler/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/note_compiler/main.cpp b/note_compiler/main.cpp index 47ed685..4d3fcae 100644 --- a/note_compiler/main.cpp +++ b/note_compiler/main.cpp @@ -109,7 +109,7 @@ void write_ctor() int i; string tabtmp=""; - out << "Note::Note(int n, float v, program_t &prg, jack_nframes_t pf, fixed_t pb, int prg_no)\n" + out << "Note::Note(int n, float v, program_t &prg, jack_nframes_t pf, fixed_t pb, int prg_no, float vol_fac)\n" "{\n" "\tcurr_prg=&prg;\n" "\t\n" @@ -234,7 +234,7 @@ void write_recalc_factors() out << "\tfor (int i=0;i<"<<prog.n_osc<<";i++)\n" "\t{\n" - "\t\tpfactor.out[i]=calc_pfactor(curr_prg->pfactor.out[i], vel);\n" + "\t\tpfactor.out[i]=calc_pfactor(curr_prg->pfactor.out[i], vel) * volume_factor;\n" "\t\t\n" "\t\tfor (int j=0;j<"<<prog.n_osc<<";j++)\n" "\t\t\tpfactor.fm[i][j]=calc_pfactor(curr_prg->pfactor.fm[i][j], vel);\n" |