• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*----------------------------------------------------------------------------
2  *
3  * File:
4  * eas_smfdata.h
5  *
6  * Contents and purpose:
7  * SMF File Parser
8  *
9  * This file contains data definitions for the SMF parser.
10  *
11  * Copyright Sonic Network Inc. 2005
12 
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  *      http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  *
25  *----------------------------------------------------------------------------
26  * Revision Control:
27  *   $Revision: 686 $
28  *   $Date: 2007-05-03 14:10:54 -0700 (Thu, 03 May 2007) $
29  *----------------------------------------------------------------------------
30 */
31 
32 #ifndef _EAS_SMF_DATA_H
33 #define _EAS_SMF_DATA_H
34 
35 #ifndef MAX_SMF_STREAMS
36 #define MAX_SMF_STREAMS             128
37 #endif
38 
39 /* offsets in to the SMF file */
40 #define SMF_OFS_HEADER_SIZE         4
41 #define SMF_OFS_FILE_TYPE           8
42 #define SMF_OFS_NUM_TRACKS          10
43 
44 /* size of chunk info (chunk ID + chunk size) */
45 #define SMF_CHUNK_INFO_SIZE         8
46 
47 /* 'MTrk' track chunk ID */
48 #define SMF_CHUNK_TYPE_TRACK        0x4d54726bL
49 
50 /* some useful meta-events */
51 #define SMF_META_TEXT               0x01
52 #define SMF_META_COPYRIGHT          0x02
53 #define SMF_META_SEQTRK_NAME        0x03
54 #define SMF_META_LYRIC              0x05
55 #define SMF_META_END_OF_TRACK       0x2f
56 #define SMF_META_TEMPO              0x51
57 #define SMF_META_TIME_SIGNATURE     0x58
58 
59 /* default timebase (120BPM) */
60 #define SMF_DEFAULT_TIMEBASE        500000L
61 
62 /* value for pSMFStream->ticks to signify end of track */
63 #define SMF_END_OF_TRACK            0xffffffff
64 
65 #endif
66 
67