{"id":16985678,"url":"https://github.com/sinshu/odinysynth","last_synced_at":"2026-01-04T16:48:12.969Z","repository":{"id":153095501,"uuid":"624842843","full_name":"sinshu/odinysynth","owner":"sinshu","description":"A SoundFont MIDI synthesizer written in pure Odinlang","archived":false,"fork":false,"pushed_at":"2023-08-13T14:20:14.000Z","size":466,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T19:36:18.628Z","etag":null,"topics":["audio","meltysynth","midi","odin","odinlang","soundfont","synthesizer"],"latest_commit_sha":null,"homepage":"","language":"Odin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinshu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-04-07T11:49:31.000Z","updated_at":"2024-11-13T18:01:45.000Z","dependencies_parsed_at":"2025-01-26T19:32:20.609Z","dependency_job_id":"aa99cfdc-f3a4-43c3-b384-aa1294fc37dd","html_url":"https://github.com/sinshu/odinysynth","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/sinshu%2Fodinysynth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinshu%2Fodinysynth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinshu%2Fodinysynth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinshu%2Fodinysynth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinshu","download_url":"https://codeload.github.com/sinshu/odinysynth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244892225,"owners_count":20527411,"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","meltysynth","midi","odin","odinlang","soundfont","synthesizer"],"created_at":"2024-10-14T02:43:58.618Z","updated_at":"2026-01-04T16:48:12.942Z","avatar_url":"https://github.com/sinshu.png","language":"Odin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OdinySynth\n\nOdinySynth is a SoundFont MIDI synthesizer written in pure Odin, ported from [MeltySynth](https://github.com/sinshu/meltysynth).\n\n\n\n## Demo\n\nThis is a demo video to show the synthesizer running on [raylib](https://www.raylib.com/)'s audio stream in real-time.\n\nhttps://www.youtube.com/watch?v=edil47gQD1o\n\n[![Youtube video](https://img.youtube.com/vi/edil47gQD1o/0.jpg)](https://www.youtube.com/watch?v=edil47gQD1o)\n\n\n\n## Features\n\n* Suitable for both real-time and offline synthesis.\n* Support for standard MIDI files.\n* No dependencies other than the core library.\n\n\n\n## Examples\n\nAn example code to synthesize a simple chord:\n\n```odin\nusing odinysynth\n\n// Load the SoundFont.\nsoundfont, _ := new_soundfont(\"TimGM6mb.sf2\")\ndefer destroy(\u0026soundfont)\n\n// Create the synthesizer.\nsettings := new_synthesizer_settings(44100)\nsynthesizer, _ := new_synthesizer(\u0026soundfont, \u0026settings)\ndefer destroy(\u0026synthesizer)\n\n// Play some notes (middle C, E, G).\nnote_on(\u0026synthesizer, 0, 60, 100)\nnote_on(\u0026synthesizer, 0, 64, 100)\nnote_on(\u0026synthesizer, 0, 67, 100)\n\n// The output buffer (3 seconds).\nsample_count := 3 * settings.sample_rate\nleft := make([]f32, sample_count)\ndefer delete(left)\nright := make([]f32, sample_count)\ndefer delete(right)\n\n// Render the waveform.\nrender(\u0026synthesizer, left[:], right[:])\n```\n\nAnother example code to synthesize a MIDI file:\n\n```odin\nusing odinysynth\n\n// Load the SoundFont.\nsoundfont, _ := new_soundfont(\"TimGM6mb.sf2\")\ndefer destroy(\u0026soundfont)\n\n// Create the synthesizer.\nsettings := new_synthesizer_settings(44100)\nsynthesizer, _ := new_synthesizer(\u0026soundfont, \u0026settings)\ndefer destroy(\u0026synthesizer)\n\n// Load the MIDI file.\nmidi_file, _ := new_midi_file(\"flourish.mid\")\ndefer destroy(\u0026midi_file)\n\n// Create the sequencer.\nsequencer := new_midi_file_sequencer(\u0026synthesizer)\n\n// Play the MIDI file.\nplay(\u0026sequencer, \u0026midi_file, false)\n\n// The output buffer.\nsample_count := int(f64(settings.sample_rate) * get_length(\u0026midi_file))\nleft := make([]f32, sample_count)\ndefer delete(left)\nright := make([]f32, sample_count)\ndefer delete(right)\n\n// Render the waveform.\nrender(\u0026sequencer, left[:], right[:])\n```\n\n\n\n## Todo\n\n* __Wave synthesis__\n    - [x] SoundFont reader\n    - [x] Waveform generator\n    - [x] Envelope generator\n    - [x] Low-pass filter\n    - [x] Vibrato LFO\n    - [x] Modulation LFO\n* __MIDI message processing__\n    - [x] Note on/off\n    - [x] Bank selection\n    - [x] Modulation\n    - [x] Volume control\n    - [x] Pan\n    - [x] Expression\n    - [x] Hold pedal\n    - [x] Program change\n    - [x] Pitch bend\n    - [x] Tuning\n* __Effects__\n    - [ ] Reverb\n    - [ ] Chorus\n* __Other things__\n    - [x] Standard MIDI file support\n    - [x] Performace optimization\n\n\n\n## License\n\nOdinySynth is available under [the MIT license](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinshu%2Fodinysynth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinshu%2Fodinysynth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinshu%2Fodinysynth/lists"}