eas_smfdata.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. * Licensed under the Apache License, Version 2.0 (the "License");
  13. * you may not use this file except in compliance with the License.
  14. * You may obtain a copy of the License at
  15. *
  16. * http://www.apache.org/licenses/LICENSE-2.0
  17. *
  18. * Unless required by applicable law or agreed to in writing, software
  19. * distributed under the License is distributed on an "AS IS" BASIS,
  20. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. * See the License for the specific language governing permissions and
  22. * limitations under the License.
  23. *
  24. *----------------------------------------------------------------------------
  25. * Revision Control:
  26. * $Revision: 686 $
  27. * $Date: 2007-05-03 14:10:54 -0700 (Thu, 03 May 2007) $
  28. *----------------------------------------------------------------------------
  29. */
  30. #ifndef _EAS_SMF_DATA_H
  31. #define _EAS_SMF_DATA_H
  32. #ifndef MAX_SMF_STREAMS
  33. #define MAX_SMF_STREAMS 17
  34. #endif
  35. /* offsets in to the SMF file */
  36. #define SMF_OFS_HEADER_SIZE 4
  37. #define SMF_OFS_FILE_TYPE 8
  38. #define SMF_OFS_NUM_TRACKS 10
  39. /* size of chunk info (chunk ID + chunk size) */
  40. #define SMF_CHUNK_INFO_SIZE 8
  41. /* 'MTrk' track chunk ID */
  42. #define SMF_CHUNK_TYPE_TRACK 0x4d54726bL
  43. /* some useful meta-events */
  44. #define SMF_META_TEXT 0x01
  45. #define SMF_META_COPYRIGHT 0x02
  46. #define SMF_META_SEQTRK_NAME 0x03
  47. #define SMF_META_LYRIC 0x05
  48. #define SMF_META_END_OF_TRACK 0x2f
  49. #define SMF_META_TEMPO 0x51
  50. #define SMF_META_TIME_SIGNATURE 0x58
  51. /* default timebase (120BPM) */
  52. #define SMF_DEFAULT_TIMEBASE 500000L
  53. /* value for pSMFStream->ticks to signify end of track */
  54. #define SMF_END_OF_TRACK 0xffffffff
  55. #endif