{"id":21570392,"url":"https://github.com/arirusso/nibbler","last_synced_at":"2025-04-10T14:12:43.742Z","repository":{"id":1445218,"uuid":"1676242","full_name":"arirusso/nibbler","owner":"arirusso","description":"Ruby MIDI message parser","archived":false,"fork":false,"pushed_at":"2023-02-05T22:20:49.000Z","size":165,"stargazers_count":22,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T12:56:20.573Z","etag":null,"topics":["midi","midi-messages","midi-parser","music","nibbles","parser","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arirusso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-28T15:03:33.000Z","updated_at":"2024-12-03T18:42:16.000Z","dependencies_parsed_at":"2023-02-19T02:15:56.335Z","dependency_job_id":null,"html_url":"https://github.com/arirusso/nibbler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fnibbler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fnibbler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fnibbler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fnibbler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arirusso","download_url":"https://codeload.github.com/arirusso/nibbler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248232687,"owners_count":21069489,"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":["midi","midi-messages","midi-parser","music","nibbles","parser","ruby"],"created_at":"2024-11-24T11:12:31.181Z","updated_at":"2025-04-10T14:12:43.722Z","avatar_url":"https://github.com/arirusso.png","language":"Ruby","readme":"# Nibbler\n\n![nibbler](http://i.imgur.com/4BFZPJY.png)\n\nParse MIDI Messages\n\n## Install\n\n`gem install midi-nibbler`\n\nor using Bundler, add this to your Gemfile\n\n`gem 'midi-nibbler'`\n\n## Usage\n\n```ruby\nrequire 'nibbler'\n\nnibbler = Nibbler.new\n```\n\nEnter a MIDI message represented as string bytes\n\n```ruby\nnibbler.parse('904064')\n\n  =\u003e #\u003cMIDIMessage::NoteOn:0x98c9818\n        @channel=0,\n        @data=[64, 100],\n        @name=\"C3\",\n        @note=64,\n        @status=[9, 0],\n        @velocity=100,\n        @verbose_name=\"Note On: C3\"\u003e\n```\n\nEnter a message byte by byte\n\n```ruby\nnibbler.parse('90')\n  =\u003e nil\n\nnibbler.parse('40')\n  =\u003e nil\n\nnibbler.parse('64')\n  =\u003e #\u003cMIDIMessage::NoteOn:0x98c9818\n       @channel=0,\n       @data=[64, 100],\n       @name=\"C3\",\n       @note=64,\n       @status=[9, 0],\n       @velocity=100,\n       @verbose_name=\"Note On: C3\"\u003e\n```\n\nUse numeric bytes\n\n```ruby\nnibbler.parse(0x90, 0x40, 0x64)\n  =\u003e #\u003cMIDIMessage::NoteOn:0x98c9818 ...\u003e\n```\n\nYou can enter nibbles in string format\n\n```ruby\nnibbler.parse('9', '0', '4', '0', '6', '4')\n  =\u003e #\u003cMIDIMessage::NoteOn:0x98c9818 ...\u003e\n```\n\nInterchange the different types\n\n```ruby\nnibbler.parse('9', '0', 0x40, 100)\n  =\u003e #\u003cMIDIMessage::NoteOn:0x98c9818 ...\u003e\n```\n\nUse running status\n\n```ruby\nnibbler.parse(0x40, 100)\n  =\u003e #\u003cMIDIMessage::NoteOn:0x98c9818 ...\u003e\n```\n\nLook at the messages we've parsed so far\n\n```ruby\nnibbler.messages\n  =\u003e [#\u003cMIDIMessage::NoteOn:0x98c9804 ...\u003e\n      #\u003cMIDIMessage::NoteOn:0x98c9811 ...\u003e]\n```\n\nAdd an incomplete message\n\n```ruby\nnibbler.parse('9')\nnibbler.parse('40')\n```\n\nSee progress\n\n```ruby\nnibbler.buffer\n  =\u003e [\"9\", \"4\", \"0\"]\n\nnibbler.buffer_s\n  =\u003e \"940\"\n```\n\nPass in a timestamp\n\n```ruby\nnibbler.parse('904064', timestamp: Time.now.to_i)\n  =\u003e { :messages=\u003e #\u003cMIDIMessage::NoteOn:0x92f4564 ..\u003e, :timestamp=\u003e1304488440 }\n```\n\nNibbler defaults to generate [midi-message](http://github.com/arirusso/midi-message) objects, but it's also possible to use [midilib](https://github.com/jimm/midilib)\n\n```ruby\nNibbler.new(message_lib: :midilib)\n\nnibbler.parse('9', '0', 0x40, '40')\n  =\u003e \"0: ch 00 on 40 40\"\n```\n\n## Also see\n\n* [midi-eye](http://github.com/arirusso/midi-eye), a MIDI event listener based on nibbler\n\n## Author\n\n* [Ari Russo](http://github.com/arirusso) \u003cari.russo at gmail.com\u003e\n\n## License\n\nApache 2.0, See the file LICENSE\n\nCopyright (c) 2011-2022 Ari Russo\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farirusso%2Fnibbler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farirusso%2Fnibbler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farirusso%2Fnibbler/lists"}