日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

[Python] Matchering2.0自动匹配式母带最全应用

發布時間:2024/5/14 python 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [Python] Matchering2.0自动匹配式母带最全应用 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

[Python] Matchering2.0自動匹配式母帶最全應用

前言
Matchering 是一個新穎化的web程序和python庫,用于音頻匹配和母帶處理。它遵循了一個非常簡單的想法,獲取兩個音頻文件并將其輸入到Matchering中:
target:需要制作母帶的目標音軌
reference:進行參考的參考音軌
Matchering會幫你自動分析并生成一個和參考文件相似的result文件。

如果還不知道matchering是什么的,可以看我的第一篇文章:
https://blog.csdn.net/m0_56699208/article/details/122721723?spm=1001.2014.3001.5502

Advanced Results:
代碼來自matchering官網的sample檔案:
https://github.com/sergree/matchering/blob/master/examples/advanced_results.py

import matchering as mg# Let's keep info and warning outputs here, muting out the debug ones mg.log(info_handler=print, warning_handler=print)mg.process(target="my_song.wav",reference="some_popular_song.wav",# pcm16 and pcm24 are just basic shortcuts# You can also use the Result class to make some advanced resultsresults=[# Basic WAV 16-bit, match + master`mg.pcm16("my_song_master_16bit.wav")`,# FLAC 24-bit, match only (no limiter), normalized to -0.01 dB# Recommendations for adjusting the amplitude will be displayed in the debug print if it is enabledmg.Result("custom_result_24bit_no_limiter.flac", subtype="PCM_24", use_limiter=False),# AIFF 32-bit float, match only (no limiter), non-normalized# Can exceed 0 dB without clipping# So you can directly feed it to some VST limiter in your DAWmg.Result("custom_result_32bit_no_limiter_non-normalized.aiff",subtype="FLOAT",use_limiter=False,normalize=False,)# More available formats and subtypes:# https://pysoundfile.readthedocs.io/en/latest/#soundfile.available_formats# https://pysoundfile.readthedocs.io/en/latest/#soundfile.available_subtypes], )

作者給出了三種導出文件的母帶文件的方式:
1.16-bit wav
最基本的16-bit wav文件,匹配加母帶

mg.pcm16("my_song_master_16bit.wav")

2.24-bit flac
24-bit flac文件,只匹配不加limiter,將電平控制在0.01db

mg.Result("custom_result_24bit_no_limiter.flac", subtype="PCM_24", use_limiter=False),

3.32-bit aiff
32-bit aiff文件,只匹配不加limiter,電平到0db但不產生clipping

mg.Result("custom_result_32bit_no_limiter_non-normalized.aiff",subtype="FLOAT",use_limiter=False,normalize=False,)

更多的導出格式可以參考:
https://pysoundfile.readthedocs.io/en/latest/#soundfile.available_formats
https://pysoundfile.readthedocs.io/en/latest/#soundfile.available_subtypes

大家可以根據這個示例導出自己需要的文件類型和音質,并能選擇是否自動添加limiter。可以說是非常方便了

另外,matchering還提供了預覽功能:
https://github.com/sergree/matchering/blob/master/examples/with_preview.py

import matchering as mg# Let's keep only warning outputs here, muting everything else mg.log(warning_handler=print)mg.process(target="my_song.wav",reference="some_popular_song.wav",results=[mg.pcm16("my_song_master_16bit.wav"),mg.pcm24("my_song_master_24bit.wav"),],# These two lines will allow you to create two 30-second FLAC files with the loudest parts of:# 'my_song.wav' and 'my_song_master_16bit.wav'# Use them to quickly compare the target audio with the resulting audiopreview_target=mg.pcm16("preview_my_song.flac"),preview_result=mg.pcm16("preview_my_song_master.flac"), )

使用preview_targetpreview_result可以生成兩個在最大響度處30s的flac文件供使用者試聽,以便使用者最快速知道母帶之后的版本是否和自己心意。

preview_target=mg.pcm16("preview_my_song.flac"),preview_result=mg.pcm16("preview_my_song_master.flac"),

總結

以上是生活随笔為你收集整理的[Python] Matchering2.0自动匹配式母带最全应用的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。