Tone Control
Moderator: frank
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
Tone Control
Hi everyone, this is my first post in the forum, I apologize for the lack of knowledge.
I want to create a tone control for various reverb algorithms that I have modified, my idea is to read the signal input, apply the frequency cut and direct the signal to the reverb. I made several attempts based on the FV-1 documentation, but I did not even get close to achieving this, could anyone help me, or could anyone already have this code created I could share here? I appreciate your help. The idea is that when the pot is at 1 the filter will let pass all the frequencies that the instrument generates, and when it is at 0 it will pass frequencies below 600Hz, basically it is a low pass filter with frequency controlled by the pot.
I have searched a lot here in the forum and found some topics regarding my doubt but none of them finalized the tone adjustment code, I am sending below the code that I have so far.
;
equ LPF reg0
equ tone reg1
; pot tone
rdax pot0, 1
sof 0.570642354 , 0.0383933837
wrax tone, 0
;
ldax adcl
rdfx LPF, 1
mulx tone
wrax LPF, 1
wrax dacl, 0
With this code, when the potentiometer is set to zero, the volume goes to zero practically.
I want to create a tone control for various reverb algorithms that I have modified, my idea is to read the signal input, apply the frequency cut and direct the signal to the reverb. I made several attempts based on the FV-1 documentation, but I did not even get close to achieving this, could anyone help me, or could anyone already have this code created I could share here? I appreciate your help. The idea is that when the pot is at 1 the filter will let pass all the frequencies that the instrument generates, and when it is at 0 it will pass frequencies below 600Hz, basically it is a low pass filter with frequency controlled by the pot.
I have searched a lot here in the forum and found some topics regarding my doubt but none of them finalized the tone adjustment code, I am sending below the code that I have so far.
;
equ LPF reg0
equ tone reg1
; pot tone
rdax pot0, 1
sof 0.570642354 , 0.0383933837
wrax tone, 0
;
ldax adcl
rdfx LPF, 1
mulx tone
wrax LPF, 1
wrax dacl, 0
With this code, when the potentiometer is set to zero, the volume goes to zero practically.
No need to apologize for asking a question!
You should start by reading though the knowledge base, particularly this section on low pass filters. It explains the behavior of the algorithm and provides the formula for the cutoff frequency. You should also take a look at the instructions and syntax for RDFX. You will need to deconstruct RDFX so that you can vary K.
You should start by reading though the knowledge base, particularly this section on low pass filters. It explains the behavior of the algorithm and provides the formula for the cutoff frequency. You should also take a look at the instructions and syntax for RDFX. You will need to deconstruct RDFX so that you can vary K.
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
Thanks for the help, my friend, I am currently working on studying the knowledge base and scribbled new lines of codeAaron wrote:No need to apologize for asking a question!
You should start by reading though the knowledge base, particularly this section on low pass filters. It explains the behavior of the algorithm and provides the formula for the cutoff frequency. You should also take a look at the instructions and syntax for RDFX. You will need to deconstruct RDFX so that you can vary K.
equ temp reg0
equ fcon reg1
equ fil 0.1
; pot pot
rdax pot0, 1
sof 1, 0
wrax fcon, 0
;
rdax dacl, 1
wrax temp, -1
rdfx fil, 0.1
wrhx fil, -1
mulx fcon
rdax temp, 1
wrax dacl, 0
But unfortunately I still do not get a signal at the exit
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
The combination of RDFX and WRAX creates a simple lpf. In order to modulate the cutoff frequency we need to deconstruct RDFX. Looking at the block diagram of RDFX:
and assuming the input of the filter is in ACC, we see that RDFX perfoms
ACC - Register * K + register
If we start to reconstruct this without using RDFX it would look like
RDAX input,1
RDAX filter,-1
mulx K
RDAX filter
The only thing left to do is update the filter register.
and assuming the input of the filter is in ACC, we see that RDFX perfoms
ACC - Register * K + register
If we start to reconstruct this without using RDFX it would look like
RDAX input,1
RDAX filter,-1
mulx K
RDAX filter
The only thing left to do is update the filter register.
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
Dude I got a lot of doubts nowAaron wrote:The combination of RDFX and WRAX creates a simple lpf. In order to modulate the cutoff frequency we need to deconstruct RDFX. Looking at the block diagram of RDFX:
and assuming the input of the filter is in ACC, we see that RDFX perfoms
ACC - Register * K + register
If we start to reconstruct this without using RDFX it would look like
RDAX input,1
RDAX filter,-1
mulx K
RDAX filter
The only thing left to do is update the filter register.
1st: Should I read the adcl signal and record in input?
2º: Should I register "filter" in some reg?
3rd: To get the output signal I should insert "WRAX dacl, 0" below "RDAX filter, 0?
Input, Filter, and K were all just used for the sake of example. "Input" should be whatever register you are using for the input to the filter, "Filter" is whatever you want to call your lpf, and "K" is whatever you want to call the cutoff frequency coefficient.
In order to finish the low pass filter you will need to update the "filter" register by writing the output of our additions and multiply to it (WRAX filter).
In order to finish the low pass filter you will need to update the "filter" register by writing the output of our additions and multiply to it (WRAX filter).
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
I have tried this, but I have no signal at the output, can you help me to identify the error?Aaron wrote:Input, Filter, and K were all just used for the sake of example. "Input" should be whatever register you are using for the input to the filter, "Filter" is whatever you want to call your lpf, and "K" is whatever you want to call the cutoff frequency coefficient.
In order to finish the low pass filter you will need to update the "filter" register by writing the output of our additions and multiply to it (WRAX filter).
equ input reg0
equ filter 0.8
equ k reg2
; input filter
rdax adcl, 0.5
rdax adcr, 0.5
wrax input, 0
;pot control
rdax pot1, 1
sof 1, 0
wrax k, 0
;
rdax input, 1
rdax filter, -1
mulx k
rdax filter, 1
wrax filter, 0
wrax dacl, 1
wrax adcl, 0
You define "filter" as 0.8 but then do "RDAX filter" and RDAX expects a register not a decimal value as the first parameter.
Frank Thomson
Experimental Noize
Experimental Noize
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
frank wrote:You define "filter" as 0.8 but then do "RDAX filter" and RDAX expects a register not a decimal value as the first parameter.
Hi Frank, I have modified what you said and now I have a high pass filter controlled by the potentiometer, but I want a low pass filter. I changed the "rdfx" and "wrlx" commands to "rdax" and wrax "but I do not get a low-pass filter, it works almost like a volume.
The code below is what works as a high-pass filter
equ input reg0
equ filter reg1
equ k reg2
equ temp reg3
;pot control
rdax pot1, 1
sof 0.9, 0
wrax k, 0
;
; input filter
rdax adcl, 1
rdax adcr, 1
wrax input, 0
;
rdax input, 1
wrax temp, -1
rdfx filter, 0.4
wrlx filter, -1
mulx k
rdax temp,1
wrax dacl, 1
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
Now I was able to create the low-pass filter controlled by the pot, I just had to change "wrlx" to "wrhx" and the filter worked perfectly. Thanks for everyone's help.frotaitalos wrote:frank wrote:You define "filter" as 0.8 but then do "RDAX filter" and RDAX expects a register not a decimal value as the first parameter.
Hi Frank, I have modified what you said and now I have a high pass filter controlled by the potentiometer, but I want a low pass filter. I changed the "rdfx" and "wrlx" commands to "rdax" and wrax "but I do not get a low-pass filter, it works almost like a volume.
The code below is what works as a high-pass filter
equ input reg0
equ filter reg1
equ k reg2
equ temp reg3
;pot control
rdax pot1, 1
sof 0.9, 0
wrax k, 0
;
; input filter
rdax adcl, 1
rdax adcr, 1
wrax input, 0
;
rdax input, 1
wrax temp, -1
rdfx filter, 0.4
wrlx filter, -1
mulx k
rdax temp,1
wrax dacl, 1
-
- Posts: 16
- Joined: Wed Feb 07, 2018 9:06 am
- Location: Brazil
Hi Guys, I now have my lowpass filter working but it generates a noise when I raise the -3db bridge of the filter, I am sending the code below and I hope someone helps me to eliminate that noise.frotaitalos wrote:Now I was able to create the low-pass filter controlled by the pot, I just had to change "wrlx" to "wrhx" and the filter worked perfectly. Thanks for everyone's help.frotaitalos wrote:frank wrote:You define "filter" as 0.8 but then do "RDAX filter" and RDAX expects a register not a decimal value as the first parameter.
Hi Frank, I have modified what you said and now I have a high pass filter controlled by the potentiometer, but I want a low pass filter. I changed the "rdfx" and "wrlx" commands to "rdax" and wrax "but I do not get a low-pass filter, it works almost like a volume.
The code below is what works as a high-pass filter
equ input reg0
equ filter reg1
equ k reg2
equ temp reg3
;pot control
rdax pot1, 1
sof 0.9, 0
wrax k, 0
;
; input filter
rdax adcl, 1
rdax adcr, 1
wrax input, 0
;
rdax input, 1
wrax temp, -1
rdfx filter, 0.4
wrlx filter, -1
mulx k
rdax temp,1
wrax dacl, 1
rdax input, 1
wrax temp, -1
rdfx filter, 0.1
wrhx filter, -1
mulx krf
rdax temp,1
wrax mono, 0
This above is the code I am using, I made another code where I insert another fixed low pass filter to try to eliminate the noise but I did not succeed.
rdax input, 1
wrax temp, -1
rdfx filter, 0.1
wrhx filter, -1
mulx krf
rdax temp,1
rdax reg11,1
rdfx reg11,0.4935583443
wrax reg11,0.0000000000
wrax mono, 0