first metronome click of a tact now has a higher pitch #1254

This commit is contained in:
grindhold
2014-11-01 12:18:08 +01:00
parent 05c15dff0c
commit e9174b275a
2 changed files with 10 additions and 3 deletions

Binary file not shown.

View File

@@ -322,10 +322,17 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
song::Mode_PlayPattern );
if( engine::getSong()->playMode() == song::Mode_PlayPattern &&
engine::pianoRoll()->isRecording() == true &&
p != last_metro_pos && p.getTicks() %
(DefaultTicksPerTact / 4 ) == 0 )
p != last_metro_pos )
{
addPlayHandle( new SamplePlayHandle( "misc/metronome01.ogg" ) );
if ( p.getTicks() % (MidiTime::ticksPerTact() / 1 ) == 0 )
{
addPlayHandle( new SamplePlayHandle( "misc/metronome02.ogg" ) );
}
else if ( p.getTicks() % (MidiTime::ticksPerTact() /
engine::getSong()->getTimeSigModel().getNumerator() ) == 0 )
{
addPlayHandle( new SamplePlayHandle( "misc/metronome01.ogg" ) );
}
last_metro_pos = p;
}