{"id":30032036,"url":"https://github.com/brunorns/samplegenerator","last_synced_at":"2025-08-11T02:02:49.046Z","repository":{"id":308233960,"uuid":"1032097441","full_name":"BrunoRNS/SampleGenerator","owner":"BrunoRNS","description":"Generate 800 Hz UInt8 Audio Samples to use in limited sistems.","archived":false,"fork":false,"pushed_at":"2025-08-04T20:00:39.000Z","size":174,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-04T22:54:02.881Z","etag":null,"topics":["audio","audio-player","audio-processing","impulsetracker","instrument","julia","julia-language","julialang","lightweight","make","makefile","python","python3","riff","riff-wave","sample","sound","wave","waveform"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/BrunoRNS.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,"zenodo":null}},"created_at":"2025-08-04T19:57:10.000Z","updated_at":"2025-08-04T20:27:05.000Z","dependencies_parsed_at":"2025-08-04T22:54:11.245Z","dependency_job_id":"d9927842-f4f3-4fa1-971f-49c5be1c11fb","html_url":"https://github.com/BrunoRNS/SampleGenerator","commit_stats":null,"previous_names":["brunorns/samplegenerator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BrunoRNS/SampleGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoRNS%2FSampleGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoRNS%2FSampleGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoRNS%2FSampleGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoRNS%2FSampleGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrunoRNS","download_url":"https://codeload.github.com/BrunoRNS/SampleGenerator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoRNS%2FSampleGenerator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269819032,"owners_count":24480087,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","audio-player","audio-processing","impulsetracker","instrument","julia","julia-language","julialang","lightweight","make","makefile","python","python3","riff","riff-wave","sample","sound","wave","waveform"],"created_at":"2025-08-06T21:01:21.540Z","updated_at":"2025-08-11T02:02:48.945Z","avatar_url":"https://github.com/BrunoRNS.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SampleGenerator\n\nSampleGenerator is a cross-language toolchain for generating lightweight audio samples (WAV and MIDI) suitable for use with the SNES SPC700 sound processor. It automates the creation, validation, and playback of simple musical notes and waveforms, making it easier to produce and test samples for retro game development or hardware emulation.\n\n## Project Goal\n\nThe main goal of SampleGenerator is to generate minimalistic audio samples (MIDI and WAV) that are compatible with the technical constraints of the SNES SPC700 processor. This includes:\n\n- **Low sample rate (800 Hz)**\n- **8-bit unsigned PCM WAV files**\n- **Simple waveforms (square, triangle, sine)**\n- **Single-note MIDI files for conversion**\n\nThis toolchain helps composers, developers, and enthusiasts quickly create and validate samples for SNES music and sound effects.\n\n## Features\n\n- Automatic MIDI note generation (Python)\n- Conversion of MIDI notes to WAV files (Julia)\n- Custom RIFF header construction for WAV files\n- Waveform synthesis: square, triangle, sine\n- Validation of WAV files for SPC700 compatibility\n- Playback of generated samples for quick testing\n- Cross-language build and test automation via Makefile\n\n## Directory Structure\n\n```sh\nSampleGenerator/\n├── midi-samples/           # Generated MIDI files\n├── wave-samples/           # Generated WAV files\n├── src/\n│   ├── generateNote/       # Python MIDI generator\n│   └── generateWave/       # Julia WAV generator\n├── tests/\n│   ├── checkWAVE/          # Julia WAV validator\n│   ├── playWAVE/           # Julia WAV player\n│   └── playMIDI/           # Python MIDI player\n├── Makefile                # Main build/run/test automation\n├── Makefile.build          # Build rules\n├── Makefile.clean          # Clean rules\n├── Makefile.tests          # Test rules\n└── README.md               # This file\n```\n\n## Requirements\n\nBefore running the project, install the following tools:\n\n- **Python 3.12+**\n- **Julia 1.11+**\n- **GNU Make**\n- **Timidity** (optional, for MIDI playback: [timidity GitHub](https://github.com/erikdubbelboer/timidity))\n\n## Installation\n\n1. **Install prerequisites:**\n\n    On Debian/Ubuntu:\n\n    ```sh\n    sudo apt update\n    sudo apt install python3 python3-venv julia make\n    # Optional for MIDI playback\n    sudo apt install timidity\n    ```\n\n    On RedHat/Fedora:\n\n    ```sh\n    sudo dnf install python3 python3-virtualenv julia make\n    # Optional for MIDI playback\n    sudo dnf install timidity\n    ```\n\n    On Arch/Manjaro:\n\n    ```sh\n    sudo pacman -S python julia make python-virtualenv\n    # Optional for MIDI playback\n    sudo pacman -S timidity++\n    ```\n\n    On Alpine Linux:\n\n    ```sh\n    sudo apk update\n    sudo apk add python3 py3-virtualenv julia make\n    # Optional for MIDI playback\n    sudo apk add timidity\n    ```\n\n    On Mandriva:\n\n    ```sh\n    sudo urpmi python3 python3-virtualenv julia make\n    # Optional for MIDI playback\n    sudo urpmi timidity\n    ```\n\n    Or download Timidity from [the official repository](https://github.com/erikdubbelboer/timidity).\n\n2. **Clone the repository:**\n\n    ```sh\n    git clone https://github.com/BrunoRNS/SampleGenerator.git\n    cd SampleGenerator\n    ```\n\n3. **Install all dependencies and set up environments:**\n\n    ```sh\n    make all\n    ```\n\n    This will automatically download and install all required Python and Julia packages for you.\n\n## Usage\n\n### 0. **Get The Samples**\n\nYou can find the generated samples in the `wave-samples/` and `midi-samples/` directories, if you want to use any of them you can just copy them to your workspace :smiley:\n\n### 1. **Generate All Samples**\n\nRun the full pipeline (build environments, clean old samples, generate new ones):\n\n```sh\nmake run\n```\n\nThis will:\n\n- Build Python and Julia environments\n- Clean previous samples\n- Generate MIDI notes (Python)\n- Convert MIDI notes to WAV files (Julia)\n- Output samples to `midi-samples/` and `wave-samples/`\n\n### 2. **Test and Validate Samples**\n\nRun all tests (play and validate samples):\n\n```sh\nmake test\n```\n\n- **Check WAV properties:** Ensures WAV files are 8-bit unsigned, 800 Hz, RIFF format\n- **Play WAV files:** Listen to generated samples (Julia)\n- **Play MIDI files:** Listen to generated MIDI notes (Python)\n\n### 3. **Clean Environments and Samples**\n\nRemove all generated environments and sample files:\n\n```sh\nmake clean\n```\n\n## For SNES Developers\n\nThe generated WAV files are designed to be as lightweight as possible for use with SNES tools and SPC700 sample conversion utilities and also in Impulse Tracker. You can use these files directly with SNES music engines or further process them for your workflow.\n\n## License\n\nThis project is licensed under the [GNU GPL v3](LICENSE.txt).\n\n## References\n\n- [MIDI.jl](https://github.com/JuliaMusic/MIDI.jl)\n- [WAV.jl](https://github.com/danielmatz/WAV.jl)\n- [musicpy](https://github.com/lucianzw/musicpy)\n- [pygame](https://www.pygame.org/)\n- [Timidity](https://github.com/erikdubbelboer/timidity)\n\n---\n\nMade with ❤️ by [BrunoRNS](https://github.com/BrunoRNS).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunorns%2Fsamplegenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunorns%2Fsamplegenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunorns%2Fsamplegenerator/lists"}