Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Sep 9, 2016
1 parent 8ba0e3d commit 6277410
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/core/InstrumentFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
if( m_arpSkipModel.value() )
{

if( 101 * ( (float) rand() / (float) RAND_MAX ) < m_arpSkipModel.value() )
if( 100 * ( (float) rand() / (float)( RAND_MAX + 1.0f ) ) < m_arpSkipModel.value() )
{
if( cur_arp_idx == 0 )
{
Expand All @@ -430,10 +430,9 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
// Miss notes randomly. We intercept int dir and abuse it
// after need. :)

int miss = m_arpMissModel.value();
if( miss )
if( m_arpMissModel.value() )
{
if( 100 * ( (float) rand() / (float) RAND_MAX ) < ( miss * miss ) / 100 )
if( 100 * ( (float) rand() / (float)( RAND_MAX + 1.0f ) ) < m_arpMissModel.value() )
{
dir = ArpDirRandom;
}
Expand Down
8 changes: 4 additions & 4 deletions src/gui/widgets/InstrumentFunctionViews.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ InstrumentFunctionArpeggioView::InstrumentFunctionArpeggioView( InstrumentFuncti


m_arpSkipKnob->setLabel( tr( "SKIP" ) );
m_arpSkipKnob->setHintText( tr( "Fail rate:" ) + " ", " " + tr( "%" ) );
m_arpSkipKnob->setHintText( tr( "Skip rate:" ) + " ", " " + tr( "%" ) );
m_arpSkipKnob->setWhatsThis(
tr( "The skip function will make the arpeggiator pause one step "
"randomly. From it's start in full counter clockwise "
"randomly. From its start in full counter clockwise "
"position and no effect it will gradually progress to "
"more or less full amnesia at maximum setting.") );
"full amnesia at maximum setting.") );


m_arpMissKnob->setLabel( tr( "MISS" ) );
m_arpMissKnob->setHintText( tr( "Fail rate:" ) + " ", " " + tr( "%" ) );
m_arpMissKnob->setHintText( tr( "Miss rate:" ) + " ", " " + tr( "%" ) );
m_arpMissKnob->setWhatsThis(
tr( "The miss function will make the arpeggiator miss the "
"intended note.") );
Expand Down

0 comments on commit 6277410

Please sign in to comment.