support 48th/64th notes in editor

This commit is contained in:
Matt Denham
2003-11-03 08:44:49 +00:00
parent 93f2e21ce4
commit 975c45df11
6 changed files with 119 additions and 11 deletions
+10
View File
@@ -22,6 +22,11 @@ float NoteTypeToBeat( NoteType nt )
case NOTE_TYPE_16TH: return 1.0f/4; // sixteenth notes
case NOTE_TYPE_24TH: return 1.0f/6; // twenty-forth notes
case NOTE_TYPE_32ND: return 1.0f/8; // thirty-second notes
case NOTE_TYPE_48TH: return 1.0f/12;
case NOTE_TYPE_64TH: return 1.0f/16;
// MD 11/03/03 - NOTE_TYPE_INVALID should be treated as equivalent to
// NOTE_TYPE_192ND; NOTE_TYPE_96TH should not exist.
case NOTE_TYPE_INVALID: return 1.0f/48;
default: ASSERT(0); return 0;
}
}
@@ -34,6 +39,8 @@ NoteType GetNoteType( int iNoteIndex )
else if( iNoteIndex % (ROWS_PER_MEASURE/16) == 0) return NOTE_TYPE_16TH;
else if( iNoteIndex % (ROWS_PER_MEASURE/24) == 0) return NOTE_TYPE_24TH;
else if( iNoteIndex % (ROWS_PER_MEASURE/32) == 0) return NOTE_TYPE_32ND;
else if( iNoteIndex % (ROWS_PER_MEASURE/48) == 0) return NOTE_TYPE_48TH;
else if( iNoteIndex % (ROWS_PER_MEASURE/64) == 0) return NOTE_TYPE_64TH;
else return NOTE_TYPE_INVALID;
};
@@ -47,6 +54,9 @@ CString NoteTypeToString( NoteType nt )
case NOTE_TYPE_16TH: return "16th";
case NOTE_TYPE_24TH: return "24th";
case NOTE_TYPE_32ND: return "32nd";
case NOTE_TYPE_48TH: return "48th";
case NOTE_TYPE_64TH: return "64th";
case NOTE_TYPE_INVALID: return "192nd";
default: ASSERT(0); return "";
}
}