drum

Dependencies:   mbed drum

Committer:
38
Date:
Sat Nov 28 15:27:46 2020 +0000
Revision:
0:cd5fcde85881
drum;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
38 0:cd5fcde85881 1 #include "neopixel.h"
38 0:cd5fcde85881 2 #include "note.h"
38 0:cd5fcde85881 3
38 0:cd5fcde85881 4 NeoPixelOut npx(PA_0,48);
38 0:cd5fcde85881 5
38 0:cd5fcde85881 6
38 0:cd5fcde85881 7 bool tape_led[8] = {0,0,0,0,0,0,0,0};
38 0:cd5fcde85881 8
38 0:cd5fcde85881 9 void light_drum_2(){
38 0:cd5fcde85881 10 for(int i = 0;i < 4;i++){
38 0:cd5fcde85881 11 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 12 //npx.normalize = false;
38 0:cd5fcde85881 13 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 14 }
38 0:cd5fcde85881 15 }
38 0:cd5fcde85881 16
38 0:cd5fcde85881 17 void light_drum_2_1(){
38 0:cd5fcde85881 18 for(int i = 0;i < 4;i++){
38 0:cd5fcde85881 19 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 20 //npx.normalize = false;
38 0:cd5fcde85881 21 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 22 }
38 0:cd5fcde85881 23 }
38 0:cd5fcde85881 24
38 0:cd5fcde85881 25 void light_drum_3(){
38 0:cd5fcde85881 26 for(int i = 4;i < 8;i++){
38 0:cd5fcde85881 27 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 28 //npx.normalize = false;
38 0:cd5fcde85881 29 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 30 }
38 0:cd5fcde85881 31 }
38 0:cd5fcde85881 32
38 0:cd5fcde85881 33 void light_drum_4(){
38 0:cd5fcde85881 34 for(int i = 8;i < 12;i++){
38 0:cd5fcde85881 35 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 36 //npx.normalize = false;
38 0:cd5fcde85881 37 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 38 }
38 0:cd5fcde85881 39 }
38 0:cd5fcde85881 40
38 0:cd5fcde85881 41 void light_drum_5(){
38 0:cd5fcde85881 42 for(int i = 16;i < 20;i++){
38 0:cd5fcde85881 43 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 44 //npx.normalize = false;
38 0:cd5fcde85881 45 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 46 }
38 0:cd5fcde85881 47 }
38 0:cd5fcde85881 48
38 0:cd5fcde85881 49 void light_drum_5_1(){
38 0:cd5fcde85881 50 for(int i = 16;i < 20;i++){
38 0:cd5fcde85881 51 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 52 //npx.normalize = false;
38 0:cd5fcde85881 53 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 54 }
38 0:cd5fcde85881 55 }
38 0:cd5fcde85881 56
38 0:cd5fcde85881 57 void light_cymbal_1(){
38 0:cd5fcde85881 58 for(int i = 20;i < 24;i++){
38 0:cd5fcde85881 59 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 60 //npx.normalize = false;
38 0:cd5fcde85881 61 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 62 }
38 0:cd5fcde85881 63 }
38 0:cd5fcde85881 64
38 0:cd5fcde85881 65 void light_cymbal_1_1(){
38 0:cd5fcde85881 66 for(int i = 20;i < 24;i++){
38 0:cd5fcde85881 67 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 68 //npx.normalize = false;
38 0:cd5fcde85881 69 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 70 }
38 0:cd5fcde85881 71 }
38 0:cd5fcde85881 72
38 0:cd5fcde85881 73 void light_cymbal_2(){
38 0:cd5fcde85881 74 for(int i = 24;i < 28;i++){
38 0:cd5fcde85881 75 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 76 //npx.normalize = false;
38 0:cd5fcde85881 77 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 78 }
38 0:cd5fcde85881 79 }
38 0:cd5fcde85881 80
38 0:cd5fcde85881 81 void light_cymbal_3(){
38 0:cd5fcde85881 82 for(int i = 28;i < 32;i++){
38 0:cd5fcde85881 83 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 84 //npx.normalize = false;
38 0:cd5fcde85881 85 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 86 }
38 0:cd5fcde85881 87 }
38 0:cd5fcde85881 88
38 0:cd5fcde85881 89 void light_cymbal_4(){
38 0:cd5fcde85881 90 for(int i = 32;i < 36;i++){
38 0:cd5fcde85881 91 //npx.global_scale = 1.0f;
38 0:cd5fcde85881 92 //npx.normalize = false;
38 0:cd5fcde85881 93 npx.setPixelColor(i,0x0000ff);
38 0:cd5fcde85881 94 }
38 0:cd5fcde85881 95 }
38 0:cd5fcde85881 96
38 0:cd5fcde85881 97 //どこから1と数えるのか要相談