norns + shnth

Library for using the shbobo shnth as a controller for Norns.

Requirements

  • norns/fates
  • shbobo shnth

Documentation

Connect your shnth, select it in HID devices menu.

In your script:

-- Include helper library.
local shnth = include("shnth/lib/shnth")

function init()
  -- Connect to HID device.
  -- Let library handle parsing events.
  dev = hid.connect()
  dev.event = shnth.event
end

-- Override a callback to receive data.
function shnth.bar(n, d)
  print("bar" .. n .. " pressed at depth " .. d)
end

Continuous values range from -1 to 1, and buttons are 0/1 based like regular Norns key.

Be warned that most of the continuous inputs are a little noisy.

A demo script, demo.lua is provided.

API

After setting the event handler, override these functions to receive data:

function shnth.bar(n, d)
  -- bar input, always firing
  -- n bar index
  -- d bar depth
end

function shnth.corp(n, d)
  -- corp input, always firing
  -- n corp index
  -- d corp depth
end

function shnth.major(n, z)
  -- major buttons, fires on touch
  -- n button index
  -- z button state
end

function shnth.minor(n, z)
  -- minor buttons, fires on touch
  -- n button index
  -- z button state
end

function shnth.wind(d)
  -- wind input, always firing
  -- d wind depth
end

Download

Clone from Github.

26 Likes

Keep the Good Stuff :tm: coming!
:fire: :fire: :fire: :fire: :slight_smile:

3 Likes

Thanks! Exactly what I needed!

2 Likes

20 characters of awesome!!

4 Likes