(&mut self, note: SoundFontMixerNote)
| 889 | self.synth |
| 890 | .process_midi_message(note.channel.0 as i32, 0xC0, note.program.0 as i32, 0); |
| 891 | self.synth.process_midi_message( |
| 892 | note.channel.0 as i32, |
| 893 | 0x90, |
| 894 | note.note.0 as i32, |
| 895 | note.velocity as i32, |
| 896 | ); |
| 897 | self.notes.insert(note.id, (note.channel, note.note)); |
| 898 | if !note.held { |
| 899 | self.auto_releases |
| 900 | .push((self.sample + duration_samples(note.sustain), note.id)); |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | fn release_note(&mut self, id: u64) { |
| 905 | if let Some((channel, note)) = self.notes.remove(&id) { |
| 906 | self.synth |
| 907 | .process_midi_message(channel.0 as i32, 0x80, note.0 as i32, 0); |
| 908 | } |
no test coverage detected