1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

前半は無音、後半は音ありのアラームを作成する方法

Posted at

前半は無音、後半は音ありのアラームを作成する方法

スマホのアラームを常用していて、自分だけ気づくためにはバイブレーションのみが望ましいが、音がならないとスマホを違う場所に置いていた場合に困るので、前半は無音、後半は音ありのアラームを作成する。たいていのスマホは、任意の音楽をアラームに設定できるのでその機能を利用する。

手法

まずはアラーム用の音源を準備。今回は以下のフリー素材を使うことにする。
https://otologic.jp/free/se/clock01.html

FFmpegを用いてこの音源をループさせる。必要ならば、concatを繰り返す。
参考: https://trac.ffmpeg.org/wiki/Concatenate

bash
cp "Clock-Alarm03-02(High-Loop).mp3" temp.mp3
ffmpeg -i "concat:temp.mp3|temp.mp3" -c copy temp_loop.mp3

前半部分に無音区間を挿入する。adelayで無音区間の長さを設定。ここでは30 secとした。
参考: https://ffmpeg.org/ffmpeg-filters.html#adelay

bash
ffmpeg -i temp_loop.mp3 -af "adelay=delays=30s:all=1" Delay_Alarm.mp3

これをスマホで読み込んでアラーム音に設定する。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?