Search results

  1. M

    Creating arbitrary waveform

    That’s exactly what my first post is about. The problem with this is, that the output is only updated every 2.9ms; so you won’t get more than 344Hz this way. I’m fully aware that this is not the “correct“ way to resample, especially audio. Having dug into the inner workings of the library I now...
  2. M

    Creating arbitrary waveform

    I think it's pure coincidence that the timing of calculating the next sample happens to work out such that the sine wave is clean. Agreed. I will have to do some sort of housekeeping with. the data coming in. I was hoping that there'd be some mode in which the last sample is simply repeated...
  3. M

    Creating arbitrary waveform

    I was using a 3.2 I now switched over to using a 4.0 The same code now gives me a clean sine wave
  4. M

    Creating arbitrary waveform

    I have not.I will be getting sensor data in at around 4kHz. I was hoping there's an easy way to "just pipe" that into the USB audio output device in order to capture it on the host side. I suppose I could buffer up the incoming data until I have enough for a whole buffer. But in that case I...
  5. M

    Creating arbitrary waveform

    Thanks Paul. Good point. After updating to the latest I no longer need the other output device. While things have improved, there are still some gaps. I have simplified the code even more: #include <Audio.h> AudioPlayQueue queue1; AudioOutputUSB usb1...
  6. M

    Creating arbitrary waveform

    Actually my previous post was not quite right. There seems to be some other bug, that if you ONLY have a AudioOutputUSB no output will be created. You need to have some other output instantiated. Which is why I added AudioOutputI2S i2s1; // IMPORTANT! If this is removed then no audio will be...
  7. M

    Creating arbitrary waveform

    Thanks for pointing me to the AudioPlayQueue. This should do what I want. Unfortunately I haven't gotten it working yet. I reduced the "PlayQueueDemo.ino" to its basics. I appears to be working correctly when I use a AudioOutputPWM as output. However, if I use AudioOutputUSB as output it does...
  8. M

    Creating arbitrary waveform

    From this page : https://www.pjrc.com/teensy/td_libs_AudioNewObjects.html I can glean the the entire audio library updates every 2.9ms (128 samples at 44.1kHz). Si that's likely what I'm seeing here. Are there any workarounds to achieving what I'm trying to do?
  9. M

    Creating arbitrary waveform

    Hi all, I am trying to feed arbitrary waveforms via USB audio to a Mac. The USB interface and everything works. I am attempting to use the AudioSynthWaveformDc module to set the amplitude of a computed arbitrary waveform. This also works, but the amplitude only updates every 3ms when setting it...
Back
Top