Search results

  1. h4yn0nnym0u5e

    Compiler.. Thing? __func__

    The Free Software Foundation? See this documentation, and specifically the last sentence:
  2. h4yn0nnym0u5e

    Odd compiler warning?

    SD::open() doesn’t take a set of bitwise flags for its second parameter, it takes one of three “mode” values: FILE_READ, FILE_WRITE or FILE_WRITE_BEGIN. This is of type uint8_t, hence the erroneous value 513 that you got from or’ing together flags is too big for it, and the compiler complains...
  3. h4yn0nnym0u5e

    PSRAM under Teensy 4.1

    You can use two to get 32MB: https://www.pjrc.com/category/news/
  4. h4yn0nnym0u5e

    Custom PCB with Teensy4.1, ESP32 and SIM7600

    I was referring to your project when I said I can't find any repos... Thanks for this. I just merged the buffered-SD-audio-EvR branch into buffered-SD-for-PR. The EvR one was the latest and greatest, having a number of fixes which allow read/write use of the SD card from your sketch even while...
  5. h4yn0nnym0u5e

    Custom PCB with Teensy4.1, ESP32 and SIM7600

    I can’t lay claim to the Audio library, it’s part of Teensyduino, and the work of many hands. The buffered SD playback, yes - and with luck that will be pulled into the official release some time… I did a quick search, and can’t find any repositories with this in - is it closed-source?
  6. h4yn0nnym0u5e

    A new and more modern way to access and modify registers

    Hmm ... so if I want to write a method like bool initSAI(SAI& mySAI, SAImode_t mode) // mode is I2S, TDM, S/PDIF etc. { switch (mode) { case SAI_mode_I2S: mySAI.TCR1 = value for TCR1 mySAI.TCR2 = value for TCR2 ... break...
  7. h4yn0nnym0u5e

    A new and more modern way to access and modify registers

    I’m definitely keeping it in mind as a useful resource. The thing is that most of my register-bashing use is modifying existing libraries, where adding another dependency is unlikely to be especially helpful. It’s hard enough as it is to get a PR merged… I think the only peripheral I use...
  8. h4yn0nnym0u5e

    A new and more modern way to access and modify registers

    I’m sorry, but … just no. If you’re happy doing bit shifts and masks in your head, that’s great. I’m not. The field names match the datasheet (which I agree you need to have to hand - no question). Using “readable” ones would just add a different layer of complexity, as you’d lose the 1:1...
  9. h4yn0nnym0u5e

    Soft-patchable synth - Proof of Concept

    Here's some test code: /************************************************************************** Teensy 4.1 basic DMA thrash test MicroDexed setup uses PCM5102; add a control object if your audio hardware requires it...
  10. h4yn0nnym0u5e

    Soft-patchable synth - Proof of Concept

    It’s almost certainly not… I’ve experienced DMA contention with audio, and it’s not just “annoying ticking”, it’s horribly garbled. This ticking is only really perceptible when all synth voices are silent, and is synchronised with the free memory and CPU usage monitor you can see at the bottom...
  11. h4yn0nnym0u5e

    Improvements to FFT

    OK, I've hacked together a test sketch which can compare the old and new FFTs. I'm fairly content that they produce identical results where possible (which I'm sure I would've tested, though I can't find the relevant code...). I can't compare the averaging for the FFT1024, because the old...
  12. h4yn0nnym0u5e

    Improvements to FFT

    I think you're correct. I need to dig out / create a test sketch to make sure I've reproduced the output of the original code accurately, while making it more efficient ...
  13. h4yn0nnym0u5e

    A new and more modern way to access and modify registers

    Maybe easier to write, but a complete pain to read o_O. Compare I2S0_TCR4 = I2S_TCR4_FRSZ(3) | I2S_TCR4_SYWD(0) | I2S_TCR4_MF | I2S_TCR4_FSP | I2S_TCR4_FSD; with I2S0_TCR4 = 0x00030013; I know which one I'd rather be confronted with. I've not looked at how that would pan out using @shawn's new...
  14. h4yn0nnym0u5e

    Audio Adaptor Board Output Impedance

    The SGTL5000 datasheet I have (rev 7 from 2022) has this table:
  15. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    …oh, I see … “audio” isn’t in the title. But the post is in the Audio section of the forum :)
  16. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    Not for the ILI9341_t3n library, as far as I can tell. All the code and comments I can find suggest only full-screen updates are implemented. As I found out when updating the ST77xx library, an asynchronous change to a clip rectangle is actually quite hard to achieve. The general case for a...
  17. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    Not that pushing it should really be necessary. 105MHz is about 52MB/s, but 16 stereo channels at 44.1kHz is only 2.8MB/s. Which is why streaming from SD card can work just fine, provided you’re careful how you go about it. Which I am…
  18. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    Note that recently a 16MB PSRAM chip has become available, and the latest Teensyduino supports it, so 32MB is possible. Not sure how widely available they are. I’ve not used Flash much. AFAIK it’s mostly supported by LittleFS, and is OK if you pick one on the supported list. It may get...
  19. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    That works, as long as you have PSRAM fitted (it wasn’t mentioned…), and as long as you don’t want to play more than 95 seconds of mono audio (do your own maths for stereo, or multiple simultaneous files), and you can tolerate the time taken to re-load when changing samples (best case about 0.4s...
  20. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    Yes, anything you can do to reduce the time taken for a single display change will help. Assuming a SPI bus speed of 16MHz, keeping operations to fewer than 1000 pixels will make them take less than 1ms, very roughly. To draw a large amplitude bar of say 20x200=4,000 pixels, draw it in four...
  21. h4yn0nnym0u5e

    teensy 4.1 Display and SD Card issues

    Yup, AI fails again... As noted by @jmarsh, not applicable since the SDIO slot is already in use ...so this isn't applicable either Not stated by OP, but almost certainly already true Entirely irrelevant, SD card streaming is not affected by audio block allocation It would be useful to know...
  22. h4yn0nnym0u5e

    Implementing an FIR filter

    The FIR filter requires an even number of coefficients. If you want a 5-tap filter, you need to set num_taps to 6, and append a zero value to intTaps[].
  23. h4yn0nnym0u5e

    Application Update via SD

    For what it’s worth, I often find it very helpful to be able to follow development progress through successive minor changes, ideally on one or more branches that then get merged to trunk (or whatever your preferred name is). If a library change breaks my sketch, the wholesale “add files via...
  24. h4yn0nnym0u5e

    MTP status

    Yes, but as with most non-standard USB settings the Arduino IDE and Teensyduino add-on don’t make it easy. For my own purposes I’ve made a utility to add extra settings - the repo I’ve linked there can also build menu settings to allow you to select them, but I have no plans to make them...
  25. h4yn0nnym0u5e

    Jteensy8000 - Clone of a clone with extra filters

    That’s not really a different library - the ReadMe says it’s based on the terrible one you had trouble with before… There certainly need to be pull-ups! They aren’t optional. And if you want to get to 400kHz they really need to be about 2k2 with short wires. For this sort of issue it’s a good...
  26. h4yn0nnym0u5e

    Different implementations for polyphony

    I imagine the const was just copypasta, but @jmarsh makes a good point which is often overlooked - EXTMEM and DMAMEM can’t be initialised at compile time. All you can do is define the space, then fill in some data at run time, e.g. from a file on SD card or live from a record queue. And of...
  27. h4yn0nnym0u5e

    Jteensy8000 - Clone of a clone with extra filters

    You don’t say which FT6336U library you’re using, but I’m pretty sure I found it. It’s no wonder you’re having problems, as it’s appallingly badly written. I suspect this line is the cause of most of your woes - I’d suggest you comment it out to see what happens.
  28. h4yn0nnym0u5e

    Different implementations for polyphony

    Question 6 - yes, the ARM processor essentially makes no distinction between memory areas, unlike older Arduino generations where you had to treat PROGMEM and RAM very differently. PROGMEM (Flash) and EXTMEM (PSRAM) run at very similar speeds, i.e. slower than the 1MB of internal RAM, but plenty...
  29. h4yn0nnym0u5e

    Program accidentally erased?

    Hmmm. On closer reading of the Hardware Initialisation section for the bootloader, it appears the “new Teensy” process still requires two physical steps - a short press on Program to load the safe copy of Blink, then the long press to copy it down for the first time. So the “wild branch at power...
  30. h4yn0nnym0u5e

    Program accidentally erased?

    Been following these threads with interest, and a thing just occurred to me… The Teensy bootloader chip is just another processor, and presumably spends the vast majority of its life running a very dull state machine looking for activity on the Program pin and comms from the Teensy. The only...
  31. h4yn0nnym0u5e

    Different implementations for polyphony

    Questions 1 and 2 - the answer is bound to be “it depends“. But 12-poly is possible with pretty complex topologies on an overclocked Teensy. Question 3 - a completely disconnected object is marked inactive and consumes negligible CPU time (just enough to discover it’s inactive and move on to...
  32. h4yn0nnym0u5e

    Wind Synth Advice

    You probably need more CCs than just breath for a truly expressive sound; a reed or bite sensor for pitch bend is “traditional“, but an accelerometer is probably easier to implement and gives more channels to play with. Using modulated waveforms makes pitch bend easier, and lets you vary things...
  33. h4yn0nnym0u5e

    ARM_DWT_CYCCNT

    It’s super simple, just an unsigned 32-bit counter that increments on every CPU cycle (hence the CYCCNT). On Teensy 4.x at the default 600MHz it thus rolls over to zero about every 7 seconds. I really can’t think of anything else to say about it…
  34. h4yn0nnym0u5e

    Teensyduino 1.62 Released

    Looks like it does
  35. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    I'm (nearly) seeing that, too. It's 14, rather than 15, and 500 in the next column rather than c0.
  36. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    OK, so it's putting queue_buffer in RAM2, not EXTRAM (aka EXTMEM). Looking at the source, this seems correct, so not entirely sure if I have your current (troublesome) code. Forcing it into EXTRAM still works, yes.
  37. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    OK, switched back to the released version of cores, and this is what I get: Memory Usage on Teensy 4.1: FLASH: code:103648, data:160952, headers:8804 free for files:7853060 RAM1: variables:282912, code:98600, padding:32472 free for local variables:110304 RAM2: variables:356480 free...
  38. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    Any particular USB setting? I’m getting somewhat different memory sizes.
  39. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    Yes - if you could shave >=296 bytes off the code or variables then you’d have low padding and more stack space. Then again, 110,304 should be easily enough for any sane application! If I recall correctly it was quite hard to nail down the point at which the Teensy crashed during boot. It...
  40. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    There were some startup issues fixed from 0.60.5 onwards which sound very much like this. They manifested as red LED blinks after flashing new code (8 could be the number…), but apparently minor changes could make them disappear … until they came back! I experienced this a lot with Audio and...
  41. h4yn0nnym0u5e

    SD.open()?

    I was commenting about the subassembly behind the glasses. The foreground wiring is still a mystery … four neat bundles but no clue as to their source or destination. It would reduce emissions and pickup, but I’d be a bit surprised if it made a huge difference, unless the PWM is in the same...
  42. h4yn0nnym0u5e

    TLV320AIC3104 can`t get it working

    The existing driver can be made to work without the I2C multiplexer used to allow 4 devices on a TDM bus. You need to edit this line. And the associated examples should give you a starting point for a simple test, though obviously they’re aimed at the 8x8 board so will need tweaking. I‘d say...
  43. h4yn0nnym0u5e

    SD.open()?

    Is that your typical SD card wiring hidden behind your glasses? You might want to try putting series resistors in SCLK, MOSI and MISO. 100R is a good start, but somewhere in the range 47R to 220R ought to work. They’ll reduce ringing on the fast edges, which I guess could be affected by the PWM.
  44. h4yn0nnym0u5e

    TLV320AIC3104 can`t get it working

    You might want to read through this thread. Lots of information there, and the final boards work well. Your issue may well be the requirement for an inverted BCLK. @palmerr elected to take the hardware option, but it’s possible to flip a register bit to achieve it, too.
  45. h4yn0nnym0u5e

    teensy 4.1 with psram

    From the start: Put a tiny blob of solder on one corner pad Using tweezers position the PSRAM as best you can Reflow just that corner pad Solder the opposite corner pad; you can make minor position adjustments with the tweezers, the legs are slightly flexible - test before you solder! Solder...
  46. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #4 - Release Candidate

    Also, it looks like you didn’t select an MTP-capable option in Tool/USB Type
  47. h4yn0nnym0u5e

    why is this in RAM1?

    …where it won’t get initialised. See here
  48. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #2

    I recall wanting to remember stuff, too. Not sure what it was, though…
  49. h4yn0nnym0u5e

    Teensyduino 1.62 Beta #2

    This thread, maybe? Or possibly this one? I’ve recently experienced the linking in of odd stuff I wasn’t using, as referred to in this post. Unfortunately it’s in an application which uses quite a few heavily modified libraries, and a modified cores, so it‘s hard to “post a simple example”. But...
Back
Top