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 

Stereo Panner Code

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



Joined: 04 Feb 2013
Posts: 13
Location: Williamsburg, VA

PostPosted: Sat Mar 23, 2013 8:04 pm    Post subject: Stereo Panner Code Reply with quote

Fired up my dev board tonight, and "wrote" my first program. I took the Trem/Reverb from the ROM and stripped the reverb, made it stereo and drove channel 2 using an inverted LFO to make a stereo I/O panner.

Code:
;Stereo Panner
;pot0 =
;pot1 = trem rate
;pot2 = trem depth
;
equ   sigin   reg1
equ   trem   reg2
equ   tremr   reg3
;
;set up lfo for reverb and tremelo, 0.5Hz, +/-20 samples:
skp   RUN,   start
wlds   SIN1,   12,   32767
start:
;control and get tremelo sinwave:
rdax   pot1,      1.0      
mulx   pot1      
sof   0.4,       0.1   ; 5:1 range
wrax   sin1_rate,   0      
cho   RDAL,SIN1
mulx   pot2
sof   0.5,      0.5      
wrax   trem,      -1
sof   -1.0,      .999   
wrax   tremr,      0      
;
;do tremelo
rdax   adcl,      1      
mulx   trem
wrax   dacl,   0   
;
rdax   adcr,      1      
mulx   tremr
wrax   dacr,   0
Back to top
View user's profile Send private message Visit poster's website
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