Old 10-25-2018, 04:12 AM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default ReaScript: MIDIEditor_SnapToGrid

The arrange view has a SnapToGrid API function, but the MIDI editor does not.

The MIDI editor's grid settings can be different from those of the arrange view, and the MIDI editors' settings are also somewhat more complicated, since it can use either "Source beats" or "Project beats".

It would therefore be useful to have a MIDIEditor_SnapToGrid API function:
Code:
Lua: number reaper.MIDIEditor_SnapToGrid(HWND midiEditor, number timePos)
Alternatively, instead of project time position, the function could use take ticks as argument.
juliansader is offline   Reply With Quote
Old 10-25-2018, 09:39 AM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Here is snapping code snippet https://github.com/MichaelPilyavskiy...tes%20ends.lua if it helps.
mpl is offline   Reply With Quote
Old 10-25-2018, 04:26 PM   #3
blindwiz
Human being with feelings
 
Join Date: Apr 2016
Posts: 20
Default

+1 especially on adding the tick setting.
blindwiz 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:43 AM.


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