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 

tap tempo snippet
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development
View previous topic :: View next topic  
Author Message
ronaldb



Joined: 03 Dec 2009
Posts: 19

PostPosted: Mon Dec 05, 2011 10:14 pm    Post subject: Reply with quote

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 Very Happy

Ronaldb
Back to top
View user's profile Send private message
ronaldb



Joined: 03 Dec 2009
Posts: 19

PostPosted: Tue Dec 06, 2011 12:30 pm    Post subject: Reply with quote

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 Very Happy

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

RonaldB
Back to top
View user's profile Send private message
slacker



Joined: 01 Feb 2011
Posts: 115

PostPosted: Wed Dec 07, 2011 12:27 pm    Post subject: Reply with quote

Excellent, glad to hear it works.

I'll be interested to see what cool stuff you do with it Smile
Back to top
View user's profile Send private message
ronaldb



Joined: 03 Dec 2009
Posts: 19

PostPosted: Fri Jan 27, 2012 1:30 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
slacker



Joined: 01 Feb 2011
Posts: 115

PostPosted: Fri Jan 27, 2012 9:36 am    Post subject: Reply with quote

I think this will work, change these lines

Code:

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


to this

Code:

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.
Back to top
View user's profile Send private message
ronaldb



Joined: 03 Dec 2009
Posts: 19

PostPosted: Sun Jan 29, 2012 8:42 am    Post subject: Reply with quote

Thanks i will try this.
RonaldB
Back to top
View user's profile Send private message
ronaldb



Joined: 03 Dec 2009
Posts: 19

PostPosted: Wed Feb 01, 2012 11:12 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sweetalk



Joined: 15 Oct 2009
Posts: 95

PostPosted: Tue Jul 31, 2012 5:00 am    Post subject: Reply with quote

It can be used with the tap tempo AND a delay pot at the same time?.
Back to top
View user's profile Send private message
slacker



Joined: 01 Feb 2011
Posts: 115

PostPosted: Tue Jul 31, 2012 8:41 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sweetalk



Joined: 15 Oct 2009
Posts: 95

PostPosted: Tue Jul 31, 2012 9:36 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sweetalk



Joined: 15 Oct 2009
Posts: 95

PostPosted: Fri Oct 26, 2012 12:37 pm    Post subject: Reply with quote

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??.
Back to top
View user's profile Send private message
jovesdies



Joined: 25 Feb 2009
Posts: 32

PostPosted: Tue Oct 30, 2012 1:53 am    Post subject: Reply with quote

Can you post the code for POT + TAP control ?
Back to top
View user's profile Send private message
slacker



Joined: 01 Feb 2011
Posts: 115

PostPosted: Tue Oct 30, 2012 9:45 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sweetalk



Joined: 15 Oct 2009
Posts: 95

PostPosted: Tue Oct 30, 2012 10:49 am    Post subject: Reply with quote

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:

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.


Last edited by Sweetalk on Tue Oct 30, 2012 10:53 am; edited 1 time in total
Back to top
View user's profile Send private message
Sweetalk



Joined: 15 Oct 2009
Posts: 95

PostPosted: Tue Oct 30, 2012 10:51 am    Post subject: Reply with quote

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 Rolling Eyes
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Spin Semiconductor Forum Index -> Algorithm development All times are GMT - 8 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
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