Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Audio EffectMultiply doesn't work

  1. #1
    Member
    Join Date
    Oct 2017
    Location
    Ukraine
    Posts
    33

    Audio EffectMultiply doesn't work

    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:
    
    }

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,080
    Try this which inputs from channel 0 of adc2:
    Code:
    AudioConnection          patchCord1(adc2, 0, multiply1, 1);
    Pete

  3. #3
    Member
    Join Date
    Oct 2017
    Location
    Ukraine
    Posts
    33
    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)
    Click image for larger version. 

Name:	2.jpg 
Views:	3 
Size:	102.1 KB 
ID:	16547

    and there is so

    Click image for larger version. 

Name:	1.jpg 
Views:	3 
Size:	96.7 KB 
ID:	16546
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2.jpg 
Views:	5 
Size:	90.8 KB 
ID:	16545  

  4. #4
    Member
    Join Date
    Oct 2017
    Location
    Ukraine
    Posts
    33
    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.

  5. #5
    Member
    Join Date
    Oct 2017
    Location
    Ukraine
    Posts
    33
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •