{"id":34881992,"url":"https://github.com/gespel/slang","last_synced_at":"2026-04-19T17:19:21.994Z","repository":{"id":243824216,"uuid":"813536137","full_name":"gespel/Slang","owner":"gespel","description":"Slang is a programming language focused on audio programming and multimedia systems. It aims to provide a precise and efficient environment for developing real-time audio applications and interactive media software.","archived":false,"fork":false,"pushed_at":"2026-03-02T19:44:42.000Z","size":740,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-02T23:11:41.895Z","etag":null,"topics":["audio","audio-processing","programming-language"],"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/gespel.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-11T09:14:05.000Z","updated_at":"2026-03-02T19:44:05.000Z","dependencies_parsed_at":"2026-01-17T13:12:11.880Z","dependency_job_id":null,"html_url":"https://github.com/gespel/Slang","commit_stats":null,"previous_names":["gespel/slang","phi-instruments/slang"],"tags_count":200,"template":false,"template_full_name":null,"purl":"pkg:github/gespel/Slang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespel%2FSlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespel%2FSlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespel%2FSlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespel%2FSlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gespel","download_url":"https://codeload.github.com/gespel/Slang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gespel%2FSlang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30149933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T16:58:46.102Z","status":"ssl_error","status_checked_at":"2026-03-05T16:58:45.706Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["audio","audio-processing","programming-language"],"created_at":"2025-12-26T02:18:30.206Z","updated_at":"2026-03-05T21:01:37.342Z","avatar_url":"https://github.com/gespel.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slang\n\nSlang is a lightweight, high-performance programming language designed for audio programming. It follows a buffer-driven computation model, where audio buffers are directly calculated or modified from within the code. Slang gets interpreted at runtime, making it suitable for embedded systems and real-time audio processing.\n\nSlang is widely adopted in embedded systems, particularly for writing firmware for Eurorack modules developed by PhiLabs. The entire Slang ecosystem is written in pure C with no external dependency, making it portable across virtually all platforms.\n\n\n## Features\n\n- Minimal and fast execution model  \n- Buffer-based signal processing  \n- Designed for embedded and real-time environments  \n- ANSI C based – portable and lightweight  \n- Used in professional modular synthesizer firmware\n- Interpreter integrates with C/C++ projects easily\n\n\n## Quickstart\n\nTo build and run the Slang interpreter:\n\n### Prerequisites\n\n- A C compiler (e.g., `gcc`, `clang`)\n- Meson\n- Optional: `sudo` (for installing system-wide)\n\n### Build Instructions\n\n```bash\n# Clone the repository (if not already done)\ngit clone https://github.com/gespel/Slang.git\ncd Slang\n\nmeson setup build\nninja -C build\n```\n### Run an Example\nOnce compiled, you can run a Slang example like this: \n```bash\n./slang examples/synths.slang\n```\n\n## Examples\n\nThe `examples/` directory includes several demo scripts to help you get started:\n\n- `basics.slang` – Basic syntax and operations\n- `functions.slang` – Function definitions and usage\n- `logic.slang` – Logical operations and control flow\n- `synths.slang` – Simple oscillator examples\n\n## Integrate Interpreter\nThe Slang interpreter can be very easily integrated into existing C/C++ projects.\nTo do that include the `slang-lib.h` header and link against the compiled Slang library at `build/libslang.so`. Here's a simple example of how to initialize the interpreter:\n\n```c\n#include \"slang-lib.h\"\n\nint main() {\n    char* p = \"x = 1 + 2; y = x * 3;\";\n    int length;\n\n    Token* tokens = tokenize(p, \u0026length);\n    SlangInterpreter* interpreter = createSlangInterpreter(tokens, length);\n    interpret(interpreter);\n    return 0;\n}\n```\nThe interpreter can be used to execute the language constructs defined in the Slang language. However, if audio processing is needed, the buffer core must be defined in the host application.\nThis can be achieved by defining the `SlangBufferCore` structure and passing the interpreter to it. This can be seen in the following example:\n```c\n#include \"slang-lib.h\"\n\nint main() {\n    char* p = \"x = 1 + 2; y = x * 3;\";\n    int length;\n\n    Token* tokens = tokenize(p, \u0026length);\n    SlangInterpreter* interpreter = createSlangInterpreter(tokens, length);\n\n    SlangBufferCore* sbc = createBufferCore(interpreter, 48000, 32);\n    \n    interpret(interpreter);\n    float* buf = renderBuffer(sbc);\n\n    return 0;\n}\n```\n## Platform Support\n\nSlang is known to work on:\n\n- Linux (x86_64, ARM)\n- macOS\n- Windows (via WSL)\n- Embedded systems (e.g., STM32 via cross-compilation, ESP32 with ESP-IDF)\n\n\n## License\n\nSlang is released under the [MIT License](LICENSE).\n\n\n## Contributing\n\nContributions are welcome!  \nFeel free to open a pull request or start a discussion in the issues section.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgespel%2Fslang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgespel%2Fslang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgespel%2Fslang/lists"}