{"id":29097348,"url":"https://github.com/capellax02/phonocardiogram","last_synced_at":"2026-06-17T23:31:17.749Z","repository":{"id":294488275,"uuid":"987122516","full_name":"CAPELLAX02/phonocardiogram","owner":"CAPELLAX02","description":"Multidisciplinary project related to the my university course, COM2044 Object Oriented Programming. A phonocardiogram is a representation of heart’s audio signal ploted against time.","archived":false,"fork":false,"pushed_at":"2025-05-22T19:46:45.000Z","size":275,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T17:26:07.057Z","etag":null,"topics":["java","javafx","object-oriented-programming"],"latest_commit_sha":null,"homepage":"","language":"Java","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/CAPELLAX02.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,"zenodo":null}},"created_at":"2025-05-20T15:53:29.000Z","updated_at":"2025-05-22T19:46:48.000Z","dependencies_parsed_at":"2025-05-20T17:33:45.699Z","dependency_job_id":"da262b3a-1bd7-4f47-9a64-5276985bbfa2","html_url":"https://github.com/CAPELLAX02/phonocardiogram","commit_stats":null,"previous_names":["capellax02/phonocardiogram"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CAPELLAX02/phonocardiogram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fphonocardiogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fphonocardiogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fphonocardiogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fphonocardiogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CAPELLAX02","download_url":"https://codeload.github.com/CAPELLAX02/phonocardiogram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fphonocardiogram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34470322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":["java","javafx","object-oriented-programming"],"created_at":"2025-06-28T13:41:30.199Z","updated_at":"2026-06-17T23:31:17.733Z","avatar_url":"https://github.com/CAPELLAX02.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phonocardiogram Monitor\n\nPhonocardiogram Monitor is a lightweight desktop tool that visualises heart‑sound signals and estimates the heart‑rate (BPM) in real‑time.  \nIt accepts **live microphone input** or **PCM WAV** files and displays a continuously scrolling phonocardiogram similar to a clinical bedside monitor.\n\n---\n\n## Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **Live capture** | Opens the first available audio input line (44.1 kHz or 48 kHz, mono or stereo) and starts processing immediately. |\n| **WAV playback** | 16‑bit / 24‑bit PCM WAV files are decoded and analysed while they play. |\n| **Adaptive waveform gain** | Automatic gain control keeps quiet recordings visible and prevents clipping on loud ones. |\n| **Real‑time BPM** | Peak detector with adaptive threshold, 350 ms refractory window and 4 s silence reset; stable within ±3 BPM on clean recordings. |\n| **Clear UI** | Scrollable waveform canvas, separate status and BPM labels, buttons for Load WAV, Mic/Pause, Play/Pause and Stop. |\n| **Pure Java** | Java 17 + JavaFX 24, Java‑Sound only – no native DSP libraries or platform‑specific code. |\n\n---\n\n## Requirements\n\n* **JDK 17 or newer**  \n  (JavaFX 24 requires JDK 22; JavaFX 21 works on JDK 17. Adjust the versions in `pom.xml` accordingly.)\n* A microphone or an electronic stethoscope plugged into the computer’s input jack.\n\n---\n\n## Building \u0026 Running\n\n```bash\n# compile and package\nmvn clean package\n\n# run the application\njava   --module-path $PATH_TO_FX/lib   --add-modules javafx.controls,javafx.fxml,javafx.media   -jar target/phonocardiogram-1.0-SNAPSHOT.jar\n```\n\nFor development convenience you can also start the GUI with:\n\n```bash\nmvn javafx:run\n```\n\n---\n\n## Project Structure\n\n```\nsrc\n └─ main\n     ├─ java\n     │   └─ com.au.pc\n     │        ├─ PhonocardiogramApplication  (JavaFX entry point)\n     │        ├─ ui\n     │        │    ├─ controller.MainController\n     │        │    ├─ view.WaveformCanvas\n     │        │    └─ util.UiUtils\n     │        ├─ service\n     │        │    ├─ AudioService\n     │        │    └─ SignalService\n     │        └─ core\n     │             ├─ audio  (AudioSource interface + Mic / WAV implementations)\n     │             └─ signal (SignalProcessor peak/BPM logic)\n     └─ resources\n          └─ ui/main.fxml\n```\n\n---\n\n## How the BPM Algorithm Works\n\n1. **RMS envelope** – a 90 % IIR filter tracks signal RMS, providing a local energy estimate.  \n2. **Adaptive threshold** – peaks are detected when |sample| \u003e RMS × 2.0.  \n3. **Refractory window** – subsequent peaks within 350 ms are ignored to prevent counting both S1 and S2 sounds.  \n4. **Sliding window** – only the last 10 peaks (≈ 8 s) are kept; after­ 4 s of silence the BPM resets to 0.  \n5. **BPM = 60·fs / mean‑interval** of those remaining peaks.\n\n---\n\n## Typical Workflow\n\n1. Connect the stethoscope or select a WAV recording.  \n2. Press **Mic / Pause** for live monitoring **or** **Load WAV → Play** for file analysis.  \n3. Observe the waveform and BPM read‑out.  \n4. Press **Stop** to end the current session.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapellax02%2Fphonocardiogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapellax02%2Fphonocardiogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapellax02%2Fphonocardiogram/lists"}