emmanuel63
Well-known member
Hello,
I can't figure out how is working Sample and Hold. I want to use a noise object to feed a sample and hold oscillator. But I can see any input with the AudioSynthWaveform object ? So how is it possible to sample and hold noise or a sine for instance ?
I am lost...
I tried the following sketch. It is working but I can't explain why, because there is no input...
Emmanuel
I can't figure out how is working Sample and Hold. I want to use a noise object to feed a sample and hold oscillator. But I can see any input with the AudioSynthWaveform object ? So how is it possible to sample and hold noise or a sine for instance ?
I am lost...
I tried the following sketch. It is working but I can't explain why, because there is no input...
Emmanuel
Code:
#include <Audio.h>
// GUItool: begin automatically generated code
AudioSynthWaveform Sample_and_hold; //xy=213,222
AudioSynthWaveformModulated waveformMod1; //xy=444.28571224212646,229.00000095367432
AudioOutputI2S i2s1; //xy=624.2857055664062,230
AudioConnection patchCord1(Sample_and_hold, 0, waveformMod1, 0);
AudioConnection patchCord2(waveformMod1, 0, i2s1, 0);
AudioConnection patchCord3(waveformMod1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=231,122
// GUItool: end automatically generated code
void setup() {
AudioMemory(12);
Sample_and_hold.begin(0.2, 5, WAVEFORM_SAMPLE_HOLD);
waveformMod1.begin(0.3, 200, WAVEFORM_SINE);
}
void loop() {
}