
phoneme @
  vowel starttype #@ endtype #@
  unstressed
  length 130
  FMT(vowel/@_3)
endphoneme

// ToDo: change [@] to [a#] if adjacent to [r] or [R]
phoneme 3
  vowel starttype #a endtype #a
  unstressed
  length 130
  FMT(vowel/a#_3)
endphoneme

phoneme i
  vowel starttype #i endtype #i
  length 150
  IfNextVowelAppend(;)
  FMT(vowel/i_4)
endphoneme

phoneme e
  vowel starttype #e endtype #e
  length 150
  FMT(vowel/e)
endphoneme

phoneme E
  vowel starttype #e endtype #e
  length 150
  FMT(vowel/e_mid2)
endphoneme

phoneme &
  vowel starttype #e endtype #e
  length 150
  FMT(vowel/ee_2)
endphoneme

// PB added for the æ in "dræbt"
phoneme &#
  vowel starttype  #e endtype #e
    length 120
	FMT(vowel/&)
endphoneme

phoneme a
  vowel starttype #a endtype #a
  length 150
  FMT(vowel/a_2)
endphoneme

phoneme A
  vowel starttype #a endtype #a
  length 150
  FMT(vowel/a_3)
endphoneme

phoneme u
  vowel starttype #u endtype #u
  length 150
  FMT(vowel/u_bck)
endphoneme

phoneme o
  vowel starttype #o endtype #o
  length 150
  FMT(vowel/o_2)
endphoneme

phoneme O
  vowel starttype #o endtype #o
  length 150
  FMT(vowel/o_5)
endphoneme

phoneme V
  vowel starttype #@ endtype #@
  length 150
  FMT(vowel/V_4)
endphoneme

phoneme 0
  vowel starttype #o endtype #o
  length 150
  FMT(vowel/oo_2)
endphoneme


phoneme y
  vowel starttype #i endtype #i
  length 150
  FMT(vowel/y)
endphoneme

phoneme Y
  vowel starttype #i endtype #i
  length 150
  FMT(vowel/yy)
endphoneme

phoneme W
  vowel starttype #@ endtype #@
  length 150
  FMT(vowel/oe)
endphoneme

// PB added for the ø in "røv", "røg", "øje" instead of [V3]
phoneme W#
  vowel starttype #@ endtype #@
  length 150
  FMT(vowel/V)
endphoneme

phoneme aI
  vowel starttype #a endtype #i
  length 250
  FMT(vdiph/ai)
endphoneme


// CONSONANTS

// PB added l/3
phoneme l
  liquid
  lengthmod 7
  ChangePhoneme(l/3)
  CALL base/l
endphoneme

phoneme v        // approximant, not fricative
  import_phoneme base/v#
  voicingswitch f
endphoneme


phoneme r    // used for 'r' after a vowel (to create a diphthong)
  liquid
  lengthmod 7
  IF nextPhW(isVowel) THEN
    ChangePhoneme(R)
  ENDIF
  FMT(r/a_)
endphoneme

phoneme R
  lengthmod 7
  liquid
  ipa ʁ
  FMT(r/aa)
endphoneme



// don't weaken consonants at end of word or before a stop

phoneme s
  vls alv frc sibilant
  voicingswitch z
  lengthmod 3
  Vowelin  f1=0  f2=1700 -300 300  f3=-100 80
  Vowelout f1=0  f2=1700 -300 250  f3=-100 80  rms=20

  IF nextPh(p) OR nextPh(t) OR nextPh(k) THEN
    WAV(ufric/s!)
  ENDIF
  WAV(ufric/s)
endphoneme


phoneme p
  vls blb stop
  voicingswitch b
  lengthmod 2
  Vowelin  f1=0  f2=1000 -50 -100  f3=-200 80 amp=11
  Vowelout f1=0  f2=1000 -500 -350  f3=-300 80 rms=22

  IF nextPh(isPause2) THEN
    WAV(ustop/p_unasp)
  ELIF nextPh(r) THEN
    WAV(ustop/pr, 70)
  ELIF nextPh(R) OR nextPh(R2) THEN
    WAV(ustop/pr)
  ELIF nextPh(@-) THEN
    WAV(ustop/p_unasp)
  ELIF nextPh(l) THEN
    WAV(ustop/pl)
  ENDIF
  WAV(ustop/p)
endphoneme



phoneme t
  vls alv stop
  voicingswitch d
  lengthmod 2
  Vowelin f1=0  f2=1700 -300 300  f3=-100 80
  Vowelout f1=0 f2=1700 -300 250  f3=-100 80  rms=20

  IF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN
    WAV(ustop/tr)
  ENDIF
  WAV(ustop/t, 90)
endphoneme

