Approaching: norns

norns

#1058

Love it. As excited to see what people do with the screen as with the sc part of norns.


#1059

please can we play games on norns? Does it support Xbox controllers? :smiley:

For everybody else, who is interested in discussing UI/UX related matters (@andrew @glia @jasonw22) , please do so here:

and also


#1060

I’m guessing yes but would it be possible to have norns act as a dual custom audio processor?
So having like 2 completelly different sound processing algorithms running at the same time, one processes the audio going in input 1 and outputs it off output 1, the other proesses the audio going in input 2 and outputs out output 2.

edit: and having some sort of grid page based control over both.


#1061

All good now, I understand its potential now, Im quite excited for this.


#1062

I don’t know why that shouldn’t be possible.

:slightly_smiling_face:


#1063

not quite xbox, but close!


#1064

20 characters of Indeed!


#1065

I can’t believe the first video game example on a wee Linux box wasn’t Doom. :wink:


#1066

#1067

So what’s the DSP-alike power this thing has? Depending on the ARM SoC used they do come with some dsp capabilities. From what I understand, there will be no way to custom target these possibilities using super collider. This looks super interesting to me… just curious if it could replace my aleph craving for simpler/lighter dsp tasks.


#1068

From the specs it says it works with HID stuff, so an Xbox 360 controller should work just fine. Late last year I bought an Xbox One controller, the most recent of which work on Macs without needing a wireless dongle, and it’s pretty nice. Slightly different feel and layout than my trusty 360 controller (what I built Cut Glove around), but the fact that it’s wireless natively is quite attractive.

One of the thing I’m wondering is if that will work with the norns, since I think it’s just HID-over-wifi, as it works sans driver. Having to plug in a 360 controller isn’t the end of the world though.


#1069

Awesome! Thanks so much, can’t wait to play with this :stuck_out_tongue: (absolutely worth it!)


#1070

What about the PS4 controller? It’s got that very nice touch surface… wonder if that is addressed via HID…


#1071

Easy enough to check in Max if you have it. (create an [hi] object and see if it shows up in there). Most gamepads, as far as I know, are all HID compliant, in order to work across the OSs without drivers and such.

A shame is that the [hi] object, in Max anyways, is unidirectional, so there’s no access to vibration/haptics and/or LEDs on the controller itself, which would be super fucking useful.


#1072

that would be oh so amazing to get bidirectional communication!


#1073

Totally.

I don’t actually know anything about HID on linux and/or SC, but I wonder if it’s bidirectional.

(I looked into getting a custom bi-directional HID solution for Max going a few years ago, but it never really materialized)


#1074

Absolutely it’s possible. I remember messing around with LOVE2D when i was dabbling with Lua last year, and built a game that had haptic feedback. This was on a Debian system with nothing fancy, so assuming it’s just standard HID.


#1075

HID in SuperCollider is bidirectional - you should be able to set the value of any element that’s exposed as one that can receive input. I haven’t tried it with a ton of devices, but I was recently able to pick up all the data streams from a multitouch monitor pretty effortlessly - in terms of bidirectional, the most I’ve been able to do is make an LED blink, but I don’t have much to test with.


#1076

man, I remember Electro Man. It was surprisingly interesting: more puzzly than platformy. Irritating sounds, though!


#1077

bidirectional communication

yes it’s possible.

on norns we are using libudev directly for HID. most HID output is leds and force feedback. these have standard sysfs interfaces.

however a lot of device have non-standard interfaces. for example i have an xbox360 controller, and it has LEDs on it, but you can’t just set the brightness of these LEDs directly like you can with lock indicators on keyboards. instead you can set different blinky patterns for the leds through some undocumented mapping on some undocumented port that doesn’t even get enumerated in the events list for the device (it is absolutely not worth my time to figure this out.)

here’s the full list of event codes we get for the xbox360 and a usb keyboard:

Controller
  0 : 0 (EV_SYN) : 
  1 : 1 (EV_KEY) : 
      0 : 304 (BTN_SOUTH)
      1 : 305 (BTN_EAST)
      2 : 307 (BTN_NORTH)
      3 : 308 (BTN_WEST)
      4 : 310 (BTN_TL)
      5 : 311 (BTN_TR)
      6 : 314 (BTN_SELECT)
      7 : 315 (BTN_START)
      8 : 316 (BTN_MODE)
      9 : 317 (BTN_THUMBL)
      10 : 318 (BTN_THUMBR)
  2 : 3 (EV_ABS) : 
      0 : 0 (ABS_X)
      1 : 1 (ABS_Y)
      2 : 2 (ABS_Z)
      3 : 3 (ABS_RX)
      4 : 4 (ABS_RY)
      5 : 5 (ABS_RZ)
      6 : 16 (ABS_HAT0X)
      7 : 17 (ABS_HAT0Y)
  3 : 21 (EV_FF) : 
USB Keyboard
  0 : 0 (EV_SYN) : 
  1 : 1 (EV_KEY) : 
      0 : 1 (KEY_ESC)
      1 : 2 (KEY_1)
      2 : 3 (KEY_2)
      3 : 4 (KEY_3)
      4 : 5 (KEY_4)
      5 : 6 (KEY_5)
      6 : 7 (KEY_6)
      7 : 8 (KEY_7)
      8 : 9 (KEY_8)
      9 : 10 (KEY_9)
      10 : 11 (KEY_0)
      11 : 12 (KEY_MINUS)
      12 : 13 (KEY_EQUAL)
      13 : 14 (KEY_BACKSPACE)
      14 : 15 (KEY_TAB)
      15 : 16 (KEY_Q)
      16 : 17 (KEY_W)
      17 : 18 (KEY_E)
      18 : 19 (KEY_R)
      19 : 20 (KEY_T)
      20 : 21 (KEY_Y)
      21 : 22 (KEY_U)
      22 : 23 (KEY_I)
      23 : 24 (KEY_O)
      24 : 25 (KEY_P)
      25 : 26 (KEY_LEFTBRACE)
      26 : 27 (KEY_RIGHTBRACE)
      27 : 28 (KEY_ENTER)
      28 : 29 (KEY_LEFTCTRL)
      29 : 30 (KEY_A)
      30 : 31 (KEY_S)
      31 : 32 (KEY_D)
      32 : 33 (KEY_F)
      33 : 34 (KEY_G)
      34 : 35 (KEY_H)
      35 : 36 (KEY_J)
      36 : 37 (KEY_K)
      37 : 38 (KEY_L)
      38 : 39 (KEY_SEMICOLON)
      39 : 40 (KEY_APOSTROPHE)
      40 : 41 (KEY_GRAVE)
      41 : 42 (KEY_LEFTSHIFT)
      42 : 43 (KEY_BACKSLASH)
      43 : 44 (KEY_Z)
      44 : 45 (KEY_X)
      45 : 46 (KEY_C)
      46 : 47 (KEY_V)
      47 : 48 (KEY_B)
      48 : 49 (KEY_N)
      49 : 50 (KEY_M)
      50 : 51 (KEY_COMMA)
      51 : 52 (KEY_DOT)
      52 : 53 (KEY_SLASH)
      53 : 54 (KEY_RIGHTSHIFT)
      54 : 55 (KEY_KPASTERISK)
      55 : 56 (KEY_LEFTALT)
      56 : 57 (KEY_SPACE)
      57 : 58 (KEY_CAPSLOCK)
      58 : 59 (KEY_F1)
      59 : 60 (KEY_F2)
      60 : 61 (KEY_F3)
      61 : 62 (KEY_F4)
      62 : 63 (KEY_F5)
      63 : 64 (KEY_F6)
      64 : 65 (KEY_F7)
      65 : 66 (KEY_F8)
      66 : 67 (KEY_F9)
      67 : 68 (KEY_F10)
      68 : 69 (KEY_NUMLOCK)
      69 : 70 (KEY_SCROLLLOCK)
      70 : 71 (KEY_KP7)
      71 : 72 (KEY_KP8)
      72 : 73 (KEY_KP9)
      73 : 74 (KEY_KPMINUS)
      74 : 75 (KEY_KP4)
      75 : 76 (KEY_KP5)
      76 : 77 (KEY_KP6)
      77 : 78 (KEY_KPPLUS)
      78 : 79 (KEY_KP1)
      79 : 80 (KEY_KP2)
      80 : 81 (KEY_KP3)
      81 : 82 (KEY_KP0)
      82 : 83 (KEY_KPDOT)
      83 : 86 (KEY_102ND)
      84 : 87 (KEY_F11)
      85 : 88 (KEY_F12)
      86 : 89 (KEY_RO)
      87 : 92 (KEY_HENKAN)
      88 : 93 (KEY_KATAKANAHIRAGANA)
      89 : 94 (KEY_MUHENKAN)
      90 : 95 (KEY_KPJPCOMMA)
      91 : 96 (KEY_KPENTER)
      92 : 97 (KEY_RIGHTCTRL)
      93 : 98 (KEY_KPSLASH)
      94 : 99 (KEY_SYSRQ)
      95 : 100 (KEY_RIGHTALT)
      96 : 102 (KEY_HOME)
      97 : 103 (KEY_UP)
      98 : 104 (KEY_PAGEUP)
      99 : 105 (KEY_LEFT)
      100 : 106 (KEY_RIGHT)
      101 : 107 (KEY_END)
      102 : 108 (KEY_DOWN)
      103 : 109 (KEY_PAGEDOWN)
      104 : 110 (KEY_INSERT)
      105 : 111 (KEY_DELETE)
      106 : 113 (KEY_MUTE)
      107 : 114 (KEY_VOLUMEDOWN)
      108 : 115 (KEY_VOLUMEUP)
      109 : 116 (KEY_POWER)
      110 : 117 (KEY_KPEQUAL)
      111 : 119 (KEY_PAUSE)
      112 : 121 (KEY_KPCOMMA)
      113 : 122 (KEY_HANGEUL)
      114 : 123 (KEY_HANJA)
      115 : 124 (KEY_YEN)
      116 : 125 (KEY_LEFTMETA)
      117 : 126 (KEY_RIGHTMETA)
      118 : 127 (KEY_COMPOSE)
      119 : 128 (KEY_STOP)
      120 : 129 (KEY_AGAIN)
      121 : 130 (KEY_PROPS)
      122 : 131 (KEY_UNDO)
      123 : 132 (KEY_FRONT)
      124 : 133 (KEY_COPY)
      125 : 134 (KEY_OPEN)
      126 : 135 (KEY_PASTE)
      127 : 136 (KEY_FIND)
      128 : 137 (KEY_CUT)
      129 : 138 (KEY_HELP)
      130 : 183 (KEY_F13)
      131 : 184 (KEY_F14)
      132 : 185 (KEY_F15)
      133 : 186 (KEY_F16)
      134 : 187 (KEY_F17)
      135 : 188 (KEY_F18)
      136 : 189 (KEY_F19)
      137 : 190 (KEY_F20)
      138 : 191 (KEY_F21)
      139 : 192 (KEY_F22)
      140 : 193 (KEY_F23)
      141 : 194 (KEY_F24)
      142 : 240 (KEY_UNKNOWN)
  2 : 4 (EV_MSC) : 
  3 : 17 (EV_LED) : 
      0 : 0 (LED_NUML)
      1 : 1 (LED_CAPSL)
      2 : 2 (LED_SCROLLL)
  4 : 20 (EV_REP) : 

the EV_LED codes for the keyboard are standard and easy to use.

you may notice the EV_FF field for the gampad. force feedback can be pretty deep, some devices let you program custom waveforms and stuff, some don’t. start on page 20 here: http://www.infradead.org/~mchehab/kernel_docs_pdf/linux-input.pdf

anyway, we haven’t made glue to send events to HID devices from lua just yet, but have kept it in mind with the supported-events scaffolding. (e.g., lua knows about those EV_LED fields.)

partly that’s because the use cases just aren’t clear (custom HID controllers? better to use serial maybe, like monome controller protocol) and we are spread thin implementing core functionality. so i hope that the first time someone comes a long with a compelling use case, they can help specify which exact output event bits would be most helpful to implement.