{"id":22205233,"url":"https://github.com/iljan/synth","last_synced_at":"2025-07-12T08:03:05.960Z","repository":{"id":94082334,"uuid":"275233543","full_name":"IljaN/synth","owner":"IljaN","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-25T23:53:12.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T03:04:23.457Z","etag":null,"topics":["dsl-syntax","functional","noise-generator","synthesizer"],"latest_commit_sha":null,"homepage":"","language":"Go","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/IljaN.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-26T19:36:28.000Z","updated_at":"2020-06-26T21:43:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"a76747dd-6d20-40bd-8a2c-3001a8bde18e","html_url":"https://github.com/IljaN/synth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IljaN/synth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IljaN%2Fsynth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IljaN%2Fsynth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IljaN%2Fsynth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IljaN%2Fsynth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IljaN","download_url":"https://codeload.github.com/IljaN/synth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IljaN%2Fsynth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264958576,"owners_count":23689031,"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":["dsl-syntax","functional","noise-generator","synthesizer"],"created_at":"2024-12-02T17:28:23.598Z","updated_at":"2025-07-12T08:03:05.924Z","avatar_url":"https://github.com/IljaN.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# synth\n\nDirty functional synthesizer DSL.\n\n```golang\ns := inst.New(48000, 16, 500000)\nout := s.Master(\n    // Mix two osc`s and pass the result trough a filter-chain\n    inst.Chain(\n        s.Mix(inst.OscOut(s.NewOsc(generator.Sine, 230)), inst.OscOut(s.NewOsc(generator.WhiteNoise, 330))),\n        filter.NewLPF(0.00110).Filter,\n        filter.NewDelayFilter(0.06, 0.03343, 0.05).Filter,\n    ),\n)\n\nif err := encoding.WriteWAV(\"sound.wav\", out, 16); err != nil {\n    log.Fatal(err)\n}\n\n```\n\n### Custom generator functions\n```golang\ns := inst.New(48000, 16, 500000)\nout := s.Master(\n    inst.OscOut(generator.NewOsc(func(x float64) float64 {\n        return 1.0 / math.SqrtPhi * x\n    }, 140, 16)),\n)\n\nif err := encoding.WriteWAV(\"sound.wav\", out, 16); err != nil {\n    log.Fatal(err)\n}\n\n// Visualize with ffplay\nffplay(\"sound.wav\", 48000)\n```\n\n### Lazy higher-order transformation\n```golang\ninst.Chain(\n    filter.NewDelayFilter(0.0533, 0.002, 0.002).Filter,\n    filter.NewFlangerFilter(0.053,0.03,0.2).Filter,\n    func(buf *audio.FloatBuffer) { /* Custom transform. */ })\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filjan%2Fsynth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filjan%2Fsynth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filjan%2Fsynth/lists"}