{"id":18712153,"url":"https://github.com/arirusso/micromidi","last_synced_at":"2025-04-05T20:07:17.989Z","repository":{"id":56883538,"uuid":"2212093","full_name":"arirusso/micromidi","owner":"arirusso","description":"A Ruby DSL for MIDI","archived":false,"fork":false,"pushed_at":"2024-02-10T21:33:59.000Z","size":166,"stargazers_count":138,"open_issues_count":0,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T19:04:01.402Z","etag":null,"topics":[],"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-08-15T20:39:56.000Z","updated_at":"2024-06-15T18:04:57.000Z","dependencies_parsed_at":"2024-11-24T11:12:39.981Z","dependency_job_id":"7bbda364-29b6-4053-b4b0-d9c76511d570","html_url":"https://github.com/arirusso/micromidi","commit_stats":{"total_commits":277,"total_committers":3,"mean_commits":92.33333333333333,"dds":"0.18411552346570392","last_synced_commit":"1369a099f686f82c389dd96af409c7baca109c42"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fmicromidi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fmicromidi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fmicromidi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arirusso%2Fmicromidi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arirusso","download_url":"https://codeload.github.com/arirusso/micromidi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393569,"owners_count":20931812,"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":[],"created_at":"2024-11-07T12:40:52.378Z","updated_at":"2025-04-05T20:07:17.965Z","avatar_url":"https://github.com/arirusso.png","language":"Ruby","funding_links":[],"categories":["Ruby","Programming Languages"],"sub_categories":["Ruby"],"readme":"# MicroMIDI\n\nA Ruby DSL for MIDI\n\n![micromidi](http://img855.imageshack.us/img855/9804/midi.png)\n\n## Features\n\n* Cross-platform compatible using MRI or JRuby.\n* Simplified MIDI and Sysex message output\n* MIDI Thru, processing and custom input events\n* Optional shorthand for [live coding](http://en.wikipedia.org/wiki/Live_coding)\n\n## Installation\n\n`gem install micromidi`\n\nor using Bundler, add this to your Gemfile\n\n`gem \"micromidi\"`\n\nIf you're using Linux, the *libasound* and *libasound-dev* packages may be required\n\n## Usage\n\nHere's a quick example that plays some arpeggios\n\n```ruby\nrequire \"midi\"\n\n# prompt the user to select an input and output\n\n@input = UniMIDI::Input.gets\n@output = UniMIDI::Output.gets\n\nMIDI.using(@output) do\n\n  5.times do |oct|\n    octave oct\n    %w{C E G B}.each { |n| play n, 0.5 }\n  end\n\nend\n```\n\nThis next example filters outs notes if their octave is between 1 and 3.  All other messages are sent thru.  \n\nOutput is also printed to the console by passing `$stdout` as though it's a MIDI device\n\n```ruby\nMIDI.using(@input, @output, $stdout) do\n\n  thru_except :note { |msg| only(msg, :octave, (1..3)) }\n\n  join\n\nend\n```\n\nThis is the same example redone using shorthand aliases\n\n```ruby\nM(@input, @output) do\n\n  te :n { |m| only(m, :oct, (1..3)) }\n\n  j\n\nend\n```\n\nFinally, here is an example that maps some MIDI Control Change messages to SysEx\n\n```ruby\nMIDI.using(@input, @output) do\n\n  *@the_map =\n    [0x40, 0x7F, 0x00],\n    [0x41, 0x7F, 0x00],\n    [0x42, 0x7F, 0x00]\n\n  node :roland, :model_id =\u003e 0x42, :device_id =\u003e 0x10\n\n  receive :cc do |message|\n\n    command @the_map[message.index - 1], message.value\n\n  end\n\nend\n```\n\nHere are a few posts explaining each of the concepts used here in greater detail:\n\n* [Output](http://tx81z.blogspot.com/2011/08/micromidi-midi-messages-and-output.html)\n* [MIDI Thru and Processing](http://tx81z.blogspot.com/2011/08/micromidi-midi-thru-and-midi-processing.html)\n* [Binding Custom Input Events](http://tx81z.blogspot.com/2011/08/micromidi-custom-events.html)\n* [Shorthand](http://tx81z.blogspot.com/2011/08/micromidi-shorthand.html)\n* [Sysex](http://tx81z.blogspot.com/2011/09/generating-sysex-messages-with.html)\n* [Etc](http://tx81z.blogspot.com/2011/09/more-micromidi-tricks.html)\n\n## Documentation\n\n* [rdoc](http://rubydoc.info/github/arirusso/micromidi)\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-2015 Ari Russo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farirusso%2Fmicromidi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farirusso%2Fmicromidi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farirusso%2Fmicromidi/lists"}