Skip to content

Commit

Permalink
Probability 2.0: Use fill value and fill probability when exporting MIDI
Browse files Browse the repository at this point in the history
  • Loading branch information
elpescado committed Oct 8, 2018
1 parent 888ffdb commit 6765983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/src/smf/smf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6765983

Please sign in to comment.