Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 10-18-2017, 12:28 AM   #41
Greg Savage
Human being with feelings
 
Join Date: Apr 2016
Posts: 653
Default

I keep running into this error when I try to use it

RobU - MIDI Ex Machina.lua:416: bad argument #1
Greg Savage is offline   Reply With Quote
Old 10-18-2017, 05:18 AM   #42
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by Greg Savage View Post
I keep running into this error when I try to use it

RobU - MIDI Ex Machina.lua:416: bad argument #1
Hi,

Odd one - the error is related to getting the length of a MIDI item.


I'm assuming that you have an item open in the MIDI Editor and are running it from there ? Can you run me thru the steps to reproduce?


Did you install from ReaPack, and is it the latest version? (1.3.2)

What is the length of the MIDI item ?


Cheers
Rob
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 10-18-2017, 10:17 AM   #43
Greg Savage
Human being with feelings
 
Join Date: Apr 2016
Posts: 653
Default

Quote:
Originally Posted by RobU View Post
Hi,

Odd one - the error is related to getting the length of a MIDI item.


I'm assuming that you have an item open in the MIDI Editor and are running it from there ? Can you run me thru the steps to reproduce?


Did you install from ReaPack, and is it the latest version? (1.3.2)

What is the length of the MIDI item ?


Cheers
Rob
Sure thing

1. The first time I ran into the issue is was up initial install. When I tried to pull up the plugin I got an error. I restarted Reaper, plugin loaded fine.

2. Now, I have a instrument track (with plugin loaded). I can bring up your plugin just fine, when I hit generate, I get the error.

3. Item is 1 bar

Methods of installation. Latest version of RePack and use I'm using 1.3.2

I could be using your plugin incorrectly as well.
Greg Savage is offline   Reply With Quote
Old 10-18-2017, 04:43 PM   #44
Greg Savage
Human being with feelings
 
Join Date: Apr 2016
Posts: 653
Default

Quote:
Originally Posted by RobU View Post
Hi,

Odd one - the error is related to getting the length of a MIDI item.


I'm assuming that you have an item open in the MIDI Editor and are running it from there ? Can you run me thru the steps to reproduce?


Did you install from ReaPack, and is it the latest version? (1.3.2)

What is the length of the MIDI item ?


Cheers
Rob
Just got home tried to run Machina and this popped up

RobU - MIDI Ex Machina.lua:416: bad argument #1 to 'GetMediaItemInfo_Value' (MediaItem expected)
Greg Savage is offline   Reply With Quote
Old 10-19-2017, 03:52 AM   #45
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by Greg Savage View Post
Sure thing

I could be using your plugin incorrectly as well.
Maybe, or there's an incompatibility with your setup, or you found a bug

There are some things that it really does not like (e.g. pooled items), but inside a regular 1 bar midi item it should work fine. Let's strip it back to basics and try to rule out anything else.

Start a new project

Insert 1 track

Create a new midi item, no fx.

Double click the item to open the midi editor and run the script

Success !?

If no, check the arrange window - is the item still selected?

---


BTW - I can duplicate this error, but only if I deselect the item in the arrange window after opening the midi editor and before running the script.

I should probably check for that and provide more helpful error message. I'll fix it in the next version.

That said, for now you need to have an item selected for it to run - Once it's up and running, it should gracefully handle switching items, or no item ...

Let me know how you get on with the test above.

Cheers
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 10-19-2017, 07:30 AM   #46
onewayout
Human being with feelings
 
Join Date: Feb 2008
Location: So Florida
Posts: 1,395
Default

Hi,

I uploaded your script and watched some of John's video (thx btw) haven't read all the posts looks GREAT!

I tried it on the snare and the best I was getting was 2 different velocities...Is there a way to say accent the 1 with 127 then the next 3 hits be 123-125-122 and then the NEXT accent 1 be say 125 ect....Will this script be able to randomize in that way,


Thx in advance, jeff
onewayout is offline   Reply With Quote
Old 10-19-2017, 07:59 AM   #47
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by onewayout View Post
Hi,

I uploaded your script and watched some of John's video (thx btw) haven't read all the posts looks GREAT!

I tried it on the snare and the best I was getting was 2 different velocities...Is there a way to say accent the 1 with 127 then the next 3 hits be 123-125-122 and then the NEXT accent 1 be say 125 ect....Will this script be able to randomize in that way,


Thx in advance, jeff
Hi Jeff,

Right now, you're limited to only the upper and lower velocities set with the slider.

Initially the velocity slider was designed to imitate the accent functionality on Roland 303-type mono synths. That said, it would be easy enough to make it pick randomly from the range between the two.

At the moment though, I don't have a huge amount of spare time to work on it, but I'm planning to do a few more updates in the not too distant future - I'll add your request to the list and see if I can work it in.

Meantime - you can always use Reaper's humanise function from the MIDI Editor to randomise the velocities a little, but bear in mind that if randomising or generating again, you'll lose the humanising, so do that once your happy with the output of the script.

Hope that helps.


Cheers
Rob
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 10-19-2017, 08:13 AM   #48
onewayout
Human being with feelings
 
Join Date: Feb 2008
Location: So Florida
Posts: 1,395
Default

Quote:
Originally Posted by RobU View Post
Hi Jeff,

Right now, you're limited to only the upper and lower velocities set with the slider.

Initially the velocity slider was designed to imitate the accent functionality on Roland 303-type mono synths. That said, it would be easy enough to make it pick randomly from the range between the two.

At the moment though, I don't have a huge amount of spare time to work on it, but I'm planning to do a few more updates in the not too distant future - I'll add your request to the list and see if I can work it in.

Meantime - you can always use Reaper's humanise function from the MIDI Editor to randomise the velocities a little, but bear in mind that if randomising or generating again, you'll lose the humanising, so do that once your happy with the output of the script.

Hope that helps.


Cheers
Rob
Hey cool Rob really appreciate your work and consideration on this!

Have a great day :-)
onewayout is offline   Reply With Quote
Old 12-24-2017, 09:21 AM   #49
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Thanks. For some reason, notes are generated on a small portion of the item. Around a fraction of the second, no matter which grid settings were chosen in Reaper for both arrange and midi editor. No matter how big is the item itself or a time selection. What am I doing wrong here?


fundorin is offline   Reply With Quote
Old 01-04-2018, 02:14 AM   #50
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by fundorin View Post
Thanks. For some reason, notes are generated on a small portion of the item. Around a fraction of the second, no matter which grid settings were chosen in Reaper for both arrange and midi editor. No matter how big is the item itself or a time selection. What am I doing wrong here?
Hi - I suspect that you're doing nothing wrong, but at the same time I have no idea what is happening there

Can you check that Preferences\Media\Midi\Ticks per quarter note is 960

Can you PM me a sample project?

Cheers
Rob
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 01-04-2018, 02:52 AM   #51
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Ticks were set to 960000. Can't remember why I did this, but there was some serious reason behind it.
Tried changing to 960 and back. The same.
project - https://www.dropbox.com/s/ug0m9iarkh1zsow/ex.rpp?dl=0
fundorin is offline   Reply With Quote
Old 01-04-2018, 03:16 AM   #52
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by fundorin View Post
Ticks were set to 960000. Can't remember why I did this, but there was some serious reason behind it.
Tried changing to 960 and back. The same.
project - https://www.dropbox.com/s/ug0m9iarkh1zsow/ex.rpp?dl=0
That's a lot of ticks

Machina assumes the Reaper default of 960 ppqn, which explains why when faced with 960000 ppqn it generated a lot of small notes at the beginning of the midi item.

When I open your example project and run Machina on the existing midi item, I get exactly the same result that you did. Curious, because I am running at the default 960.

Checking the midi item source properties, I can see that it is at 960000 ppqn.

If I create a new track, and a new midi item, Machina works as expected, and the item source properties show 960 ppqn.

With your preferences set at 960, can you create a new project and try again ?
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 01-04-2018, 12:28 PM   #53
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Yep. Creating new item, while ticks are set to 960, solves the issue.

P.S. 960000 ticks were set to solve item2grid alignment bug. Don't know, if it was fixed already or not.
fundorin is offline   Reply With Quote
Old 01-04-2018, 01:21 PM   #54
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by fundorin View Post
Yep. Creating new item, while ticks are set to 960, solves the issue.

P.S. 960000 ticks were set to solve item2grid alignment bug. Don't know, if it was fixed already or not.
Great, I'm glad it's working, have fun
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 03-02-2018, 04:32 AM   #55
sound warrior
Human being with feelings
 
Join Date: May 2010
Location: the D.E.
Posts: 281
Default

hi please can some one help me, I've downloaded this script through reapack but its not showing up in the mane actions list or in the actions menu in the midi editor, I've sinked the reapack scrips and restarted reaper but its still not showing up does any one know what the problem could be? thanks guys
__________________
I'm trey from the uk. I'm totally blind, running the latest version of reaper on Mac os10 with the voice over screen reeder and osara accessibility plug in: https://github.com/nvaccess/osara
sound warrior is offline   Reply With Quote
Old 03-03-2018, 07:25 AM   #56
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

- Open MIDI Editor and make sure the MIDI Editor window has focus.
- Now, open Reaper Action List.
- Now, in the upper right of this Action List, at the right of "Section", choose "MIDI Editor"
- Now, in Reaper Action List, in the filter field, type in "machina".

Still doesn't show up ??
__________________
Macbook Pro INTEL | Reaper, always latest version | OSX Ventura | Presonus Studio 24c
My Reaper Tips&Tricks YouTube Channel: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is offline   Reply With Quote
Old 03-03-2018, 08:31 PM   #57
sound warrior
Human being with feelings
 
Join Date: May 2010
Location: the D.E.
Posts: 281
Default

thanks for this recommendation I'll try it and let you know how it goes
Quote:
Originally Posted by vanhaze View Post
- Open MIDI Editor and make sure the MIDI Editor window has focus.
- Now, open Reaper Action List.
- Now, in the upper right of this Action List, at the right of "Section", choose "MIDI Editor"
- Now, in Reaper Action List, in the filter field, type in "machina".

Still doesn't show up ??
__________________
I'm trey from the uk. I'm totally blind, running the latest version of reaper on Mac os10 with the voice over screen reeder and osara accessibility plug in: https://github.com/nvaccess/osara
sound warrior is offline   Reply With Quote
Old 07-15-2018, 02:06 AM   #58
geoslake
Human being with feelings
 
Join Date: Apr 2007
Posts: 372
Default

Thanks for the amazing scripts !!!
Is there a way to get the randomiser to spread notes across multiple octaves ?
geoslake is offline   Reply With Quote
Old 07-18-2018, 08:34 AM   #59
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by geoslake View Post
Thanks for the amazing scripts !!!
Is there a way to get the randomiser to spread notes across multiple octaves ?
The current version only supports 2 octaves (check the Octave x2 option), although you don't get individual control over probability.

I was planning to add more functionality, including extending the range, but the basic architecture sucks (I was learning Lua as I was writing it), and extending what's there is more difficult than it needs to be. I'm working on V2, but don't hold your breath though, it's some way off, primarily due to the 9-5 suck...

If you have any feature requests for V2, now would be a good time to post them on the issue tracker over at GitHub.- https://github.com/RobU23/ReaScripts/issues


Cheers, R.
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 09-08-2018, 03:21 PM   #60
ReaMike
Human being with feelings
 
ReaMike's Avatar
 
Join Date: Feb 2017
Location: Sydney Australia
Posts: 140
Default

Great script! Thanks RobU.
ReaMike is offline   Reply With Quote
Old 11-17-2018, 10:04 PM   #61
themixtape
Human being with feelings
 
themixtape's Avatar
 
Join Date: Aug 2009
Posts: 1,199
Default

This is TOTALLY dope, RobU. I love this. I can't wait to see the new features added such as custom scales. Sometimes I like to use certain scale degrees in midi stuff and not others.. the permute works pretty well but I have to keep selecting the full notes I need, as sometimes the generated MIDI doesn't give all the permuted notes (like 3 notes out a permuted 5).

So dope, though. SO dope. Thank you.
__________________
FREE copyright-safe/DMCA-safe music for Twitch/Kick streamers, classrooms, waiting rooms (playlists on all streaming platforms):
https://tinyurl.com/copyrightsafemusic
themixtape is offline   Reply With Quote
Old 11-17-2018, 11:55 PM   #62
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,813
Default

Quote:
Originally Posted by RobU View Post
If you have any feature requests for V2, now would be a good time to post them on the issue tracker over at GitHub.- https://github.com/RobU23/ReaScripts/issues


Cheers, R.
Coff coff (not github) as far as I remember settings were lost when I had to focus on the arrange or something.. (1280x800 here), and then reopening the window would restart script and the settings were lost. Anything changed in this matter? Or I was doing something wrong?
It s awesome, just this turns out to be big for me. Thank you
deeb is offline   Reply With Quote
Old 11-23-2018, 02:59 AM   #63
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by deeb View Post
Coff coff (not github) as far as I remember settings were lost when I had to focus on the arrange or something.. (1280x800 here), and then reopening the window would restart script and the settings were lost. Anything changed in this matter? Or I was doing something wrong?
It s awesome, just this turns out to be big for me. Thank you

-- deeb: So, as far as I remember... (it's been a while), basic settings should be preserved if you close and reopen the script (size, position, scale, root note, etc), but it will drop any undo buffers and stuff like that. If it's doing something different, then it's probably a bug In any case, v2 is still a thing, but still someway off. If you can make a LICECap of what's happening and drop it on the Stash, send me a PM and I'll take a look to see if it's something that can be easily fixed.


--themixtape: yep, permute is a bit hit and miss. I've had a request to make it reuse all notes rather than randomly pick them from the selection, but it's a v2 thing...coming sometime... don't hold your breath
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 11-23-2018, 04:36 AM   #64
ThrashJazzAssassin
Human being with feelings
 
ThrashJazzAssassin's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 422
Default

Quote:
Originally Posted by RobU View Post
v2 is still a thing
__________________
TJA MIDI JSFX | REAPER-OSC-panels | erthoide
ThrashJazzAssassin is offline   Reply With Quote
Old 11-23-2018, 06:35 AM   #65
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,813
Default

Quote:
Originally Posted by RobU View Post
-- deeb: ...
Ohh thank you for answering! Take your time and breath ! ,
deeb is offline   Reply With Quote
Old 11-23-2018, 02:05 PM   #66
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by ThrashJazzAssassin View Post
Heh
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 02-05-2019, 07:13 PM   #67
ReaMike
Human being with feelings
 
ReaMike's Avatar
 
Join Date: Feb 2017
Location: Sydney Australia
Posts: 140
Default

Hi RobU

I’ve noticed a couple of small things that could probably be easily fixed. In Randomiser, Lydian is spelled “Lyndian”. And selecting Dorian gives a flat fifth degree in place of perfect fifth.

If you ever decide to add more scale options can I suggest adding:

(spelled with sharps from C root)

Harmonic Major: C D E F G G# B C

Double Harmonic Major: C C# E F G G# B C

These two scales, combined with melodic and harmonic minor, give a workaround to accessing most of the unusal modes. e.g if someone wants Dorian b2 and their track is in the key of C, they could select the melodic minor scale and set the root note to A#/Bb. Then, to get more authentic sound of the mode, increase the probability of C and disable '1st Note = Root'.

Thanks again for a great script.
ReaMike is offline   Reply With Quote
Old 02-07-2019, 01:36 PM   #68
ThrashJazzAssassin
Human being with feelings
 
ThrashJazzAssassin's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 422
Default

Hey! I've been using this script a lot recently but was having problems using it with looped MIDI items.

MIDI Ex Machina currently ignores the loop point of MIDI items, instead it will fill the whole item with notes. A quick hack to change this behaviour is add (sws extension needed)
Code:
	mItemTake = reaper.GetTake(mItem, 0)
	ItemPPQN = reaper.BR_GetMidiSourceLenPPQ(mItemTake)
to the end of the GetItemLength() function,

just before
Code:
return ItemPPQN
__________________
TJA MIDI JSFX | REAPER-OSC-panels | erthoide

Last edited by ThrashJazzAssassin; 02-07-2019 at 02:59 PM.
ThrashJazzAssassin is offline   Reply With Quote
Old 02-08-2019, 09:13 AM   #69
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Hey Mike - glad your having fun with it : )

I'm surprised no-one caught the Lydian spelling mistake before - I completely missed it, so thanks for the heads-up.

As for the incorrect Dorian scale, oops - my bad. If you can be hooped, you can correct it yourself in the main script, shouldn't be too hard to find (down around line 130 or so) - the numbers in the scales are the semitone offsets from the root note.

As for adding more scales, it's not likely to happen with the current version. I have started on v2 (yeah ThrashJazz, it's still a thing ; ) but it's some way off; I'm working on my album and that's the priority at the moment. But, it will happen, and it will have a shed-load more scales (and I'll even do some quality checking to ensure that they're right...)


Quote:
Originally Posted by ReaMike View Post
Hi RobU

I’ve noticed a couple of small things that could probably be easily fixed. In Randomiser, Lydian is spelled “Lyndian”. And selecting Dorian gives a flat fifth degree in place of perfect fifth.

If you ever decide to add more scale options can I suggest adding:

(spelled with sharps from C root)

Harmonic Major: C D E F G G# B C

Double Harmonic Major: C C# E F G G# B C

These two scales, combined with melodic and harmonic minor, give a workaround to accessing most of the unusal modes. e.g if someone wants Dorian b2 and their track is in the key of C, they could select the melodic minor scale and set the root note to A#/Bb. Then, to get more authentic sound of the mode, increase the probability of C and disable '1st Note = Root'.

Thanks again for a great script.
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 02-08-2019, 09:25 AM   #70
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Hi Thrash,

Yeah, so I don't use looped items at all, and probably did zero testing with them, so this is not really a surprise sorry about that.

I stayed away from SWS to keep the requirements to just 'Reaper' for my first script, but (likely) most people have it installed, so many thanks for the code snippet, I will definitely use it in the next version.

I'd also like to figure out why it bombs Reaper when using it with pooled items, but that's for another time.

Again, thanks for taking the time to find a solution for looped items, much appreciated.


Quote:
Originally Posted by ThrashJazzAssassin View Post
Hey! I've been using this script a lot recently but was having problems using it with looped MIDI items.

MIDI Ex Machina currently ignores the loop point of MIDI items, instead it will fill the whole item with notes. A quick hack to change this behaviour is add (sws extension needed)
Code:
    mItemTake = reaper.GetTake(mItem, 0)
    ItemPPQN = reaper.BR_GetMidiSourceLenPPQ(mItemTake)
to the end of the GetItemLength() function,

just before
Code:
return ItemPPQN
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 02-08-2019, 09:29 AM   #71
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by ReaMike View Post
These two scales, combined with melodic and harmonic minor, give a workaround to accessing most of the unusal modes. e.g if someone wants Dorian b2 and their track is in the key of C, they could select the melodic minor scale and set the root note to A#/Bb.
Incidentally, this went right over my head, my music theory knowledge hovers somewhere around zero and slightly less than zero
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 02-08-2019, 12:14 PM   #72
ThrashJazzAssassin
Human being with feelings
 
ThrashJazzAssassin's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 422
Default

Quote:
Originally Posted by RobU View Post
thanks for taking the time to find a solution for looped items, much appreciated.
My pleasure. The ease of modding this is a testament to how well you structured and commented the code btw . I couldn't believe it just worked!
__________________
TJA MIDI JSFX | REAPER-OSC-panels | erthoide
ThrashJazzAssassin is offline   Reply With Quote
Old 02-09-2019, 06:14 PM   #73
ReaMike
Human being with feelings
 
ReaMike's Avatar
 
Join Date: Feb 2017
Location: Sydney Australia
Posts: 140
Default

Quote:
Originally Posted by RobU View Post
Incidentally, this went right over my head, my music theory knowledge hovers somewhere around zero and slightly less than zero
Reading it back went over my head too. Sorry, it was badly explained. Essentially, there are 'parent scales', other than the Major scale, which are sources of modes used in Western music.

Anyway, you know far more about music theory than I do about programming! I didn't even know it was possible to open up a script and change it. Thanks for the tip.

I'm going to try adding more modes. Would it be difficult to create submenus in the scales menu?
ReaMike is offline   Reply With Quote
Old 02-09-2019, 06:22 PM   #74
ReaMike
Human being with feelings
 
ReaMike's Avatar
 
Join Date: Feb 2017
Location: Sydney Australia
Posts: 140
Default

Quote:
Originally Posted by ThrashJazzAssassin View Post
Hey! I've been using this script a lot recently but was having problems using it with looped MIDI items.

MIDI Ex Machina currently ignores the loop point of MIDI items, instead it will fill the whole item with notes. A quick hack to change this behaviour is add (sws extension needed)
Code:
	mItemTake = reaper.GetTake(mItem, 0)
	ItemPPQN = reaper.BR_GetMidiSourceLenPPQ(mItemTake)
to the end of the GetItemLength() function,

just before
Code:
return ItemPPQN
Nice!
ReaMike is offline   Reply With Quote
Old 02-09-2019, 09:57 PM   #75
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

Hi Rob are you going to push an update with those fixes?
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 02-10-2019, 02:13 AM   #76
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Quote:
Originally Posted by EpicSounds View Post
Hi Rob are you going to push an update with those fixes?
I'd like to, and it's do-able as they are fairly trivial code changes, but... free time is a scarce commodity for me at the moment (for a number of reasons).

If I can get an evening or two then I'll take a look at it, but don't expect it in the next few days. A few weeks maybe...


Quote:
Originally Posted by ReaMike View Post
Reading it back went over my head too. Sorry, it was badly explained. Essentially, there are 'parent scales', other than the Major scale, which are sources of modes used in Western music.

Anyway, you know far more about music theory than I do about programming! I didn't even know it was possible to open up a script and change it. Thanks for the tip.

I'm going to try adding more modes. Would it be difficult to create submenus in the scales menu?
I'm a little rusty on the old code, but as I remember it, the way it reads the scales in to the menu might make sub-menus impossible without a lot of work.

When time allows, I've been working on a new version which (assuming I haven't hit peak Dunning-Kruger), will have nested menus with a lot more scales, and the option to add your own. It should look prettier too, as I took the dubious decision to rewrite the GUI from scratch...
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 02-10-2019, 11:54 AM   #77
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Alrighty.

Because you guys are awesome n stuff, I did a small update.

v1.3.3
fixed looped item bug - thanks Thrash!
fixed scale (Dorian); spelling (Lydian) - thanks Mike!
added a couple extra scales, inc Dbl Harmonic, Harmonic Major, etc.
added quick n dirty OSX font cludge, might work, might not...

@ReaMike - please let me know if this is what you wanted, and if any of the new scales have errors.

@ThrashJazzAssassin - yeah baby, looped items

@EpicSounds - Jon, I remember when you did a video for MExM a while ago and I thought, feck, the fonts look crap on OSX. I did a kludge, it might look better, it might look pants. Can you give me some feedback? PM me a screenshot if it really went to shit. Hopefully it's an improvement.
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1
RobU is online now   Reply With Quote
Old 02-12-2019, 02:31 PM   #78
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default

Thrash - thanks for the bug report.

I think I've figured out what's up with the note shifting. Should be an update soon.
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1

Last edited by RobU; 02-12-2019 at 03:26 PM.
RobU is online now   Reply With Quote
Old 02-12-2019, 03:27 PM   #79
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Posts: 863
Default Update 1.3.4

v1.3.4
fixed looped item note shifting bug

Available in Repack now.


Edit: Jon, I haven't forgotten about the crash when an item is not selected; working on it...
__________________
Return of the Dub Cadet - https://open.spotify.com/album/2t98A...lQ&dl_branch=1

Last edited by RobU; 02-12-2019 at 03:42 PM.
RobU is online now   Reply With Quote
Old 02-12-2019, 05:33 PM   #80
ThrashJazzAssassin
Human being with feelings
 
ThrashJazzAssassin's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 422
Default

Good stuff, thanks!
__________________
TJA MIDI JSFX | REAPER-OSC-panels | erthoide
ThrashJazzAssassin 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 12:50 AM.


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