changed internal MIDI-time-resolution from 64th to 192th resulting for example in better MIDI-import and allowing to use triplet-notes in LMMS
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@908 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -714,8 +714,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
int key = *( text + i*bpn + 12 );
|
||||
int len = *( (int*)( text + i*bpn +
|
||||
8 ) );
|
||||
pos /= 6;
|
||||
len /= 6;
|
||||
pos /= 384 / DefaultTicksPerTact;
|
||||
len /= 384 / DefaultTicksPerTact;
|
||||
note n( len, pos );
|
||||
n.setKey( key );
|
||||
m_notes.push_back( qMakePair(
|
||||
@@ -742,8 +742,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
int key = *( text + i*bpn + 12 );
|
||||
int len = *( (int*)( text + i*bpn +
|
||||
8 ) );
|
||||
pos /= 6;
|
||||
len /= 6;
|
||||
pos /= 512 / DefaultTicksPerTact;
|
||||
len /= 512 / DefaultTicksPerTact;
|
||||
/*note n( NULL, len, pos );
|
||||
n.setKey( key );
|
||||
m_notes.push_back( qMakePair(
|
||||
@@ -782,7 +782,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
const int ch = ( *it ) >> 16;
|
||||
const int pat = ( ( *it ) & 0xffff ) / 16;
|
||||
const int pos = ( ( ( *it ) & 0xffff ) % 16 ) * 4;
|
||||
const int pos = ( ( ( *it ) & 0xffff ) % 16 ) *
|
||||
(DefaultTicksPerTact/16);
|
||||
while( engine::getBBTrackContainer()->numOfBBs() <= pat )
|
||||
{
|
||||
track::create( track::BBTrack, engine::getSong() );
|
||||
@@ -793,7 +794,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
p->addNote( note( -64, pos ), FALSE );
|
||||
p->addNote( note( -DefaultTicksPerTact, pos ), FALSE );
|
||||
}
|
||||
|
||||
// now process all notes
|
||||
@@ -837,7 +838,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
|
||||
bbTrack * bbt = bbTrack::findBBTrack( pat_num );
|
||||
trackContentObject * tco = bbt->addTCO( bbt->createTCO( 0 ) );
|
||||
tco->movePosition( midiTime( ( ( *it ) & 0xffff ) * 64 ) );
|
||||
tco->movePosition( midiTime( ( ( *it ) & 0xffff ) *
|
||||
DefaultTicksPerTact ) );
|
||||
}
|
||||
|
||||
if( project_cur_pat < engine::getBBTrackContainer()->numOfBBs() )
|
||||
|
||||
@@ -170,7 +170,7 @@ invalid_format:
|
||||
pd.show();
|
||||
|
||||
// calculate some timing stuff
|
||||
int crotchet_time = 16;
|
||||
int crotchet_time = 16*3;
|
||||
int divisor = m_timingDivision ? m_timingDivision : 96;
|
||||
int multiplier = crotchet_time;
|
||||
int g = gcd( crotchet_time, divisor );
|
||||
|
||||
Reference in New Issue
Block a user