|
|
|
08-27-2015, 05:08 AM
|
#1
|
Human being with feelings
Join Date: Dec 2011
Posts: 407
|
Tap Tempo Script
Hey guys,
it would be cool to have a simple tap tempo script that works like the tap tempo in transport but without the changing of the timeline. Just the readout of the bpm.
|
|
|
08-27-2015, 01:23 PM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Just made a quick and really dirty test...
look for
- Tempo and Time Signature/X-Raym_Tap tempo.lua
It works by making an average of the 10 last left clicks entries.
It uses one of my unfinished GFX template (so there is unclickable scrollbars left in it).
Last edited by X-Raym; 08-27-2015 at 05:01 PM.
|
|
|
08-27-2015, 04:48 PM
|
#3
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Just updated without error message and a cleaner way to calc tap tempo...
and now works with any kind of keyboard input.
Last edited by X-Raym; 08-27-2015 at 05:00 PM.
|
|
|
08-27-2015, 05:27 PM
|
#4
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Code:
* Changelog:
* v0.6 (2015-08-28)
+ Deviation
+ Max
+ Min
+ Visual input
+ Keyboard input
Deviation at 1-2% is good
EDIT: just made a new version with text color as indicator : red = bad, yellow = nice, green = perfect
EDIT : it is possible that my math behind deviation and min-max BPM are wrong....
but it works great anyway, I'll check that later.
And maybe should I recall DEVIATIOn more like "precision" or something like that...
Last edited by X-Raym; 08-28-2015 at 03:40 AM.
|
|
|
08-28-2015, 04:44 AM
|
#5
|
Human being with feelings
Join Date: Nov 2013
Posts: 2,818
|
Short version: Thx!
Medium v:
Thank you X-R! and this one is Brand New huh? because I looove the smell of new components.
And alternative to "Google" would be just to click on our most Famous Reaper coders name (or link and find good stuff.
Think I'll do that later this evening because I am Way! behind on this.
Long v: eum, not today.
__________________
Last edited by SmajjL; 08-28-2015 at 04:49 AM.
|
|
|
08-28-2015, 06:15 AM
|
#6
|
Human being with feelings
Join Date: Nov 2013
Location: Argentina
Posts: 326
|
When tap tempo while playing (with reaper built in tap tempo) the tempo gets all over the place, say you are at 120, and start taping at 130, before settles down in 130 (after two-three taps), goes to 36, 24, etc.
Just today I was using tap tempo and wishing for a way to take, lets say, the first four taps, make an average, and then, apply that averaged tempo.
Then, go to the forums, to see if i can find a script or something, and what i found? jajaja!! Tap Tempo Script by X-Raym!!! You did it Again!
You say it´s too difficult to transform this in an action, no GUI, nothing, that only takes the first 4 taps, or first 8, make an average, and then change the tempo with that value?
Try looking inside the script, but it's too complex for me yet, with all that GUI Stuff in the middle.
Thanks as always X-Raym!
__________________
Living la vida loca
|
|
|
08-28-2015, 07:56 AM
|
#7
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
thanks X-Raym.... question though... should it work by tapping any key?
cuz for me it don't .... works only tapping the mouse, both left and right, either\or but not for any of the keyboard keys...
Is it me or ????
|
|
|
08-29-2015, 02:32 PM
|
#8
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Hi guys !
Thabks for your comments, I'm off for a couple of days but I'll get back to it soon !
@hopi
It should work with any keyboard input, at least I remember it works for CTRL.
@Pasajeromoronmoreno
It could be adpat in other forms but I like it with GUI, with all infos :P
We could imagine a button to set the average tempo as project tempo mais it may be overkill. We can simply set the tempo by double clicking on it on transport bar.
@SmajjL
New and still in dev !
|
|
|
09-01-2015, 02:34 AM
|
#9
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Hi !
Just installed this script, which , BTW, is insanely useful for me !
But:
- I can only tap with left or right mouse button, so it seems.
I tried a few keys like spacebar , W and Q, they don't work.
- Secondly, when tapping with mouse button, the estimated BPM is really way off.
For a 114 bpm track that i tap along with, i get readouts from about 230 BPM.
I do have a real good "tap along" skill, so that can't be the issue :0)
OSX 10.10.5
Reaper 5.02pre1 - 64bit.
|
|
|
09-01-2015, 04:07 AM
|
#10
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Code:
* v0.7 (2015-09-01)
+ Better deviation Engine ?
- Max
- Min
# Any keyboard output
I remove some displayed information what I think was not relevant or not mathematically correct.
The maths inside should be better but I still have some doubt about some value I would like to display... Still in progress...
(but again, it works :P)
WAIT FOR THE V8.
It will be far better.
Last edited by X-Raym; 09-01-2015 at 04:54 AM.
|
|
|
09-01-2015, 05:20 AM
|
#11
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Code:
* v0.8 (2015-09-01)
+ New input engine based on BPM
+ min, Max, Deviation and Precision
Thise one should be nice :P
|
|
|
09-01-2015, 06:33 AM
|
#12
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
- Keyboard input now works for me : Great !!
- But .. the calculated tapped tempo is still way of:
Tapped along on space bar with a disco track with 127 bpm average.
Outcome: (in green): average bpm: 358, max bpm: 361 , min bpm: 333
To me it seems not only these values are way of, but also the others .. (deviation etc.)
|
|
|
09-01-2015, 06:56 AM
|
#13
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Hmmmm
average BPM seems pretty fine to me, you get "wrong" values because you tap the eigth notes, not the quarter notes. 358 / 2 = 129 (close to 127 you were looking for).
but yes min and max are a bit extreme, but is seems to be "statiscly" correct, I only used standards stats function such as variance and standard deviation from other libraries...
I think we can get the most precise tap tempo ever by caclulating the average of all the averages... An idea to digg :P
|
|
|
09-01-2015, 07:14 AM
|
#14
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Hi !
No, i definitely tap 1/4 notes here...
Can it be that it has something to do with Reaper's host tempo setting or maybe even samplerate
of Reaper project ?
(problaby not, just checking :0)
|
|
|
09-01-2015, 07:46 AM
|
#15
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@vanhaze
Absolutely not, it is just about key typing here
hmm...
I'm curious can you test with metronome only ?
set it to 1/4, tempo what you want, and see if average bpm match.
|
|
|
09-01-2015, 07:56 AM
|
#16
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Sure,
Here is a vid that i made, with only metronome and tapping with left mouse key.
https://www.youtube.com/watch?v=ogdSlRPTy6o
|
|
|
09-01-2015, 08:06 AM
|
#17
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Vanhaze
Hmmm... you on a Mac....
All typing is calculated with a function "os.clock", I wonder if this function may work differently on mac than on PC...
I'll have to check that on a Mac to see that, it may be the cause of the problem, because I you can see, I personnaly don't have any problem (here on Windows).
Just an idea, it may be something completly different.
Can someone else test it ?
|
|
|
09-01-2015, 08:33 AM
|
#18
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Thx for your reply !
Hope to see some mac users indeed, to test.
This is script will be of incredible value to me :0)
|
|
|
09-01-2015, 08:53 AM
|
#19
|
Human being with feelings
Join Date: Oct 2009
Location: France
Posts: 745
|
Quote:
Originally Posted by X-Raym
@Vanhaze
Hmmm... you on a Mac....
All typing is calculated with a function "os.clock", I wonder if this function may work differently on mac than on PC...
I'll have to check that on a Mac to see that, it may be the cause of the problem, because I you can see, I personnaly don't have any problem (here on Windows).
Just an idea, it may be something completly different.
Can someone else test it ?
|
OK but can't access to your download link
|
|
|
09-01-2015, 09:01 AM
|
#20
|
Human being with feelings
Join Date: Dec 2011
Posts: 407
|
Little bit late but thank you XRaym! This is what i was wishing for
|
|
|
09-01-2015, 09:26 AM
|
#21
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Quote:
Originally Posted by X-Raym
@Vanhaze
Hmmm... you on a Mac....
All typing is calculated with a function "os.clock", I wonder if this function may work differently on mac than on PC...
I'll have to check that on a Mac to see that, it may be the cause of the problem, because I you can see, I personnaly don't have any problem (here on Windows).
Just an idea, it may be something completly different.
Can someone else test it ?
|
Maybe Reaper devs can chime in on this ?!
|
|
|
09-01-2015, 09:27 AM
|
#22
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Sumalc
Thanks : Go to my script pack on my website (link on my signature), download my script pack and import Tap Tempo script in Tempo folder !
@Nixon
Hope it will work for you !
@vanhaze
Just added (not uploaded yet) a way to do the same stats anylisis on all the last 16 averages BPM calculated. It output more steady value than just looking at the input... Just testing.
|
|
|
09-01-2015, 09:52 AM
|
#23
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Hero !
|
|
|
09-01-2015, 12:02 PM
|
#24
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Vanhaze
Can you make a simple test ?
- Open action window
- ReaScript New
- Create s cript called Clock test.lua
- paste the code below in it
- Press CMD+S
- Check if the clock variable displayed on the right of the editor is increasing like seconds. (it should display a certain number of seconds, and increasing at regulary interval (1 unit = 1 seconds)
Code:
function main()
clock = os.clock()
reaper.defer(main)
end
main()
Thanks !
|
|
|
09-01-2015, 12:51 PM
|
#25
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Hi, many thx for helping me !!
I get an error when doing the step: CMD+S , see attachment...
Dunno what to do ..
Last edited by vanhaze; 01-09-2016 at 02:50 PM.
|
|
|
09-01-2015, 12:55 PM
|
#26
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Vanhaze
it is not .eel, but .lua
|
|
|
09-01-2015, 01:08 PM
|
#27
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Sorry mate, i gotcha haha :0)
So now, no error when doing what you stated.
Outcome:
I watched the clock variable : it's not increasing in seconds : it's increasing like in almost 2 seconds ...
So i think this is the culprit, don't you think ?
|
|
|
09-01-2015, 01:13 PM
|
#28
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Vanhaze
definitely, I really wonder why, and it is a bit disturbing as os.time is the most accurate way to benchmark Lua scripts as it can handle milliseconds.
I wonder if it is an Lua integration error or something wrong on a your personal config...
We need more testers.
@all
Can someone else with a Mac OSX test the clock.lua script ?
|
|
|
09-01-2015, 02:19 PM
|
#29
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,653
|
Quote:
Originally Posted by X-Raym
Can someone else with a Mac OSX test the clock.lua script ?
|
Sure. Here 1 clock unit seems to correspond to ~3 seconds.
EDIT: However, if I change it to this, then 1 clock unit seems to correspond to ~1 second:
Code:
function main()
clock = os.clock()
repeat until os.clock() >= math.ceil(clock)
reaper.defer(main)
end
main()
I guess if I leave out reaper.defer(main) it would be exactly 1 second, but then of course I would not be able to see the results...
Last edited by Tale; 09-01-2015 at 02:30 PM.
|
|
|
09-01-2015, 02:28 PM
|
#30
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Tale
Thank you, it is all what I needed, I will report that in order to see if is it normal.
@all
More graphical experiment :
Display average of averages with small square, with grey level according to BPM (black = slow, white = quick tempo).
If you see a complete flat color rectangle on the average of averages display: you nailed it !
See how it is more homogeneous than simple averaging (for the same BPM output).
See how we can get from 0.97 to almost 100 precision :P
In this demo you will how I use it to find the tempo of a song, and then some experiment with different speed of typing.
Animated demo here
Last edited by X-Raym; 09-01-2015 at 02:57 PM.
|
|
|
09-01-2015, 02:36 PM
|
#31
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,653
|
Quote:
Originally Posted by X-Raym
@Tale
Thank you, it is all what I needed, I will report that in order to see if is it normal.
|
You're welcome. Have you seen the edit I did just before you answered? It would seem that reaper.defer(main) "steals" some of the script time, but I guess this is to be expected. But I don't know why this seems to have little impact on Windows (or at least at your end), and seems to have a lot of impact on OSX.
|
|
|
09-01-2015, 02:40 PM
|
#32
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Tale
Thanks for the infos !
Do you think I have to find another way to measure time that calling os.clock ?
I need milliseconds precision.
|
|
|
09-01-2015, 02:50 PM
|
#33
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,653
|
Quote:
Originally Posted by X-Raym
@Tale
Thanks for the infos !
Do you think I have to find another way to measure time that calling os.clock ?
I need milliseconds precision.
|
TBH this was my first experience ever with Lua, so I don't really know... That being said, I Googled os.clock(), and it seems that it does return the fractional time in seconds, but only while the script is running. So maybe on OSX the script gets paused during defer? I have no idea how to fix this though.
|
|
|
09-01-2015, 03:07 PM
|
#34
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Xenakios just suggest me to use Reaper function time precise().
http://forum.cockos.com/showpost.php...01&postcount=2
I think it is the way to go.
I will rewrite that and see if it works :P
|
|
|
09-01-2015, 03:18 PM
|
#35
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
v1.0 is out !
Code:
* Changelog:
* v1.0 (2015-09-02)
+ Mac user firendly
+ Graphical display
|
|
|
09-01-2015, 10:02 PM
|
#36
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Yes, you nailed it !
Working now perfectly in mac version Reaper :0)
Made a Toolbar Button in Arrange to call the script.
This made my day already and it's just starting, woohaa !!
|
|
|
09-01-2015, 11:26 PM
|
#37
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Vanhaze
Aaaah yeah it was quite experimental and uncertain, so seeing that the result is actually effective is pretty nice :P
|
|
|
09-02-2015, 01:08 AM
|
#38
|
Human being with feelings
Join Date: Oct 2009
Location: France
Posts: 745
|
Thank you very much Raymond, it works fine on my mac.
|
|
|
09-03-2015, 01:43 PM
|
#39
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Some display fixes :
Code:
* v1.1 (2015-09-03)
# Precision is now Accuracy
# Precision display fixed
Should be easier to understand. The more Accuracy you have, the more precise it is !
|
|
|
09-03-2015, 08:00 PM
|
#40
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Many thx for the update !!
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:17 PM.
|