Page 2 of 6

Posted: Mon Dec 05, 2011 11:14 pm
by ronaldb
I found out that i was using the wrong code.
I will be testing your last code today with click trck and post my results.
Thanks for pointing that out Slacker and thanks for this great peace of code :D

Ronaldb

Posted: Tue Dec 06, 2011 1:30 pm
by ronaldb
Hi Slacker,
Checked the code with a click track and works like a charm.
Thank for this great peace of code. Now to add some things :D

Like modulation, pitchshifting and LP and HP filters.
That will be cool.

RonaldB

Posted: Wed Dec 07, 2011 1:27 pm
by slacker
Excellent, glad to hear it works.

I'll be interested to see what cool stuff you do with it :)

Posted: Fri Jan 27, 2012 2:30 am
by ronaldb
Slacker,
Since you wrote this peace of code can I ask you a question?
The tap tempo is now set to output 1/4 notes but can we make a calculation in here that it will output "dotted eight notes".

We can get these by doing this calculation:
tap tempo result / 4 = 1/16 notes x 3 = dotted eight notes.

Do you see a posobility here to do this in your code?

RonaldB

Posted: Fri Jan 27, 2012 10:36 am
by slacker
I think this will work, change these lines

Code: Select all

ldax taptempo      ;read taptempo register
wrax addr_ptr,0      ;write to delay address pointer
to this

Code: Select all

ldax taptempo      ;read taptempo register
sof 3/4,0           ;multiply tapped tempo by 3/4 
wrax addr_ptr,0      ;write to delay address pointer
The sof line could be replaced by something more complicated, maybe a pot skip routine to let you select different divisions.

Posted: Sun Jan 29, 2012 9:42 am
by ronaldb
Thanks i will try this.
RonaldB

Posted: Wed Feb 01, 2012 12:12 pm
by ronaldb
He Slacker,
I tested the code and it works like it should.
Thanks this makes this peace of code more versatle.
I will put up a code to select subdivisions with a potentiometer.

RonaldB

Posted: Tue Jul 31, 2012 6:00 am
by Sweetalk
It can be used with the tap tempo AND a delay pot at the same time?.

Posted: Tue Jul 31, 2012 9:41 am
by slacker
The code only gives tap tempo, you would have to modify it if you wanted a delay time pot as well as tap tempo.
You could either use another pot for delay time, with some code to use the pot value or the tap tempo value. Or it should be possible to use the same pot input for tap tempo or delay time, I'll have a think about it.

Posted: Tue Jul 31, 2012 10:36 am
by Sweetalk
slacker wrote:The code only gives tap tempo, you would have to modify it if you wanted a delay time pot as well as tap tempo.
You could either use another pot for delay time, with some code to use the pot value or the tap tempo value. Or it should be possible to use the same pot input for tap tempo or delay time, I'll have a think about it.
I'm working on a pot skip routine that when you have the delay pot on 0 (well, not 0, but close enough for the tap tempo switch to work) uses the tap tempo switch and on the rest of the pot uses the pot to change the delay time.

Posted: Fri Oct 26, 2012 1:37 pm
by Sweetalk
Well, with a simple pot skip routine I have working the POT+TAP delay control. I'm using diferent pot inputs on the delay pot and the tap because of the 0 and 1 voltage threshold (for propper detection).

Now I'm working on the LED indicator... first modded the code to show the tempo with the LED when using the pot and the tap, easy... Now I want to use a sin lfo to control the LED for more gradual and smooth operation of the LED. Pure aesthetics. I'm having a little troubles with the sin lfo rate coefficents. The AN-0001 shows an equation for the Kf coef to set the rate at a desired frequency, goes from 0 to 511... How can I adjust it to this code since the sof coef goes just to -2. I'm a little dizzy around here...

The "led" register goes from 0 to 1??.

Posted: Tue Oct 30, 2012 2:53 am
by jovesdies
Can you post the code for POT + TAP control ?

Posted: Tue Oct 30, 2012 10:45 am
by slacker
Sweetalk, it might be easier to low pass filter the square wave taptempo signal to get something like a sine wave than try and sync a sine wave LFO to the taptempo.

Posted: Tue Oct 30, 2012 11:49 am
by Sweetalk
jovesdies wrote:Can you post the code for POT + TAP control ?
I just used a simple pot skip routine like the one on the knowledge base and adjusted the pot values with a sof instruction to get max delay on 3/4 of the delay pot.

Code: Select all

clr
rdax	pot2,	1
and   	%01100000_00000000_00000000   	
skp	zro,	POT
sof	1,	-0.25
skp	zro,	POT
sof	1,	-0.25
skp	zro,	POT
clr
skp	zro,	TAP
Just make the labels TAP and POT and the rest of the control for the delay pot or the tap tempo. You can reduce some lines with a sof 1, -0.75.

Posted: Tue Oct 30, 2012 11:51 am
by Sweetalk
slacker wrote:Sweetalk, it might be easier to low pass filter the square wave taptempo signal to get something like a sine wave than try and sync a sine wave LFO to the taptempo.
Nice idea, i'll try that. I'm really close to sync the sine but it's really hard to do that and I don't think that I understand really well the coef of the sine lfo that appears on the AN0001. They're really different to the ones on some example codes, it's confusing :roll: