voices.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #if defined(__AVR__)
  19. #include <avr/io.h>
  20. #endif
  21. #include "wait.h"
  22. #include "luts.h"
  23. #ifndef VOICES_H
  24. #define VOICES_H
  25. float voice_envelope(float frequency);
  26. typedef enum {
  27. default_voice,
  28. #ifdef AUDIO_VOICES
  29. something,
  30. drums,
  31. butts_fader,
  32. octave_crunch,
  33. duty_osc,
  34. duty_octave_down,
  35. delayed_vibrato,
  36. // delayed_vibrato_octave,
  37. // duty_fifth_down,
  38. // duty_fourth_down,
  39. // duty_third_down,
  40. // duty_fifth_third_down,
  41. #endif
  42. number_of_voices // important that this is last
  43. } voice_type;
  44. void set_voice(voice_type v);
  45. void voice_iterate(void);
  46. void voice_deiterate(void);
  47. #endif