<!-- canonical: efficientnewlanguage.org/ai/examples/953-the-same-hundred-hertz-was-a-fifth-and-then-a-third | ai_layer_version: 0.1.0 | updated: 2026-09-21 -->

# Example 953 — The same hundred hertz was a fifth and then a third

`the_same_hundred_hertz_was_a_fifth_and_then_a_third.eml` - A synthesizer patch moves a melody up by adding one hundred hertz to every note in its frequency table, every note is moved by exactly the same amount, and the transposed tune comes out as a different tune. What a constant number of hertz does to the intervals is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). A synthesizer
# patch moves a melody up by adding one hundred hertz to every note in its
# frequency table, every note is moved by exactly the same amount, and the
# transposed tune comes out as a different tune. What a constant number of hertz
# does to the intervals is computed below.
#
# The reasoning is careful. Every note moved by exactly 100 Hz; the melody was
# copied without error; 'higher by the same amount' was applied uniformly; and
# the intent was exactly 'the same melody, higher'.
#
# An interval is a ratio of frequencies, not a difference, so adding the same
# hertz to two notes changes the ratio between them - 200 to 300 is a fifth and
# 400 to 500 is a third, one hundred hertz apart in both cases - while
# multiplying every note by the same factor leaves every ratio, and the tune,
# intact.

200 => first_note_hz
300 => second_note_hz
400 => third_note_hz
100 => shift_added_hz
3 => transposition_numerator
2 => transposition_denominator

int(second_note_hz * 10000 / first_note_hz) => interval_one_original_per_myriad
int(third_note_hz * 10000 / second_note_hz) => interval_two_original_per_myriad
second_note_hz - first_note_hz => interval_one_original_difference_hz
third_note_hz - second_note_hz => interval_two_original_difference_hz

first_note_hz + shift_added_hz => first_note_shifted_hz
second_note_hz + shift_added_hz => second_note_shifted_hz
third_note_hz + shift_added_hz => third_note_shifted_hz
int(second_note_shifted_hz * 10000 / first_note_shifted_hz) => interval_one_shifted_per_myriad
int(third_note_shifted_hz * 10000 / second_note_shifted_hz) => interval_two_shifted_per_myriad
second_note_shifted_hz - first_note_shifted_hz => interval_one_shifted_difference_hz
interval_one_original_per_myriad - interval_one_shifted_per_myriad => interval_one_shrank_by_per_myriad

int(first_note_hz * transposition_numerator / transposition_denominator) => first_note_scaled_hz
int(second_note_hz * transposition_numerator / transposition_denominator) => second_note_scaled_hz
int(third_note_hz * transposition_numerator / transposition_denominator) => third_note_scaled_hz
int(second_note_scaled_hz * 10000 / first_note_scaled_hz) => interval_one_scaled_per_myriad
int(third_note_scaled_hz * 10000 / second_note_scaled_hz) => interval_two_scaled_per_myriad
second_note_scaled_hz - first_note_scaled_hz => interval_one_scaled_difference_hz

"melody                          : " + str(first_note_hz) + ", " + str(second_note_hz) + ", " + str(third_note_hz) + " Hz" ^0
"interval one                    : " + str(interval_one_original_per_myriad) + " per ten thousand, a fifth, " + str(interval_one_original_difference_hz) + " Hz apart" ^0
"interval two                    : " + str(interval_two_original_per_myriad) + " per ten thousand, a fourth, " + str(interval_two_original_difference_hz) + " Hz apart" ^0
"" ^0
"shifted by adding " + str(shift_added_hz) + " Hz      : " + str(first_note_shifted_hz) + ", " + str(second_note_shifted_hz) + ", " + str(third_note_shifted_hz) + " Hz" ^0
"interval one, shifted           : " + str(interval_one_shifted_per_myriad) + " per ten thousand, a fourth now, still " + str(interval_one_shifted_difference_hz) + " Hz apart" ^0
"interval two, shifted           : " + str(interval_two_shifted_per_myriad) + " per ten thousand, a third now" ^0
"interval one shrank by          : " + str(interval_one_shrank_by_per_myriad) + " per ten thousand" ^0
"" ^0
"scaled by " + str(transposition_numerator) + " over " + str(transposition_denominator) + "                 : " + str(first_note_scaled_hz) + ", " + str(second_note_scaled_hz) + ", " + str(third_note_scaled_hz) + " Hz" ^0
"interval one, scaled            : " + str(interval_one_scaled_per_myriad) + " per ten thousand, a fifth, now " + str(interval_one_scaled_difference_hz) + " Hz apart" ^0
"interval two, scaled            : " + str(interval_two_scaled_per_myriad) + " per ten thousand, a fourth" ^0
"" ^0

# ---- what the patch verified ----

"the same-amount reasoning" ^0
"  shift : exactly " + str(shift_added_hz) + " Hz, every note" ^0
"  melody : copied note for note" ^0
"  uniformity : no note treated differently" ^0
"  intent : the same melody, higher" ^0
"  facts wrong : 0" ^0
"  verdict : EVERY NOTE UP BY THE SAME AMOUNT IS THE SAME TUNE" ^0
"" ^0
"  moving every note by the same number is the part done" ^0
"  right here, and it is why every shifted note is exactly" ^0
"  " + str(shift_added_hz) + " Hz above its original" ^0
"" ^0

# ---- what the hertz do to the intervals ----

"ratios, not differences" ^0
"  what the ear hears between two notes : their ratio" ^0
"  " + str(first_note_hz) + " to " + str(second_note_hz) + " : 3 to 2, a fifth, " + str(interval_one_original_difference_hz) + " Hz apart" ^0
"  " + str(third_note_hz) + " to " + str(third_note_hz + shift_added_hz) + " : 5 to 4, a third, also " + str(interval_one_original_difference_hz) + " Hz apart" ^0
"  what adding " + str(shift_added_hz) + " Hz does : the same difference, a smaller ratio" ^0
"    at every step, so every interval shrinks and the high ones" ^0
"    shrink least" ^0
"  what multiplying by 3 over 2 does : every ratio kept, every" ^0
"    difference grown, and the tune recognised at once" ^0
"" ^0

# ---- what the patch got ----

"the transposition" ^0
"  believed : the same melody, higher" ^0
"  actual : a fourth where the fifth was and a third where the" ^0
"    fourth was, a different melody" ^0
"  is any note off by a hertz : no; every one is exactly " + str(shift_added_hz) + " up" ^0
"  is the melody the same : no; a melody is its ratios, and" ^0
"    " + str(shift_added_hz) + " Hz is a different ratio at every pitch" ^0
"" ^0

# ---- null control ----

# The same melody moved by a factor instead of by a number of hertz.
13333 => nc_interval_one_after_adding_hertz_per_myriad
15000 => nc_interval_one_after_multiplying_per_myriad
1667 => nc_ratio_the_multiplication_preserves_per_myriad

"null control - multiply, do not add" ^0
"  interval one, after adding hertz : " + str(nc_interval_one_after_adding_hertz_per_myriad) + " per ten thousand" ^0
"  interval one, after multiplying : " + str(nc_interval_one_after_multiplying_per_myriad) + " per ten thousand" ^0
"  ratio the multiplication preserves : " + str(nc_ratio_the_multiplication_preserves_per_myriad) + " per ten thousand" ^0
"  no note and no melody changed; the shift was made in the" ^0
"  quantity the ear measures" ^0
"" ^0

# ---- the rule ----

"what a uniform shift in hertz guarantees" ^0
"  every note is higher by the same number : exactly, " + str(shift_added_hz) + " Hz" ^0
"  every interval is unchanged : not addressed; an interval is a" ^0
"    ratio, and " + str(first_note_hz) + " to " + str(second_note_hz) + " is " + str(interval_one_original_per_myriad) + " per ten thousand while" ^0
"    " + str(first_note_shifted_hz) + " to " + str(second_note_shifted_hz) + " is " + str(interval_one_shifted_per_myriad) + ", a different interval" ^0
"    from the same " + str(interval_one_original_difference_hz) + " Hz" ^0
"" ^0

"pitch lives on a ladder whose rungs get farther apart as you climb; move" ^0
"every note up by the same number of hertz and the low notes climb whole rungs" ^0
"while the high notes barely move, and the tune folds" ^0
"" ^0

"Every note is exactly " + str(shift_added_hz) + " Hz higher - the shift was uniform. But the ear hears" ^0
"ratios: " + str(first_note_hz) + " to " + str(second_note_hz) + " is " + str(interval_one_original_per_myriad) + " per ten thousand and " + str(first_note_shifted_hz) + " to " + str(second_note_shifted_hz) + " is " + str(interval_one_shifted_per_myriad) + "," ^0
"a different interval from the same hertz, so the melody changed shape while" ^0
"multiplying by 3 over 2 keeps every ratio, until the shift is made as a factor." ^0
```

## Python (deterministic transpilation)

```python
first_note_hz = 200
second_note_hz = 300
third_note_hz = 400
shift_added_hz = 100
transposition_numerator = 3
transposition_denominator = 2
interval_one_original_per_myriad = int(second_note_hz * 10000 / first_note_hz)
interval_two_original_per_myriad = int(third_note_hz * 10000 / second_note_hz)
interval_one_original_difference_hz = second_note_hz - first_note_hz
interval_two_original_difference_hz = third_note_hz - second_note_hz
first_note_shifted_hz = first_note_hz + shift_added_hz
second_note_shifted_hz = second_note_hz + shift_added_hz
third_note_shifted_hz = third_note_hz + shift_added_hz
interval_one_shifted_per_myriad = int(second_note_shifted_hz * 10000 / first_note_shifted_hz)
interval_two_shifted_per_myriad = int(third_note_shifted_hz * 10000 / second_note_shifted_hz)
interval_one_shifted_difference_hz = second_note_shifted_hz - first_note_shifted_hz
interval_one_shrank_by_per_myriad = interval_one_original_per_myriad - interval_one_shifted_per_myriad
first_note_scaled_hz = int(first_note_hz * transposition_numerator / transposition_denominator)
second_note_scaled_hz = int(second_note_hz * transposition_numerator / transposition_denominator)
third_note_scaled_hz = int(third_note_hz * transposition_numerator / transposition_denominator)
interval_one_scaled_per_myriad = int(second_note_scaled_hz * 10000 / first_note_scaled_hz)
interval_two_scaled_per_myriad = int(third_note_scaled_hz * 10000 / second_note_scaled_hz)
interval_one_scaled_difference_hz = second_note_scaled_hz - first_note_scaled_hz
print("melody                          : " + str(first_note_hz) + ", " + str(second_note_hz) + ", " + str(third_note_hz) + " Hz")
print("interval one                    : " + str(interval_one_original_per_myriad) + " per ten thousand, a fifth, " + str(interval_one_original_difference_hz) + " Hz apart")
print("interval two                    : " + str(interval_two_original_per_myriad) + " per ten thousand, a fourth, " + str(interval_two_original_difference_hz) + " Hz apart")
print("")
print("shifted by adding " + str(shift_added_hz) + " Hz      : " + str(first_note_shifted_hz) + ", " + str(second_note_shifted_hz) + ", " + str(third_note_shifted_hz) + " Hz")
print("interval one, shifted           : " + str(interval_one_shifted_per_myriad) + " per ten thousand, a fourth now, still " + str(interval_one_shifted_difference_hz) + " Hz apart")
print("interval two, shifted           : " + str(interval_two_shifted_per_myriad) + " per ten thousand, a third now")
print("interval one shrank by          : " + str(interval_one_shrank_by_per_myriad) + " per ten thousand")
print("")
print("scaled by " + str(transposition_numerator) + " over " + str(transposition_denominator) + "                 : " + str(first_note_scaled_hz) + ", " + str(second_note_scaled_hz) + ", " + str(third_note_scaled_hz) + " Hz")
print("interval one, scaled            : " + str(interval_one_scaled_per_myriad) + " per ten thousand, a fifth, now " + str(interval_one_scaled_difference_hz) + " Hz apart")
print("interval two, scaled            : " + str(interval_two_scaled_per_myriad) + " per ten thousand, a fourth")
print("")
print("the same-amount reasoning")
print("  shift : exactly " + str(shift_added_hz) + " Hz, every note")
print("  melody : copied note for note")
print("  uniformity : no note treated differently")
print("  intent : the same melody, higher")
print("  facts wrong : 0")
print("  verdict : EVERY NOTE UP BY THE SAME AMOUNT IS THE SAME TUNE")
print("")
print("  moving every note by the same number is the part done")
print("  right here, and it is why every shifted note is exactly")
print("  " + str(shift_added_hz) + " Hz above its original")
print("")
print("ratios, not differences")
print("  what the ear hears between two notes : their ratio")
print("  " + str(first_note_hz) + " to " + str(second_note_hz) + " : 3 to 2, a fifth, " + str(interval_one_original_difference_hz) + " Hz apart")
print("  " + str(third_note_hz) + " to " + str(third_note_hz + shift_added_hz) + " : 5 to 4, a third, also " + str(interval_one_original_difference_hz) + " Hz apart")
print("  what adding " + str(shift_added_hz) + " Hz does : the same difference, a smaller ratio")
print("    at every step, so every interval shrinks and the high ones")
print("    shrink least")
print("  what multiplying by 3 over 2 does : every ratio kept, every")
print("    difference grown, and the tune recognised at once")
print("")
print("the transposition")
print("  believed : the same melody, higher")
print("  actual : a fourth where the fifth was and a third where the")
print("    fourth was, a different melody")
print("  is any note off by a hertz : no; every one is exactly " + str(shift_added_hz) + " up")
print("  is the melody the same : no; a melody is its ratios, and")
print("    " + str(shift_added_hz) + " Hz is a different ratio at every pitch")
print("")
nc_interval_one_after_adding_hertz_per_myriad = 13333
nc_interval_one_after_multiplying_per_myriad = 15000
nc_ratio_the_multiplication_preserves_per_myriad = 1667
print("null control - multiply, do not add")
print("  interval one, after adding hertz : " + str(nc_interval_one_after_adding_hertz_per_myriad) + " per ten thousand")
print("  interval one, after multiplying : " + str(nc_interval_one_after_multiplying_per_myriad) + " per ten thousand")
print("  ratio the multiplication preserves : " + str(nc_ratio_the_multiplication_preserves_per_myriad) + " per ten thousand")
print("  no note and no melody changed; the shift was made in the")
print("  quantity the ear measures")
print("")
print("what a uniform shift in hertz guarantees")
print("  every note is higher by the same number : exactly, " + str(shift_added_hz) + " Hz")
print("  every interval is unchanged : not addressed; an interval is a")
print("    ratio, and " + str(first_note_hz) + " to " + str(second_note_hz) + " is " + str(interval_one_original_per_myriad) + " per ten thousand while")
print("    " + str(first_note_shifted_hz) + " to " + str(second_note_shifted_hz) + " is " + str(interval_one_shifted_per_myriad) + ", a different interval")
print("    from the same " + str(interval_one_original_difference_hz) + " Hz")
print("")
print("pitch lives on a ladder whose rungs get farther apart as you climb; move")
print("every note up by the same number of hertz and the low notes climb whole rungs")
print("while the high notes barely move, and the tune folds")
print("")
print("Every note is exactly " + str(shift_added_hz) + " Hz higher - the shift was uniform. But the ear hears")
print("ratios: " + str(first_note_hz) + " to " + str(second_note_hz) + " is " + str(interval_one_original_per_myriad) + " per ten thousand and " + str(first_note_shifted_hz) + " to " + str(second_note_shifted_hz) + " is " + str(interval_one_shifted_per_myriad) + ",")
print("a different interval from the same hertz, so the melody changed shape while")
print("multiplying by 3 over 2 keeps every ratio, until the shift is made as a factor.")
```

## stdout (executed)

```text
melody                          : 200, 300, 400 Hz
interval one                    : 15000 per ten thousand, a fifth, 100 Hz apart
interval two                    : 13333 per ten thousand, a fourth, 100 Hz apart

shifted by adding 100 Hz      : 300, 400, 500 Hz
interval one, shifted           : 13333 per ten thousand, a fourth now, still 100 Hz apart
interval two, shifted           : 12500 per ten thousand, a third now
interval one shrank by          : 1667 per ten thousand

scaled by 3 over 2                 : 300, 450, 600 Hz
interval one, scaled            : 15000 per ten thousand, a fifth, now 150 Hz apart
interval two, scaled            : 13333 per ten thousand, a fourth

the same-amount reasoning
  shift : exactly 100 Hz, every note
  melody : copied note for note
  uniformity : no note treated differently
  intent : the same melody, higher
  facts wrong : 0
  verdict : EVERY NOTE UP BY THE SAME AMOUNT IS THE SAME TUNE

  moving every note by the same number is the part done
  right here, and it is why every shifted note is exactly
  100 Hz above its original

ratios, not differences
  what the ear hears between two notes : their ratio
  200 to 300 : 3 to 2, a fifth, 100 Hz apart
  400 to 500 : 5 to 4, a third, also 100 Hz apart
  what adding 100 Hz does : the same difference, a smaller ratio
    at every step, so every interval shrinks and the high ones
    shrink least
  what multiplying by 3 over 2 does : every ratio kept, every
    difference grown, and the tune recognised at once

the transposition
  believed : the same melody, higher
  actual : a fourth where the fifth was and a third where the
    fourth was, a different melody
  is any note off by a hertz : no; every one is exactly 100 up
  is the melody the same : no; a melody is its ratios, and
    100 Hz is a different ratio at every pitch

null control - multiply, do not add
  interval one, after adding hertz : 13333 per ten thousand
  interval one, after multiplying : 15000 per ten thousand
  ratio the multiplication preserves : 1667 per ten thousand
  no note and no melody changed; the shift was made in the
  quantity the ear measures

what a uniform shift in hertz guarantees
  every note is higher by the same number : exactly, 100 Hz
  every interval is unchanged : not addressed; an interval is a
    ratio, and 200 to 300 is 15000 per ten thousand while
    300 to 400 is 13333, a different interval
    from the same 100 Hz

pitch lives on a ladder whose rungs get farther apart as you climb; move
every note up by the same number of hertz and the low notes climb whole rungs
while the high notes barely move, and the tune folds

Every note is exactly 100 Hz higher - the shift was uniform. But the ear hears
ratios: 200 to 300 is 15000 per ten thousand and 300 to 400 is 13333,
a different interval from the same hertz, so the melody changed shape while
multiplying by 3 over 2 keeps every ratio, until the shift is made as a factor.
```

## Round-trip

`ok: true` — round-trip fixpoint reached (python1 == python2)

## Trace event types

eml:run:start · eml:assign · eml:output · eml:run:done
