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,900
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: 309
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,218
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 10-27-2016, 12:22 PM   #7
sfzgeek
Human being with feelings
 
sfzgeek's Avatar
 
Join Date: Feb 2009
Location: Dunedin, New Zealand
Posts: 205
Default

This tool looks so amazing!

Following the development closely... thanks so much for sharing!
__________________
My rawk band: The Hidden Venture.
sfzgeek is offline   Reply With Quote
Old 10-27-2016, 01:27 PM   #8
HoJo
Human being with feelings
 
Join Date: Dec 2007
Location: Germany
Posts: 253
Default

Hi TonE.

I believe you felt offended by my signature possibly?!
Hope you don't as it wasn't meant politically in any way.
It was more like "the good 'ol days" like in a song, you know?
But congrats, changing it now.

Apart from that, why don't you show a little politeness to the ThreadCreator for his engagement...

Don't think it is a good idea to bring in politcal stuff into this thread.

eugen2777: I feed sorry, that you have to deal with comments I might have caused without knowing I did.

RGDS,
HoJo

Last edited by HoJo; 10-27-2016 at 01:34 PM.
HoJo is offline   Reply With Quote
Old 10-29-2016, 02:51 PM   #9
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

I have nothing to do with politics. No matter what your political views any more. The only reason why I can't do anything to add or fix in the script - no time for this. Sometimes I just do other things.
When I have time, the markers will be added.
__________________
ReaScripts
eugen2777 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 10:39 AM.


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