{"id":22859954,"url":"https://github.com/reelyactive/midiot","last_synced_at":"2025-04-30T17:46:20.347Z","repository":{"id":23303691,"uuid":"26663156","full_name":"reelyactive/midiot","owner":"reelyactive","description":"MIDI meets IoT: real-time, real-world sounds.  We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2024-09-26T15:10:06.000Z","size":1121,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-17T15:30:00.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.youtube.com/playlist?list=PL11WqaPQMVvNMT66MVxi-XqIQld6zY3tx","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reelyactive.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":"2014-11-15T00:06:31.000Z","updated_at":"2022-06-18T17:33:10.000Z","dependencies_parsed_at":"2022-08-20T00:00:21.810Z","dependency_job_id":null,"html_url":"https://github.com/reelyactive/midiot","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/reelyactive%2Fmidiot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fmidiot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fmidiot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fmidiot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/midiot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251754238,"owners_count":21638481,"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-12-13T09:08:31.847Z","updated_at":"2025-04-30T17:46:20.314Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"midiot\n======\n\n\nMIDI events from low-power wireless traffic\n-------------------------------------------\n\nConverts real-time wireless traffic (Bluetooth Smart, Active RFID) into MIDI notes _and_ OSC messages.  The key of the note is determined by the transmitter's identifier and the velocity of the note is determined by the RSSI (proximity).  Additional parameters can be adjusted live through a web browser, for instance:\n- key\n- duration\n- channel\n- real-time triggering (via [barnowl](https://www.npmjs.com/package/barnowl))\n- periodic triggering (via [barnacles](https://www.npmjs.com/package/barnacles))\n- role (instrument, controller, tap tempo)\n- audio (samples played in-browser)\n\n![midiot screenshot](http://reelyactive.com/images/midiot-screenshot.png)\n\n\nWhat's in a name?\n-----------------\n\nMusical Instrument Digital Interface of Things.  MIDI meets IoT: real-time, real-world sounds.  Watch [this video playlist](https://youtu.be/CUhbfyi2ab4?list=PL11WqaPQMVvNMT66MVxi-XqIQld6zY3tx) to see, and hear, midiot in action.  There are also plenty of midiot-generated tracks on the [reelyActive SoundCloud](https://soundcloud.com/reelyactive).\n\n\nInstallation\n------------\n\n    npm install midiot\n\nIf the installation encounters errors while installing the [midi](https://www.npmjs.com/package/midi) package dependency, consult that package's [prerequisites](https://www.npmjs.com/package/midi#prerequisites).  For instance, on Linux it is often necessary to first install the libasound2-dev package via your package manager.\n\n\nHello midiot\n------------\n\nRun the following code to output two MIDI notes per second (without requiring any hardware):\n\n```javascript\nvar midiot = require('midiot');\nvar barnowl = require('barnowl');\nvar barnacles = require('barnacles');\n\nvar middleware = new barnowl();\nvar notifications = new barnacles();\nvar soundscape = new midiot();\n\nmiddleware.bind( { protocol: 'test', path: 'default' } );\nnotifications.bind( { barnowl: middleware } );\nsoundscape.bind( { barnowl: middleware } );\nsoundscape.bind( { barnacles: notifications } );\n\nconsole.log(soundscape.getPorts()); // This will list available MIDI ports,\nsoundscape.openPort(0);             //   update the number if necessary\n```\n\nPoint your browser to [localhost:3006/midiot.html](http://localhost:3006/midiot.html) to visualise and play with the settings in real time.\n\n\nNow let's make some reel beats\n------------------------------\n\nAdd a reelyActive [minimal starter kit](http://shop.reelyactive.com/products/starterkit-min) to capture real-time Bluetooth Smart traffic and generate some fat beats.  You'll need to install the serialport package:\n\n    npm install serialport\n\nThen start by running the following code which was used in [the demo video](https://www.youtube.com/watch?v=CUhbfyi2ab4).\n\n```javascript\nvar midiot = require('midiot');\nvar barnowl = require('barnowl');\nvar barnacles = require('barnacles');\n\nvar middleware = new barnowl( { n: 1,\n                                enableMixing: true,\n                                mixingDelayMilliseconds: 240,\n                                minMixingDelayMilliseconds: 120 } );\nvar notifications = new barnacles( { delayMilliseconds: 960,\n                                     minDelayMilliseconds: 960,\n                                     keepAliveMilliseconds: 4800,\n                                     includeTiraidInEvent: true } );\nvar soundscape = new midiot( { midiMap: \"alesisSR18\",\n                               channelMap: \"allOnZero\",\n                               defaultDuration: 120 } );\n\nmiddleware.bind( { protocol: 'serial', path: 'auto' } ); // See barnowl\nnotifications.bind( { barnowl: middleware } );\nsoundscape.bind( { barnowl: middleware } );\nsoundscape.bind( { barnacles: notifications } );\n\nconsole.log(soundscape.getPorts()); // This will list available MIDI ports,\nsoundscape.openPort(0);             //   update the number if necessary\n```\n\nAgain, point your browser to [localhost:3006/midiot.html](http://localhost:3006/midiot.html) to visualise and play with the settings in real time.  Then experiment with the various settings, for instance:\n- adjust midiMap to set the range of key values to which the transmitter identifiers are mapped: (\"cMaj\", \"cMin\", ..., \"alesisSR18\", \"allNotes\")\n- adjust channelMap to set the range of channel values to which the transmitter identifiers are mapped: (\"allOnZero\", \"allChannels\", \"allButFifteen\")\n- adjust the defaultDuration (in milliseconds) to set the default length of the notes\n- adjust mixingDelayMilliseconds to set the minimum period between two successive real-time notes from the same transmitter\n- adjust minMixingDelayMilliseconds to set the interval at which real-time notes will be emitted (this helps enormously to create consistent rhythms)\n- adjust delayMilliseconds and minDelayMilliseconds similar to the above but for periodic notes\n- adjust keepAliveMilliseconds to set the minimum period between two successive periodic notes from the same transmitter\n\n\nOptions\n-------\n\nThe following options are supported when instantiating midiot (those shown are the defaults):\n\n    {\n      oscLocalAddress: \"127.0.0.1\",\n      oscLocalPort: 57121,\n      oscTargetAddress: \"127.0.0.1\",\n      oscTargetPort: 57121,\n      midiMap: \"cMaj\",\n      channelMap: \"allOnOne\",\n      defaultDuration: 60,\n      defaultOn: { realTime: true, periodic: false }\n    }\n\n\nAcknowledgements\n----------------\n\nThanks to [Robin Cerutti for](http://robincerutti.com/#/profile) his collaboration on the original idea, and to [Evelyne Drouin](http://djmini.com/), [Olivier Lalonde](http://musicmotion.technology/about/) and [Claude Jr Belizaire](http://humanlevel.io/founder/) of the [beatr.org](http://beatr.org) team at [WearHacks 2015](https://montreal.wearhacks.com) for their creative direction of the project which won the \"Most entertaining\" and \"Coup de Coeur\" awards.\n\n\nWhat's next?\n------------\n\nThis is an active work in progress.  Expect regular changes and updates, as well as improved documentation!\n\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2014-2019 reelyActive\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fmidiot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Fmidiot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fmidiot/lists"}