{"id":20823037,"url":"https://github.com/madskjeldgaard/nvim-supercollider-piano","last_synced_at":"2025-05-07T16:47:13.945Z","repository":{"id":112975168,"uuid":"398896344","full_name":"madskjeldgaard/nvim-supercollider-piano","owner":"madskjeldgaard","description":"Play SuperCollider synths using your (computer) keyboard in neovim!","archived":false,"fork":false,"pushed_at":"2024-05-15T08:27:17.000Z","size":9,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-16T06:37:44.786Z","etag":null,"topics":["neovim","supercollider"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madskjeldgaard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-08-22T20:40:09.000Z","updated_at":"2024-06-08T15:02:24.000Z","dependencies_parsed_at":"2023-03-13T13:23:52.162Z","dependency_job_id":null,"html_url":"https://github.com/madskjeldgaard/nvim-supercollider-piano","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madskjeldgaard%2Fnvim-supercollider-piano","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madskjeldgaard%2Fnvim-supercollider-piano/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madskjeldgaard%2Fnvim-supercollider-piano/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madskjeldgaard%2Fnvim-supercollider-piano/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madskjeldgaard","download_url":"https://codeload.github.com/madskjeldgaard/nvim-supercollider-piano/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225096534,"owners_count":17420293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","supercollider"],"created_at":"2024-11-17T22:17:08.330Z","updated_at":"2024-11-17T22:17:08.825Z","avatar_url":"https://github.com/madskjeldgaard.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SuperCollider Piano for NeoVim\n\nThis plugin emulates the functionality found in digital audio work stations such as Ableton where a user may select a synth and press they computer keyboard's keys to play the synth. Except, this is a million times more cool because it is NeoVim and SuperCollider.\n\n## Requirements\n\n- Nvim \u003e= v0.7\n- [scnvim](https://github.com/davidgranstrom/scnvim)\n\n## Installation\n\n* Using [packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse { 'madskjeldgaard/nvim-supercollider-piano' }\n```\n\n* Using [vim-plug](https://github.com/junegunn/vim-plug)\n\n```vim\nPlug 'madskjeldgaard/nvim-supercollider-piano'\n```\n\nLoad the extension **after** the call to `scnvim.setup`.\n\n```lua\nscnvim.setup{...}\n\nscnvim.load_extension('piano')\n```\n\n## Usage\n\nPlay your chosen synthdef\n\n```vim\n:SCNvimExt piano.play\n```\nPlay a particular midinote (33)\n\n```vim\n:SCNvimExt piano.play 33\n```\nOptionally, you can use a particular duration in the command as well (`0.75` in this case):\n\n```vim\n:SCNvimExt piano.play 63 0.75\n```\nThis uses the `\\default` synth by default. To use your own, make a SynthDef:\n\n```supercollider\nSynthDef(\\mycoolsynth,{|out=0, amp=0.5, freq=444|\n    var sig = SinOsc.ar(freq) * Env.perc.kr(gate:1);\n    Out.ar(out, sig)\n}).add\n```\nThen set it as the SynthDef used by piano (note that the forward slash in `\\mycoolsynth` and/or the single quotes in `'mycoolsynth'` are removed when you call it in the set command):\n\n```vim\n:SCNvimExt piano.set mycoolsynth\n```\n\nNow, the synth being used is `\\mycoolsynth`:\n\n```vim\n:SCNvimExt piano.play 33\n```\n\nYou can use piano.midi to play arbitrary MIDIdefs.\u003cbr /\u003e\nArguments are: midinote duration channel.\n\n```vim\n:SCNvimExt piano.midi 48 0.5 0\n```\n\nExample mapping of F5\n\n```vim\nvim.keymap.set(\"n\", \"\u003cF5\u003e\", \":SCNvimExt piano.midi 48 0.5 0\u003cCR\u003e\")\n\n```\n\nExample MIDIdefs in SuperCollider\n\n```supercollider\nMIDIdef.noteOn(\\myNoteOn, {\n\t|vel,num,chan|\n\t(\"on \" ++ [num,chan]).postln;\n});\nMIDIdef.noteOff(\\myNoteOff, {\n\t|vel,num,chan|\n\t(\"off \" ++ [num,chan]).postln;\n});\n```\n\n## Configuration\n\nThe extension will receive its own configuration as well as the user config. It\nis acceptable to modify the user config if necessary, and some extensions might\nonly be a \"preset\" of a user config.\n\nThe extension's own configuration is defined in the table given to `scnvim.setup`.\n\n```lua\nscnvim.setup{\n  extensions = {\n    piano = {\n      default_synth = [['mycoolsynth']]\n      note_dur = 0.5\n    },\n  },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadskjeldgaard%2Fnvim-supercollider-piano","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadskjeldgaard%2Fnvim-supercollider-piano","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadskjeldgaard%2Fnvim-supercollider-piano/lists"}