{"id":24442585,"url":"https://github.com/sjlongland/polyphonic-synthesizer","last_synced_at":"2025-04-12T21:05:52.023Z","repository":{"id":62409993,"uuid":"86902929","full_name":"sjlongland/polyphonic-synthesizer","owner":"sjlongland","description":"Embedded polyphonic synthesizer for microcontrollers","archived":false,"fork":false,"pushed_at":"2017-04-01T09:57:33.000Z","size":18,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T21:05:47.628Z","etag":null,"topics":["embedded","microcontroller","music","synthesizer"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjlongland.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}},"created_at":"2017-04-01T09:39:19.000Z","updated_at":"2024-03-17T21:35:03.000Z","dependencies_parsed_at":"2022-11-01T12:31:42.809Z","dependency_job_id":null,"html_url":"https://github.com/sjlongland/polyphonic-synthesizer","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/sjlongland%2Fpolyphonic-synthesizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjlongland%2Fpolyphonic-synthesizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjlongland%2Fpolyphonic-synthesizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjlongland%2Fpolyphonic-synthesizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjlongland","download_url":"https://codeload.github.com/sjlongland/polyphonic-synthesizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631684,"owners_count":21136562,"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":["embedded","microcontroller","music","synthesizer"],"created_at":"2025-01-20T21:59:24.789Z","updated_at":"2025-04-12T21:05:51.985Z","avatar_url":"https://github.com/sjlongland.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Polyphonic Synthesizer\n======================\n\nThis project is intended to be a polyphonic synthesizer for use in\nembedded microcontrollers.  It features multi-voice synthesis for up to 16\nchannels, with channels outputting either a fixed DC offset, sinusoidal\noutput or whitenoise.\n\nThe phase or amplitude of one channel may be modulated by the output of\nanother channel, allowing for various effects.\n\nConfiguration\n=============\n\nThere are two ways to configure this library:\n\nUsing C preprocessor constants\n------------------------------\n\nThe following C preprocessor definitions should be defined in your project\n`Makefile`.\n\n* `_POLY_NUM_CHANNELS`: The number of polyphonic channels (voices) that\n  you wish to instantiate.  Each channel occupies 16 bytes.\n* `_POLY_FREQ`: The output sample rate for the polyphonic synthesizer in\n  Hz.\n\nUsing linker symbols\n--------------------\n\nAlternatively, these things can be decided at run-time.  Your application\nshould export the following symbols:\n\n* `const uint8_t poly_num_channels`: The number of polyphonic channels\n  currently configured.\n* `const uint16_t poly_freq`: The output sample rate for the polyphonic \n  synthesizer in Hz.\n* `const uint16_t poly_freq_max`: The maximum output frequency for the\n  polyphonic synthesizer.  This should be set to `poly_freq/2` (the\n  nyquist frequency).\n* `struct poly_voice_t poly_voice[]`: The array of voice channels.\n\nYou may declare functions using these symbols, or you may use linker\naliasing to expose variables/structures with alternate names.\n\nUsage\n=====\n\nGlobal structures\n-----------------\n\nA global counter, `poly_remain`, counts down the number of audio samples\nremaining before the next set of events are due to be loaded.  When this\nvariable reaches 0, you should start calling `poly_load` with new data or\ncall `poly_reset` to stop playback.\n\nFunctions\n---------\n\n`poly_reset` clears the state of the polyphonic synthesizer, cancelling\nany in-progress playback.  This should be done as part of your program\ninitialisation.\n\n`poly_load` is used to load in the next event.  Events are covered below.\n\n`poly_next` returns the next audio sample, or `0` if there is no more\naudio left to be played.\n\nEvents\n======\n\nThe structure of the event system is loosely based on ideas from the MIDI\nstandard.  Essentially, an \"event\" is a parameter change for a given\nchannel.\n\nEach event is represented by a 4-byte data structure, a `struct\npoly_evt_t` which has two fields, `flags` and `value`.  `poly.h` covers\neach of the events.  See the comments up the top of that file for detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjlongland%2Fpolyphonic-synthesizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjlongland%2Fpolyphonic-synthesizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjlongland%2Fpolyphonic-synthesizer/lists"}