Skip to content

Commit

Permalink
added a new menuentry for dsharp tuning and support for 5 string basses
Browse files Browse the repository at this point in the history
  • Loading branch information
madex committed Jun 29, 2008
1 parent 9b75399 commit 7eb7fdb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion microcontroller/src-atmel/playground/stimmmopped/Makefile
@@ -1,6 +1,6 @@
DEFS = -DF_CPU=8000000
OBJ = main.o
MCU_TARGET = atmega48
MCU_TARGET = atmega88

include ../../make/avr.mk

Binary file not shown.
Binary file not shown.
21 changes: 17 additions & 4 deletions microcontroller/src-atmel/playground/stimmmopped/main.c
Expand Up @@ -38,7 +38,7 @@ unsigned char timer1_corrcet = 0;
unsigned short timer1_max;

unsigned char taste1_ent, taste2_ent, taste1_sf, taste2_sf; // ff flase
#define TIME_DEBOUNCE 8 // 80 ms
#define TIME_DEBOUNCE 3 // 80 ms
#define TIME_NOTE 150
#define TIME_OCTAVE 70

Expand Down Expand Up @@ -269,6 +269,7 @@ typedef enum {

typedef enum {
MR_BASS,
MR_BASS_DSHARP,
MR_GUITAR,
MR_CUSTOM
} menu_root_t;
Expand Down Expand Up @@ -318,9 +319,14 @@ void showCurrentNote() {

// 0 markiert das ende
unsigned char midi_notes_bass[] = {
26, 28, 33, 38, 43, 0
23, 26, 28, 33, 38, 43, 0
};

unsigned char midi_notes_bass_dsharp[] = {
22, 27, 32, 37, 42, 0
};


unsigned char midi_notes_guitar[] = {
38, 40, 45, 50, 55, 59, 64, 0
};
Expand All @@ -347,16 +353,23 @@ void stateMachineMenu() {
setDisplay(TONE_B);
note_ptr = midi_notes_bass;
if (taste1_sf)
menu_root = MR_GUITAR;
menu_root = MR_BASS_DSHARP;
break;

case MR_BASS_DSHARP: // Bass D-Sharp
setDisplay(TONE_D_SHARP);
note_ptr = midi_notes_bass_dsharp;
if (taste1_sf)
menu_root = MR_GUITAR;
break;

case MR_GUITAR: // Guitar
setDisplay(TONE_G);
note_ptr = midi_notes_guitar;
if (taste1_sf)
menu_root = MR_CUSTOM;
break;

case MR_CUSTOM: // Custom
setDisplay(TONE_C);
note_ptr = midi_notes_custom;
Expand Down

0 comments on commit 7eb7fdb

Please sign in to comment.