comparison src/aci2/bmi/MmiMelody_data.c @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 /*******************************************************************************
2
3 CONDAT (UK)
4
5 ********************************************************************************
6
7 This software product is the property of Condat (UK) Ltd and may not be
8 disclosed to any third party without the express permission of the owner.
9
10 ********************************************************************************
11
12 $Project name: Basic MMI
13 $Project code: BMI (6349)
14 $Module: PhoneBook
15 $File: MmiMelody_Data.c
16 $Revision: 1.0
17
18 $Author: Condat(UK)
19 $Date: 25/10/00
20
21 ********************************************************************************
22
23 Description:
24
25 ********************************************************************************
26
27 $History: MmiMelody_data.c
28
29 25/10/00 Original Condat(UK) BMI version.
30
31 $End
32
33 *******************************************************************************/
34
35 #define ENTITY_MFW
36
37 /* includes */
38 #include <string.h>
39 #include <stdio.h>
40 #include <stdlib.h>
41
42 #if defined (NEW_FRAME)
43
44 #include "typedefs.h"
45 #include "vsi.h"
46 #include "pei.h"
47 #include "custom.h"
48 #include "gsm.h"
49
50 #else
51
52 #include "STDDEFS.H"
53 #include "custom.h"
54 #include "gsm.h"
55 #include "vsi.h"
56
57 #endif
58
59 #include "MmiBuzzer.h"
60
61 typedef struct
62 {
63 USHORT command_1;
64 USHORT command_2;
65 USHORT length;
66 } T_DESCR;
67
68 #define DEF_MELODY(name) const T_DESCR name[] = {
69
70 #define END_MELODY BZ_TERM,0 };
71
72 //#include "tb1.hm"
73
74 #ifdef USE_PWT
75 #else
76
77 const UINT16 MELODY_BUZ_FREQ[] = {
78 0, // REST
79 // A A# B C C# D D# E F F# G G#
80 27, 29, 31, 33, 35, 37, 39, 41, 44, 46, 49, 52,
81 55, 58, 62, 65, 69, 73, 78, 82, 87, 92, 98, 104,
82 110, 117, 123, 131, 139, 147, 156, 165, 175, 185, 196, 208,
83 220, 233, 247, 262, 277, 294, 311, 330, 349, 370, 392, 415,
84 440, 466, 494, 523, 554, 587, 622, 659, 698, 740, 784, 831, // MIDDLE
85 880, 932, 988,1047,1109,1175,1245,1319,1397,1480,1568,1661,
86 1760,1865,1976,2093,2217,2349,2489,2637,2794,2960,3136,3322,
87 3520,3729,3951,4186,4435,4699,4978,5274,5588,5920,6272,6645,
88 7040,7459,7902,8372,8870,9397,9956,10548,11175,11840,12544,13290
89 };
90
91 #endif
92
93 /*
94 abc tune notation
95 =================
96
97 The following letters are used to represent notes:-
98
99
100 d'
101 -c'- ----
102 b
103 -a- --- ---- ----
104 g
105 ------------------------------------f-------------------
106 e
107 --------------------------------d-----------------------
108 c
109 ----------------------------B---------------------------
110 A
111 ------------------------G-------------------------------
112 F
113 --------------------E-----------------------------------
114 D
115 ---- ---- ---- -C-
116 B,
117 ---- -A,-
118 G,
119 */
120
121 #define TDMA_12 55
122
123 DEF_MELODY(rising_chromatic)
124 f1, 0,TDMA_12,
125 fs1, 0,TDMA_12,
126 g1, 0,TDMA_12,
127 gs1, 0,TDMA_12,
128 a1, 0,TDMA_12,
129 as1, 0,TDMA_12,
130 b1, 0,TDMA_12,
131 c2, 0,TDMA_12,
132 cs2, 0,TDMA_12,
133 d2, 0,TDMA_12,
134 ds2, 0,TDMA_12,
135 e2, 0,TDMA_12,
136 f2, 0,TDMA_12,
137 fs2, 0,TDMA_12,
138 g2, 0,TDMA_12,
139 gs2, 0,TDMA_12,
140 a2, 0,TDMA_12,
141 as2, 0,TDMA_12,
142 b2, 0,TDMA_12,
143 c3, 0,TDMA_12,
144 cs3, 0,TDMA_12,
145 d3, 0,TDMA_12,
146 ds3, 0,TDMA_12,
147 e3, 0,TDMA_12,
148 f3, 0,TDMA_12,
149 fs3, 0,TDMA_12,
150 g3, 0,TDMA_12,
151 gs3, 0,TDMA_12,
152 a3, 0,TDMA_12,
153 as3, 0,TDMA_12,
154 b3, 0,TDMA_12,
155 c4, 0,TDMA_12,
156 cs4, 0,TDMA_12,
157 d4, 0,TDMA_12,
158 ds4, 0,TDMA_12,
159 e4, 0,TDMA_12,
160 f4, 0,TDMA_12,
161 fs4, 0,TDMA_12,
162 g4, 0,TDMA_12,
163 gs4, 0,TDMA_12,
164 a4, 0,TDMA_12,
165 as4, 0,TDMA_12,
166 b4, 0,TDMA_12,
167 c5, 0,TDMA_12,
168 cs5, 0,TDMA_12,
169 d5, 0,TDMA_12,
170 ds5, 0,TDMA_12,
171 e5, 0,TDMA_12,
172 END_MELODY
173
174 DEF_MELODY(rising_cscale)
175 f1, 0,TDMA_12,
176 g1, 0,TDMA_12,
177 a1, 0,TDMA_12,
178 b1, 0,TDMA_12,
179 c2, 0,TDMA_12,
180 d2, 0,TDMA_12,
181 e2, 0,TDMA_12,
182 f2, 0,TDMA_12,
183 g2, 0,TDMA_12,
184 a2, 0,TDMA_12,
185 b2, 0,TDMA_12,
186 c3, 0,TDMA_12,
187 d3, 0,TDMA_12,
188 e3, 0,TDMA_12,
189 f3, 0,TDMA_12,
190 g3, 0,TDMA_12,
191 a3, 0,TDMA_12,
192 b3, 0,TDMA_12,
193 c4, 0,TDMA_12,
194 d4, 0,TDMA_12,
195 e4, 0,TDMA_12,
196 f4, 0,TDMA_12,
197 g4, 0,TDMA_12,
198 a4, 0,TDMA_12,
199 b4, 0,TDMA_12,
200 c5, 0,TDMA_12,
201 d5, 0,TDMA_12,
202 e5, 0,TDMA_12,
203 END_MELODY
204
205 // Coca cola
206 DEF_MELODY(MELODY_ONE)
207 fs3,0,TDMA_12,
208 fs3,0,TDMA_12,
209 fs3,0,TDMA_12,
210 fs3,0,TDMA_12,
211 g3,0,TDMA_12,
212 fs3,0,TDMA_12,
213 e3,0,TDMA_12,
214 e3,0,TDMA_12,
215 a3,0,TDMA_12,
216 fs3,0,TDMA_12,
217 d3,0,TDMA_12,
218 0xFFFF,0xFFFF,0,
219 END_MELODY
220
221 DEF_MELODY(The_Ale_is_dear)
222 fs4,30,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, b3,30,TDMA_12, fs4,30,TDMA_12, e4,30,TDMA_12,
223 fs4,30,TDMA_12, gs4,30,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, cs4,30,TDMA_12, a4,30,TDMA_12, cs4,30,TDMA_12, e4,30,TDMA_12,
224 fs4,60,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, b3,60,TDMA_12, cs4,30,TDMA_12, e4,30,TDMA_12,
225 fs4,30,TDMA_12, e4,30,TDMA_12, d4,30,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12, cs3,30,TDMA_12, d3,30,TDMA_12, cs3,30,TDMA_12,
226
227 fs4,60,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, b3,60,TDMA_12, fs4,30,TDMA_12, e4,30,TDMA_12,
228 fs4,30,TDMA_12, g4,30,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, cs4,30,TDMA_12, a4,30,TDMA_12, cs4,30,TDMA_12, e4,30,TDMA_12,
229 fs4,60,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, b3,60,TDMA_12, cs4,30,TDMA_12, e4,30,TDMA_12,
230 fs4,30,TDMA_12, e4,30,TDMA_12, d4,30,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12, cs3,30,TDMA_12, d3,30,TDMA_12, cs3,30,TDMA_12,
231
232 b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12,
233 a3,30,TDMA_12, a3,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12,
234 b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12,
235 fs4,60,TDMA_12, e4,30,TDMA_12, cs4,30,TDMA_12, b3,60,TDMA_12, b3,60,TDMA_12,
236
237 b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12,
238 a3,30,TDMA_12, a3,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12,
239 b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12,
240 fs4,60,TDMA_12, e4,30,TDMA_12, cs4,30,TDMA_12, b3,60,TDMA_12, b3,60,TDMA_12,
241 END_MELODY
242
243 DEF_MELODY(Danza_de_Astureses)
244 c4,60,TDMA_12, d4,60,TDMA_12,
245 e4,60,TDMA_12, d4,24,TDMA_12,
246 e4,24,TDMA_12, f4,24,TDMA_12,
247 e4,24,TDMA_12, d4,24,TDMA_12,
248 c4,24,TDMA_12, b3,60,TDMA_12,
249 g3,60,TDMA_12, c4,60,TDMA_12,
250 d4,60,TDMA_12, e4,60,TDMA_12,
251 d4,24,TDMA_12, e4,24,TDMA_12,
252 fs4,24,TDMA_12, d4,24,TDMA_12,
253 e4,24,TDMA_12, f4,24,TDMA_12,
254 g4,120,TDMA_12,
255 END_MELODY
256
257
258 DEF_MELODY(MELODY_HELLO)
259 e3,0,TDMA_12,
260 e3,0,TDMA_12,
261 e3,0,TDMA_12,
262 e3,0,TDMA_12,
263 e3,0,TDMA_12,
264 e3,0,TDMA_12,
265 e3,0,TDMA_12,
266 e3,0,TDMA_12,
267 e3,0,TDMA_12,
268 e3,0,TDMA_12,
269 e3,0,TDMA_12,
270 e3,0,TDMA_12,
271 e3,0,TDMA_12,
272 e3,0,TDMA_12,
273 e3,0,TDMA_12,
274 e3,0,TDMA_12,
275 e3,0,TDMA_12,
276 e3,0,TDMA_12,
277 e3,0,TDMA_12,
278 e3,0,TDMA_12,
279 e3,0,TDMA_12,
280 e3,0,TDMA_12,
281 e3,0,TDMA_12,
282 e3,0,TDMA_12,
283 0xFFFF, 0xFFFF, 0,
284 END_MELODY
285
286 DEF_MELODY(bugle)
287 c4, 80,TDMA_12,
288 BZ_REST, 5,TDMA_12,
289 e4, 40,TDMA_12,
290 BZ_REST, 5,TDMA_12,
291 g3, 40,TDMA_12,
292 BZ_REST, 5,TDMA_12,
293 c4, 80,TDMA_12,
294 BZ_REST, 45,TDMA_12,
295 c4, 40,TDMA_12,
296 BZ_REST, 5,TDMA_12,
297 c4, 40,TDMA_12,
298 BZ_REST, 5,TDMA_12,
299 c4, 40,TDMA_12,
300 BZ_REST, 5,TDMA_12,
301 e4, 40,TDMA_12,
302 BZ_REST, 5,TDMA_12,
303 g3, 40,TDMA_12,
304 BZ_REST, 5,TDMA_12,
305 c4, 120,TDMA_12,
306 BZ_REST, 45,TDMA_12,
307 c4, 80,TDMA_12,
308 BZ_REST, 5,TDMA_12,
309 e4, 40,TDMA_12,
310 BZ_REST, 5,TDMA_12,
311 g3, 40,TDMA_12,
312 BZ_REST, 5,TDMA_12,
313 c4, 80,TDMA_12,
314 BZ_REST, 45,TDMA_12,
315 c4, 40,TDMA_12,
316 BZ_REST, 5,TDMA_12,
317 c4, 60,TDMA_12,
318 BZ_REST, 5,TDMA_12,
319 c4, 20,TDMA_12,
320 BZ_REST, 5,TDMA_12,
321 e4, 40,TDMA_12,
322 BZ_REST, 5,TDMA_12,
323 g3, 40,TDMA_12,
324 BZ_REST, 5,TDMA_12,
325 c4, 120,TDMA_12,
326 BZ_REST, 40,TDMA_12,
327 END_MELODY
328