Spin Semiconductor Forum Index Spin Semiconductor
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Another Noise Generator

 
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development
View previous topic :: View next topic  
Author Message
amz-fx



Joined: 06 Sep 2006
Posts: 31
Location: Louisiana, USA

PostPosted: Sun Mar 08, 2015 3:36 pm    Post subject: Another Noise Generator Reply with quote

I have written a 24-bit pseudorandom noise generator for the FV-1. It is a little different than the one that Frank posted and uses fewer instructions.

It should run for over 8.5 minutes without repeating.

Code:
; 24 bit maximal period Galois LFSR
; Example by Jack Orman
; http://www.muzique.com
; March 5, 2015

; REG 0 : LFSR NOISE REGISTER
; REG 1 : OUTPUT BIT
;
EQU LFSR REG0
EQU TEMP REG1
;
; SEED THE LFSR WITH A NON-ZERO VALUE
SKP RUN,START
SOF 0,0.666      ; JUST TO ENSURE IT IS REALLY NON-ZERO
WRAX LFSR,0
;
;
START:
LDAX LFSR        ; GET LFSR REGISTER
AND 0x000001     ; GET LSB OF THE NOISE REGISTER
WRAX TEMP,0      ; SAVE BIT
RDAX LFSR,0.5    ; GET LFSR REG AND SHIFT RIGHT 1 PLACE
AND 0x7FFFFF     ; CLEAR MSB
WRAX LFSR,0      ; SAVE RESULT
LDAX TEMP        ; GET THE OUTPUT BIT
SKP ZRO,SHFTZRO   ; IF 0 THEN JUMP
; IF LSB WAS SET THEN PROCESS
CLR              ; CLEAR ACC
LDAX LFSR        ; GET THE SAVED LFSR
XOR 0xD80000     ; TOGGLE THE MASK BITS
WRAX LFSR,0       ; SAVE IT
;
SHFTZRO:
LDAX LFSR
WRAX DACL,0


For a REALLY long period before repeats, you could run a pair of these number generators and then combine the outputs in an alternating stop-and-go configuration to make the noise output.

Best regards, Jack
Back to top
View user's profile Send private message Visit poster's website
Digital Larry



Joined: 12 Nov 2012
Posts: 266

PostPosted: Mon Mar 09, 2015 4:27 am    Post subject: Reply with quote

Thanks Jack! I'll see how this works out. It will be interesting to see if it works in my program's simulation mode.

DL
Back to top
View user's profile Send private message Visit poster's website
MacroMachines



Joined: 12 Dec 2014
Posts: 70
Location: Detroit,MI

PostPosted: Sat Aug 06, 2016 11:41 am    Post subject: Reply with quote

@Digital Larry, it would rock to have a few options for noise generating in spin cad, also the SAH block would be a bit more useful if you could supply any trigger (noise trigger, noise sample, could get some reallllly nice granular chorus going)
_________________
http://MacroMachines.net
Digital Control for your Analog Soul.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Digital Larry



Joined: 12 Nov 2012
Posts: 266

PostPosted: Sun Aug 07, 2016 5:18 am    Post subject: Reply with quote

Wait, I thought you were handling all block development from here on out!

Very Happy
Back to top
View user's profile Send private message Visit poster's website
MacroMachines



Joined: 12 Dec 2014
Posts: 70
Location: Detroit,MI

PostPosted: Sun Aug 14, 2016 7:40 am    Post subject: Reply with quote

Ive been mainly compiling loads of things in asm that I plan to port once I understand how to do the conversion into blocks and update my git. I have a bunch of potential blocks ready but still not sure I understand the process, or what questions to ask for clarification yet.
_________________
http://MacroMachines.net
Digital Control for your Analog Soul.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group