Skip to content

Commit faeeb8c

Browse files
committed
Update MIDIUSB_oneKey_improviser.ino
1 parent 00424cf commit faeeb8c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MIDI_examples/MIDIUSB_oneKey_improviser/MIDIUSB_oneKey_improviser.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Randomizes the note within a scale each time
66
77
Uses MIDIUSB for MIDI, so will work on any
8-
32U4-based board (e.g. Uno, Leonardo, Micro, Yún)
8+
32U4- or SAMD-based board (e.g. Nano 33 IoT, MKR Leonardo, Micro, Yún)
99
1010
Circuit:
1111
pushbutton attached to +Vcc from pin 5.
@@ -16,7 +16,7 @@
1616
*/
1717
#include <MIDIUSB.h>
1818
#include <pitchToNote.h>
19-
const int buttonPin = 4;
19+
const int buttonPin = 5;
2020

2121
// the intervals in a major and natural minor scale:
2222
int major[] = {2, 2, 1, 2, 2, 2, 1};
@@ -25,7 +25,7 @@ int naturalMinor[] = {2, 1, 2, 2, 1, 2, 2};
2525
int scale[8];
2626

2727
// start with middle C:
28-
int tonic = pitchC4;
28+
int tonic = pitchC3;
2929
// note to play:
3030
int noteValue = tonic;
3131

@@ -42,7 +42,7 @@ void setup() {
4242
// in the scale. You can change major to naturalMinor
4343
// if you want that kind of scale instead:
4444
for (int n = 0; n < 7; n++) {
45-
note = note + naturalMinor[n];
45+
note = note + major[n];
4646
scale[n + 1] = note;
4747
}
4848
}

0 commit comments

Comments
 (0)