|
|
|
12-26-2018, 05:52 AM
|
#1
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
New Script: tompad_MusicMath - Bpm to ms converter
Hi all!
tompad_MusicMath is a reascript to get ms from bpm in a Reaperproject.
It also convert tone to Hz.
When script window is opened, it takes the current bpm from
Reaper and by choosing note buttons it convert bpm to ms.
By clicking the resulting ms-text the script is copying the
ms to the systems clipboard (for pasting in to delay f.ex)
Install with ReaPack! https://reapack.com/
And yes - you need Lokasenna GUI installed.
Any comments on coding, requests, bugs etc is welcome!
PM me (tompad) on Reaper Forum ( https://forum.cockos.com/member.php?u=19103).
Updated: 20181231
Version: 1.1
Release tompad_MusicMath - bpm/tone to ms/Hz converter v1.1
Added coverter note to Hz
Added tooltip "Click to copy to clipboard"
Added flashing green when clicking on ms or Hz label
Last edited by tompad; 02-14-2019 at 09:38 AM.
|
|
|
12-26-2018, 01:35 PM
|
#2
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Many thanks for your work, this is very handy for delays and release times.
Will try it out.
|
|
|
12-26-2018, 02:05 PM
|
#3
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
Thank you
|
|
|
12-26-2018, 03:31 PM
|
#4
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
This was already solved by Breeder JS BPM to seconds converter (on stash) :P
|
|
|
12-27-2018, 04:41 AM
|
#5
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by X-Raym
This was already solved by Breeder JS BPM to seconds converter (on stash) :P
|
Ok, didn't know. I also found another by elijahlucian...but none of them
has dotted and triplets as I can see. And mine saves the result to clipboard
when clicking. No writing involved :-)
And if I may say so - using Lokasenna GUI looks much better! ;-)
Compare your self - attached a png with all three:
Last edited by tompad; 11-12-2019 at 12:00 PM.
|
|
|
12-27-2018, 04:44 AM
|
#6
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
@Eliseat and @amagalma - ur welcome!
|
|
|
12-27-2018, 04:57 AM
|
#7
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Quote:
but none of them
has dotted and triplets as I can see.
|
Breeder JS do have it :P
https://monosnap.com/image/8HGFCCc9f...CYuCK1FgVj.png
But yes, it is not big nice buttons with clipboard feature, it has to be put in track FX etc... So your script can indeed be more quicker for just quickly getting values.
|
|
|
12-27-2018, 05:07 AM
|
#8
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Code:
tompad_MusicMath.lua:1: unexpected symbol near '<'
I watched your gif and was pretty curious but I didn't have enough time to check it out. Now I had and got an error. I just downloaded the lua and pasted it into the scripts folder. It shows up in the list but I can't get it to run.
Any idea what could be wrong? I really appreciate the idea of your tool.
Many thanks
|
|
|
12-27-2018, 05:09 AM
|
#9
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by X-Raym
|
Could just find Kurmax version....?
What does the sliders do??
|
|
|
12-27-2018, 05:25 AM
|
#10
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Eliseat
Code:
tompad_MusicMath.lua:1: unexpected symbol near '<'
I watched your gif and was pretty curious but I didn't have enough time to check it out. Now I had and got an error. I just downloaded the lua and pasted it into the scripts folder. It shows up in the list but I can't get it to run.
Any idea what could be wrong? I really appreciate the idea of your tool.
Many thanks
|
Hi, this is funny! I had the same experience checking it out on my Win DAW
(downloading from BitBucket)! First I didn,t understand it but after opening
the downloaded file I saw that the downloaded file was just a html-file, not
the actual lua script! Dont know why BitBucket does this.....however one can
fix this by clicking the link and copy the text to a file on your computer
and save it with extension .lua and put it in Reaper folder Scripts.
Or - I attach the tompad_MusicMath.lua to this message:
Last edited by tompad; 11-12-2019 at 12:00 PM.
|
|
|
12-27-2018, 05:34 AM
|
#11
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
The sliders are just for displayed values, though they have the advantages of being accessible via reascript or envelope or for track parameter modulation, so in these case it answers different need than just "getting the values".
Though I didn't have to use such thing so far.
|
|
|
12-27-2018, 05:54 AM
|
#12
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Works great and as easy as expected.
Very cool and quick.
One thing I would suggest to make the handling more interactively. Just a visual reaction when clicking (and copying to clipboard). This could be a highlighting (brightening) of the value numbers or a short framing/background coloring with the click. I don't know if lokasenna's library offers something like that. The best would be a short massage (no pop up) or an icon which shows that the numbers are copied to clipboard.
Beside that its very cool tool.
Many thanks for that.
Last edited by Eliseat; 12-27-2018 at 06:01 AM.
|
|
|
12-27-2018, 06:10 AM
|
#13
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Eliseat
Works great and as easy as expected.
Very cool and quick.
|
Thanks - glad to contribute to Reaper community!
Quote:
One thing I would suggest to make the handling more interactively. Just a visual reaction when clicking (and copying to clipboard).
|
Yes, I am thinking about that. Not sure if Lokasenna GUI can handle it,
but I will check it out. .... maybe a green arrow at the side of text?
or a frame around the text?
Is it only the clipboard copying or should what button is clicked show also?
|
|
|
12-27-2018, 07:41 AM
|
#14
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Quote:
Originally Posted by tompad
Thanks - glad to contribute to Reaper community!
Yes, I am thinking about that. Not sure if Lokasenna GUI can handle it,
but I will check it out. .... maybe a green arrow at the side of text?
or a frame around the text?
Is it only the clipboard copying or should what button is clicked show also?
|
No, its just that it needs a reaction. You can right and left click a text and would usually expect that nothing happens. So it needs a differentiation that this is not only a number but an interactive text/number field.
|
|
|
12-27-2018, 09:33 AM
|
#15
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Thanks for sharing.
Quote:
Originally Posted by tompad
Hi, this is funny! I had the same experience checking it out on my Win DAW
(downloading from BitBucket)! First I didn,t understand it but after opening
the downloaded file I saw that the downloaded file was just a html-file, not
the actual lua script! Dont know why BitBucket does this.....however one can
fix this by clicking the link and copy the text to a file on your computer
and save it with extension .lua and put it in Reaper folder Scripts.
Or - I attach the tompad_MusicMath.lua to this message:
|
On Bitbucket and Github there are also links to 'raw' versions which aren't html-ized.
In this case:
https://bitbucket.org/TompaD/tompad_..._MusicMath.lua
Or from here clicking the 'Raw' button:
https://bitbucket.org/TompaD/tompad_...e-view-default
How about making your scripts available in ReaPack btw?
Last edited by nofish; 12-27-2018 at 09:38 AM.
|
|
|
12-27-2018, 10:56 AM
|
#16
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by nofish
|
Thanks nofish!
Yes I have submitted it to ReaPack - havn't checked if it passed yet.
|
|
|
12-27-2018, 11:01 AM
|
#17
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
tompad_MusicMath is now on ReaPack!
Search for musicmath and you will find!
|
|
|
12-27-2018, 02:05 PM
|
#18
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Yep, works here installing via ReaPack. Thanks.
|
|
|
12-27-2018, 10:37 PM
|
#19
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
This is useful, tompad thank you. I was just looking for a script that would do this.
Another handy script in the same vein would be a script that displays the Hz value of a selected note in its different octaves from 0-8. A la:
http://pages.mtu.edu/~suits/notefreqs.html
Would be good for dialing in EQ to the root note of things without having to pop the browser open.
|
|
|
12-28-2018, 01:50 AM
|
#20
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Arthur McArthur
This is useful, tompad thank you. I was just looking for a script that would do this.
Another handy script in the same vein would be a script that displays the Hz value of a selected note in its different octaves from 0-8. A la:
http://pages.mtu.edu/~suits/notefreqs.html
Would be good for dialing in EQ to the root note of things without having to pop the browser open.
|
Interesting information - I'll look at it!
May I ask, how do you use this information in Reaper?
Why dialing in EQ to the root note?
|
|
|
12-28-2018, 02:32 AM
|
#21
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
Great, thanks tompad.
Having the hz value for notes is useful mainly for EQ and filtering. Especially to make low-frequency instruments sit together well.
I.e: if I have a main kick and a sub kick, both with their fundamental frequency at E, I'll play around with their respective EQ at multiples of the fundamental: 41hz, 82hz, 164hz (E1, E2 and E3) to try to get them to sound cohesive. Maybe the main kick needs some E3 and less E1 to make room for the sub kick, maybe I need to put a low pass filter on the sub quick at E3/164hz, etc.
|
|
|
12-28-2018, 04:13 AM
|
#22
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Arthur McArthur
Great, thanks tompad.
Having the hz value for notes is useful mainly for EQ and filtering. Especially to make low-frequency instruments sit together well.
I.e: if I have a main kick and a sub kick, both with their fundamental frequency at E, I'll play around with their respective EQ at multiples of the fundamental: 41hz, 82hz, 164hz (E1, E2 and E3) to try to get them to sound cohesive. Maybe the main kick needs some E3 and less E1 to make room for the sub kick, maybe I need to put a low pass filter on the sub quick at E3/164hz, etc.
|
Ahaa, I see. Didn't think of drum as this, interesting.
|
|
|
12-31-2018, 09:37 AM
|
#24
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
@Eliseat and @Arthur McArthur!
New version added to ReaPack.
Code:
Updated: 20181231
Version: 1.1
Release tompad_MusicMath - bpm/tone to ms/Hz converter v1.1
Added coverter note to Hz
Added tooltip "Click to copy to clipboard"
Added flashing green when clicking on ms or Hz label
Enjoy - let me know if something dont work.
|
|
|
12-31-2018, 06:44 PM
|
#25
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Amazing! Works great.
Many thanks and Happy New Year!
|
|
|
01-01-2019, 01:47 PM
|
#26
|
Human being with feelings
Join Date: Sep 2016
Location: Toronto
Posts: 744
|
Thanks, Tom! Sent you a New Years drink. Cheers and Happy New Year!
|
|
|
01-01-2019, 03:42 PM
|
#27
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
I didn't recognize you added a frequency table too. (Was obviously to tipsy that night I checked the new version the first time. )
This is awesome and a good helper if you use older EQs without frequency to MIDI note translation. Very helpful and well made. Many, many thanks.
|
|
|
01-02-2019, 03:47 AM
|
#28
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Arthur McArthur
Thanks, Tom! Sent you a New Years drink. Cheers and Happy New Year!
|
Thanks! And a Happy New Year to you too!
|
|
|
01-02-2019, 03:49 AM
|
#29
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Eliseat
I didn't recognize you added a frequency table too. (Was obviously to tipsy that night I checked the new version the first time. )
This is awesome and a good helper if you use older EQs without frequency to MIDI note translation. Very helpful and well made. Many, many thanks.
|
Thank you, and a Happy New Year!
|
|
|
01-06-2019, 04:07 AM
|
#30
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Quote:
Originally Posted by tompad
tompad_MusicMath is now on ReaPack!
Search for musicmath and you will find!
|
This is an incredible handy tool !
I made a Toolbar Button for it in my Main Toolbar.
Great work, a Big Thx !!
|
|
|
01-06-2019, 10:44 AM
|
#31
|
Human being with feelings
Join Date: Jan 2018
Location: West Coast - Sun, Sun, and more Sun
Posts: 719
|
nice...
__________________
Rockin the Not_Room... Kali LP6 |iLoud |Mackie Big Knob |AXE I/O |Bugera |Ibanez |Fender |Nektar |Amplitube |PRS Supermodels |iRig Stomp I/O |ARC 3.0 |
|
|
|
01-15-2019, 11:57 AM
|
#32
|
Human being with feelings
Join Date: Mar 2018
Posts: 72
|
How to run this script?
I have installed
tompad_MusicMath.lua
ReaPack.dll
Lokasenna's GUI library for Lua.lua
Lokasenna_GUI v2 library path.lua
Set Lokasenna_GUI v2 library path.lua
last script did't creater a folder, so I created it manually ..\AppData\Roaming\REAPER\Scripts\ReaTeam Scripts\Development\Lokasenna_GUI v2...
but it still gives an error "tompad_MusicMath.lua:22: attempt to call a nil value"
|
|
|
01-15-2019, 12:28 PM
|
#33
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by kovarny
How to run this script?
I have installed
tompad_MusicMath.lua
ReaPack.dll
Lokasenna's GUI library for Lua.lua
Lokasenna_GUI v2 library path.lua
Set Lokasenna_GUI v2 library path.lua
last script did't creater a folder, so I created it manually ..\AppData\Roaming\REAPER\Scripts\ReaTeam Scripts\Development\Lokasenna_GUI v2...
but it still gives an error "tompad_MusicMath.lua:22: attempt to call a nil value"
|
Hi Kovarny!
Sorry to hear you have problems with my script.
Are you on Win, OSX or Linux? Which Reaper version?
Did you install the script and Lokasenna GUI from ReaPack?
The error you get is from line 22 from my script
See code:
Code:
local lib_path = reaper.GetExtState("Lokasenna_GUI", "lib_path_v2")
if not lib_path or lib_path == "" then
line 22 ---> reaper.MB("Couldn't load the Lokasenna_GUI library.
Please run 'Set Lokasenna_GUI v2 library path.lua' in the
Lokasenna_GUI folder.", "Whoops!", 0)
return
end
and it should give a MessageBox with the text:
"Couldn't load the Lokasenna_GUI library. Please run 'Set Lokasenna_GUI v2 library path.lua' in the Lokasenna_GUI folder."
So I guess the installation of Lokasenna GUI is not correct....(did you install it with ReaPack?)
Let me know....
|
|
|
01-16-2019, 10:48 AM
|
#34
|
Human being with feelings
Join Date: Mar 2018
Posts: 72
|
Alright, I deleted everything and started all over again. From Repack I installed Lokasenna_GUI v2.lua and tompad_MusicMath.lua, but got an error "Couldn't load the Lokasenna_GUI library. Please run 'Set Lokasenna_GUI v2 library path.lua'. So I installed Set Lokasenna_GUI v2 library path.lua, and now your plugin is working well.
But I didn't found "Set Lokasenna_GUI v2 library path.lua" script in ReaPack, I downloaded it separately
|
|
|
01-16-2019, 11:31 PM
|
#35
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by kovarny
Alright, I deleted everything and started all over again. From Repack I installed Lokasenna_GUI v2.lua and tompad_MusicMath.lua, but got an error "Couldn't load the Lokasenna_GUI library. Please run 'Set Lokasenna_GUI v2 library path.lua'. So I installed Set Lokasenna_GUI v2 library path.lua, and now your plugin is working well.
|
Great! Glad to hear it works. Let me know if you find any bugs
or have a suggestion to improve it.
Quote:
But I didn't found "Set Lokasenna_GUI v2 library path.lua" script in ReaPack, I downloaded it separately
|
That script is installed with the Lokasenna GUI and you find the script in
Lokasenna GUI v2/Library folder. Maybe I am wrong - but I think its in the
action list after you installed Lokasenna GUI. If not, its easy to load it
into action list. Just open action list and click Load (Reascript) and go to
the Lokasenna GUI v2/Library folder and select "Set Lokasenna_GUI v2
library path.lua". Now its listed in action list and you just select it and
click Run and you are ready to go.
|
|
|
02-09-2019, 09:28 AM
|
#36
|
Human being with feelings
Join Date: Apr 2010
Location: Cloud 37
Posts: 1,071
|
How exactly does this work? Is it an action? Or I right-click a note to see the frequency?
|
|
|
02-09-2019, 02:27 PM
|
#37
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
|
Quote:
Originally Posted by Mr. PC
How exactly does this work? Is it an action? Or I right-click a note to see the frequency?
|
Its a script showing a window with 2 tabs - one for getting ms from bpm
and another for getting Hz from note name (selected with sliders).
The bpm is selected from current position in arrange view.
|
|
|
02-12-2019, 05:42 AM
|
#38
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@tompad
Maybe add your Reapack link on your signature or on first post, it is not obvious where the file can be downloaded :P
|
|
|
02-12-2019, 05:45 AM
|
#39
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
MusicMath is in the ReaTeam repo.
|
|
|
02-12-2019, 06:38 AM
|
#40
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@cfillion
Thx ! :P
|
|
|
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 10:42 AM.
|