Last I looked iOS 13 wasn’t opening the door much to other USB devices beyond storage. Personally I just ended up buying a long USB cable which could reach from my desktop computer over to the modular :mountain_cableway:

2 Likes

Is it possible to tail a log from the current running script, if I want to print a value and see what it is?

1 Like

I was just wondering the same thing. Being able to print to to druid/repl would certainly make debugging easier

1 Like

print(‘caw’) does the trick!

2 Likes

ah I had tried that but couldn’t get it to work for some reason. it’s working now after another re-upload and power cycle. Thanks!

1 Like

I’ve just received a crow as my first dive into the Monome world. I’m excited to start working but I’m running into some very beginner connectivity problems and I’d really appreciate any advice anyone has. I’ve got a little bit of coding experience, so I feel fairly comfortable with the learning process for lua, but I’m struggling with figuring out how to actually get scripts into crow (I haven’t worked much with terminal-based things).

When I upload something in druid by entering “u <xxxx.lua>” I get text saying that the file is bootstrapped, and that input, asl, asllib, metro, ii, and crowlib are loaded. This action seems to freeze First into a strange pulsing. If I then enter “^^clearscript” there is a slight pause before the pulsing continues. Entering “p” tells me that there’s no user script. I get the same result whether or not I’ve typed the name of an actual file. Restarting my modular results in First running normally again.

How do I point druid to the correct location of the lua file?

Do I need to do anything to prepare the file other than saving it as a .lua (I’m writing in ZeroBraneStudio)?

Do I need to do anything to include asl when programming?

I’m wondering if it is partially where I’ve stored things as I also can’t boot druid directly in terminal, but instead have to drag the druid.py file in to terminal at the start of each session (typing python3 druid.py I get a notice that there’s no such file).

1 Like

No.

No.

In terminal, navigate to your Druid folder:

cd <path-to-druid-folder>

Replace path to <path-to-druid-folder> with the path where you put the Druid folder (for instance cd C:/users/sam/desktop/druid/ - this is what a path looks like on a PC).

Now that your terminal has “moved” to the correct folder, you can run python3 druid.py and it will successfully find the druid.py folder stored in the current location (your druid folder).

I save my scripts in a folder I made called scripts inside of my druid/ folder. To upload one of my scripts, I can then run:

u scripts/scriptname.lua

This command says “look for the scripts folder in my current location, then look inside of the scripts/ folder once you’ve found it for the file scriptname.lua and then upload it.”

10 Likes

Thank you so much for you help! That clarifies a lot about the process for me. I really appreciate it!

I’m still having problems with druid freezing sometimes, and with crow freezing and requiring a restart whenever I try to upload anything (it sounds like maybe the pitch is freezing and the envelope is looping but I’m not sure) with p showing no user patch, so I’m going to try setting up and rereading everything from scratch in the morning now that I know where I’m heading.

This name could be problematic on Windows because using a Python virtualenv for druid will generate a Scripts/ folder used for virtualenv to manage environment-patching scripts, and this would conflict with scripts/ on Windows since paths are case-insensitive. Maybe userscripts/ or lua/ should be used if this suggestion gets added to the Druid docs.

1 Like

The ii.jf.retune commands appear to not be working as expected for me. If the intone knob is set to either extreme (cw or ccw) then the output for that channel appears to either lock on or stay off entirely. However resetting with ( 0, 0, 0 ) works as expected and returns everything to normal. I tried out some fairly mundane numerator/denominator settings just to be safe and tried both cycle/shape and transient/shape.

edit: It actually works as expected in sound mode, so nevermind? I thought I had used this kind of functionality with Just Type, but maybe I’m going crazy.

this seems to happen to me too. the druid repl also hangs when i try to upload and i have to power cycle and run upload again

1 Like

I’ve been noticing this on mac os as I’ve been writing the scripting tutorial. Which OS are you (@crim and @ringsandrocks) running? I’ll investigate after I get the tutorial done!

1 Like

I’ve definitely noticed this. Mac OS 10.14.6

Thanks so much! I’m on MacOS 10.14.6

Just pulled in the latest druid changes on master (dbd3738) and having a lot more connectivity issues.

Still not received my crow unit. Arriving today or tomorrow I think. Reading through docs but not actually started playing with anything yet.

Wondering is there some kind of crow runtime emulator or build target in Druid that will allow scripts to be run and debugged without a crow attached.

Likely I’ll be snatching 30 minutes here and there to develop scripts, it would be nice to be able to do this without having a crow attached.

3 Likes

@atomboyd Could you be more specific as to the kind of connectivity issues? What OS are you on?

@Oootini Nothing as yet, but if someone wants to build this I’d be stoked!

1 Like

Ok thank you. In a line or two, could you describe how such an emulator might be developed? Could this be done in python?

I think basically yeah. You could host a Lua environment inside Python using a library like lupa, and supply the various Crow globals (input, output, ii, …) with proxy versions that you can do something with (simulate input changes somehow that doesn’t involve the hardware, for instance. from Python? this is probably the tricky part). I think probably it could make sense for this to be available as another mode in Druid, but also probably need a command to switch the shell to a different evaluation environment and indicate that you’re running Lua on the computer rather than sending messages to Crow. And maybe a prompt to offer to use the emulated environment if you run Druid without a Crow attached.

I spent most of the weekend hacking around in Druid and have a bunch of ideas for different ways to extend it. There are several things I’ve gotten myself into that I’d like to rework, but my branch is available here if anyone’s interested (you will have to install the requirements.txt and use python run_druid.py to launch it - original druid.py I’ve left unchanged for reference and for easier merges). There’s a lot of stuff that could be done but I worry about making the simple use case more complicated, might wind up making more sense as a fork.

1 Like

I’m trying to get into druid and having problems on Mac. I’ve got Python and the utilities installed, but when I try to access druid, it keeps saying there is no such directory----for reference, I’ve got it unzipped in my Applications folder. I’ve tried many different combinations, but still can’t manage to get into druid. I’m using a Mac 10.11.6

It seems like it should be cd Applications/druid-master/druid
but nothing seems to work.

It probably seems obvious, but no coding experience here!

1 Like