I don't think these are pie-in-the-sky.tperry2x wrote: ↑Sun Apr 17, 2022 8:39 am I'm thinking of externals which provide functions (on all platforms) such as:Code: Select all
GammaFade(in/out,durationinticks)
Code: Select all
GetResolution
Code: Select all
SetResolution
GetResolution already exists as the screenRect and the effective screenRect. I haven't used these a whole lot so there maybe some limitations I'm unaware of?
SetResolution I think would need to be built.
Code: Select all
[code]Play(soundfile, pitch/notes, tempo)
This will absolutely be incorporated into OXT along with multiple playback engines, including the wrapper-already-built and cross-platform tested libFluidSynth. Most of this is done already! However it won't be "soundfile" it will be something like "soundFontFilePath/programName/bankNum", defaultTempo, notes/playback string (which can override programName and Tempo in the middle of the string), but don't worry it will be HyperTalk compatible (but also greatly extended) and I intend to include a HyperCard SoundFont that includes "Boing","Piano","Harpsicord" as well as some other samples I made back when, and also a small GeneralMIDI/GeneralStandard (GM/GS) compatible soundFont. It may be possible to add the ability to load any .wav/sound file to use as an instrument. I'm pretty sure that FluidSynth 2.x has this capability (the FS wrapper is currently incomplete) and I've already done this on macOS with my Apple AUSamplerInstrument wrapper.
This could be done. An extension would be better integration, but you could probably do it this with the shell() function or open process right now. I like 7zip because it offers much better compression than regular old Zip but it seems a bit CPU intensive..Code: Select all
7ZFile(filename,destination)
(I mention 7Z as I think it's open source, so would be a universal way to add a compressor, decompressor into OpenXTalk)Code: Select all
Un7ZFile(filename,destination)
I forgot to mention: besides Extension Builder language, you can also build Library Extensions using normal Script. It's similar to making an IDE plug-in.
Can easily be done as a regular script function, but I suppose we could include a library of functions like this.Code: Select all
ReverseString(thestring)
We could including some common functions, like getStackDirectoryPath(), stringToAllCaps() stringToLowerCase, etc.
FrameRate for what? Video files?Code: Select all
GetFrameRate
Code: Select all
SetFrameRate
Code: Select all
Put ShellNonBlock("ls -a -r ~/") into cd fld "output"
This can be already be done with "open process" although that can be a bit tricky I guess.
I've been playing around with OpenXION from within OpenXTalk using "open process for binary update".
Maybe we could have a simplified non-blocking shell method for a single activity CLI that calls back when it's done?
shell() is probably how this is implemented behind the scenes, I think this is why they're blocking.Integration with other languages:
I'm aware you can obviously run shell commands with:and run Applescripts with:Code: Select all
get shell("mkdir ~/test")
but, would it be possible to:Code: Select all
do script (myvariable) as applescript
Code: Select all
do script (myvar) as pythonscript
Code: Select all
do script (myvar) as rustcode
Code: Select all
do script (myvar) as javascript
Code: Select all
do script (myvar) as parsePHP
'As javaScript' sort of already exists in the browser widget.
I would like very much to embed Lua as an extension (Apparently there was already a Lua external available at one point).
'as python' is available in OpenXION, which is cool!
I'd like to offer as many opportunities as we can for expanding the possibilities for xTalk scripters, but anything like that would probably have to wait until later.
I'd like to make a CURL or similar wrapper library with more features then the currently available to OXT.Also, simplification of the network packets and sockets would be good.
Something like:andCode: Select all
SendNetworkData(ipaddress, port, TCP/UDPprotocol, thedata)
And, while I'm there:Code: Select all
get SendNetworkData(listening-for-ipaddress, listeningport, thedata)
GetTotalBytesOfFile(pathtofile)
SendNetworkFile(ipaddress, port, TCP/UDPprotocol, entirefile/bytes-from-and-to)
GetNetworkFile(ipaddress, port, TCP/UDPprotocol, entirefile/bytes-from-and-to)
It could be integrated with libURL in the same way that the commercial offering tsNet external is used by libURL if it is available. But again I think this would have to wait until later down the road.