Ver código fonte

Rearrange Examples

dds
PaulStoffregen 10 anos atrás
pai
commit
98ee40d596
54 arquivos alterados com 22 adições e 54 exclusões
  1. +4
    -0
      Audio.h
  2. +1
    -0
      examples/Analysis/DialTone_7segment/DialTone_7segment.ino
  3. +2
    -1
      examples/Analysis/DialTone_Serial/DialTone_Serial.ino
  4. +1
    -0
      examples/Analysis/FFT/FFT.ino
  5. +1
    -0
      examples/Analysis/MonoPeakMeterAnalog/MonoPeakMeterAnalog.ino
  6. +1
    -0
      examples/Analysis/SpectrumAnalyzer/SpectrumAnalyzer.ino
  7. +1
    -0
      examples/Analysis/StereoPeakMeter/StereoPeakMeter.ino
  8. +1
    -0
      examples/Effects/CalcBiquadToneControl/CalcBiquadToneControl.ino
  9. +1
    -3
      examples/Effects/Chorus/Chorus.ino
  10. +0
    -0
      examples/Effects/Chorus/effects_info.h
  11. +1
    -0
      examples/Effects/Filter/Filter.ino
  12. +1
    -3
      examples/Effects/Flange/Flange.ino
  13. +0
    -0
      examples/Effects/Flange/effects_info.h
  14. +0
    -0
      examples/Effects/fir_filter/bandp_1200_1700.h
  15. +0
    -0
      examples/Effects/fir_filter/filters.cpp
  16. +0
    -0
      examples/Effects/fir_filter/filters.h
  17. +0
    -0
      examples/Effects/fir_filter/fir_filter.ino
  18. +0
    -0
      examples/Effects/fir_filter/lopass_4000_44100.h
  19. +0
    -0
      examples/Effects/fir_filter/screencap_bandpass.jpg
  20. +0
    -0
      examples/Effects/fir_filter/screencap_lowpass.jpg
  21. +1
    -0
      examples/HardwareTesting/PassThrough/PassThrough.ino
  22. +1
    -0
      examples/HardwareTesting/PassThroughAnalog/PassThroughAnalog.ino
  23. +1
    -0
      examples/HardwareTesting/PassThroughPlusTone/PassThroughPlusTone.ino
  24. +2
    -1
      examples/HardwareTesting/PlaySineMikroe/PlaySineMikroe.ino
  25. +0
    -0
      examples/HardwareTesting/SGTL5000_Specific/CalcBiquadToneControlDAP/CalcBiquadToneControlDAP.ino
  26. +0
    -0
      examples/HardwareTesting/SGTL5000_Specific/balanceDAC/balanceDAC.ino
  27. +0
    -0
      examples/HardwareTesting/SGTL5000_Specific/balanceHP/balanceHP.ino
  28. +0
    -0
      examples/HardwareTesting/SGTL5000_Specific/dap_avc_agc/dap_avc_agc.ino
  29. +0
    -0
      examples/HardwareTesting/SGTL5000_Specific/dap_bass_enhance/dap_bass_enhance.ino
  30. +0
    -0
      examples/HardwareTesting/SdCardTest/SdCardTest.ino
  31. +1
    -3
      examples/HardwareTesting/ToneSweep/ToneSweep.ino
  32. +0
    -0
      examples/HardwareTesting/sd_speed_test/sd_speed_test.ino
  33. +0
    -43
      examples/PlayWavFromSdCard/PlayWavFromSdCard.ino
  34. +0
    -0
      examples/SoundEffectPlayer/AudioSampleCashregister.cpp
  35. +0
    -0
      examples/SoundEffectPlayer/AudioSampleCashregister.h
  36. +0
    -0
      examples/SoundEffectPlayer/AudioSampleGong.cpp
  37. +0
    -0
      examples/SoundEffectPlayer/AudioSampleGong.h
  38. +0
    -0
      examples/SoundEffectPlayer/AudioSampleHihat.cpp
  39. +0
    -0
      examples/SoundEffectPlayer/AudioSampleHihat.h
  40. +0
    -0
      examples/SoundEffectPlayer/AudioSampleKick.cpp
  41. +0
    -0
      examples/SoundEffectPlayer/AudioSampleKick.h
  42. +0
    -0
      examples/SoundEffectPlayer/AudioSampleSnare.cpp
  43. +0
    -0
      examples/SoundEffectPlayer/AudioSampleSnare.h
  44. +0
    -0
      examples/SoundEffectPlayer/AudioSampleTomtom.cpp
  45. +0
    -0
      examples/SoundEffectPlayer/AudioSampleTomtom.h
  46. +1
    -0
      examples/SoundEffectPlayer/SoundEffectPlayer.ino
  47. +0
    -0
      examples/SoundEffectPlayer/wav2sketch/wav2sketch.c
  48. +0
    -0
      examples/SoundEffectPlayer/wav2sketch/wav2sketch.exe
  49. +0
    -0
      examples/Synthesis/PlayMidiTones/PlayMidiTones.h
  50. +0
    -0
      examples/Synthesis/PlayMidiTones/PlayMidiTones.ino
  51. +0
    -0
      examples/Synthesis/PlayMidiTones/william_tell_overture.c
  52. +0
    -0
      examples/Synthesis/PlaySynthMusic/PlaySynthMusic.h
  53. +0
    -0
      examples/Synthesis/PlaySynthMusic/PlaySynthMusic.ino
  54. +0
    -0
      examples/Synthesis/PlaySynthMusic/william_tell_overture.c

+ 4
- 0
Audio.h Ver arquivo

@@ -27,6 +27,10 @@
#ifndef Audio_h_
#define Audio_h_

#if TEENSYDUINO < 120
#error "Teensyduino version 1.20 or later is required to compile the Audio library"
#endif

// When changing multiple audio object settings that must update at
// the same time, these functions allow the audio library interrupt
// to be disabled. For example, you may wish to begin playing a note

examples/DialTone_7segment/DialTone_7segment.ino → examples/Analysis/DialTone_7segment/DialTone_7segment.ino Ver arquivo

@@ -6,6 +6,7 @@

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

// Create the Audio components. These should be created in the

examples/DialTone_DTMF/DialTone_DTMF.ino → examples/Analysis/DialTone_Serial/DialTone_Serial.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

// Create the Audio components. These should be created in the
@@ -44,7 +45,7 @@ void setup() {

// Enable the audio shield and set the output volume.
audioShield.enable();
audioShield.volume(0.82);
audioShield.volume(0.75);
while (!Serial) ;
delay(100);

examples/FFT/FFT.ino → examples/Analysis/FFT/FFT.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/MonoPeakMeterAnalog/MonoPeakMeterAnalog.ino → examples/Analysis/MonoPeakMeterAnalog/MonoPeakMeterAnalog.ino Ver arquivo

@@ -8,6 +8,7 @@ This example code is in the public domain

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/SpectrumAnalyzer/SpectrumAnalyzer.ino → examples/Analysis/SpectrumAnalyzer/SpectrumAnalyzer.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <LiquidCrystal.h>


examples/StereoPeakMeter/StereoPeakMeter.ino → examples/Analysis/StereoPeakMeter/StereoPeakMeter.ino Ver arquivo

@@ -5,6 +5,7 @@ This example code is in the public domain

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/CalcBiquadToneControl/CalcBiquadToneControl.ino → examples/Effects/CalcBiquadToneControl/CalcBiquadToneControl.ino Ver arquivo

@@ -5,6 +5,7 @@ This example code is in the public domain

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/effect_chorus/effect_chorus.ino → examples/Effects/Chorus/Chorus.ino Ver arquivo

@@ -33,10 +33,8 @@ many blocks you provided with AudioMemory().

*/

#include <arm_math.h>
#include <Audio.h>
#include <Wire.h>
//#include <WM8731.h>
#include <SD.h>
#include <SPI.h>
#include <Bounce.h>
@@ -96,7 +94,7 @@ void setup() {

audioShield.enable();
audioShield.inputSelect(myInput);
audioShield.volume(0.5);
audioShield.volume(0.65);
// Warn that the passthru pin is grounded
if(!digitalRead(PASSTHRU_PIN)) {

examples/effect_chorus/effects_info.h → examples/Effects/Chorus/effects_info.h Ver arquivo


examples/Filter/Filter.ino → examples/Effects/Filter/Filter.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/effect_flange/effect_flange.ino → examples/Effects/Flange/Flange.ino Ver arquivo

@@ -33,10 +33,8 @@ many blocks you provided with AudioMemory().

*/

#include <arm_math.h>
#include <Audio.h>
#include <Wire.h>
//#include <WM8731.h>
#include <SD.h>
#include <SPI.h>
#include <Bounce.h>
@@ -157,7 +155,7 @@ void setup() {

audioShield.enable();
audioShield.inputSelect(myInput);
audioShield.volume(0.5);
audioShield.volume(0.65);
// Warn that the passthru pin is grounded
if(!digitalRead(PASSTHRU_PIN)) {

examples/effect_flange/effects_info.h → examples/Effects/Flange/effects_info.h Ver arquivo


examples/fir_filter/bandp_1200_1700.h → examples/Effects/fir_filter/bandp_1200_1700.h Ver arquivo


examples/fir_filter/filters.cpp → examples/Effects/fir_filter/filters.cpp Ver arquivo


examples/fir_filter/filters.h → examples/Effects/fir_filter/filters.h Ver arquivo


examples/fir_filter/fir_filter.ino → examples/Effects/fir_filter/fir_filter.ino Ver arquivo


examples/fir_filter/lopass_4000_44100.h → examples/Effects/fir_filter/lopass_4000_44100.h Ver arquivo


examples/fir_filter/screencap_bandpass.jpg → examples/Effects/fir_filter/screencap_bandpass.jpg Ver arquivo


examples/fir_filter/screencap_lowpass.jpg → examples/Effects/fir_filter/screencap_lowpass.jpg Ver arquivo


examples/PassThrough/PassThrough.ino → examples/HardwareTesting/PassThrough/PassThrough.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/PassThroughAnalog/PassThroughAnalog.ino → examples/HardwareTesting/PassThroughAnalog/PassThroughAnalog.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>



examples/PassThroughPlusTone/PassThroughPlusTone.ino → examples/HardwareTesting/PassThroughPlusTone/PassThroughPlusTone.ino Ver arquivo

@@ -1,6 +1,7 @@
#include <Audio.h>
#include <Bounce.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

const int myInput = AUDIO_INPUT_LINEIN;

examples/PlaySineMikroe/PlaySineMikroe.ino → examples/HardwareTesting/PlaySineMikroe/PlaySineMikroe.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>

AudioSynthWaveform mysine(AudioWaveformSine);
@@ -23,7 +24,7 @@ void setup() {
mysine.frequency(440);
mysine.amplitude(0.9);

codec.volume(70);
codec.volume(0.70);

Serial.println("setup done");
}

examples/SGTL5000_Specific/CalcBiquadToneControlDAP/CalcBiquadToneControlDAP.ino → examples/HardwareTesting/SGTL5000_Specific/CalcBiquadToneControlDAP/CalcBiquadToneControlDAP.ino Ver arquivo


examples/SGTL5000_Specific/balanceDAC/balanceDAC.ino → examples/HardwareTesting/SGTL5000_Specific/balanceDAC/balanceDAC.ino Ver arquivo


examples/SGTL5000_Specific/balanceHP/balanceHP.ino → examples/HardwareTesting/SGTL5000_Specific/balanceHP/balanceHP.ino Ver arquivo


examples/SGTL5000_Specific/dap_avc_agc/dap_avc_agc.ino → examples/HardwareTesting/SGTL5000_Specific/dap_avc_agc/dap_avc_agc.ino Ver arquivo


examples/SGTL5000_Specific/dap_bass_enhance/dap_bass_enhance.ino → examples/HardwareTesting/SGTL5000_Specific/dap_bass_enhance/dap_bass_enhance.ino Ver arquivo


examples/SdCardTest/SdCardTest.ino → examples/HardwareTesting/SdCardTest/SdCardTest.ino Ver arquivo


examples/ToneSweep/ToneSweep.ino → examples/HardwareTesting/ToneSweep/ToneSweep.ino Ver arquivo

@@ -22,12 +22,10 @@ The audio board uses the following pins.

*/

#include <arm_math.h>
#include <Audio.h>
#include <Wire.h>
//#include <WM8731.h>
#include <SD.h>
#include <SPI.h>
#include <SD.h>
#include <Bounce.h>

AudioSynthToneSweep myEffect;

examples/sd_speed_test/sd_speed_test.ino → examples/HardwareTesting/sd_speed_test/sd_speed_test.ino Ver arquivo


+ 0
- 43
examples/PlayWavFromSdCard/PlayWavFromSdCard.ino Ver arquivo

@@ -1,43 +0,0 @@
#include <Audio.h>
#include <Wire.h>
#include <SD.h>
#include <SPI.h>

// Create the Audio components. These should be created in the
// order data flows, inputs/sources -> processing -> outputs
//
AudioPlaySdWav wav;
AudioOutputI2S dac;

// Create Audio connections between the components
//
AudioConnection c1(wav, 0, dac, 0);
AudioConnection c2(wav, 1, dac, 1);

// Create an object to control the audio shield.
//
AudioControlSGTL5000 audioShield;


void setup() {
// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example
AudioMemory(5);

audioShield.enable();
audioShield.volume(0.5);

SPI.setMOSI(7);
SPI.setSCK(14);
if (SD.begin(10)) {
wav.play("01_16M.WAV");
}
}

void loop() {
float vol = analogRead(15);
vol = vol / 1024;
audioShield.volume(vol);
delay(20);
}


examples/PlayFromSketch/AudioSampleCashregister.cpp → examples/SoundEffectPlayer/AudioSampleCashregister.cpp Ver arquivo


examples/PlayFromSketch/AudioSampleCashregister.h → examples/SoundEffectPlayer/AudioSampleCashregister.h Ver arquivo


examples/PlayFromSketch/AudioSampleGong.cpp → examples/SoundEffectPlayer/AudioSampleGong.cpp Ver arquivo


examples/PlayFromSketch/AudioSampleGong.h → examples/SoundEffectPlayer/AudioSampleGong.h Ver arquivo


examples/PlayFromSketch/AudioSampleHihat.cpp → examples/SoundEffectPlayer/AudioSampleHihat.cpp Ver arquivo


examples/PlayFromSketch/AudioSampleHihat.h → examples/SoundEffectPlayer/AudioSampleHihat.h Ver arquivo


examples/PlayFromSketch/AudioSampleKick.cpp → examples/SoundEffectPlayer/AudioSampleKick.cpp Ver arquivo


examples/PlayFromSketch/AudioSampleKick.h → examples/SoundEffectPlayer/AudioSampleKick.h Ver arquivo


examples/PlayFromSketch/AudioSampleSnare.cpp → examples/SoundEffectPlayer/AudioSampleSnare.cpp Ver arquivo


examples/PlayFromSketch/AudioSampleSnare.h → examples/SoundEffectPlayer/AudioSampleSnare.h Ver arquivo


examples/PlayFromSketch/AudioSampleTomtom.cpp → examples/SoundEffectPlayer/AudioSampleTomtom.cpp Ver arquivo


examples/PlayFromSketch/AudioSampleTomtom.h → examples/SoundEffectPlayer/AudioSampleTomtom.h Ver arquivo


examples/PlayFromSketch/PlayFromSketch.ino → examples/SoundEffectPlayer/SoundEffectPlayer.ino Ver arquivo

@@ -1,5 +1,6 @@
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <Bounce.h>


examples/PlayFromSketch/wav2sketch/wav2sketch.c → examples/SoundEffectPlayer/wav2sketch/wav2sketch.c Ver arquivo


examples/PlayFromSketch/wav2sketch/wav2sketch.exe → examples/SoundEffectPlayer/wav2sketch/wav2sketch.exe Ver arquivo


examples/PlayMidiTones/PlayMidiTones.h → examples/Synthesis/PlayMidiTones/PlayMidiTones.h Ver arquivo


examples/PlayMidiTones/PlayMidiTones.ino → examples/Synthesis/PlayMidiTones/PlayMidiTones.ino Ver arquivo


examples/PlayMidiTones/william_tell_overture.c → examples/Synthesis/PlayMidiTones/william_tell_overture.c Ver arquivo


examples/PlaySynthMusic/PlaySynthMusic.h → examples/Synthesis/PlaySynthMusic/PlaySynthMusic.h Ver arquivo


examples/PlaySynthMusic/PlaySynthMusic.ino → examples/Synthesis/PlaySynthMusic/PlaySynthMusic.ino Ver arquivo


examples/PlaySynthMusic/william_tell_overture.c → examples/Synthesis/PlaySynthMusic/william_tell_overture.c Ver arquivo


Carregando…
Cancelar
Salvar