{"id":21427872,"url":"https://github.com/avicted/hip_fm_synthesis","last_synced_at":"2025-03-16T21:24:37.839Z","repository":{"id":264055637,"uuid":"892222931","full_name":"Avicted/HIP_FM_Synthesis","owner":"Avicted","description":"This project demonstrates FM Synthesis (Frequency Modulation) using HIP (Heterogeneous Compute Interface), enabling high-performance sound generation on both AMD and NVIDIA GPUs.","archived":false,"fork":false,"pushed_at":"2024-11-27T21:15:47.000Z","size":2483,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T07:47:43.067Z","etag":null,"topics":["amd","audio-processing","cuda","fm-synthesis","hip","nvidia","rocm"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Avicted.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-21T18:08:16.000Z","updated_at":"2024-11-27T21:15:50.000Z","dependencies_parsed_at":"2024-11-21T19:21:43.303Z","dependency_job_id":"1b53978e-5e33-4135-b5f6-16bcca3db748","html_url":"https://github.com/Avicted/HIP_FM_Synthesis","commit_stats":null,"previous_names":["avicted/hip_fm_synthesis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2FHIP_FM_Synthesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2FHIP_FM_Synthesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2FHIP_FM_Synthesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2FHIP_FM_Synthesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avicted","download_url":"https://codeload.github.com/Avicted/HIP_FM_Synthesis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933784,"owners_count":20371062,"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":["amd","audio-processing","cuda","fm-synthesis","hip","nvidia","rocm"],"created_at":"2024-11-22T22:07:43.188Z","updated_at":"2025-03-16T21:24:37.813Z","avatar_url":"https://github.com/Avicted.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FM Synthesizer with HIP (ROCm and CUDA)\n\n- Work in progress.\n\nThis project demonstrates **FM Synthesis** (Frequency Modulation) using **HIP** (Heterogeneous Compute Interface), enabling high-performance sound generation on both AMD and NVIDIA GPUs.\n\n## Key Features\nFM Synthesis:\n\n - Implements basic **FM synthesis** to generate sounds by modulating one oscillator's frequency (carrier) using another oscillator (modulator).\n\n - Audio data is generated and then written to a .wav file for playback or further processing.\n\n - Supports 16, 24 and 32 -bit PCM Output at variable sample rates.\n\n - Multiple waveforms supported: Sine, Square, Triangle, Sawtooth.\n\n - Can read, parse and generate audio data from a MIDI file.\n\n## Dependencies\n - Ensure that your system supports HIP (either via AMD ROCm or via NVIDIA CUDA).\n - Make\n\n## Build and run\n```bash\ngit clone --recurse-submodules git@github.com:Avicted/HIP_FM_Synthesis.git\n\nmake all\nmake run\n```\n\n## Program Output\nThe following command generates a .wav file with a 1-second sound clip using the default parameters:\n```bash\n./build/Main\n        Hello from HIP!\n    HIP Device Count: 1\n    Device 0: AMD Radeon RX 6900 XT\n        Compute Capability: ------------ = 10.3\n        Total Global Memory: ----------- = 17163091968\n        Shared Memory per Block: ------- = 65536\n        Registers per Block: ----------- = 65536\n        Warp Size: --------------------- = 32\n        Max Threads per Block: --------- = 1024\n        Max Threads Dimension: --------- = (1024, 1024, 1024)\n        Max Grid Size: ----------------- = (2147483647, 65536, 65536)\n        Clock Rate: -------------------- = 2660000\n        Total Constant Memory: --------- = 2147483647\n        Multiprocessor Count: ---------- = 40\n        L2 Cache Size: ----------------- = 4194304\n        Max Threads per Multiprocessor:  = 2048\n        Unified Addressing: ------------ = 0\n        Memory Clock Rate: ------------- = 1000000\n        Memory Bus Width: -------------- = 256\n        Peak Memory Bandwidth: --------- = 64.000000\n\n        Number of HIP devices found: 1\n        Hello from HIP Kernel!\n        Memory Usage: 40 megabytes\n        Running FM Synthesis...\n\n        Launching kernel with 20625 blocks and 256 threads per block\n        Total number of threads: 5280000\n\n        Number of notes in Kernel 0: 1102\n        FM Synthesis completed!\n        Kernel execution time: 13.907 ms\n        WAV file written: output_16bit_48kHz.wav\n        Memory Usage: 0 megabytes\n```\n\n### Manually Convert .wav to .mp3\n```bash\nffmpeg -i output_32bit_48kHz.wav -vn -ar 44100 -ac 2 -b:a 192k output_demo.mp3\n```\n\n#### Example Audio Output\n\n![Audio](https://github.com/Avicted/HIP_FM_Synthesis/blob/main/output_demo.mp3)\n\n## License\nThis project is licensed under the MIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favicted%2Fhip_fm_synthesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favicted%2Fhip_fm_synthesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favicted%2Fhip_fm_synthesis/lists"}