Skip to content

Instantly share code, notes, and snippets.

@leVirve
Last active June 11, 2016 05:48
Show Gist options
  • Save leVirve/b2d60d77da6a11549c3f37bddf4ea779 to your computer and use it in GitHub Desktop.
Save leVirve/b2d60d77da6a11549c3f37bddf4ea779 to your computer and use it in GitHub Desktop.
MIR Final Project

Code repo:

https://github.com/leVirve/mir-final

Reference Papers Link:

https://drive.google.com/a/gapp.nthu.edu.tw/folderview?id=0B4x1L9XIJWbweFZTTk0waC0ta00&usp=sharing

Dataset:

標記:

tagging policy

  • intro
  • verse (A~D)
  • bridge (A~D)
  • pre-chorus
  • chorus (A~D)
  • post-chorus
  • ending
  • nothing

格式:

start_time end_time tag

歌名:

數字命名,最後統整紀錄對照

上傳檔案至 Google Drive

https://goo.gl/6O2GB0

RWC Dataset

所有 tag

  • bridge A
  • bridge A (+1)
  • bridge A (+2)
  • bridge B
  • bridge B (+2)
  • bridge C
  • bridge D
  • chorus A
  • chorus A (+1)
  • chorus A (+2)
  • chorus A (-10)
  • chorus A (-7)
  • chorus B
  • chorus B (+1)
  • chorus B (+2)
  • chorus C
  • chorus D
  • ending
  • intro
  • nothing
  • post-chorus
  • pre-chorus
  • verse A
  • verse B
  • verse C
@leVirve
Copy link
Author

leVirve commented Jun 7, 2016

mirsegment

%% env
addpath('MIRtoolbox1.6.1/MIRToolbox');
addpath('MIRtoolbox1.6.1/AuditoryToolbox');

%%

audio = miraudio('5566.mp3');

%%
% sgmt1 = mirsegment(audio, 'Spectrum', 'Novelty', 'KernelSize', 256)
% sgmt2 = mirsegment(audio, 'Spectrum', 'Novelty', 'KernelSize', 256)
sgmt3 = mirsegment(audio, 'Spectrum', 'MFCC', 'Novelty', 'KernelSize', 200, 'contrast', 0.15)

%%
%sgmt = mirsegment(audio, 'ragtime', 'Novelty', 'KernelSize', 256);
%sgmt = mirsegment(audio, 'HCDF');

v = [5 10 15 20]';
sgmt = mirsegment(audio, v);

@leVirve
Copy link
Author

leVirve commented Jun 8, 2016

Get dataset annotation

annotation_folder = 'C:\Users\salas\Downloads\AIST.RWC-MDB-P-2001.CHORUS\AIST.RWC-MDB-P-2001.CHORUS';
annotation_files = dir([annotation_folder, '\RM-*.CHORUS.txt']);

songs = cell(size(annotation_files));
for i = 1:length(annotation_files)
    fh = fopen([annotation_folder '\' annotation_files(i).name]);
    C = textscan(fh, '%f %f %[^\n]');
    fclose(fh);

    ss = cell(size(C{1}));
    for sgmt = 1:length(C{1})
        [tag, other] = parse_annotation_tag(C{3}{sgmt});
        s = struct(...
            'audio', 0, ...
            'label', tag, ...
            'start', C{1}(sgmt) / 100, ...
            'end', C{2}(sgmt) / 100, ...
            'other', other);
        ss{sgmt} = s;
    end
    songs{i} = ss;
end
function [ tag, other ] = parse_annotation_tag( annotation )

    C = strsplit(annotation(2:end-1));
    tag = C{1};

    if length(C) == 2
        other = C{2};
    else
        other = '';
    end
end

Demo Usage

%% demo

song = songs{3};

for sgmt = 1:length(song.s)
    fprintf('sgmt#%d start=%.2f, end=%.2f, tag=%s\n', sgmt, song.s(sgmt), song.e(sgmt), song.tag{sgmt});
end

%% demo: how many unique tags

tags = {};
for i = 1:length(songs)
    tags = {tags{:}, songs{i}.tag{:}};
end
utag = unique(tags);

@wayne391
Copy link

wayne391 commented Jun 8, 2016

tagging policy

intro
verse (AD)
bridge (A
D)
pre-chorus
chorus (A~D)
post-chorus
ending
nothing

@leVirve
Copy link
Author

leVirve commented Jun 9, 2016

My annotations

Sa01 : Take That - Patience
Sa02 : Kelly Clarkson - Because of You
Sa03 : Bon Jovi - Have A Nice Day
Sa04 : Daughtry - September
Sa05 : Bullet For My Valentine - All These Things I Hate
Sa06 : Andy Williams - Speak Softly Love
Sa07 : Jason Mraz - I Wont Give Up
Sa08 : 五月天 - 知足
Sa09 : 辛曉琪 - 味道
Sa10 : 桑田佳祐 - 明日晴れるかな
Sa11 : Mr.Big - To Be With You
Sa12 : Nightwish  - Ever Dream
Sa13 : 蘇打綠 - 喜歡寂寞
Sa14 : 鬼束ちひろ - 月光
Sa15 : 范逸臣 - 灰色地帶
Sa16 : 周杰倫 - 七里香
Sa17 : 中島美嘉 - 雪の華
Sa18 : 王力宏 - 唯一
Sa19 : 信樂團 - 世界末日
Sa20 : 李宗盛 - 山丘

@HappyStorm
Copy link

RWC Dataset:
RWC-DB

@HappyStorm
Copy link

My Annotations:

  • Wu01: 吳宗憲 - 是不是這樣的夜晚你才會這樣的想起我
  • Wu02: 李行亮 - 願得一人心
  • Wu03: 杜德偉 - 情人
  • Wu04: 周定緯 - 困獸
  • Wu05: 金莎 - 愛的魔法
  • Wu06: One Direction - Save You Tonight
  • Wu07: 胡歌 - 逍遙嘆
  • Wu08: 倉木麻衣 - Wake me up
  • Wu09: 孫丹菲 - Can't you See
  • Wu10: 容祖兒 - 小小
  • Wu11: 張震嶽 - 走慢一點點
  • Wu12: 莎拉布萊曼&安德烈波伽利 - Time To Say Goodbye
  • Wu13: 愛內里菜 - Code Crush
  • Wu14: 劉詩詩 - 等你的季節
  • Wu15: 濱崎步 - Missing
  • Wu16: Demi Lovato - Give Your Heart a Break
  • Wu17: Gareth Gates - Anyone Of Us
  • Wu18: Nicki Minaj - Super Bass
  • Wu19: Olivia-等等(彭于晏, 孟耿如「頓號英式茶館」)
  • Wu20: S.H.E&周定緯 - 兩個人的荒島

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment