Nasal side branch: the 19-section Dang & Honda nasal tract, a velopharyngeal port area (opening * 0.8 cm^2) instead of a 0.4 cm diameter, vowel_set consonants placed in cm (/m/ at the lips, /n/ on the alveolar ridge cell), velum shut = opening 0
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b2d0363f2c
commit
671ff4ca01
6 changed files with 276 additions and 15 deletions
|
|
@ -13,8 +13,6 @@ public static partial class FaustEmitter
|
|||
private const float LadderGlottalReflection = 0.75f;
|
||||
// Speed of sound in cm/s used only to size the lip end correction from the lip radius (the ladder's own cell length uses the path's speed).
|
||||
private const float LipEndCorrectionSoundSpeedCentimeters = 35000f;
|
||||
// Full-open velum diameter in cm, as in Pink Trombone's velum target.
|
||||
private const float VelumOpenDiameterCentimeters = 0.4f;
|
||||
|
||||
private sealed record LadderPath(
|
||||
WaveguidePath Path,
|
||||
|
|
@ -70,8 +68,9 @@ public static partial class FaustEmitter
|
|||
continue;
|
||||
}
|
||||
|
||||
// The velopharyngeal port area, cm^2: opening * coupling * the design maximum (NasalTractAreas); it is the nasal ladder's first cell.
|
||||
var velum = $"{name}_primitive_branch_{SafeIdentifier(branch.Name)}_velum_area";
|
||||
source.AppendLine($" {velum} = max(0.000001, pow({admittances[branch.Name]} * {F(VelumOpenDiameterCentimeters)}, 2.0));");
|
||||
source.AppendLine($" {velum} = max(0.000001, {admittances[branch.Name]} * {F(NasalTractAreas.VelopharyngealPortMaximumAreaSquareCentimeters)});");
|
||||
var sum = $"({oral.A(cell)} + {oral.A(cell + 1)} + {velum})";
|
||||
var key = $"{name}_primitive_branch_{SafeIdentifier(branch.Name)}";
|
||||
source.AppendLine($" {key}_refl_left = (2.0 * {oral.A(cell)} - {sum}) / {sum};");
|
||||
|
|
|
|||
|
|
@ -232,13 +232,13 @@ public static class IpaGestureExperiment
|
|||
|
||||
private static string Scaffold(IReadOnlyList<string> gestureLines, float sustain, float frequency) => $$"""
|
||||
patch gain=.45
|
||||
morphology name=oral length_cm={{Format(StoryVowelAreas.MeanLengthCentimeters)}} diameters=.55,.75,1.05,1.45,1.25,.8 tongue_index=3 tongue_diameter=1.4 constriction_index=4 constriction_diameter=1 lip_opening=4
|
||||
morphology name=oral length_cm={{Format(StoryVowelAreas.MeanLengthCentimeters)}} diameters=.55,.75,1.05,1.45,1.25,.8 tongue_index=3 tongue_diameter=1.4 constriction_index=4 constriction_diameter=1 constriction_width=.03 lip_opening=4
|
||||
vowel_set area_function=oral source={{StoryVowelAreas.Source}}
|
||||
morphology name=nasal length_cm=12 diameters=.04,.28,.52,.72
|
||||
morphology name=nasal length_cm={{Format(NasalTractAreas.LengthCentimeters)}} areas={{NasalTractAreas.AreasList()}}
|
||||
waveguide_path name=oral_path morphology=oral speed={{TractSpeedMetersPerSecond}} strategy=thiran order=1 max_delay=4096 loss=.998
|
||||
waveguide_path name=nasal_path morphology=nasal speed={{TractSpeedMetersPerSecond}} strategy=thiran order=1 max_delay=4096 loss=.997
|
||||
source_port name=folds path=oral_path kind=glottal position=0 pressure=.66 tension=.54 opening=.42 noise=.04 impedance=.32 flow_scale=.12
|
||||
branch_port name=velopharynx from=oral_path from_position=.45 to=nasal_path opening=.01 coupling=1
|
||||
branch_port name=velopharynx from=oral_path from_position=.45 to=nasal_path opening=0 coupling=1
|
||||
constriction_contact name=contact path=oral_path position=.92 opening=1 resistance=.45 stored_pressure=.12
|
||||
radiation_load name=mouth path=oral_path kind=lip position=1 aperture=.8 reflection=-1 impedance=.28
|
||||
radiation_load name=nostril path=nasal_path kind=lip position=1 aperture=.8 reflection=-1 impedance=.28
|
||||
|
|
|
|||
33
src/AquaSynth.Core/NasalTractAreas.cs
Normal file
33
src/AquaSynth.Core/NasalTractAreas.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
namespace AquaSynth.Dsl;
|
||||
|
||||
/// <summary>
|
||||
/// The owner of the nasal tract area function and of the velopharyngeal port's maximum area. Data: Birkholz P, 2005, "3D-Artikulatorische
|
||||
/// Sprachsynthese", dissertation Universitaet Rostock, Table 2.3 (the nasal cavity of one subject, after Dang J, Honda K, 1994, "Morphological
|
||||
/// and acoustical analysis of the nasal and the paranasal cavities", JASA 96(4):2088-2100): 19 sections of 0.6 cm (11.4 cm), areas in cm^2,
|
||||
/// velopharyngeal end first, nostrils last. A test compares <see cref="Areas"/> to the cited values.
|
||||
/// Not modelled: the paranasal sinus Helmholtz resonators (zeros at 552-1682 Hz in the same source) and the piriform fossae. The table is a
|
||||
/// one-subject measurement and is unheard here: nothing in this file says how any nasal sounds.
|
||||
/// </summary>
|
||||
public static class NasalTractAreas
|
||||
{
|
||||
public const string Source = "birkholz2005-table2.3";
|
||||
public const float SectionLengthCentimeters = 0.6f;
|
||||
public const float LengthCentimeters = 11.4f;
|
||||
|
||||
public static IReadOnlyList<float> Areas { get; } =
|
||||
[
|
||||
1.63f, 2.07f, 2.72f, 3.59f, 4.24f, 3.26f, 3.04f, 3.04f, 2.72f, 2.5f,
|
||||
2.39f, 2.39f, 1.85f, 0.76f, 1.41f, 1.74f, 1.30f, 1.74f, 0.76f,
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Maximum cross-section area of the velopharyngeal port in cm^2: the ladder's port area is opening * coupling * this. A DESIGN VALUE:
|
||||
/// no source for the range of the port area was retrieved (Birkholz's velum port is a controllable area; its range is not in the
|
||||
/// material read). 0.8 cm^2 is a wide-open port, below the first nasal section (1.63 cm^2) so the port, not the table, is the narrowest
|
||||
/// first cell. Pink Trombone's earlier constant, a 0.4 cm diameter (0.16 cm^2 area at full opening and coupling), was likewise unsourced.
|
||||
/// </summary>
|
||||
public const float VelopharyngealPortMaximumAreaSquareCentimeters = 0.8f;
|
||||
|
||||
/// <summary>The scaffold's morphology line value for areas=, invariant-culture comma separated.</summary>
|
||||
public static string AreasList() => string.Join(",", Areas.Select(area => area.ToString("0.##", System.Globalization.CultureInfo.InvariantCulture)));
|
||||
}
|
||||
|
|
@ -1525,7 +1525,19 @@ public static class PatchScript
|
|||
return;
|
||||
}
|
||||
|
||||
AddAuthoredSpline($"{name}_constriction_index", "/vocal/areas/0/area/constriction_index", start, duration, (0, place), (1, place));
|
||||
if (_areaFunctions.Count > 0 && _areaFunctions[0].Vowels is not null && _areaFunctions[0].Deformation is { } control)
|
||||
{
|
||||
// Under vowel_set the constriction is placed by distance along the tract: the surface is a section index, so a normalized
|
||||
// place fraction would land at fraction * sections / (sections - 1) of the tract, past the lips for a labial.
|
||||
var sections = Math.Max(2, _areaFunctions[0].Shape.Sections);
|
||||
var position = ConsonantPositionFromGlottis(tokens, place, _areaFunctions[0].Shape.LengthCentimeters);
|
||||
HoldOnSurface($"{name}_constriction_index", "/vocal/areas/0/area/constriction_index", start, duration, position * (sections - 1) / control.IndexScale);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddAuthoredSpline($"{name}_constriction_index", "/vocal/areas/0/area/constriction_index", start, duration, (0, place), (1, place));
|
||||
}
|
||||
|
||||
AddAuthoredSpline($"{name}_constriction_diameter", "/vocal/areas/0/area/constriction_diameter", start, duration, (0, constriction), (0.5f, constriction), (1, Math.Min(0.65f, constriction + 0.2f)));
|
||||
|
||||
if (tokens.Contains("bilabial") || tokens.Contains("labiodental") || tokens.Contains("labial") || tokens.Contains("rounded"))
|
||||
|
|
@ -1544,13 +1556,13 @@ public static class PatchScript
|
|||
{
|
||||
AddAuthoredSpline($"{name}_contact", "/vocal/contacts/0/opening", start, duration, (0, 0.02f), (0.65f, 0.02f), (1, 0.9f));
|
||||
AddAuthoredSpline($"{name}_stored_pressure", "/vocal/contacts/0/stored_pressure", start, duration, (0, 0.4f), (0.65f, 0.75f), (1, 0.05f));
|
||||
AddAuthoredSpline($"{name}_velum", "/vocal/branches/0/opening", start, duration, (0, 0.01f), (1, 0.01f));
|
||||
AddAuthoredSpline($"{name}_velum", "/vocal/branches/0/opening", start, duration, (0, VelumClosed), (1, VelumClosed));
|
||||
}
|
||||
else if (tokens.Contains("fricative"))
|
||||
{
|
||||
AddAuthoredSpline($"{name}_contact", "/vocal/contacts/0/opening", start, duration, (0, 0.18f), (1, 0.22f));
|
||||
AddAuthoredSpline($"{name}_contact_resistance", "/vocal/contacts/0/resistance", start, duration, (0, 0.75f), (1, 0.85f));
|
||||
AddAuthoredSpline($"{name}_velum", "/vocal/branches/0/opening", start, duration, (0, 0.01f), (1, 0.01f));
|
||||
AddAuthoredSpline($"{name}_velum", "/vocal/branches/0/opening", start, duration, (0, VelumClosed), (1, VelumClosed));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1577,7 +1589,7 @@ public static class PatchScript
|
|||
// gain the consonant closures use (the lip cell cannot shut), so a vowel keeps it fully open; scaling it by the lip
|
||||
// area as well counted the rounding twice and left /u/ 30 dB under /i/.
|
||||
AddAuthoredSpline($"{name}_lip_radiation", "/vocal/radiation/0/aperture", start, duration, (0, 1), (1, 1));
|
||||
AddAuthoredSpline($"{name}_velum", "/vocal/branches/0/opening", start, duration, (0, 0.01f), (1, 0.01f));
|
||||
AddAuthoredSpline($"{name}_velum", "/vocal/branches/0/opening", start, duration, (0, VelumClosed), (1, VelumClosed));
|
||||
}
|
||||
|
||||
// Holds a surface at a value in its own unit (cm, section index); splines carry the surface's normalized range.
|
||||
|
|
@ -1618,6 +1630,25 @@ public static class PatchScript
|
|||
.Split(['_', ',', '+', ' '], StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)
|
||||
.ToHashSet(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
// A shut velum is opening 0: the port area is linear in the opening (opening * coupling * NasalTractAreas maximum), so 0.01 would
|
||||
// leave a 0.008 cm^2 leak that shows in the oral formants.
|
||||
private const float VelumClosed = 0f;
|
||||
|
||||
// Distance from the lip plane to the alveolar ridge in cm. A DESIGN VALUE; no source for the distance was retrieved. 2.555 cm puts the
|
||||
// closure on the centre of ladder cell 20 of 24 of the scaffold tract (17.52 cm at 48 kHz and 350 m/s: (20.5 / 24) * 17.52 = 14.965 cm
|
||||
// from the glottis), the cell grid being what a narrow constriction (scaffold constriction_width .03, e-fold 0.63 cm) can close; it is
|
||||
// the ladder's counterpart of the tube check's closed end after section 37 of 44 (14.73 cm).
|
||||
private const float AlveolarRidgeCentimetersFromLips = 2.555f;
|
||||
|
||||
// Normalized position (0 glottis, 1 lips) of a consonant's constriction in the vowel_set path: labials at the lip plane, alveolars
|
||||
// AlveolarRidgeCentimetersFromLips behind it, every other place at its PlaceTarget fraction of the tract length.
|
||||
private static float ConsonantPositionFromGlottis(HashSet<string> tokens, float placeFraction, float lengthCentimeters)
|
||||
{
|
||||
if (tokens.Contains("bilabial") || tokens.Contains("labiodental") || tokens.Contains("labial")) return 1;
|
||||
if (tokens.Contains("alveolar")) return 1 - AlveolarRidgeCentimetersFromLips / lengthCentimeters;
|
||||
return placeFraction;
|
||||
}
|
||||
|
||||
private static float PlaceTarget(HashSet<string> tokens)
|
||||
{
|
||||
if (tokens.Contains("bilabial") || tokens.Contains("labiodental") || tokens.Contains("labial")) return 0.96f;
|
||||
|
|
|
|||
Loading…
Reference in a new issue