Skip to content

Instantly share code, notes, and snippets.

@tildebyte
Last active August 29, 2015 14:10
Show Gist options
  • Save tildebyte/2f7b815d22d36ab80d17 to your computer and use it in GitHub Desktop.
Save tildebyte/2f7b815d22d36ab80d17 to your computer and use it in GitHub Desktop.
gibber.audio ST3 livecoding
On Mon, Dec 1, 2014 at 9:55 AM, Ben <ben.alkov@gmail.com> wrote:
> Question: how hard would it be to integrate gibber.audio.lib running under
> node with Sublime 3?
LOL, I was already looking into this. Right now, I'm dead in the water.
The best thing I know of is SublimeREPL, but with ST3 under Win7 x64, I'm
getting OSError: [WinError 6] The handle is invalid every time I try to send
anything to Node. I've Googled around a bit, but I haven't found anything like
a solution yet.
> I’m interested in getting some bindings going for various text editors, and
> seeing as you’ve already done the bindings for ChucK
The important thing to note with ChucK (and SuperCollider and some others) is
that there's a server running separately from ST with which it's possible to
communicate using system pipes (or sometimes other means). I don't think that
that's possible with Node, and obviously one has to have a persistent session
going.
> It would be especially nice for audio performances because the code editing
> would be running on a different thread from the audio, unlike the browser
> version where everything is in the same thread, leading to pops when you
> resize the editing window and do other GUI stuff.
Definitely, and that's what's nice about ChucK/SC/etc. running in a completely
different process...
I don't know of anything else which even works as well as SublimeREPL; let me
know if you do.
My primary concern, even if I get SublimeREPL working, is this from his GH
page: "Due to and uncertain future of SublimeText and its current abandonware
status... [etc.]". Atom is certainly on the move, but it still feels quite
immature.
On Dec 1, 2014, at 8:33 AM, Ben <ben.alkov@gmail.com> wrote:
Nope, my bad. ST3 + SublimeREPL does work, it's just very fragile (on Windows,
at least). There's some kind of issue with Py3 releasing handles after
popen(). Restarting ST3 sometimes fixes it.
The other issue I'm having is trying to get the Node REPL to find
gibber.audio.lib. I finally had to manually copy the entire repo (built,
although I'm not certain that that's necessary) into my home dir node_modules,
and then invoke with require('gibber.audio.lib/build/gibber.audio.lib.js'),
which mainly shows my lack of knowledge of Node >_>
On Thu, Dec 4, 2014 at 7:16 PM, charlie <charlie@charlie-roberts.com> wrote:
Hmmm… Now that you’ve told me Sublime 3 is abandonware (I hadn’t heard that
and it kinda shocks me… so many people I know use Sublime), maybe Atom is a
better choice. It is completely integrated with Node after all.
But you did get it to work with Sublime in the end, right?
On Fri, Dec 5, 2014 at 10:21 AM, Ben <ben.alkov@gmail.com> wrote:
I should have put 'abandonware' in quotes. That's really wuub's opinion,
although many share it.
Having said that, updates have slowed to a crawl (no blog posts for a year),
ST3 is still listed as beta (although it *was* last updated 3 months ago, and
a minor bugfix "dev" version was released about 2.5 mos ago). The devloper is
*very* tight-lipped. He still posts (very terse) responses on the forum almost
daily, but never seems to address the community at large.
In any case, yes, I have it working. ST3 works well with SublimeREPL, although
the invalid handle issue *is* still present; I have to close ST, wait a couple
of minutes, and then restart ST.
SublimeREPL allows for evaling or transferring selections/lines/blocks or even
entire files to Node.
It's also possible to type into the Node command line directly, and Node's
built -in completion works to an extent. It won't trigger on '.' (i.e.
Gibber.{TAB} just inserts a TAB character), but '.' plus another character
causes completions to pop up, with arrow keys and TAB active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment