I’m attempting to build a delay pedal that does only one thing: when you stomp the button, it plays back 30 seconds of high quality audio from 30 seconds ago.

I think it would need to be continuously overwriting some type of eeprom array. Does anyone have any advice?

I bought a few Teensy audio shields to try and prototype it. But I obviously need to understand how to achieve such a continuous rewrite on EEPROM or some other form of quick rewrite memory.

If someone could guide me to the right information, I’d be most grateful.

  • Treczoks@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    Don’t use an eeprom for that, just use RAM. For 30 seconds of HiFi stereo, you need 30480002*2 bytes, roughly 6MB. A Raspberry Pi like computer should have no problems with that, and there are high-end codecs available.

    • harryprayiv@infosec.pubOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      I’m trying to do this in a really small, portable format. So while that would work well with a Pi, this needs to be able to be powered by a 9V battery. So, I really need it to be a microcontroller instead of a full-on ARM chip.

      I could co conceivably do this with a PI Pico but I want to see about doing this in as compact and low power format possible.

      • Treczoks@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        Good luck finding a chip that is capable of storing the needed amount of data while being easily accessible and not wearing out quickly. SRAM could do this, but you are quickly approaching the USD100 mark for a single chip here. That’s why people use the way cheaper DRAM chips, which are used by bigger chips, I.e. the upper class of ARM chips. As far as I know, there are no sub-ARM class controllers with a DRAM interface.

        What you could do is use an FPGA like an Efinix Trion T20 or bigger, which has at least one version with a DDR memory interface. But that might be a bit big for a beginner to work with - even seasoned programmers fail at grocking HDLs.

        • harryprayiv@infosec.pubOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 days ago

          Thanks for the insight.

          FPGA’s can do anything. Verilog is no joke. I’m excited for FPGA’s to become a bit more approachable with the advent of OpenFPGA.

          • Treczoks@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            1 day ago

            Well, nearly anything. But yes, verilog or VHDL are tough, because they require a different mindset to approach problems and solutions.

            • harryprayiv@infosec.pubOP
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              1 day ago

              I find that Haskell and similar purely functional languages that use category theory pair well with situations that rely on parallelism. Especially Haskell because it is immutable and lazy (or Idris or Agda with their dependent types to prevent invalid circuits perhaps).

              Circuits as Bicartesian Closed Categories

              Maybe someday this stuff will be approachable to Arduino level tinkerers. Until then, I like to watch this guy make magic https://youtu.be/Q8K0aeqDBiI