-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathI-IV-V-I.ino
30 lines (26 loc) · 1.04 KB
/
I-IV-V-I.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// "Sequencer/Basic/I-IV-V-I" - Plays the popular chord progression I-IV-V-I
//
// This sketch shows how it's easy to program a chord progression with `midier::Sequencer`
//
// Setup needed to run the examples: https://github.com/razrotenberg/Midier#setup
// No additional setup is required for this sketch
//
#include <Midier.h>
void setup()
{
// if you are connecting using USB, set the baud rate that is configured in the serial-to-MIDI software
// if you are connecting using a physical MIDI connector and cable, set it to 31250
// if you're not sure what this is, or which baud rate to use: https://github.com/razrotenberg/Midier#baud-rate
Serial.begin(9600);
}
void loop()
{
// create a container for one layer as only a single layer will be played at a time
midier::Layers<1> layers;
// create a sequencer from the layers container
midier::Sequencer sequencer(layers);
sequencer.play(1, { .bars = 1 });
sequencer.play(4, { .bars = 1 });
sequencer.play(5, { .bars = 1 });
sequencer.play(1, { .bars = 1 });
}