Skip to content

Play scales, chords and chord progressions #27

@davidfloegel

Description

@davidfloegel

Hi,

Great library :)

Is there any way at all to play sequences like a scale or chords (simultaneously) or even chord progressions or do I have to schedule them myself?

Currently I do it like this:

    piano.load().then(() => {
      const notes = ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4', 'C5'];
      notes.forEach((note, i) => {
        piano
          .keyDown({ note, time: `+${i}` })
          .keyUp({ note, time: `+${i + 1}` });
      });
    });

Which I imagine could become flakey especially with longer progressions and lots of notes in chords.

Let me know what you think :)

Thanks!
David

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions