List of SpinASM code for guitar effects pedals and other applications
Introduction
The goal of this project is to be a comprehensive directory of patches, programs, or banks for the Spin Semiconductor FV-1 DSP integrated circuit (IC) that can be used in DIY guitar effects pedals, and other hobbiest projects. It is community-driven and built entirely of contributions from people like you, so please submit any programs you'd like to share.
;disco mixer program
;pot0 = reverb to infinity
;pot1 = flange; zero delay at full counter clockwise
;pot2 = low pass filter (4 pole)
Mark S. says
If you take the time to dial in the LP filter, and adjust the wet/dry mix, you can get some amazing sounds that have a rare blend of being both unusual and very usable.
;begin distorting signal at -18dB (input referred).
;At the output, the signal will begin to distort at half
;of full scale, and further increase of input signal will
;cause increasingly 'flattened' signal peaks.
;This is an ideal module to be driven by a compressor,
;where sustained notes can be on the edge of distortion,
;and actual signal clipping can be prohibited.
;mono in, mono out, no controls, 24 ticks
Chorus with Rate and Depth controls and sounds just like a normal chorus but adds in the 2nd rate control to spook things up a bit. Rate 2 completely CCW turns it off.
taps are treated in parallel ; feedback & damping are fixed, but f/b varies slighly depending on delay time (longer time, less f/b) ; damping for each tap is different
taps are treated in parallel ; feedback & damping are fixed, but f/b varies slighly depending on delay time (longer time, less f/b) ; damping for each tap is different; With chorus
Freeverb is a stereo reverb unit based on Jezar's public domain C++ sources, composed of eight parallel comb filters on both channels, followed by four allpass units in series. The filters on the right channel are slightly detuned compared to the left channel in order to create a stereo effect.
POT0 is mostly flange speed
POT1 is reverb time combined with a swept high pass on a parallel delay line
POT2 is the mix level for the flange and delay. Reverb comes through in any case.
Sounds like a phaser but in fact it is not one, strictly speaking. It is built up from resonant high pass and low pass filters mixed together. Adds another delay to the resonant low pass
I've recreated some patches quickly showing what I think I was trying to demonstrate.
Check "patch information" for each patch to see my notes on these. Patches 1-4 represent my quick dialing up of several chorus sounds which are pleasing to me.
The Power block can be placed after a Pot control to change its curve or "taper". Using increasing powers causes the controlled effect to come in "later" in the pot's rotation. Use increasing powers with "invert" and "flip" both set in the control panel to make the effect come in "sooner". Even when you are using a single control, you can process it differently for each destination if that's what you want. This allows you to fine-tune the sonic blend all along the rotation of the control pot.
Open up the control panels and adjust the sounds to your own tastes. Thousands of subtle and not- so-subtle variations are possible.
There is a tradeoff required between LFO width and LFO speed unless you are looking for sci-fi sounds. Many of the patches use a single control which turns the speed up while turning the width down to achieve a wide range of acceptable chorus sounds with a single control. This is less flexible than using separate controls, but it's entirely up to you.
In addition, the longer the chorus delay time, the less width you need to achieve a given level of detuning.
We have both filter tremolo and volume modulation with LFO 90 degrees phase shifted. This is similar to harmonic tremolo as found in some vintage tube amps.
One of the coolest things you can do with the fixed SVP block is to make a "tremolo" type sound using the crossfade block. The concept is tremolo but it sounds a lot like a flanger at times. Adjust the filter frequency and resonance to taste. I think you'll want to keep the resonance below 6 most of the time.
I love this one! Many variations possible.
Digital Larry says
Here's another variation on the filter tremolo. We have both filter tremolo and volume modulation with LFO 90 degrees phase shifted.
This is similar to harmonic tremolo as found in some vintage tube amps. Harmonic tremolos may use separate filters for the high and low sections, whereas this implementation uses the high and low outputs of a single state variable filter. You could of course add a second filter so that the corner frequencies could be controlled independently. Also I'm pretty sure that harmonic tremolo varies the high and low amplitude 180 degrees out of phase with each other. This may be a better sound than having them 90 degrees apart. Nice thing is that you can experiment with all sorts of different ways of doing it.
Flanger using rectified-sine modulation. LFO frequency and width are in inverse relationship from the pot to give good results over a wide frequency range with one knob.
Here's the idea of an oil-can delay. It uses a drum which is insulating but has a conductive outer surface. It runs through a reservoir of oil and a brush contact connected to a voltage amplifier from the input writes electrons onto the surface which are picked up by another brush on the other side of the drum. So the delay time is related to the angular displacement of the brushes and the RPM. For example if the brushes are 180 degrees apart, and it's going 60 RPM (1 rev/second) then that is a 500 msec delay. t (seconds) = (angle/360) * 60/RPM = angle / (6 * RPM). Faster the RPM, the shorter the delay.
Next there is a wobble (LFO chorus) due to the drum being off center. The rate of this corresponds to the RPM or revs per second. Faster the RPM, the faster the chorus LFO.
So we need an inverse relationship between chorus rate and delay time from one pot which controls the delay time setting. This you can see from the inverted scale going to the chorus block lfo rate input from pot1 which also goes through a smoother. The net effect of changing the scale/offset blocks (or the delay max time, or the chorus LFO max rate) is to change the angular displacement of the read and write brushes. If the specifics are important, figure it out but you can get different sounds by changing these ratios. Interestingly, the "size" of the drum makes no difference.
I used the multi-tap delay block because supposedly some oil can delays had two heads, but I'm not sure.
Pot0 = delay time/lfo rate (limited range setting, try making it longer if you like)
Pot1 = chorus width
Pot2 = feedback
Mark S. says
This sounds really nice, and takes on a very 'rubbery' sound to it when you crank up the chorus width
This one uses 3 delay lines with relative lengths in a ratio of 3 - 4 - 5 which I just learned is considered a good ratio for such things. No all pass filters or anything fancy. Adjustable low pass filters in each delay line feedback. Doesn't sound bad for something so simple!
I finally figured out that much of the magic requires one of the delay lines to be inverted so that they fully cancel when they line up.
I'm sure there's more that could be done here. Play with the LFO width (shorter seems better), the servo gain, tap ratio, and LFO speed (slower seems better for bringing out the drama of the TZF).
P0 sets delay time from a few ms to about 975ms.
P1 sets the feedback amount from 0 to max. The Feedback path is also has both HP and LP filters
(70Hz and 2290Hz resp.) for a bit of bucket-brigade flavor.
P2 sets the amount of phaser sweep in the feedback path from 0 - slow - fast.
Possible mods:
Change the LPF filter in the Feedback path for brighter or darker delay tones.
Change the Frequency and Resonant peak settings in the SVF 2P block for different phaser tones.
Mark S. says
I wasn't able to get this to work. Neither with the spn nor the spcd. Haven't done any investigation yet, though
Mark S. says
I fixed this by replacing the SVF 2P block with an updated one. Perhaps they used a much older version of SpinCAD?
The Choirsaw (mono edition) is a bit on the bizarre side. It's a delay at its core but combines pitch shifting and tremolo. The result is something pretty unique and also musically interesting.
P0 sets the delay time from long to short (about 800ms to a few ms). It also cross-fades into the
pitch-shift as it is turned up. So, when the delay gets shorter more pitch shift is available in the
feedback path.
P1 sets the feedback amount and pitch shift volume. The key to making this sound good was
being pretty aggressive with the filter on the pitch shift. With too little filtering is just sounded like
an icepick as the notes continuously jumped octaves. As is, it creates more of a sonic bed as the
octaves increase.
P2 sets the sinewave tremolo speed from 0 - slow - fast. This gets really interesting when you set the delay to slow, feedback high and trem fast. Try it!
It's really easy to make some out-of-this-world sounds - great for experimental, trippy music - but with some careful tweaking you can achieve som really beautiful effects that are simpler to harness.
Spring reverbs sound 'boingy' because of dispersion in the spring - higher frequencies travel slower than low frequencies. A 'spectral delay filter', consisting of many (100's) of unit allpasses will produce the desired 'chirp' impulse response...
When using with a guitar, the tone knob isn't terribly useful, but once you find a good spot for it, it really rips. You can get some thick, meaty fuzz with this.
Its got 6 programs, selectable by pot0.
the first 4 are dual shifts, that is 3 note harmonies.
Crossfade the 2 shifts with pot1, and crossfade effect and dry with pot2.
Fifth program is a single manual shift, with +/- 1 octave by pot1.
This one is alot of fun with a microphone.
Sixth is a detune chorus, with shift set by pot1.
This one sounds very nice. Laughing
;pot0 6 program select, select one of 4 dual pitch shifts, manual pitch shift or detune chorus
;pot1 dual shift crossfade or single pitch
;pot2 crossfade between dry and shifts
This routine is based on Mick Taylor's (Ice-9s) reverb loop
and shimmer code with some changes such as:
1) Prime numbers for delay line lengths.
2) More linear mapping of pot sweep to reverb time.
3) Anti-aliasing filter before the pitch-shifter.
4) Shimmer level is controlled by feeding both the input signal
and the reverb output into the pitch-shifter in varying amounts.
5) Pitch-shifted signal is fed into a delay line to give a couple of short delays.
This lets the shimmer effect build up slowly in time.
6) Output is 100% wet. Uncomment line at bottom to add dry signal.
;POT0 = Reverb time (0 to 10 seconds).
;POT1 = Amount of treble in reverb loop.
;POT2 = Shimmer level
If you want to prepare to be able to talk to our future robotic, alien overlords, make sure to put this on your pedalboard. Works especially well for single notes.
;Folks who have played with the pitch-shift routine for octave-up and octave-down know about the "crossfade phase cancellation" issue.
;For octave-down, you get a tremolo effect due to the slower ramp speed (-8192). But for octave-up, the fast ramp (16384) results in an unpleasant warble.
;We can't use a longer delay than 4096, so we are stuck with it, right?
;Here is a trick I just came up with: Do two pitch shifts in a row, each shifting up by the square root of two.
;The magic ramp speed is 6783. Voila, an octave up with a pleasing tremolo instead of the warble.
;It requires another 4096 memory and 8 instructions, but still only 1 ramp (so you can still use the other for octave down, etc).
;Yes, the tradeoff is latency. In the application I am working on I am going for more of a chorus effect - i.e. multiple instruments rather than a single instrument like a 12-string.
;Notice that I write 512 words into the 4096-word delay. This reduces the latency by that amount.
;The reason you can do this is that the crossfade waveform is zero for the first 1/8th of the delay. If you try a 2048 word delay you will have to change the "wra delay1+512,0" to "wra delay1+256, 0" in both places. This is probably why it sounded worse than the standard single-step 4096 algorithm.
;Frank commented in an older thread that this trick of writing 1/8th of the way into the buffer shouldn't work.
;I assure you (and Frank) that does. It is totally glitchless, and reduces the average latency by 1/4 for free. I don't think Frank considered it carefully.
If anyone's interested here's a tremolo I did using pot skip routines to do Sine, rectified sine both ways so pointy or humpy :) up and down ramps, triangle, trapezoid and square. All the wave shapes are scaled to the same range. Some of the wave shapes aren't that useful it was more an exercise in generating them than an attempt at a decent trem.
Mark S. says
I'm getting some really prominent clicking on some of the wave shapes.
This is a version of slacker's tremolo that removes 2 wave shapes that were giving clicky sounds. It features: sine, hump, hyper-triangle, triangle, trapezoid, square
Slacker says
If anyone's interested here's a tremolo I did using pot skip routines to do Sine, rectified sine both ways so pointy or humpy :) up and down ramps, triangle, trapezoid and square. All the wave shapes are scaled to the same range. Some of the wave shapes aren't that useful it was more an exercise in generating them than an attempt at a decent trem.
A bank of 8 patches that use chorus alone, pitch shifting and chorus, or pitch shifting and flanging. Includes the SpinCAD file for you to play around with and a JSON file for the Audiofab fv1_programmer utility.
A bank of eight, classic reverbs for your Easy Spin pedal. Where applicable, the SpinCAD Designer source file is provided. All source code is included in the fv1-programmer JSON file so you can directly program your pedal with the Audiofab fv1_programmer utility.
A bank of 8 patches featuring various distortion algorithms in some cases combined with chorus and filtering. Includes the SpinCAD file for you to play around with and a JSON file for the Audiofab fv1_programmer utility.
A bank of 8 patches featuring various test algorithms to ensure your FV-1-based pedal is working properly. Includes the SpinCAD file for you to play around with and, a JSON file for the Audiofab fv1_programmer utility and documentation.
SpinCAD delay patch with tap tampo block. This connects to a drum delay patch, but can be applied to every delay patch. The tap tampo block works perfect. The only problem is a little kind of 'swish' sound if you tap while playing. See the 'sourced from' URL below for the schematic.