nx_taste_transduce.nx
buildroot/runtime/nx_taste_transduce.nx
about
nx_taste_transduce.nx -- T0 of the TASTE-SCIENCE ladder: the SENSING /
transduction rung (the "electronic tongue" hardware layer).
Existing baseline (nx_food_science): each ingredient carries STATIC
hand-assigned 0..9 axis scores (umami/sweet/salty/sour/spicy/crunch).
That cannot represent (a) detection THRESHOLDS -- a sub-threshold
stimulus tastes of nothing, (b) SATURATION -- doubling a stimulus does
NOT double perception, or (c) the ~1000x sensitivity range ACROSS
qualities (bitter is detected at micromolar; sweet needs millimolar).
T0 EXCEEDS it with real receptor pharmacology: the Hill dose-response
response(C) = Imax * C^h / (K^h + C^h)
where K is the half-saturation concentration, h the Hill coefficient
(cooperativity), gated by a per-quality detection threshold. This is
the canonical chemoreceptor / e-tongue transduction model. Integer-
exact, deterministic, no float.
MEASURED EXCEED (gate-checked, see test): 8x the stimulus yields < 2x
the perceived intensity (Hill saturation), where a static/linear score
would predict 8x; and sub-threshold stimuli register exactly 0.
Detection thresholds (micromolar) are grounded in the taste-science
sources fetched by nx_food_research_fetch (knowledge/fetched/food_s*_
{taste,basic_taste,umami}.raw): quinine ~uM, MSG/sucrose/NaCl ~mM.
genealogy_id: hill_1910_dose_response + beidler_1954_taste_equation
+ nishi_food_science_axes_2026 (the baseline this exceeds)
dependencies 1 imports · 6 importers
imports: nx_syscalls.nx
imported by: nx_ferment_flavor.nxnx_ferment_flavor_test.nxnx_flavor_chem.nxnx_flavor_chem_test.nxnx_soda_flavor.nxnx_taste_transduce_test.nx
structs
| 45 | struct NxTasteReceptor |
consts
| 35 | const NX_TQ_SWEET: i64 = 0 |
| 36 | const NX_TQ_SOUR: i64 = 1 |
| 37 | const NX_TQ_SALTY: i64 = 2 |
| 38 | const NX_TQ_BITTER: i64 = 3 |
| 39 | const NX_TQ_UMAMI: i64 = 4 |
| 40 | const NX_TQ_N_QUALITIES: i64 = 5 |
functions
| 56 | func nx_taste_receptor(quality: i64) -> *NxTasteReceptor |
| 73 | func nx_taste_response_milli(r: *NxTasteReceptor, conc_um: i64) -> i64 |
| 85 | func nx_taste_detectable(r: *NxTasteReceptor, conc_um: i64) -> i64 called by 1: main |
| 90 | func nx_taste_half_sat_um(r: *NxTasteReceptor) -> i64 |