{"id":13928723,"url":"https://github.com/arximboldi/mixco","last_synced_at":"2025-05-09T01:24:02.754Z","repository":{"id":32656776,"uuid":"36244208","full_name":"arximboldi/mixco","owner":"arximboldi","description":"Mixco is a framework for creating hardware controller scripts for the amazing Mixxx DJ software","archived":false,"fork":false,"pushed_at":"2020-06-11T10:50:26.000Z","size":1337,"stargazers_count":33,"open_issues_count":6,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-17T15:51:32.123Z","etag":null,"topics":["coffeescript","dj","javascript","korg-nanokontrol","literate-programming","mixxx","nodejs"],"latest_commit_sha":null,"homepage":"http://sinusoid.es/mixco","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arximboldi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"arximboldi","patreon":"sinusoidal","custom":["paypal.me/sinusoidal","sinusoid.al"]}},"created_at":"2015-05-25T17:18:00.000Z","updated_at":"2025-01-24T12:47:40.000Z","dependencies_parsed_at":"2022-08-26T18:12:13.683Z","dependency_job_id":null,"html_url":"https://github.com/arximboldi/mixco","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arximboldi%2Fmixco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arximboldi%2Fmixco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arximboldi%2Fmixco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arximboldi%2Fmixco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arximboldi","download_url":"https://codeload.github.com/arximboldi/mixco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253172379,"owners_count":21865506,"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":["coffeescript","dj","javascript","korg-nanokontrol","literate-programming","mixxx","nodejs"],"created_at":"2024-08-07T18:01:28.114Z","updated_at":"2025-05-09T01:24:02.725Z","avatar_url":"https://github.com/arximboldi.png","language":"CoffeeScript","funding_links":["https://github.com/sponsors/arximboldi","https://patreon.com/sinusoidal","paypal.me/sinusoidal","sinusoid.al"],"categories":["nodejs"],"sub_categories":[],"readme":"mixco\n=====\n\n[**Mixco**][mixco] is a framework for creating hardware\n[controller scripts][scripts] for the amazing [Mixxx][mixxx] DJ\nsoftware.  It makes the process **easier** and **faster**, and\nresulting scripts are often more **robust**, ready to be rock big\nparties.\n\nAnd remember, this is [Free Software][gnu].\n\n  [scripts]: http://mixxx.org/wiki/doku.php/midi_scripting\n  [gnu]: http://www.gnu.org/philosophy/free-sw.html\n  [mixxx]: http://www.mixxx.org\n  [lcs]: http://coffeescript.org/#literate\n  [mixco]: http://sinusoid.es/mixco\n\n\u003ca href=\"http://badge.fury.io/js/mixco\"\u003e\u003cimg src=\"https://badge.fury.io/js/mixco.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/arximboldi/mixco\"\u003e\u003cimg src=\"https://travis-ci.org/arximboldi/mixco.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/r/arximboldi/mixco\"\u003e\u003cimg src=\"https://coveralls.io/repos/arximboldi/mixco/badge.svg\"/\u003e\u003c/a\u003e\n\nInstallation\n------------\n\nMixco is based on the [NodeJS][nodejs] JavaScript development\nenvironment so, first, you need to [install it][nodedown].  Then, just\nrun in the command line:\n\n\u003e ```\n\u003e npm install -g mixco\n\u003e ```\n\nYou can also [browse the code on Github][github].\n\n  [github]: http://github.com/arximboldi/mixco\n  [nodejs]: http://nodejs.org/\n  [nodedown]: http://nodejs.org/download\n\nExamples\n--------\n\nMixco comes with a series of factory controller scripts.  They are\nwell documented and their code serves as good tutorial on how to use\nthe framework.\n\n  - [Novation Twitch][script.novation_twitch]\n  - [Korg Nanokontrol 2][script.korg_nanokontrol2]\n  - [M-Audio Xponent][script.maudio_xponent]\n\nTo **install** these, run on the command line:\n\n\u003e ```\n\u003e mixco --factory\n\u003e ```\n\n  [script.korg_nanokontrol2]: http://sinusoid.es/mixco/script/korg_nanokontrol2.mixco.html\n  [script.maudio_xponent]: http://sinusoid.es/mixco/script/maudio_xponent.mixco.html\n  [script.novation_twitch]: http://sinusoid.es/mixco/script/novation_twitch.mixco.html\n\nFeatures\n--------\n\n#### Write more high level code\n\nThe programming interface is very [fluent][fluent] and\n[declarative][declarative], allowing you to write more high level\ncode. For example, imagine this feature: *when the sync button aligns\nthe phase or not depending on whether the shift button is pressed*.\nWhile normally this would involve quite a few lines of code detecting\nwhether shift is pressed, controlling the lights of the buttons, and\nso on, With Mixco this can be written simply as:\n\n```js\nvar mixco = require('mixco')\nvar c = mixco.controls\nvar b = mixco.behaviours\n\n// ... in your script constructor ...\n    var shift = b.modifier()\n    c.control(c.noteIds(0x01, 0))\n        .does (shift)\n    c.control(c.noteIds(0x02, 0))\n        .when (shift, \"[Channel1]\", \"beatsync_tempo\")\n        .else_(       \"[Channel1]\", \"beatsync\")\n```\n\n#### No editing XML files\n\nNormally, Mixxx requires that you describe every MIDI message that\nyour controller can receive in [a verbose XML file][xmlspec].  Mixco\ngenerates this file for you from your JavaScript file, so you can\nfocus on adding cool features to your mapping.\n\n  [xmlspec]: http://mixxx.org/wiki/doku.php/midi_controller_mapping_file_format\n\n#### No duplicate per-deck code\n\nMost DJ oriented MIDI controllers are mostly symmetric, with controls\nduplicated per deck.  Since we don't need a XML mapping, you can avoid\nduplicating the code: just write a function that defines the\nfunctionality for one deck, and call it several times.  For an\nexample, look at the `addDeck()` function of\n[this tutorial script][script.novation_twitch].\n\n#### Use external libraries and modularize your code\n\nIf your script is big and complicated, you can split it into multiple\nfiles to make it easier to maintain, by using the `require()`\nfunction.  Even cooler, most libraries installed with `npm`, the\n[NodeJS package manager][npm], work out of the box.  Mixco will\ncompile your script into a single bundle that Mixxx can use and is\neasy to redistribute. For example:\n\n```js\n// file: my-utils.js\nexports.doSomething = function() { ... }\n```\n\n```js\n// file: my-script.mixco.js\n// importing the framework\nvar mixco = require('mixco')\n// using a external library: https://www.npmjs.com/package/underscore\nvar _ = require('underscore')\n// Using custom module\nvar utils = require('./my-utils')\nutils.doSomething()\n```\n\n#### Automatically test your code\n\nIn JavaScript, it is easy to make tiny mistake that break your code.\nMixco can run some basic tests on your scripts, so some simple\nproblems can be found before even loading it into Mixxx.\n\nAlso, Mixco be run in **watch mode**: whenever you change your script,\nit will re-run the tests and, when successful, recompile the script so\nit's reloaded inside Mixxx.\n\n#### Use languages different from JavaScript\n\nIf you are like me, you don't like JavaScript so much.  Mixco supports\n[CoffeeScript][coffee], a nice language with syntax inspired by Python\nand Ruby that polishes some of the rough corners of JavaScript.  Mixco\ncan automatically compile CoffeeScript script to JavaScript and, in\nthe future, other languages too.\n\n#### Generate beautiful documentation\n\nDocumenting a script is hard but important: otherwise your users are\nclue-less about what each button of the controller does.  Mixco\nencourages a style of programming known as\n[literate programming][litprog], which mixes code with documentation\nabout what it does.  If you code in that style, it can generate\nbeautiful [web pages like this][script.novation_twitch], that teach\nyour users not only what the script does, but also what code they\nshould is creating that functionality, encouraging people to improve\nthe scripts and create their own mods.\n\n  [npm]: https://www.npmjs.com/\n  [litprog]: https://en.wikipedia.org/wiki/Literate_programming\n  [declarative]: http://en.wikipedia.org/wiki/Declarative_programming\n  [fluent]: http://en.wikipedia.org/wiki/Fluent_interface\n  [lcs]: http://coffeescript.org/#literate\n  [coffee]: http://coffeescript.org/\n  [script.korg_nanokontrol2]: http://sinusoid.es/mixco/script/korg_nanokontrol2.mixco.html\n  [script.maudio_xponent]: http://sinusoid.es/mixco/script/maudio_xponent.mixco.html\n  [script.novation_twitch]: http://sinusoid.es/mixco/script/novation_twitch.mixco.html\n\nUsage\n-----\n\nMixco comes with a program called, ehem, **mixco**, that compiles all\nthe scripts in the current directory to a form that can be used inside\nMixxx.  Try this by creating a file `my_script.mixco.js` and run this\nin the same folder:\n\n\u003e ```\n\u003e mixco\n\u003e ```\n\n\u003e ```\n\u003e info:    inputs: .\n\u003e info:    output directory: mixco-output\n\u003e info:    generated: \u003c...\u003e/mixco-output/my_script.mixco.output.js\n\u003e info:    generated: \u003c...\u003e/mixco-output/my_script.mixco.output.midi.xml\n\u003e ```\n\nMixco can `watch` the filesystem so you don't need to re-run the\ncommand whenever you change the script.  It can also automatically run\ntests on it and copy the script to some location, so Mixxx can see it.\nFor example, if you are on Linux, you might want to run the command\nlike this:\n\n\u003e ```\n\u003e mixco --watch --test -o /usr/share/mixxx/controllers\n\u003e ```\n\nThe **mixco** command can do much more:\n\n\u003e ```\n\u003e mixco --help\n\u003e\n\u003e Usage:\n\u003e        mixco [options] [\u003cinput\u003e...]\n\u003e\n\u003e Mixco is a framework for making DJ controller scripts for Mixxx.\n\u003e\n\u003e This program can compile all the \u003cinput\u003e Mixco scripts into .js and .xml files\n\u003e that can be used inside Mixxx. Mixco scripts have one of the following\n\u003e extensions: *.mixco.js, *.mixco.coffee, *.mixco.litcoffee. When no \u003cinput\u003e is\n\u003e passed, it will compile all scripts in the current directory. When an \u003cinput\u003e is\n\u003e a directory, all scripts found in it will be compiled.\n\u003e\n\u003e Options:\n\u003e   -o, --output=PATH           Directory where to put the generated files\n\u003e                                 Default: mixco-output\n\u003e   -r, --recursive             Recursively look for scripts in input directories\n\u003e   -w, --watch                 Watch scripts for changes and recompile them\n\u003e   -T, --self-test             Test the framework before compilation\n\u003e   -t, --test                  Test the input scripts before compilation\n\u003e       --factory               Compile the scripts that come with Mixco\n\u003e   -h, --help                  Display this help message and exit\n\u003e   -V, --verbose               Print more output\n\u003e   -v, --version               Output version information and exit\n\u003e\n\u003e More info and bug reports at: \u003chttp://sinusoid.es/mixco\u003e\n\u003e ```\n\nDocumentation\n-------------\n\n### Scripts\n\n  * [script.korg_nanokontrol2][script.korg_nanokontrol2]\n  * [script.maudio_xponent][script.maudio_xponent]\n  * [script.novation_twitch][script.novation_twitch]\n\n### API\n\n  * [mixco.behaviour][mixco.behaviour]\n  * [mixco.cli][mixco.cli]\n  * [mixco.control][mixco.control]\n  * [mixco.console][mixco.console]\n  * [mixco.script][mixco.script]\n  * [mixco.transform][mixco.transform]\n  * [mixco.util][mixco.util]\n  * [mixco.value][mixco.value]\n\n### Tests\n\n  * [spec.mixco.behaviour][spec.mixco.behaviour]\n  * [spec.mixco.control][spec.mixco.control]\n  * [spec.mixco.script][spec.mixco.script]\n  * [spec.mixco.value][spec.mixco.value]\n  * [spec.mock][spec.mock]\n  * [spec.scripts][spec.scripts]\n\n  [script.korg_nanokontrol2]: http://sinusoid.es/mixco/script/korg_nanokontrol2.mixco.html\n  [script.maudio_xponent]: http://sinusoid.es/mixco/script/maudio_xponent.mixco.html\n  [script.novation_twitch]: http://sinusoid.es/mixco/script/novation_twitch.mixco.html\n\n  [mixco.behaviour]: http://sinusoid.es/mixco/src/behaviour.html\n  [mixco.cli]: http://sinusoid.es/mixco/src/cli.html\n  [mixco.control]: http://sinusoid.es/mixco/src/control.html\n  [mixco.console]: http://sinusoid.es/mixco/src/console.html\n  [mixco.script]: http://sinusoid.es/mixco/src/script.html\n  [mixco.transform]: http://sinusoid.es/mixco/src/transform.html\n  [mixco.util]: http://sinusoid.es/mixco/src/util.html\n  [mixco.value]: http://sinusoid.es/mixco/src/value.html\n\n  [spec.mixco.behaviour]: http://sinusoid.es/mixco/spec/mixco/behaviour.spec.html\n  [spec.mixco.control]: http://sinusoid.es/mixco/spec/mixco/control.spec.html\n  [spec.mixco.script]: http://sinusoid.es/mixco/spec/mixco/script.spec.html\n  [spec.mixco.value]: http://sinusoid.es/mixco/spec/mixco/value.spec.html\n  [spec.mock]: http://sinusoid.es/mixco/spec/mock.html\n  [spec.scripts]: http://sinusoid.es/mixco/spec/scripts.spec.html\n\nContributing\n------------\n\nPlease, log **bugs, questions or feature requests** in the\n[Github issue tracker][issues].\n\nWe are also **happy to accept contributions**, either improvements to the\nframeworks, new factory scripts or documentation\nenhancements. [Fork us on GitHub][github] or by running:\n\n\u003e ```\n\u003e git clone https://github.com/arximboldi/mixco.git\n\u003e ```\n\nYou can also **contact me** by email at: `raskolnikov@gnu.org`.\n\n  [github]: http://github.com/arximboldi/mixco\n  [issues]: http://github.com/arximboldi/mixco/issues\n\nLicense\n-------\n\n\u003e  Copyright (C) 2013, 2015 Juan Pedro Bolívar Puente\n\u003e\n\u003e  This program is free software: you can redistribute it and/or\n\u003e  modify it under the terms of the GNU General Public License as\n\u003e  published by the Free Software Foundation, either version 3 of the\n\u003e  License, or (at your option) any later version.\n\u003e\n\u003e  This program is distributed in the hope that it will be useful,\n\u003e  but WITHOUT ANY WARRANTY; without even the implied warranty of\n\u003e  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\u003e  GNU General Public License for more details.\n\u003e\n\u003e  You should have received a copy of the GNU General Public License\n\u003e  along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farximboldi%2Fmixco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farximboldi%2Fmixco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farximboldi%2Fmixco/lists"}