Old 09-06-2015, 04:27 PM   #41
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,585
Default

Quote:
Originally Posted by mpl View Post
planetnine, no problem to turn something like this
...
into reference points. Problem is how to get it directly from .mid
If you know something about how to do that at least in EEL, please tell

Do you know much about the format and structure of .mid files? -I'm afraid that's something I'm not familliar with at this time.

Reading them in as data and deconstructing them is probably something I can help with if you know something of their structure. It should be easy enough to read the source .mid file name and path from the item and open it.

Let me read up on .mid and I'll get back to you.


Edit: it seems to be straightforward header and track data in simple binary format. Can you post me a couple of example .mid files please, and I'll pull the wav file reading functions out of one of my scripts and modify them to give you ASCII lines?





>

Last edited by planetnine; 09-06-2015 at 04:33 PM.
planetnine is offline   Reply With Quote
Old 09-06-2015, 05:41 PM   #42
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,773
Default

Quote:
Originally Posted by G-Sun View Post
Your work seems very valuable to me.
I tend to agree, which is why I've been trying to set up an Yandex account (Russian Paypal) so I can send him a donation.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia 9600, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 09-06-2015, 10:02 PM   #43
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

daxliniere, thanks for your efforts and sorry for this, I tried to somehow setup paypal account, but it didn`t works for international transfers, so I posted YandexMoney Account Id and direct Master Card Number (last week). I`m really new to any donation system cause I`m ordinary factory worker and always was satisfied with $300 pay per month ))

planetnine, look at the attachment. Two 1/16th notes placed right on beats start.
I found this online converter to convert mid binary to text. The file I attached returns this (it is ppq /note/velocity as I understood):
Quote:
File: 11.MID
MFile 0 1 960
MTrk
0 On ch=1 n=60 v=96
240 Off ch=1 n=60 v=0
960 On ch=1 n=60 v=96
1200 Off ch=1 n=60 v=0
2016 Par ch=1 c=123 v=0
2016 Meta TrkEnd
TrkEnd
I`ve got value like that
Quote:
4D, 54, 68, 64, 00, 00, 00, 06, 00, 00, 00, 01, 03, C0, 4D, 54, 72, 6B, 00, 00, 00, 1C, 00, 90, 3C, 60, 81, 70, 80, 3C, 00, 85, 50, 90, 3C, 60, 81, 70, 80, 3C, 00, 86, 30, B0, 7B, 00, 00, FF, 2F, 00
as return of this code
Code:
function Get_table_from_file(filename)
  local t = {}
  file = assert(io.open(filename, "rb"))
  content = file:read("*all")
  for line in io.lines(filename) do table.insert(t, line) end
  file:close()
  return t
end

t = Get_table_from_file([[C:\11.mid]])
reaper.ShowConsoleMsg("")

str = ""

for i=1, #t do
  len = string.len(t[i])
  for j =1, len do
    num_hex = string.format("%02X",tonumber(string.byte(t[i], j)))
    str = str..", "..num_hex
  end  
end  

str = string.sub(str,3)
reaper.ShowConsoleMsg(str)
but that is say nothing to me, for now I`m really far from knowledges about ascii/hex/binary convertions.
Attached Files
File Type: mid 11.MID (50 Bytes, 77 views)
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 09-07-2015 at 11:02 AM.
mpl is offline   Reply With Quote
Old 09-07-2015, 03:01 AM   #44
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,585
Default

I've sussed it, mpl.

It's a little bit involved, but not excruciating

I cracked it longhand, give me an hour or so and I'll copy my notes and a useful link to show how to go from the hex values to your MIDI listing...


>
planetnine is offline   Reply With Quote
Old 09-07-2015, 12:31 PM   #45
David Perry
Human being with feelings
 
Join Date: Oct 2010
Posts: 271
Default

Saving the state of the plug-in would be nice (i.e. a preset system if that's possible). That way you could acquire a collection of reference grooves and store them with the plug-in instead of externally.
David Perry is offline   Reply With Quote
Old 09-07-2015, 03:39 PM   #46
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,585
Default

Those hex values are strings representing the value of each byte in the .mid binary file. You can probably convert them to whatever value you need from that, or it's probably better to amend the script you have to return numerics into an array or table in Lua. It looks like the file is read into a table (t?) and stored as bytes in lines, so you're going to have to learn the syntax of that so you can read those bytes into the format you need. I'll investigate as I have time, but I've not used my Lua guide for a while

I've taken my info mostly from this web page: (.mid) Standard MIDI File Format. Unfortunately if you are going to read .mid files, you need to write your script to deal with any and all of the MIDI event commands or metacommands that are likely to be encountered, even if they are not actualy needed for your required dataset (where they could be dumped into dummy variables). This web page seems to cover them all.

I hope this is of some use to you, maybe in a week or two I'll have a bit of time to follow up on the Lua side of this problem (and catch up on long-overdue debugging my own EEL scripts)

Here goes...



The bytes in the file are read differently depending on where you are and what you've just read-in. For headers, the byte values are converted directly into ASCII characters (header titles); for some values, four bytes are used to represent a straight-up 32-bit integer; for others, two bytes are used as a 16-bit integer; for some 1-byte is used for an 8-bit integer. For one value, because it has such a wide range of values in large (long) MIDI files, it uses 7-bits out of each of a variable number of bytes, the first bit used for indication whether there is another byte to read-in or you've reaced the end of the integer.

The file is separated into chunks. There is a header chunk and one or more track chunks. The track chunks exist for each MIDI track in the file and contain as many MIDI commands as are needed to describe the MIDI items in each track (your example has only one track).


The header chunk always looks like: 4D 54 68 64 00 00 00 06 ff ff nn nn dd dd

The first four bytes are converted to directly to ASCII and represent the header tag or title: 4D "M", 54 "T", 68 "h", 64 "d"

The next four bytes represent the remaining bytes in the header. 00 00 00 06 is a 32-bit integer represented as 0x00000006, ie 6 in decimal. Apparently it always reads 6 as the structure of the header is actually fixed.

the remaining six bytes are represented here by ff ff nn nn dd dd. They are three 2-byte integers which store the parameters:
ff ff file format. This can be 0 (single track), 1 (multiple tracks, synchronous) or 3 (multiple tracks, asynchronous).
nn nn number of MIDI tracks in the file.
dd dd number of ticks per quarter.

Taking the hex bytes from your example, it translates as:
4D 54 68 64 Header tag "MThd"
00 00 00 06 0x00000006, dec6, 6 bytes to follow in header.
00 00 00 01 03 C0 0x0000, dec0, single track MIDI file; 0x0001, decimal1, num of tracks =1; 0x03C0, dec960, ticks per qtr =960.


Then follow the track chunks. In your example there is just one.

4D 54 72 6B Header tag "MTrk"
00 00 00 1C 0x0000001C, dec28, 28 bytes to follow in this track chunk.



After this, the track chunk follows the structure for each MIDI item:
Δt (delta ticks, change in ticks since last command)
MIDI event command
Command parameters.
...with a command to end that track chunk.

Δt
Because there is a huge variance in the size of Δt, to save padding out small values to accommodate the possible very much larger values in the file, a variable-size byte system is used. The binary value is stored as seven bits in as many 8-bit bytes as are needed, the most significant bit in each byte being used to indicate if it is the last byte for that value of Δt. If the first bit is a "1", then more byte for that Δt follow, if it is a "0", then it is the last byte.

It sounds a bit complicated, but it's actually quite elegant. Let's take a Δt value of 115200 (one minute at 120bpm, here), which is 00000000 00000001 11000010 00000000 using four 8-bit bytes. If this is rearraged into 7-bit bytes: 0000111 0000100 0000000, and padded to 8-bits with a marker bit (msb): 10000111 10000100 00000000, the reading application knows when to stop as the msb is zero.

It does mean you need to test for that bit as you read in the bytes, but a 1 means the byte >= dec128 (0x80), so you can just test for it and if true (1)subtract 128, (2)add it to the previous (multiplied) bit, (3)multiply the result by 128 to shift it 7 bits ...until you reach the zero msb byte, the last byte of the parameter, and just add it.


MIDI event commands
One byte long, separated into two 4-bit integers (nibbes)
The first 4 bits represent the command ID, the second, the MIDI channel (0 to 15=chns 1 to 16). Metacommands don't include the MIDI channel number, they have the format: byte "FF" followed by the ID byte (and parameters).

Command parameters
The number of parameters and the number of bytes needed for these are dependent on the particular MIDI event command. For standard commnds, it is one or two 1-byte values. For MIDI metacommands, the structure is dependent on the particular metacommand, but some byte lengths are variable and that length is contained in the first parameter byte.



To continue with your example, here are the remaining 28-bytes translated:

00 Δt, dec0. First event, so ticks=0 +Δt =0+0 =0.
90 bin1001 0000, nibbles dec9 and dec0 represent "note on" and chan1.
3C 60 for "note on", nn and vv, note=dec60 and velocity=dec96.

81 70 Δt, dec129 and dec112, bin 10000001 and 01110000
7-bit values, dec1 and dec112, combined dec240 (11110000)
ticks=ticks +Δt =0+240 =240
80 bin1000 0000, nibbles dec8 and dec0 represent "note off" and chan1.
3C 00 for "note off", nn and vv, note=dec60 and velocity=dec0.

85 50 Δt, dec133 and dec80, bin 10000101 and 01010000
7-bit values, dec5 and dec80, combined dec720 (0010 11010000)
ticks=ticks +Δt =240+720 =960
90 bin1001 0000, nibbles dec9 and dec0 represent "note on" and chan1.
3C 60 for "note on", nn and vv, note=dec60 and velocity=dec96.

81 70 Δt, dec129 and dec112, bin 10000001 and 01110000
7-bit values, dec1 and dec112, combined dec240 (11110000)
ticks=ticks +Δt =960+240 =1200
80 bin1000 0000, nibbles dec8 and dec0 represent "note off" and chan1.
3C 00 for "note off", nn and vv, note=dec60 and velocity=dec0.

86 30 Δt, dec134 and dec48, bin 10000110 and 00110000
7-bit values, dec6 and dec48, combined dec816 (0011 00110000)
ticks=ticks +Δt =1200+816 =2016
B0 bin1011 0000, nibbles dec11 and dec0 represent "control change" and chan1.
7B 00 for "control change", cc and vv, controller num=dec123 and new value=dec0.

00 Δt, dec0, bin 00110000
ticks=ticks +Δt =2016+0 =2016
FF 2F 00 FF denotes metacommand, 2F is "end of track", parameter dec0.



This seems to correspond to your MIDI text:
Code:
File: 11.MID
MFile 0 1 960
MTrk
0 On ch=1 n=60 v=96
240 Off ch=1 n=60 v=0
960 On ch=1 n=60 v=96
1200 Off ch=1 n=60 v=0
2016 Par ch=1 c=123 v=0
2016 Meta TrkEnd
TrkEnd

Hope this helps, I look forward to seeing what you do with it




>
planetnine is offline   Reply With Quote
Old 09-09-2015, 06:07 PM   #47
kamalmanzkie
Human being with feelings
 
kamalmanzkie's Avatar
 
Join Date: Jul 2012
Location: inside a man
Posts: 84
Default

mpl, do not be sparing in self praise or allowing yourself to feel cool about this. as far as i'm concerned, you are the bleeding edge of reaper. i think i said this on another thread... i've been waiting for someone to figure this out ever since stetch markers were a thing
kamalmanzkie is offline   Reply With Quote
Old 09-10-2015, 01:31 PM   #48
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Dunth, NC
Posts: 1,640
Default

really valuable work here, it's just beautiful.

any way to load it with the "last used" setting so i don't have to click "notes" every time?

any way to control the strength slider with a CC?
mccrabney is offline   Reply With Quote
Old 09-10-2015, 04:19 PM   #49
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,773
Default

Quote:
Originally Posted by mccrabney View Post
any way to load it with the "last used" setting so i don't have to click "notes" every time?
Hopefully this script and Airon's Colour Tool will both get the ability to write to disk, but in the meantime, if you use 'notes' EVERY time, you could probably change the default inside the script.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia 9600, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 09-11-2015, 02:58 AM   #50
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

Updated to 1.1

Changelog from 1.0:
  • get reference str.marker from selected item/time selection of selected item
  • quantize str.marker from selected item/time selection of selected item
  • User Groove (import .rgt files for SWS Fingers Groove Tool)
  • swing value support decimals (only if user type)
  • store and recall preset - \REAPER\Scripts\mpl_Quantize_Tool_settings.txt
  • set strength/swing via CC and OSC via
    mpl_Quantize_Tool_set_strength.lua
    mpl_Quantize_Tool_set_swing.lua (beetween 0-100%)
    check in http://github.com/MichaelPilyavskiy/...e/master/Tools
  • rmb click on display save current groove to rgt (SWS Fingers Groove Tool) file

Improvements:
  • cutted options button (to prevent trigger options page)
  • count ref/dest objects
  • disable set 'Use Gravity' when choosing destination stretch markers
  • Changing global/local mode form relevant mode points and leave previously got points
  • Every menu changing also form ref.points or quantize objects to quick preview

Performance:
  • removed display bar lines. -10% CPU
  • UpdateArrange() moved to main quantize function: 10%-20% less CPU, depending on how project is big


Bugfixes:
  • incorrect project/custom grid values
  • swing grid tempo bug, project grid tempo bug
  • -1 tick midi notes position when quantize/restore
  • display issues
  • error if project is empty

Info:
  • improved syntax of info strings, thanks to heda!
  • donate button
  • manual updated
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 09-12-2015 at 10:27 PM.
mpl is offline   Reply With Quote
Old 09-11-2015, 04:26 AM   #51
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Wow! You rock!
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-11-2015, 04:31 AM   #52
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 400
Default

Wow, nice update. That's some top notch Lua:Quantize Toolage
todd_r is offline   Reply With Quote
Old 09-11-2015, 08:51 AM   #53
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Tried 1.1

Stuttering after close.
Had a crash, but not sure it was the script.

No way to select only in time-selection? (That's a big one when working with stretch-markers)
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-11-2015 at 08:58 AM.
G-Sun is offline   Reply With Quote
Old 09-11-2015, 09:29 AM   #54
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

1.1 could return error.
1.101 should works right.
Check options in options page for destination/reference stretch markers.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 09-11-2015, 09:34 AM   #55
MCCY
Human being with feelings
 
Join Date: Apr 2009
Posts: 287
Default

Finally I donated! Feeling better now :-) !!!! Hey, 1000 thanks for your great work! Looking forward to all thats coming!

Martin
MCCY is offline   Reply With Quote
Old 09-11-2015, 10:07 AM   #56
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Dunth, NC
Posts: 1,640
Default

the script was failing to launch with error quoted below

...tor\AppData\Roaming\REAPER\Scripts\mpl_Quantize _Tool.lua:4: unexpected symbol near '<'

as described by mpl on page one, this is common for people who aren't used to saving scripts

Quote:
Javi_Metal, you didn`t copypaste script right.
I see a lot of times people ask this question, but don`t understand where and how they copy the code to get this error. There is no "<" symbol in the fourth line ever, as you can see clicking on link in the first post. What I using - open link in first post, then rightclick in browser under text and press Save As or something like this and save it directly as mpl_Quantize_Tool.lua (of course without .txt extension)

Last edited by mccrabney; 09-11-2015 at 01:56 PM.
mccrabney is offline   Reply With Quote
Old 09-11-2015, 10:20 AM   #57
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
1.101 should works right.
Was using 1.102

Getting error on "Get selected only" / "Time selection"


Things are quickly getting buggy when reselecting stretch markers.

Managed to change settings without the above dialog,
but unabel to select stretch-markers in time-selection.

I'm not to good at reading you detailed manual. Just trying things
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-11-2015 at 10:26 AM.
G-Sun is offline   Reply With Quote
Old 09-11-2015, 01:30 PM   #58
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

G-Sun , try 1.103. I rebuilt swing engine so it should works better. But if you still have bugs, let me know how to reproduce this bug.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 09-12-2015 at 12:30 AM.
mpl is offline   Reply With Quote
Old 09-11-2015, 01:56 PM   #59
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Location: Dunth, NC
Posts: 1,640
Default

this is so good. thank you so much for the osc/midi control. i've been wanting controller control over strength/swing in reaper forever.

may we have cc/osc control over custom grid as well please? ideally with adjustable floor/ceiling values, so i can use the entire fader to move between commonly used values?
mccrabney is offline   Reply With Quote
Old 09-12-2015, 02:09 AM   #60
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
G-Sun , try 1.103. I rebuilt swing engine so it should works better. But if you still have bugs, let me know how to reproduce this bug.
Tested now. No bug.
Even managed to find the correct settings for stretch markers in time-selection only Wonderful

Some non-critical suggestions:
- When wanting to reference to project-grid (the most used option for me I guess), it's hard to choose it without going into custom grid. Could there be a radio-button or something?
(Project grid <> Custom grid)
- Remember last settings /store as default would indeed be handy
- I can see myself using 1-6 settings (options, what, where-to). It would be handy to have some shortcuts, or presets for that, as it's so many options. Simple <> advanced gui, or split up gui for different usage could also be smart.
- The help-file is fabulous. But as my left ind has taken a long vacation, the info for my right mind is just a pile of dots on the screen. I really have to concentrate to access it. Anything with more visual structure would help.

I'll test User Groove and Q to stretch markers in other item.

Thanks again!
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-12-2015, 08:12 PM   #61
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

planetnine,
thanks for very good explanation. Seems to be it is possinle to build .mid reader. Things to do here are more logically. For me it is not so important, there are other more needed functions I building current time, but maybe I`ll try to think about this in the future (if nobody will help to build that part).

G-Sun, project grid is leftmost position of custom grid slider, I dont see problem to just move the slider.
You can save current preset with settings only to file, check options page. If this file not exists, it loads settings from script variables. I`ll think later about how to realize things like "Load selected notes as destination when starting tool".

mccrabney, done. Now movement of CC knob or OSC controller linked to swing and grid also set pattern mode, select their type(swing or grid in reference menu) and quantize objects.
Also fixed OSC binding (values from OSC were wrong).

UPD Last version should works way faster especially with big projects.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 09-12-2015 at 11:09 PM.
mpl is offline   Reply With Quote
Old 09-13-2015, 12:42 AM   #62
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
G-Sun, project grid is leftmost position of custom grid slider, I dont see problem to just move the slider.
Well, it's not a biggie. But it's almost impossible to click-select as the other options. It always goes into custom-grid, then I have to adjust it back.
Maybe it should only be "grid"
then "swing-grid" and the current slider should be ungreyed or pop up?
Quote:
You can save current preset with settings only to file, check options page. If this file not exists, it loads settings from script variables. I`ll think later about how to realize things like "Load selected notes as destination when starting tool"..
Thanks a lot! Sorry for being such a stupid beta-tester and not lock better

Anyway, tried it an got error:
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-13-2015 at 01:08 AM.
G-Sun is offline   Reply With Quote
Old 09-13-2015, 12:45 AM   #63
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

The stretch-markers are disappearing here. Bug?

__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-13-2015, 01:02 AM   #64
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

I'm trying to get:

Stretch markers in time selection in selected track/item
to snap to nearest reference point in
Another track with midi items/notes (groove-track

Can I do this? How?
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-13-2015, 02:12 AM   #65
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default



And as I understood also on your gif you
- get stretch markers to quantize
- add stretch markers manually
- move grid slider
- this is wrong use

From Help:
Quote:
5.2.0 Destination section. Here we store objects and their positions. Note! If you stored object to script by clicking this area, and move it to somewhere (so you manually change position), after every click on any 'Apply' action their positions and volumes will be firstly restored! This done to prevent feedback (store and snap->store and snap once again -> etc).
This means if you move any slider, positions of all stretch markers in your item will be restored. So, markers, which were created manually after storing to script memory will be removed. If you wanna do something with markers you created manually, firstly store them again (click on destination area stretch markers).

Error when saving preset - could be problem with user account rights (not administrator or something, so window don`t let LUA write files to Reaper directory)
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 09-13-2015 at 02:38 AM.
mpl is offline   Reply With Quote
Old 09-13-2015, 11:17 AM   #66
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
[gif]
Thanks!

Almost made it. Just some problems with stretch-markers outside time-selection being moved.



The last marker should be 100%, but it's been changed.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-13-2015, 11:18 AM   #67
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
Error when saving preset - could be problem with user account rights (not administrator or something, so window don`t let LUA write files to Reaper directory)
Yes, guess so. How do deal with it?
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-13-2015, 11:21 AM   #68
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
From Help:


This means if you move any slider, positions of all stretch markers in your item will be restored. So, markers, which were created manually after storing to script memory will be removed. If you wanna do something with markers you created manually, firstly store them again (click on destination area stretch markers).
Yes, I guess that was the problem. I'll remember to re-click stretch-markers if doing something.

Edit: I'm still having problems getting consistent behavior
Like markers quantizing towards edges, skipping selected notes.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-13-2015 at 11:33 AM.
G-Sun is offline   Reply With Quote
Old 09-13-2015, 12:09 PM   #69
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

How can I reproduce this bug? Test project or full screenshot or slow motion gif to get all details.

Also just to say, stretch markers editing is the hardest/buggiest part of this script. Every wrong moving in stretch markers quantize code could crash Reaper, so I did a lot of different tests to reproduce as more behaviors as I can imagine in my workflow to find possible bugs.
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 09-13-2015 at 06:04 PM.
mpl is offline   Reply With Quote
Old 09-13-2015, 11:32 PM   #70
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
How can I reproduce this bug? Test project or full screenshot or slow motion gif to get all details.

Also just to say, stretch markers editing is the hardest/buggiest part of this script. Every wrong moving in stretch markers quantize code could crash Reaper, so I did a lot of different tests to reproduce as more behaviors as I can imagine in my workflow to find possible bugs.
Ok, I'll see if I can nail it down a little.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 12:06 AM   #71
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

btw: I see myself using this in these ways:

What/objects: Stretch-markers and notes
Reference to: Notes and grid

Mostly I'll use pattern/bar/time-selection
but all/global can be an option from time to time

Maybe I'll make a workflow of making a groove track, with none/less/more variations, for the whole song. But most often I guess I'll be using grid or a groove in another played track.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 12:10 AM   #72
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Then a question:
How smart can the Quantize-tool be?

Let's say I have a 1 bar groove, 4th-notes.
Then I have a 8th note high-hat, wanting to quantize that to the groove.
Could the Q-tool be so smart, so I could add division to the 4-note groove?

The other way is also relevant, but much easier to performe I guess (e.g. selecting every second notes in groove)
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 01:21 AM   #73
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Why can' we use grid in global mode?
Isn't that the whole point of global?
How do I deal with some 10bar item?

Edit: Ok, I see. 1 bar pattern will deal with it.
But if time-sig-changes?
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 01:31 AM   #74
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Bug:

When adjusting grid-slider or swing, selected stretch-markers gets changed destructively.






(Should be unstretched)

No right-click undo.

Same happens if I change snap-area.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-14-2015 at 01:48 AM.
G-Sun is offline   Reply With Quote
Old 09-14-2015, 01:39 AM   #75
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

I'm experience cpu-hangs when using the script. Both open and exited.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 01:53 AM   #76
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Here's another one:



The grid is 1/8 (grey lines), yet it snaps to something else.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-14-2015 at 02:01 AM.
G-Sun is offline   Reply With Quote
Old 09-14-2015, 02:18 AM   #77
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,209
Default

Time-sig-changes is the problem I actually didn`t touch (yet).

From last gif I don`t see any problem, because your markers is around 1/16 - 1/32 (or script shows something wrong?).
Dont forget to use gravity engine to stretch markers with more accuracy.

__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 09-14-2015, 02:28 AM   #78
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

Quote:
Originally Posted by mpl View Post
Time-sig-changes is the problem I actually didn`t touch (yet).
Understandabel
Quote:

From last gif I don`t see any problem, because your markers is around 1/16 - 1/32 (or script shows something wrong?).
Dont forget to use gravity engine to stretch markers with more accuracy.

Markers are on 8th-notes
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 02:30 AM   #79
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

The good news:
With careful usage (knowing what not to do)
I managed to get a consistent workflow quantizing stretch-markers to grid
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 09-14-2015, 02:33 AM   #80
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,160
Default

I have to repeat the request to have a click-able project grid (reference). I often struggle getting there.

And, I find it confusing to see if swing is active or not.

And, yeah, a value display for apply with manual input (text-input) would be good.

Thanks a lot!
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music

Last edited by G-Sun; 09-14-2015 at 03:09 AM.
G-Sun 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 05:02 PM.


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