You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.2KB

  1. /* Audio Library for Teensy 3.X
  2. * Copyright (c) 2014, Paul Stoffregen, paul@pjrc.com
  3. *
  4. * Development of this audio library was funded by PJRC.COM, LLC by sales of
  5. * Teensy and Audio Adaptor boards. Please support PJRC's efforts to develop
  6. * open source software by purchasing Teensy or other PJRC products.
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documentation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice, development funding notice, and this permission
  16. * notice shall be included in all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. */
  26. #ifndef Audio_h_
  27. #define Audio_h_
  28. // When changing multiple audio object settings that must update at
  29. // the same time, these functions allow the audio library interrupt
  30. // to be disabled. For example, you may wish to begin playing a note
  31. // in response to reading an analog sensor. If you have "velocity"
  32. // information, you might start the sample playing and also adjust
  33. // the gain of a mixer channel. Use AudioNoInterrupts() first, then
  34. // make both changes to the 2 separate objects. Then allow the audio
  35. // library to update with AudioInterrupts(). Both changes will happen
  36. // at the same time, because AudioNoInterrupts() prevents any updates
  37. // while you make changes.
  38. //
  39. #define AudioNoInterrupts() (NVIC_DISABLE_IRQ(IRQ_SOFTWARE))
  40. #define AudioInterrupts() (NVIC_ENABLE_IRQ(IRQ_SOFTWARE))
  41. // include all the library headers, so a sketch can use a single
  42. // #include <Audio.h> to get the whole library
  43. //
  44. #include "analyze_fft256.h"
  45. #include "analyze_fft1024.h"
  46. #include "analyze_print.h"
  47. #include "analyze_tonedetect.h"
  48. #include "analyze_peakdetect.h"
  49. #include "control_sgtl5000.h"
  50. #include "control_wm8731.h"
  51. #include "effect_chorus.h"
  52. #include "effect_fade.h"
  53. #include "effect_flange.h"
  54. #include "effect_envelope.h"
  55. #include "filter_biquad.h"
  56. #include "filter_fir.h"
  57. #include "input_adc.h"
  58. #include "input_i2s.h"
  59. #include "mixer.h"
  60. #include "output_dac.h"
  61. #include "output_i2s.h"
  62. #include "output_pwm.h"
  63. #include "play_memory.h"
  64. #include "play_queue.h"
  65. #include "play_sd_raw.h"
  66. #include "play_sd_wav.h"
  67. #include "synth_tonesweep.h"
  68. #include "synth_sine.h"
  69. #include "synth_waveform.h"
  70. #include "multiplier.h"
  71. // TODO: more audio processing objects....
  72. // sine wave with frequency modulation (phase)
  73. // waveforms with bandwidth limited tables for synth
  74. // envelope: attack-decay-sustain-release, maybe other more complex?
  75. #endif