From 53e1ff856943f54be140e566616b17c4192f2288 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Mar 2019 23:01:13 -0500 Subject: [PATCH] M0 and M1 --- M0_Simple_Synth_01/README.md | 34 ++++++++++++++++++++++ M0_Simple_Synth_02/M0_Simple_Synth_02.ino | 13 ++------- M0_Simple_Synth_02/README.md | 5 ++++ M0_Simple_Synth_03/README.md | 2 ++ README.md | Bin 2894 -> 5038 bytes 5 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 M0_Simple_Synth_01/README.md create mode 100644 M0_Simple_Synth_02/README.md create mode 100644 M0_Simple_Synth_03/README.md diff --git a/M0_Simple_Synth_01/README.md b/M0_Simple_Synth_01/README.md new file mode 100644 index 0000000..6b94145 --- /dev/null +++ b/M0_Simple_Synth_01/README.md @@ -0,0 +1,34 @@ +# M0_Simple_Synth_01 + +Verify that you are getting Midi messages from a Midi controller. + +You will need to have the Trinket Library installed. + +https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino/arduino-ide-setup + +Perhaps run a few of the initial sketches there as well. There should be one that makes the on board LED (DOT) blink. + +You will need to have the Dot Star library installed into you IDE and we are using the +MIDIUSB.h Library. + +https://github.com/arduino-libraries/MIDIUSB +http://blog.stekgreif.com/?p=699 +https://tigoe.github.io/SoundExamples/midiusb.html + +## Setup + +You will need some software to actually connect to the Trinket. In my case, I am using a Ableton Lite. Both the Controller ( Arturia Beat STep ) and the trinket are connected to my PC (Windows) via USB. + +Ableton is set up so that it recieves ( and broadcasts ) the midi. Because of this, I can tell if the messages are being sent from the controller. + +The code has three basic handlers + +- Note On - Detect a note +- Note Off - Detect a note release +- Control Change - a knob was turned + +All it does is capture the message and log it. + +Note that the Logging is a little different. IF you are adapting this for Arduino ( DUE or something legit ) you may need to change the serial code. + + diff --git a/M0_Simple_Synth_02/M0_Simple_Synth_02.ino b/M0_Simple_Synth_02/M0_Simple_Synth_02.ino index 0ab8bb6..807473f 100644 --- a/M0_Simple_Synth_02/M0_Simple_Synth_02.ino +++ b/M0_Simple_Synth_02/M0_Simple_Synth_02.ino @@ -8,9 +8,6 @@ // // distinguish between 3 notes C3, D3, E3 for Red, Green Blue and track intensity - - - // Setup Onboard Dot #define NUMPIXELS 1 // Number of LEDs in strip @@ -46,7 +43,6 @@ void setup() { void setColor(byte note){ - if (note == C3){ red = 0xFF; } @@ -58,13 +54,10 @@ void setColor(byte note){ } strip.setPixelColor(0, red, green, blue); //set the pixel colors - //strip.setPixelColor(0, 0x9F0000); // red - strip.show(); + strip.show(); } void clearColor(byte note){ - - if (note == C3){ red = 0x0; @@ -77,8 +70,7 @@ void clearColor(byte note){ } strip.setPixelColor(0, red, green, blue); //set the pixel colors - //strip.setPixelColor(0, 0x9F0000); // red - strip.show(); + strip.show(); } // 0x9 @@ -110,7 +102,6 @@ void controlChange(byte channel, byte control, byte value) { void loop() { - initSequence(); // Blinky intro while (true) { diff --git a/M0_Simple_Synth_02/README.md b/M0_Simple_Synth_02/README.md new file mode 100644 index 0000000..480a425 --- /dev/null +++ b/M0_Simple_Synth_02/README.md @@ -0,0 +1,5 @@ +# M0_Simple_Synth_02 + +Check the values of the midi notes and turn on/off lights based on the value of the note. + +Also save of the value of the CC messages and use that to set the intensity of the light. diff --git a/M0_Simple_Synth_03/README.md b/M0_Simple_Synth_03/README.md new file mode 100644 index 0000000..def67ba --- /dev/null +++ b/M0_Simple_Synth_03/README.md @@ -0,0 +1,2 @@ +# M0_Simple_Synth_03 + diff --git a/README.md b/README.md index 654df793d0d1c2cad79f6757652aec8754bc22b5..4b93ac0ab1a54134c6884ac6ac9ffb7dacef8da8 100644 GIT binary patch literal 5038 zcmc(jUr!rX5XJ9vrGAHvcnMLB2@h2psfs|LKm|=ysQQ4aXl)F2F}BN^IP}A}J->Sx z-(7=B`&3!RyL<1QKWApn%<|Wt8>vc*beqO$ny%AG*C%N^ou+%;FVe4C?diL#@Aqkz z?zD5NUH7`@#6r)i^n?D6Q={i!rZ4jMAbn1A-6Qu#zwB%}XV6k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