{"id":16688175,"url":"https://github.com/jstrait/clawhammer","last_synced_at":"2025-05-15T08:32:10.141Z","repository":{"id":473667,"uuid":"98794","full_name":"jstrait/clawhammer","owner":"jstrait","description":"Extract *.wav files from the *.hub format used by the Hammerhead drum machine.","archived":false,"fork":false,"pushed_at":"2018-10-16T18:53:52.000Z","size":110,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T05:51:14.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/jstrait.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-12-31T02:49:37.000Z","updated_at":"2024-12-22T21:45:54.000Z","dependencies_parsed_at":"2022-07-14T14:01:00.821Z","dependency_job_id":null,"html_url":"https://github.com/jstrait/clawhammer","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/jstrait%2Fclawhammer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Fclawhammer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Fclawhammer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Fclawhammer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstrait","download_url":"https://codeload.github.com/jstrait/clawhammer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254304641,"owners_count":22048446,"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":[],"created_at":"2024-10-12T15:27:08.238Z","updated_at":"2025-05-15T08:32:06.548Z","avatar_url":"https://github.com/jstrait.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"What Is It?\n===========\n\n[HammerHead](http://www.threechords.com/hammerhead/introduction.shtml) is an old drum machine for Windows. One of its features allows you to import new drum sounds using a file format called HUB. `clawhammer.rb` allows you to extract the sounds out of a HUB file into individual `*.wav` files. This allows you to use the sounds in modern programs like Logic or GarageBand.\n\nThe HUB file format was reverse-engineered using [FileInspector](http://github.com/jstrait/fileinspector/tree/master).\n\n\nUsage\n=====\n\n    ruby clawhammer.rb [path of HUB file]\n\nFor example:\n\n    ruby clawhammer.rb groove.hub\n\nThis will create six output files:\n\n    groove-1.wav\n    groove-2.wav\n    groove-3.wav\n    groove-4.wav\n    groove-5.wav\n    groove-6.wav\n\nClawhammer uses the [WaveFile gem](http://wavefilegem.com/) to create the output wave files. Therefore, you'll need to have this gem installed on your machine. To do so, run the following command:\n\n    gem install wavefile\n\nAbout the HUB Format\n====================\n\nThe HUB format is very simple. A HUB file contains 6 records, which represent each of the sounds stored in the file. Each record contains a header, followed by actual sample data.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003eHeader for Sound #1\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSound #1 Sample Data\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eHeader for Sound #2\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSound #2 Sample Data\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e...\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eHeader for Sound #6\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSound #6 Sample Data\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nEach header is 36 bytes, and has the following format:\n\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003cth\u003eBytes\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eData Format\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003e0:\u003c/td\u003e\n    \u003ctd\u003eLength of the HUB title, in bytes.\u003c/td\u003e\n    \u003ctd\u003eInteger. Signed or unsigned doesn't matter, since the maximum valid value is 30.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003e1-30:\u003c/td\u003e\n    \u003ctd\u003eHUB title. If HUB title is less than 30 characters, the extra bytes will be garbage. The title will be identical for each header.\u003c/td\u003e\n    \u003ctd\u003e1-byte ASCII characters\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003e31-34:\u003c/td\u003e\n    \u003ctd\u003eLength of the sound's sample data, in bytes.\u003c/td\u003e\n    \u003ctd\u003eUnsigned, little-endian\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n    \u003ctd\u003e35:\u003c/td\u003e\n    \u003ctd\u003eFlag for whether sound should be stretched to fill a full measure when played in HammerHead. (For example, a drum loop). Ignored by Clawhammer.\u003c/td\u003e\n    \u003ctd\u003e0x01 for true, 0x00 for false\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nThe sample data payload follows the header. The length of the sample data is indicated in bytes 31-34 of the header.\n\nThe sample data in each record only includes raw sample data, i.e. what you would find in the `data` chunk body of a *.wav file. It doesn't include any of the other chunks specified by the \\*.wav format such as a `fmt ` chunk - it doesn't need one because HammerHead assumes that samples are 16-bit, 1 channel (mono), with a sample rate of 44100. (For more on the \\*.wav format, visit \u003chttp://wavefilegem.com/how_wave_files_work.html\u003e).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrait%2Fclawhammer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstrait%2Fclawhammer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrait%2Fclawhammer/lists"}