{"id":17691477,"url":"https://github.com/mgsx-dev/pd-offline","last_synced_at":"2026-01-11T02:42:03.851Z","repository":{"id":82412296,"uuid":"49527197","full_name":"mgsx-dev/pd-offline","owner":"mgsx-dev","description":"Pure Data ruby wrapper for offline wave file generating and processing","archived":false,"fork":false,"pushed_at":"2017-03-15T12:15:17.000Z","size":2759,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-06T03:31:15.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Pure Data","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgsx-dev.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":"2016-01-12T20:32:46.000Z","updated_at":"2019-07-19T23:51:54.000Z","dependencies_parsed_at":"2023-06-15T14:00:37.207Z","dependency_job_id":null,"html_url":"https://github.com/mgsx-dev/pd-offline","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/mgsx-dev%2Fpd-offline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgsx-dev%2Fpd-offline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgsx-dev%2Fpd-offline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgsx-dev%2Fpd-offline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgsx-dev","download_url":"https://codeload.github.com/mgsx-dev/pd-offline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246386830,"owners_count":20768900,"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-10-24T12:08:52.072Z","updated_at":"2026-01-11T02:42:03.832Z","avatar_url":"https://github.com/mgsx-dev.png","language":"Pure Data","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nPd Offline is a simple libpd wrapper written in ruby to generate or process wave file with pure data patches. It is executed as fast as possible (depending on your processor), so you don't have to wait any audio playback. You don't need audio neither, so it could be used on headless (actually mic/speaker-less) environnement like remote server.\n\nIt also provides benchmarking tools (see [Benchmark your Pd patch](benchmark/README.md))\n\nThis project is based on libpd project (https://github.com/libpd/libpd).\n\nFollowing instructions are based on linux (ubuntu) but could be adapted for Windows and OSX\n\n# Setup\n\nwe need to install prerequists (ruby and bundler) :\n\n```\nsudo apt-get install ruby\ngem install bundler\n```\n\nclone pd-offline repository and install dependencies : \n\n```\ngit clone https://github.com/mgsx-dev/pd-offline\ncd pd-offline\nbundle install\ncd ..\n```\n\nFollowing steps on libpd project (https://github.com/libpd/libpd), we need to build libpd (here we build version 0.8.3) :\n\n```\ngit clone https://github.com/libpd/libpd.git\ncd libpd\ngit checkout 0.8.3\ngit submodule init\ngit submodule update\nmake EXTRA=true LOCALE=true\ncd ..\n```\n\nNote that EXTRA option enable pd externals build and LOCALE option fix a bug on Linux (and maybe other platform) about\nparsing float from pd patches (see https://github.com/libpd/libpd/issues/130).\n\nNow we have to copy libpd binary in pd-offline project. Following command works on Linux, you have to adapt binary name for other plaftorms : **libpd.dylib** on OSX, **libpd.dll** on windows.\n\n```\ncp libpd/libs/libpd.so pd-offline/libpd.so\n```\n\nSetup is OK now.\n\n# Update\n\nTo update libpd, update your local libpd clone, build again and copy native library to pd-offline as described\nin setup section.\n\nTo update pd-offline, update your local libpd clone (fetch and pull) and install/update dependencies as follow :\n\n```\ncd pd-offline\nbundle install\n```\n\nThat's it.\n\n# Tutorial\n\n## Generate sound\n\nWe first try pd-generate. It will generates a wave file (sample.wav in example directory) from a pure data patch (generate.pd in example directory). In this example, we generate a stereo file at 44100 Hz with a duration of 1.5 seconds which is the duration of the envelop in the example patch. So we will get a nice well formed sample.\n\n```\nruby pd-generate.rb example generate.pd example/sample.wav 2 44100 1.5\n```\n\n## Process sound\n\nNow, let's test the processor. It will generate a new wave file (sample2.wav in example directory) from the previous one by applying some effects from a second patch (process.pd in example directory). In this example, we generate a new wave file with the same format and length as the previous one.\n\n```\nruby pd-process.rb example process.pd example/sample.wav example/sample2.wav\n``` \n\n## Where to go\n\nJust have a look in examples pd patches, you will understand how it works. Fell free to modify them or create your own.\n\nNotes : \n* It's recommanded for process script that input wave file channels match patch channels mapping (from adc~ to dac~).\n* process script could handle any wave format : non pcm, non 16 bits, any sample rates, mono or more than 2 channels.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgsx-dev%2Fpd-offline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgsx-dev%2Fpd-offline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgsx-dev%2Fpd-offline/lists"}