From the original SynthMaker forum (2004–2014), with its members’ names and dates.
mindplay ·
How about supporting the Windows Scripting Host?
I mean for MIDI and GUI operations of course, not for DSP, it would be way too slow for that - but more than fast enough for MIDI and GUI programming.
This could leverage the implementation of more complicated, structured code - imagine an actual piano-roll sequencer, a tracker, or even crazy showoff stuff like a space invaders game, built entirely within SynthEdit! 😀
I know this is already possible in theory, but the schematics would be mindboggling... the code and ASM components are great for DSP, but currently don't work for non-DSP operations - and even if the code component was enhanced to support non-DSP operations later on, it probably wouldn't be able to beat JScript on structuredness or performance?
Schematics are optimum for DSP design, since we're thinking about signal-flows ... but for stuff like MIDI and GUI, personally I find it somewhat difficult to wrap my mind around it - forcing myself to think of mouseclicks and coordinates as "signals in a schematic", doesn't seem like the most natural thing to me...
I've played with the Windows Scripting Host, and it's extremely easy to work with - and we wouldn't need a ton of class wrappers to get started, just the low-level GUI components and inputs/outputs to begin with.
Well, it's an idea 🙂
mindplay ·
Speaking of which, if the SynthMaker application (later on) was itself exposed as an ActiveX object, we could then start using it on websites!
Once we had scripting, we could build a sequencer, and once we could do that, we would eventually be able to put original, synthesized music on websites, requiring only a few kilobytes of bandwidth ... or even artsy-fartsy "sound installations", using JavaScript on a webpage to integrate with a graphical frontend created in Flash, for example 🙂
okay, I'm going a little nuts here 😉
Tom7777 ·
okay, I'm going a little nuts here
Yeah i think you are a bit, that would be loads of work to code im guessing, i think you should think about buying visual basic or something maybe 🙂 As for Midi event i think someone said that there is a Midi code module in development, with a few more GUI modules nearly all flash and javascript event will be possible anyway. Im guessing with a few more modules a decent sequencer will be available to be made and you could just save presets of tracks and save the module and put that on a website then give a link to the SM website so users could get SM and run the tracks.
Tom7777 ·
Maybe Jorge and malc will make a tool for SM that runs modules as standalone files sometime, now that would be cool 🙂
malc ·
Thanks mindplay, it probably would take some work but maybe not too much. It's a very nice idea.
mindplay ·
Tom7777 wrote: i think you should think about buying visual basic or something maybe 🙂
Seriously though, no - implementing support for the scripting host, is in fact extremely easy ... as said, I've fiddled with it myself - the biggest deal, is exposing objects to scripts, that takes some manual work; but to get started and run a script inside your application, is only a few lines of code - really, it's that easy.
As for exposing SynthMaker as an ActiveX object available for scripting itself, this is even simpler - the ActiveX object is basically just an application wrapper you build around your existing application, and it wouldn't need a lot of properties or methods at all; basically just a simple URL property that let's you designate the .OSM file you want it to download and run. The WININET API lets you download the designated file via HTTP with ten lines of code...
Anyways, much more interesting at this point in time, is what you'd be able to do inside SM itself ... but supporting the Windows Scripting Host is certainly not crazy, and it's not weeks of hard work, I'm sure.
(Tom7777: as for running your SM modules standalone, try minihost)
malc ·
That sounds very good then mindplay, you've obviously thought about it.
I'm sure it's something we can have a look at.
I can certainly see the possibilities 🙂
Tom7777 ·
I assume you are joking?
Hi, yeah that was a joke 🙂 sorry,
(Tom7777: as for running your SM modules standalone, try minihost)
Nice thanks 🙂
I didn't think this would be added because i remember i asked about java before and was told that it wouldn't get added or something, My bad, seems like its gonna get added now. yay 🙂
stefan ·
Would someone like to quickly summarize what the Windows Scripting Host is? Is it their own scripting language? How does it compare to using python or lua? and so forth!
Tom7777 ·
but supporting the Windows Scripting Host is certainly not crazy, and it's not weeks of hard work, I'm sure.
it probably would take some work but maybe not too much
I guess it sounds more complex than it really is, the more features the better 🙂
lalo ·
mindplay wrote: , built entirely within SynthEdit! 😀
😀
...i want it in SynthMaker 😀
lalo
mindplay ·
Tom7777 wrote: I didn't think this would be added because i remember i asked about java before and was told that it wouldn't get added or something, My bad, seems like its gonna get added now. yay 🙂
nay.
The language syntax in JavaScript was indeed inspired by Java (hence the name), but they are not the same, and they are not "compatible" as such. You would not be able to run Java code in a JavaScript interpreter - first of all, because they're two different languages, secondly because one is interpreted (JavaScript), the other is compiled (Java).
Furthermore, JScript (which is what you would get in the Windows Scripting Host) and JavaScript are not the same - JScript is Microsoft's "take" on JavaScript, basically an enhanced version of it.
mindplay ·
lalo wrote:
mindplay wrote: , built entirely within SynthEdit! 😀
😀
...i want it in SynthMaker 😀
lalo
oops, that's embarassing ... I apoligize humbly!
Tom7777 ·
When i say java i mean JavaScript 🙂 I only really ever code web based stuff so i can write a few things with it like rollover images ect (basics), It will be a great feature i think for graphical features but im sure there will be a lot of crash reports if it gets added because there is a whole load of stuff that can be coded with it and its not really designed for SM, for example i wonder what would happen if there was a time in the status bar or change title bar to clock script input. Thanks for the minihost link the apps really cool 🙂
mindplay ·
stefancrs wrote: Would someone like to quickly summarize what the Windows Scripting Host is? Is it their own scripting language? How does it compare to using python or lua? and so forth!
The Windows Scripting Host is a generic wrapper around scripting languages. A standard Windows installation supports JScript (a language similar to JavaScript) and VBScript (a language similar to Visual Basic).
The force of the WSH is, that when an application exposes objects to it, those objects automatically become available for scripting in any language supported by the WSH ... that is, the script author can choose freely between JScript or VBScript, or any other installed third-party WSH scripting engine.
So the answer to your question is, WSH doesn't really compare to Python or LUA; because it's not a language in itself, but a generic wrapper system for other languages such as VBScript and JScript.
Other third-party WSH scripting engines are available, I've seen a free PERL engine for one ... try Google, WSH engines for your favourite language, such as LUA or Python, may already be available 🙂
mindplay ·
Tom7777 wrote: When i say java i mean JavaScript 🙂
then you better start saying JavaScript, coz as explained, they're not really related at all - they're not even compatible.
Tom7777 wrote: there is a whole load of stuff that can be coded with it and its not really designed for SM
JScript is a generic scripting language, it was designed for scripting in general ... it's used in a wide range of applications, your web browser for one - it's also available, for example, in MacroMedia Flash and Adobe InDesign, and in ASP for programming webpages...
Tom7777 wrote: for example i wonder what would happen if there was a time in the status bar or change title bar to clock script input.
You're talking about objects exposed by Internet Explorer, such as "document" and "browser" - those objects would of course not be available in SynthMaker, which would instead expose it's own objects in an appropriate and failure-tolerant fashion.
Only the actual language features, such as arrays, for- and while-loops, functions, classes and objects etc. would be available, plus whatever else the SM team would choose to make available.
Tom7777 ·
then you better start saying JavaScript
Ok i will do 🙂 I know javascript can be used in load of different way but its web design in general, does Windows Scripting Host include flash script and html also? or did you just mean javascript?
which would instead expose it's own objects in an appropriate and failure-tolerant fashion.
Yeah i was thinking if it gets added it would be SM limited to work correctly like the coding modules are for DSP and SM to work well together.
Thanks 🙂
mindplay ·
Tom7777 wrote: I know javascript can be used in load of different way but its web design in general
that just happens to be what it's most known for, but it's used in lots of other places as well. the language itself is generic and can be used for anything - the objects you're used to working with, when you write javascript for a browser, are not a part of the javascript language. Just like the "movieclip" and "scene" objects in ActionScript (Flash's language, which is based on a newer version of JavaScript with more Java similarities) are not part of the JavaScript language either.
Tom7777 wrote: does Windows Scripting Host include flash script and html also? or did you just mean javascript?
I'm not quite sure I understood the question, but supporting WSH in SM would not give you access to web browser or flash objects, or any other application-specific objects, if that's what you're asking.
As explained, the WSH is a generic scripting interface - WSH itself only provides a few, simple, generic objects like "Math" and "Array". Objects like "document", "browser", "window" or "frame" that you can use from JScript/VBScript in a browser, are specifically provided by the browser application, and this would not be visible in SM, or in any other application using WSH.
WSH scripting engines, such a JScript or VBScript, only provide generic language constructs such as variables, loops, math, arrays, prototypes, classes, objects etc. - the application that hosts a script exposes classes and objects for you to access in your scripts; without these, your scripts can perform all manner of calculations and algorithms, but can not actually implement any kind of interactivity, input, output, or anything else that constitutes "functionality" in any form. The host application is entirely responsible for providing the objects and classes that provide the relevant functionality specific to the application hosting the script.
That's as much of an explanation as I'm going to provide here - if you want to learn more, you can read here 🙂
Tom7777 ·
I think it would be cool to take certain parts from each code type such as html, java, javascript, vbscript, action script like maths and Array functions then blend them together to make a decent custom WSH type coding module or even have multiple ways to do various things. Its a great idea i think but a decent tutorial would have to be made for it with the various commands. Thanks
stefan ·
Uhm. Why blend them together when you can keep them separated?
mindplay ·
Tom7777 wrote: I think it would be cool to take certain parts from each code type such as html, java, javascript, vbscript, action script like maths and Array functions then blend them together to make a decent custom WSH type coding module
hmm, you still don't seem to get the point that WSH has litterally nothing to do with neither HTML or Java? 🙂
you may want to try downloading the JScript / VBScript documentation, which is available here ... this is the reference help file for JScript and VBScript - so this should help you see exactly what is part of the language.
In other words, everything you see in this help file would automatically be available in a scripting host in SM.
Everything else (document, browser, window etc.) is part of the host application and is not specific to neither JScript or any other language supported by WSH, and would not be available in SM; that means anything related to HTML, Java, Flash etc...
rl ·
to add my 2 c:
Kids, don't bother the SM guys, they have more important things to do - e.g. write some documentation 😉
BTW: Jorge, are you doing well? (not too much posts recently)
malc ·
rl wrote: Kids, don't bother the SM guys, they have more important things to do - e.g. write some documentation
BTW: Jorge, are you doing well? (not too much posts recently)
He he. I think he's just been working alot - believe me, he's still around 🙂
It was detailed documentation on each component you were waiting for, right rl? I have started putting this together. At the very least it will include a description of the component and an explaination of all the connectors. Ideally we'd have an example for each component as well but that may have to come later. Would you need anything else?
jorge ·
rl wrote: BTW: Jorge, are you doing well? (not too much posts recently)
🙂I read every single post in the forum and all PMs and Emails that I get. There's a couple of threads I really want to get more involved with like the taylor expansion series that unkarghearth started and also this one about WSH and using SM in an Activex.
As you can imagine answering emails/posts etc takes quite a bit of time from coding and sometimes it's a nice break to do it after a few days of hard coding. I get to the stage that there's just too much to say and not enough time.
This thread is a very good example. It just happens that one of the jobs I had in the uk when I was working with Malc was to expose the whole object model of the application and to make it scriptable with WSH. It's an idea that I had before for SM, mindplay is exactly on the same wavelength as me.
Creating an Activex to run SM schematics is something that not only I have thought but I have actually implemeted an initial version a few months ago. Long term I'd really like SM to evolve to be a flash type of application for hosting multimedia content in web pages. But we needed to focus on synth making for now, at least until version 1.0.
So basically I find it very frustrating not to have more time to get more involved with the forum but I do read every single post.
rl ·
malc wrote: At the very least it will include a description of the component and an explaination of all the connectors. Ideally we'd have an example for each component as well but that may have to come later.
great, much appreciated
malc wrote: Would you need anything else?
an answer to this question would be great: ASM module
Tom7777 ·
ok mindplay i think i understand now, thanks
Wrote something here? To have a post removed or your name hidden, write to [email protected].