OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
main.c File Reference

Hardware vibrato — one voice's output modulates another's pitch. More...

#include <snes.h>
#include <snes/apu.h>

Macros

#define SPC_BASE   0x0200

Functions

int main (void)

Variables

u8 spc_image []
u8 spc_image_end []

Detailed Description

Hardware vibrato — one voice's output modulates another's pitch.

Port of krom (Peter Lemon)'s PitchMod demo (PeterLemon/SNES, SPC700/PitchMod). The S-DSP's PMON feature multiplies a voice's pitch by the OUTPUT of the previous voice. Voice 1 holds a cello note at C5; voice 0 plays a tiny looping square wave at pitch $0003 — inaudibly slow, it is a hardware LFO. One second in, the LFO keys on and the cello starts to sing with vibrato: no CPU, no tables, the DSP does the modulation every sample.

ROM mode: LoROM (project default).

SNES Concepts
  • Pitch modulation (PMON): voice N-1's output scales voice N's pitch
  • A silent voice as a hardware LFO (GAIN = depth, PITCH = rate)
  • Long FIR echo (EDL 15) as a concert hall
  • The apu module upload path (apuWaitBoot/apuUpload/apuExecute)
What to Observe
The cello enters dry; after ~1 s the vibrato blooms. The note rings out like a bow stroke (the sample's own ADSR: instant attack, gentle ~7 s fade) and is re-bowed every 7 s, forever. Validation oracle: luna –audio-out.
Modules Used
console, apu
See also
https://github.com/PeterLemon/SNES — original demo
player.spc700.asm — voices, PMON routing, echo

Macro Definition Documentation

◆ SPC_BASE

#define SPC_BASE   0x0200

Function Documentation

◆ main()

int main ( void )

Variable Documentation

◆ spc_image

u8 spc_image[]
extern

◆ spc_image_end

u8 spc_image_end[]