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.
.text: 35 B (10 x86_64 insns)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
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #9 | st_golf_borg_swift_midi_harmonic_step_u64 domain: borg-midi | id: bd13172809fa6eb79e8851e0f3016c50 | 640971/200000 cyc/op | 173913/200000 ns/op | 200000000/173913 ops/us | 35 B .text (10 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #573 | borg_swift_midi_harmonic_step (THIS CAPSULE) domain: audio | id: f921538ddfda93677fe8c5fbd850ecb9 | 4459491/400000 cyc/op | 1486497/400000 ns/op | 400000000/1486497 ops/us | 35 B .text (10 insns) | + (1) | aye-a6000-prime @ 432Hz |