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

Thread: phase() Not working

  1. #1
    Junior Member
    Join Date
    May 2019
    Location
    London UK
    Posts
    6

    phase() Not working

    Maybe I miss-understand how phase() works but I expected it to reset the waveform to a specific point in time.
    i.e phase(0) to be start point or 0 Volt output.
    I need to be able to continuously reset the waveform for very low frequency FM effect

    Here is my code.. using Teensy 3.6, Arduino 1.8.5, Windows 10

    #include <Audio.h>
    AudioSynthWaveform FMOSC01;
    AudioOutputPT8211 pt8211;
    AudioConnection patchCord2(FMOSC01, 0, pt8211, 0);

    void setup() {
    AudioMemory(20);
    FMOSC01.begin(1,0.1,WAVEFORM_SINE);
    }

    void loop() {
    delay(3000);
    AudioNoInterrupts();
    FMOSC01.begin(1,0.1,WAVEFORM_SINE);
    FMOSC01.phase(0);
    AudioInterrupts();
    }

  2. #2

  3. #3
    Junior Member
    Join Date
    May 2019
    Location
    London UK
    Posts
    6
    Thanks for that, it worked.
    So the phase() command doesn't do what it says on the tin!

Posting Permissions

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