oh, so so exciting! so glad you were able to navigate it! i really can’t wait to get back to it

I think you’d just need to call the rev_speed() function, same as @okyeron did with record() :slight_smile:

elseif d.type=="note_on" and d.note == midi_record_trigger then
        record() 

lmk how it goes!

2 Likes

aw man… dan beat me to it!

was gonna post rev_speed()

so you could add…
local midi_rev_trigger = 10 -- note number chosen at random
then

elseif d.type=="note_on" and d.note == midi_rev_trigger then
        rev_speed() 
3 Likes

sure you can, just call the key handler function directly from the midi handler
(e.g.)

midi.connect(1).event = function(data) 
  msg = midi.to_msg(data)
  if msg.type = 'note_on' then 
     if msg.note == 1 then 
        key(1, 1)
     end
  elseif msg.type= 'note_off' then
     if msg.note == 1 then 
        key(1, 0)
     end
  end
end
10 Likes

20 characters of thanks for correcting my ignorance!!

well you’re quite right that it does require extra programming on the norns side, i just meant its fortunately not too difficult

whoa! thanks for this!

I have a couple of Lemur touch screen controller laying around and was thinking if anybody uses it with Norns via the Ethernet port?
So that direct control of all options is possible?

If you add a few lines of code, apples magic trackpad works :slight_smile:

19 Likes

Nice! And what are the lines…??? :slight_smile:

2 Likes

I used @okyeron’s HID test script to figure out what was being sent from my trackpad. In my case, the X and Y axis was

  • typ == 2
  • X = code == 1
  • Y = code == 0

Then took note of what parameters I wanted to alter with the x/y pad. Here is the code I added

local xy_pad = hid.connect()

-- HID xy trackpad
function xy_pad.event(typ, code, val)
  if typ == 2 then
    if code == 1 then
      params:delta("res", -val * .25)
    elseif code == 0 then
      params:delta("freq", val * .05)
    end
  end
end

The typ and code's will likely differ with other hardware.

8 Likes

That trackpad probably emits multi-touch events too right? It should be able to have at least 5 touch events. Could be fun for granular

2 Likes

@Justmat et al

also be aware of norns/lua/core/hid_event_types.lua. this defines a bunch of constants that correspond to the type and event codes.

IIRC they are named after the equivalent constants in libevdev headers. so this is slightly more readable than the raw numbers.

in there you can see:

  • event type 1 is EV_REL, “relative axes”
  • in the event codes section under “relative axes”, code 0 is REL_X and code 1 is REL_Y

in other words, the magic trackpad behaves just other computer mouses.

and the code can be made a little more readable (imho) by testing for the named constants

local hev = require 'hid_events'
...
if type = hev.types.EV_REL ...
   if code = hev.codes.REL_X ... 

if people want to make nicer middleware libraries for this stuff that would probably be cool.

3 Likes

There were/are definitely more event codes. I was trying to keep it simple, but some events like clicks and faster movements kept throwing other codes. :sweat_smile:

edit: @zebra, some how I completely missed this! Thank you for the heads up :smiley:

Oooooooh interesting

That trackpad would be good triggering lots of different drum samples or electro acoustic samples with earthsea style cv recording + softcut type looper. Check Boppad for similar idea where it’s setup in zones and outputs midi. I was thinking of getting one for Norns.

2 Likes

That’s exactly what I was looking at doing - a four zone click surface for triggering samples, etc.

Good times :smile:

1 Like

Could you - or any other good peoples - describe a little more about how the Faderfox night interface with Norns?

I ask this from a very low base and slowly getting used to Maiden, low level coding and the like - have just built a Fates, and wondering about what to pair it with. A Grids is beyond me at the moment, but a small companion would be good.

I don’t have any kit at all with MIDI, and neve really played with anything not analogue, so please be gentle/basic! :smiley:

Thanks

Ive misplaced my wifi dongle and wondering if there are any considerations when getting another one? Any ol’ dongle work?

1 Like

I’ve had no issues with the high gain adapter recommended in the docs!

2 Likes

I have had a UC4 for awhile and built a Fates recently. It’s a high quality, flexible midi controller. Most controllers don’t feel very substantial, but the build quality from Faderfox is great. It’s got buttons, it’s got push-encoders, and some of the best faders I know of. All of which are configurable to emit lots of different midi messages. Mostly I’ve paired it with Fates by mapping CC messages.

1 Like