]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
re-enable audio and extrakeys
authorJack Humbert <jack.humb@gmail.com>
Mon, 12 Dec 2016 20:39:07 +0000 (15:39 -0500)
committerJack Humbert <jack.humb@gmail.com>
Mon, 12 Dec 2016 20:39:07 +0000 (15:39 -0500)
keyboards/planck/keymaps/default/Makefile
keyboards/preonic/rules.mk
quantum/audio/voices.c
quantum/audio/voices.h

index 267a087ea92dfd521fa18a927c46c40842d85968..17487ebbfc8fd64692d15608eb6021d57417b054 100644 (file)
@@ -10,7 +10,7 @@ EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
 CONSOLE_ENABLE = no         # Console for debug(+400)
 COMMAND_ENABLE = no        # Commands for debug and configuration
 NKRO_ENABLE = yes            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality
+BACKLIGHT_ENABLE = no      # Enable keyboard backlight functionality
 MIDI_ENABLE = yes            # MIDI controls
 AUDIO_ENABLE = yes           # Audio output on port C6
 UNICODE_ENABLE = no         # Unicode
index c4ce2aacca8447eb70fddda6755429d1a7d4167f..071bfdc7fe7f18bba9793b26f14d599234d246df 100644 (file)
@@ -56,11 +56,11 @@ BOOTMAGIC_ENABLE ?= no       # Virtual DIP switch configuration(+1000)
 MOUSEKEY_ENABLE ?= no       # Mouse keys(+4700)
 EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
 CONSOLE_ENABLE ?= no         # Console for debug(+400)
-COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+COMMAND_ENABLE ?= no        # Commands for debug and configuration
 NKRO_ENABLE ?= no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
 BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
-MIDI_ENABLE ?= no            # MIDI controls
-AUDIO_ENABLE ?= no           # Audio output on port C6
+MIDI_ENABLE ?= yes            # MIDI controls
+AUDIO_ENABLE ?= yes           # Audio output on port C6
 UNICODE_ENABLE ?= no         # Unicode
 BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
 RGBLIGHT_ENABLE ?= no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
index 6d4172a06c2dedd3def472ea500ec233f69eb4a8..19f7b646ef8eb2a71304e4bb9a5b612283da27c5 100644 (file)
@@ -18,7 +18,7 @@ void voice_iterate() {
 }
 
 void voice_deiterate() {
-    voice = (voice - 1) % number_of_voices;
+    voice = (voice - 1 + number_of_voices) % number_of_voices;
 }
 
 float voice_envelope(float frequency) {
@@ -31,6 +31,27 @@ float voice_envelope(float frequency) {
             polyphony_rate = 0;
                break;
 
+        case something:
+            polyphony_rate = 0;
+            switch (compensated_index) {
+                case 0 ... 9:
+                    note_timbre = TIMBRE_12;
+                    break;
+
+                case 10 ... 19:
+                    note_timbre = TIMBRE_25;
+                    break;
+
+                case 20 ... 200:
+                    note_timbre = .25 + .125 + pow(((float)compensated_index - 20) / (200 - 20), 2)*.125;
+                    break;
+
+                default:
+                    note_timbre = .25;
+                    break;
+            }
+            break;
+
         case butts_fader:
             polyphony_rate = 0;
             switch (compensated_index) {
index b2495b23b57b796c927f180936ba8c86101fddd3..b43def3d7d03c30f0912e2f71ecfd289d03d1f75 100644 (file)
@@ -11,6 +11,7 @@ float voice_envelope(float frequency);
 
 typedef enum {
     default_voice,
+    something,
     butts_fader,
     octave_crunch,
     duty_osc,