POT skip routines

Software questions and issues with the FV-1

Moderator: frank

Post Reply
djmalan
Posts: 36
Joined: Fri Mar 06, 2009 8:22 am

POT skip routines

Post by djmalan »

Hi,
I think ,I can not understand well the subject of pot skip routines.
Could anyone give an any example project for this subject (like using in a real program code).Especially I tried to use it for different delay ram and different wlds instruction for pitch shift,like selectable memory with pot(512,1024,2048,4096),but I couldn't.Runs only the last program from the four...
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

I'm not clearly understanding your question. Could you post your code and a description of what you want it to do and what it is doing?
Frank Thomson
Experimental Noize
djmalan
Posts: 36
Joined: Fri Mar 06, 2009 8:22 am

Post by djmalan »

rdax pot0,1
and %01100000_00000000_00000000 ;mask off only 2 bits, leaving only 4 possibilities
skp zro,reverb1 ;if zero, the skip over other code to reverb1
sof 1,-0.25 ;subtract 1/4
skp zro,reverb2 ;if zero, skip over other code to reverb2
sof 1,-0.25 ;subtract 1/4
skp zro,reverb3 ;if zero, skip over other code to reverb3
clr ;clear the accumulator, there's 1/4 left in it!
skp run,pend ;skip to end of code
Where should I put these codes in the main code.If I have 4 different codes like rom pitch or any other effects like different reverbs.I need an aplication exaple to understand.
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Simple example:

Code: Select all

; Simple example of using pot to jump to different routines in a program
;
; In this example we will jump between a few different programs
;
mem	delayl	16383
mem	delayr	16383

rdax pot0,1
and %01100000_00000000_00000000 ;mask off only 2 bits, leaving only 4 possibilities
skp zro,prg1 ;if zero, the skip over other code to reverb1
sof 1,-0.25 ;subtract 1/4
skp zro,prg2 ;if zero, skip over other code to reverb2
sof 1,-0.25 ;subtract 1/4
skp zro,prg3 ;if zero, skip over other code to reverb3
clr ;clear the accumulator, there's 1/4 left in it! 
;
; This is the 4th program even though it is here first
; Simple stereo delay
clr
rdax	adcl, 1
wra	delayl,1.0
rda	delayl#,1.0
wrax	dacl,0
rdax	adcr, 1
wra	delayr,1.0
rda	delayr#,1.0
wrax	dacr,0
skp	zro,pend
;
;
;First program
; make mono input and write to left only
prg1:
clr
rdax	adcl,0.5
rdax	adcr,0.5
wrax	dacl,0
skp	zro,pend
;
;
;Second program
; make mono input and write to right only
prg2:
clr
rdax	adcl,0.5
rdax	adcr,0.5
wrax	dacr,0
skp	zro,pend
;
;
;Third program
;Read left and write to right, read right and write to left (swap left and right)
prg3:
clr
rdax	adcl,1.0
wrax	dacr,0
rdax	adcr,1.0
wrax	dacl,0
pend:
clr
Frank Thomson
Experimental Noize
djmalan
Posts: 36
Joined: Fri Mar 06, 2009 8:22 am

Post by djmalan »

:D
Thank you ver much :D
Post Reply