Page 1 of 1
White Noise Generator
Posted: Sat Oct 05, 2013 6:39 am
by ZibiSound
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.
Posted: Sat Oct 05, 2013 7:39 am
by frank
Posted: Sat Oct 05, 2013 9:52 am
by ZibiSound
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":
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
So how can I do this "switch" 2-position ?
Posted: Sat Oct 05, 2013 3:49 pm
by frank
sebxx4 wrote:
Can you tell me what's the difference between 24 and 48bit version ?
The difference is 24-bits

Just use the 24-bit version.
sebxx4 wrote:
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
So how can I do this "switch" 2-position ?
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.
Posted: Sat Oct 05, 2013 11:30 pm
by ZibiSound
I will be something like this ?
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
What with this mask ? 1bit is %01000000_00000000_00000000 ?
Posted: Sun Oct 06, 2013 12:37 pm
by frank
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.