{"id":18695767,"url":"https://github.com/kgujral2612/simplysynth","last_synced_at":"2025-08-26T15:16:08.101Z","repository":{"id":117215461,"uuid":"504298341","full_name":"kgujral2612/SimplySynth","owner":"kgujral2612","description":"A simplistic synthesizer in Python","archived":false,"fork":false,"pushed_at":"2023-03-11T20:29:17.000Z","size":187368,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T03:26:37.753Z","etag":null,"topics":["mido","python","synthesizer"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kgujral2612.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":"2022-06-16T20:34:28.000Z","updated_at":"2024-05-21T01:40:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbcf3aec-949b-45d1-83e8-6822b8883b6f","html_url":"https://github.com/kgujral2612/SimplySynth","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/kgujral2612%2FSimplySynth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgujral2612%2FSimplySynth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgujral2612%2FSimplySynth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgujral2612%2FSimplySynth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kgujral2612","download_url":"https://codeload.github.com/kgujral2612/SimplySynth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239558910,"owners_count":19658927,"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":["mido","python","synthesizer"],"created_at":"2024-11-07T11:16:05.861Z","updated_at":"2025-02-18T21:45:35.502Z","avatar_url":"https://github.com/kgujral2612.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimplySynth\n\nImplementation of a simplistic synthesizer in Python\n\u003cbr /\u003e\u003cbr /\u003e\n\u003cimg src=\"Files/Images/homescreen.JPG\" alt=\"main-page\" width=\"400\"/\u003e\n\u003cimg src=\"Files/Images/mode1screen.JPG\" alt=\"model-screen\" width=\"400\"/\u003e\n## How it went\nOur vision was to build a synthesizer that bears some fundamental characteristics and is also fun to play with. We divided the tasks between the two of us and parallely began working on different pieces in a bottom-up fashion.\u003cbr /\u003e\u003cbr /\u003e\nFirst, we created sine, square, sawtooth and triangle oscillators and tested those using notes fed from a text file. Having tested the waveforms, we were excited to use MIDI file inputs. One of the most intricate parts was reading the MIDI file and transforming it into a datastructure such that multiple notes may begin at the same time or overlapping intervals. Using additive synthesis, we combined multiple waves to deliver one coherent wave.\u003cbr /\u003e\u003cbr /\u003e\nFurthermore, we worked on adding effects, filters and envelopes to make the synthesized sound more real. Side by side, we studied about timbre of musical instruments and sound and attempted to synthesize those. We used audacity to compare our shots with sounds of real instruments and improved our attempts incrementally. We were ecstatic after creating the sound of an [oboe](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/blob/main/Files/wav%20files/savedrecording/silen_night_oboe.wav) and then implemented a [bell](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/blob/main/Files/wav%20files/savedrecording/bell-1.wav), [flute](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/blob/main/Files/wav%20files/savedrecording/notes-on-a-flute.wav) and [violin](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/blob/main/Files/wav%20files/savedrecording/harry_potter-violin.wav).\n\n\n## Division of responsibilities\nAll the tasks were accomplished through gitlab merge requests and thus can be verified here: [merged requests](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/merge_requests?scope=all\u0026state=merged)\n| | Tasks  |\n|---|---|\n| Harman | MIDI file input, envelopes, filters, Pygame GUI, flute  |\n|  Kaushambi |  Oscillators, additive synthesis, effects, user interface handler, oboe, bell |\n\n## Lessons learned\n\u003col\u003e\n\u003cli\u003eFrequency modulation was more difficult than we expected. We had not accounted for it in the beginning stages where we structured the code.\u003c/li\u003e\n\u003cli\u003eReal, natural sounds are beautifully imperfect- simulating the 'imperfectness' is challenging.\u003c/li\u003e\n\u003cli\u003eUsing Gitlab helped us manage the project.\u003c/li\u003e\n\u003c/ol\u003e\n\n\n## Compositions \nCheck out a few pre-recorded examples [here](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/tree/main/Files/wav%20files/savedrecording) or [here](https://gitlab.cecs.pdx.edu/sound-engineering/simplysynth/-/tree/main/Files/SimplySynthFinalDemo.mp4)\n\n ## Running the code\n Please install these libraries using the following bash command:\n ```bash\n pip install mido\n pip install numpy\n pip install soundaudio\n pip install scipy\n pip install pygame\n pip install pygame-gui\n pip install librosa\n ````\n\nLoad the GUI- Note: after typing the file name in the input box, press enter.\n```bash\npython synth.py\n```\nAlternatively, you could also run examples:\n```bash\npython examples.py\n```\n## Features\n### Modes\n\u003col\u003e\n\u003cli\u003eMode A: Input notes and corresponding duration in form of text files\u003c/li\u003e\n\u003cli\u003eMode B: MIDI input file\u003c/li\u003e\n\u003cli\u003eMode C: Aleatoric\u003c/li\u003e\n\u003c/ol\u003e\n\n### Options\n#### Wave Type\nSine, Square, Sawtooth, Triangle\nOboe, Flute, Bell\n\n#### Envelopes\nTrapezoidal, ADSR\n\n#### Effects\n\u003col\u003e\n  \u003cli\u003eWhite noise: random signal\u003c/li\u003e\n  \u003cli\u003eEnvironmental noise: a soothing background sound of forest at night\u003c/li\u003e\n  \u003cli\u003eTime Stretch: increases the duration of each note\u003c/li\u003e\n  \u003cli\u003ePitch Scaling: changes the pitch of the audio\u003c/li\u003e\n  \u003cli\u003eInverse Polarity: reverses the amplitude of the signal\u003c/li\u003e\n  \u003cli\u003eRandom Gain: increases the amplitude by some random value\u003c/li\u003e\n\u003c/ol\u003e\n\n### Filters\nLow-pass band\n\n## Known Issues\n- Unable to play midi files that don’t consistently contain a “note-off” message for every “note-on”\n- The GUI is not responsive which is why we suggest to use examples.py instead\n- ‘Click’ sound can be heard while playing some midi files\n- Selecting multiple options on a huge midi file is computationally expensive and takes more time\n- Aleatoric mode only plays for major notes\n- Violin is not in the GUI\n\n## Extensions\n\u003col\u003e\n\u003cli\u003eSimulate the sound of complex instruments such as the piano, guitar, etc\u003c/li\u003e\n\u003cli\u003eSimulate percussion instruments\u003c/li\u003e\n\u003c/ol\u003e\n\n## Authors\n- Harmandeep Singh\n- Kaushambi Gujral\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgujral2612%2Fsimplysynth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgujral2612%2Fsimplysynth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgujral2612%2Fsimplysynth/lists"}