```ts
export function levelStrip(
  readings: number[],
  low: number,
  high: number,
  ramp: string,
): string {
  if (ramp.length === 0) {
    throw new Error("empty ramp");
  }
  if (high <= low) {
    throw new Error("span must rise");
  }
  let out = "";
  for (const r of readings) {
    const index = Math.floor(((r - low) * (ramp.length)) / (high - low));
    out += ramp[Math.clamp(index, 0, ramp.length - 1)];
  }
  return out;
}
```