{"action":"created","issue":{"url":"https://api.github.com/repos/monome/norns/issues/476","repository_url":"https://api.github.com/repos/monome/norns","labels_url":"https://api.github.com/repos/monome/norns/issues/476/labels{/name}","comments_url":"https://api.github.com/repos/monome/norns/issues/476/comments","events_url":"https://api.github.com/repos/monome/norns/issues/476/events","html_url":"https://github.com/monome/norns/pull/476","id":344599155,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTU3MDgy","number":476,"title":"midi subscribe/unsubscribe","user":{"login":"tehn","id":246896,"node_id":"MDQ6VXNlcjI0Njg5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/246896?v=4","gravatar_id":"","url":"https://api.github.com/users/tehn","html_url":"https://github.com/tehn","followers_url":"https://api.github.com/users/tehn/followers","following_url":"https://api.github.com/users/tehn/following{/other_user}","gists_url":"https://api.github.com/users/tehn/gists{/gist_id}","starred_url":"https://api.github.com/users/tehn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehn/subscriptions","organizations_url":"https://api.github.com/users/tehn/orgs","repos_url":"https://api.github.com/users/tehn/repos","events_url":"https://api.github.com/users/tehn/events{/privacy}","received_events_url":"https://api.github.com/users/tehn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-07-25T20:41:13Z","updated_at":"2018-07-31T15:26:30Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/monome/norns/pulls/476","html_url":"https://github.com/monome/norns/pull/476","diff_url":"https://github.com/monome/norns/pull/476.diff","patch_url":"https://github.com/monome/norns/pull/476.patch"},"body":"howto:\r\n\r\n```lua\r\nlocal op1 = midi.connect(\"OP-1 Midi Device\")\r\nop1.handler = function(data) print(data[1]) end\r\nop1.send{144,80,100}\r\n\r\nlocal function process_all(data) print(data[1]) end\r\nlocal all = midi.connect()\r\nall.handler = process_all\r\nall.send{144,80,100}\r\n\r\nall.send{type=\"note\", note=80, vel=100}\r\n```\r\n\r\n## todo\r\n\r\n- `midi.clear()` clears all callbacks. we might want to keep the menu-defined ones?\r\n- all existing/previous functionality maintained. not sure if we want to remove/change anything?"},"comment":{"url":"https://api.github.com/repos/monome/norns/issues/comments/409261986","html_url":"https://github.com/monome/norns/pull/476#issuecomment-409261986","issue_url":"https://api.github.com/repos/monome/norns/issues/476","id":409261986,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTI2MTk4Ng==","user":{"login":"TheTechnobear","id":4019664,"node_id":"MDQ6VXNlcjQwMTk2NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4019664?v=4","gravatar_id":"","url":"https://api.github.com/users/TheTechnobear","html_url":"https://github.com/TheTechnobear","followers_url":"https://api.github.com/users/TheTechnobear/followers","following_url":"https://api.github.com/users/TheTechnobear/following{/other_user}","gists_url":"https://api.github.com/users/TheTechnobear/gists{/gist_id}","starred_url":"https://api.github.com/users/TheTechnobear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheTechnobear/subscriptions","organizations_url":"https://api.github.com/users/TheTechnobear/orgs","repos_url":"https://api.github.com/users/TheTechnobear/repos","events_url":"https://api.github.com/users/TheTechnobear/events{/privacy}","received_events_url":"https://api.github.com/users/TheTechnobear/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T15:26:30Z","updated_at":"2018-07-31T15:26:30Z","author_association":"NONE","body":"is this approach assuming users are going to need to edit a script to reflect their midi devices?\r\nhow will they know easily what the names are, without doing some test code?\r\nthis doesn't seem very non-programmer friendly.\r\n\r\nhow about using a virtual /midi mapping approach?\r\n\r\nbasically scripts would refer to virtual devices (mididevice1..N)\r\nand in the norns setup, a user could assign their particular devices to mididevice1..N, this could all be menu driven, so musicians would not have to deal with code etc.\r\n(in practice mididevice1= primary, mididevice2= secondary)\r\n\r\nthis approach would also work for multiple devices with the same device name (as they have difference id) e.g. two launchpad grids.\r\n\r\n"}}
{"actor":{"display_login":"TheTechnobear"}}