{"id":21487325,"url":"https://github.com/dtinth/soundplayer","last_synced_at":"2025-10-13T09:31:56.495Z","repository":{"id":3146083,"uuid":"4175549","full_name":"dtinth/soundplayer","owner":"dtinth","description":"A simple sampled sound player written using FMOD Ex.","archived":false,"fork":false,"pushed_at":"2015-02-11T15:52:46.000Z","size":105,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T14:14:23.243Z","etag":null,"topics":["cpp","fmod"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtinth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-29T16:07:29.000Z","updated_at":"2021-09-16T21:40:17.000Z","dependencies_parsed_at":"2022-08-19T10:20:59.182Z","dependency_job_id":null,"html_url":"https://github.com/dtinth/soundplayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dtinth/soundplayer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtinth%2Fsoundplayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtinth%2Fsoundplayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtinth%2Fsoundplayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtinth%2Fsoundplayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtinth","download_url":"https://codeload.github.com/dtinth/soundplayer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtinth%2Fsoundplayer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014524,"owners_count":26085536,"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-10-13T02:00:06.723Z","response_time":61,"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":["cpp","fmod"],"created_at":"2024-11-23T13:28:11.917Z","updated_at":"2025-10-13T09:31:56.410Z","avatar_url":"https://github.com/dtinth.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"soundplayer\n===========\n\nA very simple sampled sound file player written using FMOD Ex library, so can play WAV, MP3, OGG, and a lot more. Communicates via standard input.\n\nSo to compile, compile with [FMOD Ex](http://www.fmod.org/).\n\n\nBuilding\n--------\n\nThe provided Makefile assumes that you put your FMOD Ex installation at `/opt/fmodex`.\n\n\nUsage\n-----\n\nThis app receives commands from the standard input, and log messages to standard error.\n\nAvailable commands are:\n\n* `s` - stops all playing sound\n* `lPATH` - loads the sample file at PATH but don't play it yet (won't load same file twice)\n* `pPATH` - plays the loaded sample file at PATH (or load if it isn't already loaded)\n* `vVOLUME` - sets the volume of the next sound to play (0.0 to 1.0, inclusive)\n\nExample usage:\n\n    l/home/dtinth/wav/wav01.wav\n    p/home/dtinth/wav/wav01.wav\n    p/home/dtinth/wav/wav02.wav\n    s\n    p/home/dtinth/wav/wav03.wav\n    s\n\n\nWhy\n---\n\nSo I can use it in other languages that requires playing sampled sound without fiddling to find a library that can play sounds well or\ntry to learn to write a wrapper around some library. For example, using this, I can quickly program my own sampler, as simple as:\n\n    var stdin = process.openStdin();\n    require('tty').setRawMode(true);\n\n    function soundplayer() {\n        var proc = require('child_process').spawn('/Users/dttvb/Projects/html5tnk/html5tnk/soundplayer');\n        return {\n            process: proc,\n            load: function(file) { proc.stdin.write('l' + file + '\\n'); },\n            play: function(file) { proc.stdin.write('p' + file + '\\n'); },\n            quit: function(file) { proc.stdin.end(); }\n        };\n    }\n\n    var p = soundplayer();\n    p.process.stderr.pipe(process.stderr);\n    p.process.stdout.pipe(process.stdout);\n    p.load('kick.wav');\n    p.load('hat.wav');\n    p.load('clap.wav');\n\n    process.stdin.on('keypress', function(chunk, key) {\n        if (key.name == 'q') { p.quit(); process.exit(0); }\n        if (key.name == 'd') p.play('kick.wav');\n        if (key.name == 'f') p.play('clap.wav');\n        if (key.name == 'j') p.play('clap.wav');\n        if (key.name == 'k') p.play('hat.wav');\n        console.log(key);\n    });                 \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtinth%2Fsoundplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtinth%2Fsoundplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtinth%2Fsoundplayer/lists"}