react-synth
Components

Chord

Plays multiple notes

<Chord>

Plays multiple notes simultaneously. Supports chord name notation (powered by Tonal) or explicit note arrays.

PropTypeDefaultDescription
notesstring or (string|number)[]Required. Chord name or array of notes
ampnumber0.3Amplitude/volume 0-1
attacknumber0Attack time in beats
attack_levelnumber1Peak level at end of attack
decaynumber0Decay time in beats
decay_levelnumbersustain_levelLevel at end of decay
sustainnumber0Sustain time in beats
sustain_levelnumber1Sustained level
releasenumber1Release time in beats
oscillatorOscillatorTypeOverride synth oscillator type
filterPartial<FilterConfig>Override filter settings (see config)
voicesPartial<VoiceConfig>Override voice settings (see config)

Chord Name Format

  • Basic: "C", "Am", "F#m", "Bb"
  • Extended: "Cmaj7", "Dm7", "G7", "Am9"
  • With octave: "Cmaj7:4" (plays in octave 4, default is octave 3)
  • Slash chords: "Dm7/F", "C/E"
{
  /* Chord name */
}
<Chord notes="Am7" />;

{
  /* Chord in specific octave */
}
<Chord notes="Cmaj7:4" />;

{
  /* Note array */
}
<Chord notes={["C4", "E4", "G4"]} />;

{
  /* Frequency array */
}
<Chord notes={[261.63, 329.63, 392.0]} />;

{
  /* With envelope for pad sound */
}
<Chord notes="Em7" amp={0.4} attack={0.5} sustain={2} release={1} />;

On this page