HID demo


HID demo

Demo scripts for HID functionality. Includes keyboard library for basic keyboard input.

A demonstration of using the norns USB HID functionality


An HID device - like a USB keyboard or mouse


hid-events.lua Plug in an hid device and send some events. Event data will print to Maiden REPL. This is handy for figuring out what codes your device sends.

hid-keyboard-test.lua Type some text. enter clears the screen

shell.lua This is basically a command line prompt for the device. stdout goes to maiden REPL. Use with caution.

lib/keycodes.lua is handy for decoding the events from a USB keyboard.


v1.0.1 - https://github.com/okyeron/hid-demo/archive/master.zip



I don’t know why I love this idea so much but I do.

the small size of Norns’s screen makes it a little impractical for running TidalCycles, and yet, and yet




in the future enhancements dept:

  • zork
  • voice synthesis (text-to-speech) for the wargames reference in the keyboard demo. :slight_smile:


Great stuffs. Is it weird that my Audient iD4 is detected as an HID device on my RPi?

Maybe not, the big ol «iD» knob might be the HID Device.

1 Like


thinking about the potential for a norns exquisite corpse right now…

1 Like


Very likely. It’s not listed in the tech specs on their website, but if knob turns show up with the hid-events.lua script then you could use that and map it to something interesting in your scripts!

1 Like


This is probably a terrible idea (stuck notes being a thing), but perhaps a MIDI variant on teletype might be possible now.



Terry Riley Teaches Typing



so like a teletype ish script that spits out MIDI (or also does things with a norns engine, or both)?

I started thinking that way and realized I’d have to kinda re-write teletype. :laughing:



my first thought for a keyboard app is loosely based on this old dreamcast game

I constantly have to create new passwords for various work accounts and realized my quirk of choosing based on rhythm and key position (rather than meaning) could be the framework for a weird game/sequencer



[writes Forth interpreter in Lua] :joy:



cool article from someone who did just that:

nice reflections, applicable to tt-script:

btw. tt-script parser is implemented in ragel and is very portable. tt-script opcodes are less portable simply because they tend to call HW-specific stuff directly.



when @sam refactored tt codebase he separated HW specific stuff (https://github.com/monome/teletype/tree/master/module) from the opcodes / scripting engine (https://github.com/monome/teletype/tree/master/src). so in theory it should be pretty portable. any opcodes that need to interact with HW do it via https://github.com/monome/teletype/blob/master/src/teletype_io.h



Thinking ahead at the possibilities, the potential of norns running some sort of teletype script + crow + telex expanders could be a really cool way to control a modular system–it sounds like crow will be able to execute code in someway, so maybe scripts could even run “headless” (i.e. without a norns connected).



Do you have any info how to get TidalCycles running on Norns - it was partially the reason why i upgraded to CM3+ for the extra memory to run it? An idiots guide. Because i am an idiot :slight_smile:



TidalCycles would be awesome, but… what about bytebeats!? :slight_smile:



I think there’s a non-trivial amount of work to be done: first one would have to install Haskell and the Tidal interpreter over it and check to see that SuperDirt works on Norns. Both likely eminently “doable”. Assuming that’s done, the trouble becomes writing a Lua script (or otherwise making some decision) for the interface between the Tidal interpreter and the Norns screen.

I was mostly kidding, but it does seem like a cool undertaking.

1 Like


I got tidalcycles installed on my other pisound/raspberry pi and it worked fine

Not sure how superdirt would interact with Norns mind. There seemed to be an utter lack of documentation on how/why it worked

I’m more intrigued by the idea of a “midiForth” now. With generative/manipulative/extensible features. I had BBC Forth back in the ‘80s & liked it then. Reading about using it to control telescopes etc. It actually seems a good choice for a lightweight control language without a lot of syntax to get in the way…



not well. they are radically different environments.
[blah blah, you can do it but it’s a bit crazy.]

1 Like


yup, not getting the iD knob presses, but I am getting the encoder rotations in REPL. Very nice!