Author Topic: What storage medium do "off the shelf" guitar looping pedals use?  (Read 7737 times)

0 Members and 3 Guests are viewing this topic.

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #25 on: July 24, 2020, 09:38:19 pm »
I did think of a wrinkle with DRAM: memory refresh. Normally it’s not a big deal, but for audio work you’d need to consider the inpact. It might be necessary to buffer some milliseconds of audio in microcontroller SRAM to avoid glitches.

For SD cards another issue would be flash wear out. Probably not a big deal. Audio bufffer in microcontroller SRAM would definitely be required.

I wonder whether DRAM or SD card would be lower power?
Refresh cycle density is so low its not an issue. If you use an SD card, buffer in DRAM. SRAM is a rich man's plaything.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2499
  • Country: us
  • Yes, I do this for a living
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #26 on: July 25, 2020, 02:31:42 am »
I did think of a wrinkle with DRAM: memory refresh. Normally it’s not a big deal, but for audio work you’d need to consider the inpact.

If you set it up properly, all of the memory will be accessed during the course of storing and reading the samples, so you don't need to do the refresh.

Also, even older SDR DRAM is faster than necessary for audio looping access. For memory writes, then, your samples get stored in a FIFO first before being burst written to the DRAM. So if there's a refresh cycle, you can hold off the burst write until the refresh cycle ends. Reads are similarly bursty, so you'll read a whole buffer's worth and there's dead time between those bursts during which you can refresh. DMA access to the SDRAM from/to an ARM's on-chip SRAM should hide all of that from you.

Think about it -- at 48 kHz sampling you have to present new samples to the DAC every 20.8 us, and you read new samples from the ADC every 20.8 us. How many bytes can you write or read from your DRAM in that one sample time? Lots!

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17049
  • Country: fr
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #27 on: July 25, 2020, 03:23:14 pm »
Regarding the buffering, keep in mind that a double-buffer scheme is a necessity in order not to generate audio glitches. Since a typical looper use will be playback + recording at the same time, that's at least 4 times a single audio buffer that's required here. If you use SDRAM for your main storage, only relatively small buffers will be necessary - typically a couple ms worth of audio should be more than enough. If you're using Flash/SD cards, you'll need much larger buffers - you may find that you don't have enough RAM on a given MCU to do this.

Just a couple figures: at 16-bit, 44.1 kHz: 1 ms of audio => ~88 bytes. So any SDRAM-based solution can be implemented even on an MCU with pretty limited internal SRAM. If you're using an MCU that can directly stream data from SDRAM to an I2S peripheral, you may even not need any intermediate SRAM buffer.

100 ms => 8820 bytes. Times 4 => 35280 bytes. Consider MCUs with at least 48 or 64 KBytes of SRAM. I think 100 ms of buffering would be a good starting point if you're using SD cards - of course using a good, class 10 card should get you lower max latencies so you may be able to use smaller buffers.

Regarding SD cards, as I said before, even though they may look like a simple and cheap (at least for an amateur design) solution, you may encounter more problems than you think trying to use them. You'll need proper "drivers" and at least a minimal filesystem. Thing is, IME, most available and free ready-made libraries for that are crap one way or another: very lousy performance, bugs, sometimes hard to figure out... In the same vein, many free filesystem libraries you'll find will also have poor performance. Writing that all from scratch is of course possible, but is definitely not trivial. SO getting it right and robust may not be as easy as you think.

Anyway IMHO, as I suggested earlier, I think starting with a small dev board with some Cortex M4 or M7 MCU, SDRAM and audio codec should be relatively straightforward. You could also consider an FPGA-based solution as some have suggested, but unless you're experienced with FPGAs, I wouldn't recommend it. Besides, a looper will required some UI to be useful, and implementing a decent UI is always much easier on a MCU IMO.

As to what existing pedals typically use - I have never torn one down, but I'd be pretty sure most of them use some kind of MCU or DSP, along with SDRAM. Depending on the features and the manufacturer, I wouldn't be surprised also if some pedals from the big players, such as the Boss one I mentioned, used some ASIC instead of an off-the-shelf MCU/DSP to further cut costs down.
« Last Edit: July 25, 2020, 03:48:13 pm by SiliconWizard »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17049
  • Country: fr
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #28 on: July 25, 2020, 03:39:55 pm »
cd quality mono is 700kb/sec how slow can an SDcard be? and you could have a decent buffer in most mcus

Since a typical use case is playback + recording at the same time, double that. If you want to support stereo, double that further. If you ever want to implement your looper such that it can read several "tracks" simultaneously and mix them in real-time while still recording (some loopers can do this), that can be yet a lot more.

Now sure even a very lousy SD card these days will have read and write throughputs of several MBytes/s - on average, so average throughput shouldn't be a concern, but access times can be lousy and non-predictable on some cards, which have very lousy controllers, especially when you're constantly *reading and writing* alternately (as I mentioned, going for a class 10 card would likely be a smart move as it would give much more predictable acess times). I really suggest experimenting and see for yourself - between that and what I mentioned above about SD card libraries and filesystems, I'm not saying it's impossible whatsoever, but I'm pretty positive it's not going the picnic some appear to be thinking, at least if you want something reliable and 100% glitch-free.

Of course I'm talking about something decent - commercial material. Now if all you target is a toy project based on an Arduino, and SDCard and maybe even internal ADC/DAC, being OK with occasional crackling sounds and low-fi audio, that's another matter entirely.

advantage of nonvolatile storage is that you can have stuff prerecorded

Typical use for "pedal" loopers is live use, or studio use but then you're usually fine as long as the pedal is powered on. But of course if it's a requirement, add non-volatile memory. Really depends on what you want to use that for. My two small cents - just don't underestimate the kind of headaches it could give you.
« Last Edit: July 25, 2020, 03:42:47 pm by SiliconWizard »
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: us
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #29 on: July 29, 2020, 01:32:41 am »
In this case looking at what was done in the past doesn't make any sense to me.   Instead evaluate contemporary tech that gets you the results you want.   there are all sorts of storage technologies out there.   Bubble Memory is a thing of the past, but  there are modern things like MRAM that come in 16Mb packages, and FRAM.   Not exactly high density solutions but very capable.

In any event if you want cheap & high capacity the only answer is some form of EEPROM / Flash technologies.   
 

Offline duckduck

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: us
  • 20Hz < fun < 20kHz, and RF is Really Fun
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #30 on: July 30, 2020, 02:51:05 pm »
Even for just delay, bucket brigade chips are an expensive and complex solution.

The delay pedals that still use them are generally way more expensive, because they require NOS chips. I seem to recall someone doing a re-tape of one of the old bucket-brigade delays, but don't know if that ever actually happened.

Bucket brigade chips are currently being made. Here's one for 5 pounds:

https://electricdruid.net/product/v3208-2048-stage-delay-line/
 

Offline avogadro

  • Contributor
  • Posts: 34
  • Country: hr
Re: What storage medium do "off the shelf" guitar looping pedals use?
« Reply #31 on: August 01, 2020, 09:02:41 pm »
I suspect they may use realtime compression/decompression, could be a proprietary or standard codec, but only one way to find out - buy one and RE it.
Why would you introduce such complexity for small lengths of recording when DRAM is so cheap?

Smack an FPGA in it and implement a turbo encoder. Easy  :-DD
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf