{"id":13610098,"url":"https://github.com/Gwion/Gwion","last_synced_at":"2025-04-12T22:32:47.581Z","repository":{"id":37809910,"uuid":"69284662","full_name":"Gwion/Gwion","owner":"Gwion","description":":musical_note: strongly-timed musical programming language","archived":false,"fork":false,"pushed_at":"2025-02-10T23:10:02.000Z","size":29358,"stargazers_count":544,"open_issues_count":1,"forks_count":44,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-02-11T00:22:40.067Z","etag":null,"topics":["audio","chuck","compiler","composition","hacktoberfest","interpreter","lang","language","music","programming-language","real-time","realtime-audio","sound","synth","synthesis"],"latest_commit_sha":null,"homepage":"https://Gwion.github.io/Gwion","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/Gwion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"License.txt","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["fennecdjay"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2016-09-26T19:21:17.000Z","updated_at":"2025-02-10T23:09:16.000Z","dependencies_parsed_at":"2024-08-01T19:43:52.305Z","dependency_job_id":"2c7482e2-3e08-41a5-afbe-bb91ee506e77","html_url":"https://github.com/Gwion/Gwion","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gwion%2FGwion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gwion%2FGwion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gwion%2FGwion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gwion%2FGwion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gwion","download_url":"https://codeload.github.com/Gwion/Gwion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248641353,"owners_count":21138189,"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":["audio","chuck","compiler","composition","hacktoberfest","interpreter","lang","language","music","programming-language","real-time","realtime-audio","sound","synth","synthesis"],"created_at":"2024-08-01T19:01:41.175Z","updated_at":"2025-04-12T22:32:46.774Z","avatar_url":"https://github.com/Gwion.png","language":"C","funding_links":["https://github.com/sponsors/fennecdjay"],"categories":["Uncategorized","Music Programming","Languages","Environments","Other"],"sub_categories":["Uncategorized"],"readme":"# Gwion\n\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2417/badge)](https://bestpractices.coreinfrastructure.org/projects/2417)\n[![Coverage](https://raw.githubusercontent.com/Gwion/gwion-coverage-report/master/badge.svg?sanitize=true)](https://gwion.github.io/gwion-coverage-report/master)\n[![Line Count](https://tokei.rs/b1/github/Gwion/Gwion)](https://github.com/Gwion/Gwion)\n![Linux](https://github.com/Gwion/Gwion/workflows/Linux/badge.svg)\n![MacOs](https://github.com/Gwion/Gwion/workflows/MacOs/badge.svg)\n![Windows](https://github.com/Gwion/Gwion/workflows/Windows/badge.svg)\n\nGwion is a programming language, aimed at making music\n\n\n\n\u003cimg src=\".img/gwion_bear-transparent-up.webp\" \n     height=\"500\" \n     alt = \"Bran the musical wizard grizzly bear casting spell with a wand\" /\u003e \u003c Bran, our mascot, kindly provided by [neverRare](https://github.com/neverRare)  \n\n\n**strongly** inspired by [ChucK](http://chuck.stanford.edu/), but adding a bunch of *high-level* features, \n\t  templating, first-class functions and more.  \n\nIt aims to be simple, small,\n [fast](https://Gwion.github.io/Gwion/#Benchmarks/),\n [extendable](https://github.com/Gwion/Gwion-plug) and [embeddable](https://github.com/Gwion/Gwion/blob/master/src/main.c#L18-L31).\n\nCheckout the community, and join us on discord: https://discord.gg/KmHqbTKSmS.\nYou can also check this very nice server about programming language devlopment: https://discord.gg/4Kjt3ZE,\nsince a lot of improvements to gwion are discussed there.\n\nPlease also consider taking the (WIP) [*tour*](https://github.com/Gwion/GwionTour) \n\n## Build\n### Download the source\n\n``` sh\ngit clone --recursive https://github.com/Gwion/Gwion\ncd Gwion\nmake\n```\n\n### Configuring (optional)\nYou can get a list of config files to tweak with\n``` sh\nfind . -name \"config.mk\"\n```\n\nPlease rebuild to take your change into account.\n```\nmake -C util clean\nmake -C ast  clean\nmake clean\nmake\n```\n\n\u003e Besides developer options, you migth want to check *USE_DOUBLE*, in util/config.mk, which set the floating point size (float or double).\n\u003e Note that the option you choose must match how you built your soundpipe library (more on soundpipe later).\n\n## Nix - Install\n\nTo get started with Gwion, use the provided default.nix file.\n\nNavigate to the main Gwion repository.\nEnter the following command:\n\n```bash\nnix-env -if default.nix\n```\n\nThis should install Gwion. \n\nAfterwards, you can run the Gwion Interpreter with the following command:\n\n```bash\ngwion \u003cfile\u003e\n```\n\nThe default.nix file includes a fixed commit hash. If you prefer to utilize the latest version, you'll need to update the commit hash accordingly. Here's how:\n\n- Go to the Gwion repository on GitHub.\n- Locate the commit hash of the latest version you want to use.\n- Update the commit hash in the default.nix file to match the desired version.\n- Save the changes.\n- Re-run the installation command mentioned earlier to install the updated version of Gwion.\n\n## Executing your first code (hello_world.gw):\n\nThis assumes you have successfully compiled gwion. To build follow [these steps](#build) . To check, if the build was successfully run\n```\n./gwion\n```\nif this gives out some error, there were problems with your compilation.\nTry building again, and open a [issue](https://github.com/Gwion/Gwion/issues)\nif the problem persists. We would love to help you out.  \nIf you see no errors, Congratulations!! You have successfully compiled gwion, and can move ahead.\n\nCreate a new file \"hello_world.gw\" in the same directory.(You are free to use any command)\n```\ntouch hello_world.gw\n```\n\nOpen this file using your favourite text editor\n```\nvim hello_world.gw\n```\n\nAdd the following lines to print \"Hello World\" (Note the semicolon at the end)\n```\n\u003c\u003c\u003c \"Hello World\" \u003e\u003e\u003e;\n```\n\nSave and exit the file(:wq in vim). Use the following command to run your first gwion program\n```sh\n./gwion hello_world.gw\n```\nCongratulations!! You ran your first gwion program.\n\n## Making Sound\n\n_This section is currently very Linux-centric. We are working to improve that. Pull requests welcome!_\n\nGwion relies on plugins for most of its language features, including all those that make sound. Plugins are located in the subdirectories of\n`plug`. To get some sounds going under linux using jack sound server, you can build the plugins `Jack`, `Soundpipe`, and `Modules`. Make sure you have Jack installed.\n\nStart by downloading the sources\n```\ngit submodule update plug\ncd plug\n```\n\nStarting from the Gwion base directory, to build `Jack`:\n```\ncd plug/Jack\nmake\n```\nThis will give you a shared object file, `Jack.so`. The default place Gwion will look for plugins is in a subdir of your home directory \nnamed `.gwplug`. So create that directory and move `Jack.so` there:\n```\nmkdir ~/.gwplug\nmv Jack.so ~/.gwplug\n```\nRepeat for the other plugins mentioned. The `Soundpipe` plugin requires the [gwion-soundpipe](https://github.com/Gwion/gwion-soundpipe) library, which we hope to have build seamlessly for you when you build the `Soundpipe` module, but we're not quite there yet. For now, please clone gwion-soundpipe in the Soundpipe plugin directory `plug/Soundpipe`. Please ask for help if this isn't working.\n\nWhen all those plugin `.so` files are in your `~/.gwplug` directory, you should be able to run a Gwion program that makes sound! In `plug/Modules` there's a `test.gw` program which plays a sine wave for 5 seconds. If the `gwion` you built is still in the base dir of your cloned repo, from the\n`plug/Modules` subdirectory you should be able to run `../../gwion -d Jack test.gw` and hear some sound!\n\n## Installation\n\nIt's a good idea to install Gwion now that you have tried it out. Use the following command to install it:\n```\nsudo make install\n```\n\nTo confirm Gwion can make sound, update `hello_world.gw` to:\n\n```\n#import Modules\n\n\u003c\u003c\u003c\"Sound from Gwion!\"\u003e\u003e\u003e;\n\nnew SinOsc ~\u003e dac;\n\n5::second =\u003e now;\n```\n\nTo run it with Jack as the driver: `gwion hello_world.gw -dJack`. Hopefully you will hear a smooth sine wave. If not, please reach out on Discord and we'll help you out.\n\n## Documentation\n\nRun gwion with the --cdoc flag and it will show you everything that Gwion has to offer. Like so: \n\n`gwion --cdoc --color=always | less -R` \n\nOnline documentation is a work in progress :construction_worker: You can [view it here](https://Gwion.github.io/Gwion/). Please consider contributing 🙂 \n\nthere is another site with [samples](https://gwion.github.io/GwionSamples/)\n\nIf you need help with anything just [talk to us on Discord](https://discord.gg/KmHqbTKSmS). In general the audio programming community is very friendly and the people involved with Gwion are no exception.\n\n## Contributing / Reporting bugs\n\n:+1: Every helping hand is welcome!!! :+1:  \n\nIf there's anything you see that can make Gwion better, please let us know!\n\n:book: Please see the [contributing](.github/CONTRIBUTING.md) page for more information.\n\n## Acknowledgements.\nThe whole [Chuck](http://chuck.cs.princeton.edu/) team, for inspiration.  \n[Paul Batchelor](https://github.com/PaulBatchelor) and the awesome [soundpipe](https://github.com/PaulBatchelor/Soundpipe) library, that got me started.\nnot to forget these wonderful people ([emoji key](https://gwion.github.io/Gwion/Contributing/Contributors.html)):\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGwion%2FGwion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGwion%2FGwion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGwion%2FGwion/lists"}