Whatever happened to Sonic Crayon pedals?
Moderator: Ghost Hip
- codetocontra
- IAMILF
- Posts: 2070
- Joined: Sat Oct 29, 2011 12:52 am
- Location: parts unknown
Re: Whatever happened to Sonic Crayon pedals?
New Mechanical Sun, yes please.
- BetterOffShred
- IAMILFFAMOUS
- Posts: 3412
- Joined: Thu Aug 17, 2017 2:01 pm
Re: Whatever happened to Sonic Crayon pedals?
Also, the 4mb mram seems like it may be outclassed now, does your 4mb provide 14 seconds at full audio resolution, and then you just have that as a hard coded limit regardless of sample rate? That was my thought. Get enough memory to do like 20 seconds or so with full resolution and then as you crank down the sample rate it still stays as 20 seconds max ..BetterOffShred wrote:So you're blending between a high pass and a low pass in filtration stage it looks like to me, did you experiment with a band pass at all, or did the current design yield more extreme frequency sweep?cloudscapes wrote:PIC32MX470F512HBetterOffShred wrote:So what 32 bit microcontroller is the basis for the Mechanical Sun ?
https://www.microchip.com/wwwproducts/e ... MX470F512H
As Pladask said you want other supporting components hooked up to it too.
here's the schematic. has bugs minor bugs in it, since fixed.
http://dronecloud.org/stuff/mechanical_ ... ematic.jpg
I count 8 opamp, just out of curiosity did you use a couple of quads? I'm not very savvy at circuit design and I know sometimes you get better results splitting it up into a couple doubles for clock noise etc.. though that all seems to be handled by the microprocessor.
Every time I dream of my ultimate delay I always lust after a "repeats only" FX loop - which is pretty easy to do with an added TL072, but do you think with a design like yours it would be best handled by the microprocessor? Not sure if this is even the best place to ask these questions, but since we're all here celebrating your devices why not?
- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Whatever happened to Sonic Crayon pedals?
I haven't looked at potential new ram chips this year. got a link for SPI ram larger than 4Mb?BetterOffShred wrote: Also, the 4mb mram seems like it may be outclassed now
If I want memory size, the alternative is using parallel DRAM (which is used in the majority of big company delays), which I don't have the knowhow to use. The timings needed for DRAM are pretty crazy to nail down. I'm not even sure DRAM is supported by the microcontrollers I'm using.
still, I could put two ram chips instead of one, though that's really expensive at $40 a pop. and it's a speed/balance issue. I initially picked the 4Mb because it was the largest available (at the time) that had SPI and that made sense to use (flash memory isn't really usable for delay because of endurance). here's are the 4 delay time ranges on the switch:BetterOffShred wrote: does your 4mb provide 14 seconds at full audio resolution, and then you just have that as a hard coded limit regardless of sample rate? That was my thought. Get enough memory to do like 20 seconds or so with full resolution and then as you crank down the sample rate it still stays as 20 seconds max ..
1: 3924 samples long
2: 15750
3: 63000
4: 252000
The delay time control stretches the samplerate on the fly, so I found a balance of 4 octaves of delay time samplerate "range" of 18KHz at the lowest to 72KHz at the highest. Which translates to these 4 ranges:
1: 54.5 - 218 milliseconds
2: 218.75 - 875
3: 875 - 3500
4: 3500 - 14000
The range amount is a limiting factor on the rest of the design. If I increase the memory to gain either a higher max samplerate or larger max delay time, a couple problems pop up, factoring in that I really wanted to keep the 50-ish ms minimum delay time if I could.
- The system doesn't have infinite samplerate. I could pass-audio through at 96KHz in my tests, but just barely, the ADCs I use are rated at max 100KHz. And I needed free CPU time for other DSP and general control/modulation/pot sampling stuff as well.
- There are only 1024 possible "steps" for the delay time pot recognized by the micro. That's only 256 for each octave. If I increase the number of octaves per range to 5 or 6 (from 4), that's only 205 steps, or worse 170. Audible artifacts could be heard and I couldn't really get time interpolation working well enough to fix that.
- Using a more streamlined system using codec chips and floating point DSP to do the variable time stretching wasn't (and still isn't) an option for me. I'm not that good at programming. I can just about get a codec to pass audio through, but can't wrap my head around DMA (which is pretty mandatory for audio) even after trying on-and-off for years. Plus all the floating point sample interpolation stuff I'd have to do which I can just barely visualize at the most basic level. I'm completely self-taught (so inefficient), and I don't really have the brain for hardcore math. This would have been the best solution, it would have provided a lot more flexibility, but I'm just not close to good enough.
All these factors turned me off of using more memory, so I made a judgement call to try and get the best balance of time ranges that made the most musical sense and the most flexibility within a single time range, but factoring in delay time step precision on the pot, and that the highest uninterrupted samplerate it could do with in the 80s of KHz. I compromised and still ended up with something that spec-wise beat most boutique delays in terms of raw delay time. And I wasn't really aiming for high samplerate anyway. Using the PDS-8000 directly as an inspiration, I was comfortable with it being only mid-fi.
Beginner-friendly audio codec kits like the teensy are great and all, and are a good learning tool, but you'll notice most of them have one thing in common. Inflexible samplerate because of the very nature of how codecs work (fixed master clocks). I have yet to see one that can smoothly go up and down in samplerate (delay time) without using floating point math on samples.
To put it in another way:
- Adding a 5th or 6th longer delay range is possible, would require an extra $40 chip for the 28 second range. And for each additional 14 seconds with the samplerates I chose.
- Increasing the samplerate/fidelity beyond 80-ish KHz is possible, but not by me. I'm not smart, experienced or educated enough. It involves codecs, DMA, floating point sample math and other stuff that to me is too difficult to grasp after several hundreds of hours over the years of trying.
- Smooth variable delay "sweep" is doable in two ways. The oldschool variable samplerate way which I am already doing, but limits the max samplerate I can use on the longer end of the sweep. Or the new DSP floating point way. You keep the samplerate fixed and low (48-ish KHz is common) and do the stretching in software with floating point math and sample interpolation. But that is too advanced for me. The delay glitchy zippiness you hear in some delays is when you don't do it the good way. Because it's rounding to the nearest sample when you vary the delay clock and sample counter. And it gets even more complicated if you're "fake-sampling" at a high delay speed then crank it down.
Direct reply to this comment in particular. What you're describing, cranking down the samplerate while remaining at the max delay time is just samplerate reduction (the atari effect in bitcrushers). The erode knob on my delay already does that.BetterOffShred wrote: Get enough memory to do like 20 seconds or so with full resolution and then as you crank down the sample rate it still stays as 20 seconds max ..
For a variable delay effect, the max delay time *must* scale with the samplerate. If it doesn't, the delay loop won't "loop over". It's how all oldschool pre-DSP delays worked. Unless you're doing floating point math and fast sample interpolation that is, or other DSP wizardry I'm not smart enough to imagine.
- BetterOffShred
- IAMILFFAMOUS
- Posts: 3412
- Joined: Thu Aug 17, 2017 2:01 pm
Re: Whatever happened to Sonic Crayon pedals?
Dude
thanks for taking the time to explain that. I'm no circuit wizard so I'm sure I'll have to revisit this post as I work on my project.
As far as the mram goes, no I do not have a link to a better item. I just went to Mouser and looked around at stuff and read up on a few other audio projects and what people were doing.
So much Info in your reply. I will chew on it. The sample rate makes sense (erode function) and having it change time to "loop" makes sense now that I think about it.
I think your device is one of the better delays I've heard personally and I think the mid-fi angle is what makes it great.

As far as the mram goes, no I do not have a link to a better item. I just went to Mouser and looked around at stuff and read up on a few other audio projects and what people were doing.
So much Info in your reply. I will chew on it. The sample rate makes sense (erode function) and having it change time to "loop" makes sense now that I think about it.
I think your device is one of the better delays I've heard personally and I think the mid-fi angle is what makes it great.
- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Whatever happened to Sonic Crayon pedals?
That's about right, for the filter. I did it this way partially because I wasn't up to snuff with my bandpass filters, and partially because when I dialed in the middle, I wanted roughly a flat response. I'm not entirely happy with this filter though, and that will probably be a thing I redo when I revise this again. I've been dabbling with synth circuits last few years so maybe I'll adapt one of those. I definitely want deeper control than just your average delay tone knob.BetterOffShred wrote: So you're blending between a high pass and a low pass in filtration stage it looks like to me, did you experiment with a band pass at all, or did the current design yield more extreme frequency sweep?
I count 8 opamp, just out of curiosity did you use a couple of quads? I'm not very savvy at circuit design and I know sometimes you get better results splitting it up into a couple doubles for close noise etc.. though that all seems to be handled by the microprocessor.
Every time I dream of my ultimate delay I always lust after a "repeats only" FX loop - which is pretty easy to do with an added TL072, but do you think with a design like yours it would be best handled by the microprocessor? Not sure if this is even the best place to ask these questions, but since we're all here celebrating your devices why not?
Yeah two quad opamps. I don't worry about cross talk because it's all relatively low gain. It's not a fuzz or anything. I take care of the noise with the 4-pole lowpass in front of the ADC. Also a dedicated precision analog voltage reference keeps things nice and clean. You should have seen the first revision, I was using 16 opamps! I was so inefficient with the signal routing, and I was using some of them as a PWM generator/comparator for the non-pitch-shifting time-stretch feature, which I now do entirely in code.
If I understand correctly what you mean by handlng "repeats only" by the microprocessor, that part is done in the analog domain for my design, not the micro. Some delays have the feedback signal path done entirely in code, the feedback in mine is analog (even if the delay is digital). So the delay repeats get output by the DAC, through filters/tone control then resampled by the ADC, mixed with fresh signal. I think it sounds better that way.
- BetterOffShred
- IAMILFFAMOUS
- Posts: 3412
- Joined: Thu Aug 17, 2017 2:01 pm
Re: Whatever happened to Sonic Crayon pedals?
Good information and thanks again for sharing this with me/us.
I was looking at an arduino program to do non-pitch shifted time stretch, it's kind of interesting.. I am looking forward to seeing what happens there..
How do you achieve your modulation? I saw a guy use a ATtiny85 as a signal generator and then probably built code around the signal controlling the parameter of choice similar to analog implementation.
Sorry if I'm getting annoying. There's not a lot of dudes doing this kind of stuff willing to rap circuits.
I was looking at an arduino program to do non-pitch shifted time stretch, it's kind of interesting.. I am looking forward to seeing what happens there..
How do you achieve your modulation? I saw a guy use a ATtiny85 as a signal generator and then probably built code around the signal controlling the parameter of choice similar to analog implementation.
Sorry if I'm getting annoying. There's not a lot of dudes doing this kind of stuff willing to rap circuits.
- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Whatever happened to Sonic Crayon pedals?
So non-pitch-shifted time-stretch. I can explain in theory how I go about it. I didn't read up on how to do it, discovered a way accidentally while working on the old crushed glass sampler (this thing from 2010).
Any looper/delay needs a memory address counter. A counter that represents the sample # that needs to be read/written to at that given moment in time. By sample of course I mean a single voltage value, not an audible "sound". Many hundreds and thousands of samples in a second is when you start having audible sounds, since many hundreds/thousands of voltage changes form a wave. Just clarifying that for anyone reading who is less digital audio ninja.
A memory address counter can usually be as simple as:
This just increments it with each sample "tick" and loops it over to zero when it hits my arbitrary limit.
For the mechanical sun, I wrote a bidirectional counter:
It can count backwards or forwards depending on the state of the SENS_ring_sens boolean variable, and loops over in both directions as needed.
And the reason I did this is if I modulate the boolean state with a variable PWM signal (variable pulse width, and overall rate), I can have the counter go forward a certain amount and backwards a certain amount, over a very short period of time, and then repeated. I'm better with pictures.

Boolean state 0, go forward, state 1, go backwards. Modulate that with PWM, and you get what can be heard at this point in the demo. I didn't stop there though. It clicked strongly at each point of the change in direction of the counter, so I introduced audio fade-out/fade-in at every point that was triggered, smoothing out the hard audio edges. If I were better at this, or if I redesigned the whole thing and really sat down to think things through, I'd probably do crossfade instead. Make it even more buttery!
In delays/loopers, usually if you want to time-stretch you vary the playback/delay rate. But this also makes the pitch go up and down. That's because most delays/loopers do this by varying the sample counter rate. Which is a cool effect. The mechanical sun can do that too, but the additional modulation I described above adds an extra layer of being able to slow and speed up things without ever changing the sample counter "advancement speed"! I can do both independently with this type of thing. I can even slow down the loop, but make it pitch up! Which is completely fucked up if you're used to normal delays!
Any looper/delay needs a memory address counter. A counter that represents the sample # that needs to be read/written to at that given moment in time. By sample of course I mean a single voltage value, not an audible "sound". Many hundreds and thousands of samples in a second is when you start having audible sounds, since many hundreds/thousands of voltage changes form a wave. Just clarifying that for anyone reading who is less digital audio ninja.
A memory address counter can usually be as simple as:
Code: Select all
if (address_variable == address_limit) {
address_variable = 0;
} else {
address_variable = address_variable + 1;
}
For the mechanical sun, I wrote a bidirectional counter:
Code: Select all
if (SENS_ring_sens == 1) {
if (MEM_address >= MEM_address_range) {
MEM_address = 0;
} else {
MEM_address = MEM_address + SENS_ring_sens;
}
MEM_address_dac = MEM_address + SENS_ring_sens;
if (MEM_address_dac > MEM_address_range) {
MEM_address_dac = 0;
}
} else {
if (MEM_address == 1) {
MEM_address = MEM_address_range;
} else {
MEM_address = MEM_address + SENS_ring_sens;
}
MEM_address_dac = MEM_address + SENS_ring_sens;
if (MEM_address_dac == 0) {
MEM_address_dac = MEM_address_range;
}
}
And the reason I did this is if I modulate the boolean state with a variable PWM signal (variable pulse width, and overall rate), I can have the counter go forward a certain amount and backwards a certain amount, over a very short period of time, and then repeated. I'm better with pictures.

Boolean state 0, go forward, state 1, go backwards. Modulate that with PWM, and you get what can be heard at this point in the demo. I didn't stop there though. It clicked strongly at each point of the change in direction of the counter, so I introduced audio fade-out/fade-in at every point that was triggered, smoothing out the hard audio edges. If I were better at this, or if I redesigned the whole thing and really sat down to think things through, I'd probably do crossfade instead. Make it even more buttery!
In delays/loopers, usually if you want to time-stretch you vary the playback/delay rate. But this also makes the pitch go up and down. That's because most delays/loopers do this by varying the sample counter rate. Which is a cool effect. The mechanical sun can do that too, but the additional modulation I described above adds an extra layer of being able to slow and speed up things without ever changing the sample counter "advancement speed"! I can do both independently with this type of thing. I can even slow down the loop, but make it pitch up! Which is completely fucked up if you're used to normal delays!
Last edited by cloudscapes on Wed Oct 10, 2018 9:32 am, edited 5 times in total.
- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Whatever happened to Sonic Crayon pedals?
Delay time modulation was far easier. I have a sine wavetable on the chip that I can pull data from at any given moment. For delay time modulation, I have a variable speed sine address counter that just loops through the sine in the background at LFO speed, and I add whatever value that is at that given moment to the delay time variable. With variable depth. All digitally, no external wiring outside the micro.
Ring modulation was a variation of that. I run the sine table counter at an audible rate instead of LFO rate, and instead of modulating the delay time with it, I multiply it's value with the audio signal. It's how analog ring modulation works, and here I just do it digitally.
A lot of the stuff that goes on as far as signal generator to modulate other aspects of a design are all done digitally. I don't need to output modulation signals outside of the microcontroller then feed them back in to have them actually modulate something. I can keep it all inside as variables.
Ring modulation was a variation of that. I run the sine table counter at an audible rate instead of LFO rate, and instead of modulating the delay time with it, I multiply it's value with the audio signal. It's how analog ring modulation works, and here I just do it digitally.
A lot of the stuff that goes on as far as signal generator to modulate other aspects of a design are all done digitally. I don't need to output modulation signals outside of the microcontroller then feed them back in to have them actually modulate something. I can keep it all inside as variables.
- cherler
- experienced
- Posts: 616
- Joined: Tue Oct 06, 2015 4:48 pm
- Location: Dirtona
Re: Whatever happened to Sonic Crayon pedals?
That's really clever! I've thought about trying to stretch without pitching by looking for maxima in the waveform and trying to repeat individual cycles in various ratios, but it seemed to me that reliably catching the maxima of the fundamental frequency would be tough. This seems a lot more robust.
- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Whatever happened to Sonic Crayon pedals?
Your way would be an interesting less-repetitive way to do it that would have a more interesting granular texture I think. While mine definitely has a rhythm to the sound when I'm time-stretching. A sub-audio harmonic thumping that changes when I twist the rate of the PWM up or down. But yeah as you said it's really straightforward (pun not intended).
- BetterOffShred
- IAMILFFAMOUS
- Posts: 3412
- Joined: Thu Aug 17, 2017 2:01 pm
Re: Whatever happened to Sonic Crayon pedals?
I feel like all this discussion deserves a separate thread or at least the title of this one should be like "Sonic Crayon still laying it down" or something 

- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Whatever happened to Sonic Crayon pedals?
so, is fifteen knobs for a ringmod too many? asking for a friend. 

- whoismarykelly
- FAMOUS
- Posts: 1900
- Joined: Sun Nov 28, 2010 1:25 pm
Re: Whatever happened to Sonic Crayon pedals?
Double it. For stereo of couse.cloudscapes wrote:so, is fifteen knobs for a ringmod too many? asking for a friend.
- Chankgeez
- IAMILFFAMOUS
- Posts: 42134
- Joined: Tue Oct 11, 2011 1:40 am
- Location: https://www.youtube.com/watch?v=FGhbeHujNZQ youtube.com/watch?v=V-2l7kkBURc
Re: Whatever happened to Sonic Crayon pedals?


…...........................…psychic vampire. wrote:The important take away from this thread: Taoism and Ring Modulators go together?
Sweet dealin's: here
"Now, of course, Strega is not a Minimoog… and I am not Sun Ra" - dude from MAKENOISE
#GreenRinger
- oldangelmidnight
- IAMILFFAMOUS
- Posts: 3725
- Joined: Sat Aug 08, 2009 12:17 pm
- Location: Northampton, MA
Re: Whatever happened to Sonic Crayon pedals?
Zvex has 20. You're going to have to try harder.


