output samples without sample rate? #445
-
I am new to this wonderful world of the arduino-audio-tools, a bit overwhelmed and an absolute beginner regarding i2s. So my very first questions will probably be quite stupid, please be patient witch me ;) I am working on a program that generates audio (and light) patterns on ESP32 boards. Currently i use the My question is, if i2s (or the audio tools) can be used like this, or if I have to generate 'normal' sample data in a constant sample rate first? Thank you for this wonderful software :) Robert |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments
-
Yes, all audio output is based on a defined sample rate. However you do not need to take care of this for your case. I suggest that you just implement a subclass of SoundGenerator that provides the actual value that you want to output. Here is an example sketch that uses an SoundGenerator |
Beta Was this translation helpful? Give feedback.
Yes, all audio output is based on a defined sample rate. However you do not need to take care of this for your case.
I suggest that you just implement a subclass of SoundGenerator that provides the actual value that you want to output.
Have a look at how e.g. the NoiseGenerator is implemented.
Here is an example sketch that uses an SoundGenerator