blob: ccca79a0a1b23ca4c92b2c375d61559cb2961b2b [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*****************************************************************************
37 *
38 * Filename:
39 * ---------
40 * melody.h
41 *
42 * Project:
43 * --------
44 * Maui_Software
45 *
46 * Description:
47 * ------------
48 * This file is intended for melody note table.
49 *
50 * Author:
51 * -------
52 * -------
53 *
54 *============================================================================
55 * HISTORY
56 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
57 *------------------------------------------------------------------------------
58 * removed!
59 * removed!
60 * removed!
61 * removed!
62 * removed!
63 * removed!
64 * removed!
65 * removed!
66 * removed!
67 * removed!
68 * removed!
69 * removed!
70 * removed!
71 *------------------------------------------------------------------------------
72 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
73 *============================================================================
74 ****************************************************************************/
75#ifndef MELODY_H
76#define MELODY_H
77
78typedef enum {
79 C0=0, C0sharp, D0, D0sharp, E0, F0, F0sharp, G0, G0sharp, A0, A0sharp, B0,
80 C1, C1sharp, D1, D1sharp, E1, F1, F1sharp, G1, G1sharp, A1, A1sharp, B1,
81 C2, C2sharp, D2, D2sharp, E2, F2, F2sharp, G2, G2sharp, A2, A2sharp, B2,
82 C3, C3sharp, D3, D3sharp, E3, F3, F3sharp, G3, G3sharp, A3, A3sharp, B3,
83 C4, C4sharp, D4, D4sharp, E4, F4, F4sharp, G4, G4sharp, A4, A4sharp, B4,
84 C5, C5sharp, D5, D5sharp, E5, F5, F5sharp, G5, G5sharp, A5, A5sharp, B5,
85 C6, C6sharp, D6, D6sharp, E6, F6, F6sharp, G6, G6sharp, A6, A6sharp, B6,
86 C7, C7sharp, D7, D7sharp, E7, F7, F7sharp, G7, G7sharp, A7, A7sharp, B7
87} MusicalNote; /* KEY define here!! */
88
89//=============Adaption====================================
90#define Notespace 255
91
92typedef struct
93{
94 kal_uint16 duration; /* in ms */
95 kal_uint8 pitch;
96 kal_uint8 volume;
97} MelodyNoteStruct;
98
99typedef struct
100{
101 kal_uint8 timbre;
102 kal_uint16 notesNum;
103 MelodyNoteStruct *notes;
104} MelodyTrackStruct;
105
106typedef struct
107{
108 MelodyTrackStruct *tracks[4];
109} MelodyStruct;
110
111typedef struct
112{
113 kal_uint16 frequency; /* in hz */
114 kal_uint16 on_duration; /* in ms */
115 kal_uint16 off_duration; /* in ms */
116}FreqStruct;
117
118typedef struct
119{
120 FreqStruct *f[4];
121}ToneStruct;
122#endif /* MELODY_H */
123