美國有一半買黑膠的人沒有黑膠唱盤

Hacker News 上看到討論美國很多人買黑膠卻沒有黑膠唱盤:「Half of vinyl buyers in the U.S. don’t have a record player: study (consequence.net)」,原文在「Half of Vinyl Buyers in the US Don’t Have a Record Player, New Study Shows」這。

其實現代還蠻多人買黑膠不是要聽的,有很多其他用途啊,像是可以當作大型簽名板 XD

我都跟朋友說買黑膠是買一張小海報,又好保存...

直接用 prompt 產生音樂的 Riffusion

很紅的 Stable Diffusion 是寫一串文字 (prompt) 然後產生圖片,而 Riffusion 則是寫一串文字產生音樂。

其中 prompt 轉成音樂其實還在可以預期的範圍 (i.e. 遲早會出現),但專案的頁面上解釋了 Riffusion 是基於 Stable Fusion 的作品,而且是利用 Stable Fusion 產生出時頻譜 (spectrogram):

Well, we fine-tuned the model to generate images of spectrograms, like this:

也就是像這樣的圖:

Hacker News 上討論時的討論頁可以看看,作者有參與一些討論:「Riffusion – Stable Diffusion fine-tuned to generate music (riffusion.com)」。

其中有人提到這個作法超出想像,因為輸出的圖片只要幾個 pixel 差一點點就會產生出很不同的聲音:

This really is unreasonably effective. Spectrograms are a lot less forgiving of minor errors than a painting. Move a brush stroke up or down a few pixels, you probably won't notice. Move a spectral element up or down a bit and you have a completely different sound. I don't understand how this can possibly be precise enough to generate anything close to a cohesive output.

Absolutely blows my mind.

然後其中一位作者回覆到,他也是做下去後才很意外發現居然可行:

Author here: We were blown away too. This project started with a question in our minds about whether it was even possible for the stable diffusion model architecture to output something with the level of fidelity needed for the resulting audio to sound reasonable.

實際上聽了產生出來的音樂,是真的還 OK 的音樂... 大家都完全沒想到可以這樣搞,然後在 Hacker News 上的 upvote 數量爆炸高 XD

Psst:Open Source 且非 Electron 版本的 Spotify 播放器

前幾天在 Hacker News 首頁上看到的東西,而且也是當天熱度超高的話題,Open Source 且非 Electron 版本的 Spotify 播放器 Psst:「Psst: Fast Spotify client with native GUI, without Electron, built in Rust (github.com/jpochyla)」。

因為使用 Rust 與 native GUI library,加上沒有一堆 Spotify 內建的廣告系統,整個速度快到爆炸 XDDD

專案的擁有者 jpochyla 在「make provided binaries more prominent #89」這邊有提到有 nightly build 可以用:「nightly.link | Repository jpochyla/psst | Workflow build.yml | Branch master」,不過我抓下來發現不會動,所以就自己花了些時間編看看...

剛被推上 Hacker News 的時候 README.md 上的指示還沒那麼清楚,編不起來,後來這兩天陸陸續續被修正了。

桌機是 Ubuntu 20.04,而用 Ubuntu 20.04 內包的 rustc (1.51.0) 是沒辦法編的,需要自己先透過 rustup 裝新版 1.54.0 來編,基本上照著 README.md 的指示先把 dependency 裝起來,然後照著對應的指令操作就可以了。

這樣之後聽音樂方便不少...

Apple 與 Amazon 都要推出無損版的音樂串流服務了

首先是 Apple 宣佈了無損的音樂串流服務,不另外加價:「Apple Music Launching Spatial Audio With Dolby Atmos and Lossless Audio in June at No Extra Cost」,官方新聞稿在「Apple Music announces Spatial Audio with Dolby Atmos; will bring Lossless Audio to entire catalog」。

再來是 Amazon 也宣佈跟上,本來就有提供無損的 Amazon Music HD 下放到 Amazon Music Unlimited 方案也可以聽了:「Amazon Music Matching Apple by Offering Hi-Fi Tier at No Extra Cost」。

這對 Spotify 的壓力應該不小,畢竟已經先宣佈會推出無損版,但卻反而先被競爭對手出招先行制定價錢了...

Square 入主 Tidal

金流產業的 Square 買了音樂產業的 Tidal 大量股份,入主 Tidal:「Square to Buy Majority Stake in Jay-Z’s Tidal Music Streaming Platform」,TechCrunch 也有報導:「Square buys majority of Tidal, adds Jay Z to its board in bid to shake up the artist economy」。

這次的入股包括現金與股票交換,同時也讓 Jay-Z 成為 Square 的董事:

Square Inc. is buying a majority stake in Tidal, a music and entertainment platform owned by rapper Shawn “Jay-Z” Carter and other artists, for $297 million in cash and stock.

The deal also installs musician and businessperson Jay Z on Square’s board.

Square 跟 Tidal 的組合想像起來有點累,這算盤不知道怎麼打...

freeDB 將在明年三月底關閉

Hacker News 上看到的消息,提供 CD 資訊的 freeDB 將在明年三月底關閉:「FreeDB Is Shutting Down (freedb.org)」。

freeDB 的關閉算是一段歷史的終章,實際對使用者的影響應該不算大,一方面是 CD 的銷量逐漸下滑,另外一方面是因為現在的程式大多數會同時支援 freeDB 與 MusicBrainz (如果翻一下歷史的話,會注意到後者本來就是因為 freeDB 的授權結構而另外發展出來的服務)。

現在幾乎都是用串流服務與 YouTube 了...

AWS 展示了 DeepComposer

今年 AWSre:Invent 又開始了,照慣例有很多東西會在會場上發表 (尤其是現場表演起來會很炫的),其中一個是 AWS DeepComposer:「AWS DeepComposer – Compose Music with Generative Machine Learning Models」。

在現場有人錄影下來放到 Twitter 上可以直接看:

現場展示了輸入一段旋律,而 AWS DeepComposer 可以補上其他樂器的配樂。在 blog 上的介紹文章也可以看到同樣的說明:

  • Log into the DeepComposer console,
  • Record a short musical tune, or use a prerecorded one,
  • Select a generative model for your favorite genre, either pretrained or your own,
  • Use this model to generate a new polyphonic composition,
  • Play the composition in the console,
  • Export the composition or share it on SoundCloud.

就... 很炫 XD

Spotify 向歐盟投訴 Apple Music 的不公平競爭

Spotify 向歐盟提出不公平競爭的投訴,並且發出新聞稿:「Consumers and Innovators Win on a Level Playing Field」。

重點在於 Spotify 服務透過蘋果的平台會有 30% 的抽成,但 Apple Music 因為自家服務而不需要:

To illustrate what I mean, let me share a few examples. Apple requires that Spotify and other digital services pay a 30% tax on purchases made through Apple’s payment system, including upgrading from our Free to our Premium service. If we pay this tax, it would force us to artificially inflate the price of our Premium membership well above the price of Apple Music. And to keep our price competitive for our customers, that isn’t something we can do.

不過裡面好像沒提到超過一年後的費用會降到 15% (參考「Auto-renewable Subscriptions」),應該會是蘋果向歐盟回應的重點?

用 FFmpeg 處理單聲道聲音產生空間感

先提供指令 (需要新版 FFmpeg),把單聲道的 1.wav 加工成 2.wav (兩聲道):

ffmpeg -i 1.wav -filter_complex '[0:0]stereotools=delay=20[aout]' -map '[aout]' -y 2.wav

這是看了『如何讓聲音有「立體感」?』後的實驗:

裡面提到要怎麼讓單聲道錄音產生空間感,其中一個方式是將單聲道的 audio stream 複製到兩邊,但讓左右聲道差 0.02 秒 (也就是 20ms),讓兩邊聲音有些微差距而產生空間感。

查了資料後發現這個功能可以靠 FFmpeg 裡 stereotoolsdelay 達成:

delay
Set delay in milliseconds how much to delay left from right channel and vice versa. Default is 0. Allowed range is from -20 to 20.

但 Ubuntu 16.04 內的 FFmpeg 版本不夠新 (2.8.15),測試時說沒有 stereotools 這個 filter,所以找了「FFMPEG 4 : Jonathon F」這個 PPA,改用 4.x 版的 FFmpeg 就可以用了。

算是找個機會玩看看... 另外也熟悉一下 FFmpeg 的 -filter_complex 到底是什麼語法。

OS X 接藍芽耳機要注意的地方...

Twitter 上看到 OS X 接藍芽耳機時的音質問題:

看了一些討論,看起來除了蘋果自己的耳機外,其他家的藍芽耳機不一定會開 AAC 或是 aptX。雖然現在沒有其他家的藍芽設備,但以後如果買了要注意一下...