File tree Expand file tree Collapse file tree 3 files changed +18
-16
lines changed
Expand file tree Collapse file tree 3 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,8 @@ impl ControlView {
200200 } ) ;
201201 if ui. button ( "Reset Audio" ) . clicked ( ) {
202202 let default = MidiSettings :: default ( ) ;
203+ midi_settings. click_mute = default. click_mute ;
204+ midi_settings. click_velocity = default. click_velocity ;
203205 midi_settings. vocal_mute = default. vocal_mute ;
204206 midi_settings. vocal_velocity = default. vocal_velocity ;
205207 midi_settings. guitar_mute = default. guitar_mute ;
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ impl Default for MidiSettings {
3030 fn default ( ) -> Self {
3131 Self {
3232 bypass_hub : false ,
33- click_mute : false ,
34- click_velocity : 50 ,
33+ click_mute : true ,
34+ click_velocity : 100 ,
3535 click_octave : Octave :: P7 ,
3636 vocal_mute : false ,
3737 vocal_velocity : 110 ,
Original file line number Diff line number Diff line change @@ -108,23 +108,23 @@ impl MidiChannel {
108108 if !bypass {
109109 match & self . track {
110110 Some ( track) => {
111- if !is_seeking || track. kind != settings. seeking_track {
112- match track. kind {
113- TrackKind :: Vocal => {
114- velocity = if settings. vocal_mute { 0 } else { settings. vocal_velocity } ;
115- } ,
116- TrackKind :: Guitar => {
117- velocity = if settings. guitar_mute { 0 } else { settings. guitar_velocity } ;
118- } ,
119- TrackKind :: Piano => {
120- velocity = if settings. piano_mute { 0 } else { settings. piano_velocity } ;
121- } ,
122- _ => ( ) ,
123- }
111+ let seeking = is_seeking && track. kind == settings. seeking_track ;
112+ match track. kind {
113+ TrackKind :: Vocal => {
114+ velocity = if !seeking && settings. vocal_mute { 0 } else { settings. vocal_velocity } ;
115+ } ,
116+ TrackKind :: Guitar => {
117+ velocity = if !seeking && settings. guitar_mute { 0 } else { settings. guitar_velocity } ;
118+ } ,
119+ TrackKind :: Piano => {
120+ velocity = if !seeking && settings. piano_mute { 0 } else { settings. piano_velocity } ;
121+ } ,
122+ _ => ( ) ,
124123 }
125124 } ,
126125 None => {
127- velocity = if settings. click_mute { 0 } else { settings. click_velocity } ;
126+ let is_rest = play_control. position . bar . bar_ordinal == 0 ;
127+ velocity = if !is_rest && settings. click_mute { 0 } else { settings. click_velocity } ;
128128 }
129129 }
130130 }
You can’t perform that action at this time.
0 commit comments