Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

83 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 "effect_multiply.h"
  56. #include "filter_biquad.h"
  57. #include "filter_fir.h"
  58. #include "input_adc.h"
  59. #include "input_i2s.h"
  60. #include "mixer.h"
  61. #include "output_dac.h"
  62. #include "output_i2s.h"
  63. #include "output_pwm.h"
  64. #include "play_memory.h"
  65. #include "play_queue.h"
  66. #include "play_sd_raw.h"
  67. #include "play_sd_wav.h"
  68. #include "synth_tonesweep.h"
  69. #include "synth_sine.h"
  70. #include "synth_waveform.h"
  71. #include "multiplier.h"
  72. // TODO: more audio processing objects....
  73. // sine wave with frequency modulation (phase)
  74. // waveforms with bandwidth limited tables for synth
  75. // envelope: attack-decay-sustain-release, maybe other more complex?
  76. #endif