Thanks for the input @zebra - its kind of hard to suss these general opinions out fo me so its greatly appreciated

Pushed an update.

hid-events now shows you keycodes on the norns screen

@yorke this should fix the device switching.

1 Like

this is great! so helpful for learning - now im getting lots of nice data for a single press:

HID selected USB2.0 Hub
hid.event	type: 1	code: 2	value: 1	keycode: KEY_1
hid.event	type: 1	code: 2	value: 0	keycode: KEY_1

For some reason though, when i plug in the footswitch it still registers twice. this time though I can go into the devices menu and forget the second instance, which successfully translates to the event script.

funny though - in maiden usb hub 2 still registers - but it displays as none on the norns screen.

Could be a bug. I’ll do some more testing.

1 Like

do you have some code for sc and/or norns for shbobo shnth to share? :slight_smile:

i’m just talking about using the shnth as a HID controller. it’s not very exciting.

the buttons send event type EV_KEY with code ranges from 304-311 (which AFAICT is pretty atypical and the type probably “should” be EV_BTN.)

the barres send ABS_REL with code ranges 0-3. (ABS_X, ABS_Y, ABS_Z, ABS_RX.)

i get a couple bits of noise on ABS_THROTTLE as well, might be the antenna, which doesn’t work so hot on this unit.

my shnth is a really old prototype with some quirks, so it might not be very helpful as a model. anyways hope that helps somehow.

norns code is straightforward

local hev = require 'hid_events'
shnth_handlers = {
   hev.codes.ABS_X = function(value)
      -- do something with barre 0 value
   end,
   hev.codes.ABS_Y = function(value)
      -- ... do something w/ barre 1 value
   end,
--- etc: more barres

   304 = function(value) 
     --- handle button 0
   end,
-- etc: more buttons
}

function init()
   -- assuming only shnth is connected
   hid.connect().event = function(evtype, evcode, value)
      shnth_handlers[evcode](value)
   end
end


2 Likes

Since i am hanging around the house more lately i thought i’d explore using the SHNTH in tandem with the Norns and to my joy when i plugged it in it shows up in the Norns menus under HID.

I am going to browse through this thread but I’d love to hear from anyone who’s checked this out yet as well.

SHNORNS

in literally the last post i show how to get buttons and barres. not sure about the antenna but i think my unit is a little woogly there.

1 Like

awesome. TY :slight_smile:
@zebrai finally found the controller for the gendy~ patch !
project.

1 Like

I started doing some gentle poking around Supercollider for text-to-speech stuff - looks like the speech module’s since been deprecated, since it was macOS only? Did you have any luck?

Haven’t got round to doing any SuperCollider stuff for a while. I was thinking SAM or LPC style. Definitely lo-fi.

Would require custom plugins, which I’ve yet to attempt.

So my dream has to be able to use the wii nunchuck for years and Addac had a module to incorporate it but I never had the spare cash and other priorities took over, its a HID device no? Has anyone tried it?

Wiimote is bluetooth and then I believe when connected it acts as an “input” device and I believe as an HID. (I need to re-build my bluetooth setup and test this again)

But - on norns for the moment there’s no way to interface bluetooth devices to the norns stack.


Look promising - direct i2c lines

You’d need something like this: wusbmote

(or wire up something similar with arduino/teensy/etc. to turn the i2c into HID - which is pretty much covered in your first link there)

1 Like

paging @jlmitch5 for magic trackpad discussion

Are you trying hid-events.lua?

hid. is the system table for usb connected HIDs. Works the same as grid. or midi. tables to connect to a device, etc.

All that is defined in ~/norns/lua/core/hid.lua or in the norns reference at http://norns.local/doc/classes/hid.html

2 Likes

Ah cool got it! 20 char

AFAIK, there is no speech synthesis implemented in SuperCollider, the only way this was working previously, was calling external libraries from the language (not the server), which means that it is not possible to e.g. route its output through effects…

2 Likes

There’s some formant speech stuff in the Plaits engine (Macro P Oscillator) Mi-engines

Sadly the word list is pretty limited.

I should make a map of values for the existing words/letters/numbers.

2 Likes