diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index afc49e7bb..004c33957 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -156,12 +156,15 @@ public: AutomationPattern * ap; MidiTime lastPos; - smfMidiCC & create( TrackContainer* tc ) + smfMidiCC & create( TrackContainer* tc, QString tn ) { if( !at ) { at = dynamic_cast( Track::create( Track::AutomationTrack, tc ) ); } + if( tn != "") { + at->setName( tn ); + } return *this; } @@ -487,7 +490,11 @@ bool MidiImport::readSMF( TrackContainer* tc ) } else { - ccs[ccid].create( tc ); + if( ccs[ccid].at == NULL ) { + ccs[ccid].create( tc, trackName + + (ccid == 128 ? " Pitch bend" : + QString(" CC %1").arg(ccid) ) ); + } ccs[ccid].putValue( time, objModel, cc ); } }