Kria MIDI

Yes thanks! What had intrigued me it’s been what @coreyr wrote and I copied above, I thought initially that he prefer to use kria midi trough crow and Norns than Ansible/kria directly with modular.

FYI adding a second crow connected via ii to the first one should make it possible to get four tracks out of norns Kria with some changes to the script, I don’t think it currently supports it :slight_smile:

3 Likes

One solution that’s just occurred to me is to use the crow outs for for cv and 4 outputs from Just Friends to do envelopes? I have just got hold of a crow and have a JF on loan from, fittingly, a friend. If I have time I’ll have a quick look to see if I can get this going, can post my edits if they work and there’s any interest.

3 Likes

This is a more general question but thought I would ask here since it’s for the sake of this script:

How to Norns Midi -> Ableton?

I did the most immediate dumb thing of “plug USB from one to the other” and yeah that’s a no go.

Do I need a midi interface for this? (if so, I’d be interested to learn why – and also to learn what minimal-but-USB-C-compatible option exists for this end). Have spent the past hour up and down the forum and I see lots of people using interfaces to achieve what appear to be similar ends, but I’m not totally sure why / how and it seems funny to get basically a series of small boxes with different cable ends (USB -> 5-Pin, 5-Pin -> USB, USB -> USB-C) and my cable algebra wants to simplify the equations…

The idea is to transition out of euro eventually while maintaining my favorite pieces of functionality (Kria, Faderbank, semi-random CV)

Also small note @junklight, the top post still links to an outdated github link. If you could update that it’d be a joy (got bit by this earlier – current set up has issues connecting to Maiden for some reason…).

If I remember correctly the crow out is supported via a library module it installs. You can add functions to this to get new output combinations. Like using ansible or just friends. New functions should appear in the menus. The script is in data dir (do updates don’t overwrite it)

@yams norns is a USB host, like most other computers with operating systems

it’s not “normal” to connect two hosts together so it requires some device(s) in between that can talk to both and perform some arbitrary translation between them. just as if you wanted to send MIDI between two laptops.

i kinda thought this was well-covered on the forum:

TL/DR: the “iconnect” products by sevillasoft are a commercially-available solution, and okyeron’s “2host” (linked above) is a DIY solution (basically, two teensy-based devices which forward all MIDI messages between them.) the other option is to use two separate USB-MIDI interfaces with a serial MIDI connection between them.

but simply connecting USB cable is unfortunately not ever going to work.

2 Likes

I use midi connect unit to do this. Search on my name here & you should find me talking about it.

I’ve been having a “fallow” period without music for a bit but starting to think about it again. I’ll catch up on updates soonish hopefully

4 Likes

Could this script be modified to control just friends via crow? I just purchased a just friends so im thinking about a norns/crow/grid combo to go with it.

3 Likes

it should be rather easy to add just friends via crow ii output, i recently modified loom to do the same. i may take care of this eventually but am currently focusing on other projects, here’s the loom commit if anyone would like to take a stab at it: added crow cv/just friends ii output · markwheeler/loom@9957aca · GitHub

i highly recommend the norns/crow/grid/jf combo! that is essentially the heart of my small modular system, grid controlling jf in synth mode can be loads of fun.

3 Likes

so the last Kria MIDI did have crow support (as far as I can remember) AND it does it via an extensible library. If you look in the data directory you’ll see it installs a Lua file in there with function in it - you can add functions to this to do crow things (or anything else you fancy)

The reason it puts it in the data dir is so you can modify it and updates (not that I’ve gotten round to that much) won’t overwrite it AND you can share them

I’ve probably not documented this very much but it should be really easy to add. I do notice that @Galapagoose has hinted there may be another run of JF and if the winds of fortune happen to be blowing in my direction when they are available I would like to pick one up - in which case I will add ‘out of the box’ support

As noted elsewhere I’ve (like everyone else to be fair) had an odd year and didn’t do much music or work on my various scripts and apps. Really hoping to change that soon (although currently easing back into things were my various projects don’t need code writing first :slight_smile: )

5 Likes

Just an FYI for you junklight as I believe you’re in the UK(?). JF is currently available at signal sounds I just picked one up from there

2 Likes

oh cool - thank you for letting me know! just need the awaited bit of news on the financial front to arrive now :slight_smile:

1 Like

Hey! Im bad/lazy on the pull request thing, but I managed to get midigrid and JF working locally with Kria with the following edits below. This will add all 4 cv/gate pairs of Ansible, JF Voices individually 1-4, then a JF Poly option

EDIT: next step would be to translate duration to velocity just for JF, since note duration isn’t a thing you can control via scripting for JF

for JF make the following change below and restart (data folder changes seem to need a restart?)

in data > kria_midi > crowout.lua
if dont see this file, just run Kria once… it should create it on first run.
replace the whole file with the text below. Restart Norns after you do this because I think it takes a restart to reload any changes to this file.

crowouts = {
  { 
    name="Crow CV/G 1 & 2 ",
    on_fn = function(note,velocity)
        crow.output[1].volts = note/12
        crow.output[2].volts = 8
      end
      ,
      off_fn = function(note)
        crow.output[2].volts = 0
      end
      },
    { 
    name="Crow CV/G 3 & 4 ",
    on_fn = function(note,velocity)
        crow.output[3].volts = note/12
        crow.output[4].volts = 8
      end
      ,
      off_fn = function(note)
        crow.output[4].volts = 0
      end
      },
    { 
    name="Crow Ansible CV/G 1",
    on_fn = function(note,velocity)
        crow.ii.ansible.trigger( 1 ,1  )
        crow.ii.ansible.cv( 1, note/12)
      end
    ,
    off_fn = function(note)
      crow.ii.ansible.trigger( 1 ,0  )
      end
      },
    {
    name="Crow Ansible CV/G 2",
    on_fn = function(note,velocity)
        crow.ii.ansible.trigger( 2 ,1  )
        crow.ii.ansible.cv( 2, note/12)
      end
    ,
    off_fn = function(note)
      crow.ii.ansible.trigger( 2 ,0  )
      end
      },
    {
      name="Crow Ansible CV/G 3",
    on_fn = function(note,velocity)
        crow.ii.ansible.trigger( 3 ,1  )
        crow.ii.ansible.cv( 3, note/12)
      end
    ,
    off_fn = function(note)
      crow.ii.ansible.trigger( 3 ,0  )
      end
      },
    {
      name="Crow Ansible CV/G 4",
    on_fn = function(note,velocity)
        crow.ii.ansible.trigger( 4 ,1  )
        crow.ii.ansible.cv( 4, note/12)
      end
    ,
    off_fn = function(note)
      crow.ii.ansible.trigger( 4 ,0  )
      end
      },
    { 
    name="Crow JF Voice 1 ",
    on_fn = function(note,velocity)
        crow.ii.jf.play_voice( 1, (note-60)/12, velocity*0.039)
      end
      ,
      off_fn = function(note)
      end
      },
    {
    name="Crow JF Voice 2 ",
    on_fn = function(note,velocity)
        crow.ii.jf.play_voice( 2, (note-60)/12, velocity*0.039)
      end
      ,
      off_fn = function(note)
      end
      },
    {
    name="Crow JF Voice 3 ",
    on_fn = function(note,velocity)
        crow.ii.jf.play_voice( 3, (note-60)/12, velocity*0.039)
      end
      ,
      off_fn = function(note)
      end
      },
    {
    name="Crow JF Voice 4 ",
    on_fn = function(note,velocity)
        crow.ii.jf.play_voice( 4, (note-60)/12, velocity*0.039)
      end
      ,
      off_fn = function(note)
      end
      },
    {
    name="Crow JF Poly ",
    on_fn = function(note,velocity)
        crow.ii.jf.play_note((note-60)/12, velocity*0.039)
      end
      ,
      off_fn = function(note)
      end
      },
  }
  
return crowouts

then in code > kria_midi > lib > output.lua

add line 152

Summary

crow.ii.jf.mode(1)

for midigrid - make these changes in kria_midi.lua. you wont be able to use a MIDI In device when you have a midigrid device. I found that even changing the MIDI channels on my Launchpad mini mk3’s didnt work to avoid the button presses from registering as MIDI In note commands. this code is non-destructive for regular grid users, so everything should work just fine for grid + midi device there

line 30:

Summary

local enable_midigrid = util.file_exists(_path.code…“midigrid”) and 1 or 0
local grid = enable_midigrid and include “midigrid/lib/mg_128” or grid

line 100 (replace the existing params:add):

Summary

– midigrid and using midi in do not jive
– since every button press changes root note
if not enable_midigrid then
params:add{type = “number”, id = “midi_in_device”, name = “midi in device”,
min = 1, max = 4, default = 1,
action = function(value)
midi_in_device = midi.connect(value)
midi_in_device.event = process_midi_in
end}
end

3 Likes

Hello guys, sorry for the newbie question here…

Do I need the norns Grid in order to run Kria?

Thank you!

If you are comfortable with the script addition above, you would need either a grid or a ‘midigrid’ ie grid-like devices that use midi (search that term for supported devices)

Love to see song preset and pattern data saved as a preset - it’s such a deep sequencer with pages and pages of options. It’s a shame all that is lost on powerdown. I am really reluctant to use it in some ways because I’ve lost so much decent stuff that I wanted to keep.

7 Likes

ok, I bundled all my changes above, plus added support to translate duration to jf velocity/level (lower duration = lower note level), and made a pull request to the kria_midi repo @junklight. playing kria with singular JF voices is so awesome!

1 Like

@shoggoth awesome! I’ll try and get it all merged this week.

I’ve been super lax with my updates - I’ve got a lot of catching up on Norns progress to catch up on let alone my own stuff but hoping to get some updates made fairly soon

4 Likes

I’ve haven’t yet been able to run this script on my stock Norns – I’ve removed it and reinstalled several times, and currently have the latest installed. This is the error I get, any tips?

### SCRIPT ERROR: load fail
/home/we/dust/code/kria_midi/lib/output.lua:80: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
	/home/we/norns/lua/core/norns.lua:144: in function </home/we/norns/lua/core/norns.lua:144>
	[C]: in function 'pairs'
	/home/we/dust/code/kria_midi/lib/output.lua:80: in main chunk
	[C]: in function 'require'
	/home/we/dust/code/kria_midi/kria_midi.lua:21: in main chunk
	[C]: in function 'dofile'
	/home/we/norns/lua/core/script.lua:186: in function </home/we/norns/lua/core/script.lua:186>
	[C]: in function 'xpcall'
	/home/we/norns/lua/core/norns.lua:145: in field 'try'
	/home/we/norns/lua/core/script.lua:186: in function 'core/script.load'
	/home/we/norns/lua/core/menu/preview.lua:23: in function 'core/menu/preview.key'
	/home/we/norns/lua/core/menu.lua:140: in function </home/we/norns/lua/core/menu.lua:117>
# script clear
lua: /home/we/norns/lua/core/clock.lua:71: bad argument #1 to 'resume' (thread expected)
stack traceback:
	[C]: in function 'coroutine.resume'
	/home/we/norns/lua/core/clock.lua:71: in function 'core/clock.resume'
lua: /home/we/norns/lua/core/clock.lua:71: bad argument #1 to 'resume' (thread expected)
stack traceback:
	[C]: in function 'coroutine.resume'
	/home/we/norns/lua/core/clock.lua:71: in function 'core/clock.resume'
>>

it probably needs an update to the latest version - been stupidly busy this last couple of weeks (you either have time OR money turning out to be true in my life right now) but I’ve got a PR to merge too and I have at lesst gotten the Norns running the latest version - bear with me for a couple of days and I’ll get it all running again

4 Likes