IFD:EAI SoS21/course material/Session 6: Getting Started with Teensyduino: Difference between revisions
From Medien Wiki
Line 29: | Line 29: | ||
Now put some headphones on the teensy headphone connector and hopefully listen to some interesting piezo disc microphonic sounds (this is where the word micro-phone really comes from, it's analogous to microscope, actually). | Now put some headphones on the teensy headphone connector and hopefully listen to some interesting piezo disc microphonic sounds (this is where the word micro-phone really comes from, it's analogous to microscope, actually). | ||
=Homework: Coding an Envelope follower= | ==Homework: Coding an Envelope follower== | ||
If you were successful with setting up the teensy and piezo microphone, you can make a step further and learn how to wrestle with audio data directly on the teensy! | If you were successful with setting up the teensy and piezo microphone, you can make a step further and learn how to wrestle with audio data directly on the teensy! | ||
With the help of the [https://www.pjrc.com/teensy/td_libs_AudioNewObjects.html teensy documentation] and [[:File:envelope_follower_template.zip|my empty template file]] you should be able to grasp how this works. Basically you write your own teensy audio object by including a C++ class that is structured as documented in the link above. This class will receive a pointer to the audio input stream coming from the piezo and can do some work on it. If you have questions about the template code please ask on our [https://signal.group/#CjQKIGr9R1a7Znwe1Ca0pmbx3rvHHzDaS1c_LnmgwwVk1KoSEhB6aHUiokel3vtGVoTErtfB signal group]. | With the help of the [https://www.pjrc.com/teensy/td_libs_AudioNewObjects.html teensy documentation] and [[:File:envelope_follower_template.zip|my empty template file]] you should be able to grasp how this works. Basically you write your own teensy audio object by including a C++ class that is structured as documented in the link above. This class will receive a pointer to the audio input stream coming from the piezo and can do some work on it. If you have questions about the template code please ask on our [https://signal.group/#CjQKIGr9R1a7Znwe1Ca0pmbx3rvHHzDaS1c_LnmgwwVk1KoSEhB6aHUiokel3vtGVoTErtfB signal group]. |