Jump to content

Created a Note Remapper; very unimpressed with performance.


Jessy

Recommended Posts

I just wrote my first Scripter plugin. Unfiltered notes come through fine, but there's a delay on the filtered ones that makes them unusable for live use. I haven't tested what happens with playback yet. Please let me know if you know if this is solvable, or if I should file a bug.

Remapper.pst

1-line instructions included in script.

Link to comment
Share on other sites

It turns out that the delay only exists if you use Scripter's Note objects; if you just need to transform a note or controller, that's fine. You just can't convert between types without a delay; I'll log a bug about it.

 

Attached is a less generic, but totally functional updated remapper.

DM7X generic.pst

Link to comment
Share on other sites

Hi,

 

I get these exceptions on your scripts when note on and note off events reach the plug-in:

 

Remapper:

Exception calling HandleMIDI() function:
[JS Exception] TypeError: 'undefined' is not a function (evaluating 'maps.find(
	function(map) { return map.inputNote.pitch == event.pitch; }
)') line:55

DM7X:

Exception calling HandleMIDI() function:
[JS Exception] TypeError: 'undefined' is not a function (evaluating 'maps.find(
	function(map) { return map.inputPitch == pitch; }
)') line:114

 

I'm just getting started with Javascript so I'm not sure what the problem is.

 

J.

Link to comment
Share on other sites

The find function is new, which boggles my mind; I am also new to JavaScript, and don't understand how it could have taken so long to be included. Your error could indicate that you don't have as new of a version of Logic (10.0.7)/MainStage (3.0.4)as I have, but I'm thinking it's more likely that I'm running the Yosemite beta*, and you're not. Is that true?

 

Mozilla has been kind enough to provide a workaround; for older JavaScript engines. If you're getting the error, or want your plugin to have maximum compatibility, you can still use find, but you just have to define it yourself. To do so, copy the whole snippet under Polyfill, paste it into the Scripter editor, and recompile/run the script. Let me know how that works out for you.

 

 

* Yosemite beta 5 has been solid for me, except for the fact that Focusrite's FireWire interface drivers don't work with it, and I use one of those. My wife and I swapped; hers is USB (still Focusrite) and works fine, because it requires no driver. I did log a bug with Apple, but they said it was Focusrite's problem, and contacted Focusrite about it for me. I hope they get on the ball, because otherwise my Saffire is a paperweight. My wife is good for now with it, because she's still running Mavericks.

Link to comment
Share on other sites

Thanks, Jessy.

 

Your error could indicate that you don't have as new of a version of Logic (10.0.7)/MainStage (3.0.4)as I have

 

I do have those, take a look at my signature (and please add the required info to yours as well, forum rules :mrgreen: )

 

but I'm thinking it's more likely that I'm running the Yosemite beta*, and you're not. Is that true?

 

Yep, no Yosemite here yet.

 

Mozilla has been kind enough to provide a workaround; for older JavaScript engines. If you're getting the error, or want your plugin to have maximum compatibility, you can still use find, but you just have to define it yourself. To do so, copy the whole snippet under Polyfill, paste it into the Scripter editor, and recompile/run the script. Let me know how that works out for you.

 

I'll check it out, thanks again!

 

J.

Link to comment
Share on other sites

on your side note: try http://beta.focusrite.com there's a beta version of saffire mix which works for Yosemite and my Liquid Saffire 56.

 

* Yosemite beta 5 has been solid for me, except for the fact that Focusrite's FireWire interface drivers don't work with it, and I use one of those. My wife and I swapped; hers is USB (still Focusrite) and works fine, because it requires no driver. I did log a bug with Apple, but they said it was Focusrite's problem, and contacted Focusrite about it for me. I hope they get on the ball, because otherwise my Saffire is a paperweight. My wife is good for now with it, because she's still running Mavericks.

Link to comment
Share on other sites

on your side note: try http://beta.focusrite.com there's a beta version of saffire mix which works for Yosemite and my Liquid Saffire 56.

Thanks! My Saffire works again! :D

 

The solution I posted regarding polyfilling Array.prototype.find also works; we had to do it for my wife's Mavericks-running computer so she could play our new drum kit.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...