Old 07-15-2016, 07:10 PM   #1
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default Lua: Drum Trigger(beta)

This is an old demo.
Many new things have been added.

===============



The script captures and analyzes the audio from the selected track in the time selection.
On this basis, the script creates a midi-item.


Simple scheme:
Capture audio > Filter > Transient Detector(+ analyzer RMS and Peak levels at each point) > Creation MIDI.

How use:
Select the track, set the time selection in the analyzed area. Click "Get Selection" button.
Get Selection - this is the main button to capture the audio from the track.
To work with different audio, you may need to change some settings.

Main settings description:
  • Filter settings:
    HP, LP sliders. It is High Pass, Low Pass.
    Out Gain slider - output signal level from the filter.
  • Detector settings:
    Threshold - the threshold(in dB) below which audio is not analyzed.
    Sensetive - Min diff(in dB) between the fast and slow detector-envelopes. The smaller the value - more the detected transients.
    Retrig - Time of inactivity after the last trig in ms.
    Reduce Points - removes "weak" point.
    Detect Velo - detection time (in milliseconds) RMS and Peak levels for the calculation of velocity.
    Higher values can provide a more accurate result, but not always.
  • MIDI settings:
    Create MIDI - creates a MIDI, depending on the settings(note, channel, note length).
    Under the button - Modes:
    Insert new item on new track, Insert new item on selected track -
    Use selected item - In this mode, MIDI be re-created automatically when you change any settings(without clicking on the "Create MIDI" button).
    RMS - Peak - determines how the Velocity value will be calculated.
    Velo Scale - scales the velocity between the minimum and maximum value.

Some additional features:
  • Navigation.
    The script supports easy navigation with the mouse.
    Horizontal Zoom - Mouswheel,
    Vertical Zoom - Shift+Mouswheel,
    Move View(Scroll) - Middle mouse drag,
    Set Edit Cursor - Left click.
  • Manual correction.
    You can delete or add markers manually. Additionally, you can change the position of the marker or the value of velocity.
    Delete Marker - Right click on Marker,
    Insert Marker - Right click on Empty Space,
    Move Marker - Shift+Left drag,
    Change Velocity - Ctrl+Left drag,
    Move Marker and Change Velocity - Shift+Ctrl+Left drag.

===============

Link(will be updated):
Drum trigger.lua

===============
How install - it is actual for all lua-scripts(unless otherwise stated):
Open Reaper. Actions>Show Action List. ReaScript: press "New".
Select the folder for scripts(By default - ...\Reaper\Scripts).
Specify the name and extension - .lua(it's mandatory). For Example, MyScript.lua. Click save. You will see a black window.
Copy the text of the script(link in the first post) in this window. Press Ctrl+S. Close the window. Now the script is available in the Action List.
===
In addition, you can use Reapack, but the link to my repository must be added manually
__________________
ReaScripts

Last edited by eugen2777; 09-25-2016 at 12:59 PM.
eugen2777 is offline   Reply With Quote
Old 07-15-2016, 11:23 PM   #2
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Errr..Oh My !!!
vanhaze is offline   Reply With Quote
Old 07-16-2016, 04:57 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

HP, LP, trasnient analysis, right from ReaScript... That's one the most advanced audio analysis ReaScript :P

For the task, I would have used GrooveExtractor Lite - LeSound by AudioGaming. Maybe you can take some inspiration from it.

But I'm really curious about how far you could go with a ReaScript solution.
What could be the benefit against GrooveExtractor ?

impressive job so far
X-Raym is offline   Reply With Quote
Old 07-16-2016, 10:49 AM   #4
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

Seems impressive and has potential to become EPIC.
If you would be able to add even some of these features it would be amazing

I know nothing about programming or reaper scripts xD so i don't know if im asking for something difficult or simply impossible

-If one could individually add or remove "markers" where you want to put the midi note instead of using only the detection threshold.

-Being able to move the markers from left to right to put it exactly where you want if you don't agree with the detection.

-Being able to change the velocity of every individual midi note

-Slider/knobs to compress or expand the velocities and to lower or increase the velocities if all the hits detected.

-Being able to select the midi note output (ex: 36 C3)and the length of said midi notes (1/16 ,1/32, etc)

examples:

https://youtu.be/AEeDWQoilTY?t=2m15s

https://youtu.be/j4jSCiIAAcc?t=44s

With that said, after testing it on some very clean snare/kick trigger tracks:

PROS:
just being able to convert drums to midi without having to
split them or making chromatic midi and especially being able to zoom in and out where you want with the mouse wheel is something really amazing

CONS:
Right now you cant zoom IN very much and the blue/red color for the detection make it very difficult to fine tune or see if its really accurate.
The-Zeronaut is offline   Reply With Quote
Old 07-16-2016, 12:50 PM   #5
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

whoa! very cool!

I'll give it a go when I can. thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 07-17-2016, 05:59 AM   #6
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

X-Raym, thank you
The-Zeronaut, it will be added
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:03 AM.
eugen2777 is offline   Reply With Quote
Old 07-18-2016, 08:48 PM   #7
Pfhuck
Human being with feelings
 
Pfhuck's Avatar
 
Join Date: Oct 2008
Posts: 67
Default

This is amazing eugen!

I would also like to see add/move/replace of markers. Velocity/note and length are easy to do in the midi editor. However it would be nice to have those options as well.

Already a big time saver!

Many thanks!
__________________
Please and THANK YOU!!!
-Pfhuck
Pfhuck is offline   Reply With Quote
Old 07-20-2016, 07:59 AM   #8
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

Amazing!
The-Zeronaut is offline   Reply With Quote
Old 07-28-2016, 07:41 AM   #9
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Some new features:
New graphics quality with a 50-level zoom.

New mode - auto-replacement midi-note in the selected item.
__________________
ReaScripts

Last edited by eugen2777; 07-28-2016 at 08:25 AM.
eugen2777 is offline   Reply With Quote
Old 07-29-2016, 12:19 AM   #10
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Added
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:00 AM.
eugen2777 is offline   Reply With Quote
Old 07-29-2016, 11:17 PM   #11
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

Keeps getting better and better

I would like to be able to zoom more (i always check the accuracy of drum audio to midi at sample level)
and also make an option/checkbox the "RED" (i think its the filter) appear and disappear because its confusing to see exactly where the midi note is.

i LOVE that you can see the play cursor on the window but would be amazing if when you are zoomed in the waveform display followed the play cursor from left to right like when you do middle drag

what does the "draw" option change? is it the quality of the waveform picture or is it something else?
The-Zeronaut is offline   Reply With Quote
Old 07-29-2016, 11:48 PM   #12
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

The max
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:00 AM.
eugen2777 is offline   Reply With Quote
Old 07-30-2016, 07:54 AM   #13
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

super kewl eugen Please keep going!
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 07-30-2016, 08:04 AM   #14
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

this is really awesome, and I hope it continues - would this be able to be used to send "grooves" to midi tracks?
Jae.Thomas is offline   Reply With Quote
Old 07-30-2016, 06:13 PM   #15
PitchSlap
Human being with feelings
 
PitchSlap's Avatar
 
Join Date: Jan 2008
Location: Vancouver, BC
Posts: 3,793
Default

WOW! Great job!

I definitely got a bit jealous when Ableton Live got audio-to-MIDI and audio-to-drum MIDI conversion so I'm excited to check this out.
I think it would probably be a lost faster/easier to use this a creative tool for generating new MIDI patterns from drum loops, rather than trying to exactly convert a loop to MIDI.


I realize this is a very early version, but thought I'd share a bunch of ideas:

-Use Rex slice points when available.

-It would be helpful if there were a few included detection presets, and users could save their own. For example, we could choose "kick", "snare", "hi-hat" etc. and the filter, threshold, sensitivity, as well as the note value for the created MIDI would change accordingly.

-Option to create MIDI as new take. That way we could create pattern variations with slightly different detection settings and cycle between takes for arrangement variations and change the item pitch to trigger different samples.

-Instead of note numbers, use the associated GM drum name. Include a few more common drums/percussion based on the GM map.

-Allow auditioning of the filter split so we can more accurately choose the crossover point.

-Not a huge deal since we can quantize after, but it would be nice to have a grid setting and quantize strength for changing the timing of detected MIDI. Triplets and double-time are great for generating interesting patterns.

-Optionally overlay a beat based timeline on the waveform display.

-Double click on parameter values to return them to default (wouldn't really be needed if there were detection presets).
__________________
FRs: v5 Media Explorer Requests, Global Quantization, Session View
Win10 Pro 64-bit, Reaper 6(x64), AMD 3950x, Aorus X570 Master, 64GB DDR4 3600, PowerColor Red Devil 5700XT, EVO 970 2TB, 10TB HD, Define R6

Last edited by PitchSlap; 07-31-2016 at 01:58 PM.
PitchSlap is offline   Reply With Quote
Old 07-30-2016, 08:52 PM   #16
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

Quote:
Originally Posted by PitchSlap View Post

-Allow auditioning of the filter split so we can more accurately choose the crossover point.

-Optionally overlay a beat based timeline on the waveform display.
+1 Great ideas
(but the grid on the second one be able to make it appear/disappear)

i honestly think that when this is complete it will be one of the best things in Reaper.
The-Zeronaut is offline   Reply With Quote
Old 07-30-2016, 08:58 PM   #17
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Update.
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:01 AM.
eugen2777 is offline   Reply With Quote
Old 07-30-2016, 11:51 PM   #18
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Ok, I think
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:01 AM.
eugen2777 is offline   Reply With Quote
Old 07-31-2016, 07:49 AM   #19
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

I´m getting a pop-up
"ReaScript console output.
Full process time: "
every time i hit the button "get selection"

The add/delete midi markers work perfectly.

one question:
What does the "filter gain" slide actually do? is it just to make the "red" bigger?
The-Zeronaut is offline   Reply With Quote
Old 07-31-2016, 08:35 AM   #20
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

No, it really
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:02 AM.
eugen2777 is offline   Reply With Quote
Old 08-01-2016, 08:17 PM   #21
Pfhuck
Human being with feelings
 
Pfhuck's Avatar
 
Join Date: Oct 2008
Posts: 67
Default

Thank you very much eugen! This script was already awesome.

Add/move/delete markers in this update is amazing!

Can't wait to see what you come up with next
__________________
Please and THANK YOU!!!
-Pfhuck
Pfhuck is offline   Reply With Quote
Old 08-05-2016, 02:15 PM   #22
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Nothing
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 01:02 AM. Reason: The total lack of interest in the topic.
eugen2777 is offline   Reply With Quote
Old 08-06-2016, 03:18 AM   #23
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Can I delete this topic.
Or at least change the name of the theme.
At the given moment, it is already fully working script.
Of course, many of the changes will be, but I do not want people to take it as a test.
It is almost ready to be used in real projects
====================
That's my fault. Initially, I did not want to develop it, so called wrong topic.
====================
Simply delete that in brackets
====================
I apologize and I will continue to act according to the rules
__________________
ReaScripts

Last edited by eugen2777; 08-06-2016 at 03:33 AM.
eugen2777 is offline   Reply With Quote
Old 08-06-2016, 09:19 AM   #24
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 08-06-2016, 11:34 AM   #25
Bassman1
Human being with feelings
 
Bassman1's Avatar
 
Join Date: Mar 2007
Location: UK
Posts: 472
Default

Can someone please tell how I can add this?

I have Reapack but can't find this, am I barking up the wrong tree guys?
__________________
Bought REAPER V1.5 and still going strong today with V5.
Thanks Justin & Co !
Bassman1 is offline   Reply With Quote
Old 08-06-2016, 01:05 PM   #26
Pet
Human being with feelings
 
Pet's Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 1,015
Default

Go to post #1, click on "Link". This opens the script in a new window. Then "File" => "Save page as..."
__________________
If the v5 Default Theme is too bright for you take a gander at my mod of it: Default v5 Dark Theme
Pet is offline   Reply With Quote
Old 08-06-2016, 02:40 PM   #27
Bassman1
Human being with feelings
 
Bassman1's Avatar
 
Join Date: Mar 2007
Location: UK
Posts: 472
Default

Thank you, and add to reascript?
__________________
Bought REAPER V1.5 and still going strong today with V5.
Thanks Justin & Co !
Bassman1 is offline   Reply With Quote
Old 08-06-2016, 04:14 PM   #28
Pet
Human being with feelings
 
Pet's Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 1,015
Default

You mean ReaPack or how to load the script into Reaper?

Load script into Reaper:
  • open action window
  • on the right bottom: ReaScript => Load...
  • go to the folder where you stored the script and load it...
Hope that's what you meant.

Including it in the ReaPack is something you can't do on your own that easy, as far as I know...
__________________
If the v5 Default Theme is too bright for you take a gander at my mod of it: Default v5 Dark Theme
Pet is offline   Reply With Quote
Old 08-07-2016, 02:22 AM   #29
Bassman1
Human being with feelings
 
Bassman1's Avatar
 
Join Date: Mar 2007
Location: UK
Posts: 472
Default

Thanks again, but I still cannot find a way to use this. I saved the page as you said. Maybe I'm confused, but I thought this was a Reascript. I tried adding it, as you said, but 'Actions' was greyed out, so I could not select it.
__________________
Bought REAPER V1.5 and still going strong today with V5.
Thanks Justin & Co !
Bassman1 is offline   Reply With Quote
Old 08-07-2016, 04:09 AM   #30
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Saving a web page like that may add a .txt (or some other) file extension to the end of the file name. So you might have a file named eg. "GT_Drum%20trigg(Test).lua.txt" in there? If that's the case, rename the file as "GT_Drum trigger(Test).lua" and it should be good to be loaded via Actions/ReaScript/Load...
xpander is offline   Reply With Quote
Old 08-07-2016, 04:15 AM   #31
Bassman1
Human being with feelings
 
Bassman1's Avatar
 
Join Date: Mar 2007
Location: UK
Posts: 472
Default

Ah finally I've loaded it...Thanks guys. I now need to learn to use it

Hope there's a video online to learn this. Must be my age
__________________
Bought REAPER V1.5 and still going strong today with V5.
Thanks Justin & Co !
Bassman1 is offline   Reply With Quote
Old 08-07-2016, 04:29 AM   #32
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Agreed !
A video tutorial would be very helpful to understand it fully :0)
vanhaze is offline   Reply With Quote
Old 08-07-2016, 07:16 AM   #33
Pet
Human being with feelings
 
Pet's Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 1,015
Default

Quote:
Originally Posted by Bassman1 View Post
Thanks again, but I still cannot find a way to use this. I saved the page as you said...
Quote:
Originally Posted by xpander View Post
Saving a web page like that may add a .txt (or some other) file extension to the end of the file name...
Hi guys, before I posted, I checked the "Save page as..." thingy and it was stored as ".lua" by default. So I didn't state it explicitly - just to keep it simple...my bad, sorry.

But maybe it's of some interest that both still happens and you still have to have pay attention to.
__________________
If the v5 Default Theme is too bright for you take a gander at my mod of it: Default v5 Dark Theme
Pet is offline   Reply With Quote
Old 08-07-2016, 09:33 AM   #34
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

I can not explain the simple questions here.
On other issues - will be added.
__________________
ReaScripts
eugen2777 is offline   Reply With Quote
Old 08-07-2016, 07:13 PM   #35
Pfhuck
Human being with feelings
 
Pfhuck's Avatar
 
Join Date: Oct 2008
Posts: 67
Default

Thank you for the velocity/move marker functionality eugen!
__________________
Please and THANK YOU!!!
-Pfhuck
Pfhuck is offline   Reply With Quote
Old 08-08-2016, 01:26 AM   #36
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Quote:
Originally Posted by Pet View Post
Including it in the ReaPack is something you can't do on your own that easy, as far as I know...
Quote:
Originally Posted by Bassman1 View Post
Can someone please tell how I can add this? I have Reapack but can't find this, am I barking up the wrong tree guys?
Eugene`s repo is ReaPack compatible actually. It is just not included by default yet. To get his stuff up-to-date and ready to use, you need to add it manually:
ReaPack > Import repository > CopyPaste this link
mpl is offline   Reply With Quote
Old 08-08-2016, 11:51 AM   #37
Pet
Human being with feelings
 
Pet's Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 1,015
Default

Thank you mpl!
__________________
If the v5 Default Theme is too bright for you take a gander at my mod of it: Default v5 Dark Theme
Pet is offline   Reply With Quote
Old 08-09-2016, 01:40 PM   #38
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

work gret!

just test it on a raw kick drum track and it's very accurate!

works better than toontrack drumtracker
__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 08-19-2016, 05:32 PM   #39
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Updated.
Add Velocity Scale - interesting thing, Reduce Points, note,chan,len etc
Fixed some err. Im sorry , тут кто-то на русском говорит?
__________________
ReaScripts

Last edited by eugen2777; 08-19-2016 at 06:05 PM.
eugen2777 is offline   Reply With Quote
Old 08-20-2016, 10:13 AM   #40
raiirock
Human being with feelings
 
raiirock's Avatar
 
Join Date: Mar 2013
Location: Moscow
Posts: 99
Default

Да конечно )
raiirock is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.