├── README.md
├── papers
├── 00[icme] automatic audio segmentation using a measure of audio novelty.pdf
├── 09[eecw] Case Study Beatles Songs- What can be Learned from Unreliable Music Alignments.pdf
├── 10[ismir] State of the Art Report- Audio-Based Music Structure Analysis.pdf
├── 11[taslp] Measuring Structural Similarity in Music.pdf
├── 12[aaai] Unsupervised detection of music boundaries by time series structure features.pdf
├── 13[ismir] A Meta-Analysis of the MIREX Structural Segmentation Task.pdf
├── 14[ismir] Boundary detection in music structure analysis using convolutional neural networks.pdf
├── 14[ismir] Perceptual analysis of the f-measure for evaluating section boundaries in music.pdf
├── 14[tmm] Audio Properties of Perceived Boundaries in Music.pdf
├── 14[tmm] Unsupervised Music Structure Annotation by Time Series Structure Features and Segment Similarity.pdf
├── 15[icassp] Estimating double thumbnails for music recordings.pdf
├── 15[ismir] Music Boundary Detection Using Neural Networks on Combined Features and Two-Level Annotations.pdf
├── 16[ismir] systematic exploration of computational music structure research.pdf
└── misc.txt
├── segmentation_toolbox
├── 11_-_All_You_Need_Is_Love.lab
├── 11_-_All_You_Need_Is_Love.wav
├── 11_-_All_You_Need_Is_Love_cens.mat
├── 11_-_All_You_Need_Is_Love_clp.mat
├── 11_-_All_You_Need_Is_Love_es_foote.lab
├── 11_-_All_You_Need_Is_Love_es_sf.lab
├── 11_-_All_You_Need_Is_Love_es_sf_label.lab
├── MATLAB-Chroma-Toolbox_2.0
│ ├── MIDI_FB_ellip_pitch_60_96_22050_Q25.mat
│ ├── MIDI_FB_ellip_pitch_60_96_22050_Q25_minusHalf.mat
│ ├── MIDI_FB_ellip_pitch_60_96_22050_Q25_minusQuarter.mat
│ ├── MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThird.mat
│ ├── MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThreeQuarters.mat
│ ├── MIDI_FB_ellip_pitch_60_96_22050_Q25_minusTwoThird.mat
│ ├── audio_to_pitch_via_FB.m
│ ├── demoChromaToolbox.m
│ ├── estimateTuning.m
│ ├── generateMultiratePitchFilterbank.m
│ ├── normalizeFeature.m
│ ├── pitch_to_CENS.m
│ ├── pitch_to_CRP.m
│ ├── pitch_to_chroma.m
│ ├── smoothDownsampleFeature.m
│ ├── test_convert_audio_to_pitch.m
│ ├── test_convert_pitch_to_CENS.m
│ ├── test_convert_pitch_to_CRP.m
│ ├── test_convert_pitch_to_chroma.m
│ ├── visualizeCRP.m
│ ├── visualizeChroma.m
│ ├── visualizePitch.m
│ └── wav_to_audio.m
├── demo.m
├── feature_generator.m
├── foote
│ ├── audio_segmenter_foote.m
│ ├── gaussian_checkboard.m
│ ├── gaussian_filter_1d.m
│ ├── generateColormapValue.m
│ └── self_similarity_matrix.m
├── sf
│ ├── audio_segmenter_sf.m
│ ├── generateColormapValue.m
│ ├── kernel_density_estimation_2d.m
│ ├── recurrence_plot.m
│ ├── segment_labeling.m
│ └── sm_to_time_lag.m
├── visualize_results.m
└── write_results.m
└── workspace
├── annotation
└── 11_-_All_You_Need_Is_Love.lab
├── audio
└── 11_-_All_You_Need_Is_Love.wav
├── estimation
├── 01_-_A_Hard_Day's_Night.lab
├── 01_-_Back_in_the_USSR.lab
├── 01_-_Birthday.lab
├── 01_-_Come_Together.lab
├── 01_-_Drive_My_Car.lab
├── 01_-_Help!.lab
├── 01_-_I_Saw_Her_Standing_There.lab
├── 01_-_It_Won't_Be_Long.lab
├── 01_-_Magical_Mystery_Tour.lab
├── 01_-_No_Reply.lab
├── 01_-_Sgt._Pepper's_Lonely_Hearts_Club_Band.lab
├── 01_-_Taxman.lab
├── 01_-_Two_of_Us.lab
├── 02_-_All_I've_Got_To_Do.lab
├── 02_-_Dear_Prudence.lab
├── 02_-_Dig_a_Pony.lab
├── 02_-_Eleanor_Rigby.lab
├── 02_-_I'm_a_Loser.lab
├── 02_-_I_Should_Have_Known_Better.lab
├── 02_-_Misery.lab
├── 02_-_Norwegian_Wood_(This_Bird_Has_Flown).lab
├── 02_-_Something.lab
├── 02_-_The_Fool_On_The_Hill.lab
├── 02_-_The_Night_Before.lab
├── 02_-_With_A_Little_Help_From_My_Friends.lab
├── 02_-_Yer_Blues.lab
├── 03_-_Across_the_Universe.lab
├── 03_-_All_My_Loving.lab
├── 03_-_Anna_(Go_To_Him).lab
├── 03_-_Baby's_In_Black.lab
├── 03_-_Flying.lab
├── 03_-_Glass_Onion.lab
├── 03_-_I'm_Only_Sleeping.lab
├── 03_-_If_I_Fell.lab
├── 03_-_Lucy_In_The_Sky_With_Diamonds.lab
├── 03_-_Maxwell's_Silver_Hammer.lab
├── 03_-_Mother_Nature's_Son.lab
├── 03_-_You've_Got_To_Hide_Your_Love_Away.lab
├── 03_-_You_Won't_See_Me.lab
├── 04_-_Blue_Jay_Way.lab
├── 04_-_Chains.lab
├── 04_-_Don't_Bother_Me.lab
├── 04_-_Everybody's_Got_Something_To_Hide_Except_Me_and_M.lab
├── 04_-_Getting_Better.lab
├── 04_-_I'm_Happy_Just_To_Dance_With_You.lab
├── 04_-_I_Me_Mine.lab
├── 04_-_I_Need_You.lab
├── 04_-_Love_You_To.lab
├── 04_-_Nowhere_Man.lab
├── 04_-_Ob-La-Di,_Ob-La-Da.lab
├── 04_-_Oh!_Darling.lab
├── 04_-_Rock_and_Roll_Music.lab
├── 05_-_And_I_Love_Her.lab
├── 05_-_Another_Girl.lab
├── 05_-_Boys.lab
├── 05_-_Dig_It.lab
├── 05_-_Fixing_A_Hole.lab
├── 05_-_Here,_There_And_Everywhere.lab
├── 05_-_I'll_Follow_the_Sun.lab
├── 05_-_Little_Child.lab
├── 05_-_Octopus's_Garden.lab
├── 05_-_Sexy_Sadie.lab
├── 05_-_Think_For_Yourself.lab
├── 05_-_Your_Mother_Should_Know.lab
├── 06_-The_Continuing_Story_of_Bungalow_Bill.lab
├── 06_-_Ask_Me_Why.lab
├── 06_-_I_Am_The_Walrus.lab
├── 06_-_I_Want_You.lab
├── 06_-_Let_It_Be.lab
├── 06_-_Mr._Moonlight.lab
├── 06_-_She's_Leaving_Home.lab
├── 06_-_Tell_Me_Why.lab
├── 06_-_The_Word.lab
├── 06_-_Till_There_Was_You.lab
├── 06_-_Yellow_Submarine.lab
├── 06_-_You're_Going_to_Lose_That_Girl.lab
├── 07_-_Being_For_The_Benefit_Of_Mr._Kite!.lab
├── 07_-_Can't_Buy_Me_Love.lab
├── 07_-_Hello_Goodbye.lab
├── 07_-_Here_Comes_The_Sun.lab
├── 07_-_Kansas_City-_Hey,_Hey,_Hey,_Hey.lab
├── 07_-_Long_Long_Long.lab
├── 07_-_Maggie_Mae.lab
├── 07_-_Michelle.lab
├── 07_-_Please_Mister_Postman.lab
├── 07_-_Please_Please_Me.lab
├── 07_-_She_Said_She_Said.lab
├── 07_-_Ticket_To_Ride.lab
├── 07_-_While_My_Guitar_Gently_Weeps.lab
├── 08_-_Act_Naturally.lab
├── 08_-_Any_Time_At_All.lab
├── 08_-_Because.lab
├── 08_-_Eight_Days_a_Week.lab
├── 08_-_Good_Day_Sunshine.lab
├── 08_-_I've_Got_A_Feeling.lab
├── 08_-_Love_Me_Do.lab
├── 08_-_Revolution_1.lab
├── 08_-_Roll_Over_Beethoven.lab
├── 08_-_Strawberry_Fields_Forever.lab
├── 08_-_What_Goes_On.lab
├── 08_-_Within_You_Without_You.lab
├── 09_-_And_Your_Bird_Can_Sing.lab
├── 09_-_Girl.lab
├── 09_-_Hold_Me_Tight.lab
├── 09_-_Honey_Pie.lab
├── 09_-_I'll_Cry_Instead.lab
├── 09_-_It's_Only_Love.lab
├── 09_-_Martha_My_Dear.lab
├── 09_-_One_After_909.lab
├── 09_-_P._S._I_Love_You.lab
├── 09_-_Penny_Lane.lab
├── 09_-_When_I'm_Sixty-Four.lab
├── 09_-_Words_of_Love.lab
├── 10_-_Baby_It's_You.lab
├── 10_-_Baby_You're_A_Rich_Man.lab
├── 10_-_For_No_One.lab
├── 10_-_Honey_Don't.lab
├── 10_-_I'm_Looking_Through_You.lab
├── 10_-_I'm_So_Tired.lab
├── 10_-_Lovely_Rita.lab
├── 10_-_Savoy_Truffle.lab
├── 10_-_Sun_King.lab
├── 10_-_The_Long_and_Winding_Road.lab
├── 10_-_Things_We_Said_Today.lab
├── 10_-_You_Like_Me_Too_Much.lab
├── 10_-_You_Really_Got_A_Hold_On_Me.lab
├── 11_-_All_You_Need_Is_Love.lab
├── 11_-_Black_Bird.lab
├── 11_-_Cry_Baby_Cry.lab
├── 11_-_Do_You_Want_To_Know_A_Secret.lab
├── 11_-_Doctor_Robert.lab
├── 11_-_Every_Little_Thing.lab
├── 11_-_For_You_Blue.lab
├── 11_-_Good_Morning_Good_Morning.lab
├── 11_-_I_Wanna_Be_Your_Man.lab
├── 11_-_In_My_Life.lab
├── 11_-_Mean_Mr_Mustard.lab
├── 11_-_Tell_Me_What_You_See.lab
├── 11_-_When_I_Get_Home.lab
├── 12_-_A_Taste_Of_Honey.lab
├── 12_-_Devil_In_Her_Heart.lab
├── 12_-_Get_Back.lab
├── 12_-_I've_Just_Seen_a_Face.lab
├── 12_-_I_Don't_Want_to_Spoil_the_Party.lab
├── 12_-_I_Want_To_Tell_You.lab
├── 12_-_Piggies.lab
├── 12_-_Polythene_Pam.lab
├── 12_-_Sgt._Pepper's_Lonely_Hearts_Club_Band_(Reprise).lab
├── 12_-_Wait.lab
├── 12_-_You_Can't_Do_That.lab
├── 13_-_A_Day_In_The_Life.lab
├── 13_-_Good_Night.lab
├── 13_-_Got_To_Get_You_Into_My_Life.lab
├── 13_-_I'll_Be_Back.lab
├── 13_-_If_I_Needed_Someone.lab
├── 13_-_Not_A_Second_Time.lab
├── 13_-_Rocky_Raccoon.lab
├── 13_-_She_Came_In_Trough_The_Bathroom_Window.lab
├── 13_-_There's_A_Place.lab
├── 13_-_What_You're_Doing.lab
├── 13_-_Yesterday.lab
├── 14_-_Dizzy_Miss_Lizzie.lab
├── 14_-_Don't_Pass_Me_By.lab
├── 14_-_Everybody's_Trying_to_Be_My_Baby.lab
├── 14_-_Golden_Slumbers.lab
├── 14_-_Money.lab
├── 14_-_Run_For_Your_Life.lab
├── 14_-_Tomorrow_Never_Knows.lab
├── 14_-_Twist_And_Shout.lab
├── 15_-_Carry_That_Weight.lab
├── 15_-_Why_Don't_We_Do_It_In_The_Road.lab
├── 16_-_I_Will.lab
├── 17_-_Her_Majesty.lab
└── 17_-_Julia.lab
├── eval.py
├── feature
├── 11_-_All_You_Need_Is_Love_cens.mat
├── 11_-_All_You_Need_Is_Love_clp.mat
└── 11_-_All_You_Need_Is_Love_crp.mat
├── feature_saving.m
├── hpcp_dcp.py
└── run_all.m
/README.md:
--------------------------------------------------------------------------------
1 | # Music Structure Analysis in Matlab
2 | Implememtation on two segmentation and one labeling algorithms in matlab. Additionally, it contains a toolbox and a workspace for facilitating coding.
3 | 音樂分段和標籤演算法的實作
4 |
5 | **NEW** pyhton implementation is [here](https://github.com/wayne391/sf_segmenter).
6 |
7 | Related Topics: Segmentation, Lableing, Recurrence Plot (RP), Self-Similarity Matrix(SSM)
8 |
9 |
10 | ## Dependencies
11 | * Chroma Toolbox (matlab toolbox) [4] : [http://resources.mpi-inf.mpg.de/MIR/chromatoolbox/](http://resources.mpi-inf.mpg.de/MIR/chromatoolbox/)
12 | * mir_eval (python package) [5] : For evaluation (Optional)
13 | * madmom [7] : For HPCP, DCP chroma feature (Optional)
14 |
15 | Note that there are a warning in origirnal Chroma Toolbox and a little bug that it can't read .mp3. I fixed them!
16 | ## Usage
17 | There are two folders
18 | |- segmentaion toolbox/ : set path and it can be used directly
19 | |- workspace/ : a template for testing and evaluating a dataset
20 |
21 | ### segmentaion_toolbox/
22 | Adding this folder to toolbox or addpath, and it's easy to use.
23 | ```matlab
24 | % Segmentation
25 | audio_filename = 'test.wav';
26 | result = audio_segmenter_sf(audio_filename);
27 | visualize_results(audio_filename, result);
28 |
29 | % Segmentation & Labeling
30 | [result_sf, labeling] = audio_segmenter_sf(audio_filename,'clp', 0, 1);
31 | ```
32 |
33 | see demo.m for further using
34 |
35 | ### workspace/
36 | If you want to use this template, please follows the structure of folders.
37 |
38 | root/
39 | |- annotation/ : groundtruth or anntations files
40 | |- audio/ : audio files
41 | |- estimation/ : results of the program
42 | |- feature/ : generated features
43 |
44 | In the root folder (workspace here), there are three programs. Following the procedures, you can experiments on a dataset.
45 |
46 | 1. run "feature_saving.m" and generated features will be placed at the feature folder
47 | 2. run "run_all.m" and the results of prediction will be palced at estimation folder
48 | 3. run "eval.py" to see the performance. (Optional)
49 | 4. if needed, run "hpcp_dcp.py" to gain hpcp and dcp chorma feature
50 |
51 | Note that the amount of annotation files will dominate the amount of evaluation. To see details in "run_all.m" and "eval.py".
52 | Note that there are existing results in estimation folder, the parameter is default (see below).
53 | Note that for the reason of copyright, I won't put any audio files here.
54 |
55 | ## Algorithms, Features & Performance
56 | ### Algorithms
57 | * Segmentation
58 | 1. Structure Feature (2012) (default) [1]
59 | 2. Checkboard Kernel (2000) [2]
60 | * Labeling
61 | 1. Structure Feature (2014) [6]
62 |
63 | Generally, it's recommended to use the first one - "Structure Feature". It's still one of most effective segmentation algorithms. However, Checkboard Kernel is simple to implement :).
64 | ### Features
65 | From Chroma Toolbox: CLP (default), CENS, CRP
66 | From Madmom: HPCP, DCP
67 |
68 | To see the influence on performance of chroma feature, please refer to [3]
69 | Note that there are no MFCC feature, but my function accept customized feature as input.
70 | ### Performance
71 | * dataset:
72 | Beatles (174 songs)
73 | * parameters (default):
74 | Chroma Feature: winLenSTMSP = 4410
75 | Structure Feature (SF): (m, k, st) = (2.5, 0.04, 30)
76 | Checkboard Kernel (foote): winLen = 64
77 | * evaluation (by mir_eval):
78 | Segmentaion (Seg): F-measure with 3s tolerance
79 | Labeling (Lab): Pairwise Precision
80 |
81 | | Algo | Feature | Seg | Lab |
82 | | ------------- |:-------------:| --------:|--------:|
83 | | SF | CENS | 0.711 | 0.692 |
84 | | | CLP | 0.695 | 0.660 |
85 | | | CRP | 0.694 | 0.650 |
86 | | | HPCP | 0.630 | 0.600 |
87 | | | HPCP | 0.689 | 0.645 |
88 | | Foote | CENS | 0.448 | -- |
89 | | | CLP | 0.440 | -- |
90 | | | CRP | 0.423 | -- |
91 |
92 | I think the performance of foote is not good enough. Maybe somewhere is wrong.
93 |
94 | ## References
95 | 1. Serrà, J., Müller, M., Grosche, P., & Arcos, J. L. (2012). Unsupervised Detection of Music Boundaries by Time Series Structure Features. In Proc. of the 26th AAAI Conference on Artificial Intelligence (pp. 1613–1619).Toronto, Canada.
96 | 2. Foote, J. (2000). Automatic Audio Segmentation Using a Measure Of Audio Novelty. In Proc. of the IEEE International Conference of Multimedia and Expo (pp. 452–455). New York City, NY, USA.
97 | 3. Nieto, O., Bello, J. P., Systematic Exploration Of Computational Music Structure Research. Proc. of the 17th International Society for Music Information Retrieval Conference (ISMIR). New York City, NY, USA, 2016.
98 | 4. Meinard Müller and Sebastian Ewert Chroma Toolbox: MATLAB Implementations for Extracting Variants of Chroma-Based Audio Features Proceedings of the International Conference on Music Information Retrieval (ISMIR), 2011.
99 | 5. Colin Raffel, Brian McFee, Eric J. Humphrey, Justin Salamon, Oriol Nieto, Dawen Liang, and Daniel P. W. Ellis, "mir_eval: A Transparent Implementation of Common MIR Metrics", Proceedings of the 15th International Conference on Music Information Retrieval, 2014.
100 | 6. Joan Serra, Meinard M ` uller, Peter Grosche, and Josep Llu´ıs Arcos. Unsupervised Music Structure Annotation by Time Series Structure Features and Segment Similarity.
101 | 7. [http://resources.mpi-inf.mpg.de/MIR/chromatoolbox/] (https://github.com/CPJKU/madmom)
102 |
--------------------------------------------------------------------------------
/papers/00[icme] automatic audio segmentation using a measure of audio novelty.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/00[icme] automatic audio segmentation using a measure of audio novelty.pdf
--------------------------------------------------------------------------------
/papers/09[eecw] Case Study Beatles Songs- What can be Learned from Unreliable Music Alignments.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/09[eecw] Case Study Beatles Songs- What can be Learned from Unreliable Music Alignments.pdf
--------------------------------------------------------------------------------
/papers/10[ismir] State of the Art Report- Audio-Based Music Structure Analysis.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/10[ismir] State of the Art Report- Audio-Based Music Structure Analysis.pdf
--------------------------------------------------------------------------------
/papers/11[taslp] Measuring Structural Similarity in Music.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/11[taslp] Measuring Structural Similarity in Music.pdf
--------------------------------------------------------------------------------
/papers/12[aaai] Unsupervised detection of music boundaries by time series structure features.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/12[aaai] Unsupervised detection of music boundaries by time series structure features.pdf
--------------------------------------------------------------------------------
/papers/13[ismir] A Meta-Analysis of the MIREX Structural Segmentation Task.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/13[ismir] A Meta-Analysis of the MIREX Structural Segmentation Task.pdf
--------------------------------------------------------------------------------
/papers/14[ismir] Boundary detection in music structure analysis using convolutional neural networks.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/14[ismir] Boundary detection in music structure analysis using convolutional neural networks.pdf
--------------------------------------------------------------------------------
/papers/14[ismir] Perceptual analysis of the f-measure for evaluating section boundaries in music.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/14[ismir] Perceptual analysis of the f-measure for evaluating section boundaries in music.pdf
--------------------------------------------------------------------------------
/papers/14[tmm] Audio Properties of Perceived Boundaries in Music.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/14[tmm] Audio Properties of Perceived Boundaries in Music.pdf
--------------------------------------------------------------------------------
/papers/14[tmm] Unsupervised Music Structure Annotation by Time Series Structure Features and Segment Similarity.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/14[tmm] Unsupervised Music Structure Annotation by Time Series Structure Features and Segment Similarity.pdf
--------------------------------------------------------------------------------
/papers/15[icassp] Estimating double thumbnails for music recordings.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/15[icassp] Estimating double thumbnails for music recordings.pdf
--------------------------------------------------------------------------------
/papers/15[ismir] Music Boundary Detection Using Neural Networks on Combined Features and Two-Level Annotations.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/15[ismir] Music Boundary Detection Using Neural Networks on Combined Features and Two-Level Annotations.pdf
--------------------------------------------------------------------------------
/papers/16[ismir] systematic exploration of computational music structure research.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/papers/16[ismir] systematic exploration of computational music structure research.pdf
--------------------------------------------------------------------------------
/papers/misc.txt:
--------------------------------------------------------------------------------
1 | 10[ismir] State of the Art Report- Audio-Based Music Structure Analysis
2 | 11[taslp] Measuring Structural Similarity in Music
3 | 12[aaai] Unsupervised detection of music boundaries by time series structure features
4 | 13[ismir] A Meta-Analysis of the MIREX Structural Segmentation Task
5 | 09[eecw] Case Study Beatles Songs- What can be Learned from Unreliable Music Alignments
6 | 14[tmm] Audio Properties of Perceived Boundaries in Music
7 | 14[tmm] Unsupervised Music Structure Annotation by Time Series Structure Features and Segment Similarity
8 | 14[ismir] Boundary detection in music structure analysis using convolutional neural networks
9 | 14[ismir] Perceptual analysis of the f-measure for evaluating section boundaries in music
10 | 15[ismir] Music Boundary Detection Using Neural Networks on Combined Features and Two-Level Annotations
11 | 15[icassp] Estimating double thumbnails for music recordings
12 |
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love.lab:
--------------------------------------------------------------------------------
1 | 0.0000000 0.4400021 silence
2 | 0.4400021 8.8518077 intro
3 | 8.8518077 26.8056203 verse
4 | 26.8056203 44.3453133 verse
5 | 44.3453133 61.6520640 verse
6 | 61.6520640 79.2780319 refrain
7 | 79.2780319 96.0930155 verseS
8 | 96.0930155 113.3911387 refrain
9 | 113.3911387 130.0594549 verse
10 | 130.0594549 147.2626757 refrain
11 | 147.2626757 163.1804000 refrain
12 | 163.1804000 228.4266677 outro
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/11_-_All_You_Need_Is_Love.wav
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love_cens.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/11_-_All_You_Need_Is_Love_cens.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love_clp.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/11_-_All_You_Need_Is_Love_clp.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love_es_foote.lab:
--------------------------------------------------------------------------------
1 | 0.000000 9.292275 unknown
2 | 9.292275 14.687790 unknown
3 | 14.687790 22.581228 unknown
4 | 22.581228 39.067523 unknown
5 | 39.067523 44.163287 unknown
6 | 44.163287 50.158303 unknown
7 | 50.158303 56.253236 unknown
8 | 56.253236 60.549665 unknown
9 | 60.549665 65.845262 unknown
10 | 65.845262 72.639614 unknown
11 | 72.639614 79.833634 unknown
12 | 79.833634 91.124248 unknown
13 | 91.124248 95.120925 unknown
14 | 95.120925 107.110958 unknown
15 | 107.110958 113.605559 unknown
16 | 113.605559 124.296671 unknown
17 | 124.296671 129.092684 unknown
18 | 129.092684 139.783797 unknown
19 | 139.783797 144.679727 unknown
20 | 144.679727 152.473248 unknown
21 | 152.473248 157.369178 unknown
22 | 157.369178 168.459958 unknown
23 | 168.459958 173.156054 unknown
24 | 173.156054 186.744758 unknown
25 | 186.744758 196.536618 unknown
26 | 196.536618 204.230222 unknown
27 | 204.230222 224.213610 unknown
28 |
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love_es_sf.lab:
--------------------------------------------------------------------------------
1 | 0.000000 22.151422 unknown
2 | 22.151422 43.105470 unknown
3 | 43.105470 61.165864 unknown
4 | 61.165864 77.430197 unknown
5 | 77.430197 95.191247 unknown
6 | 95.191247 111.655142 unknown
7 | 111.655142 129.515974 unknown
8 | 129.515974 145.281400 unknown
9 | 145.281400 163.142232 unknown
10 | 163.142232 184.894530 unknown
11 | 184.894530 209.340919 unknown
12 | 209.340919 226.902407 unknown
13 |
--------------------------------------------------------------------------------
/segmentation_toolbox/11_-_All_You_Need_Is_Love_es_sf_label.lab:
--------------------------------------------------------------------------------
1 | 0.000000 26.142670 A
2 | 26.142670 43.504595 B
3 | 43.504595 61.265646 B
4 | 61.265646 78.028884 C
5 | 78.028884 95.989497 B
6 | 95.989497 112.253829 C
7 | 112.253829 129.316411 B
8 | 129.316411 146.378993 C
9 | 146.378993 163.541357 C
10 | 163.541357 195.072210 D
11 | 195.072210 209.740044 E
12 | 209.740044 226.902407 F
13 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusHalf.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusHalf.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusQuarter.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusQuarter.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThird.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThird.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThreeQuarters.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThreeQuarters.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusTwoThird.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/MIDI_FB_ellip_pitch_60_96_22050_Q25_minusTwoThird.mat
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/audio_to_pitch_via_FB.m:
--------------------------------------------------------------------------------
1 | function [f_pitch,sideinfo] = audio_to_pitch_via_FB(f_audio,parameter,sideinfo)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: audio_to_pitch_via_FB
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Computing and saving of pitch features via a pre-designed filterbank.
9 | % features. For each window length specified via parameter.winLenSTMSP
10 | % the following is computed:
11 | % - STMSP (short-time mean-square power) for each MIDI pitch between
12 | % parameter.midiMin and parameter.midiMax
13 | % - STMSP subbands are stored in f_pitch, where f_pitch(p,:) contains
14 | % STMSP of subband of pitch p
15 | % - sideinfo contains information of original pcm, which is saved along
16 | % with f_pitch into a single mat-file
17 | % - Information f_pitch and sideinfo is stored in mat-file:
18 | % save(strcat(parameter.saveDir,parameter.saveFilename),'f_pitch','sideinfo');
19 | %
20 | % Input:
21 | % f_audio
22 | % parameter.winLenSTMSP = 4410;
23 | % parameter.shiftFB = 0;
24 | % parameter.midiMin = 21;
25 | % parameter.midiMax = 108;
26 | % parameter.save = 0;
27 | % parameter.saveDir = '';
28 | % parameter.saveFilename = '';
29 | % parameter.saveAsTuned = 0;
30 | % parameter.fs = 22050;
31 | % parameter.visualize = 0;
32 | %
33 | % Required files:
34 | % 'MIDI_FB_ellip_pitch_60_96_22050_Q25.mat'
35 | % 'MIDI_FB_ellip_pitch_60_96_22050_Q25_minusHalf.mat'
36 | % 'MIDI_FB_ellip_pitch_60_96_22050_Q25_minusQuarter.mat'
37 | % 'MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThird.mat'
38 | % 'MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThreeQuarters.mat'
39 | % 'MIDI_FB_ellip_pitch_60_96_22050_Q25_minusTwoThird.mat'
40 | %
41 | % Output:
42 | % f_pitch
43 | % sideinfo
44 | %
45 | %
46 | % License:
47 | % This file is part of 'Chroma Toolbox'.
48 | %
49 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
50 | % it under the terms of the GNU General Public License as published by
51 | % the Free Software Foundation, either version 2 of the License, or
52 | % (at your option) any later version.
53 | %
54 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
55 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
56 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 | % GNU General Public License for more details.
58 | %
59 | % You should have received a copy of the GNU General Public License
60 | % along with 'Chroma Toolbox'. If not, see .
61 | %
62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 |
64 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65 | % Check parameters
66 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67 |
68 | if nargin<3
69 | sideinfo=[];
70 | end
71 |
72 | if nargin<2
73 | parameter=[];
74 | end
75 | if isfield(parameter,'visualize')==0
76 | parameter.visualize = 0;
77 | end
78 | if isfield(parameter,'save')==0
79 | parameter.save = 0;
80 | end
81 | if isfield(parameter,'saveDir')==0
82 | parameter.saveDir = '';
83 | end
84 | if isfield(parameter,'saveFilename')==0
85 | parameter.saveFilename = '';
86 | end
87 | if isfield(parameter,'saveAsTuned')==0
88 | parameter.saveAsTuned = 0;
89 | end
90 | if isfield(parameter,'fs')==0
91 | parameter.fs = 22050;
92 | else
93 | if parameter.fs ~= 22050
94 | error('audio_to_pitch_via_FB not implemented yet for sample rates other than 22050.');
95 | end
96 | end
97 | if isfield(parameter,'midiMin')==0
98 | parameter.midiMin = 21;
99 | end
100 | if isfield(parameter,'midiMax')==0
101 | parameter.midiMax = 108;
102 | end
103 | if isfield(parameter,'winLenSTMSP')==0
104 | parameter.winLenSTMSP = 4410;
105 | %parameter.winLenSTMSP = [882 4410];
106 | end
107 | if isfield(parameter,'shiftFB')==0
108 | parameter.shiftFB = 0;
109 | end
110 |
111 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 | % Main program
113 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114 |
115 | if parameter.shiftFB == 0
116 | load MIDI_FB_ellip_pitch_60_96_22050_Q25.mat
117 | elseif parameter.shiftFB == 1
118 | load MIDI_FB_ellip_pitch_60_96_22050_Q25_minusQuarter.mat
119 | elseif parameter.shiftFB == 2
120 | load MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThird.mat
121 | elseif parameter.shiftFB == 3
122 | load MIDI_FB_ellip_pitch_60_96_22050_Q25_minusHalf.mat
123 | elseif parameter.shiftFB == 4
124 | load MIDI_FB_ellip_pitch_60_96_22050_Q25_minusTwoThird.mat
125 | elseif parameter.shiftFB == 5
126 | load MIDI_FB_ellip_pitch_60_96_22050_Q25_minusThreeQuarters.mat
127 | else
128 | error('Wrong shift parameter!')
129 | end
130 |
131 | fs_pitch = zeros(1,128);
132 | fs_index = zeros(1,128);
133 |
134 | fs_pitch(21:59) = 882;
135 | fs_pitch(60:95) = 4410;
136 | fs_pitch(96:120) = 22050;
137 |
138 | fs_index(21:59) = 3;
139 | fs_index(60:95) = 2;
140 | fs_index(96:120) = 1;
141 |
142 | pcm_ds = cell(3,1);
143 | pcm_ds{1} = f_audio;
144 | pcm_ds{2} = resample(pcm_ds{1},1,5,100);
145 | pcm_ds{3} = resample(pcm_ds{2},1,5,100);
146 |
147 | fprintf('Computing subbands and STMSP for all pitches: (%i-%i): %4i',parameter.midiMin,parameter.midiMax,0);
148 |
149 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150 | % Compute features for all pitches
151 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152 |
153 | winLenSTMSP = parameter.winLenSTMSP;
154 | winOvSTMSP = round(winLenSTMSP/2);
155 | featureRate = parameter.fs./(winLenSTMSP-winOvSTMSP); %formerly win_res
156 | wav_size = size(f_audio,1);
157 |
158 | num_window = length(winLenSTMSP);
159 | f_pitch_energy = cell(num_window,1);
160 | seg_pcm_num = cell(num_window,1);
161 | seg_pcm_start = cell(num_window,1);
162 | seg_pcm_stop = cell(num_window,1);
163 | for w=1:num_window;
164 | step_size = winLenSTMSP(w)-winOvSTMSP(w);
165 | group_delay = round(winLenSTMSP(w)/2);
166 | seg_pcm_start{w} = [1 1:step_size:wav_size]'; %group delay is adjusted
167 | seg_pcm_stop{w} = min(seg_pcm_start{w}+winLenSTMSP(w),wav_size);
168 | seg_pcm_stop{w}(1) = min(group_delay,wav_size);
169 | seg_pcm_num{w} = size(seg_pcm_start{w},1);
170 | f_pitch_energy{w} = zeros(120,seg_pcm_num{w});
171 | end
172 |
173 |
174 | for p=parameter.midiMin:parameter.midiMax
175 | fprintf('\b\b\b\b');fprintf('%4i',p);
176 | index = fs_index(p);
177 | f_filtfilt = filtfilt(h(p).b, h(p).a, pcm_ds{index});
178 | f_square = f_filtfilt.^2;
179 |
180 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 | % f_pitch_energy
182 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183 | for w=1:length(winLenSTMSP)
184 | factor = (parameter.fs/fs_pitch(p)); %adjustment for sampling rate
185 | for k=1:seg_pcm_num{w}
186 | start = ceil((seg_pcm_start{w}(k)/parameter.fs)*fs_pitch(p));
187 | stop = floor((seg_pcm_stop{w}(k)/parameter.fs)*fs_pitch(p));
188 | f_pitch_energy{w}(p,k)=sum(f_square(start:stop))*factor;
189 | end
190 | end
191 | end
192 | fprintf('\n');
193 |
194 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 | % Save f_pitch_energy for each window size separately as f_pitch
196 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197 | sideinfo.pitch.version = 1;
198 | sideinfo.pitch.midiMin = parameter.midiMin;
199 | sideinfo.pitch.midiMax = parameter.midiMax;
200 | if parameter.save == 1
201 | for w=1:num_window;
202 | f_pitch = f_pitch_energy{w};
203 | sideinfo.pitch.winLenSTMSP = winLenSTMSP(w);
204 | sideinfo.pitch.winOvSTMSP = winOvSTMSP(w);
205 | sideinfo.pitch.featureRate = featureRate(w);
206 | sideinfo.pitch.shiftFB = parameter.shiftFB;
207 | sideinfo.pitch.featuresAreTuned = 0;
208 | if parameter.saveAsTuned
209 | sideinfo.pitch.featuresAreTuned = 1;
210 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)));
211 | else
212 | switch(parameter.shiftFB)
213 | case 0
214 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)));
215 | case 1
216 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)),'_minusQuarter');
217 | case 2
218 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)),'_minusThird');
219 | case 3
220 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)),'_minusHalf');
221 | case 4
222 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)),'_minusTwoThird');
223 | case 5
224 | filename = strcat(parameter.saveFilename,'_pitch_',num2str(winLenSTMSP(w)),'_minusThreeQuarter');
225 | end
226 | end
227 | save(strcat(parameter.saveDir,filename),'f_pitch','sideinfo');
228 | end
229 | else
230 | f_pitch = f_pitch_energy{num_window};
231 | sideinfo.pitch.winLenSTMSP = winLenSTMSP(num_window);
232 | sideinfo.pitch.winOvSTMSP = winOvSTMSP(num_window);
233 | sideinfo.pitch.featureRate = featureRate(num_window);
234 | sideinfo.pitch.shiftFB = parameter.shiftFB;
235 | end
236 |
237 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238 | % Visualization
239 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
240 | if parameter.visualize == 1
241 | for w=1:num_window;
242 | parameterVis.featureRate = featureRate(w);
243 | visualizePitch(f_pitch_energy{w},parameterVis);
244 | end
245 | end
246 |
247 | end
248 |
249 |
250 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/demoChromaToolbox.m:
--------------------------------------------------------------------------------
1 | clear
2 | close all
3 |
4 | filename = 'Systematic_Chord-C-Major_Eight-Instruments.wav';
5 | [f_audio,sideinfo] = wav_to_audio('', 'data_WAV/', filename);
6 | shiftFB = estimateTuning(f_audio);
7 |
8 | paramPitch.winLenSTMSP = 4410;
9 | paramPitch.shiftFB = shiftFB;
10 | paramPitch.visualize = 1;
11 | [f_pitch,sideinfo] = ...
12 | audio_to_pitch_via_FB(f_audio,paramPitch,sideinfo);
13 |
14 | paramCP.applyLogCompr = 0;
15 | paramCP.visualize = 1;
16 | paramCP.inputFeatureRate = sideinfo.pitch.featureRate;
17 | [f_CP,sideinfo] = pitch_to_chroma(f_pitch,paramCP,sideinfo);
18 |
19 | paramCLP.applyLogCompr = 1;
20 | paramCLP.factorLogCompr = 100;
21 | paramCLP.visualize = 1;
22 | paramCLP.inputFeatureRate = sideinfo.pitch.featureRate;
23 | [f_CLP,sideinfo] = pitch_to_chroma(f_pitch,paramCLP,sideinfo);
24 |
25 | paramCENS.winLenSmooth = 21;
26 | paramCENS.downsampSmooth = 5;
27 | paramCENS.visualize = 1;
28 | paramCENS.inputFeatureRate = sideinfo.pitch.featureRate;
29 | [f_CENS,sideinfo] = pitch_to_CENS(f_pitch,paramCENS,sideinfo);
30 |
31 | paramCRP.coeffsToKeep = [55:120];
32 | paramCRP.visualize = 1;
33 | paramCRP.inputFeatureRate = sideinfo.pitch.featureRate;
34 | [f_CRP,sideinfo] = pitch_to_CRP(f_pitch,paramCRP,sideinfo);
35 |
36 | paramSmooth.winLenSmooth = 21;
37 | paramSmooth.downsampSmooth = 5;
38 | paramSmooth.inputFeatureRate = sideinfo.CRP.featureRate;
39 | [f_CRPSmoothed, featureRateSmoothed] = ...
40 | smoothDownsampleFeature(f_CRP,paramSmooth);
41 | parameterVis.featureRate = featureRateSmoothed;
42 | visualizeCRP(f_CRPSmoothed,parameterVis);
43 |
44 |
45 | % filename = 'Systematic_Chord-C-Major_Eight-Instruments.wav';
46 | % [f_audio,sideinfo] = wav_to_audio('', 'data_WAV/', filename);
47 | % shiftFB = estimateTuning(f_audio);
48 | %
49 | % paramPitch.win_len = 4410;
50 | % paramPitch.shiftFB = shiftFB;
51 | % paramPitch.visualize = 1;
52 | % [f_pitch,sideinfo] = ...
53 | % audio_to_pitch_via_FB(f_audio,paramPitch,sideinfo);
54 | %
55 | % paramCP.applyLogCompr = 0;
56 | % paramCP.visualize = 1;
57 | % paramCP.inputFeatureRate = sideinfo.pitch.featureRate;
58 | % [f_CP,sideinfo] = pitch_to_chroma(f_pitch,paramCP,sideinfo);
59 | %
60 | % paramCLP.applyLogCompr = 1;
61 | % paramCLP.logParamMult = 100;
62 | % paramCLP.visualize = 1;
63 | % paramCLP.inputFeatureRate = sideinfo.pitch.featureRate;
64 | % [f_CLP,sideinfo] = pitch_to_chroma(f_pitch,paramCLP,sideinfo);
65 | %
66 | % paramCENS.stat_window_length = 21;
67 | % paramCENS.stat_downsample = 5;
68 | % paramCENS.visualize = 1;
69 | % paramCENS.inputFeatureRate = sideinfo.pitch.featureRate;
70 | % [f_CENS,sideinfo] = pitch_to_CENS(f_pitch,paramCENS,sideinfo);
71 | %
72 | % paramCRP.coeffsToKeep = [55:120];
73 | % paramCRP.visualize = 1;
74 | % paramCRP.inputFeatureRate = sideinfo.pitch.featureRate;
75 | % [f_CRP,sideinfo] = pitch_to_CRP(f_pitch,paramCRP,sideinfo);
76 | %
77 | % paramSmooth.stat_window_length = 21;
78 | % paramSmooth.stat_downsample = 5;
79 | % paramSmooth.inputFeatureRate = sideinfo.CRP.featureRate;
80 | % [f_CRPSmoothed, featureRateSmoothed] = ...
81 | % smoothDownsampleFeature(f_CRP,paramSmooth);
82 | % parameterVis.featureRate = featureRateSmoothed;
83 | % visualize_CRP(f_CRPSmoothed,parameterVis);
84 |
85 |
86 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/estimateTuning.m:
--------------------------------------------------------------------------------
1 | function [shiftFB,centerA4,tuningSemitones,sideinfo] = estimateTuning(f_input,parameter,sideinfo)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: estimateTuning
4 | % Date of Revision: 2011-03
5 | % Programmer: Sebastian Ewert
6 | %
7 | % Description:
8 | % - input is either a mono audio signal or a real valued spectrogram (magnitude or power)
9 | % - if input is a spectrogram you have to set parameter.timeinfo and
10 | % parameter.freqinfo (vectors defining the time and freq centers for each spectrogram bin)
11 | % - if input is an audio signal, a sampling freq of 22050 Hz is assumed
12 | % - guesses the tuning according to a simple energy maximizing criterion
13 | % - output is either: what shiftFB is best to use (shiftFB \in [0:5]).
14 | % Alternatively, the center freq for A4 is given which can be used to
15 | % specify a filterbank on your own. The second option is more fine
16 | % grained.
17 | % Alternatively, it gives a tuning in semitones, which can
18 | % easily be shifted cyclicly. For example: a tuning of -19/20 is more likely to be
19 | % +1/20 Tuning difference.
20 | % - parameter.numAdditionalTunings: how many tunings besides the fixed shiftFB ones
21 | % to test. For example: If set to 3, than three additional tuning settings are
22 | % tested for, located at 1/4, 2/4 and 3/4 semitones below the reference
23 | % tuning. If set to 5, then at 1/6, 2/6,..., 5/6 semitones.
24 | % - parameter.pitchRange specifies which pitches are considered for the
25 | % tuning estimation.
26 | % - parameter.pitchWeights: each pitch is considered according to a weight
27 | % - Middle pitches are considered as being more important per default because
28 | % here the frequency resolution is high enough. Additionally the piano has
29 | % a consistent tuning only for middle pitches.
30 | %
31 | % Input:
32 | % f_input
33 | % parameter.numAdditionalTunings = 0;
34 | % parameter.pitchRange = [21:108];
35 | % parameter.pitchWeights = gausswin(length(parameter.pitchRange)).^2;
36 | % parameter.fftWindowLength = 8192;
37 | % parameter.windowFunction = @hanning;
38 | % sideinfo
39 | %
40 | % Output:
41 | % shiftFB
42 | % centerA4
43 | % tuningSemitones
44 | % sideinfo
45 | %
46 | % License:
47 | % This file is part of 'Chroma Toolbox'.
48 | %
49 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
50 | % it under the terms of the GNU General Public License as published by
51 | % the Free Software Foundation, either version 2 of the License, or
52 | % (at your option) any later version.
53 | %
54 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
55 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
56 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 | % GNU General Public License for more details.
58 | %
59 | % You should have received a copy of the GNU General Public License
60 | % along with 'Chroma Toolbox'. If not, see .
61 | %
62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64 | % Check parameters
65 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 |
67 | if nargin<2
68 | parameter=[];
69 | end
70 | if nargin<1
71 | error('Please specify input data');
72 | end
73 |
74 | if isfield(parameter,'numAdditionalTunings')==0
75 | parameter.numAdditionalTunings = 0;
76 | end
77 | if isfield(parameter,'pitchRange')==0
78 | % Which pitches to consider during the estimation
79 | parameter.pitchRange = [21:108];
80 | end
81 | if isfield(parameter,'pitchWeights')==0
82 | % assign a weight to each pitch specified in parameter.pitchRange to
83 | % specify it's importance
84 | parameter.pitchWeights = gausswin(length(parameter.pitchRange)).^2;
85 | end
86 |
87 | % the following parameters are only for audio signal input
88 | if isfield(parameter,'fftWindowLength')==0
89 | parameter.fftWindowLength = 8192;
90 | end
91 | if isfield(parameter,'windowFunction')==0
92 | parameter.windowFunction = @hanning; % only tested with hanning.
93 | end
94 |
95 | if min(size(f_input)) == 1
96 | inputIsAudioSignal = 1;
97 | else
98 | inputIsAudioSignal = 0;
99 | end
100 |
101 | if ~inputIsAudioSignal
102 | if isfield(parameter,'freqinfo')==0
103 | error('When using a spectrogram input you have to set parameter.freqinfo');
104 | end
105 | end
106 |
107 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 | % Main program
109 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110 |
111 | numTunings = 6 + parameter.numAdditionalTunings;
112 | referenceFreqsA4 = zeros(numTunings,1);
113 | tunings = zeros(numTunings,1);
114 |
115 | tunings(1) = 0;
116 | tunings(2) = -1/4;
117 | tunings(3) = -1/3;
118 | tunings(4) = -1/2;
119 | tunings(5) = -2/3;
120 | tunings(6) = -3/4;
121 | for k=1:parameter.numAdditionalTunings
122 | tunings(k+6) = -k/(parameter.numAdditionalTunings+1);
123 | end
124 | referenceFreqsA4 = 2.^((69-69+tunings)/12) * 440;
125 |
126 | if inputIsAudioSignal
127 | [s,f,t] = spectrogram(f_input, parameter.windowFunction(parameter.fftWindowLength), parameter.fftWindowLength/2, parameter.fftWindowLength, 22050);
128 | else
129 | s = f_input;
130 | f = parameter.freqinfo;
131 | end
132 | s = abs(s);
133 |
134 | directFreqBinSearch = 0;
135 | if all( (f(2:end)-f(1:end-1)) - (f(2)-f(1)) < eps )
136 | directFreqBinSearch = 1;
137 | end
138 |
139 | averagedPowerSpectrogram = sum(s.^2,2);
140 | totalPitchEnergyViaSpec = zeros(numTunings,1);
141 | for tu=1:numTunings
142 | centerfreqs = 2.^((parameter.pitchRange-69)/12) * referenceFreqsA4(tu);
143 | upperborderfreqs = 2.^((parameter.pitchRange-68.5)/12) * referenceFreqsA4(tu);
144 | lowerborderfreqs = 2.^((parameter.pitchRange-69.5)/12) * referenceFreqsA4(tu);
145 |
146 | % build triangular filterbank for magnitude spectrogram
147 | spectrogramFilter = zeros(length(f),1);
148 | for k=1:length(parameter.pitchRange)
149 | c = getCorrespondingBin(f,centerfreqs(k),directFreqBinSearch);
150 | u = getCorrespondingBin(f,upperborderfreqs(k),directFreqBinSearch);
151 | l = getCorrespondingBin(f,lowerborderfreqs(k),directFreqBinSearch);
152 |
153 | % order is important here. If third parameter is < 2, then linspace
154 | % returns the second parameter
155 | spectrogramFilter(c:u) = parameter.pitchWeights(k) * linspace(1,0,u-c+1);
156 | spectrogramFilter(l:c) = parameter.pitchWeights(k) * linspace(0,1,c-l+1);
157 | end
158 |
159 | totalPitchEnergyViaSpec(tu) = sum(spectrogramFilter.^2 .* averagedPowerSpectrogram);
160 | end
161 |
162 | [ignoreMe, maxIndex] = max(totalPitchEnergyViaSpec(1:6));
163 | shiftFB = maxIndex-1;
164 |
165 | [ignoreMe, maxIndex] = max(totalPitchEnergyViaSpec);
166 | centerA4 = referenceFreqsA4(maxIndex);
167 | tuningSemitones = tunings(maxIndex);
168 |
169 | sideinfo.tuning.shiftFB = shiftFB;
170 | sideinfo.tuning.centerA4 = centerA4;
171 | sideinfo.tuning.tuningSemitones = tuningSemitones;
172 | sideinfo.tuning.method = 'estimateTuningV1';
173 | sideinfo.tuning.numAdditionalTunings = parameter.numAdditionalTunings;
174 | sideinfo.tuning.pitchRange = parameter.pitchRange;
175 | sideinfo.tuning.pitchWeights = parameter.pitchWeights;
176 | sideinfo.tuning.fftWindowLength = parameter.fftWindowLength;
177 | sideinfo.tuning.windowFunction = parameter.windowFunction;
178 | sideinfo.tuning.inputWasAudioSignal = inputIsAudioSignal;
179 |
180 | end
181 |
182 | function index = getCorrespondingBin(x,sval,directSearch)
183 | % - Finds the entry in x with the smallest absolute distance to sval.
184 | % - x is assumed to be sorted (ascending)
185 | % - 'directSearch' means that all values in x are equally spaced
186 | % - x is assumed to be at least of length 2.
187 | % - If directSearch==0 then we use binary seach to find the entry
188 | %
189 | % You can test the correctness of this procedure by comparing it against
190 | % the result of: [ignoreMe index] = min(abs(x-sval))
191 | %
192 | % Author: Sebastian Ewert
193 |
194 | if sval >= x(end)
195 | index = length(x);
196 | return;
197 | elseif sval <= x(1)
198 | index = 1;
199 | return;
200 | end
201 |
202 |
203 | if directSearch
204 | index = round( (sval-x(1)) / (x(2)-x(1))) + 1;
205 | else
206 | from=1;
207 | to=length(x);
208 |
209 | while from<=to
210 | mid = round((from + to)/2);
211 | diff = x(mid)-sval;
212 | if diff<0 % x(mid) < sval
213 | from=mid;
214 | else % x(mid) => sval
215 | to=mid;
216 | end
217 |
218 | if to-from==1
219 | break;
220 | end
221 | end
222 | if abs(x(from)-sval) < abs(x(to)-sval)
223 | index = from;
224 | else
225 | index = to;
226 | end
227 | end
228 |
229 | end
230 |
231 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/generateMultiratePitchFilterbank.m:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Generating filter bank of filters corresponding MIDI pitches
3 | %
4 | % Pitches 21-59, fs = 882
5 | % Pitches 60-95, fs = 4410
6 | % Pitches 96-120, fs =22050
7 | %
8 | % Q (center frequency) / bandwidt, Q > 30 separates notes
9 | % stop: pass_rel = 1/(2*Q); stop_rel = stop*pass_rel;
10 | % Rp loses no more than Rp dB in the passband
11 | % Rs attenuation in the stopband in dB
12 | %
13 | % For details to filter desgin use MATLAB help function
14 | % e.g., "help ellipord" and "help ellip"
15 | %
16 | % Attention: Construction of [b,a] may fail if the
17 | % filter specification are too restrictive
18 | %
19 | %
20 | % License:
21 | % This file is part of 'Chroma Toolbox'.
22 | %
23 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
24 | % it under the terms of the GNU General Public License as published by
25 | % the Free Software Foundation, either version 2 of the License, or
26 | % (at your option) any later version.
27 | %
28 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
29 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
30 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 | % GNU General Public License for more details.
32 | %
33 | % You should have received a copy of the GNU General Public License
34 | % along with 'Chroma Toolbox'. If not, see .
35 | %
36 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 |
38 | clear;
39 |
40 | semitoneOffsets = [0, -0.25, -1/3, -0.5, -2/3, -0.75];
41 | nameSuffixes = {''; '_minusQuarter'; '_minusThird'; '_minusHalf'; '_minusTwoThird'; '_minusThreeQuarters'};
42 |
43 | for k=1:length(semitoneOffsets)
44 |
45 |
46 | midi = (1:128); % midi notes
47 | midi_freq = 2.^((midi-69+semitoneOffsets(k))/12)*440; % computing frequencies of midi notes
48 | nameSuffix = nameSuffixes{k};
49 | h(120)=struct('a',[],'b',[]);
50 |
51 | disp(['Generating Filterbank: ',nameSuffix]);
52 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 | % fs = 22005, pitches 96-120
54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 | fs = 22050;
56 | nyq = fs/2;
57 | midi_min = 96;
58 | midi_max = 120;
59 | Q = 25; stop = 2; Rp = 1; Rs = 50;
60 | pass_rel = 1/(2*Q);
61 | stop_rel = pass_rel*stop;
62 |
63 | for k = midi_min:midi_max;
64 | pitch = midi_freq(k);
65 | Wp = [pitch-pass_rel*pitch pitch+pass_rel*pitch]/nyq;
66 | Ws = [pitch-stop_rel*pitch pitch+stop_rel*pitch]/nyq;
67 | [n Wn]=ellipord(Wp,Ws,Rp,Rs);
68 | [h(k).b,h(k).a]=ellip(n,Rp,Rs,Wn);
69 | end
70 | num = midi_max-midi_min+1;
71 | h_fvtool = cell(2*num,1);
72 | for i = 1:num
73 | h_fvtool{2*i-1}=h(midi_min+i-1).b;
74 | h_fvtool{2*i}=h(midi_min+i-1).a;
75 | end
76 | fvtool(h_fvtool{:});
77 |
78 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79 | % fs = 4410, pitches 60-95
80 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81 | fs = 4410;
82 | nyq = fs/2;
83 | midi_min = 60;
84 | midi_max = 95;
85 | Q = 25; stop = 2; Rp = 1; Rs = 50;
86 | pass_rel = 1/(2*Q);
87 | stop_rel = pass_rel*stop;
88 |
89 | for k = midi_min:midi_max;
90 | pitch = midi_freq(k);
91 | Wp = [pitch-pass_rel*pitch pitch+pass_rel*pitch]/nyq;
92 | Ws = [pitch-stop_rel*pitch pitch+stop_rel*pitch]/nyq;
93 | [n Wn]=ellipord(Wp,Ws,Rp,Rs);
94 | [h(k).b,h(k).a]=ellip(n,Rp,Rs,Wn);
95 | end
96 | num = midi_max-midi_min+1;
97 | h_fvtool = cell(2*num,1);
98 | for i = 1:num
99 | h_fvtool{2*i-1}=h(midi_min+i-1).b;
100 | h_fvtool{2*i}=h(midi_min+i-1).a;
101 | end
102 | fvtool(h_fvtool{:});
103 |
104 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105 | % fs = 882, pitches 21-59
106 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 | fs = 882;
108 | nyq = fs/2;
109 | midi_min = 21;
110 | midi_max = 59;
111 | Q = 25; stop = 2; Rp = 1; Rs = 50;
112 | pass_rel = 1/(2*Q);
113 | stop_rel = pass_rel*stop;
114 |
115 | for k = midi_min:midi_max;
116 | pitch = midi_freq(k);
117 | Wp = [pitch-pass_rel*pitch pitch+pass_rel*pitch]/nyq;
118 | Ws = [pitch-stop_rel*pitch pitch+stop_rel*pitch]/nyq;
119 | [n Wn]=ellipord(Wp,Ws,Rp,Rs);
120 | [h(k).b,h(k).a]=ellip(n,Rp,Rs,Wn);
121 | end
122 | num = midi_max-midi_min+1;
123 | h_fvtool = cell(2*num,1);
124 | for i = 1:num
125 | h_fvtool{2*i-1}=h(midi_min+i-1).b;
126 | h_fvtool{2*i}=h(midi_min+i-1).a;
127 | end
128 | fvtool(h_fvtool{:});
129 |
130 |
131 | save(['MIDI_FB_ellip_pitch_60_96_22050_Q25',nameSuffix],'h','-V6');
132 |
133 | end
134 |
135 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/normalizeFeature.m:
--------------------------------------------------------------------------------
1 | function f_featureNorm = normalizeFeature(f_feature,normP, threshold)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: normalizeFeature
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % - Normalizes a feature sequence according to the l^p norm
9 | % - If the norm falls below threshold for a feature vector, then the
10 | % normalized feature vector is set to be the unit vector.
11 | %
12 | % Input:
13 | % f_feature
14 | % normP
15 | % threshold
16 | %
17 | % Output:
18 | % f_featureNorm
19 | %
20 | % License:
21 | % This file is part of 'Chroma Toolbox'.
22 | %
23 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
24 | % it under the terms of the GNU General Public License as published by
25 | % the Free Software Foundation, either version 2 of the License, or
26 | % (at your option) any later version.
27 | %
28 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
29 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
30 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 | % GNU General Public License for more details.
32 | %
33 | % You should have received a copy of the GNU General Public License
34 | % along with 'Chroma Toolbox'. If not, see .
35 | %
36 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 |
38 | f_featureNorm = zeros(size(f_feature));
39 |
40 | % normalise the vectors according to the l^p norm
41 | unit_vec = ones(1,12);
42 | unit_vec = unit_vec/norm(unit_vec,normP);
43 | for k=1:size(f_feature,2);
44 | n = norm(f_feature(:,k),normP);
45 | if n < threshold
46 | f_featureNorm(:,k) = unit_vec;
47 | else
48 | f_featureNorm(:,k) = f_feature(:,k)/n;
49 | end
50 | end
51 |
52 | end
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/pitch_to_CENS.m:
--------------------------------------------------------------------------------
1 | function [f_CENS,sideinfo] = pitch_to_CENS(f_pitch,parameter,sideinfo)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: pitch_to_CENS
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Normalized statistical chroma-based energy distribution feature (CENS).
9 | % The following is computed:
10 | % * energy for each chroma band
11 | % * normalisation of the chroma vectors
12 | % * local statistics:
13 | % - component-wise quantisation of the normalized chroma vectors
14 | % - upfirdn filters and downsamples each column of f_stat_help
15 | % - normalize each vector with its l^2 norm
16 | %
17 | % Remark:
18 | % * parameter.inputFeatureRate specifies the feature rate of f_pitch. The value
19 | % is used to derive the output feature rate given via sideinfo.
20 | %
21 | % Input:
22 | % f_pitch
23 | % parameter.quantSteps = [40 20 10 5] / 100;
24 | % parameter.quantWeights = [ 1 1 1 1]/4;
25 | % parameter.normThresh = 0.001;
26 | % parameter.winLenSmooth = 41;
27 | % parameter.downsampSmooth = 10;
28 | % parameter.midiMin = 21;
29 | % parameter.midiMax = 108;
30 | % parameter.inputFeatureRate = 0;
31 | % parameter.save = 0;
32 | % parameter.saveDir = '';
33 | % parameter.saveFilename = '';
34 | % parameter.visualize = 0;
35 | % sideinfo
36 | %
37 | % Output:
38 | % f_CENS
39 | % sideinfo
40 | %
41 | % License:
42 | % This file is part of 'Chroma Toolbox'.
43 | %
44 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
45 | % it under the terms of the GNU General Public License as published by
46 | % the Free Software Foundation, either version 2 of the License, or
47 | % (at your option) any later version.
48 | %
49 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
50 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
51 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 | % GNU General Public License for more details.
53 | %
54 | % You should have received a copy of the GNU General Public License
55 | % along with 'Chroma Toolbox'. If not, see .
56 | %
57 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 |
59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 | % Check parameters
61 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 |
63 | if nargin<3
64 | sideinfo=[];
65 | end
66 | if nargin<2
67 | parameter=[];
68 | end
69 | if nargin<1
70 | error('Please specify input data f_pitch');
71 | end
72 |
73 | if isfield(parameter,'quantSteps')==0
74 | parameter.quantSteps = [40 20 10 5] / 100;
75 | end
76 | if isfield(parameter,'quantWeights')==0
77 | parameter.quantWeights = [ 1 1 1 1]/4;
78 | end
79 | if isfield(parameter,'normThresh')==0
80 | parameter.normThresh = 0.001;
81 | end
82 | if isfield(parameter,'winLenSmooth')==0
83 | parameter.winLenSmooth = 41;
84 | end
85 | if isfield(parameter,'downsampSmooth')==0
86 | parameter.downsampSmooth = 10;
87 | end
88 | if isfield(parameter,'midiMin')==0
89 | parameter.midiMin = 21;
90 | end
91 | if isfield(parameter,'midiMax')==0
92 | parameter.midiMax = 108;
93 | end
94 | if isfield(parameter,'inputFeatureRate')==0
95 | parameter.inputFeatureRate = 0;
96 | end
97 | if isfield(parameter,'save')==0
98 | parameter.save = 0;
99 | end
100 | if isfield(parameter,'saveDir')==0
101 | parameter.saveDir = '';
102 | end
103 | if isfield(parameter,'saveFilename')==0
104 | parameter.saveFilename = '';
105 | end
106 | if isfield(parameter,'visualize')==0
107 | parameter.visualize = 0;
108 | end
109 |
110 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
111 | % Main program
112 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113 |
114 | seg_num = size(f_pitch,2);
115 |
116 | % calculate energy for each chroma band
117 | f_chroma_energy = zeros(12,seg_num);
118 | for p=parameter.midiMin:parameter.midiMax
119 | chroma = mod(p,12)+1;
120 | f_chroma_energy(chroma,:) = f_chroma_energy(chroma,:)+f_pitch(p,:);
121 | end
122 |
123 | % normalize the chroma vectors
124 | f_chroma_energy_distr = zeros(12,seg_num);
125 | for k=1:seg_num
126 | if sum(f_chroma_energy(:,k)>parameter.normThresh)>0
127 | seg_energy_square = sum(f_chroma_energy(:,k));
128 | f_chroma_energy_distr(:,k) = ((f_chroma_energy(:,k))/seg_energy_square);
129 | end
130 | end
131 |
132 | % calculate a CENS feature
133 |
134 | % component-wise quantisation of the normalized chroma vectors
135 | f_stat_help = zeros(12,seg_num);
136 | for n=1:length(parameter.quantSteps)
137 | f_stat_help = f_stat_help + (f_chroma_energy_distr>parameter.quantSteps(n))*parameter.quantWeights(n);
138 | end
139 |
140 | % Temporal smoothing and downsampling
141 | [f_chroma_energy_stat,CENSfeatureRate] = smoothDownsampleFeature(f_stat_help,parameter);
142 |
143 | % last step: normalize each vector with its l^2 norm
144 | f_CENS = normalizeFeature(f_chroma_energy_stat,2, parameter.normThresh);
145 |
146 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147 | % Update sideinfo
148 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149 | sideinfo.CENS.version = 1;
150 | sideinfo.CENS.midiMin = parameter.midiMin;
151 | sideinfo.CENS.midiMax = parameter.midiMax;
152 | sideinfo.CENS.featureRate = CENSfeatureRate;
153 | sideinfo.CENS.quantSteps = parameter.quantSteps;
154 | sideinfo.CENS.quantWeights = parameter.quantWeights;
155 | sideinfo.CENS.normThresh = parameter.normThresh;
156 | sideinfo.CENS.winLenSmooth = parameter.winLenSmooth;
157 | sideinfo.CENS.downsampSmooth = parameter.downsampSmooth;
158 |
159 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160 | % Saving to file
161 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
162 | if parameter.save
163 | filename = strcat(parameter.saveFilename,'_CENS_',num2str(parameter.winLenSmooth),'_',num2str(parameter.downsampSmooth));
164 | save(strcat(parameter.saveDir,filename),'f_CENS','sideinfo');
165 | end
166 |
167 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
168 | % Visualization
169 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170 | if parameter.visualize
171 | parameterVis.featureRate = CENSfeatureRate;
172 | parameterVis.title = 'CENS chromagram';
173 | visualizeChroma(f_CENS,parameterVis)
174 | end
175 |
176 | end
177 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/pitch_to_CRP.m:
--------------------------------------------------------------------------------
1 | function [f_CRP,sideinfo] = pitch_to_CRP(f_pitch,parameter,sideinfo)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: pitch_to_CRP
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % - Calculates CRP (Chroma DCT-reduced Log Pitch) Features
9 | % (see "Towards Timbre-Invariant Audio Features for Harmony-Based Music" by
10 | % Meinard Mueller and Sebastian Ewert)
11 | %
12 | % Remark:
13 | % - parameter.inputFeatureRate specifies the input feature rate. This value is
14 | % used to derive the output feature rate.
15 | %
16 | % Input:
17 | % f_pitch
18 | % parameter.coeffsToKeep = [55:120];
19 | % parameter.applyLogCompr = 1;
20 | % parameter.factorLogCompr = 1000;
21 | % parameter.addTermLogCompr = 1;
22 | % parameter.normP = 2;
23 | % parameter.winLenSmooth = 1;
24 | % parameter.downsampSmooth = 1;
25 | % parameter.normThresh = 10^-6;
26 | % parameter.inputFeatureRate = 0;
27 | % parameter.save = 0;
28 | % parameter.saveDir = '';
29 | % parameter.saveFilename = '';
30 | % parameter.visualize = 0;
31 | % sideinfo
32 | %
33 | % Output:
34 | % f_CRP
35 | % sideinfo
36 | %
37 | % License:
38 | % This file is part of 'Chroma Toolbox'.
39 | %
40 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
41 | % it under the terms of the GNU General Public License as published by
42 | % the Free Software Foundation, either version 2 of the License, or
43 | % (at your option) any later version.
44 | %
45 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
46 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
47 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 | % GNU General Public License for more details.
49 | %
50 | % You should have received a copy of the GNU General Public License
51 | % along with 'Chroma Toolbox'. If not, see .
52 | %
53 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 |
55 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 | % Check parameters
57 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 |
59 | if nargin<3
60 | sideinfo=[];
61 | end
62 | if nargin<2
63 | parameter=[];
64 | end
65 | if nargin<1
66 | error('Please specify input data f_pitch');
67 | end
68 |
69 | if isfield(parameter,'coeffsToKeep')==0
70 | parameter.coeffsToKeep = [55:120];
71 | end
72 | if isfield(parameter,'applyLogCompr')==0
73 | parameter.applyLogCompr = 1;
74 | end
75 | if isfield(parameter,'factorLogCompr')==0
76 | parameter.factorLogCompr = 1000;
77 | end
78 | if isfield(parameter,'addTermLogCompr')==0
79 | parameter.addTermLogCompr = 1;
80 | end
81 | if isfield(parameter,'normP')==0
82 | parameter.normP = 2;
83 | end
84 | if isfield(parameter,'winLenSmooth')==0
85 | parameter.winLenSmooth = 1;
86 | end
87 | if isfield(parameter,'downsampSmooth')==0
88 | parameter.downsampSmooth = 1;
89 | end
90 | if isfield(parameter,'normThresh')==0
91 | parameter.normThresh = 10^-6;
92 | end
93 | if isfield(parameter,'inputFeatureRate')==0
94 | parameter.inputFeatureRate = 0;
95 | end
96 | if isfield(parameter,'save')==0
97 | parameter.save = 0;
98 | end
99 | if isfield(parameter,'saveDir')==0
100 | parameter.saveDir = '';
101 | end
102 | if isfield(parameter,'saveFilename')==0
103 | parameter.saveFilename = '';
104 | end
105 | if isfield(parameter,'visualize')==0
106 | parameter.visualize = 0;
107 | end
108 |
109 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110 | % Main program
111 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 |
113 | seg_num = size(f_pitch,2);
114 |
115 | % log compression
116 | if parameter.applyLogCompr
117 | f_pitch_log = log10(parameter.addTermLogCompr+f_pitch*parameter.factorLogCompr);
118 | else
119 | f_pitch_log = f_pitch;
120 | end
121 |
122 | % DCT based reduction
123 | DCT = internal_DCT(size(f_pitch_log,1));
124 | DCTcut = DCT;
125 | DCTcut(setdiff([1:120],parameter.coeffsToKeep),:) = 0;
126 | DCT_filter = DCT'*DCTcut;
127 | f_pitch_log_DCT = DCT_filter*f_pitch_log;
128 |
129 | % calculate energy for each chroma band
130 | f_CRP = zeros(12,seg_num);
131 | for p=1:120
132 | chroma = mod(p,12)+1;
133 | f_CRP(chroma,:) = f_CRP(chroma,:)+f_pitch_log_DCT(p,:);
134 | end
135 |
136 | % normalize the vectors according to the norm l^p
137 | f_CRP = normalizeFeature(f_CRP,parameter.normP, parameter.normThresh);
138 |
139 | if (parameter.winLenSmooth ~= 1) || (parameter.downsampSmooth ~= 1)
140 | % Temporal smoothing and downsampling
141 | [f_CRP,CrpFeatureRate] = smoothDownsampleFeature(f_CRP,parameter);
142 |
143 | % re-normalize the vectors according to the norm l^p
144 | f_CRP = normalizeFeature(f_CRP,parameter.normP, parameter.normThresh);
145 | else
146 | CrpFeatureRate = parameter.inputFeatureRate;
147 | end
148 |
149 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150 | % Update sideinfo
151 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152 |
153 | sideinfo.CRP.coeffsToKeep = parameter.coeffsToKeep;
154 | sideinfo.CRP.applyLogCompr = parameter.applyLogCompr;
155 | sideinfo.CRP.factorLogCompr = parameter.factorLogCompr;
156 | sideinfo.CRP.addTermLogCompr = parameter.addTermLogCompr;
157 | sideinfo.CRP.normP = parameter.normP;
158 | sideinfo.CRP.winLenSmooth = parameter.winLenSmooth;
159 | sideinfo.CRP.downsampSmooth = parameter.downsampSmooth;
160 | sideinfo.CRP.normThresh = parameter.normThresh;
161 | sideinfo.CRP.featureRate = CrpFeatureRate;
162 |
163 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 | % Saving to file
165 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
166 | if parameter.save
167 | filename = strcat(parameter.saveFilename,'_CRP_',num2str(parameter.winLenSmooth),'_',num2str(parameter.downsampSmooth));
168 | save(strcat(parameter.saveDir,filename),'f_CRP','sideinfo');
169 | end
170 |
171 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
172 | % Visualization
173 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
174 | if parameter.visualize
175 | parameterVis.title = 'CRP chromagram';
176 | parameterVis.featureRate = CrpFeatureRate;
177 | visualizeCRP(f_CRP,parameterVis);
178 | end
179 |
180 | end
181 |
182 | function matrix = internal_DCT(l)
183 |
184 | matrix = zeros(l,l);
185 |
186 | for m = 0:l-1
187 | for n = 0:l-1
188 | matrix(m+1,n+1) = sqrt(2/l)*cos((m*(n+0.5)*pi)/l);
189 | end
190 | end
191 |
192 | matrix(1,:) = matrix(1,:)/sqrt(2);
193 |
194 | end
195 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/pitch_to_chroma.m:
--------------------------------------------------------------------------------
1 | function [f_chroma_norm,sideinfo] = pitch_to_chroma(f_pitch,parameter,sideinfo)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: pitch_to_chroma
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Computes normalized chroma vectors from pitch features
9 | %
10 | % Input:
11 | % f_pitch
12 | % parameter.applyLogCompr = 0;
13 | % parameter.factorLogCompr = 100;
14 | % parameter.addTermLogCompr = 1;
15 | % parameter.winLenSmooth = 1;
16 | % parameter.downsampSmooth = 1;
17 | % parameter.applyNormalization = 1;
18 | % parameter.normP = 2;
19 | % parameter.normThresh = 0.001;
20 | % parameter.midiMin = 1;
21 | % parameter.midiMax = 120;
22 | % parameter.inputFeatureRate = 0;
23 | % parameter.save = 0;
24 | % parameter.save_dir = '';
25 | % parameter.save_filename = '';
26 | % parameter.visualize = 0;
27 | % sideinfo
28 | %
29 | % Output:
30 | % f_chroma_norm
31 | % sideinfo
32 | %
33 | % License:
34 | % This file is part of 'Chroma Toolbox'.
35 | %
36 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
37 | % it under the terms of the GNU General Public License as published by
38 | % the Free Software Foundation, either version 2 of the License, or
39 | % (at your option) any later version.
40 | %
41 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
42 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
43 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 | % GNU General Public License for more details.
45 | %
46 | % You should have received a copy of the GNU General Public License
47 | % along with 'Chroma Toolbox'. If not, see .
48 | %
49 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50 |
51 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 | % Check parameters
53 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 |
55 | if nargin<3
56 | sideinfo=[];
57 | end
58 | if nargin<2
59 | parameter=[];
60 | end
61 | if nargin<1
62 | error('Please specify input data f_pitch');
63 | end
64 |
65 | if isfield(parameter,'applyLogCompr')==0
66 | parameter.applyLogCompr = 0;
67 | end
68 | if isfield(parameter,'factorLogCompr')==0
69 | parameter.factorLogCompr = 100;
70 | end
71 | if isfield(parameter,'addTermLogCompr')==0
72 | parameter.addTermLogCompr = 1;
73 | end
74 | if isfield(parameter,'winLenSmooth')==0
75 | parameter.winLenSmooth = 1;
76 | end
77 | if isfield(parameter,'downsampSmooth')==0
78 | parameter.downsampSmooth = 1;
79 | end
80 | if isfield(parameter,'applyNormalization')==0
81 | parameter.applyNormalization = 1;
82 | end
83 | if isfield(parameter,'normP')==0
84 | parameter.normP = 2;
85 | end
86 | if isfield(parameter,'normThresh')==0
87 | parameter.normThresh = 0.001;
88 | end
89 | if isfield(parameter,'midiMin')==0
90 | parameter.midiMin = 1;
91 | end
92 | if isfield(parameter,'midiMax')==0
93 | parameter.midiMax = 120;
94 | end
95 | if isfield(parameter,'inputFeatureRate')==0
96 | parameter.inputFeatureRate = 0;
97 | end
98 | if isfield(parameter,'save')==0
99 | parameter.save = 0;
100 | end
101 | if isfield(parameter,'save_dir')==0
102 | parameter.save_dir = '';
103 | end
104 | if isfield(parameter,'save_filename')==0
105 | parameter.save_filename = '';
106 | end
107 | if isfield(parameter,'visualize')==0
108 | parameter.visualize = 0;
109 | end
110 |
111 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 | % Main program
113 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114 |
115 | seg_num = size(f_pitch,2);
116 |
117 | if parameter.applyLogCompr
118 | f_pitch = log10(parameter.addTermLogCompr+f_pitch*parameter.factorLogCompr);
119 | end
120 |
121 | % calculate energy for each chroma band
122 | f_chroma = zeros(12,seg_num);
123 | for p=parameter.midiMin:parameter.midiMax
124 | chroma = mod(p,12)+1;
125 | f_chroma(chroma,:) = f_chroma(chroma,:)+f_pitch(p,:);
126 | end
127 |
128 | % Temporal smoothing and downsampling
129 | [f_chroma,chromaFeatureRate] = smoothDownsampleFeature(f_chroma,parameter);
130 |
131 | if parameter.applyNormalization
132 | % normalise the chroma vectors according the norm l^p
133 | f_chroma_norm = normalizeFeature(f_chroma,parameter.normP, parameter.normThresh);
134 | end
135 |
136 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
137 | % Update sideinfo
138 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139 | sideinfo.chroma.applyLogCompr = parameter.applyLogCompr;
140 | sideinfo.chroma.factorLogCompr = parameter.factorLogCompr;
141 | sideinfo.chroma.addTermLogCompr = parameter.addTermLogCompr;
142 | sideinfo.chroma.winLenSmooth = parameter.winLenSmooth;
143 | sideinfo.chroma.downsampSmooth = parameter.downsampSmooth;
144 | sideinfo.chroma.applyNormalization = parameter.applyNormalization;
145 | sideinfo.chroma.normP = parameter.normP;
146 | sideinfo.chroma.normThresh = parameter.normThresh;
147 | sideinfo.chroma.midiMin = parameter.midiMin;
148 | sideinfo.chroma.midiMax = parameter.midiMax;
149 | sideinfo.chroma.chromaFeatureRate = chromaFeatureRate;
150 |
151 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152 | % Saving to file
153 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 | if parameter.save == 1
155 | filename = strcat(parameter.save_filename,'_chroma');
156 | save(strcat(parameter.save_dir,filename),'f_chroma_norm','f_chroma','sideinfo');
157 | end
158 |
159 |
160 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
161 | % Visualization
162 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163 | if parameter.visualize
164 | titleString = 'Chromagram';
165 | imagerange = [0 1];
166 | if parameter.applyLogCompr
167 | titleString = ['Log ', titleString];
168 | end
169 | if parameter.applyNormalization
170 | imagerange = 0;
171 | titleString = ['Normalized ', titleString];
172 | end
173 | parameterVis.imagerange = imagerange;
174 | parameterVis.featureRate = chromaFeatureRate;
175 | parameterVis.title = titleString;
176 | visualizeChroma(f_chroma_norm,parameterVis)
177 | end
178 |
179 | end
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/smoothDownsampleFeature.m:
--------------------------------------------------------------------------------
1 | function [f_feature_stat,newFeatureRate] = smoothDownsampleFeature(f_feature,parameter)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: smoothDownsampleFeature
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % - Temporal smoothing and downsampling of a feature sequence
9 | %
10 | % Remark:
11 | % - parameter.featureRate specifies the input feature rate. This value is
12 | % used to derive the output feature rate.
13 | %
14 | % Input:
15 | % f_feature
16 | % parameter.winLenSmooth = 1;
17 | % parameter.downsampSmooth = 1;
18 | % parameter.inputFeatureRate = 0;
19 | %
20 | % Output:
21 | % f_feature
22 | % newFeatureRate
23 | %
24 | % License:
25 | % This file is part of 'Chroma Toolbox'.
26 | %
27 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
28 | % it under the terms of the GNU General Public License as published by
29 | % the Free Software Foundation, either version 2 of the License, or
30 | % (at your option) any later version.
31 | %
32 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
33 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
34 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 | % GNU General Public License for more details.
36 | %
37 | % You should have received a copy of the GNU General Public License
38 | % along with 'Chroma Toolbox'. If not, see .
39 | %
40 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 |
42 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43 | % Check parameters
44 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 |
46 | if nargin<2
47 | parameter=[];
48 | end
49 | if nargin<1
50 | error('Please specify input data');
51 | end
52 | if isfield(parameter,'winLenSmooth')==0
53 | parameter.winLenSmooth = 1;
54 | end
55 | if isfield(parameter,'downsampSmooth')==0
56 | parameter.downsampSmooth = 1;
57 | end
58 | if isfield(parameter,'inputFeatureRate')==0
59 | parameter.inputFeatureRate = 0;
60 | end
61 |
62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 | % Main program
64 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65 |
66 | % Temporal Smoothing
67 | if (parameter.winLenSmooth ~= 1) || (parameter.downsampSmooth ~= 1)
68 | winLenSmooth = parameter.winLenSmooth;
69 | downsampSmooth = parameter.downsampSmooth;
70 | stat_window = hanning(winLenSmooth);
71 | stat_window = stat_window/sum(stat_window);
72 |
73 | % upfirdn filters and downsamples each column of f_stat_help
74 | f_feature_stat = zeros(size(f_feature));
75 | f_feature_stat = (upfirdn(f_feature',stat_window,1,downsampSmooth))';
76 | seg_num = size(f_feature,2);
77 | stat_num = ceil(seg_num/downsampSmooth);
78 | cut = floor((winLenSmooth-1)/(2*downsampSmooth));
79 | f_feature_stat = f_feature_stat(:,(1+cut:stat_num+cut)); %adjust group delay
80 | else
81 | f_feature_stat = f_feature;
82 | end
83 |
84 | newFeatureRate = parameter.inputFeatureRate / parameter.downsampSmooth;
85 |
86 | end
87 |
88 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/test_convert_audio_to_pitch.m:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Name: test_convert_audio_to_pitchSTMSP.m
3 | % Date of Revision: 2011-03
4 | % Programmer: Meinard Mueller, Sebastian Ewert
5 | %
6 | % Description:
7 | % * Computes pitch subband decomposition of WAV file
8 | % (default: MIDI pitches 21 to 108)
9 | % * each pitch subband contains short time mean-square power (STMSP)
10 | % * Features are computed in a batch modus
11 | % * Features are stored in folder 'data_feature/'
12 | %
13 | % Reference:
14 | % Details on the feature computation can be found in the following book:
15 | %
16 | % Meinard Mueller: Information Retrieval for Music and Motion,
17 | % Springer 2007
18 | %
19 | % License:
20 | % This file is part of 'Chroma Toolbox'.
21 | %
22 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
23 | % it under the terms of the GNU General Public License as published by
24 | % the Free Software Foundation, either version 2 of the License, or
25 | % (at your option) any later version.
26 | %
27 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
28 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 | % GNU General Public License for more details.
31 | %
32 | % You should have received a copy of the GNU General Public License
33 | % along with 'Chroma Toolbox'. If not, see .
34 | %
35 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36 | clear;
37 | close all hidden;
38 |
39 | dirFileNames = {
40 | 'data_WAV/','Bach_BWV988-Aria-Measures1-4_Meinard_fast.wav';
41 | 'data_WAV/','Burgmueller_Op100-02-FirstPart_Meinard_SE.wav';
42 | 'data_WAV/','Systematic_Cadence-C-Major_Meinard_portato.wav';
43 | 'data_WAV/','Systematic_Cadence-C-Major_Meinard_staccato.wav';
44 | 'data_WAV/','Systematic_Scale-C-Major_Meinard_fast.wav';
45 | 'data_WAV/','Systematic_Scale-C-Major_Meinard_middle.wav';
46 | 'data_WAV/','Systematic_Chord-C-Major_Eight-Instruments.wav';
47 | };
48 |
49 | for n=1:size(dirFileNames,1)
50 | clear parameter;
51 | parameter.message = 1;
52 |
53 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 | % Convert WAV to expected audio format (mono, 22050 Hz)
55 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 |
57 | [f_audio,sideinfo] = wav_to_audio('', dirFileNames{n,1}, dirFileNames{n,2},parameter);
58 |
59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 | % Estimation of the global tuning of the recording and selection of
61 | % an appropriate filterbank for use in the next step
62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 | clear parameter
64 | shiftFB = estimateTuning(f_audio);
65 | fprintf('Using filterbank number: %d\n',shiftFB);
66 |
67 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68 | % Compute pitch features
69 | %
70 | % Input: audio file of format: mono, 22050 Hz
71 | %
72 | % Output: sequence of pitch vectors
73 | % (specified by N x 120 matrix f_pitch)
74 | % Only subband for MIDI pitches 21 to 108 are computed, the
75 | % other subbands are set to zero.
76 | %
77 | % Parameter: parameter.win_len specifies window length (in samples)
78 | % with window overlap of half size
79 | % Example: audio sampling rate: 22050 Hz
80 | % parameter.win_len = 4410
81 | % Resulting feature rate: 10 Hz
82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 |
84 | clear parameter
85 | parameter.winLenSTMSP = 4410;
86 | parameter.fs = sideinfo.wav.fs;
87 | parameter.save = 1;
88 | parameter.saveDir = 'data_feature/';
89 | parameter.saveFilename = dirFileNames{n,2}(1:end-4);
90 | parameter.shiftFB = shiftFB;
91 | parameter.saveAsTuned = 1;
92 | [f_pitch,sideinfo] = audio_to_pitch_via_FB(f_audio,parameter,sideinfo);
93 |
94 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95 | % Visualization of pitch decomposition (f_pitch)
96 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97 |
98 | parameter.usePitchNameLabels = 1;
99 | parameter.title = 'Logarithmic compression of amplitude';
100 | parameter.featureRate = sideinfo.pitch.featureRate;
101 | parameter.xlabel = 'Time [Seconds]';
102 | parameter.ylabel = 'Pitch';
103 | visualizePitch(log(5*f_pitch+1),parameter);
104 | end
105 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/test_convert_pitch_to_CENS.m:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Name: test_convert_pitch_to_CENS.m
3 | % Date of Revision: 2011-03
4 | % Programmer: Meinard Mueller, Sebastian Ewert
5 | %
6 | % Description:
7 | % * Computes CENS features (f_CENS) from pitch features (f_pitch)
8 | % * CENS is a chroma-like feature
9 | % (Chroma Energy Normalized Statistics)
10 | %
11 | % Reference:
12 | % Details on the feature computation can be found in the following book:
13 | %
14 | % Meinard Mueller: Information Retrieval for Music and Motion,
15 | % Springer 2007
16 | %
17 | % License:
18 | % This file is part of 'Chroma Toolbox'.
19 | %
20 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
21 | % it under the terms of the GNU General Public License as published by
22 | % the Free Software Foundation, either version 2 of the License, or
23 | % (at your option) any later version.
24 | %
25 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
26 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
27 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 | % GNU General Public License for more details.
29 | %
30 | % You should have received a copy of the GNU General Public License
31 | % along with 'Chroma Toolbox'. If not, see .
32 | %
33 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 |
35 | clear;
36 | %close all hidden;
37 |
38 | directory = 'data_feature/';
39 |
40 |
41 | %filename = 'Bach_BWV988-Aria-Measures1-4_Meinard_fast.wav';
42 | %filename = 'Burgmueller_Op100-02-FirstPart_Meinard_SE.wav';
43 | %filename = 'Systematic_Cadence-C-Major_Meinard_portato.wav';
44 | %filename = 'Systematic_Cadence-C-Major_Meinard_staccato.wav';
45 | %filename = 'Systematic_Scale-C-Major_Meinard_fast.wav';
46 | %filename = 'Systematic_Scale-C-Major_Meinard_middle.wav';
47 | filename = 'Systematic_Chord-C-Major_Eight-Instruments.wav';
48 |
49 |
50 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 | % Loads pitch features (f_pitch) and computes CENS features (f_CENS)
52 | %
53 | % Note: feature filename is specified by WAV filename
54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 |
56 | win_len = 4410;
57 | filename_pitch = strcat(filename(1:end-4),'_pitch_',num2str(win_len));
58 | load(strcat(directory,filename_pitch)); % load f_pitch and sideinfo;
59 |
60 | parameter.winLenSmooth = 21;
61 | parameter.downsampSmooth = 5;
62 | parameter.featureRate = sideinfo.pitch.featureRate;
63 | [f_CENS,sideinfo] = pitch_to_CENS(f_pitch,parameter,sideinfo);
64 |
65 |
66 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67 | % Visualization of chromagrams (f_CENS,f_chroma)
68 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69 |
70 | parameter.featureRate = sideinfo.CENS.featureRate;
71 | parameter.xlabel = 'Time [Seconds]';
72 | parameter.title = sprintf('CENS %d %d chromagram',parameter.winLenSmooth,parameter.downsampSmooth);
73 | visualizeChroma(f_CENS,parameter);
74 |
75 |
76 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/test_convert_pitch_to_CRP.m:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Name: test_convert_pitch_to_CRP.m
3 | % Date of Revision: 2011-03
4 | % Programmer: Meinard Mueller, Sebastian Ewert
5 | %
6 | % Description:
7 | % * Computes CRP features (f_crp) from pitch features (f_pitch)
8 | % * CRP is a chroma-like feature tuned for timbre-invariance
9 | %
10 | % Reference:
11 | % Details on the feature computation can be found in the following articles:
12 | %
13 | % Meinard Mueller, Sebastian Ewert, and Sebastian Kreuzer
14 | % Making chroma features more robust to timbre changes.
15 | % Proceedings of IEEE International Conference on Acoustics, Speech, and
16 | % Signal Processing (ICASSP), Taipei, Taiwan, pp. 1869-1872, 2009.
17 | %
18 | % Meinard Mueller, and Sebastian Ewert
19 | % Towards Timbre-Invariant Audio Features for Harmony-Based Music.
20 | % IEEE Transactions on Audio, Speach, and Language Processing.
21 | %
22 | % License:
23 | % This file is part of 'Chroma Toolbox'.
24 | %
25 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
26 | % it under the terms of the GNU General Public License as published by
27 | % the Free Software Foundation, either version 2 of the License, or
28 | % (at your option) any later version.
29 | %
30 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
31 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
32 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 | % GNU General Public License for more details.
34 | %
35 | % You should have received a copy of the GNU General Public License
36 | % along with 'Chroma Toolbox'. If not, see .
37 | %
38 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 |
40 | clear;
41 | close all hidden;
42 |
43 | directory = 'data_feature/';
44 |
45 |
46 | %filename = 'Bach_BWV988-Aria-Measures1-4_Meinard_fast.wav';
47 | %filename = 'Burgmueller_Op100-02-FirstPart_Meinard_SE.wav';
48 | %filename = 'Systematic_Cadence-C-Major_Meinard_portato.wav';
49 | %filename = 'Systematic_Cadence-C-Major_Meinard_staccato.wav';
50 | %filename = 'Systematic_Scale-C-Major_Meinard_fast.wav';
51 | %filename = 'Systematic_Scale-C-Major_Meinard_middle.wav';
52 | filename = 'Systematic_Chord-C-Major_Eight-Instruments.wav';
53 |
54 |
55 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 | % Loads pitch features (f_pitch) and computes CRP features (f_crp)
57 | %
58 | % Note: feature filename is specified by WAV filename
59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 |
61 | win_len = 4410;
62 | filename_pitch = strcat(filename(1:end-4),'_pitch_',num2str(win_len));
63 | load(strcat(directory,filename_pitch)); % load f_pitch and sideinfo;
64 |
65 | parameter.coeffsToKeep = [55:120];
66 | parameter.applyLogCompr = 1;
67 | parameter.factorLogCompr = 1000;
68 | parameter.featureRate = sideinfo.pitch.featureRate;
69 | [f_crp,sideinfo] = pitch_to_CRP(f_pitch,parameter,sideinfo);
70 |
71 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72 | % Visualization of CRP chromagram
73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74 |
75 | parameter.featureRate = sideinfo.CRP.featureRate;
76 | parameter.xlabel = 'Time [Seconds]';
77 | parameter.title = 'CRP chromagram';
78 | visualizeCRP(f_crp,parameter);
79 |
80 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/test_convert_pitch_to_chroma.m:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % Name: test_convert_pitch_to_chroma.m
3 | % Date of Revision: 2011-03
4 | % Programmer: Meinard Mueller, Sebastian Ewert
5 | %
6 | % Description:
7 | % * Computes chroma features (f_chroma) from pitch features (f_pitch)
8 | %
9 | % Reference:
10 | % Details on the feature computation can be found in the following book:
11 | %
12 | % Meinard Mueller: Information Retrieval for Music and Motion,
13 | % Springer 2007
14 | %
15 | % License:
16 | % This file is part of 'Chroma Toolbox'.
17 | %
18 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
19 | % it under the terms of the GNU General Public License as published by
20 | % the Free Software Foundation, either version 2 of the License, or
21 | % (at your option) any later version.
22 | %
23 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
24 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | % GNU General Public License for more details.
27 | %
28 | % You should have received a copy of the GNU General Public License
29 | % along with 'Chroma Toolbox'. If not, see .
30 | %
31 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 |
33 | clear;
34 | close all hidden;
35 |
36 | directory = 'data_feature/';
37 |
38 |
39 | %filename = 'Bach_BWV988-Aria-Measures1-4_Meinard_fast.wav';
40 | %filename = 'Burgmueller_Op100-02-FirstPart_Meinard_SE.wav';
41 | %filename = 'Systematic_Cadence-C-Major_Meinard_portato.wav';
42 | %filename = 'Systematic_Cadence-C-Major_Meinard_staccato.wav';
43 | %filename = 'Systematic_Scale-C-Major_Meinard_fast.wav';
44 | %filename = 'Systematic_Scale-C-Major_Meinard_middle.wav';
45 | filename = 'Systematic_Chord-C-Major_Eight-Instruments.wav';
46 |
47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48 | % Loads pitch features (f_pitch) and computes chroma features (f_chroma)
49 | %
50 | % Note: feature filename is specified by WAV filename
51 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 |
53 | win_len = 4410;
54 | filename_pitch = strcat(filename(1:end-4),'_pitch_',num2str(win_len));
55 | load(strcat(directory,filename_pitch)); % load f_pitch and sideinfo;
56 |
57 | parameter.vis = 0;
58 | %parameter.save = 1;
59 | %parameter.save_dir = 'data_feature/';
60 | %parameter.save_filename = strcat(sideinfo.wav.filename(1:length(sideinfo.wav.filename)-4));
61 | [f_chroma_norm,sideinfo] = pitch_to_chroma(f_pitch,parameter,sideinfo);
62 |
63 | parameter.applyLogCompr = 1;
64 | parameter.factorLogCompr = 100;
65 | f_logchroma_norm = pitch_to_chroma(f_pitch,parameter,sideinfo);
66 |
67 | parameter.winLenSmooth = 21;
68 | parameter.downsampSmooth = 5;
69 | f_logchroma_normSmoothed = pitch_to_chroma(f_pitch,parameter,sideinfo);
70 |
71 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72 | % Visualization of chromagrams (f_chroma_norm,f_chroma)
73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74 |
75 | parameter.featureRate = sideinfo.pitch.featureRate;
76 | parameter.xlabel = 'Time [Seconds]';
77 | parameter.title = 'Normalized chromagram';
78 | visualizeChroma(f_chroma_norm,parameter);
79 |
80 | parameter.title = 'Normalized log-compressed chromagram';
81 | visualizeChroma(f_logchroma_norm,parameter);
82 |
83 | parameter.title = 'Normalized log-compressed smoothed chromagram';
84 | visualizeChroma(f_logchroma_normSmoothed,parameter);
85 |
86 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/visualizeCRP.m:
--------------------------------------------------------------------------------
1 | function visualizeCRP(f_crp,parameter)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: visualizeCRP
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Visualization of CRP features (wrapper around visualize_chroma)
9 | %
10 | % Input:
11 | % f_CRP
12 | % parameter: is forwarded to visualizeChroma
13 | %
14 | % License:
15 | % This file is part of 'Chroma Toolbox'.
16 | %
17 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
18 | % it under the terms of the GNU General Public License as published by
19 | % the Free Software Foundation, either version 2 of the License, or
20 | % (at your option) any later version.
21 | %
22 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
23 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | % GNU General Public License for more details.
26 | %
27 | % You should have received a copy of the GNU General Public License
28 | % along with 'Chroma Toolbox'. If not, see .
29 | %
30 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 | if isfield(parameter,'imagerange')==0
32 | parameter.imagerange = [-1 1];
33 | end
34 | if isfield(parameter,'colormap')==0
35 | blueSepia = gray(64).^0.8;
36 | blueSepia(:,1:2) = blueSepia(:,1:2) * 0.5;
37 | parameter.colormap = [flipud(blueSepia) ; hot(64)];
38 | end
39 |
40 | visualizeChroma(f_crp,parameter);
41 |
42 | end
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/visualizeChroma.m:
--------------------------------------------------------------------------------
1 | function visualizeChroma(f_chroma,parameter)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: visualizeChroma
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Visualization of f_chroma
9 | %
10 | % Input:
11 | % f_chroma
12 | % parameter.featureRate = 0; % 0 means unknown
13 | % parameter.colorbar = 1;
14 | % parameter.colormap = 'hot';
15 | % parameter.print = 0;
16 | % parameter.printFile = 'figure.eps';
17 | % parameter.printDir = '';
18 | % parameter.title = '';
19 | % parameter.xlabel = '';
20 | % parameter.imagerange = [0 1]; % 0 means automatic
21 | % parameter.fontSize = 0; % 0 means automatic
22 | % parameter.printPaperPosition = [1 10 26 15]; %[left, bottom, width, height]
23 | % parameter.createAxisLabel = 1;
24 | %
25 | % License:
26 | % This file is part of 'Chroma Toolbox'.
27 | %
28 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
29 | % it under the terms of the GNU General Public License as published by
30 | % the Free Software Foundation, either version 2 of the License, or
31 | % (at your option) any later version.
32 | %
33 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
34 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
35 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 | % GNU General Public License for more details.
37 | %
38 | % You should have received a copy of the GNU General Public License
39 | % along with 'Chroma Toolbox'. If not, see .
40 | %
41 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 |
43 | if nargin<2
44 | parameter=[];
45 | end
46 |
47 | if isfield(parameter,'featureRate')==0
48 | parameter.featureRate = 0;
49 | end
50 | if isfield(parameter,'colorbar')==0
51 | parameter.colorbar = 1;
52 | end
53 | if isfield(parameter,'colormap')==0
54 | parameter.colormap = 'hot';
55 | end
56 | if isfield(parameter,'print')==0
57 | parameter.print = 0;
58 | end
59 | if isfield(parameter,'printFile')==0
60 | parameter.printFile = 'figure.eps';
61 | end
62 | if isfield(parameter,'printDir')==0
63 | parameter.printDir = '';
64 | end
65 | if isfield(parameter,'title')==0
66 | parameter.title = '';
67 | end
68 | if isfield(parameter,'xlabel')==0
69 | parameter.xlabel = '';
70 | end
71 | if isfield(parameter,'imagerange')==0
72 | parameter.imagerange = [0 1];
73 | end
74 | if isfield(parameter,'fontSize')==0
75 | % 0 means automatic
76 | parameter.fontSize = 0;
77 | end
78 | if isfield(parameter,'printPaperPosition')==0
79 | parameter.printPaperPosition = [1 10 26 15]; %[left, bottom, width, height]
80 | end
81 | if isfield(parameter,'createAxisLabel')==0
82 | parameter.createAxisLabel = 1;
83 | end
84 |
85 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86 | % Visualization
87 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88 |
89 | seg_num = size(f_chroma,2);
90 |
91 | chroma_names = ['C ';'C#';'D ';'D#';'E ';'F ';'F#';'G ';'G#';'A ';'A#';'B '];
92 | figure;
93 | set(gcf,'renderer','painters');
94 |
95 | if parameter.featureRate == 0
96 | t = (1:seg_num);
97 | else
98 | t = (0:seg_num-1)/parameter.featureRate;
99 | end
100 |
101 | if all(parameter.imagerange == 0)
102 | imagesc(t,[1:12],f_chroma);
103 | else
104 | imagesc(t,[1:12],f_chroma,parameter.imagerange);
105 | end
106 | set(gca,'YTick',[1:12]);
107 | set(gca,'YTickLabel',chroma_names);
108 | set(gca,'YDir','normal');
109 | if t(end)>t(1)
110 | set(gca,'XLim',[t(1),t(end)]);
111 | end
112 |
113 | title(parameter.title);
114 | xlabel(parameter.xlabel);
115 |
116 | if ~parameter.createAxisLabel
117 | set(gca, 'XTick', [], 'YTick', [])
118 | end
119 |
120 | colormap(parameter.colormap);
121 |
122 | if parameter.fontSize
123 | set(gca,'FontSize',parameter.fontSize)
124 | end
125 |
126 | if parameter.colorbar == 1
127 | hColorbar = colorbar;
128 | if parameter.fontSize
129 | set(hColorbar,'FontSize',parameter.fontSize)
130 | end
131 | end
132 | drawnow;
133 |
134 | if parameter.print == 1
135 | set(gcf,'PaperPosition',parameter.printPaperPosition);
136 | print('-depsc2',strcat(parameter.printDir,parameter.printFile));
137 | end
138 |
139 | end
140 |
141 |
142 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/visualizePitch.m:
--------------------------------------------------------------------------------
1 | function visualizePitch(f_pitch,parameter)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: visualizePitch
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Visualization of f_pitch
9 | %
10 | % Input:
11 | % f_pitch
12 | % parameter.midiMin = 21;
13 | % parameter.midiMax = 108;
14 | % parameter.featureRate = 0;
15 | % parameter.colorbar = 1;
16 | % parameter.colormap = hot2;
17 | % parameter.print = 0;
18 | % parameter.printFile = 'figure.eps';
19 | % parameter.printDir = '';
20 | % parameter.title = '';
21 | % parameter.xlabel = '';
22 | % parameter.ylabel = '';
23 | % parameter.imagerange = 0; %[0 1]; % 0 means automatic
24 | % parameter.usePitchNameLabels = 0;
25 | % parameter.PitchNameLabels = ...
26 | % parameter.Ytick = [1 10 20 30 40 50 60 70 80 90 100 110 120]; % not used when usePitchNameLabels==1
27 | % parameter.printPaperPosition = [1 10 26 15]; %[left, bottom, width, height]
28 | % parameter.fontSize = 0; % 0 means automatic
29 | % parameter.createAxisLabel = 1;
30 | %
31 | % License:
32 | % This file is part of 'Chroma Toolbox'.
33 | %
34 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
35 | % it under the terms of the GNU General Public License as published by
36 | % the Free Software Foundation, either version 2 of the License, or
37 | % (at your option) any later version.
38 | %
39 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
40 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
41 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 | % GNU General Public License for more details.
43 | %
44 | % You should have received a copy of the GNU General Public License
45 | % along with 'Chroma Toolbox'. If not, see .
46 | %
47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48 |
49 | if nargin<2
50 | parameter=[];
51 | end
52 |
53 | if isfield(parameter,'midiMin')==0
54 | parameter.midiMin = 21;
55 | end
56 | if isfield(parameter,'midiMax')==0
57 | parameter.midiMax = 108;
58 | end
59 | if isfield(parameter,'featureRate')==0
60 | parameter.featureRate = 0;
61 | end
62 | if isfield(parameter,'colorbar')==0
63 | parameter.colorbar = 1;
64 | end
65 | if (isfield(parameter,'colormap')==0) || (isstr(parameter.colormap) && strcmpi(parameter.colormap,'hot2'))
66 | hot2 = hot(64);
67 | hot2 = [hot2; hot2(32:64,:); hot2(32:64,:)];
68 | hot2 = sort(hot2);
69 | parameter.colormap = hot2;
70 | end
71 | if isfield(parameter,'print')==0
72 | parameter.print = 0;
73 | end
74 | if isfield(parameter,'printFile')==0
75 | parameter.printFile = 'figure.eps';
76 | end
77 | if isfield(parameter,'printDir')==0
78 | parameter.printDir = '';
79 | end
80 | if isfield(parameter,'title')==0
81 | parameter.title = '';
82 | end
83 | if isfield(parameter,'xlabel')==0
84 | parameter.xlabel = '';
85 | end
86 | if isfield(parameter,'ylabel')==0
87 | parameter.ylabel = '';
88 | end
89 | if isfield(parameter,'imagerange')==0
90 | parameter.imagerange = 0; %[0 1];
91 | end
92 | if isfield(parameter,'usePitchNameLabels')==0
93 | parameter.usePitchNameLabels = 0;
94 | end
95 | if isfield(parameter,'PitchNameLabels')==0
96 | parameter.PitchNameLabels = ...
97 | [' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
98 | 'C0 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
99 | 'C1 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
100 | 'C2 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
101 | 'C3 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
102 | 'C4 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
103 | 'C5 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
104 | 'C6 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
105 | 'C7 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
106 | 'C8 ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';' ';...
107 | 'C9 '];
108 | end
109 | if isfield(parameter,'Ytick')==0
110 | parameter.Ytick = [1 10 20 30 40 50 60 70 80 90 100 110 120]; % not used when usePitchNameLabels==1
111 | end
112 | if isfield(parameter,'printPaperPosition')==0
113 | parameter.printPaperPosition = [1 10 26 15]; %[left, bottom, width, height]
114 | end
115 | if isfield(parameter,'fontSize')==0
116 | % 0 means automatic
117 | parameter.fontSize = 0;
118 | end
119 | if isfield(parameter,'createAxisLabel')==0
120 | parameter.createAxisLabel = 1;
121 | end
122 |
123 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
124 | % Visualization
125 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126 | figure;
127 |
128 | if parameter.featureRate == 0
129 | t_axis = (1:size(f_pitch,2));
130 | else
131 | t_axis = (0:size(f_pitch,2)-1)/parameter.featureRate;
132 | end
133 |
134 | p_axis = (parameter.midiMin:parameter.midiMax);
135 | f_image = f_pitch(p_axis,:);
136 |
137 | if parameter.imagerange == 0
138 | imagesc(t_axis,p_axis,f_image);
139 | else
140 | imagesc(t_axis,p_axis,f_image,parameter.imagerange);
141 | end
142 |
143 | set(gca,'YTick',parameter.Ytick);
144 | set(gca,'YDir','normal');
145 |
146 | if parameter.usePitchNameLabels
147 | set(gca,'YTick',[parameter.midiMin:parameter.midiMax]);
148 | set(gca,'YTickLabel',parameter.PitchNameLabels(parameter.midiMin:parameter.midiMax,:));
149 | end
150 |
151 | title(parameter.title);
152 | xlabel(parameter.xlabel);
153 | ylabel(parameter.ylabel);
154 |
155 | if ~parameter.createAxisLabel
156 | set(gca, 'XTick', [], 'YTick', [])
157 | end
158 |
159 | colormap(parameter.colormap);
160 |
161 | if parameter.fontSize
162 | set(gca,'FontSize',parameter.fontSize)
163 | end
164 |
165 | if parameter.colorbar == 1
166 | hColorbar = colorbar;
167 | if parameter.fontSize
168 | set(hColorbar,'FontSize',parameter.fontSize)
169 | end
170 | end
171 |
172 | drawnow;
173 |
174 | if parameter.print == 1
175 | set(gcf,'PaperPosition',parameter.printPaperPosition);
176 | print('-depsc2',strcat(parameter.printDir,parameter.printFile));
177 | end
178 |
179 | end
180 |
181 |
182 |
--------------------------------------------------------------------------------
/segmentation_toolbox/MATLAB-Chroma-Toolbox_2.0/wav_to_audio.m:
--------------------------------------------------------------------------------
1 | function [f_audio,sideinfo] = wav_to_audio(dirAbs,dirRel,wavfilename,parameter)
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 | % Name: wav_to_audio
4 | % Date of Revision: 2011-03
5 | % Programmer: Meinard Mueller, Sebastian Ewert
6 | %
7 | % Description:
8 | % Loads a Wav file and fills a sideinfo variable according to AGtoolbox
9 | % specifications. Resampling and single channel conversion is default, but
10 | % optional.
11 | %
12 | % Input:
13 | % dirAbs
14 | % dirRel
15 | % wavfilename
16 | % parameter.useResampling = 1;
17 | % parameter.destSamplerate = 22050;
18 | % parameter.convertToMono = 1;
19 | % parameter.monoConvertMode = 'downmix';
20 | % parameter.message = 0;
21 | % parameter.vis = 0;
22 | % parameter.save = 0;
23 | % parameter.saveDir = [dirAbs,dirRel];
24 | % parameter.saveFilename = wavfilename;
25 | %
26 | % Output:
27 | % f_audio
28 | % sideinfo.wav.version
29 | % sideinfo.wav.filename
30 | % sideinfo.wav.dirRel
31 | % sideinfo.wav.size
32 | % sideinfo.wav.duration
33 | % sideinfo.wav.energy
34 | % sideinfo.wav.fs
35 | % sideinfo.wav.nbits
36 | % sideinfo.wav.channels
37 | % sideinfo.wav.resampled
38 | % sideinfo.wav.monoConverted
39 | % sideinfo.wav.monoConvertMode
40 | %
41 | %
42 | % License:
43 | % This file is part of 'Chroma Toolbox'.
44 | %
45 | % 'Chroma Toolbox' is free software: you can redistribute it and/or modify
46 | % it under the terms of the GNU General Public License as published by
47 | % the Free Software Foundation, either version 2 of the License, or
48 | % (at your option) any later version.
49 | %
50 | % 'Chroma Toolbox' is distributed in the hope that it will be useful,
51 | % but WITHOUT ANY WARRANTY; without even the implied warranty of
52 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 | % GNU General Public License for more details.
54 | %
55 | % You should have received a copy of the GNU General Public License
56 | % along with 'Chroma Toolbox'. If not, see .
57 | %
58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 |
60 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61 | % Check parameters
62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 |
64 | if nargin<4
65 | parameter=[];
66 | end
67 | if nargin<3
68 | error('Please specify at least the path and filename of the wav file')
69 | end
70 |
71 | if isfield(parameter,'useResampling')==0
72 | parameter.useResampling = 1;
73 | end
74 | if isfield(parameter,'destSamplerate')==0
75 | parameter.destSamplerate = 22050;
76 | end
77 | if isfield(parameter,'convertToMono')==0
78 | parameter.convertToMono = 1;
79 | end
80 | if isfield(parameter,'monoConvertMode')==0
81 | parameter.monoConvertMode = 'downmix';
82 | end
83 | if isfield(parameter,'message')==0
84 | parameter.message = 0;
85 | end
86 | if isfield(parameter,'vis')==0
87 | parameter.vis = 0;
88 | end
89 | if isfield(parameter,'save')==0
90 | parameter.save = 0;
91 | end
92 | if isfield(parameter,'saveDir')==0
93 | parameter.saveDir = [dirAbs,dirRel];
94 | end
95 | if isfield(parameter,'saveFilename')==0
96 | parameter.saveFilename = wavfilename;
97 | end
98 |
99 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 | % Main program
101 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102 | if parameter.message == 1
103 | fprintf('wav_to_audio: processing %s, ',wavfilename);
104 | end
105 |
106 | [pathstr,name,ext] = fileparts(wavfilename);
107 | [f_audio,fs] = audioread(strcat(dirAbs,dirRel,wavfilename));
108 |
109 |
110 | bConverted_to_mono = 0;
111 | if parameter.convertToMono
112 | if size(f_audio,2)>1
113 | bConverted_to_mono = 1;
114 | if parameter.message == 1
115 | fprintf('converting to mono, ');
116 | end
117 | switch parameter.monoConvertMode
118 | case 'leftmost_channel'
119 | f_audio= f_audio(:,1);
120 | case 'rightmost_channel'
121 | f_audio= f_audio(:,size(f_audio,2));
122 | case 'downmix'
123 | % pay attention to energy loss due to differences in phase
124 | % when using this method. This is often the case for bad
125 | % stereo mixes
126 | nChannels = size(f_audio,2);
127 |
128 | f_audio = sum(f_audio,2);
129 | f_audio = f_audio / nChannels;
130 | otherwise
131 | disp('wav_to_audio: monoConvertMode : Unknown method')
132 | end
133 | end
134 | end
135 |
136 | bResampled = 0;
137 | if parameter.useResampling
138 | if (fs ~= parameter.destSamplerate)
139 | bResampled = 1;
140 | if parameter.message == 1
141 | fprintf('Resampling to %d, ', parameter.destSamplerate);
142 | end
143 | f_audio = resample (f_audio,parameter.destSamplerate,fs,100);
144 | fs = parameter.destSamplerate;
145 | end
146 | end
147 |
148 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149 | % Update sideinfo
150 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151 | sideinfo.wav.version = 1;
152 | sideinfo.wav.filename = wavfilename;
153 | sideinfo.wav.dirRel = dirRel;
154 | sideinfo.wav.size = size(f_audio,1);
155 | sideinfo.wav.duration = (sideinfo.wav.size-1)/fs;
156 | sideinfo.wav.energy = sum(f_audio.^2);
157 | sideinfo.wav.fs = fs;
158 | % sideinfo.wav.nbits = nbits;
159 | sideinfo.wav.channels = size(f_audio,2);
160 | sideinfo.wav.resampled = bResampled;
161 | sideinfo.wav.monoConverted = bConverted_to_mono;
162 | if bConverted_to_mono
163 | sideinfo.wav.monoConvertMode = parameter.monoConvertMode;
164 | else
165 | sideinfo.wav.monoConvertMode = 'none';
166 | end
167 |
168 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
169 | % Saving data
170 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171 | if parameter.save == 1
172 | if parameter.message == 1
173 | fprintf('Saving to file, ');
174 | end
175 | filename = strcat(parameter.saveFilename,'_audio');
176 | save(strcat(parameter.saveDir,filename),'f_audio','sideinfo');
177 | end
178 |
179 | if parameter.message == 1
180 | fprintf('Done\n');
181 | end
182 |
183 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
184 | % Visualization
185 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186 | if parameter.vis
187 | figure;
188 | for k=1:sideinfo.wav.channels
189 | if sideinfo.wav.channels > 1
190 | subplot(sideinfo.wav.channels,1,k);
191 | end
192 | plot( [0:sideinfo.wav.size-1] / sideinfo.wav.fs , f_audio(:,k));
193 | axis tight;
194 | end
195 | end
196 |
197 | end
--------------------------------------------------------------------------------
/segmentation_toolbox/demo.m:
--------------------------------------------------------------------------------
1 | clear all; clc; close all;
2 |
3 | addpath('./MATLAB-Chroma-Toolbox_2.0');
4 | audio_filename = '11_-_All_You_Need_Is_Love.wav';
5 | annotation_filename = '11_-_All_You_Need_Is_Love.lab'; % Optional
6 |
7 | %% Audio Segmentation using Sturcutre Feature
8 |
9 | addpath('./sf');
10 | estimation_filename_sf = '11_-_All_You_Need_Is_Love_es_sf.lab';
11 | result_sf = audio_segmenter_sf(audio_filename);
12 | visualize_results(audio_filename, result_sf);
13 | write_results(estimation_filename_sf, result_sf);
14 |
15 | %% Audio Segmentation using Checkboard Kernel
16 |
17 | addpath('./foote');
18 | estimation_filename_foote = '11_-_All_You_Need_Is_Love_es_foote.lab';
19 | result_foote = audio_segmenter_foote(audio_filename);
20 | visualize_results(audio_filename, result_foote, annotation_filename);
21 | write_results( estimation_filename_foote, result_foote);
22 |
23 | %% Saving features to save time
24 |
25 | feature = feature_generator( audio_filename, 'clp');
26 | save([audio_filename(1:end-4),'_clp.mat'],'feature');
27 | [result_sf, labeling] = audio_segmenter_sf(audio_filename,[audio_filename(1:end-4),'_cens.mat']);
28 | visualize_results(audio_filename, result_sf);
29 |
30 | %% If you have annotations, you can compare results
31 |
32 | visualize_results(audio_filename, result_sf, annotation_filename);
33 |
34 | %% Segmentation & Labeling (SF only)
35 |
36 | [result_sf, labeling] = audio_segmenter_sf(audio_filename,'clp', 0, 1);
37 | estimation_filename_sf_label = '11_-_All_You_Need_Is_Love_es_sf_label.lab';
38 | write_results( estimation_filename_sf_label, result_sf, labeling);
39 |
--------------------------------------------------------------------------------
/segmentation_toolbox/feature_generator.m:
--------------------------------------------------------------------------------
1 | function feature = feature_generator( filename, chroma_type, winLenSTMSP, vis)
2 |
3 | if(nargin < 3)
4 | winLenSTMSP = 4410;
5 | vis = 0;
6 | end
7 | if(nargin < 2) chroma_type = 'clp'; end
8 |
9 | if(strcmp(chroma_type, 'cens'))
10 | [f_audio,sideinfo] = wav_to_audio('', '', filename);
11 | paramPitch.winLenSTMSP = winLenSTMSP;
12 | paramPitch.visualize = 0;
13 | [f_pitch,sideinfo] = audio_to_pitch_via_FB(f_audio,paramPitch,sideinfo);
14 | paramCENS.winLenSmooth = 21;
15 | paramCENS.downsampSmooth = 1;
16 | paramCENS.visualize = vis;
17 | paramCENS.inputFeatureRate = sideinfo.pitch.featureRate;
18 | [f_CENS,sideinfo] = pitch_to_CENS(f_pitch,paramCENS,sideinfo);
19 | feature = f_CENS;
20 | elseif(strcmp(chroma_type, 'clp'))
21 | [f_audio,sideinfo] = wav_to_audio('', '', filename);
22 | paramPitch.winLenSTMSP = winLenSTMSP;
23 | paramPitch.visualize = 0;
24 | [f_pitch,sideinfo] = audio_to_pitch_via_FB(f_audio,paramPitch,sideinfo);
25 | paramCLP.applyLogCompr = 1;
26 | paramCLP.factorLogCompr = 100;
27 | paramCLP.visualize = vis;
28 | paramCLP.inputFeatureRate = sideinfo.pitch.featureRate;
29 | [f_CLP,sideinfo] = pitch_to_chroma(f_pitch,paramCLP,sideinfo);
30 | feature = f_CLP;
31 | elseif(strcmp(chroma_type, 'crp'))
32 | [f_audio,sideinfo] = wav_to_audio('', '', filename);
33 | paramPitch.winLenSTMSP = winLenSTMSP;
34 | paramPitch.visualize = 0;
35 | [f_pitch,sideinfo] = audio_to_pitch_via_FB(f_audio,paramPitch,sideinfo);
36 | paramCRP.coeffsToKeep = [55:120];
37 | paramCRP.inputFeatureRate = sideinfo.pitch.featureRate;
38 | paramCRP.visualize = vis;
39 | [f_CRP,sideinfo] = pitch_to_CRP(f_pitch,paramCRP,sideinfo);
40 | feature = f_CRP;
41 | else
42 | load(chroma_type);
43 | end
44 | end
45 |
46 |
--------------------------------------------------------------------------------
/segmentation_toolbox/foote/audio_segmenter_foote.m:
--------------------------------------------------------------------------------
1 | function seg_output = audio_segmenter_foote( filename,chroma, vis, winLenSTMSP, winLen )
2 | if(nargin < 5) winLen = 64; end
3 | if(nargin < 4) winLenSTMSP = 4410; end
4 | if(nargin < 3) vis = 0; end
5 | if(nargin < 2) chroma = 'cens'; end
6 | if(nargin < 1)
7 | error('not enough inputs');
8 | end
9 |
10 | disp('Feature & Pre-processing (1/4)');
11 | feature = feature_generator(filename, chroma, winLenSTMSP, vis);
12 | [a, fs] = audioread(filename);
13 | [~, n] = size(feature);
14 | s_frame = n / (length(a) / fs);
15 | %% Self Similarity Matrix
16 | disp('Self Similarity Matrix (2/4)');
17 | S = self_similarity_matrix(feature);
18 |
19 | if(vis)
20 | figure;
21 | colormapSet = generateColormapValue();
22 | colormap(colormapSet.colormap5);
23 | imagesc(S);
24 | end
25 | %% Gaussian Checkborad
26 | disp('Gaussian Checkborad (3/4)');
27 |
28 | variance = 0.4;
29 | G = gaussian_checkboard(winLen, variance);
30 | if(vis)
31 | figure;
32 | surf(G)
33 | end
34 | %% Novelty Curve & Peak Selection
35 | disp('Novelty Curve & Peak Selection (4/4)');
36 |
37 | nc = zeros(1, n);
38 | for i = 1 : n - winLen
39 | nc(i+winLen/2-1) = sum(sum( G.* S(i:i + winLen-1, i:i + winLen-1)));
40 | end
41 | nc = (nc - min(nc(:)) + realmin) ./ (max(nc(:))-min(nc(:)));
42 |
43 |
44 | nc_m = gaussian_filter_1d(nc, winLen, variance);
45 |
46 |
47 |
48 | th = medfilt1(nc_m, winLen);
49 | ispeak = zeros(1, n);
50 | for i = 1:n-1
51 | if((nc_m(i) > nc_m(i+1)) && (nc_m(i) > nc_m(i-1)) && (nc(i) > th(i)))
52 | ispeak(i) = 1;
53 | end
54 | end
55 |
56 | if(vis)
57 | figure;
58 | plot(nc, 'green')
59 | hold on
60 | plot(nc_m, 'r');
61 | hold on
62 | plot(th, 'b');
63 | hold on
64 | plot(ispeak, 'black');
65 | end
66 | %% Output
67 |
68 | seg_output = 0.0;
69 | for i = 1:length(ispeak)
70 | if(ispeak(i) ~= 0)
71 | seg_output = [seg_output, i /s_frame];
72 | end
73 | end
74 | if(seg_output(end) < (length(ispeak) /s_frame - 6))
75 | seg_output = [seg_output, length(ispeak) /s_frame];
76 | end
77 |
78 | disp('done!!');
79 |
80 | end
81 |
82 |
--------------------------------------------------------------------------------
/segmentation_toolbox/foote/gaussian_checkboard.m:
--------------------------------------------------------------------------------
1 | function G= gaussian_checkboard(winLen, variance)
2 | stdev = (variance* (winLen) * 0.5);
3 | g = gausswin(winLen, (winLen-1)/2/stdev);
4 | G = (g*g');
5 | G(winLen/2:end, 1:winLen/2) = -1* G(winLen/2:end, 1:winLen/2) ;
6 | G(1:winLen/2, winLen/2:end) = -1* G(1:winLen/2, winLen/2:end);
7 | end
8 |
9 |
--------------------------------------------------------------------------------
/segmentation_toolbox/foote/gaussian_filter_1d.m:
--------------------------------------------------------------------------------
1 | function nc_m = gaussian_filter_1d(nc, winLen, variance)
2 |
3 | stdev = (variance* (winLen) * 0.5);
4 | gaussFilter = gausswin(winLen, (winLen-1)/2/stdev);
5 | gaussFilter = gaussFilter / sum(gaussFilter);
6 | temp = conv(nc, gaussFilter);
7 | nc_m = temp(winLen/2:end-winLen/2);
8 |
9 | end
10 |
11 |
--------------------------------------------------------------------------------
/segmentation_toolbox/foote/generateColormapValue.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/foote/generateColormapValue.m
--------------------------------------------------------------------------------
/segmentation_toolbox/foote/self_similarity_matrix.m:
--------------------------------------------------------------------------------
1 | function D = self_similarity_matrix(feature)
2 | [~, n] = size(feature);
3 | D = zeros(n);
4 | for i =1:n
5 | for j = i:n
6 | vi = feature(:,i);
7 | vj = feature(:,j);
8 | D(i, j) = sum(vi .* vj) / ( sqrt(sum(vi.^2)) * sqrt(sum(vj.^2)) );
9 | D(j, i) = D(i, j);
10 | end
11 | end
12 | end
13 |
14 |
--------------------------------------------------------------------------------
/segmentation_toolbox/sf/audio_segmenter_sf.m:
--------------------------------------------------------------------------------
1 | function [seg_output, label] = audio_segmenter_sf( filename,chroma,vis, lab, winLenSTMSP, m, k ,st)
2 | if(nargin < 6)
3 | m = 2.5;
4 | k = 0.04;
5 | st = 30;
6 | end
7 | if(nargin < 5) winLenSTMSP = 4410; end
8 | if(nargin < 4) lab = 0; end
9 | if(nargin < 3) vis = 0; end
10 | if(nargin < 2) chroma = 'cens'; end
11 | if(nargin < 1)
12 | error('not enough inputs');
13 | end
14 |
15 | disp('Feature & Pre-processing (1/4)');
16 | feature = feature_generator(filename, chroma, winLenSTMSP, vis);
17 | [a, fs] = audioread(filename); % audio
18 | X = feature;
19 | [~, No] =size(X); % 12 x #frames
20 | s_total = floor(length(a) / fs); % total length in seconds
21 | s_frame = No / s_total; % #frames per seconds
22 | mf = round(m*s_frame); % embbed dimension
23 | tau = 1;
24 | w = (mf - 1) * tau;
25 | N = No - w; % N'
26 | sl = 0.3;
27 | thres = 0.05;
28 | lamda = 6;
29 | %% Accounting for the past
30 |
31 | Xd = [];
32 | for i = w+1:No
33 | xd = [];
34 | for j = 0:w
35 | xd = [xd,X(:,i-j)'];
36 | end
37 | xd = xd';
38 | Xd = [Xd, xd];
39 | end
40 | %% Recurrence Plot
41 | disp('Recurrence Plot (2/4)');
42 |
43 | R = recurrence_plot(k, Xd);
44 |
45 | if(vis)
46 | figure;
47 | colormapSet = generateColormapValue();
48 | colormap(colormapSet.colormap5);
49 | imagesc(R);
50 | end
51 | %% Structure Feature
52 | disp('Structure Feature (3/4)');
53 |
54 | L = sm_to_time_lag(R);
55 |
56 | % if(vis)
57 | % figure;
58 | % colormapSet = generateColormapValue();
59 | % colormap(colormapSet.colormap5);
60 | % imagesc(L);
61 | % end
62 |
63 | tsl = round(sl*s_frame );
64 | tst = round(st*s_frame );
65 | variance = 0.4;
66 |
67 | P = kernel_density_estimation_2d(L, tst, tsl, variance);
68 |
69 | if(vis)
70 | figure;
71 | colormapSet = generateColormapValue();
72 | colormap(colormapSet.colormap5);
73 | imagesc(P);
74 | end
75 | %% Novelty Curve & Peak Selection
76 | disp('Novelty Curve & Peak Selection (4/4)');
77 |
78 | c = [];
79 | for i =1:N-1
80 | temp = norm(P(i+1,:) - P(i,:)) ^2;
81 | c = [c, temp];
82 | end
83 |
84 | % normalization
85 | c = (c - min(c(:)) + realmin) ./ (max(c(:))-min(c(:)));
86 |
87 | if(vis)
88 | figure;
89 | plot(c);
90 | end
91 | %% Select Peak
92 |
93 | ispeak = ones(1,length(c));
94 | pwin = round(lamda * s_frame);
95 | for i = 1:length(c)
96 | if (c(i) < thres)
97 | ispeak(i) = 0;
98 | continue;
99 | end
100 | temp = [];
101 | for j = -pwin:pwin
102 | if((i + j) > 0 && (i+j) <= length(c) && (j ~= 0))
103 | temp = [temp, c(i+j)];
104 | end
105 | end
106 | if(max(temp) > c(i))
107 | ispeak(i) = 0;
108 | end
109 | end
110 |
111 | if(vis)
112 | hold on;
113 | plot(ispeak, 'g');
114 | end
115 |
116 | %% Post-Processing & Set Boundaries
117 |
118 | b = find(ispeak);
119 | if(b(1) > (1 + pwin/3)) b = [1,b]; end
120 | if(b(end) < (N - pwin/3 )) b = [b, N];
121 | else
122 | b(end) = N;
123 | end
124 |
125 | w_shift = ceil(1+w/2);
126 | seg_output= 0.0;
127 | for i = 1:length(b)
128 | if(i == 1) continue; end
129 | seg_output = [seg_output, (b(i) + w_shift)/s_frame];
130 | end
131 |
132 | %% Labeling
133 |
134 | if(lab)
135 | disp('labeling...')
136 | label = segment_labeling( b, R, vis);
137 | else
138 | label = [];
139 | end
140 |
141 | disp('done!!')
142 | end
143 |
144 |
--------------------------------------------------------------------------------
/segmentation_toolbox/sf/generateColormapValue.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/segmentation_toolbox/sf/generateColormapValue.m
--------------------------------------------------------------------------------
/segmentation_toolbox/sf/kernel_density_estimation_2d.m:
--------------------------------------------------------------------------------
1 | function P = kernel_density_estimation_2d(L, winLen_x, winLen_y, variance)
2 | stdev_t = (variance* (winLen_x) * 0.5);
3 | stdev_l = (variance* (winLen_y) * 0.5);
4 | gt = gausswin(winLen_x, (winLen_x-1)/2/stdev_t);
5 | gl = gausswin(winLen_y, (winLen_y-1)/2/stdev_l);
6 | G = (gt*gl');
7 | P_temp = conv2(L, G);
8 | conv_padding_x = abs((size(L,1) - size(P_temp,1))/2);
9 | conv_padding_y = abs((size(L,2) - size(P_temp,2))/2);
10 | P = P_temp(1+conv_padding_x:end-conv_padding_x,1+conv_padding_y:end-conv_padding_y);
11 | end
12 |
13 |
--------------------------------------------------------------------------------
/segmentation_toolbox/sf/recurrence_plot.m:
--------------------------------------------------------------------------------
1 | function R = recurrence_plot(k, Xd)
2 | N = size(Xd, 2);
3 |
4 | K = round(k * N);
5 | tR = zeros(N);
6 | R = zeros(N);
7 | for i = 1:N
8 | tn = knnsearch(Xd(:,1:N)',Xd(:,i)','k',K);
9 | tR(i, tn) = 1;
10 | end
11 | for i = 1:N
12 | for j = 1:N
13 | if(tR(i, j) == 1 && tR(j, i) ==1)
14 | R(i, j) = 1;
15 | end
16 | end
17 | end
18 |
19 | end
20 |
21 |
--------------------------------------------------------------------------------
/segmentation_toolbox/sf/segment_labeling.m:
--------------------------------------------------------------------------------
1 | function label = segment_labeling( b, R, vis)
2 |
3 | ss = length(b);
4 | num_s = ss-1;
5 | Rs = cell(num_s);
6 | S = zeros(num_s);
7 | for u = 1:num_s
8 | for v = 1:ss-1
9 | Rs{u, v} = R(b(u):b(u+1),b(v):b(v+1) );
10 | end
11 | end
12 |
13 | for u = 1:num_s
14 | for v = 1:num_s
15 | r_temp = Rs{u, v};
16 | [lu, lv] = size(r_temp);
17 | q_temp = zeros(lu, lv);
18 |
19 | for i = 1: lu
20 | for j =1: lv
21 |
22 | if(i-1<1 || j-1 <1)
23 | cand1 = 0;
24 | else
25 | cand1 = q_temp(i-1,j-1);
26 | end
27 |
28 |
29 | if(i-2<1 || j-1 <1)
30 | cand2 = 0;
31 | else
32 | cand2 = q_temp(i-2,j-1);
33 | end
34 |
35 | if(i-1<1 || j-2 <1)
36 | cand3 = 0;
37 | else
38 | cand3 = q_temp(i-1,j-2);
39 | end
40 |
41 | q_temp(i, j) = max([cand1, cand2, cand3]) + r_temp(i, j);
42 |
43 | end
44 | end
45 |
46 | S(u, v) = max(max(q_temp)) / min([lu, lv]);
47 |
48 |
49 | end
50 | end
51 |
52 | thr = std(reshape(S, [],1)) + mean(reshape(S, [],1));
53 | for u = 1:num_s
54 | for v = 1:num_s
55 | if(S(u,v) < thr)
56 | S(u, v) = 0;
57 | end
58 | end
59 | end
60 |
61 | if(vis)
62 | figure;
63 | colormapSet = generateColormapValue();
64 | colormap(colormapSet.colormap5);
65 | imagesc(S);
66 | end
67 |
68 | Stran = S;
69 | iter_limit = 1000;
70 | iter = 1;
71 | while(all(all(Stran==S==1)==1))
72 | Stran = Stran *S;
73 | iter = iter +1;
74 | if(iter > iter_limit) break; end
75 | end
76 | for u = 1:num_s
77 | for v = 1:num_s
78 | if(Stran(u,v) >= 1)
79 | Stran(u, v) = 1;
80 | else
81 | Stran(u, v) = 0;
82 | end
83 | end
84 | end
85 | if(vis)
86 | figure;
87 | colormapSet = generateColormapValue();
88 | colormap(colormapSet.colormap5);
89 | imagesc(Stran);
90 | end
91 |
92 | label = zeros(1, num_s);
93 | label_index = 65;
94 | for i =1:num_s
95 | if(label(i) == 0)
96 | label(i) = label_index;
97 |
98 | for j = i+1:num_s
99 | if(Stran(i,j) == 1 && label(j) == 0)
100 | label(j) = label_index;
101 | end
102 | end
103 | label_index = label_index +1;
104 | else
105 | continue;
106 | end
107 | end
108 |
109 |
110 | end
111 |
112 |
--------------------------------------------------------------------------------
/segmentation_toolbox/sf/sm_to_time_lag.m:
--------------------------------------------------------------------------------
1 | function L = sm_to_time_lag(R)
2 | N = size(R, 1);
3 | L = zeros(N);
4 | for i = 1:N
5 | for j = 1:N
6 | k = mod(i+j-2, N);
7 | L(i,j) = R(i, k+1);
8 | end
9 | end
10 | end
11 |
12 |
--------------------------------------------------------------------------------
/segmentation_toolbox/visualize_results.m:
--------------------------------------------------------------------------------
1 | function [ output_args ] = visualize_results(filenames, result, path_ann)
2 |
3 | if(nargin < 3)
4 | ann = 0;
5 | else
6 | ann = 1;
7 | end
8 | [a, fs] = audioread(filenames);
9 | s_total = round(length(a) / fs);
10 |
11 | % [s_es, e_es, ~] = textread(path_es, '%f %f %s', 'delimiter', '\t');
12 | if(ann) [~, e_an, ~] = textread( path_ann, '%f %f %s', 'delimiter', '\t'); end
13 | seg_es = zeros(1, s_total);
14 |
15 | if(ann) seg_an = zeros(1, s_total); end
16 | for i =1:length(result)
17 | temp = floor(result(i));
18 | if(temp == 0) temp = 1; end
19 | seg_es(temp) = 1;
20 | end
21 | if(ann)
22 | for i =1:length(e_an)
23 | temp = round(e_an(i));
24 | if(temp == 0) temp = 1; end
25 | seg_an(temp) = 1;
26 | end
27 | end
28 |
29 |
30 |
31 | n = 1:1:s_total;
32 | figure;
33 | subplot(2,1,1)
34 | if(ann)
35 | if(length(seg_an) > s_total)
36 | n = 1:1:length(seg_an);
37 | seg_es(length(seg_an)) = 0;
38 | end
39 | stem(n, seg_an, 'r','Marker', 'none');
40 | end
41 | title('annotation');
42 | xlabel('sec')
43 |
44 |
45 | subplot(2,1,2)
46 | if(ann) stem(n, seg_an, 'r','Marker', 'none'); end
47 | hold on
48 | stem(n, seg_es, 'b','Marker', 'none')
49 | title('estimation');
50 | xlabel('sec')
51 |
52 | end
53 |
54 |
--------------------------------------------------------------------------------
/segmentation_toolbox/write_results.m:
--------------------------------------------------------------------------------
1 | function [ output_args ] = write_results(filename, result, label)
2 | if(nargin < 3)
3 | lab = 0;
4 | else
5 | lab = 1;
6 | end;
7 | fid = fopen(filename, 'w');
8 | for i =1:length(result)-1
9 | if(lab)
10 | fprintf(fid,'%f %f %s\n' ,result(i), result(i+1), label(i));
11 | else
12 | fprintf(fid,'%f %f %s\n' ,result(i), result(i+1), 'unknown');
13 | end
14 | end
15 | fclose(fid);
16 | end
17 |
18 |
--------------------------------------------------------------------------------
/workspace/annotation/11_-_All_You_Need_Is_Love.lab:
--------------------------------------------------------------------------------
1 | 0.0000000 0.4400021 silence
2 | 0.4400021 8.8518077 intro
3 | 8.8518077 26.8056203 verse
4 | 26.8056203 44.3453133 verse
5 | 44.3453133 61.6520640 verse
6 | 61.6520640 79.2780319 refrain
7 | 79.2780319 96.0930155 verseS
8 | 96.0930155 113.3911387 refrain
9 | 113.3911387 130.0594549 verse
10 | 130.0594549 147.2626757 refrain
11 | 147.2626757 163.1804000 refrain
12 | 163.1804000 228.4266677 outro
--------------------------------------------------------------------------------
/workspace/audio/11_-_All_You_Need_Is_Love.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/workspace/audio/11_-_All_You_Need_Is_Love.wav
--------------------------------------------------------------------------------
/workspace/estimation/01_-_A_Hard_Day's_Night.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.782580 A
2 | 3.782580 22.197773 B
3 | 22.197773 42.603798 B
4 | 42.603798 56.440079 C
5 | 56.440079 78.339227 B
6 | 78.339227 98.745252 D
7 | 98.745252 115.169614 C
8 | 115.169614 133.982973 B
9 | 133.982973 150.905043 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Back_in_the_USSR.lab:
--------------------------------------------------------------------------------
1 | 0.000000 18.044648 A
2 | 18.044648 38.182875 B
3 | 38.182875 58.919266 B
4 | 58.919266 82.048318 C
5 | 82.048318 103.283180 B
6 | 103.283180 122.524159 C
7 | 122.524159 145.952294 B
8 | 145.952294 161.903364 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Birthday.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.262416 A
2 | 20.262416 42.809319 A
3 | 42.809319 70.223176 B
4 | 70.223176 85.122011 C
5 | 85.122011 112.535868 A
6 | 112.535868 130.017167 C
7 | 130.017167 150.776211 A
8 | 150.776211 160.907419 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Come_Together.lab:
--------------------------------------------------------------------------------
1 | 0.000000 24.325153 A
2 | 24.325153 36.886503 B
3 | 36.886503 60.015337 A
4 | 60.015337 76.464724 B
5 | 76.464724 100.490798 A
6 | 100.490798 125.115031 B
7 | 125.115031 146.648773 C
8 | 146.648773 165.590491 D
9 | 165.590491 180.046012 B
10 | 180.046012 192.707055 A
11 | 192.707055 222.714724 E
12 | 222.714724 242.154908 E
13 | 242.154908 258.903374 F
14 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Drive_My_Car.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.886968 A
2 | 4.886968 21.043883 B
3 | 21.043883 35.106383 C
4 | 35.106383 50.166223 B
5 | 50.166223 66.522606 C
6 | 66.522606 81.981383 D
7 | 81.981383 97.839096 C
8 | 97.839096 114.195479 B
9 | 114.195479 129.055851 C
10 | 129.055851 148.902926 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Help!.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.584986 A
2 | 10.584986 21.169972 B
3 | 21.169972 50.128895 C
4 | 50.128895 62.111898 B
5 | 62.111898 91.170680 C
6 | 91.170680 101.256374 D
7 | 101.256374 113.139518 C
8 | 113.139518 129.915722 C
9 | 129.915722 139.901558 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_I_Saw_Her_Standing_There.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.218750 A
2 | 14.218750 31.619318 B
3 | 31.619318 54.190341 B
4 | 54.190341 68.011364 C
5 | 68.011364 92.769886 B
6 | 92.769886 105.994318 D
7 | 105.994318 117.329545 E
8 | 117.329545 134.928977 C
9 | 134.928977 155.312500 B
10 | 155.312500 173.906250 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_It_Won't_Be_Long.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.495146 A
2 | 15.495146 28.507095 B
3 | 28.507095 42.810306 A
4 | 42.810306 56.616878 C
5 | 56.616878 71.317401 B
6 | 71.317401 82.243465 A
7 | 82.243465 97.937267 C
8 | 97.937267 119.690067 B
9 | 119.690067 131.907394 D
10 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Magical_Mystery_Tour.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.503488 A
2 | 16.503488 32.112209 B
3 | 32.112209 42.153488 C
4 | 42.153488 62.733140 B
5 | 62.733140 72.177907 C
6 | 72.177907 85.599419 D
7 | 85.599419 115.027326 B
8 | 115.027326 127.454651 C
9 | 127.454651 139.285465 C
10 | 139.285465 169.906395 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_No_Reply.lab:
--------------------------------------------------------------------------------
1 | 0.000000 29.087681 A
2 | 29.087681 62.642754 A
3 | 62.642754 78.328261 B
4 | 78.328261 92.226812 B
5 | 92.226812 118.634058 A
6 | 118.634058 133.227536 C
7 | 133.227536 135.907971 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Sgt._Pepper's_Lonely_Hearts_Club_Band.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.781403 A
2 | 3.781403 20.698206 B
3 | 20.698206 33.535073 C
4 | 33.535073 44.481240 D
5 | 44.481240 84.584013 E
6 | 84.584013 98.017945 F
7 | 98.017945 107.969005 C
8 | 107.969005 120.905383 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Taxman.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.978643 A
2 | 16.978643 30.661432 B
3 | 30.661432 54.231784 B
4 | 54.231784 79.699749 C
5 | 79.699749 92.783291 B
6 | 92.783291 99.974246 A
7 | 99.974246 116.253769 B
8 | 116.253769 140.523241 D
9 | 140.523241 154.605528 E
10 | 154.605528 157.901382 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/01_-_Two_of_Us.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.723247 A
2 | 20.723247 30.785978 B
3 | 30.785978 48.520295 B
4 | 48.520295 59.081181 A
5 | 59.081181 69.343173 B
6 | 69.343173 86.579336 B
7 | 86.579336 103.516605 C
8 | 103.516605 115.571956 B
9 | 115.571956 125.535055 B
10 | 125.535055 150.243542 C
11 | 150.243542 162.298893 B
12 | 162.298893 181.129151 B
13 | 181.129151 206.236162 D
14 | 206.236162 214.904059 E
15 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_All_I've_Got_To_Do.lab:
--------------------------------------------------------------------------------
1 | 0.000000 24.461909 A
2 | 24.461909 46.736167 A
3 | 46.736167 64.535686 B
4 | 64.535686 100.433039 A
5 | 100.433039 116.840417 C
6 | 116.840417 122.906175 D
7 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Dear_Prudence.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.072304 A
2 | 13.072304 28.240169 B
3 | 28.240169 41.112896 B
4 | 41.112896 56.580127 C
5 | 56.580127 80.329810 C
6 | 80.329810 106.274841 C
7 | 106.274841 122.340803 D
8 | 122.340803 144.992812 C
9 | 144.992812 156.568288 C
10 | 156.568288 172.833827 C
11 | 172.833827 189.698097 E
12 | 189.698097 199.178013 E
13 | 199.178013 232.307822 A
14 | 232.307822 234.902326 F
15 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Dig_a_Pony.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.508085 A
2 | 21.508085 39.331915 B
3 | 39.331915 59.844255 B
4 | 59.844255 75.178723 C
5 | 75.178723 96.885957 B
6 | 96.885957 115.207660 B
7 | 115.207660 130.243404 C
8 | 130.243404 150.556596 B
9 | 150.556596 170.471489 B
10 | 170.471489 190.983830 B
11 | 190.983830 205.222979 C
12 | 205.222979 222.051064 D
13 | 222.051064 232.904681 E
14 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Eleanor_Rigby.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.595462 A
2 | 16.595462 30.209703 B
3 | 30.209703 46.308294 C
4 | 46.308294 62.307512 D
5 | 62.307512 77.412363 C
6 | 77.412363 91.125978 A
7 | 91.125978 107.025822 D
8 | 107.025822 122.528169 C
9 | 122.528169 125.906886 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_I'm_a_Loser.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.148992 A
2 | 11.148992 22.198439 B
3 | 22.198439 43.003253 C
4 | 43.003253 53.355888 B
5 | 53.355888 65.002602 B
6 | 65.002602 76.450228 C
7 | 76.450228 97.255042 D
8 | 97.255042 118.159401 B
9 | 118.159401 129.607027 C
10 | 129.607027 142.448276 D
11 | 142.448276 151.905010 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_I_Should_Have_Known_Better.lab:
--------------------------------------------------------------------------------
1 | 0.000000 22.059647 A
2 | 22.059647 38.729154 A
3 | 38.729154 66.678028 B
4 | 66.678028 83.347535 A
5 | 83.347535 97.521607 C
6 | 97.521607 118.982349 A
7 | 118.982349 145.234327 B
8 | 145.234327 157.412051 D
9 | 157.412051 162.902009 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Misery.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.180417 A
2 | 7.180417 26.029012 B
3 | 26.029012 36.999093 B
4 | 36.999093 53.553944 C
5 | 53.553944 64.424297 B
6 | 64.424297 81.677244 C
7 | 81.677244 97.733454 B
8 | 97.733454 108.902992 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Norwegian_Wood_(This_Bird_Has_Flown).lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.781847 A
2 | 3.781847 17.814490 B
3 | 17.814490 32.145701 C
4 | 32.145701 47.372611 D
5 | 47.372611 63.793790 C
6 | 63.793790 80.214968 B
7 | 80.214968 95.740446 D
8 | 95.740446 106.190287 E
9 | 106.190287 120.023885 C
10 | 120.023885 123.905255 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Something.lab:
--------------------------------------------------------------------------------
1 | 0.000000 38.457969 A
2 | 38.457969 72.520742 A
3 | 72.520742 86.705240 B
4 | 86.705240 102.188319 B
5 | 102.188319 119.569323 C
6 | 119.569323 134.752729 A
7 | 134.752729 152.733079 C
8 | 152.733079 167.317140 A
9 | 167.317140 181.901201 D
10 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_The_Fool_On_The_Hill.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.379368 A
2 | 12.379368 41.331115 B
3 | 41.331115 53.910150 A
4 | 53.910150 73.677205 B
5 | 73.677205 91.347754 C
6 | 91.347754 109.617304 B
7 | 109.617304 130.282862 C
8 | 130.282862 150.049917 D
9 | 150.049917 170.515807 C
10 | 170.515807 178.901830 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_The_Night_Before.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.036329 A
2 | 11.036329 34.003824 B
3 | 34.003824 54.783939 B
4 | 54.783939 66.217973 C
5 | 66.217973 90.279159 B
6 | 90.279159 100.917782 D
7 | 100.917782 123.189293 C
8 | 123.189293 146.355641 B
9 | 146.355641 154.906310 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_With_A_Little_Help_From_My_Friends.lab:
--------------------------------------------------------------------------------
1 | 0.000000 25.568819 A
2 | 25.568819 40.950061 B
3 | 40.950061 57.330085 A
4 | 57.330085 72.311815 B
5 | 72.311815 90.090134 C
6 | 90.090134 104.172960 D
7 | 104.172960 118.455542 B
8 | 118.455542 136.633374 C
9 | 136.633374 150.716200 B
10 | 150.716200 162.901340 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/02_-_Yer_Blues.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.094903 A
2 | 4.094903 13.383340 B
3 | 13.383340 32.159967 C
4 | 32.159967 44.444675 B
5 | 44.444675 69.313717 C
6 | 69.313717 96.879403 C
7 | 96.879403 119.651057 C
8 | 119.651057 146.617489 D
9 | 146.617489 159.401575 E
10 | 159.401575 195.656444 F
11 | 195.656444 219.726482 B
12 | 219.726482 239.901368 G
13 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Across_the_Universe.lab:
--------------------------------------------------------------------------------
1 | 0.000000 43.167468 A
2 | 43.167468 56.725842 B
3 | 56.725842 69.586358 B
4 | 69.586358 82.546568 C
5 | 82.546568 95.008308 C
6 | 95.008308 104.080455 A
7 | 104.080455 117.240052 B
8 | 117.240052 130.997814 B
9 | 130.997814 140.069961 D
10 | 140.069961 161.005684 C
11 | 161.005684 174.663752 B
12 | 174.663752 187.025798 B
13 | 187.025798 226.903367 E
14 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_All_My_Loving.lab:
--------------------------------------------------------------------------------
1 | 0.000000 24.666153 A
2 | 24.666153 47.939861 A
3 | 47.939861 62.063223 B
4 | 62.063223 73.501157 C
5 | 73.501157 97.471087 A
6 | 97.471087 111.693909 B
7 | 111.693909 127.905937 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Anna_(Go_To_Him).lab:
--------------------------------------------------------------------------------
1 | 0.000000 33.866066 A
2 | 33.866066 51.695554 A
3 | 51.695554 66.138436 B
4 | 66.138436 91.039955 C
5 | 91.039955 105.482836 A
6 | 105.482836 143.532358 B
7 | 143.532358 169.330332 D
8 | 169.330332 175.904333 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Baby's_In_Black.lab:
--------------------------------------------------------------------------------
1 | 0.000000 25.857478 A
2 | 25.857478 39.482381 A
3 | 39.482381 52.212216 B
4 | 52.212216 68.323414 C
5 | 68.323414 82.147220 D
6 | 82.147220 97.064996 C
7 | 97.064996 107.010180 A
8 | 107.010180 121.231793 E
9 | 121.231793 125.906030 F
10 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Flying.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.193290 A
2 | 13.193290 25.592998 B
3 | 25.592998 46.722101 C
4 | 46.722101 60.609774 D
5 | 60.609774 76.283005 E
6 | 76.283005 92.551422 D
7 | 92.551422 124.294675 F
8 | 124.294675 134.908826 G
9 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Glass_Onion.lab:
--------------------------------------------------------------------------------
1 | 0.000000 31.645909 A
2 | 31.645909 60.414917 A
3 | 60.414917 77.081101 B
4 | 77.081101 107.040550 C
5 | 107.040550 135.908762 D
6 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_I'm_Only_Sleeping.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.210671 A
2 | 20.210671 34.447745 B
3 | 34.447745 56.550055 A
4 | 56.550055 69.393289 B
5 | 69.393289 83.630363 C
6 | 83.630363 105.732673 A
7 | 105.732673 118.675468 B
8 | 118.675468 133.709021 C
9 | 133.709021 164.871287 A
10 | 164.871287 179.904840 D
11 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_If_I_Fell.lab:
--------------------------------------------------------------------------------
1 | 0.000000 17.375527 A
2 | 17.375527 38.845288 B
3 | 38.845288 58.517581 B
4 | 58.517581 72.897328 C
5 | 72.897328 91.371308 B
6 | 91.371308 106.050633 C
7 | 106.050633 125.523207 B
8 | 125.523207 140.901547 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Lucy_In_The_Sky_With_Diamonds.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.352828 A
2 | 16.352828 28.218600 B
3 | 28.218600 48.958773 C
4 | 48.958773 67.704698 D
5 | 67.704698 90.139981 B
6 | 90.139981 109.185043 C
7 | 109.185043 127.332694 D
8 | 127.332694 152.958773 B
9 | 152.958773 173.000959 D
10 | 173.000959 186.761266 D
11 | 186.761266 206.903164 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Maxwell's_Silver_Hammer.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.671649 A
2 | 14.671649 31.239634 A
3 | 31.239634 57.588717 B
4 | 57.588717 72.260366 A
5 | 72.260366 94.317743 A
6 | 94.317743 108.590164 B
7 | 108.590164 130.148505 C
8 | 130.148505 144.919961 A
9 | 144.919961 167.176953 A
10 | 167.176953 181.050145 B
11 | 181.050145 194.424301 C
12 | 194.424301 205.902122 D
13 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_Mother_Nature's_Son.lab:
--------------------------------------------------------------------------------
1 | 0.000000 6.692033 A
2 | 6.692033 21.374554 B
3 | 21.374554 43.548157 C
4 | 43.548157 69.517241 C
5 | 69.517241 91.091558 D
6 | 91.091558 113.564804 C
7 | 113.564804 135.938169 D
8 | 135.938169 156.114150 C
9 | 156.114150 166.901308 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_You've_Got_To_Hide_Your_Love_Away.lab:
--------------------------------------------------------------------------------
1 | 0.000000 18.515198 A
2 | 18.515198 35.736322 A
3 | 35.736322 54.749240 B
4 | 54.749240 71.572188 A
5 | 71.572188 89.291033 A
6 | 89.291033 107.208967 B
7 | 107.208967 129.905015 C
8 |
--------------------------------------------------------------------------------
/workspace/estimation/03_-_You_Won't_See_Me.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.853057 A
2 | 11.853057 22.610454 B
3 | 22.610454 38.746548 C
4 | 38.746548 57.372781 A
5 | 57.372781 77.592702 C
6 | 77.592702 94.824458 D
7 | 94.824458 112.155819 B
8 | 112.155819 131.280079 C
9 | 131.280079 148.910256 D
10 | 148.910256 167.237673 B
11 | 167.237673 182.278107 C
12 | 182.278107 200.904339 E
13 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Blue_Jay_Way.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.219080 A
2 | 21.219080 48.614605 B
3 | 48.614605 68.339384 C
4 | 68.339384 90.156184 D
5 | 90.156184 113.865766 E
6 | 113.865766 131.299282 D
7 | 131.299282 148.234698 C
8 | 148.234698 165.767835 F
9 | 165.767835 183.898691 F
10 | 183.898691 198.742085 F
11 | 198.742085 211.493457 G
12 | 211.493457 225.141410 G
13 | 225.141410 234.904179 H
14 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Chains.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.066849 A
2 | 8.066849 30.375171 B
3 | 30.375171 50.990450 B
4 | 50.990450 66.626194 C
5 | 66.626194 88.137790 B
6 | 88.137790 104.072306 C
7 | 104.072306 124.388813 B
8 | 124.388813 144.904502 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Don't_Bother_Me.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.488294 A
2 | 3.488294 21.627425 B
3 | 21.627425 37.972575 B
4 | 37.972575 61.692977 A
5 | 61.692977 78.436789 B
6 | 78.436789 95.379933 B
7 | 95.379933 116.907692 C
8 | 116.907692 132.455518 B
9 | 132.455518 147.903679 D
10 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Everybody's_Got_Something_To_Hide_Except_Me_and_M.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.259310 A
2 | 20.259310 39.128276 B
3 | 39.128276 59.486897 C
4 | 59.486897 77.362759 B
5 | 77.362759 98.515862 C
6 | 98.515862 113.908966 B
7 | 113.908966 139.729655 D
8 | 139.729655 142.907586 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Getting_Better.lab:
--------------------------------------------------------------------------------
1 | 0.000000 23.757738 A
2 | 23.757738 42.346429 B
3 | 42.346429 59.245238 C
4 | 59.245238 77.336905 B
5 | 77.336905 95.826190 B
6 | 95.826190 116.900000 D
7 | 116.900000 133.699405 B
8 | 133.699405 154.077381 B
9 | 154.077381 165.906548 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_I'm_Happy_Just_To_Dance_With_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 27.192599 A
2 | 27.192599 43.468461 B
3 | 43.468461 55.873844 C
4 | 55.873844 71.951220 D
5 | 71.951220 83.860387 C
6 | 83.860387 98.449117 A
7 | 98.449117 116.908326 E
8 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_I_Me_Mine.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.466758 A
2 | 21.466758 37.169294 B
3 | 37.169294 56.847156 C
4 | 56.847156 72.549692 D
5 | 72.549692 86.264565 B
6 | 86.264565 106.141193 C
7 | 106.141193 122.738177 D
8 | 122.738177 135.161069 B
9 | 135.161069 143.906785 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_I_Need_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 26.278181 A
2 | 26.278181 51.959130 A
3 | 51.959130 67.885300 B
4 | 67.885300 91.575478 A
5 | 91.575478 109.492419 B
6 | 109.492419 132.087673 A
7 | 132.087673 149.905076 C
8 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Love_You_To.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.862734 A
2 | 16.862734 38.215546 B
3 | 38.215546 52.683572 C
4 | 52.683572 68.947630 D
5 | 68.947630 85.610805 C
6 | 85.610805 99.280595 D
7 | 99.280595 113.349504 E
8 | 113.349504 127.119074 D
9 | 127.119074 142.285557 F
10 | 142.285557 155.057332 D
11 | 155.057332 179.902426 G
12 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Nowhere_Man.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.483283 A
2 | 5.483283 17.845593 B
3 | 17.845593 32.600608 C
4 | 32.600608 46.757447 D
5 | 46.757447 64.303951 E
6 | 64.303951 78.959271 C
7 | 78.959271 98.400000 D
8 | 98.400000 110.662614 C
9 | 110.662614 128.308815 D
10 | 128.308815 142.964134 C
11 | 142.964134 159.912462 F
12 | 159.912462 162.903343 G
13 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Ob-La-Di,_Ob-La-Da.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.130159 A
2 | 13.130159 43.568254 B
3 | 43.568254 76.393651 B
4 | 76.393651 94.397884 C
5 | 94.397884 127.223280 B
6 | 127.223280 145.028571 C
7 | 145.028571 176.162963 B
8 | 176.162963 186.905820 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Oh!_Darling.lab:
--------------------------------------------------------------------------------
1 | 0.000000 17.224746 A
2 | 17.224746 34.549058 A
3 | 34.549058 65.414210 A
4 | 65.414210 84.928951 B
5 | 84.928951 98.469792 C
6 | 98.469792 129.135814 A
7 | 129.135814 150.442726 B
8 | 150.442726 164.680522 C
9 | 164.680522 180.810053 D
10 | 180.810053 196.840019 A
11 | 196.840019 204.904785 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/04_-_Rock_and_Roll_Music.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.573099 A
2 | 21.573099 33.005848 B
3 | 33.005848 52.789474 A
4 | 52.789474 64.918129 B
5 | 64.918129 83.707602 A
6 | 83.707602 96.730994 B
7 | 96.730994 115.222222 A
8 | 115.222222 129.239766 B
9 | 129.239766 146.339181 A
10 | 146.339181 151.906433 C
11 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_And_I_Love_Her.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.189153 A
2 | 8.189153 29.460979 B
3 | 29.460979 51.531746 B
4 | 51.531746 68.309524 C
5 | 68.309524 88.882275 B
6 | 88.882275 110.553571 D
7 | 110.553571 132.324735 D
8 | 132.324735 149.901455 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Another_Girl.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.990640 A
2 | 5.990640 27.157566 A
3 | 27.157566 48.424337 A
4 | 48.424337 60.705148 B
5 | 60.705148 81.173167 A
6 | 81.173167 92.854914 B
7 | 92.854914 107.831513 A
8 | 107.831513 117.616225 A
9 | 117.616225 126.901716 C
10 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Boys.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.066351 A
2 | 7.066351 27.170616 B
3 | 27.170616 45.284360 B
4 | 45.284360 65.189573 C
5 | 65.189573 88.777251 D
6 | 88.777251 106.393365 B
7 | 106.393365 125.502370 C
8 | 125.502370 139.734597 E
9 | 139.734597 145.905213 F
10 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Dig_It.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.537849 A
2 | 15.537849 38.446215 B
3 | 38.446215 48.904382 C
4 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Fixing_A_Hole.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.676020 A
2 | 4.676020 24.275510 B
3 | 24.275510 40.591837 B
4 | 40.591837 58.599490 C
5 | 58.599490 75.114796 B
6 | 75.114796 91.729592 D
7 | 91.729592 109.239796 C
8 | 109.239796 127.545918 B
9 | 127.545918 138.987245 E
10 | 138.987245 154.905612 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Here,_There_And_Everywhere.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.626712 A
2 | 10.626712 32.972603 B
3 | 32.972603 56.510274 B
4 | 56.510274 66.839041 C
5 | 66.839041 90.078767 B
6 | 90.078767 100.804795 C
7 | 100.804795 124.044521 B
8 | 124.044521 139.934932 D
9 | 139.934932 143.907534 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_I'll_Follow_the_Sun.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.570144 A
2 | 16.570144 30.145683 A
3 | 30.145683 46.715827 B
4 | 46.715827 59.991906 C
5 | 59.991906 74.166367 C
6 | 74.166367 88.939748 B
7 | 88.939748 103.812950 C
8 | 103.812950 109.901978 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Little_Child.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.290203 A
2 | 5.290203 18.465804 B
3 | 18.465804 32.939002 C
4 | 32.939002 54.399261 C
5 | 54.399261 77.556377 D
6 | 77.556377 95.523105 C
7 | 95.523105 106.902033 E
8 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Octopus's_Garden.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.485114 A
2 | 8.485114 18.767075 B
3 | 18.767075 31.145359 B
4 | 31.145359 52.008757 C
5 | 52.008757 72.672504 B
6 | 72.672504 92.138354 C
7 | 92.138354 114.000000 D
8 | 114.000000 135.262697 B
9 | 135.262697 153.430823 C
10 | 153.430823 165.809107 E
11 | 165.809107 169.901926 F
12 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Sexy_Sadie.lab:
--------------------------------------------------------------------------------
1 | 0.000000 9.675192 A
2 | 9.675192 33.015345 B
3 | 33.015345 54.360614 B
4 | 54.360614 72.015345 C
5 | 72.015345 92.263427 B
6 | 92.263427 114.805627 B
7 | 114.805627 132.360614 C
8 | 132.360614 154.902813 B
9 | 154.902813 176.347826 B
10 | 176.347826 193.902813 D
11 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Think_For_Yourself.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.152688 A
2 | 13.152688 24.810753 A
3 | 24.810753 38.760573 B
4 | 38.760573 49.920430 A
5 | 49.920430 61.678136 A
6 | 61.678136 75.827240 B
7 | 75.827240 87.186380 A
8 | 87.186380 99.143369 A
9 | 99.143369 113.989964 B
10 | 113.989964 127.740502 C
11 | 127.740502 137.903943 D
12 |
--------------------------------------------------------------------------------
/workspace/estimation/05_-_Your_Mother_Should_Know.lab:
--------------------------------------------------------------------------------
1 | 0.000000 23.871829 A
2 | 23.871829 47.345794 B
3 | 47.345794 90.514019 C
4 | 90.514019 128.311081 D
5 | 128.311081 142.534713 E
6 | 142.534713 147.905874 F
7 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-The_Continuing_Story_of_Bungalow_Bill.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.291452 A
2 | 8.291452 23.276004 B
3 | 23.276004 45.752832 C
4 | 45.752832 60.637487 B
5 | 60.637487 83.114315 C
6 | 83.114315 98.598352 B
7 | 98.598352 120.975283 C
8 | 120.975283 135.760041 B
9 | 135.760041 150.345005 B
10 | 150.345005 165.429454 B
11 | 165.429454 176.218332 B
12 | 176.218332 192.901133 D
13 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_Ask_Me_Why.lab:
--------------------------------------------------------------------------------
1 | 0.000000 26.139959 A
2 | 26.139959 45.720081 A
3 | 45.720081 73.152130 B
4 | 73.152130 96.608519 A
5 | 96.608519 121.456389 C
6 | 121.456389 132.985801 B
7 | 132.985801 145.906694 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_I_Am_The_Walrus.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.984848 A
2 | 20.984848 48.065296 B
3 | 48.065296 64.053752 C
4 | 64.053752 80.441919 B
5 | 80.441919 93.932179 D
6 | 93.932179 103.924964 B
7 | 103.924964 121.012626 C
8 | 121.012626 139.799062 E
9 | 139.799062 156.387085 C
10 | 156.387085 182.168470 B
11 | 182.168470 198.856421 C
12 | 198.856421 214.245310 F
13 | 214.245310 234.430736 F
14 | 234.430736 251.318543 F
15 | 251.318543 275.900794 G
16 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_I_Want_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.490691 A
2 | 14.490691 52.066553 B
3 | 52.066553 65.258078 C
4 | 65.258078 102.833940 B
5 | 102.833940 116.225337 C
6 | 116.225337 128.917184 A
7 | 128.917184 142.008774 A
8 | 142.008774 183.582067 D
9 | 183.582067 197.872887 C
10 | 197.872887 211.664027 A
11 | 211.664027 223.356516 A
12 | 223.356516 245.942007 D
13 | 245.942007 276.922106 C
14 | 276.922106 291.412797 A
15 | 291.412797 302.505671 A
16 | 302.505671 316.796490 A
17 | 316.796490 336.283972 E
18 | 336.283972 359.768885 E
19 | 359.768885 381.754761 E
20 | 381.754761 399.543334 E
21 | 399.543334 414.333833 E
22 | 414.333833 427.225551 E
23 | 427.225551 445.313931 E
24 | 445.313931 463.502247 E
25 | 463.502247 465.900706 F
26 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_Let_It_Be.lab:
--------------------------------------------------------------------------------
1 | 0.000000 22.154415 A
2 | 22.154415 37.822177 A
3 | 37.822177 46.604107 B
4 | 46.604107 61.673101 A
5 | 61.673101 75.344969 A
6 | 75.344969 88.917043 C
7 | 88.917043 101.091992 C
8 | 101.091992 117.059138 D
9 | 117.059138 126.140452 E
10 | 126.140452 136.020123 F
11 | 136.020123 143.005749 G
12 | 143.005749 158.873101 C
13 | 158.873101 186.416427 H
14 | 186.416427 198.491581 C
15 | 198.491581 211.564682 C
16 | 211.564682 227.931006 C
17 | 227.931006 241.902259 I
18 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_Mr._Moonlight.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.690597 A
2 | 3.690597 21.644854 B
3 | 21.644854 36.407243 C
4 | 36.407243 55.957433 D
5 | 55.957433 68.924396 E
6 | 68.924396 85.282719 D
7 | 85.282719 99.346887 F
8 | 99.346887 113.510801 D
9 | 113.510801 129.669632 E
10 | 129.669632 145.828463 D
11 | 145.828463 155.902795 G
12 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_She's_Leaving_Home.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.192379 A
2 | 8.192379 27.774164 B
3 | 27.774164 46.956320 B
4 | 46.956320 61.342937 C
5 | 61.342937 77.727695 D
6 | 77.727695 101.605483 B
7 | 101.605483 121.287175 B
8 | 121.287175 134.474907 C
9 | 134.474907 150.859665 D
10 | 150.859665 176.535781 B
11 | 176.535781 199.314591 D
12 | 199.314591 213.901022 E
13 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_Tell_Me_Why.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.192012 A
2 | 5.192012 25.360983 B
3 | 25.360983 35.445469 C
4 | 35.445469 55.514593 B
5 | 55.514593 67.895545 C
6 | 67.895545 84.769585 B
7 | 84.769585 100.445469 D
8 | 100.445469 118.717358 B
9 | 118.717358 128.901690 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_The_Word.lab:
--------------------------------------------------------------------------------
1 | 0.000000 22.276998 A
2 | 22.276998 36.498475 B
3 | 36.498475 55.195241 A
4 | 55.195241 67.527151 B
5 | 67.527151 82.842587 A
6 | 82.842587 98.555827 B
7 | 98.555827 113.970714 A
8 | 113.970714 129.783405 B
9 | 129.783405 152.458206 C
10 | 152.458206 161.906040 D
11 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_Till_There_Was_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 6.854638 A
2 | 6.854638 22.352082 B
3 | 22.352082 38.942294 B
4 | 38.942294 55.830533 C
5 | 55.830533 68.645727 B
6 | 68.645727 90.401753 D
7 | 90.401753 102.024836 C
8 | 102.024836 115.833455 B
9 | 115.833455 134.907232 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_Yellow_Submarine.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.058531 A
2 | 11.058531 25.603985 B
3 | 25.603985 36.264010 C
4 | 36.264010 52.004981 D
5 | 52.004981 69.140722 B
6 | 69.140722 88.169365 D
7 | 88.169365 105.902864 E
8 | 105.902864 122.839352 B
9 | 122.839352 141.170610 D
10 | 141.170610 158.904110 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/06_-_You're_Going_to_Lose_That_Girl.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.467994 A
2 | 7.467994 28.975818 A
3 | 28.975818 50.881935 A
4 | 50.881935 69.004267 B
5 | 69.004267 82.546230 C
6 | 82.546230 93.399716 D
7 | 93.399716 106.842105 B
8 | 106.842105 129.943101 A
9 | 129.943101 138.904694 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Being_For_The_Benefit_Of_Mr._Kite!.lab:
--------------------------------------------------------------------------------
1 | 0.000000 34.534011 A
2 | 34.534011 59.985378 A
3 | 59.985378 74.856961 B
4 | 74.856961 88.331214 C
5 | 88.331214 111.287349 A
6 | 111.287349 129.752066 D
7 | 129.752066 155.902098 E
8 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Can't_Buy_Me_Love.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.116950 A
2 | 10.116950 25.887491 B
3 | 25.887491 43.740933 B
4 | 43.740933 69.330866 B
5 | 69.330866 100.673575 C
6 | 100.673575 115.650629 B
7 | 115.650629 132.908956 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Hello_Goodbye.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.541588 A
2 | 20.541588 38.390832 B
3 | 38.390832 58.234405 A
4 | 58.234405 76.083648 B
5 | 76.083648 95.727788 C
6 | 95.727788 113.975898 B
7 | 113.975898 132.822306 C
8 | 132.822306 145.685728 B
9 | 145.685728 182.281664 D
10 | 182.281664 195.743384 D
11 | 195.743384 209.903119 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Here_Comes_The_Sun.lab:
--------------------------------------------------------------------------------
1 | 0.000000 31.879375 A
2 | 31.879375 44.332256 B
3 | 44.332256 57.482499 B
4 | 57.482499 88.564890 B
5 | 88.564890 107.792138 C
6 | 107.792138 125.226171 C
7 | 125.226171 158.998384 B
8 | 158.998384 172.447496 B
9 | 172.447496 183.904146 D
10 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Kansas_City-_Hey,_Hey,_Hey,_Hey.lab:
--------------------------------------------------------------------------------
1 | 0.000000 9.960938 A
2 | 9.960938 28.289063 B
3 | 28.289063 50.501953 B
4 | 50.501953 73.013672 C
5 | 73.013672 93.035156 D
6 | 93.035156 115.546875 D
7 | 115.546875 134.074219 E
8 | 134.074219 151.904297 F
9 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Long_Long_Long.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.471545 A
2 | 10.471545 39.891599 B
3 | 39.891599 69.211924 B
4 | 69.211924 84.271003 C
5 | 84.271003 100.127913 D
6 | 100.127913 122.168022 B
7 | 122.168022 136.927913 E
8 | 136.927913 150.889973 E
9 | 150.889973 169.240108 F
10 | 169.240108 182.902981 G
11 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Maggie_Mae.lab:
--------------------------------------------------------------------------------
1 | 0.000000 20.196078 A
2 | 20.196078 38.921569 B
3 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Michelle.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.981538 A
2 | 5.981538 21.035077 B
3 | 21.035077 34.194462 B
4 | 34.194462 53.933538 C
5 | 53.933538 65.896615 B
6 | 65.896615 84.439385 C
7 | 84.439385 97.997538 B
8 | 97.997538 117.437538 C
9 | 117.437538 130.696615 B
10 | 130.696615 157.015385 D
11 | 157.015385 160.903385 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Please_Mister_Postman.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.451243 A
2 | 8.451243 24.458891 B
3 | 24.458891 37.483748 C
4 | 37.483748 57.269598 D
5 | 57.269598 83.120459 B
6 | 83.120459 100.520076 D
7 | 100.520076 112.848948 E
8 | 112.848948 131.441683 E
9 | 131.441683 146.355641 E
10 | 146.355641 154.906310 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Please_Please_Me.lab:
--------------------------------------------------------------------------------
1 | 0.000000 6.573279 A
2 | 6.573279 34.061538 B
3 | 34.061538 61.051822 B
4 | 61.051822 77.485020 C
5 | 77.485020 107.263968 B
6 | 107.263968 121.904453 D
7 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_She_Said_She_Said.lab:
--------------------------------------------------------------------------------
1 | 0.000000 6.787031 A
2 | 6.787031 29.044501 B
3 | 29.044501 50.703115 B
4 | 50.703115 71.962492 C
5 | 71.962492 92.323586 B
6 | 92.323586 114.281627 C
7 | 114.281627 135.740623 B
8 | 135.740623 151.310871 D
9 | 151.310871 155.902098 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_Ticket_To_Ride.lab:
--------------------------------------------------------------------------------
1 | 0.000000 37.383178 A
2 | 37.383178 67.090343 A
3 | 67.090343 86.828660 B
4 | 86.828660 115.838006 A
5 | 115.838006 135.576324 B
6 | 135.576324 151.426791 A
7 | 151.426791 165.881620 A
8 | 165.881620 179.140187 C
9 | 179.140187 190.903427 D
10 |
--------------------------------------------------------------------------------
/workspace/estimation/07_-_While_My_Guitar_Gently_Weeps.lab:
--------------------------------------------------------------------------------
1 | 0.000000 18.667250 A
2 | 18.667250 30.546410 A
3 | 30.546410 50.211909 B
4 | 50.211909 67.481611 C
5 | 67.481611 83.553415 C
6 | 83.553415 99.126095 B
7 | 99.126095 116.894921 B
8 | 116.894921 130.570928 B
9 | 130.570928 150.336252 D
10 | 150.336252 167.106830 C
11 | 167.106830 182.978984 C
12 | 182.978984 199.350263 B
13 | 199.350263 216.220665 B
14 | 216.220665 246.567426 E
15 | 246.567426 256.749562 D
16 | 256.749562 283.901926 F
17 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Act_Naturally.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.090020 A
2 | 5.090020 26.647750 B
3 | 26.647750 45.111546 C
4 | 45.111546 76.250489 B
5 | 76.250489 98.107632 B
6 | 98.107632 115.573386 C
7 | 115.573386 140.424658 D
8 | 140.424658 151.902153 A
9 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Any_Time_At_All.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.231287 A
2 | 15.231287 26.281437 B
3 | 26.281437 37.232036 B
4 | 37.232036 51.766467 A
5 | 51.766467 62.717066 B
6 | 62.717066 73.667665 B
7 | 73.667665 88.998503 A
8 | 88.998503 103.632485 C
9 | 103.632485 119.560629 A
10 | 119.560629 129.814371 D
11 | 129.814371 131.904940 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Because.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.584792 A
2 | 3.584792 30.968618 A
3 | 30.968618 58.452022 B
4 | 58.452022 88.126132 B
5 | 88.126132 102.365721 C
6 | 102.365721 134.927580 B
7 | 134.927580 159.821967 B
8 | 159.821967 163.904647 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Eight_Days_a_Week.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.173913 A
2 | 7.173913 33.677536 B
3 | 33.677536 60.978261 B
4 | 60.978261 75.625000 C
5 | 75.625000 90.869565 B
6 | 90.869565 104.021739 B
7 | 104.021739 116.376812 C
8 | 116.376812 132.916667 B
9 | 132.916667 147.164855 D
10 | 147.164855 163.903986 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Good_Day_Sunshine.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.129330 A
2 | 10.129330 37.836028 B
3 | 37.836028 48.163972 C
4 | 48.163972 65.344111 D
5 | 65.344111 77.856813 C
6 | 77.856813 105.166282 C
7 | 105.166282 117.182448 C
8 | 117.182448 127.907621 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_I've_Got_A_Feeling.lab:
--------------------------------------------------------------------------------
1 | 0.000000 26.565337 A
2 | 26.565337 40.892710 B
3 | 40.892710 73.925264 B
4 | 73.925264 86.461715 C
5 | 86.461715 123.872077 B
6 | 123.872077 137.602476 D
7 | 137.602476 152.427327 D
8 | 152.427327 166.058230 E
9 | 166.058230 187.947272 D
10 | 187.947272 205.458505 F
11 | 205.458505 215.905548 G
12 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Love_Me_Do.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.719384 A
2 | 12.719384 32.990903 B
3 | 32.990903 52.864941 B
4 | 52.864941 68.167950 C
5 | 68.167950 86.452064 B
6 | 86.452064 108.611617 D
7 | 108.611617 125.802659 B
8 | 125.802659 140.906928 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Revolution_1.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.985932 A
2 | 3.985932 17.438453 B
3 | 17.438453 47.332943 C
4 | 47.332943 62.778429 D
5 | 62.778429 78.722157 E
6 | 78.722157 92.573271 C
7 | 92.573271 108.218054 C
8 | 108.218054 129.044549 D
9 | 129.044549 142.098476 E
10 | 142.098476 157.344666 C
11 | 157.344666 171.694021 C
12 | 171.694021 189.431419 D
13 | 189.431419 209.062134 E
14 | 209.062134 222.315358 F
15 | 222.315358 238.259086 F
16 | 238.259086 253.903869 G
17 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Roll_Over_Beethoven.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.274732 A
2 | 5.274732 19.506555 B
3 | 19.506555 37.022646 C
4 | 37.022646 54.041120 C
5 | 54.041120 72.552443 C
6 | 72.552443 102.608462 D
7 | 102.608462 124.503576 C
8 | 124.503576 136.943981 E
9 | 136.943981 152.469607 F
10 | 152.469607 165.905244 G
11 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Strawberry_Fields_Forever.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.254487 A
2 | 16.254487 31.112884 B
3 | 31.112884 58.835261 C
4 | 58.835261 75.289190 D
5 | 75.289190 87.056243 E
6 | 87.056243 103.310730 F
7 | 103.310730 120.961308 D
8 | 120.961308 130.434783 E
9 | 130.434783 145.392900 F
10 | 145.392900 163.841245 D
11 | 163.841245 181.591544 G
12 | 181.591544 201.336258 H
13 | 201.336258 221.779019 I
14 | 221.779019 235.041883 J
15 | 235.041883 248.903071 K
16 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_What_Goes_On.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.175439 A
2 | 4.175439 28.532164 B
3 | 28.532164 48.315789 C
4 | 48.315789 60.245614 B
5 | 60.245614 72.175439 D
6 | 72.175439 92.555556 C
7 | 92.555556 111.643275 E
8 | 111.643275 133.713450 C
9 | 133.713450 154.192982 B
10 | 154.192982 168.906433 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/08_-_Within_You_Without_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.990170 A
2 | 14.990170 30.380079 B
3 | 30.380079 43.871232 C
4 | 43.871232 56.363041 C
5 | 56.363041 75.250655 D
6 | 75.250655 87.342726 C
7 | 87.342726 100.733945 C
8 | 100.733945 128.515727 E
9 | 128.515727 143.206094 F
10 | 143.206094 171.487549 G
11 | 171.487549 207.264089 G
12 | 207.264089 227.151048 H
13 | 227.151048 239.343054 C
14 | 239.343054 251.235256 C
15 | 251.235256 285.612713 E
16 | 285.612713 303.900721 F
17 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_And_Your_Bird_Can_Sing.lab:
--------------------------------------------------------------------------------
1 | 0.000000 22.532404 A
2 | 22.532404 34.543068 A
3 | 34.543068 50.524200 B
4 | 50.524200 63.229696 C
5 | 63.229696 79.905660 B
6 | 79.905660 94.695652 D
7 | 94.695652 119.908121 C
8 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_Girl.lab:
--------------------------------------------------------------------------------
1 | 0.000000 31.295455 A
2 | 31.295455 60.007792 A
3 | 60.007792 79.480519 B
4 | 79.480519 110.279221 A
5 | 110.279221 118.525325 A
6 | 118.525325 141.375974 C
7 | 141.375974 151.907143 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_Hold_Me_Tight.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.931238 A
2 | 14.931238 30.161100 B
3 | 30.161100 54.946955 A
4 | 54.946955 70.674525 C
5 | 70.674525 96.853962 A
6 | 96.853962 111.088409 C
7 | 111.088409 127.015062 A
8 | 127.015062 144.534381 D
9 | 144.534381 150.905043 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_Honey_Pie.lab:
--------------------------------------------------------------------------------
1 | 0.000000 39.477399 A
2 | 39.477399 52.237771 B
3 | 52.237771 64.798762 C
4 | 64.798762 79.353560 D
5 | 79.353560 93.110836 B
6 | 93.110836 104.774613 C
7 | 104.774613 117.235913 C
8 | 117.235913 131.990093 D
9 | 131.990093 144.152322 B
10 | 144.152322 157.211765 C
11 | 157.211765 159.903406 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_I'll_Cry_Instead.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.669138 A
2 | 3.669138 23.105653 A
3 | 23.105653 41.848007 B
4 | 41.848007 52.657090 C
5 | 52.657090 70.011121 B
6 | 70.011121 82.109361 C
7 | 82.109361 101.645042 B
8 | 101.645042 105.909175 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_It's_Only_Love.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.833613 A
2 | 7.833613 28.161345 B
3 | 28.161345 50.174790 C
4 | 50.174790 69.907563 B
5 | 69.907563 90.830252 C
6 | 90.830252 116.909244 D
7 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_Martha_My_Dear.lab:
--------------------------------------------------------------------------------
1 | 0.000000 19.282740 A
2 | 19.282740 38.664876 A
3 | 38.664876 61.028878 B
4 | 61.028878 76.534587 C
5 | 76.534587 100.091336 D
6 | 100.091336 116.591001 B
7 | 116.591001 144.421760 D
8 | 144.421760 146.906649 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_One_After_909.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.649402 A
2 | 12.649402 27.788845 B
3 | 27.788845 50.498008 B
4 | 50.498008 74.103586 C
5 | 74.103586 92.330677 B
6 | 92.330677 111.852590 D
7 | 111.852590 125.597610 E
8 | 125.597610 136.952191 C
9 | 136.952191 153.386454 B
10 | 153.386454 173.904382 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_P._S._I_Love_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.212073 A
2 | 12.212073 31.374106 B
3 | 31.374106 48.947577 B
4 | 48.947577 62.053217 C
5 | 62.053217 80.718824 B
6 | 80.718824 94.023034 C
7 | 94.023034 112.192216 B
8 | 112.192216 123.907863 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_Penny_Lane.lab:
--------------------------------------------------------------------------------
1 | 0.000000 17.053406 A
2 | 17.053406 33.608174 A
3 | 33.608174 52.057766 B
4 | 52.057766 67.615259 A
5 | 67.615259 83.771117 C
6 | 83.771117 102.619619 B
7 | 102.619619 118.077384 A
8 | 118.077384 134.532425 A
9 | 134.532425 154.178747 B
10 | 154.178747 178.711717 D
11 | 178.711717 181.902997 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_When_I'm_Sixty-Four.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.235592 A
2 | 11.235592 36.590247 B
3 | 36.590247 64.331222 C
4 | 64.331222 91.674478 B
5 | 91.674478 119.415453 C
6 | 119.415453 152.326789 B
7 | 152.326789 155.906270 A
8 |
--------------------------------------------------------------------------------
/workspace/estimation/09_-_Words_of_Love.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.992587 A
2 | 15.992587 31.885841 B
3 | 31.885841 47.183099 B
4 | 47.183099 63.771683 C
5 | 63.771683 78.671609 C
6 | 78.671609 94.564863 B
7 | 94.564863 109.961453 B
8 | 109.961453 132.907339 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Baby_It's_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.783818 A
2 | 12.783818 30.061947 B
3 | 30.061947 56.628319 C
4 | 56.628319 74.805310 D
5 | 74.805310 102.570164 C
6 | 102.570164 119.348925 E
7 | 119.348925 147.213654 C
8 | 147.213654 156.901391 F
9 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Baby_You're_A_Rich_Man.lab:
--------------------------------------------------------------------------------
1 | 0.000000 24.877651 A
2 | 24.877651 50.252855 B
3 | 50.252855 71.747145 B
4 | 71.747145 86.076672 C
5 | 86.076672 103.988581 D
6 | 103.988581 130.557912 B
7 | 130.557912 146.877651 C
8 | 146.877651 157.724307 C
9 | 157.724307 166.879282 D
10 | 166.879282 181.905383 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_For_No_One.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.812141 A
2 | 11.812141 24.716161 A
3 | 24.716161 37.818704 B
4 | 37.818704 50.524200 A
5 | 50.524200 61.740771 C
6 | 61.740771 75.935193 B
7 | 75.935193 87.350287 A
8 | 87.350287 99.857260 A
9 | 99.857260 112.761280 B
10 | 112.761280 119.908121 D
11 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Honey_Don't.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.873749 A
2 | 5.873749 20.807008 B
3 | 20.807008 41.414905 C
4 | 41.414905 54.655729 B
5 | 54.655729 72.774750 C
6 | 72.774750 88.006674 D
7 | 88.006674 105.329255 C
8 | 105.329255 118.271413 B
9 | 118.271413 137.286429 C
10 | 137.286429 153.016129 D
11 | 153.016129 169.840934 C
12 | 169.840934 177.904894 E
13 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_I'm_Looking_Through_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.343243 A
2 | 8.343243 32.379730 B
3 | 32.379730 58.601351 B
4 | 58.601351 71.116216 C
5 | 71.116216 96.443919 B
6 | 96.443919 106.376351 C
7 | 106.376351 130.512162 B
8 | 130.512162 145.907432 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_I'm_So_Tired.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.910931 A
2 | 21.910931 40.834008 B
3 | 40.834008 64.537652 C
4 | 64.537652 84.855061 D
5 | 84.855061 102.085020 C
6 | 102.085020 121.904453 E
7 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Lovely_Rita.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.591497 A
2 | 4.591497 21.659889 B
3 | 21.659889 61.386322 C
4 | 61.386322 74.062847 D
5 | 74.062847 90.432532 C
6 | 90.432532 109.996303 C
7 | 109.996303 120.177449 B
8 | 120.177449 131.955638 B
9 | 131.955638 152.018484 E
10 | 152.018484 160.902033 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Savoy_Truffle.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.030268 A
2 | 11.030268 39.251856 B
3 | 39.251856 71.547687 C
4 | 71.547687 91.521416 D
5 | 91.521416 118.351799 C
6 | 118.351799 136.139349 D
7 | 136.139349 164.857796 C
8 | 164.857796 172.906910 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Sun_King.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.550171 A
2 | 14.550171 28.801365 B
3 | 28.801365 54.114676 B
4 | 54.114676 71.255973 C
5 | 71.255973 83.912628 C
6 | 83.912628 100.156997 D
7 | 100.156997 112.913311 E
8 | 112.913311 126.965188 F
9 | 126.965188 144.903754 F
10 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_The_Long_and_Winding_Road.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.225229 A
2 | 16.225229 25.681651 A
3 | 25.681651 44.096789 B
4 | 44.096789 69.380275 A
5 | 69.380275 84.211927 C
6 | 84.211927 103.821560 D
7 | 103.821560 127.811009 A
8 | 127.811009 142.941284 C
9 | 142.941284 161.655046 D
10 | 161.655046 170.514220 A
11 | 170.514220 185.047248 A
12 | 185.047248 200.376606 C
13 | 200.376606 215.905046 E
14 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_Things_We_Said_Today.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.272956 A
2 | 4.272956 16.893082 B
3 | 16.893082 32.494340 C
4 | 32.494340 59.125786 B
5 | 59.125786 74.528302 D
6 | 74.528302 88.738365 B
7 | 88.738365 101.060377 C
8 | 101.060377 116.065409 D
9 | 116.065409 128.983648 B
10 | 128.983648 144.982390 C
11 | 144.982390 156.906918 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_You_Like_Me_Too_Much.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.732075 A
2 | 10.732075 30.705660 B
3 | 30.705660 51.871698 B
4 | 51.871698 64.094340 C
5 | 64.094340 85.657862 B
6 | 85.657862 98.973585 D
7 | 98.973585 107.221384 B
8 | 107.221384 117.953459 C
9 | 117.953459 139.417610 B
10 | 139.417610 156.906918 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/10_-_You_Really_Got_A_Hold_On_Me.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.705079 A
2 | 15.705079 26.937193 B
3 | 26.937193 48.705625 C
4 | 48.705625 62.621518 B
5 | 62.621518 83.594757 C
6 | 83.594757 110.631349 D
7 | 110.631349 124.646641 B
8 | 124.646641 143.631895 C
9 | 143.631895 157.845986 E
10 | 157.845986 171.861278 F
11 | 171.861278 180.906608 G
12 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_All_You_Need_Is_Love.lab:
--------------------------------------------------------------------------------
1 | 0.000000 26.142670 A
2 | 26.142670 43.504595 B
3 | 43.504595 61.265646 B
4 | 61.265646 78.028884 C
5 | 78.028884 95.989497 B
6 | 95.989497 112.253829 C
7 | 112.253829 129.316411 B
8 | 129.316411 146.378993 C
9 | 146.378993 163.541357 C
10 | 163.541357 195.072210 D
11 | 195.072210 209.740044 E
12 | 209.740044 226.902407 F
13 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Black_Bird.lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.589595 A
2 | 3.589595 25.326590 B
3 | 25.326590 46.565029 B
4 | 46.565029 62.419075 C
5 | 62.419075 75.979769 D
6 | 75.979769 89.640173 C
7 | 89.640173 103.699422 A
8 | 103.699422 123.242775 B
9 | 123.242775 136.903179 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Cry_Baby_Cry.lab:
--------------------------------------------------------------------------------
1 | 0.000000 27.746703 A
2 | 27.746703 40.874176 B
3 | 40.874176 53.902198 C
4 | 53.902198 69.913736 B
5 | 69.913736 86.621429 C
6 | 86.621429 99.251648 B
7 | 99.251648 128.987363 B
8 | 128.987363 138.733516 B
9 | 138.733516 150.965934 B
10 | 150.965934 175.729121 D
11 | 175.729121 179.906044 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Do_You_Want_To_Know_A_Secret.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.837657 A
2 | 14.837657 41.525523 B
3 | 41.525523 68.113808 B
4 | 68.113808 79.366527 C
5 | 79.366527 89.922176 D
6 | 89.922176 106.950628 B
7 | 106.950628 117.904603 E
8 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Doctor_Robert.lab:
--------------------------------------------------------------------------------
1 | 0.000000 32.304284 A
2 | 32.304284 54.039882 A
3 | 54.039882 72.285820 B
4 | 72.285820 95.716396 A
5 | 95.716396 112.566470 B
6 | 112.566470 123.733383 C
7 | 123.733383 133.903250 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Every_Little_Thing.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.705694 A
2 | 16.705694 27.146752 A
3 | 27.146752 42.957498 B
4 | 42.957498 54.989575 A
5 | 54.989575 65.728949 A
6 | 65.728949 88.898156 B
7 | 88.898156 109.780273 B
8 | 109.780273 122.906175 C
9 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_For_You_Blue.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.309353 A
2 | 15.309353 31.215173 B
3 | 31.215173 57.559189 B
4 | 57.559189 83.207325 C
5 | 83.207325 98.715500 D
6 | 98.715500 121.977763 E
7 | 121.977763 147.228254 E
8 | 147.228254 150.906475 F
9 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Good_Morning_Good_Morning.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.850774 A
2 | 15.850774 30.505263 B
3 | 30.505263 43.165944 B
4 | 43.165944 53.633437 C
5 | 53.633437 73.970279 B
6 | 73.970279 94.805573 D
7 | 94.805573 118.133127 B
8 | 118.133127 135.479257 E
9 | 135.479257 154.320743 F
10 | 154.320743 159.903406 G
11 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_I_Wanna_Be_Your_Man.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.359362 A
2 | 4.359362 20.013434 B
3 | 20.013434 32.497061 C
4 | 32.497061 49.439127 D
5 | 49.439127 63.805206 C
6 | 63.805206 76.685139 E
7 | 76.685139 93.924433 B
8 | 93.924433 107.299748 C
9 | 107.299748 116.910160 F
10 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_In_My_Life.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.139095 A
2 | 8.139095 28.983120 B
3 | 28.983120 49.529372 C
4 | 49.529372 70.571911 B
5 | 70.571911 87.544902 C
6 | 87.544902 107.197839 D
7 | 107.197839 127.247806 C
8 | 127.247806 145.908170 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Mean_Mr_Mustard.lab:
--------------------------------------------------------------------------------
1 | 0.000000 25.644578 A
2 | 25.644578 35.783133 B
3 | 35.783133 62.322289 C
4 | 62.322289 64.906627 D
5 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_Tell_Me_What_You_See.lab:
--------------------------------------------------------------------------------
1 | 0.000000 32.714822 A
2 | 32.714822 61.054409 A
3 | 61.054409 75.969981 B
4 | 75.969981 101.923077 A
5 | 101.923077 113.358349 C
6 | 113.358349 145.178236 A
7 | 145.178236 157.906191 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/11_-_When_I_Get_Home.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.251986 A
2 | 13.251986 42.446209 A
3 | 42.446209 59.982671 B
4 | 59.982671 73.135018 A
5 | 73.135018 89.774729 C
6 | 89.774729 110.200722 B
7 | 110.200722 121.858484 A
8 | 121.858484 136.903971 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_A_Taste_Of_Honey.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.569832 A
2 | 12.569832 30.726257 B
3 | 30.726257 43.296089 C
4 | 43.296089 57.262570 D
5 | 57.262570 79.509178 B
6 | 79.509178 91.380686 C
7 | 91.380686 104.748603 D
8 | 104.748603 123.902634 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_Devil_In_Her_Heart.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.359946 A
2 | 7.359946 23.372801 B
3 | 23.372801 40.678620 C
4 | 40.678620 55.000677 C
5 | 55.000677 74.494587 C
6 | 74.494587 90.407984 D
7 | 90.407984 122.831529 C
8 | 122.831529 145.905954 A
9 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_Get_Back.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.011224 A
2 | 15.011224 28.133618 B
3 | 28.133618 43.244254 C
4 | 43.244254 59.349011 D
5 | 59.349011 75.155532 E
6 | 75.155532 89.371459 D
7 | 89.371459 106.271513 F
8 | 106.271513 122.674506 C
9 | 122.674506 138.282202 D
10 | 138.282202 151.504009 E
11 | 151.504009 166.614645 D
12 | 166.614645 184.906467 G
13 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_I've_Just_Seen_a_Face.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.472899 A
2 | 11.472899 25.938727 B
3 | 25.938727 43.896308 C
4 | 43.896308 62.053417 C
5 | 62.053417 84.400628 C
6 | 84.400628 101.859387 C
7 | 101.859387 118.220738 D
8 | 118.220738 125.902592 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_I_Don't_Want_to_Spoil_the_Party.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.875240 A
2 | 12.875240 31.040307 B
3 | 31.040307 49.105566 B
4 | 49.105566 66.172745 C
5 | 66.172745 84.836852 B
6 | 84.836852 104.898273 B
7 | 104.898273 122.065259 C
8 | 122.065259 140.330134 B
9 | 140.330134 154.902111 D
10 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_I_Want_To_Tell_You.lab:
--------------------------------------------------------------------------------
1 | 0.000000 16.986000 A
2 | 16.986000 36.356000 B
3 | 36.356000 56.620000 B
4 | 56.620000 72.513333 C
5 | 72.513333 91.784000 B
6 | 91.784000 107.478667 C
7 | 107.478667 126.650000 B
8 | 126.650000 147.907333 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_Piggies.lab:
--------------------------------------------------------------------------------
1 | 0.000000 23.903614 A
2 | 23.903614 45.416867 A
3 | 45.416867 66.531727 B
4 | 66.531727 85.355823 C
5 | 85.355823 109.857028 D
6 | 109.857028 122.904418 E
7 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_Polythene_Pam.lab:
--------------------------------------------------------------------------------
1 | 0.000000 24.888889 A
2 | 24.888889 49.876543 B
3 | 49.876543 70.913580 C
4 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_Sgt._Pepper's_Lonely_Hearts_Club_Band_(Reprise).lab:
--------------------------------------------------------------------------------
1 | 0.000000 3.648546 A
2 | 3.648546 21.299621 B
3 | 21.299621 37.865992 C
4 | 37.865992 56.108723 D
5 | 56.108723 76.915297 E
6 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_Wait.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.922684 A
2 | 21.922684 40.274252 A
3 | 40.274252 56.741065 B
4 | 56.741065 76.481400 A
5 | 76.481400 91.956236 B
6 | 91.956236 112.886944 A
7 | 112.886944 122.806710 C
8 | 122.806710 134.908826 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/12_-_You_Can't_Do_That.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.854880 A
2 | 8.854880 30.942332 B
3 | 30.942332 49.149556 B
4 | 49.149556 67.058302 C
5 | 67.058302 85.961977 B
6 | 85.961977 107.651458 D
7 | 107.651458 126.157161 C
8 | 126.157161 145.558302 B
9 | 145.558302 155.905577 E
10 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_A_Day_In_The_Life.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.463612 A
2 | 13.463612 47.172507 B
3 | 47.172507 74.598383 C
4 | 74.598383 95.840970 B
5 | 95.840970 113.293801 D
6 | 113.293801 124.363881 E
7 | 124.363881 168.444744 F
8 | 168.444744 182.107817 G
9 | 182.107817 196.369272 G
10 | 196.369272 220.204852 C
11 | 220.204852 242.045822 D
12 | 242.045822 249.425876 E
13 | 249.425876 262.490566 E
14 | 262.490566 280.541779 H
15 | 280.541779 310.760108 I
16 | 310.760108 329.010782 J
17 | 329.010782 331.902965 J
18 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_Good_Night.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.979145 A
2 | 4.979145 20.812826 B
3 | 20.812826 37.542753 C
4 | 37.542753 51.583942 C
5 | 51.583942 65.625130 D
6 | 65.625130 81.956726 C
7 | 81.956726 96.197080 C
8 | 96.197080 108.445777 D
9 | 108.445777 122.984880 E
10 | 122.984880 138.021898 C
11 | 138.021898 153.955162 C
12 | 153.955162 165.705944 D
13 | 165.705944 189.904588 F
14 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_Got_To_Get_You_Into_My_Life.lab:
--------------------------------------------------------------------------------
1 | 0.000000 8.156499 A
2 | 8.156499 35.809019 B
3 | 35.809019 72.214854 B
4 | 72.214854 109.814324 B
5 | 109.814324 130.503979 C
6 | 130.503979 148.905836 D
7 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_I'll_Be_Back.lab:
--------------------------------------------------------------------------------
1 | 0.000000 15.732575 A
2 | 15.732575 27.681366 A
3 | 27.681366 38.933144 B
4 | 38.933144 50.881935 C
5 | 50.881935 63.229018 A
6 | 63.229018 79.160740 D
7 | 79.160740 92.802276 C
8 | 92.802276 104.153627 A
9 | 104.153627 115.206259 B
10 | 115.206259 128.349929 C
11 | 128.349929 138.904694 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_If_I_Needed_Someone.lab:
--------------------------------------------------------------------------------
1 | 0.000000 12.115278 A
2 | 12.115278 24.230556 B
3 | 24.230556 37.040972 C
4 | 37.040972 52.334028 D
5 | 52.334028 68.123611 B
6 | 68.123611 81.529861 E
7 | 81.529861 97.319444 C
8 | 97.319444 111.818056 D
9 | 111.818056 128.799306 C
10 | 128.799306 141.907639 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_Not_A_Second_Time.lab:
--------------------------------------------------------------------------------
1 | 0.000000 14.244358 A
2 | 14.244358 24.902724 B
3 | 24.902724 47.514397 C
4 | 47.514397 65.444358 C
5 | 65.444358 90.247471 B
6 | 90.247471 113.954864 C
7 | 113.954864 126.904280 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_Rocky_Raccoon.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.047887 A
2 | 11.047887 29.261972 B
3 | 29.261972 51.158685 C
4 | 51.158685 83.705164 C
5 | 83.705164 114.559624 D
6 | 114.559624 126.005634 E
7 | 126.005634 137.750235 E
8 | 137.750235 154.371831 C
9 | 154.371831 184.927700 F
10 | 184.927700 195.179343 E
11 | 195.179343 210.905164 E
12 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_She_Came_In_Trough_The_Bathroom_Window.lab:
--------------------------------------------------------------------------------
1 | 0.000000 23.717557 A
2 | 23.717557 48.923664 B
3 | 48.923664 66.885496 C
4 | 66.885496 87.427481 A
5 | 87.427481 115.908397 B
6 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_There's_A_Place.lab:
--------------------------------------------------------------------------------
1 | 0.000000 6.145133 A
2 | 6.145133 18.534513 B
3 | 18.534513 31.419469 C
4 | 31.419469 46.088496 B
5 | 46.088496 68.686726 D
6 | 68.686726 82.463717 B
7 | 82.463717 94.456637 C
8 | 94.456637 105.854867 E
9 | 105.854867 110.909735 F
10 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_What_You're_Doing.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.032300 A
2 | 13.032300 30.342377 B
3 | 30.342377 46.856589 B
4 | 46.856589 61.182171 C
5 | 61.182171 76.602067 B
6 | 76.602067 90.032300 D
7 | 90.032300 105.551680 C
8 | 105.551680 122.961240 B
9 | 122.961240 148.428941 E
10 | 148.428941 152.905685 F
11 |
--------------------------------------------------------------------------------
/workspace/estimation/13_-_Yesterday.lab:
--------------------------------------------------------------------------------
1 | 0.000000 7.862853 A
2 | 7.862853 22.991379 B
3 | 22.991379 38.418495 B
4 | 38.418495 59.618339 C
5 | 59.618339 75.543103 B
6 | 75.543103 97.638715 C
7 | 97.638715 113.364420 B
8 | 113.364420 125.905172 D
9 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Dizzy_Miss_Lizzie.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.989673 A
2 | 5.989673 22.161790 B
3 | 22.161790 42.526678 C
4 | 42.526678 62.392427 C
5 | 62.392427 86.151463 B
6 | 86.151463 105.518072 D
7 | 105.518072 126.581756 B
8 | 126.581756 147.745267 D
9 | 147.745267 168.709122 D
10 | 168.709122 172.901893 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Don't_Pass_Me_By.lab:
--------------------------------------------------------------------------------
1 | 0.000000 10.073721 A
2 | 10.073721 20.945360 B
3 | 20.945360 41.192541 C
4 | 41.192541 67.723330 C
5 | 67.723330 83.881180 D
6 | 83.881180 99.041631 E
7 | 99.041631 127.267997 C
8 | 127.267997 144.722463 D
9 | 144.722463 163.373807 E
10 | 163.373807 192.398092 D
11 | 192.398092 207.558543 E
12 | 207.558543 228.902862 F
13 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Everybody's_Trying_to_Be_My_Baby.lab:
--------------------------------------------------------------------------------
1 | 0.000000 5.465601 A
2 | 5.465601 19.775539 B
3 | 19.775539 34.482974 B
4 | 34.482974 56.246004 C
5 | 56.246004 68.667825 B
6 | 68.667825 84.070883 D
7 | 84.070883 94.703961 E
8 | 94.703961 107.225156 C
9 | 107.225156 120.541348 B
10 | 120.541348 137.236275 B
11 | 137.236275 141.906880 F
12 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Golden_Slumbers.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.534351 A
2 | 21.534351 33.938931 B
3 | 33.938931 48.229008 C
4 | 48.229008 61.229008 D
5 | 61.229008 79.190840 E
6 | 79.190840 89.908397 B
7 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Money.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.184964 A
2 | 4.184964 20.924821 B
3 | 20.924821 36.867542 C
4 | 36.867542 58.788783 C
5 | 58.788783 82.902148 C
6 | 82.902148 116.082936 B
7 | 116.082936 127.641408 D
8 | 127.641408 139.698091 C
9 | 139.698091 149.463007 E
10 | 149.463007 162.815036 C
11 | 162.815036 165.903938 F
12 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Run_For_Your_Life.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.374640 A
2 | 4.374640 19.586455 B
3 | 19.586455 33.804035 C
4 | 33.804035 57.665706 C
5 | 57.665706 72.579251 D
6 | 72.579251 98.827089 C
7 | 98.827089 131.736311 C
8 | 131.736311 136.906340 E
9 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Tomorrow_Never_Knows.lab:
--------------------------------------------------------------------------------
1 | 0.000000 13.070462 A
2 | 13.070462 27.238444 B
3 | 27.238444 41.905299 B
4 | 41.905299 55.474634 B
5 | 55.474634 74.032694 C
6 | 74.032694 87.402480 D
7 | 87.402480 101.370913 E
8 | 101.370913 117.733935 E
9 | 117.733935 134.496054 B
10 | 134.496054 175.902480 E
11 |
--------------------------------------------------------------------------------
/workspace/estimation/14_-_Twist_And_Shout.lab:
--------------------------------------------------------------------------------
1 | 0.000000 6.487280 A
2 | 6.487280 23.254403 B
3 | 23.254403 36.727984 C
4 | 36.727984 51.598826 B
5 | 51.598826 66.270059 C
6 | 66.270059 84.135029 D
7 | 84.135029 96.211350 E
8 | 96.211350 110.882583 B
9 | 110.882583 123.757339 F
10 | 123.757339 137.829746 G
11 | 137.829746 151.902153 H
12 |
--------------------------------------------------------------------------------
/workspace/estimation/15_-_Carry_That_Weight.lab:
--------------------------------------------------------------------------------
1 | 0.000000 11.777320 A
2 | 11.777320 23.653608 A
3 | 23.653608 43.546392 B
4 | 43.546392 64.329897 B
5 | 64.329897 76.800000 A
6 | 76.800000 91.249485 C
7 | 91.249485 94.911340 D
8 |
--------------------------------------------------------------------------------
/workspace/estimation/15_-_Why_Don't_We_Do_It_In_The_Road.lab:
--------------------------------------------------------------------------------
1 | 0.000000 17.694882 A
2 | 17.694882 36.085630 B
3 | 36.085630 50.997047 C
4 | 50.997047 67.996063 B
5 | 67.996063 77.937008 D
6 | 77.937008 96.228346 E
7 | 96.228346 99.906496 F
8 |
--------------------------------------------------------------------------------
/workspace/estimation/16_-_I_Will.lab:
--------------------------------------------------------------------------------
1 | 0.000000 19.263653 A
2 | 19.263653 37.828625 A
3 | 37.828625 58.489642 B
4 | 58.489642 82.843691 C
5 | 82.843691 102.806026 D
6 | 102.806026 104.902072 E
7 |
--------------------------------------------------------------------------------
/workspace/estimation/17_-_Her_Majesty.lab:
--------------------------------------------------------------------------------
1 | 0.000000 21.914163 A
2 |
--------------------------------------------------------------------------------
/workspace/estimation/17_-_Julia.lab:
--------------------------------------------------------------------------------
1 | 0.000000 4.994259 A
2 | 4.994259 14.383467 A
3 | 14.383467 34.959816 B
4 | 34.959816 59.831228 B
5 | 59.831228 79.708381 C
6 | 79.708381 102.582090 B
7 | 102.582090 138.241102 A
8 | 138.241102 157.419059 A
9 | 157.419059 172.901263 D
10 |
--------------------------------------------------------------------------------
/workspace/eval.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | Created on Wed Aug 3 20:15:40 2016
4 |
5 | @author: ACER
6 | """
7 | import mir_eval
8 | import numpy as np
9 | from os import walk
10 | import pandas as pd
11 |
12 |
13 | path_an = 'C:\structural analysis\segmentation\workspace\\annotation'
14 | path_es = 'C:\structural analysis\segmentation\workspace\estimation'
15 | for (dirpath, dirnames, filenames) in walk(path_es):
16 | break
17 | #%%
18 |
19 | score = np.zeros((len(filenames),), dtype=[('filenamme','S50'),('P05', 'f4'), ('R05', 'f4'), ('F05', 'f4'),('P3', 'f4'), ('R3', 'f4'), ('F3', 'f4'),('P', 'f4'), ('R', 'f4'),('F', 'f4'), ('PWP', 'f4'), ('PWR', 'f4'),('PWF', 'f4'), ('So','f4'), ('Su','f4'), ('Sf', 'f4')]);
20 |
21 | for i in range(len(filenames)):
22 | ref_intervals, ref_labels = mir_eval.io.load_labeled_intervals(path_an + '\\'+filenames[i])
23 | est_intervals, est_labels = mir_eval.io.load_labeled_intervals(path_es + '\\'+filenames[i])
24 | # With 0.5s windowing
25 | [P05, R05, F05] = mir_eval.segment.detection(ref_intervals,est_intervals,window=0.5)
26 | # With 3s windowing
27 | [P3, R3, F3] = mir_eval.segment.detection(ref_intervals,est_intervals,window=3)
28 |
29 | # Ignoring hits for the beginning and end of track
30 | [P, R, F] = mir_eval.segment.detection(ref_intervals,est_intervals,window=0.5,trim=True)
31 |
32 | ann_inter, ann_labels = mir_eval.util.adjust_intervals(ref_intervals,ref_labels)
33 | est_inter, est_labels = mir_eval.util.adjust_intervals(est_intervals, est_labels, t_min=0, t_max=ann_inter.max())
34 | [PWP, PWR, PWF] = mir_eval.segment.pairwise(ann_inter, ann_labels, est_inter, est_labels)
35 | [So, Su, Sf] = mir_eval.segment.nce(ann_inter, ann_labels, est_inter, est_labels)
36 |
37 | score[i] = (filenames[i],P05, R05, F05,P3, R3, F3,P, R, F, PWP, PWR, PWF, So, Su, Sf)
38 |
39 | score = pd.DataFrame(score)
40 | Ave_F3 = np.sum(score['F3']) / len(filenames)
41 | Ave_PWF = np.sum(score['PWF']) / len(filenames)
42 | Ave_Sf = np.sum(score['Sf']) / len(filenames)
43 |
44 | #%%
45 |
46 | f_mean= np.mean(score['F3'])
47 | f_median= np.median(score['F3'])
48 | f_std= np.std(score['F3'])
49 | f_min= np.min(score['F3'])
--------------------------------------------------------------------------------
/workspace/feature/11_-_All_You_Need_Is_Love_cens.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/workspace/feature/11_-_All_You_Need_Is_Love_cens.mat
--------------------------------------------------------------------------------
/workspace/feature/11_-_All_You_Need_Is_Love_clp.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/workspace/feature/11_-_All_You_Need_Is_Love_clp.mat
--------------------------------------------------------------------------------
/workspace/feature/11_-_All_You_Need_Is_Love_crp.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wayne391/music-structure-analysis-in-matlab/20885155f8570af0dd7f1ae380e9e8b4200b7dbc/workspace/feature/11_-_All_You_Need_Is_Love_crp.mat
--------------------------------------------------------------------------------
/workspace/feature_saving.m:
--------------------------------------------------------------------------------
1 | clc;clear all;close all;
2 |
3 | path_audio = 'audio/';
4 | path_feature = 'feature/';
5 | files_struct = dir([path_audio, '*.wav']);
6 | num_audio = length(files_struct);
7 | for i = 1:num_audio
8 | files{i} = files_struct(i).name;
9 | end
10 |
11 | %%
12 |
13 | for i = 1:num_audio
14 | disp(i)
15 | feature = feature_generator([path_audio, files{i}], 'cens');
16 | save([path_feature, files{i}(1:end-4),'_cens.mat'],'feature');
17 |
18 | feature = feature_generator([path_audio, files{i}], 'clp');
19 | save([path_feature, files{i}(1:end-4),'_clp.mat'],'feature');
20 |
21 | feature = feature_generator([path_audio, files{i}], 'crp');
22 | save([path_feature, files{i}(1:end-4),'_crp.mat'],'feature');
23 | end
24 |
25 | disp('DONE!!');
--------------------------------------------------------------------------------
/workspace/hpcp_dcp.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | import madmom
4 | from os import walk
5 | from scipy import io
6 |
7 |
8 | win_len = 0.186
9 | hop_len = 0.14
10 |
11 | path_audio = 'C:\\structural analysis\\segmentation\\workspace\\audio\\'
12 | path_feature = 'C:\\structural analysis\\segmentation\\workspace\\feature\\'
13 | for (dirpath, dirnames, filenames) in walk(path_audio):
14 | break
15 |
16 | #%% hpcp
17 | for i in range(len(filenames)):
18 | print(i)
19 | sig = madmom.audio.signal.Signal(dirpath+filenames[i])
20 | fs = madmom.audio.signal.FramedSignal(sig, frame_size=win_len*sig.sample_rate, hop_size=hop_len*sig.sample_rate)
21 | stft = madmom.audio.stft.STFT(fs)
22 | spec = madmom.audio.spectrogram.Spectrogram(stft)
23 | hpcp = madmom.audio.chroma.HarmonicPitchClassProfile(spec, num_classes=12).T
24 | io.savemat(path_feature+filenames[i][0:-4]+'_hpcp.mat', {'feature' : hpcp})
25 | #%% deepchroma
26 | #for i in range(len(filenames)):
27 | for i in range(len(filenames)):
28 | print(i)
29 | dcp = madmom.audio.chroma.DeepChromaProcessor()
30 | chroma = dcp(dirpath+filenames[i]).T
31 | io.savemat(path_feature+filenames[i][0:-4]+'_dcp.mat', {'feature' : chroma})
--------------------------------------------------------------------------------
/workspace/run_all.m:
--------------------------------------------------------------------------------
1 | clc; clear all; close all;
2 |
3 | path_audio = 'audio/';
4 | path_feature = 'feature/';
5 | path_annotation = 'annotation/';
6 | path_estimation = 'estimation/';
7 |
8 | files_struct = dir([path_annotation, '*.lab']);
9 | num_audio = length(files_struct);
10 | for i = 1:num_audio
11 | files{i} = files_struct(i).name(1:end-4);
12 | end
13 |
14 | %%
15 | for i = 1:num_audio
16 | disp(i)
17 | audio_filename = [path_audio, files{i},'.wav'];
18 | feature_filename = [path_feature, files{i},'_clp.mat'];
19 | annotation_filename = [path_annotation, files{i},'.lab'];
20 | estimation_filename = [path_estimation, files{i},'.lab'];
21 | % result = audio_segmenter_sf(audio_filename,feature_filename);
22 | [result, labeling] = audio_segmenter_sf(audio_filename,feature_filename, 0, 1);
23 | % write_results(estimation_filename, result);
24 | write_results(estimation_filename, result, labeling);
25 |
26 | % visualize_results(audio_filename, result, annotation_filename);
27 | end
28 |
29 |
--------------------------------------------------------------------------------