| 172 | | //this is in work. i planing a sustain-curve that users can edit |
| 173 | | //in moment only stop_playing_notes delete the current playing note. |
| 174 | | stop_playing_notes( note->get_instrument() ); |
| 175 | | //also the note_off msg from midi keyboard should be recorded into drum pattern note_map. |
| 176 | | //all this will develop into branch: new_fx_rack_and_sample_fun |
| | 172 | assert(note); |
| | 173 | Instrument *pInstr = note->get_instrument(); |
| | 174 | // find the notes using the same instrument, and release them |
| | 175 | for ( unsigned j = 0; j < __playing_notes_queue.size(); j++ ) { |
| | 176 | Note *pNote = __playing_notes_queue[ j ]; |
| | 177 | if ( pNote->get_instrument() == pInstr ) { |
| | 178 | pNote->m_adsr.release(); |
| | 179 | } |
| | 180 | } |