i got crow a couple weeks ago, but i’m just now trying it out for the first time!
first seems like a very intuitive, easy-to-use script, but it’s not working for me. no matter what voltage source i plug into input 1 to clock the sequencer, i can’t seem to get a regular response from the v/o and envelope outputs. several different voltage sources into input 1 (a steady EOR gate from maths, the LFO output from the same channel of maths, ansible TRs, CVs, and JF LFOs) don’t seem to get crow going. what am i doing wrong??
@iiii I have this already written, just need to post a beta firmware with it so someone can test (I don’t have one) - Will get it into the next beta (~1-2 weeks away).
@TanSaturn This is already possible if I’m understanding your question correctly. You can send & receive CV at the same time as sending & receiving ii. If you have a more specific question I’ll try and answer.
There were some early issues with sending Crow too much at once that I believe have been addressed. Recently I think I read somewhere here (can’t find it now) that Crow is now fine with receiving up to 16 lines at once. Can it be confirmed that as long as I keep it under 16 lines of code, other size considerations (within reason, I suppose) are not a factor? That is, I can send long-ass lines of code, as long as it’s no more that 16 lines at a time, or is it more complicated than that?
I understand the 8k limit for scripts, but that’s not what I’m referring to. I’m not sending scripts via Druid, but rather sending code directly via serial. In my experience, if you send it too much at once it definitely chokes. I hadn’t tested it extensively to figure out when it chokes, I just had been conservatively chopping commands up to avoid it. For example, if I’m sending a full script I just send it a line at a time, spaced out by 2ms, which seems to prevent problems (and in this case, of course, surrounded by ^^startscript and ^^writescript/executescript’).
However, since this introduces latency, I’m hoping to figure out what the hard limit is for times when I’m sending commands in a context that might be more sensitive to latency so I can most efficiently group code. Further testing seems to suggest it’s not number of lines, but rather just number of characters. My testings finds a limit of approximately 380 characters. Send it more than that at once and Crow becomes unresponsive and needs a hard reboot.
(I hesitate to talk too much about work in progress since these things have a way of dragging on longer than I would hope, but some background might be helpful here. I’m working on a library that allows you to communicate with Crow via Node.js. It’s conceptually similar to the Max object library, but for a web browser.)
I’d recommend looking at the source for druid. It’s pretty short and concise. You can see the serial sending stuff here. There’s a lot of moving parts going on, and the serial port behaviour is platform dependent (below the python layer).
I’d also recommend reading crow’s readme-development document which outlines a number of considerations when building applications that talk to crow.
Additionally, there’s a work-in-progress electron app here that is covering similar territory I believe.
Regarding sending code, I would note specifically that using ^^s and ^^e will reset the lua environment every time, so they are designed for uploading whole scripts. If you want to send code to be executed in the Lua environment on top of the current state, you’ll need to use the ‘multiline’ characters (three backticks surrounding the code block, like markdown) to avoid evaluation errors. That input buffer is 2kB, but perhaps there is something else going on causing the 380 char limit.
If you have some way for us to observe the unresponsive state I should be able to debug what’s causing it, but it’s a little hard because none of my tools are able to send this right now. If you want to open a Github issue on the crow repo that’s probably the best way for us to look into this further, and not have it buried here.
Thanks for the links to the dev resources. It looks like line writer has a short pauses after every line. I’ll investigate strategies related to that.
I do understand the ^^s/e effects, I’m am only using that for uploading whole scripts. I just did a quick experiment with backticks and it seems to actually make it worse (i.e. I can send less code before hanging Crow).
I should have enough info to get me to beta. Once I have something that’s ready to share (so this isn’t just theoretical to everyone else) I’ll devote more effort to optimization.
That looks like an interesting project. Fortunately, I think there’s not too much overlap in our efforts.