diff --git a/src/core/src/smf/smf.cpp b/src/core/src/smf/smf.cpp index 5a07441f0..bd5cabaaf 100644 --- a/src/core/src/smf/smf.cpp +++ b/src/core/src/smf/smf.cpp @@ -278,8 +278,8 @@ void SMFWriter::save( const QString& sFilename, Song *pSong ) FOREACH_NOTE_CST_IT_BOUND(notes,it,nNote) { Note *pNote = it->second; if ( pNote ) { - float rnd = (float)rand()/(float)RAND_MAX; - if ( pNote->get_probability() < rnd ) { + float threshold = pSong->get_threshold(); + if ( pNote->get_probability() < threshold ) { continue; }