{"id":18098509,"url":"https://github.com/danieloneill/alsalist","last_synced_at":"2025-07-28T21:08:22.179Z","repository":{"id":89578005,"uuid":"131932422","full_name":"danieloneill/alsalist","owner":"danieloneill","description":"Very basic tool to scan ALSA sequencer devices and list clients/sources in an easily parseable way.","archived":false,"fork":false,"pushed_at":"2022-04-20T21:56:44.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T04:17:56.502Z","etag":null,"topics":["alsa","midi","sequencer"],"latest_commit_sha":null,"homepage":null,"language":"C","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/danieloneill.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":"2018-05-03T02:44:24.000Z","updated_at":"2022-02-25T01:14:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"71a2cee1-3d9d-4c33-b801-d6689af49b02","html_url":"https://github.com/danieloneill/alsalist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danieloneill/alsalist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Falsalist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Falsalist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Falsalist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Falsalist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieloneill","download_url":"https://codeload.github.com/danieloneill/alsalist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Falsalist/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585612,"owners_count":24111575,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alsa","midi","sequencer"],"created_at":"2024-10-31T20:11:34.460Z","updated_at":"2025-07-28T21:08:22.161Z","avatar_url":"https://github.com/danieloneill.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alsalist\nVery basic tool to scan ALSA sequencer devices and list clients/sources in an easily parseable way.\n\nI use this (instead of a BASH mess of \"aconnect -l\" and a pile of pipes) to automate connecting my DTX400k kit USB MIDI data to the output of a USB MIDI adapter.\n\n## Build\nYou'll need make, gcc, libasound2-dev, and pkg-config\n\n```\n$ cd alsalist\n$ make\n```\n\n## Usage\nI mean... you just run it, and it lists your alsa sequencer clients/ports in a line-by-line fashion.\n\nThe lines are in a \"\u0026lt;client id\u0026gt;:\u0026lt;source id\u0026gt; \u0026lt;client name\u0026gt; : \u0026lt;source name\u0026gt;\" format.\n\n```\n$ ./alsalist\n0:0 System : Timer\n0:1 System : Announce\n14:0 Midi Through : Midi Through Port-0\n$\n```\n\n## Example\nYou could do fun things with the help of a few basic Unix utilites and udev to automate connections. I do it by first creating a udev rules file to trigger my script to run whenever one of two devices are plugged in. (Well, also when they're unplugged, but whatever):\n\n\n### /etc/udev/rules.d/10-midi.rules\n```\n# The DTX USB device stuff:\nATTRS{idVendor}==\"0499\", ATTRS{idProduct}==\"7000\", RUN=\"/usr/local/bin/midi.sh\"\n\n# The USB cable stuff:\nATTRS{idVendor}==\"15ca\", ATTRS{idProduct}==\"1806\", RUN=\"/usr/local/bin/midi.sh\"\n```\n\nThe udev rules have that \"RUN\" thing that makes it try to run a script. Here's the script:\n\n### /usr/local/bin/midi.sh \n```\n#!/bin/bash\n\naconnect -x\n\nSOURCE=`/home/pi/alsalist/alsalist | grep DTX | awk '{print $1;}'`\nDEST=`/home/pi/alsalist/alsalist | grep \"MIDI Interface cable\" | awk '{print $1;}'`\n\naconnect $SOURCE $DEST\n```\n\nIn the above, the sequencer connections are flushed with \"aconnect -x\", then alsalist is called to fish out the \"client:source\" IDs of the appropriate things. In this case, my DTX input is being piped to my USB MIDI adapter's output.\n\nYou can find the idVendor and idProduct values for your hardware by running \"lsusb\" in a terminal, and you need to change what \"grep\" looks for to suit your device names (as seen in the output of alsalist when you run it by itself).\n\nThe script and udev rules are very basic and contain no error checking, but any errors that could happen would be harmless and when the conditions are appropriate (both devices connected) it should work as expected nonetheless.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieloneill%2Falsalist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieloneill%2Falsalist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieloneill%2Falsalist/lists"}