@Fuzzfilth, @Dewedman42 thanks for the good words, I had to take a very
lateral approach. It was developed on Node if you check the source, the intention being that for complex "apps", build-test cycles can be undertaken with the comfort of an IDE and Node tooling without even going near Logic/Mainstage bar for sake of integration tests. But for simple scripts, yes, the Scripter global API is still functional and I realise that many people still like that approach which is fine. Personally, I just don't like its untestablitiy, unreusablity, code sprawl, and context splitting with global variables which I think impedes just how far one can actually go with MIDI processing, Scripter or not. As for the approach, the
GenericPlugin class is not the library, its a shim; essentially just a
MIDI filter and a
ModelView intended for quick experimentation, but its base class,
Plugin is designed to use any kind of mapping that programmer wants. If one prefers a personal API or an emulation of the Scripter API, this is what one could do:
/** @abstract */
class Microscripter extends Plugin {
/** @override */
static get API () {
return [
[ `HandleMIDI`, `handleMidi`[
, [ `ProcessMIDI`, `processMidi`]
, [ `ParameterChanged`, `parameterChanged`]
, [ `Idle`, `idle`]
, [ `Reset`, `reset`]
, [ `NeedsTimingInfo`, `needsTimingInfo`]
, [ `ResetParameterDefaults`, `resetParameterDefaults`]
. [ `PluginParameters`, `pluginParameters` ]
]
}
}
// in a separate project/file...
/* concrete implementation from subclass */
class MidiHandler extends Microscripter {
get needsTimingInfo () {
return true
}
handleMIDI (event) {
event.trace(event.beatPos)
}
}
MIDIHandler.deploy()
The library really has to be documented better to explain the benefits, so thanks for the feedback and for the beta test in the blind so to speak. I think I've now identified the blind spots looming before the 1.0.0 release, and most of that is communication and explanation on my part. I could extrapolate more here right now as there is quite a bit, but, I think its best to focus on putting that energy into the docs, which is not nice, but is necessary.
The plan now is to tighten up the remaining loose screws, provide use cases and examples for the two supported development cycles (in-place editing within Scripter and IDE based agile), then announce properly, with the features much better declared. Hopefully as the
docs improve the features will become more obvious and more useful for those interested, and if there is uptake, interested parties could have their own plugins hosted at a dedicated scriptex-plugin repo, not for my personal benefit, but for us to make a group effort to really push MIDI processing on this platform and to share our collective hacks and solutions to make it easier for others for everyones benefit. Cheers for the feedback lads, more feedback also welcomed from other brave souls. Many thanks!