{"id":21768332,"url":"https://github.com/ymtoo/timescalemodification.jl","last_synced_at":"2025-03-21T05:44:20.417Z","repository":{"id":45238227,"uuid":"401236864","full_name":"ymtoo/TimeScaleModification.jl","owner":"ymtoo","description":"Time-scale modification for Julia","archived":false,"fork":false,"pushed_at":"2024-03-10T07:40:02.000Z","size":672,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T02:44:39.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","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/ymtoo.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}},"created_at":"2021-08-30T06:18:49.000Z","updated_at":"2023-08-05T00:28:29.000Z","dependencies_parsed_at":"2024-03-10T08:44:21.899Z","dependency_job_id":null,"html_url":"https://github.com/ymtoo/TimeScaleModification.jl","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/ymtoo%2FTimeScaleModification.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtoo%2FTimeScaleModification.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtoo%2FTimeScaleModification.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtoo%2FTimeScaleModification.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymtoo","download_url":"https://codeload.github.com/ymtoo/TimeScaleModification.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745720,"owners_count":20503048,"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-26T13:35:34.648Z","updated_at":"2025-03-21T05:44:20.389Z","avatar_url":"https://github.com/ymtoo.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TimeScaleModification.jl\n[![CI](https://github.com/ymtoo/TimeScaleModification.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/ymtoo/TimeScaleModification.jl/actions/workflows/CI.yml)\n[![codecov](https://codecov.io/gh/ymtoo/TimeScaleModification.jl/branch/main/graph/badge.svg?token=vXXUGOyv6Q)](https://codecov.io/gh/ymtoo/TimeScaleModification.jl)\n\nThe package implements time-scale modification algorithms to speed up or slow down an audio signal without alternating its pitch.\n\n## Installation\n```julia-repl\njulia\u003e]\npkg\u003e add https://github.com/ymtoo/TimeScaleModification.jl.git\n```\n\n## Usage\n```julia\nusing Plots\nusing SignalAnalysis\nusing TimeScaleModification\n\nfs = 96000\nx = cw(5000, 0.5, fs) |\u003e real |\u003e collect\nxburst = [repeat([eps()],10000);\n          randn(1000);\n          repeat([eps()],20000);\n          randn(1000);\n          repeat([eps()],16000)]\n```\n### OLA\n```julia\ny = tsmodify(OLA(256,128,hanning), x, 1.5)\nyburst = tsmodify(OLA(256,128,hanning), xburst, 1.5)\n```\n#### Sinusoidal signal\n```julia\nl = @layout [a b]\np1 = specgram(signal(x, fs); legend=:none, title=\"original\")\np2 = specgram(signal(y, fs); ylabel=\"\", legend=:none, title=\"time-scale modified\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/ola-cw-spec.png)\n```\nplot(signal(x[1:960], fs); legend=true, label=\"original\")\nplot!(signal(y[1:960], fs); legend=true, label=\"time-scale modified\")\n```\n![](docs/images/ola-cw-time.png)\n#### Burst signal\n```julia\nl = @layout [a b]\np1 = specgram(signal(xburst, fs); legend=:none, title=\"original\")\np2 = specgram(signal(yburst, fs); ylabel=\"\", legend=:none, title=\"time-scale modified\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/ola-burst-spec.png)\n```\nplot(signal(xburst, fs); legend=true, label=\"original\")\nplot!(signal(yburst, fs); legend=true, label=\"time-scale modified\")\n```\n![](docs/images/ola-burst-time.png)\n### WSOLA\n```julia\ny = tsmodify(WSOLA(256,128,hanning,10), x, 1.5)\nyburst = tsmodify(WSOLA(256,128,hanning,10), xburst, 1.5)\n```\n#### Sinusoidal signal\n```julia\nl = @layout [a b]\np1 = specgram(signal(x, fs); legend=:none, title=\"original\")\np2 = specgram(signal(y, fs); ylabel=\"\", legend=:none, title=\"time-scale modified\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/wsola-cw-spec.png)\n```julia\nplot(signal(x[1:960], fs); legend=true, label=\"original\")\nplot!(signal(y[1:960], fs); legend=true, label=\"time-scale modified\")\n```\n![](docs/images/swola-cw-time.png)\n#### Burst signal\n```julia\nl = @layout [a b]\np1 = specgram(signal(xburst, fs); legend=:none, title=\"original\")\np2 = specgram(signal(yburst, fs); ylabel=\"\", legend=:none, title=\"time-scale modified\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/wsola-burst-spec.png)\n```\nplot(signal(xburst, fs); legend=true, label=\"original\")\nplot!(signal(yburst, fs); legend=true, label=\"time-scale modified\")\n```\n![](docs/images/wsola-burst-time.png)\n\n### Phase Vocoder\n```julia\ny = tsmodify(PhaseVocoder(256,128,hanning,16,false,false,true), x, 1.5)\nyburst = tsmodify(PhaseVocoder(256,128,hanning,16,false,false,true), xburst, 1.5)\n```\n#### Sinusoidal signal\n```julia\nl = @layout [a b]\np1 = specgram(signal(x, fs); legend=:none, title=\"original\")\np2 = specgram(signal(y, fs); ylabel=\"\", legend=:none, title=\"time-scale modified\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/phasevocoder-cw-spec.png)\n```julia\nplot(signal(x[1:960], fs); legend=true, label=\"original\")\nplot!(signal(y[1:960], fs); legend=true, label=\"time-scale modified\")\n```\n![](docs/images/phasevocoder-cw-time.png)\n#### Burst signal\n```julia\nl = @layout [a b]\np1 = specgram(signal(xburst, fs); legend=:none, title=\"original\")\np2 = specgram(signal(yburst, fs); ylabel=\"\", legend=:none, title=\"time-scale modified\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/phasevocoder-burst-spec.png)\n```\nplot(signal(xburst, fs); legend=true, label=\"original\")\nplot!(signal(yburst, fs); legend=true, label=\"time-scale modified\")\n```\n![](docs/images/phasevocoder-burst-time.png)\n\n### Pitch shifting\n```julia\nxps = pitchshift(WSOLA(256,128,hanning,10), x, 6)\nl = @layout [a b]\np1 = specgram(signal(x, fs); legend=:none, title=\"original\")\np2 = specgram(signal(xps, fs); ylabel=\"\", legend=:none, title=\"pitch-shifted\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/pitchshift-wsola-cw-spec.png)\n\n### Time stretching\n```julia\nxburstts = timestretch(PhaseVocoder(256,128,hanning,16,false,false,true), xburst, 3; fixlen=false)\nl = @layout [a b]\np1 = specgram(signal(xburst, fs); legend=:none, title=\"original\")\np2 = specgram(signal(xburstts, fs); ylabel=\"\", legend=:none, title=\"time-scaled\")\nplot(p1, p2; layout=l)\n```\n![](docs/images/timestretch-phasevocoder-burst-spec.png)\n\n## Reference\nDriedger J, Müller M., \"TSM Toolbox: MATLAB Implementations of Time-Scale Modification Algorithms\", In DAFx, pp. 249-256. 2014.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymtoo%2Ftimescalemodification.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymtoo%2Ftimescalemodification.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymtoo%2Ftimescalemodification.jl/lists"}