Best Use & Engineering Application Guide

Engineering Category: Fixed-Point Audio, Speech & DSP

Best Use in Production: Integer-only digital signal filtering, harmonic resonator stepping, and prosody envelope generation with zero IEEE-754 drift.

When to Select This Capsule: Verified baseline member of a 2-capsule Equivalence Class; useful as a reference or cross-validation peer. Low-latency L1-resident kernel (4459491/400000 cyc/op); well-suited for high-frequency pipeline stages.

Snap-Circuit Wiring Role: 1-to-1 Unary Transform Stage `(u64)->u64` — snaps directly into linear pipelines or fan-out DAG branches.

Hardware _rdtsc: 4459491/400000 cycles/op
Latency: 1486497/400000 ns/op
Throughput: 400000000/1486497 ops/us
Compiled ELF64 .text: 35 B (10 x86_64 insns)
C64 64KB RAM Budget: 13/4096 (208 B source)
Ternary Vote: + (score 1) | Salience: 535/6
Pure-Rust Capsule Source Code (208 B)
pub fn borg_swift_midi_harmonic_step(note: u64) -> u64 {
    let pitch = (note & 0x7F).wrapping_mul(432);
    let vel = ((note >> 8) & 0x7F).wrapping_mul(528);
    (pitch.wrapping_add(vel) ^ 0x1B0) & 0xFFFF
}
rustc -C opt-level=3 x86_64 Disassembly (35 B .text / 10 insns)
borg_swift_midi_harmonic_step:
    mov    eax, edi
    and    eax, 127
    imul    eax, eax, 432
    shr    edi, 8
    and    edi, 127
    imul    ecx, edi, 528
    add    ecx, eax
    movzx    eax, cx
    xor    rax, 432
    ret

Head-to-Head Functional Equivalence Class Peers (2 Implementation(s) Matching 64 Test Vectors)

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#9st_golf_borg_swift_midi_harmonic_step_u64
domain: borg-midi | id: bd13172809fa6eb79e8851e0f3016c50
640971/200000 cyc/op173913/200000 ns/op200000000/173913 ops/us35 B .text (10 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#573borg_swift_midi_harmonic_step (THIS CAPSULE)
domain: audio | id: f921538ddfda93677fe8c5fbd850ecb9
4459491/400000 cyc/op1486497/400000 ns/op400000000/1486497 ops/us35 B .text (10 insns)+ (1)aye-a6000-prime @ 432Hz