Giter VIP home page Giter VIP logo

midigrid's Introduction

norns midigrid library

A few helper scripts for emulating and using midi grids like a monome grid, on the monome norns.

Two scripts in the lib folder to include in scripts as 'grid', config files in the config folder for setups with different devices.

instructions

Install by downloading this repo into your dust scripts folder, and calling the library like regular norns libraries, i.e, include('midigrid/lib/midigrid').

midigrid.lua and device_config.lua the script should automatically detect which device you are running and use the correct profile currently supported devices are the launchpad, launchpad mini, launchpad mk2 (RGB), Launchpad Pro and apc mini.

Then, in whatever script you are working in, it works well to override the global grid object with our own local one:
```lua
--adding this to script to use and 8x8 gird
local grid = include('cheapskate/lib/midigrid')
--or this to use an 8x16 grid
local grid = include('cheapskate/lib/midigrid_2pages')
--which allows this call to work with our midi grid
local g = grid.connect()

Previous issues with the midi device being blocked are resolved with this new implementation taken from ryanlaws lunchpaid.

If a script expects incoming midi, you need to set your midi device to a slot other than 1.

Finally, each config file has a device_name parameter that may need to be adjusted for different versions of launchpad. Check what the name of the device is on norns and adjust accordingly.

two page mode

This script aims to emulate a 128 (16x8) grid by spreading a virtual grid buffer over two grid pages that you can toggle with auxiliary buttons surprisingly this works quite well for the vast majority of scripts if modifier keys are on the second page having the modifier key held down when switching pages will keep it held down allowing it to be used across both sides of the grid.

apc mini

By default, the left and right arrow buttons on the bottom row of buttons on the grid

launchpad

The toggle buttons are the top two column buttons in launchpad auxiliary column. need to set them up so they can be the left and right arrows but this is non trivial as the top auxiliary buttons on the launchpad send control (176) messages not note on.

todos

TODO key aliasing feature, to use auxiliary keys in different ways per script

TODO add config files for launchpad (and untz maybe)

TODO allow config files to overide led and all functions, for more native launchpad support

DONE add cols and rows function

DONE make page changing more efficient code wise

DONE consider how to make this more sensible with the midi device number thing…

scripts

Notes for norns scripts that either work or I wanna make work, or need a little love to make work all have only been tested on the apc mini

step

works, need to block out midi

strum

works but with midi blocking

mlr64

mlr64 works!

earthsea for apc mini

  1. this is pretty much ready to go, use the earthsea from the ash library

    its glitchy and not sure why working but glitchy?

vials for apc mini

  1. I think this can be implemented as just split view toggle

    if view2 then {new mapping}

  2. status

    works pretty great two pages

meadowphysics, this is one to look at

  1. basic mode is simple, just subtract by half

  2. Reset, Output, and Speeds

    this just needs a speed interface… if (config)

  3. if rules then choose with encoder

strides

this one should be easy too, the second half of the grid is just pulled up from an alt key

shfts

a toggle button for the two views

cranes

this is split in two, but horizontally, so going to need to be a little more sophisticated in the mapping

ekombi

just make it half as precise

takt

maybe just a two pager?

foulplay

only 64 ready to go!

zellen

good to go with rows and cols, and adjusting led values

isoseq

just the max pattern length needs to change

midigrid's People

Contributors

ben-alkov avatar jaggednz avatar katspaugh avatar miker2049 avatar tildebyte avatar timm052 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

midigrid's Issues

Not in view!

Thanks for the update.

I get a repeating not in view! error even though code runs and works. Using an apc mini the error seems to stem from line 122-32 in mg_128 and similar with mg_256

function midigrid:led(x, y, brightness) grid_buf[x][y] = brightness local index =16*y+x local note = views[curr_view][index] if note ~= nil then local vel = brightness_handler(brightness) _brightness_to_buffer(note, vel, config:led_sysex(note, vel)) else print("not in view!") end end

I am too much of a newbe to figure it out.

Script Error Load fail

Neither midigrid.lua nor mg_128 work on my apc mini. Down to a single error, however, which is

SCRIPT ERROR: load fail

/home/we/dust/code/midigrid/lib/midigrid.lua:240: attempt to index a nil value (global 'caps')
stack traceback:
/home/we/norns/lua/core/norns.lua:126: in metamethod '__index'
/home/we/dust/code/midigrid/lib/midigrid.lua:240: in method 'refresh'
/home/we/dust/code/midigrid/lib/midigrid.lua:107: in field 'connect'
/home/we/dust/code/awake/awake.lua:45: in main chunk
[C]: in function 'dofile'
/home/we/norns/lua/core/script.lua:159: in function </home/we/norns/lua/core/script.lua:159>

Any help appreciated.

sysex function errors

I'm trying to see if i can make a device profile for my livid block (or eventually OhmRGB)

I copied apc mini to start off

I get errors on start:

midigrid.lua line 201
_brightness_to_buffer(note, vel, config:all_led_sysex(vel))

throw an error since the all_led_sysex function does not exist.

how does this work for the apc mini?

Do midigrid:all(brightness) and midigrid:led(col, row, brightness) need a check for sysex before trying to do those all_led_sysex and led_sysex functions?

Thoughts on OOP redesign, leveraging norns grid API

@miker2049, @jaggednz, @timm052; PTAL
cc @catfact, @ryanlaws

What I had in mind was e.g.

├── lib
│   ├── mg_128.lua
│   ├── mg_256.lua
│   ├── mg_64.lua
│   └── midigrid.lua

where midigrid.lua contains only code common to all grid sizes.

This starts to suggest an OOP appproach, with midigrid.lua containing a midigrid ABC, mg_64.lua containing a 64-key child class, etc.

Having looked at @okyeron's oscgrid, very specifically oscgrid.lua, it occured to me that we might be able to similarly leverage the existing norns grid API for the implementation.

I don't know that I have the Lua know-how (or unfortunately the time) right now to do the design work, but I'm certainly willing to talk about it, and pick up coding tasks which might come out of this.

Per script colour profiles

The current colour profiles for the rgb devices work to varying degrees depending on the script having the ability to set a colour profile to use in the script would allow specific profiles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.