Hi,
Is there a way to generate white noise using FV-1 ?
Later I want to add a low pass filter to make something like step noise, but I can't find any program to generate noise.
White Noise Generator
Moderator: frank
some lfsr code to generate random noise http://www.spinsemi.com/forum/viewtopic ... r&start=15
Frank Thomson
Experimental Noize
Experimental Noize
Thanks, I think this is exactly what I need
Can you tell me what's the difference between 24 and 48bit version ?
And I have another question: If this code makes 4-position "switch":
So how can I do this "switch" 2-position ?
Can you tell me what's the difference between 24 and 48bit version ?
And I have another question: If this code makes 4-position "switch":
Code: Select all
;Process Pot2 to decide 1 of 4 output possibilities
rdax pot2,1
and %01100000_00000000_00000000 ;mask off only 2 bits, leaving only 4 possibilities
skp zro,LowPass ;if zero, the skip over other code to Test1
sof 1,-0.25 ;subtract 1/4
skp zro,BandPass ;if zero, skip over other code to Test2
sof 1,-0.25 ;subtract 1/4
skp zro,HighPass ;if zero, skip over other code to Test3
clr ;clear the accumulator, there's 1/4 left in it!
NotchOut:
ldax notch
skp run, Pend ;skip to end of code
LowPass:
ldax lp_dly
skp run, Pend ;skip to end of code
BandPass:
ldax bp_dly
skp run, Pend ;skip to end of code
HighPass:
ldax hp
skp run, Pend ;skip to end of code
;
Pend:
wrax dacl,1 ;write both outputs
wrax dacr,0
The difference is 24-bitssebxx4 wrote:
Can you tell me what's the difference between 24 and 48bit version ?
Just use the 24-bit version.
Mask it to 1 bit and delete the subtraction steps, it will be either 0 or not 0 so no real need for any more than that.sebxx4 wrote: And I have another question: If this code makes 4-position "switch":
So how can I do this "switch" 2-position ?Code: Select all
;Process Pot2 to decide 1 of 4 output possibilities rdax pot2,1 and %01100000_00000000_00000000 ;mask off only 2 bits, leaving only 4 possibilities skp zro,LowPass ;if zero, the skip over other code to Test1 sof 1,-0.25 ;subtract 1/4 skp zro,BandPass ;if zero, skip over other code to Test2 sof 1,-0.25 ;subtract 1/4 skp zro,HighPass ;if zero, skip over other code to Test3 clr ;clear the accumulator, there's 1/4 left in it! NotchOut: ldax notch skp run, Pend ;skip to end of code LowPass: ldax lp_dly skp run, Pend ;skip to end of code BandPass: ldax bp_dly skp run, Pend ;skip to end of code HighPass: ldax hp skp run, Pend ;skip to end of code ; Pend: wrax dacl,1 ;write both outputs wrax dacr,0
Frank Thomson
Experimental Noize
Experimental Noize
I will be something like this ?
What with this mask ? 1bit is %01000000_00000000_00000000 ?
Code: Select all
;Process Pot2 to decide 1 of 2 output possibilities
rdax pot2,1
and %01000000_00000000_00000000
skp zro,LowPass ;if zero, the skip over other code
clr ;clear the accumulator
NotchOut:
ldax notch
skp run, Pend ;skip to end of code
LowPass:
ldax lp_dly
skp run, Pend ;skip to end of code
;
Pend:
wrax dacl,1 ;write both outputs
wrax dacr,0
That will probably work. To understand the bit mask you need to understand the way numbers are represented in the FV-1, the way they are aligned, etc. Please see the SpinAsm PDF, it covers these things in detail.
Frank Thomson
Experimental Noize
Experimental Noize