Debian Codegraph @

phsource/ph_catalan_ba

raw
1
2 //====================================================
3 // Catalan balearic - based on Catalan (and Spanish and Base2)
4 //====================================================
5
6
7 // plosives (oclusives)
8 // ====================
9 // following https://giec.iec.cat/textgramatica/codi/4.2.1
10
11 phoneme p
12 vls blb stp
13 lengthmod 2
14 voicingswitch b
15 Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
16 Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
17 IF thisPh(isWordEnd) AND nextPh(isNotVowel) AND NOT nextPh(isPause) THEN
18 IF prevPh(isNasal) OR prevPh(isLiquid) OR prevPh(R) OR prevPh(**) OR prevPh(j) THEN
19 ipa NULL
20 ELIF nextPh(t) OR nextPh(s) OR nextPh(ts) THEN
21 ChangePhoneme(t)
22 ELIF nextPh(g) THEN
23 ChangePhoneme(g)
24 ELIF nextPh(Z) THEN
25 ChangePhoneme(d)
26 ELIF nextPh(f) THEN
27 ChangePhoneme(f)
28 ELIF nextPh(R) OR nextPh(j) THEN
29 ipa NULL
30 ELIF nextPh(m) THEN
31 ChangePhoneme(m)
32 ELIF nextPh(isVoiced) THEN
33 ChangePhoneme(b)
34 ENDIF
35 ELIF nextPh(isRhotic) THEN
36 WAV(ustop/pr)
37 ELIF nextPh(l) THEN
38 WAV(ustop/pl)
39 ELIF thisPh(isWordStart) THEN // don't change it if it's word start
40 ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
41 ChangePhoneme(b)
42 ELIF nextPh(t) THEN
43 ChangePhoneme(t)
44 ELIF nextPh(s) THEN
45 IF nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
46 ChangePhoneme(d)
47 ELSE
48 ChangePhoneme(t)
49 ENDIF
50 ENDIF
51 WAV(ustop/p_unasp)
52 endphoneme
53
54 phoneme t // dental variant of /t/
55 vls dnt stp
56 lengthmod 2
57 voicingswitch d
58 Vowelin f1=0 f2=1600 -300 300 f3=-100 80
59 Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20
60 IF nextPh(isPause2) THEN
61 WAV(ustop/t_dnt, 30)
62 ELIF thisPh(isWordEnd) AND nextPh(isNotVowel) AND NOT nextPh(isPause) THEN
63 IF prevPh(isNasal) OR prevPh(isLiquid) OR prevPh(R) OR prevPh(**) OR prevPh(j) THEN
64 ipa NULL
65 ELIF nextPh(k) THEN
66 ChangePhoneme(k)
67 ELIF nextPh(b) THEN
68 ChangePhoneme(b)
69 ELIF nextPh(f) THEN
70 ChangePhoneme(f)
71 ELIF nextPh(p) THEN
72 ChangePhoneme(p)
73 ELIF nextPh(isVoiced) THEN
74 ChangePhoneme(d)
75 ENDIF
76 ELIF nextPh(isWordEnd) AND nextPh(s) THEN
77 IF next2Ph(k) THEN
78 ChangePhoneme(k)
79 ELIF next2Ph(b) THEN
80 ChangePhoneme(b)
81 ELIF next2Ph(isVoiced) THEN
82 ChangePhoneme(d)
83 ENDIF
84 ELIF thisPh(isWordStart) THEN // don't change it if it's word start
85 ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
86 IF nextPh(**) THEN
87 ELSE
88 ChangePhoneme(d)
89 ENDIF
90 ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
91 ChangePhoneme(d)
92 ENDIF
93 WAV(ustop/t_dnt2, 60)
94 endphoneme
95
96 phoneme k
97 vls vel stp
98 lengthmod 2
99 voicingswitch g
100 Vowelin f1=0 f2=2300 200 400 f3=-100 80
101 Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
102 IF nextPh(isPause2) THEN
103 WAV(ustop/k_)
104 ELIF nextPh(isRhotic) THEN
105 WAV(ustop/kr)
106 ELIF thisPh(isWordEnd) AND nextPh(isNotVowel) AND NOT nextPh(isPause) THEN
107 IF prevPh(isNasal) OR prevPh(isLiquid) OR prevPh(R) OR prevPh(**) OR prevPh(j) THEN
108 ipa NULL
109 ELIF nextPh(t) OR nextPh(s) OR nextPh(ts) THEN
110 ChangePhoneme(t)
111 ELIF nextPh(isVoiced) THEN
112 ChangePhoneme(g)
113 ENDIF
114 ELIF thisPh(isWordStart) THEN // don't change it if it's word start
115 ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
116 IF nextPh(w) THEN
117 ELIF nextPh(n) OR nextPh(d) OR nextPh(z) THEN
118 ChangePhoneme(g)
119 ENDIF
120 ELIF nextPh(t) OR nextPh(ts) THEN
121 ChangePhoneme(t)
122 ELIF nextPh(s) THEN
123 IF nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
124 ChangePhoneme(d)
125 ELSE
126 ChangePhoneme(t)
127 ENDIF
128 ENDIF
129 WAV(ustop/k_unasp, 70)
130 endphoneme
131
132 phoneme b
133 vcd blb stp
134 IF thisPh(isWordEnd) THEN
135 IF nextPh(isNotVowel) AND NOT nextPh(isPause) THEN
136 IF prevPh(isNasal) OR prevPh(isLiquid) OR prevPh(R) OR prevPh(**) OR prevPh(j) THEN
137 ipa NULL
138
139 ELIF NOT nextPh(isVoiced) THEN
140 ChangePhoneme(p)
141 ENDIF
142 ELSE
143 ChangePhoneme(p)
144 ENDIF
145 ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
146 ELIF nextPh(s) OR nextPh(t) THEN
147 ChangePhoneme(t)
148 ELIF nextPh(isVoiced) THEN
149 IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
150 IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN
151 ChangePhoneme(B)
152 ENDIF
153 ENDIF
154 ELSE
155 ChangePhoneme(p)
156 ENDIF
157 CALL base1/b
158 endphoneme
159
160 phoneme g
161 vcd vel stp
162 lengthmod 5
163 voicingswitch k
164 Vowelin f1=2 f2=2300 200 300 f3=-300 80
165 Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
166 IF thisPh(isWordEnd) THEN
167 IF nextPh(isNotVowel) AND NOT nextPh(isPause) THEN
168 IF prevPh(isNasal) OR prevPh(isLiquid) OR prevPh(R) OR prevPh(**) OR prevPh(j) THEN
169 ipa NULL
170 ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
171 ELIF NOT nextPh(isVoiced) THEN
172 ChangePhoneme(k)
173 ENDIF
174 ELSE
175 ChangePhoneme(k)
176 ENDIF
177 ELIF nextPh(isVoiced) THEN
178 IF nextPh(m) THEN
179 ChangePhoneme(m)
180 ELIF nextPh(d) THEN
181 ChangePhoneme(g)
182 ELIF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
183 IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN
184 ChangePhoneme(Q)
185 ENDIF
186 ENDIF
187 ELSE
188 ChangePhoneme(k)
189 ENDIF
190 IF PreVoicing THEN
191 FMT(g/xg)
192 ENDIF
193 IF nextPh(isPause2) THEN
194 FMT(g/g_) addWav(x/g_)
195 ENDIF
196 FMT(g/g) addWav(x/g2) // weaker [g]
197 endphoneme
198
199 phoneme d
200 vcd dnt stp
201 IF thisPh(isWordEnd) AND nextPh(isNotVowel) AND NOT nextPh(isPause) THEN
202 IF prevPh(isNasal) OR prevPh(isLiquid) OR prevPh(R) OR prevPh(**) OR prevPh(j) THEN
203 ipa NULL
204 ELIF nextPh(p) THEN
205 ChangePhoneme(p)
206 ELIF NOT nextPh(isVoiced) THEN
207 ChangePhoneme(t)
208 ENDIF ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
209 ELIF nextPh(isVoiced) THEN
210 IF nextPh(m) THEN
211 ChangePhoneme(m)
212 ELIF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
213 IF prevPh(isVowel) OR prevPh(**) OR prevPh(R) OR prevPh(j) OR prevPh(w) OR prevPh(s) OR prevPh(z) THEN
214 ChangePhoneme(D)
215 ENDIF
216 ENDIF
217 ELSE
218 ChangePhoneme(t)
219 ENDIF
220 CALL base2/d
221 endphoneme
222
223 // vowels
224 //=====================================================
225
226 phoneme e
227 vwl starttype #e endtype #e
228 length 170
229 IF thisPh(isUnstressed) THEN
230 ChangePhoneme(@)
231 ENDIF
232 FMT(vowel/e)
233 endphoneme
234
235 phoneme O
236 vwl starttype #o endtype #o
237 length 170
238 IF thisPh(isWordEnd) THEN
239 IF nextPh(o) OR nextPh(O) THEN
240 ipa NULL
241 ELSE
242 ChangeIfUnstressed(o)
243 ENDIF
244 ELIF thisPh(isUnstressed) THEN
245 ChangePhoneme(o)
246 ENDIF
247 FMT(vowel/oo)
248 endphoneme
249
250 phoneme o
251 vwl starttype #o endtype #o
252 length 170
253 FMT(vowel/o)
254 endphoneme
255
256 phoneme @ // Schwa, e.g. alph**a**
257 vwl starttype #@ endtype #@
258 length 140
259 FMT(vowel/@)
260 endphoneme
261
262 // fricatives
263 // ====================================
264
265 phoneme v
266 vcd lbd frc
267 voicingswitch f
268 lengthmod 6
269 Vowelin f1=0 f2=1000 -300 -200 f3=-300 100
270 Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50
271
272 IF thisPh(isWordEnd) AND prevPh(**) AND nextPh(isNotVowel) THEN
273 ipa NULL
274 ENDIF
275 IF KlattSynth THEN
276 Vowelout f1=1 f2=1000 -500 -300 f3=-300 60 len=50 brk
277 IF nextPh(isPause2) THEN
278 FMT(klatt/v_) addWav(vocw/v)
279 ENDIF
280 FMT(klatt/v) addWav(vocw/v, 150)
281 ENDIF
282
283 IF nextPh(isPause2) THEN
284 FMT(voc/v_) addWav(vocw/v)
285 ENDIF
286 IF thisPh(isWordStart) AND nextPhW(isLiquid) THEN
287 length 70
288 ENDIF
289 FMT(voc/v) addWav(vocw/v)
290 endphoneme
291
292 phoneme f
293 vls lbd frc
294 voicingswitch v
295 lengthmod 3
296 Vowelout f1=0 f2=1000 -500 -350 f3=-200 80
297
298 IF thisPh(isWordEnd)THEN
299 IF prevPh(**) THEN
300 ipa NULL
301 ELIF nextPh(isVoiced) THEN
302 ipa v
303 ENDIF
304 ELIF nextPh(s) THEN
305 IF nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
306 ChangePhoneme(d)
307 ELSE
308 ChangePhoneme(t)
309 ENDIF
310 ENDIF
311
312 IF nextPh(isPause) THEN
313 WAV(ufric/f_)
314 ENDIF
315 WAV(ufric/f)
316 endphoneme
317
318 // liquid
319 // =====================================
320
321 phoneme ** // "cara"
322 liquid alv rhotic
323 ipa ɾ
324 lengthmod 3
325 Vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15
326 Vowelin f1=2 f2=1600 -300 300 f3=-100 80 len=20
327
328 IF nextPh(isWordEnd) AND nextPh(isNasal) THEN
329 ipa NULL
330 ENDIF
331 IF prevPh(#i) OR prevPh(#e) THEN
332 FMT(r3/@tap2)
333 ENDIF
334 FMT(r3/@tap)
335 endphoneme
336
337 phoneme l^ // "calla"
338 liquid
339 ipa ʎ
340 lengthmod 7
341 Vowelout len=60 lenadd rate
342 length 100
343
344 NextVowelStarts
345 VowelStart(l^/j2@)
346 VowelStart(l^/j2a)
347 VowelStart(l^/j2e)
348 VowelStart(l^/j2i)
349 VowelStart(l^/j2o)
350 VowelStart(l^/j2u)
351 EndSwitch
352
353 IF prevPh(isPause) THEN
354 FMT(l^/_l^)
355 ELIF prevPh(isVowel) THEN
356 IF nextPh(isPause) THEN
357 ChangePhoneme(j)
358 ELIF nextPh(s) AND next2Ph(isPause) THEN
359 ChangePhoneme(j)
360 ELIF nextPh(isVowel) AND NOT thisPh(isWordEnd) AND NOT thisPh(isWordStart) THEN
361 IF nextPh(isStressed) THEN
362 IF nextPh(i) OR nextPh(e) THEN
363 ipa NULL
364 ELSE
365 ChangePhoneme(j)
366 ENDIF
367 ELIF prevPh(isStressed) THEN
368 IF prevPh(i) OR prevPh(e) THEN
369 ipa NULL
370 ELSE
371 ChangePhoneme(j)
372 ENDIF
373 ELSE
374 ChangePhoneme(j)
375 ENDIF
376 ENDIF
377 ENDIF
378
379 FMT(l^/l^)
380 endphoneme
381
382 // fricatives
383 //================================0
384
385
386
387 phoneme s // dissimilation
388 vls alv frc sib
389 voicingswitch z
390 lengthmod 3
391 Vowelin f1=0 f2=1700 -300 300 f3=-100 80
392 Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
393 IF thisPh(isWordEnd) AND nextPh(isVoiced) THEN
394 ChangePhoneme(z)
395 ELIF thisPh(isWordStart) THEN
396 IF prevPh(t) THEN
397 ChangePhoneme(ts)
398 ENDIF
399 ENDIF
400 IF nextPh(isPause) THEN
401 WAV(ufric/s_)
402 ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN
403 WAV(ufric/s!)
404 ENDIF
405 WAV(ufric/s)
406 endphoneme
407
408 // nasals
409 // ===========================
410
411 phoneme m
412 vcd blb nas
413 Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk
414 lengthmod 4
415 IF KlattSynth THEN
416 Vowelin f1=0 f2=1000 -50 -200 f3=-200 80
417 IF nextPh(isPause2) THEN
418 FMT(klatt/m_)
419 ENDIF
420 FMT(klatt/m)
421 ENDIF
422 NextVowelStarts
423 VowelStart(m/m@)
424 VowelStart(m/ma)
425 VowelStart(m/me)
426 VowelStart(m/mi)
427 VowelStart(m/mo)
428 VowelStart(m/mu)
429 EndSwitch
430 IF nextPh(f) OR nextPh(v) THEN
431 ChangePhoneme(M)
432 ELIF nextPh(t) OR nextPh(d) OR nextPh(s) OR nextPh(z) OR nextPh(R) OR nextPh(S) OR nextPh(Z) THEN
433 ChangePhoneme(n)
434 ELIF nextPh(l^) OR nextPh(n^) THEN
435 ChangePhoneme(n^)
436 ELIF nextPh(k) OR nextPh(g) THEN
437 ChangePhoneme(N)
438 ELIF thisPh(isWordEnd) THEN
439 IF nextPh(j) THEN
440 ChangePhoneme(j)
441 ELIF nextPh(l) THEN
442 ChangePhoneme(l)
443 ENDIF
444 ENDIF
445 IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN
446 FMT(m/mj)
447 ELIF prevPh(isPause) THEN
448 FMT(m/_m)
449 ELIF nextPh(isNotVowel) THEN
450 FMT(m/m_)
451 ENDIF
452 endphoneme
453
454 phoneme n
455 vcd alv nas
456 Vowelout f1=2 f2=1500 -300 250 f3=-100 80 rms=20 brk
457 lengthmod 4
458 IF KlattSynth THEN
459 Vowelin f1=0 f2=1500 -200 200 f3=0 80
460 FMT(klatt/n)
461 ENDIF
462 NextVowelStarts
463 VowelStart(n/n@)
464 VowelStart(n/na)
465 VowelStart(n/ne)
466 VowelStart(n/ni)
467 VowelStart(n/no)
468 VowelStart(n/nu)
469 EndSwitch
470 IF nextPh(f) OR nextPh(v) THEN
471 ChangePhoneme(M)
472 ELIF nextPh(k) OR nextPh(g) THEN
473 ChangePhoneme(N)
474 ELIF nextPh(p) OR nextPh(b) OR nextPh(v) OR nextPh(m) THEN
475 ChangePhoneme(m)
476 ELIF thisPh(isWordEnd) THEN
477 IF nextPh(l^) OR nextPh(n^) THEN
478 ChangePhoneme(n^)
479 ELIF nextPh(j) THEN
480 ChangePhoneme(j)
481 ENDIF
482 ENDIF
483 IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN
484 FMT(n/nj)
485 ELIF prevPh(isPause) OR prevPh(n) THEN
486 FMT(n/_n)
487 ELIF nextPh(isNotVowel) THEN
488 FMT(n/n_)
489 ENDIF
490 endphoneme