slacker wrote:Hi Slacker, i tried to write a code for control delay time by the taptempo regardless of position of pot1 and change delay time when it is turned back potentiometer.
I replaced this piece of code:
with this:Code: Select all
ldax pot1 ;read pot1 sof 1,-0.05 ;shift down now -0.05 to 0.95 skp neg,DODELAY ;if negative skip to delay, taptempo mode ldax pot1 ;else read pot1 sof 1/0.95,-0.05/0.95 ;scale to 0 to 1 wrax taptempo,0 ;and write to taptempo register, pot controls delay time
But it does not work.Code: Select all
rdax pot1,1 rdax time_pot,-1 skp zro,DODELAY ldax pot1 ;else read pot1 wrax taptempo,1 ;and write to taptempo register, pot controls delay time wrax time_pot,0
Tap tempo works but no pot1.
thanks
tap tempo snippet
Moderator: frank
-
- Posts: 10
- Joined: Mon Jun 27, 2011 4:11 pm
Hi alpignolo
Your code will not do what you want it to. This part of the tap tempo code
sets taptempo to the last value that was tapped, this will overwrite the value that your code read from pot1, which is why the pot does not work.
In your code if you change wrax taptempo,1 to wrax ramp,1 this will overwrite the tapped tempo with the value from pot1 and it should work.
Your code will not do what you want it to. This part of the tap tempo code
Code: Select all
jam rmp0 ;else latch is high, jam rmp0 (reset to 0)
ldax ramp ;read ramp, will contain last value of rmp0 before latch went high
wrax taptempo,0 ;write to taptempo
In your code if you change wrax taptempo,1 to wrax ramp,1 this will overwrite the tapped tempo with the value from pot1 and it should work.
I made a mistake in my previous post, indeed work only pot 1 but not work tapped tempo.
I have tried to change wrax tap tempo,1 with wrax ramp,1 but the result is the same.
This part of the tap tempo code
should not overwrite the value of pot1 because is before.
The problem in this code
is that the result of subtraction in the first two rows is alway different from zero, then it read always pot1.
I would like that pot1 worked only when it is turned
I have tried to change wrax tap tempo,1 with wrax ramp,1 but the result is the same.
This part of the tap tempo code
Code: Select all
jam rmp0 ;else latch is high, jam rmp0 (reset to 0)
ldax ramp ;read ramp, will contain last value of rmp0 before latch went high
wrax taptempo,0 ;write to taptempo
The problem in this code
Code: Select all
rdax pot1,0.5
rdax time_pot,-0.5
skp zro,DODELAY
ldax pot1 ;else read pot1
wrax ramp,1 ;and write to taptempo register, pot controls delay time
wrax time_pot,0
I would like that pot1 worked only when it is turned
The reason that doesn't work is because there will be some noise on the pot so it won't necessarily read exactly the same value each time. Try this instead
This reduces the resolution of the pot reducing or removing the noise so it will read the same value each time if it isn't moved, I tried it and it seems to work fine. It might still be possible to put the pot in a position where it jumps between two values though.
For an explanation of what the "and" commands do have a look here http://www.spinsemi.com/knowledge_base/ ... ing_delays
Code: Select all
ldax pot1
and %01111111_00000000_00000000
rdax time_pot,-1
skp zro,DODELAY
ldax pot1 ;else read pot1
and %01111111_00000000_00000000
wrax ramp,1 ;and write to ramp register, pot controls delay time
wrax time_pot,0
For an explanation of what the "and" commands do have a look here http://www.spinsemi.com/knowledge_base/ ... ing_delays
Hi! Is there a way to use a Sin for controlling the led rate indicator instead of a ramp? The thins is that i need that ramp for another line in the program.
Thanks!
Thanks!
Code: Select all
;Taptempo rate indicator, creates a square wave at the tap tempo rate
sof 0,0.064
wrax rmp1_rate,0 ;set rmp1 rate to 1Hz
cho rdal,rmp1 ;read value of rmp1
sof -2,0.999 ;level shift to 0 - 1 rising ramp
sof 1,0.001
rdax taptempo,-0.5 ;deduct half of the taptempo value
skp neg,ENDLED ;if negative skip to ENDLED
jam rmp1 ;else reset ramp1
ldax led ;and invert value of led register, creates square wave at taptempo rate
sof -1,0
wrax led,1
wrax dacl,0
ENDLED:
I don't think there is an easy way to use the sine. It should be possible to replace the ramp with a counter something like this.
I think that should work but I haven't tested it and I haven't written any spin asm in a while so there might be some mistakes. Hopefully it gives you the idea.
Code: Select all
equ ledramp reg11; put this at the top of the code with the others
;Taptempo rate indicator, creates a square wave at the tap tempo rate
ldax ledramp
sof 1,1/32768 ;add 1/32768 will take one second to go from 0 -1 a 1Hz ramp
wrax ledramp,1
rdax taptempo,-0.5 ;deduct half of the taptempo value
skp neg,ENDLED ;if negative skip to ENDLED
clr
wrax ledramp,0; reset ledramp to 0
ldax led ;and invert value of led register, creates square wave at taptempo rate
sof -1,0
wrax led,1
wrax dacl,0
ENDLED:
Thank you Slacker, i've tried it but i does not work. Led is always on. I'm trying to understand the code but im lost.
slacker wrote:I don't think there is an easy way to use the sine. It should be possible to replace the ramp with a counter something like this.
I think that should work but I haven't tested it and I haven't written any spin asm in a while so there might be some mistakes. Hopefully it gives you the idea.Code: Select all
equ ledramp reg11; put this at the top of the code with the others ;Taptempo rate indicator, creates a square wave at the tap tempo rate ldax ledramp sof 1,1/32768 ;add 1/32768 will take one second to go from 0 -1 a 1Hz ramp wrax ledramp,1 rdax taptempo,-0.5 ;deduct half of the taptempo value skp neg,ENDLED ;if negative skip to ENDLED clr wrax ledramp,0; reset ledramp to 0 ldax led ;and invert value of led register, creates square wave at taptempo rate sof -1,0 wrax led,1 wrax dacl,0 ENDLED:
tap tempo question
Hi
Read your post with much interest. I guess you chose max delay of 1 second ( if I've read things correctly) as this max delay of fv-1? Very new to this and just about to purchase the Dev board. Can I increase the delay time/drop bandwidth to get slightly longer delays. TryING to make a bass guitar looper where the original loop is repeated infinitely, and the player can play solo cleanly over the top. Could get away with 12 to 15khz bandwidth I guess
Cheers All
H
Read your post with much interest. I guess you chose max delay of 1 second ( if I've read things correctly) as this max delay of fv-1? Very new to this and just about to purchase the Dev board. Can I increase the delay time/drop bandwidth to get slightly longer delays. TryING to make a bass guitar looper where the original loop is repeated infinitely, and the player can play solo cleanly over the top. Could get away with 12 to 15khz bandwidth I guess
Cheers All
H
Re: tap tempo question
The FV-1 has a 32768 sample memory so if you use it all for delay you can calculate the time by 32768/sample rate. Sample rate must be 2x bandwidth. For a bass 10KHz bandwidth should be more than enough so a 20KHz sample rate. 32768/20000 = 1.638 seconds. You could argue you can get away with a 6KHz bandwidth, while the bass may generate harmonics above 6K your amp may be bandwidth limited so try a 12K sample rate which will give 2.7 seconds of delay. It may sound just fine and you get more delay.Herradura wrote:Hi
Read your post with much interest. I guess you chose max delay of 1 second ( if I've read things correctly) as this max delay of fv-1? Very new to this and just about to purchase the Dev board. Can I increase the delay time/drop bandwidth to get slightly longer delays. TryING to make a bass guitar looper where the original loop is repeated infinitely, and the player can play solo cleanly over the top. Could get away with 12 to 15khz bandwidth I guess
Cheers All
H
Frank Thomson
Experimental Noize
Experimental Noize
tap tempo question
Thanks Frank, I think 12khz will give good quality and enough delay time. I suppose the hard bit is to get the delay to continuously loop, and use the other channel set to a zero delay, split the bass input signal and send it thru a clean channel. This will allow you to play over the top of the loop, without the bass guitar going thru the effects chain. Thus you have a continuous backing loop mixed in with your solo playing
A simple example of a looper is here http://www.spinsemi.com/forum/viewtopic ... ght=record it does both channels but it is easy to remove one channel and use all the memory for just one channel.
Frank Thomson
Experimental Noize
Experimental Noize
I have a thought on varying the clock rate on the fly. I've used DDS chips (AD9850 board on ebay cheap) for synths/RF gens etc.
They are dead accurate and range from <.1 hz up to 40MHz. An arduino controlling a DDS would allow switching to all sorts of sample rates.
Here it is in the last synth I made
http://www.freshnelly.com/showbox-mysynth.htm
Cheers!
They are dead accurate and range from <.1 hz up to 40MHz. An arduino controlling a DDS would allow switching to all sorts of sample rates.
Here it is in the last synth I made
http://www.freshnelly.com/showbox-mysynth.htm
Cheers!
Is there a latin word for "Stage Fright"?