Audio EffectMultiply doesn't work

Status
Not open for further replies.

Lukashuk

Well-known member
Hello! I am using T3.2
Audio EffectMultiply doesn't work for me, here's an example:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputAnalog         adc2(A3);           //xy=122,205
AudioInputAnalog         adc1(A4);           //xy=123,113
AudioEffectMultiply      multiply1;      //xy=478,157
AudioOutputAnalog        dac1;           //xy=730,150
AudioConnection          patchCord1(adc2, 1, multiply1, 1);
AudioConnection          patchCord2(adc1, 0, multiply1, 0);
AudioConnection          patchCord3(multiply1, dac1);
// GUItool: end automatically generated code

void setup() 
{
   AudioMemory(20);
  // put your setup code here, to run once:
}
void loop() {
  // put your main code here, to run repeatedly:

}
 
Try this which inputs from channel 0 of adc2:
Code:
AudioConnection          patchCord1(adc2, 0, multiply1, 1);

Pete
 
I tried to replace, does not work.
I have 2 signals at the inputs, 120 Hz (yellow line) and 100 Hz, after multiplying these should be approximately like this (blue line)
2.jpg

and there is so

1.jpg
 

Attachments

  • 2.jpg
    2.jpg
    90.8 KB · Views: 60
Hello! I checked the internal signals. If the input of the AudioEffectMultiply multiply1 is to give 2 inward sine AudioSynthWaveformSine sine1 and sine2 then the multiply1 works.
I repeat - multiply does not work with external ADC1 and ADC2 signals.
 
Hello! I checked AudioInputAnalogStereo adcs1 (A5, A3); AudioInputAnalogStereo adcs1 (A5, A3) works; together with AudioEffectMultiply multiply1;
If the ADC channels are defined separately
AudioInputAnalog adc2 (A5); // xy = 122,205
AudioInputAnalog adc1 (A3); // xy = 123,113
then AudioEffectMultiply multiply1; does not work.
 
Status
Not open for further replies.
Back
Top