Search results

  1. G

    Updated 8x8 and 16x16 audio

    All good! Is there a git repo with the progress so far?
  2. G

    Updated 8x8 and 16x16 audio

    How is this going? Is there a repo for the PCB design and audio library code? I've made extensive use of a design based on the original CS42448 8x8 audio board from the hackable post but looking to update for more channels and future compatibility now that CS42448 is obsolete. Would love to...
  3. G

    i2c_t3 compile error

    As far as I recall this was an issue during initial development as well. The Audio library called Wire and left no good method for resolving the conflicts this created with the i2c_t3 library. Doesn't matter whether or not any audio objects I was using actually used the Wire library, since Wire...
  4. G

    i2c_t3 compile error

    To solve this I had to find the default Wire library and modify it as I believe that gets included by the Teensy Audio library. Commenting out these lines in WireKinetis.cpp // #ifdef WIRE_IMPLEMENT_WIRE // constexpr uintptr_t i2c0_addr = KINETIS_I2C0_ADDRESS; // TwoWire Wire(i2c0_addr...
  5. G

    i2c_t3 compile error

    IS31_I2C.h is the first code section. This code section is included in main as IS31_I2C.h
  6. G

    i2c_t3 compile error

    Hi, I am recompiling an old sketch using i2c_t3 on the new Arduino IDE and it no longer builds. I get a library error saying that Wire and Wire1 have multiple definitions like the original Wire library is getting defined somewhere. How do I fix this? I also tried on an older Teensyduino IDE...
  7. G

    Replacement for CS42448

    Hi, I've done a lot of work with the Teensy Audio library and the CS42448 codec. I see now the part has been obsolesced, would definitely rather not have to redesign all the infrastructure I've built to support this. A lot of this has been based on Paul's original codec PCB design on OSH Park...
  8. G

    Where is Audio Library Located in the New Arduino 2.0 IDE?

    That is it! Thank you! For reference the issue I was having is related to an optimization where synth objects don't generate an output buffer if their amplitude is set to 0: void AudioSynthWaveform::update(void) { audio_block_t *block; int16_t *bp, *end; int32_t val1, val2...
  9. G

    Where is Audio Library Located in the New Arduino 2.0 IDE?

    Hi, I need to find where the audio library is installed on the new Arduino IDE (2.3.2). I used to be able to find it easily when using teensyduino, but cannot find where the folder referenced by the new ide install is located. I can even open the files as read only, but cannot get the ide to...
  10. G

    Fast SD Playback for Multichannel Audio File

    This worked for me, just had to make two additional changes to the update function to maintain position tracking and allowing the file to read additional data past the end of the filesize when looping (this data now comes from the beginning of the file): // also, don't play past end of data...
  11. G

    Fast SD Playback for Multichannel Audio File

    Was able to test this class finally and it's working for basic 8 channel playback using the new Arduino IDE and including the files I mentioned in the last post manually in the sketch folder: AudioBuffer.cpp AudioBuffer.h play_wav_buffered.cpp play_wav_buffered.h In regards to looping, I have...
  12. G

    Fast SD Playback for Multichannel Audio File

    Thanks for the very thorough reply! Seems to be compiling after an IDE update to Arduino 2.2.1 just by including the following files: AudioBuffer.cpp AudioBuffer.h play_wav_buffered.cpp play_wav_buffered.h Away from the bench atm so just doing this headlesss, but hopefully will be able to...
  13. G

    Fast SD Playback for Multichannel Audio File

    Okay, thanks, started checking it out today. It seems like this is part of a much larger overhaul of the Teensy codebase, and there are a lot of overlapping dependencies that this relies on which do not live in the same place. 1. Is there a way to try this without having to set up / install...
  14. G

    Fast SD Playback for Multichannel Audio File

    Awesome, is there an example you recommend from this branch for getting started with just reading an 8 channel wav file from the SD?
  15. G

    Fast SD Playback for Multichannel Audio File

    Thanks! This thread looks very helpful I will check it out. Is the basic idea here just to read the entire file into internal memory before playing it back? Or to do so in large sections at a time such that the read operation is more efficient? When I say fast I just mean fast enough to work...
  16. G

    Fast SD Playback for Multichannel Audio File

    Hi, I am working on a project using the Teensy 4.1 to play back spatial audio via the CS42448 codec. I'd like the project to be able to play back recorded spatial files from the SD reader, and I wrote a modified version of the SD file player object for this purpose. However, I'm hitting a...
  17. G

    Phase Value to Set Sine Output to 1

    Hi, I’m working on an audio project where I’d like to use the sine oscillator as a tremolo modulation source alongside the multiply object. When I turn off the modulation I need this to rest at a static value of 1, for full volume no tremolo. To accomplish this I’m thinking I’ll set the...
  18. G

    Teensy USB Power Supply Fighting with Linear Voltage Regulator

    Hi, I recently made a PCB for a Teensy project that uses a linear voltage regulator to step down 12V used for some analog audio circuitry to 5V to power the teensy. This is working well, except that when I plug in the USB for programming I notice the linear regulator starts getting pretty hot...
  19. G

    Where is AudioStream.h in the Github Repo?

    Thanks y'all! Maybe worth adding this to the readme, on the audio library building your own object tutorial page, or as a comment somewhere in the audio library files? Felt very cryptic otherwise, and would have expected to be able to find this out from at least one of those sources...
  20. G

    Where is AudioStream.h in the Github Repo?

    Hi. I am studying the audio library structure for the purpose of writing my own custom objects. They all reference a parent class named AudioStream, and include AudioStream.h but it appears the file AudioStream.h is not actually included in the repo. Maybe I'm missing something, but it's not in...
  21. G

    PT8211 ~2kHZ Noise On Output - Teensy 4.1

    To be clear, this issue happens with the code I posted just using a Teensy 4.1 (powered via USB) and a breakout board I got directly from PJRC: https://www.pjrc.com/store/pt8211_kit.html. It's not related to my hardware. You can recreate this using the Teensy 4.1, a breakout kit, and the code I...
  22. G

    PT8211 ~2kHZ Noise On Output - Teensy 4.1

    PWR_FLAG is not a net, it's a marker that lets KiCAD know that the net it's connected to is a power plane. It's a design rules thing. Don't worry about VDD or VCC, those are used for an analog portion of the circuit that is disabled at present. In fact, don't worry about my design at all. As...
  23. G

    PT8211 ~2kHZ Noise On Output - Teensy 4.1

    I find this is also happening on a PT8211 breakout purchased from PJRC, with the audio library example code edited to zero the output. Definitely something wrong here... #include <Audio.h> #include <Wire.h> #include <SPI.h> #include <SD.h> #include <SerialFlash.h> // GUItool: begin...
  24. G

    PT8211 ~2kHZ Noise On Output - Teensy 4.1

    Looking at this further on my scope, I am seeing an equivalent signal at the DIN pin (seems a little odd this is anything other than zero, since I am writing a zero output in code, but figure this might be some configuration or address bits). Seems like noise from the digital side of the chip is...
  25. G

    PT8211 ~2kHZ Noise On Output - Teensy 4.1

    Hi, I am working on a project using the PT8211, and running into an issue where I am seeing a pronounced ~2kHz noise on the output of the chip. This happens even when I write super stripped down audio code that completely zeros the output, and disable all other electronic functionality on my...
  26. G

    Is it possible to program a Teensy with NXP IDE and a Debugger?

    Hi, I was wondering if it was possible to working with the teensy hardware using the NXP IDE and debugger rather than Arduino IDE with the USB Serial port. I love the Teensy's processing power and flexibility, but having to do all the debugging with print statements is a huge drawback when...
  27. G

    Proper Use of Optimized DSPInt Functions

    Hi, I am experimenting with writing my own audio library objects. Look a build a harmonic distortion algorithm and thought I'd try and use the optimized integer math functions the audio library provides. My harmonic distortion is a transfer function represented by: y = x - x^2 * x2c - x^3 *...
  28. G

    Integer Math SQRT for Equal Power Scaling in Surround Panner Object

    Hi, I'm writing a surround panner object for use with the Teensy and the CS42448 8ch codec. It accepts an audio input and a -1 to 1 control input, sending the input to one of 8 outputs. I'm wondering how I can accomplish equal power scaling using audio library integer math. Is there any sort of...
  29. G

    ReceiveWritable, ReceiveReadOnly returning NULL blocks

    Hi, I am experimenting with writing a surround panner object for the Teensy Audio Library. This reads a single input channel and applies panning gain to 8 output channels. I notice I'm getting some weird behavior with the receive blocks functions. Paired things down to the bare minimum and I'm...
  30. G

    Longer Values for Envelope Object

    Hi, I'm working on a project where I could use a really long envelope, was looking at maybe modifying the envelope object to incorporate longer times. Wanted to ask first if there was any particular reason the number 11880ms was picked for the maximum value for the phases. Seems oddly specific...
  31. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Actually looks like I figured it out by adding an additional coupling cap to the 5V line entering the IS31 IC. No longer getting I2C errors with the additional filtering present. Maybe worth noting however that T3.2 worked whether the coupling cap was present or not, whereas with T4 they need to...
  32. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    For now it’s just powered via USB 5V. I’ve also tried providing 5V from an external supply but it doesn’t make a difference.
  33. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Now if only I could figure out my I2C issue 🤔
  34. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Also tried jumpering the SCL and SDA pins directly from T4 to the PCB just to make sure the headers weren't the issue. Still the same results: Also found out how to upload photos haha, they just have to be real small... :cool:
  35. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    It seems this forum can't really handle images so here's a git repo with everything. Photos of the working T3 board and the not working so well T4 board + schematics for everything, let me know if this suggests anything: https://github.com/hhaudio/I2C_T4_Documentation As I stated before, I also...
  36. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    What specific PCB info do you need and what would be the best way to share that? I can share KiCad repos, pictures of the boards, schematic / layout pdfs. Just let me know. I have an art practice with sound electronics and I'm using Teensy constantly so I'd definitely like to get this figured...
  37. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    As I noted briefly in my first post, I made a PCB using the IS31FL3236A with the Teensy 3.2 and the i2c_t3 library and it works perfectly. That's running another audio project that uses the T3's built in DAC. I've also tried running a similar sketch but without audio code on the 4.1 and I...
  38. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Update to this, updated the program to track the number and frequency of I2C errors. It appears to run indefinitely when I have the I2C restart when an error is detected, but I'm getting I2C errors at a frequency of roughly 1 per second: I2C_Error: 2 - At Timestamp: 5844824 Error Count: 5492...
  39. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Changing to 4.7k did not help, if anything issue is worse after doing so...
  40. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Yes. I rechecked my schematic, there's a 1k pullup on each line. Which I realized is different from the recommended 4.7k. Could this be the issue or is that kind of a replaceable value? Will have to check when I get back to the bench.
  41. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Thanks for the reply! Just tried with a 100pf cap and I'm getting the same results. I did find a temporary workaround in code, by resetting the Wire1 object and the IS31 led driver whenever I get a wire error, but would like to find a better solution: #include <Audio.h> #include <Wire.h>...
  42. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    And when the board locks up, it repeated returns the error 3, which is an i2c timeout: if ((status & LPI2C_MSR_PLTF) || timeout > 50) { port->MCR |= LPI2C_MCR_RTF | LPI2C_MCR_RRF; // clear FIFOs port->MTDR = LPI2C_MTDR_CMD_STOP; // try to send a stop return 3;//4; // clock stretched...
  43. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    After doing some minor changes to the Wire library to make the errors more human readable I am seeing a lot of I2C error 1 and 2, which point to the following errors in the library. Does this give any clues as to what might be going on? Specific Errors: // monitor status uint32_t status =...
  44. G

    Errors Using Wire Library Alongside Audio on Teensy 4.1

    Hi, I'm working on an audio project where I am using an IS31FL3236A I2C LED driver alongside the Teensy 4.1 audio library with the CS42448 TDM codec. When running my code I get the expected visual behavior, but with a lot of I2C transmit errors, then at a certain point the I2C just stops...
  45. G

    Error Using Audio Library Envelope Object

    Wouldn’t the fact that this function is directly attached to an instance of the envelope class make it pretty obvious which one is being called? Unless audio stream is inherited by the envelope class, is that the problem? Maybe this should be mentioned in the documentation, because right now...
  46. G

    Error Using Audio Library Envelope Object

    Hi, I am working on a project using the Teensy audio library and am running into a strange error when trying to use the envelope object: MTG_Tomb_081122_FullHeartbeat:95: error: call of overloaded 'release(int)' is ambiguous env1.release(0); ^ In file included from...
  47. G

    i2c_t3 Library Incompatible with Audio Library

    Yeah that worked as a temporary expedient. Definitely don't love the idea of having to just into library code tho. For now I'm using the built-in DAC on the Teensy 3.2, so I don't have to use any of the control objects, but on a later project I'm going to be using the CS42448 codec. Are there...
  48. G

    i2c_t3 Library Incompatible with Audio Library

    Hi, I am trying to use the i2c_t3 library (found linked on the Teensy website i2c page) to do fast DMA based i2c to control an LED driver. Simultaneously, I am trying to run an audio library program. Because the audio library uses the Wire library for some objects (which i am not using for my...
  49. G

    Voltage Appearing on LED_BUILTIN pin during startup, Teensy 3.2

    So I'm looking at this code in mk20dx128.c: static void startup_default_early_hook(void) { #if defined(KINETISK) WDOG_STCTRLH = WDOG_STCTRLH_ALLOWUPDATE; #elif defined(KINETISL) SIM_COPC = 0; // disable the watchdog #endif } static void startup_default_late_hook(void) {} void...
Back
Top