{"id":19050791,"url":"https://github.com/nicka/com.composrapp.audiomerger","last_synced_at":"2026-07-02T13:36:42.074Z","repository":{"id":25064680,"uuid":"28484862","full_name":"nicka/com.composrapp.audiomerger","owner":"nicka","description":"Titanium iOS module to merge audio files","archived":false,"fork":false,"pushed_at":"2014-12-31T15:58:05.000Z","size":2596,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T10:11:31.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicka.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}},"created_at":"2014-12-25T15:29:20.000Z","updated_at":"2016-03-09T19:58:36.000Z","dependencies_parsed_at":"2022-08-23T12:02:11.055Z","dependency_job_id":null,"html_url":"https://github.com/nicka/com.composrapp.audiomerger","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/nicka%2Fcom.composrapp.audiomerger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicka%2Fcom.composrapp.audiomerger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicka%2Fcom.composrapp.audiomerger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicka%2Fcom.composrapp.audiomerger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicka","download_url":"https://codeload.github.com/nicka/com.composrapp.audiomerger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240107384,"owners_count":19748808,"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-11-08T23:16:17.350Z","updated_at":"2026-05-10T21:30:17.537Z","avatar_url":"https://github.com/nicka.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS - Concatenate or generate audio\n\nBuild in support for `.mp3`, `.m4a` and `.wav` input audio files.\n\n### Usage\n\nAdd module:\n\n```\nvar AudioMerger = require('com.composrapp.audiomerger');\n```\n\nSpecify audioMergeType, audioFilesInput and audioFileOutput argumnets:\n\n**audioMergeType**\n\nUse `concatenate` or `generate`.\n\n**audioFilesInput**\n\nConcatenate example:\n\n```\nvar concatenateAudios = [\n  Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '1.mp3').nativePath,\n  Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '2.mp3').nativePath,\n  Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '3.mp3').nativePath\n].join();\n```\n\nGenerate example:\n\n```\nvar generateAudios = [\n  { audio: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '140-drum.mp3').nativePath, timings: [0, 14000, 28000] },\n  { audio: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '140-guitar.mp3').nativePath, timings: [0, 14000, 28000, 42000] }\n];\n```\n\nIf  the `bpm` argument is provided to `mergeAudio({ bpm: 140 })`, `timings` will be handled as **notes**. When `bpm` is not specified they will be handled as **milliseconds**.\n\n**audioFileOutput**\n\nShould always end with `.m4a`.\n\nExample: \n\n```\nvar concatenatedAudio = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'example.m4a');\n```\n\n**mergeAudio**\n\nConcatenate audio:\n\n```\nAudioMerger.mergeAudio({\n  audioMergeType: 'concatenate',\n  audioFilesInput: concatenateAudios,\n  audioFileOutput: concatenatedAudio\n});\n```\n\nGenerate audio:\n\n```\nAudioMerger.mergeAudio({\n  audioMergeType: 'generate',\n  audioFilesInput: generateAudios,\n  audioFileOutput: generatedAudio\n});\n```\n\n**eventListeners**\n\n```\nAudioMerger.addEventListener('concatenate', function() {\n  Ti.API.info('Concatenated audio');\n});\n\nAudioMerger.addEventListener('generate', function() {\n  Ti.API.info('Generated audio');\n});\n\nAudioMerger.addEventListener('error', function() {\n  Ti.API.error('Failed to merge audio');\n});\n```\n\n## Examples\n\nConcatenate example:\n\n```\nvar concatenateAudios = [\n  Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '1.mp3').nativePath,\n  Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '2.mp3').nativePath,\n  Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '3.mp3').nativePath\n].join();\nvar concatenatedAudio = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'example.m4a');\n\nAudioMerger.mergeAudio({\n  audioMergeType: 'concatenate',\n  audioFilesInput: concatenateAudios,\n  audioFileOutput: concatenatedAudio\n});\n\nAudioMerger.addEventListener('concatenate', function() {\n  Ti.API.info('Concatenated audio');\n});\n```\n\nGenerate example:\n\n```\nvar generateAudios = [\n  { \n    audio: Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, '140-drum.mp3').nativePath,\n    timings: [0, 14000, 28000]\n  },\n  { \n    audio: Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, '140-guitar.mp3').nativePath,\n    timings: [0, 14000, 28000, 42000]\n  }\n];\nvar generatedAudio = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'example.m4a');\n\nAudioMerger.mergeAudio({\n  audioMergeType: 'generate',\n  audioFilesInput: generateAudios,\n  audioFileOutput: generatedAudio\n});\n\nAudioMerger.addEventListener('generate', function() {\n  Ti.API.info('Concatenated audio');\n});\n```\n\nGenerate example by BPM:\n\n```\nvar generateAudios = [\n  { \n    audio: Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, '140-drum.mp3').nativePath,\n    timings: [64, 128, 192]\n  },\n  { \n    audio: Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, '140-guitar.mp3').nativePath,\n    timings: [0, 64, 192]\n  }\n];\nvar generatedAudio = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'example.m4a');\n\nAudioMerger.mergeAudio({\n  audioMergeType: 'generate',\n  audioFilesInput: generateAudios,\n  audioFileOutput: generatedAudio,\n  bpm: 140\n});\n\nAudioMerger.addEventListener('generate', function() {\n  Ti.API.info('Concatenated audio');\n});\n```\n\n### Development\n\n1. Install packages with `npm install`\n2. Update examples in `example/app.js`\n3. Use `gulp ios` to build and test the module\n\n## License\n\n\u003cpre\u003e\nCopyright 2013-2014 Nick den Engelsman\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicka%2Fcom.composrapp.audiomerger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicka%2Fcom.composrapp.audiomerger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicka%2Fcom.composrapp.audiomerger/lists"}