voices.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Copyright 2016 Jack Humbert
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include <stdint.h>
  17. #include <stdbool.h>
  18. #include <avr/io.h>
  19. #include <util/delay.h>
  20. #include "luts.h"
  21. #ifndef VOICES_H
  22. #define VOICES_H
  23. float voice_envelope(float frequency);
  24. typedef enum {
  25. default_voice,
  26. #ifdef AUDIO_VOICES
  27. something,
  28. drums,
  29. butts_fader,
  30. octave_crunch,
  31. duty_osc,
  32. duty_octave_down,
  33. delayed_vibrato,
  34. // delayed_vibrato_octave,
  35. // duty_fifth_down,
  36. // duty_fourth_down,
  37. // duty_third_down,
  38. // duty_fifth_third_down,
  39. #endif
  40. number_of_voices // important that this is last
  41. } voice_type;
  42. void set_voice(voice_type v);
  43. void voice_iterate(void);
  44. void voice_deiterate(void);
  45. #endif