2005年4月27日の日記を表示中

2005年 4月 27日 (水)

もえだん音楽の続き

sox使えばフェードアウトも簡単にできるんですね.↓な感じで適当に時間指定してやったら,何やらよさげなwavファイルができました.でも曲名わからんなぁ・・・(´・ω・`).

for i in moedan_*.ogg; do
  ogg123 -d wav -f `echo $i | sed -e 's/ogg$/wav/'` $i
done

for i in `seq 3 2 16`; do
  file1=`printf "moedan_%02d.wav" $i`
  file2=`printf "moedan_%02d.wav" \`expr $i + 1 \``
  new=`printf "moedan_%02d_%02d.wav" $i \`expr $i + 1\``
  dd if=$file1 of=$file1.tmp bs=44 skip=1
  dd if=$file2 of=$file2.tmp bs=44 skip=1
  cat $file1.tmp $file2.tmp $file2.tmp > moedan.tmp
  size=`ls -l moedan.tmp | awk '{print $5}'`
  size2=`ls -l $file2.tmp | awk '{print $5}'`
  time=`expr $size / 2 / 2 / 44100`
  time2=`expr $size2 / 2 / 2 / 44100`
  sox -t raw -w -r 44100 -s -c 2 moedan.tmp $new fade t \
    0 `expr $time - $time2 + 5` 5
  rm -f $file1.tmp $file2.tmp moedan.tmp
done

[コメントを書く]

Jonny 2007/05/18(金) 05:31:24
What language is this?
nosuke 2007/05/19(土) 01:11:41
Hi Jonny. My diary is written in Japanese and the above code is written in Bourne Shell script language. This script can be executed on Linux, Cygwin or some other UNIX environment.
You might need to install the sox command in addition.
http://sox.sourceforge.net/

[コメントを書く]

Jonny 2007/05/18(金) 05:31:24
What language is this?
nosuke 2007/05/19(土) 01:11:41
Hi Jonny. My diary is written in Japanese and the above code is written in Bourne Shell script language. This script can be executed on Linux, Cygwin or some other UNIX environment.
You might need to install the sox command in addition.
http://sox.sourceforge.net/

つくば

ひさびさに行ってきました.一年ぶりか・・・.

2005年4月27日の日記を表示中

中の人情報

名前:
nosuke (のすけ)
メール:
sasugaanijaのgmail.com
「の」は「@」みたいな
関連リンク:

カレンダー

2005年4月
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

<<先月分

翌月分>>

最新の10件のエントリ

最近の10件のコメント

過去ログ