HID demo

norns
#1

HID demo

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

A demonstration of using the norns USB HID functionality

Requirements

An HID device - like a USB keyboard or mouse

Documentation

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.

Download

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

21 Likes

#2

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

6 Likes

#3

hehe…

in the future enhancements dept:

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

#4

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

#5

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

1 Like

#6

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

#7

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

2 Likes

#8

Terry Riley Teaches Typing

5 Likes

#9

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:

2 Likes

#10

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

3 Likes

#11

[writes Forth interpreter in Lua] :joy:

5 Likes

#12

cool article from someone who did just that:
http://angg.twu.net/miniforth-article.html

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.

5 Likes

#13

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

4 Likes

#14

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).

0 Likes

#15

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:

0 Likes

#16

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

3 Likes

#17

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

#18

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…

2 Likes

#19

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

1 Like

#20

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

0 Likes