Search results

  1. C

    malloc/free fails to aggregate chunks, sometimes...

    Thanks for all the instructions. By googling around, I had started down this path and, as your reply describes, it got really complicated really fast. I was hoping that it was my inexperience that made it difficult to thread my way through the library. I had hoped that maybe there was a...
  2. C

    malloc/free fails to aggregate chunks, sometimes...

    Is the source available for the two versions of the C libraries that are used by the teensy tool chain? This has really lit up my curiosity and I'd like to look at the source and see if I can learn something about how the magic works... Chip
  3. C

    malloc/free fails to aggregate chunks, sometimes...

    Oh, and since Chris mentioned the optimization setting that he used, I tried compiling his example using a diff setting. I compiled using "smallest code size" (or whatever it's called). When the code ran, all of his test cases ran successfully. Step 3 did not fail. Why would changing the...
  4. C

    malloc/free fails to aggregate chunks, sometimes...

    The OP's issue is that, in the simple example, it is known that there is enough free contiguous memory to allocate the HugeStruct because of that free() operation in step two should release the one chunk of allocated memory. Yet because of whatever free() is doing (or not), the allocation...
  5. C

    malloc/free fails to aggregate chunks, sometimes...

    I ran Chris's code. I get the same output. This is weird. Why isn't free() moving the end-of-heap memory pointer back where it should be? Chip
  6. C

    Teensy 4.1 and Audio Shield I2S Group Delay

    I did a blog post on measuring the latency, including the effect of the audio block size, sample rate, and the inherent latency of the audio codec. It's for the Tympan Rev C, which was a Teensy 3.6, but it'd be the same for the Teensy 4.x, too...
  7. C

    Ultrasonic PDM Input on Teensy 4.0

    If you're purposely trying to learn how to do PDM inputs directly to the Teensy, then developing this whole new method sounds like fun! Go for it! But, if your goal is simply to use PDM in any way that is easy, it would probably be easier to use an audio codec chip that is built to receive...
  8. C

    Custom audio object causes lock-ups

    You have a non-deterministic failure in your system. The debugging technique that I'm suggesting is to keep removing elements of your program until you've got the most minimal example that still has the issue. At that point, the problem usually becomes obvious. My two suggestions where aimed...
  9. C

    Custom audio object causes lock-ups

    In your update function... void AudioCustomFilter::update(void) { audio_block_t *block; block = receiveWritable(); if (!block) return; if (enabled) { if (proc) { __disable_irq(); proc(block); __enable_irq(); } } if...
  10. C

    Destructor for AudioStream?

    Yeah, this is a tough one. In my typical minimalist approach, I was simply going to assert that destroying inputs and outputs was not allowed. In effect, I'd kick the can down the road, if you will. For my own uses, I have no need to dynamically create/destroy those objects, so not supporting...
  11. C

    Destructor for AudioStream?

    Or, to solve so many of these problems even more simply, we could move the update list (and its other associated data members) out from being `private` and, instead, make them `protected`. This would give derived classes access to the update list. Therefore, we each could brew our own update...
  12. C

    Destructor for AudioStream?

    I'm very familiar with the latency issue. Been working with it for years and years. It just isn't relevant in most situations that I deal with. Occasionally, latency is relevant...like in my hearing aid experiments. But, in those cases, I won't use dynamic connections. Again, including a...
  13. C

    Destructor for AudioStream?

    Regarding your first two points, they are points that I agree with. However, to get dynamic destruction to work *at all*, I propose that we go with the minimum changes. This is the classic debate over whether it's better to offer a number of incremental small changes or to offer a single "big...
  14. C

    Destructor for AudioStream?

    I had seen your work before, but I had not realized how deeply you had pushed your dynamism. In my mind, I was seeking something a bit more modest. As I'm hoping that Paul might choose to include a basic destructor in the next release, I think that a more modest set of changes is more likely...
  15. C

    Destructor for AudioStream?

    Over the last bunch of years, there's been great work done to enable dynamic audio connections. Fantastic! But, as freely acknowledged, this work was limited to creating/destroying AudioConnection instances. Destroying Audio objects themselves (ie, instances of AudioStream) is still...
  16. C

    How about an emulator/simulator that runs on your computer and emulates/simulates the Teensy itself?

    I agree that it doesn't need the whole board, but it does need some processor-oriented elements. As two examples, it needs the data type truncation / overflow behavior of the ARM core as well as have simulations of the ARM CMSIS DSP routines.
  17. C

    How about an emulator/simulator that runs on your computer and emulates/simulates the Teensy itself?

    Even a simulator for this ARM core would be nice to know about. It would be great to simulate Teensy audio library processing algorithms on my PC before moving to the Teensy itself. So, even if it is not for the whole Teensy 4.1 device, might anyone know about a simulator for its ARM core? Chip
  18. C

    Floating-Point Audio Library Extension

    By the way, after I created the OpenAudio library, I created the Tympan library, which uses all the same approaches. Its examples better maintain the changing of sample rate and block size. You can see a good example here...
  19. C

    Floating-Point Audio Library Extension

    I haven't been the one maintaining the OpenAudio library...I haven't been the maintainer for years and years, so its examples look quite different than I remember them. I'm having difficulty finding an example that uses AudioSettings to change the sample rate or block size. That's unfortunate...
  20. C

    Floating-Point Audio Library Extension

    Yes, if you are mixing the Teensy Audio Library classes (with it's Int16 data) with the OpenAudio library (with its Float32 data), you must conform to the limitations of the Teensy Audio Library. This means you can only run at 44.1 kHz and 128 point audio blocks. If you do limit to I st using...
  21. C

    Floating-Point Audio Library Extension

    Hi, The second one doesn't work because, in your setup(), you only allocated AudioMemory_F32. If you are using the non-F32 audio library (which is the regular Teensy Audio Library), you also need to explicitly give it some memory, too. So, just before or just after your line...
  22. C

    FIR bandpass with >500 taps and 96 kHz sample rate

    Re-reading the original post, can the Teensy Audio Shield do 96 kHz? The audio codec in the Teensy-based Tympan can do 96 kHz, but I don't know about the SGTL5000 codec in Teensy's own Audio Shield. Does anyone know? Chip
  23. C

    FIR bandpass with >500 taps and 96 kHz sample rate

    >>> Which rather rules out the naive FFT/zeroing/IFFT approach as its not real-time While FFT-based processing has a different latency than FIR, it's as real-time as an FIR filter. For a linear-phase FIR filter, the latency is approximately half the FIR length (or the whole FIR length...
  24. C

    FIR bandpass with >500 taps and 96 kHz sample rate

    Hi! I'm the original author of the OpenAudio library (though Bob Larkin carries it forward now). In OpenAudio are a couple of frequency domain examples. These are probably your best shot without coding up something whole-ly knew. While I know that you want a bandpass filter, the OpenAudio...
  25. C

    MEMS microphones into Audio Shield???

    Well look at that! Nice! Go team! Chip
  26. C

    MEMS microphones into Audio Shield???

    Oh, and also... Since you're using the Teensy Audio shield, you should be aware that it can have some funny noise behavior sometimes. For example, its digital high pass filter (typically enabled by default) can add a lot of noise. You'll want to explore disabling it as a way to noticeably...
  27. C

    MEMS microphones into Audio Shield???

    Sparky looks like fun! As mentioned earlier, I am part of the Tympan team, who were funded to make an open source hardware and software platform for audiological research (ie, hearing aids and whatnot). We have a lot of overlap with what you're doing, which is cool! https://www.tympan.org...
  28. C

    Issues with custom audio object

    Glad you found the problem!
  29. C

    Issues with custom audio object

    If you have tried fixes for the other two suggestions, the next thing I would try would be to strip out your entire update() and replace it with one that simply copies the input to the output. Then, I would slowly add in the pieces of the calculation. At some point, you'll add in enough of the...
  30. C

    Issues with custom audio object

    Hi, >>> I don't think so, the sample is loaded first and then the index incremented. So, when you reach the BUFFER_SIZE number of sample, increment and fulfill the condition by being greater than the macro.<<< The problem is that your code allows the index to have the value of BUFFER_SIZE. It...
  31. C

    Issues with custom audio object

    I agree with both of the recommendations above. A smaller problem is where you do 'if(bufferIndex > BUFFER_SIZE)'. As written, I think that you will overrun your buffer by one. To avoid this, use '>=' I stead of just '>'.
  32. C

    Stereo guitar/bass cabinet emulation

    How are you doing the communication between your GUI in the browser and the pedal? MIDI over USB? Or USB Serial? Chip
  33. C

    Real-Time Vocal Formant Shifter

    If you want higher frequency resolution, you can try lowering the sample rate. Cutting the sample rate in half will have a similar effect on frequency resolution as doubling the FFT length. Or, you can double the FFT length by switching from 2x overlap to 4x overlap. Or, you can build on the...
  34. C

    Real-Time Vocal Formant Shifter

    Your block size is 128. What is your FFT size? Presumably, it is 256? Reading through your code, it isn't quite obvious to me whether you are still using the overlapping FFT approach employed in all of the Open Audio frequency domain processing blocks (including the formant shifter). If you...
  35. C

    Real-Time Vocal Formant Shifter

    Thanks for posting your code with better formatting. It definitely helps. First, if you really are looking to extract the envelope, I'm going to restate my suggestion from above...which is to do an absolute value operation prior to your fir filter in order to extract the envelope. If you want...
  36. C

    Real-Time Vocal Formant Shifter

    What I have been able to maybe understand is that your `computeEnvelope()` probably isn't doing what you want it to do. If you want it to compute the envelope of the audio, this isn't doing it. To my eye, it looks like this is just a low pass filter. While a low pass filter can be used to...
  37. C

    Real-Time Vocal Formant Shifter

    Hi, I'm the original author of the Open Audio format shifter. I'm trying to figure out what you're doing, but (on my phone at least) the code you posted has lost all its indenting, so it's really hard to follow the code to see what you're trying to do. Before I can help you debug the sound...
  38. C

    Synth - Starting out - emphasis on Expressive

    A few comments: DETUNE: You've got four waveform generators to mimic the m/p. You'll need to purposely detune their pitches a little bit relative to each other in order to achieve that "analog synth" sound. Four oscillators in perfect tune with each other is really boring. 4-POLE: Be aware...
  39. C

    Stereo guitar/bass cabinet emulation

    If y'all are still looking around at alternative codecs, the Texas Instruments AIC3206 and 3212 are both supported by the Tympan Library (what I did after the Open Audio library), so either can be lifted out and dropped into this project with ease. I'm not saying that the 3206 or 3212 are...
  40. C

    Stereo guitar/bass cabinet emulation

    >>> Using the Lead amp i too have noise and a bif of whining tone. If you're using the SGTL5000, be sure to disable its built-in highpass filter. While it is useful for ensuring that your signal has no DC offset, the filter can introduce a whine. See my post here...
  41. C

    Audio board use for magnetometer

    In my personal experience, I have used audio interfaces very successfully as data acquisition devices. The key is to be aware of the limitations: * Your signals must be AC...most audio interfaces are not DC coupled * Audio interfaces aren't calibrated, so you don't know the absolute amplitude...
  42. C

    Noise reduction???

    Hi! Cool that you're interested! What's different about your question than what was being asked in that earlier thread? Chip
  43. C

    Adaptative filters for noise reduction, teensy audio shield

    That OpenMHA link is great. It's not specific to Teensy, but it is still good work. If you want something that is more specific to Teensy, you should look at what the Tympan folks have done (I'm a founding member). Like OpenMHA, Tympan is also aimed at Hearing Aid researchers...but unlike...
  44. C

    Adaptative filters for noise reduction, teensy audio shield

    Huge topic. What kind of noise are you looking to reduce? Noise Source: Real-world noise from your environment picked up by your mic, or electronic noise that's somehow electrically getting into your signal? Frequency Characteristics: Broadband noise? hissy noise? Noise that sounds narrow...
  45. C

    Attempting to remove high frequencies using I2S microphone INMP441 and the teensy 4.1 board

    If you were to use the OpenAudio library, you'd use this example... https://github.com/chipaudette/OpenAudio_ArduinoLibrary/blob/master/examples/LowpassFilter_FD_OA/LowpassFilter_FD_OA.ino It does a lowpass filter in the Frequency Domain. The example has the cutoff at 1000 Hz, but you can...
  46. C

    Attempting to remove high frequencies using I2S microphone INMP441 and the teensy 4.1 board

    As you're using a T4, you can use floating point operations. This means that you can use one of the floating point extensions of the Audio library, like the OpenAudio or Tympan libraries. These have options for steeper filter cutoffs, including frequency-domain (ie. FFT->IFFT) filtering that...
  47. C

    TLV320AIC3105 Codec in TDM mode

    For Tympan, we got PDM digital mics working with the TI AIC3206 and the AIC3212. So, not your AIC. Also, we were doing I2S, not TDM. So, totally not what you asked. If you thought it might be helpful, uou're welcome to take a look,l... 3206...
  48. C

    Tympan equalizer for sound shield help

    Hi! As we discussed in the Tympan forum, your filterbank is actually 8 channels (counting 0 through 7 gives you 8). When you create the filterbank, you give it 7 frequency values. The seven values are the frequencies that separate the 8 filters. Therefore, in your case, filter 0 is...
  49. C

    Notch filter for feedback?

    Feedback cancelation is a very, very tricky subject with a LONG history of technical development. So, don't expect a silver bullet that'll make the problem go away entirely. Before you move to algorithms, you should first try to acoustically isolate your bone conduction transducer from your...
Back
Top