BitCrusher again

Software questions and issues with the FV-1

Moderator: frank

Post Reply
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

BitCrusher again

Post by ZibiSound »

Hi.
I found nice bit crusher effect. Here's the code:

Code: Select all

flopper equ reg0 
lastval equ reg1 
ratio equ 0.2 ; Set between 0 and 0.975 in 0.025 steps to change alias ratio, 0 is no alias 
clr 
rdax flopper,1.0 ;read counter 
sof 1.0,-0.025 ; subtract 1 
skp gez, outter ; if > 0 jump to output 
rdax adcl,0.5 ; else get input 
rdax adcr,0.5 
wrax lastval,0 ; write to out reg 
sof 0,ratio ; reload counter 
outter: 
wrax flopper,0 ; save counter 
clr 
rdax lastval,1.0 
wrax dacl,1.0 
wrax dacr,1.0
This effect works nice, but level of generated effect is set by 3 line of code (ratio equ "value"). The interval of it is 0-0,975. I want to do this by using pot (for example POT1) but I don't know how to do this. Could someone show me ?

Thanks.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

This is not a bit-crusher it is an aliaser.

Read the docs and try to mod the code yourself first.

Here is a hint, you want to load the pot value into flopper so find the place where the counter is reloaded and mod it to load the pot value rather than the fixed value.
Frank Thomson
Experimental Noize
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

It isn't that am lazy, I really have no idea how to do this. I don't know assembler :( And this effect is the last missing, that I would like to have in my effector.

I see that you're good at writing these effects (previous works for others members), so I think it's not a big problem for you to add a few lines to this code. It could really help me.

--
Sorry for my english, man.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

I do help people with code but they try to understand it and make the changes themselves. We do not have the time to customize programs for people, if we do it for one person we must do it for all people and we do not have the resources to do that.
Frank Thomson
Experimental Noize
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

If it's a such big problem for you, what have I to say ? I think that other people will benefit from this too, if you help me with this code. This effect is quite popular. Or maybe is somewhere a complete code ?

I think it would be faster if you do it for me than trying to explain it to me, because I just don't understand.
ZibiSound
Posts: 66
Joined: Fri Mar 15, 2013 3:02 pm

Post by ZibiSound »

I have read your advice few times and I was able to properly modify the code at first try. Now it's works like I wanted at the beginning :D

I put the modified code below. I use POT1 (center) to control a crushing, and position 0 is bypass.

Code: Select all

flopper equ reg0 
lastval equ reg1
clr 
rdax flopper,1.0 ;read counter 
sof 1.0,-0.025 ; subtract 1 
skp gez, outter ; if > 0 jump to output 
rdax adcl,0.5 ; else get input 
rdax adcr,0.5 
wrax lastval,0 ; write to out reg
rdax POT1,1.0
sof 1,0 ; reload counter 
outter: 
wrax flopper,0 ; save counter 
clr 
rdax lastval,1.0 
wrax dacl,1.0 
wrax dacr,1.0
Thanks again man :)
Post Reply