News:

SMF for DIYStompboxes.com!

Main Menu

FV-1 DETUNE effect

Started by Blackhawkamplifiers, March 09, 2024, 09:04:50 PM

Previous topic - Next topic

Blackhawkamplifiers

Greetings folks, I originally sent this as a message to Larry but he's suggested and I agreed that it should be a topic we can all benefit from;

First off, spinCAD is awesome! I never thought I'd try and dip a toe into the digital pedal world until I discovered it.
I did have a question about creating a "detune" effect similar to the detune setting on a whammy or the EHX pitch fork.
I only barely have a grasp on how the pitch block works in SPINCAD but I would love to be able to adjust within a semitone by cents (which for my needs doesn't need to be precise. Just less than one semitone.

Eventually I'd love to create an effect where I could set semitones and then modulate them by a few cents (I currently can achieve this by chaining two pedals together) but for now, just being able create the detune effect at all would be amazing.

Is this possible with SPINCAD?
Thanks so much for your time!

Digital Larry

#1
Hello, thanks for your question.  First, try this.



This is a dual detune.  The Pitch Shift blocks are "Pitch Shift Adjustable".  One pitch shift goes up, one goes down.  Set the pitch coefficient to the maximum amount desired when pot 0 is all the way up.  Pot 0 adjusts the pitch shift from 0 to the max you set in the control panel.  Pot 1 controls the level of the detuned voices.  This is stereo.  To make it mono check "mono" in the output block.

Adjusting the pitch coefficient is not very easy with the mouse.  To get finer control select the slider with the mouse then use arrow left/right buttons.  I could improve on this with a standard spinner control and/or direct numeric entry.

4096 is the buffer length.  You can get lower latency by making this value smaller.  The tradeoff is that the lowest frequency that gets shifted up increases.  AFAICR you have to be able to fit a full cycle of your waveform into the buffer.  Try different things and see what works best for what you're after.

After that, to understand more about what is going on, read this document starting on page 8.  This explains how to get the coefficient for a specific pitch shift.  I just did it by ear.

http://spinsemi.com/Products/appnotes/spn1001/AN-0001.pdf

Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Cybercow

Using the info in the AN-0001.pdf document, I found these coefficients to be pretty much spot-on for fitted interval peaks . . .

; ------------------------
; Semitone Coefficient Equates
; ----------------------------
EQU DOWN24 -0.375
EQU DOWN23 -0.3675671132
EQU DOWN22 -0.359692244
EQU DOWN21 -0.3513491106
EQU DOWN20 -0.3425098688
EQU DOWN19 -0.3331450182
EQU DOWN18 -0.3232233047
EQU DOWN17 -0.3127116154
EQU DOWN16 -0.3015748685
EQU DOWN15 -0.2897758962
EQU DOWN14 -0.2772753205
EQU DOWN13 -0.2640314218
EQU DOWN12 -0.25
EQU DOWN11 -0.235134226
EQU DOWN10 -0.219384488
EQU DOWN9 -0.202698221
EQU DOWN8 -0.185019738
EQU DOWN7 -0.166290036
EQU DOWN6 -0.146446609
EQU DOWN5 -0.125423231
EQU DOWN4 -0.103149737
EQU DOWN3 -0.079551792
EQU DOWN2 -0.054550641
EQU DOWN1 -0.028062844
EQU ROOT  0
EQU UP1 0.029731547
EQU UP2 0.061231024
EQU UP3 0.094603558
EQU UP4 0.129960525
EQU UP5 0.167419927
EQU UP6 0.207106781
EQU UP7 0.249153538
EQU UP8 0.293700526
EQU UP9 0.340896415
EQU UP10 0.390898718
EQU UP11 0.443874313
EQU UP12 0.5
EQU UP13 0.5594630944
EQU UP14 0.6224620483
EQU UP15 0.689207115
EQU UP16 0.7599210499
EQU UP17 0.8348398542
EQU UP18 0.9142135624
EQU UP19 0.9983070769
Cybercow (moo)
Don't let your talent take you where your character cannot keep you.

Blackhawkamplifiers

Quote from: Digital Larry on March 09, 2024, 09:46:53 PMHello, thanks for your question.  First, try this.



This is a dual detune.  The Pitch Shift blocks are "Pitch Shift Adjustable".  One pitch shift goes up, one goes down.  Set the pitch coefficient to the maximum amount desired when pot 0 is all the way up.  Pot 0 adjusts the pitch shift from 0 to the max you set in the control panel.  Pot 1 controls the level of the detuned voices.  This is stereo.  To make it mono check "mono" in the output block.

Adjusting the pitch coefficient is not very easy with the mouse.  To get finer control select the slider with the mouse then use arrow left/right buttons.  I could improve on this with a standard spinner control and/or direct numeric entry.

4096 is the buffer length.  You can get lower latency by making this value smaller.  The tradeoff is that the lowest frequency that gets shifted up increases.  AFAICR you have to be able to fit a full cycle of your waveform into the buffer.  Try different things and see what works best for what you're after.

After that, to understand more about what is going on, read this document starting on page 8.  This explains how to get the coefficient for a specific pitch shift.  I just did it by ear.

http://spinsemi.com/Products/appnotes/spn1001/AN-0001.pdf



Thank you so much as always! While I can't pretend that I fully understand the document, I do at least have it now for reference and simply knowing that it's possible is excellent!

Blackhawkamplifiers

Quote from: Cybercow on March 15, 2024, 11:44:36 AMUsing the info in the AN-0001.pdf document, I found these coefficients to be pretty much spot-on for fitted interval peaks . . .

; ------------------------
; Semitone Coefficient Equates
; ----------------------------
EQU DOWN24 -0.375
EQU DOWN23 -0.3675671132
EQU DOWN22 -0.359692244
EQU DOWN21 -0.3513491106
EQU DOWN20 -0.3425098688
EQU DOWN19 -0.3331450182
EQU DOWN18 -0.3232233047
EQU DOWN17 -0.3127116154
EQU DOWN16 -0.3015748685
EQU DOWN15 -0.2897758962
EQU DOWN14 -0.2772753205
EQU DOWN13 -0.2640314218
EQU DOWN12 -0.25
EQU DOWN11 -0.235134226
EQU DOWN10 -0.219384488
EQU DOWN9 -0.202698221
EQU DOWN8 -0.185019738
EQU DOWN7 -0.166290036
EQU DOWN6 -0.146446609
EQU DOWN5 -0.125423231
EQU DOWN4 -0.103149737
EQU DOWN3 -0.079551792
EQU DOWN2 -0.054550641
EQU DOWN1 -0.028062844
EQU ROOT  0
EQU UP1 0.029731547
EQU UP2 0.061231024
EQU UP3 0.094603558
EQU UP4 0.129960525
EQU UP5 0.167419927
EQU UP6 0.207106781
EQU UP7 0.249153538
EQU UP8 0.293700526
EQU UP9 0.340896415
EQU UP10 0.390898718
EQU UP11 0.443874313
EQU UP12 0.5
EQU UP13 0.5594630944
EQU UP14 0.6224620483
EQU UP15 0.689207115
EQU UP16 0.7599210499
EQU UP17 0.8348398542
EQU UP18 0.9142135624
EQU UP19 0.9983070769

This is absolutely amazing! Now you f I can figure out how to incorporate this into a stepped encoder/pot/switch, honestly just having the start points of the first semitones up and down will work wonderfully.
Thank you so much!

Cybercow

Quote from: Blackhawkamplifiers on March 15, 2024, 07:09:11 PMThis is absolutely amazing! Now you f I can figure out how to incorporate this into a stepped encoder/pot/switch, honestly just having the start points of the first semitones up and down will work wonderfully.
Thank you so much!

FWIW, you can also do micro-tonal detunes by using EQU values between the ones posted.
Cybercow (moo)
Don't let your talent take you where your character cannot keep you.

Adelinecker

That looks like a really great project! I can't wait to dive deeper and get a closer look.