Slide 1

Slide 1 text

ਪ͠ͱ࢝ΊΔMIR ͯʔͱ͘ (@tetoku_sakana) 2020-02-13 #stapy54

Slide 2

Slide 2 text

͜Μͳײ͡ͰਐΈ·͢ • ࣗݾ঺հ • MIRͱ͸ • MIRͷ࣮ྫ঺հ • MIRͷ࢝Ίํ

Slide 3

Slide 3 text

୭ • ͯʔͱ͘ (@tetoku_sakana) • WebΤϯδχΞ • nao_y ͞Μͷ͓༠͍ͰࢀՃͤ͞ ͍ͯͨͩ͘͜ͱʹͳΓ·ͨ͠

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

ਪ͠ࣄ ᶃ • ΦαΧφϝʔλʔ • @osakanameter • ΦαΧφͷMVͷ࠶ੜճ ਺΍ϑΥϩϫʔ਺ͷՄ ࢹԽ΍௨஌ • ެࣜϗʔϜϖʔδͷߋ৽ ৘ใ΍χϡʔε౳ͷ഑৴

Slide 6

Slide 6 text

ਪ͠ࣄ ᶄ • ΦαΧφΞʔΧΠϒ • ΦαΧφʹ·ͭΘΔ ΠϯλϏϡʔهࣄͳ ͲΛ·ͱΊͨαʔϏ ε

Slide 7

Slide 7 text

ͦΜͳ͜ΜͳͰ MIRʹೖ໳͠·ͨ͠ʂ

Slide 8

Slide 8 text

MIR

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

MIR • Music Information Retrieval • Իָ৘ใݕࡧ΍Իָ৘ใॲཧͱ༁͞ΕΔ • ݕࡧ͸͋Μ·Γؔ܎ͳ͍ • ػցֶश×Իָ • (ओʹඇੜ੒ܥͷ) Իָؔ࿈෼໺ͷ૯শ

Slide 12

Slide 12 text

MIRͷλεΫ (Ұྫ) • Իָ΍Իָ৘ใ (ௐ΍ςϯϙɺίʔυ౳) ͷݕ ग़ɾਪఆ • Իָͷࣗಈ෼ྨ (δϟϯϧ΍งғؾͳͲ) • ࣖίϐͷࣗಈԽ • ԻָͰԻָΛݕࡧ

Slide 13

Slide 13 text

MIRͷख๏ • Content-based • Իָ΍ՎࢺͳͲɺָۂσʔλΛѻ͏ • Context-based • ΞʔςΟετͷ঺հจͳͲɺָۂҎ֎ͷपล σʔλΛѻ͏

Slide 14

Slide 14 text

pythonͱMIR • librosa • madmom • essentia

Slide 15

Slide 15 text

import librosa >>> filepath = librosa.util.example_audio_file() >>> y, sr = librosa.load(filepath, offset=30, duration=5) >>> librosa.feature.mfcc(y=y, sr=sr) # MFCCͷऔಘ array([[ -5.229e+02, -4.944e+02, ..., -5.229e+02, -5.229e+02], [ 7.105e-15, 3.787e+01, ..., -7.105e-15, -7.105e-15], ..., [ 1.066e-14, -7.500e+00, ..., 1.421e-14, 1.421e-14], [ 3.109e-14, -5.058e+00, ..., 2.931e-14, 2.931e-14]])

Slide 16

Slide 16 text

ΦαΧφͷۂ͸೉͍͠…

Slide 17

Slide 17 text

ΦαΧφͷதͰ Ұ൪೉ָ͍͠ۂ͸ʁ

Slide 18

Slide 18 text

ϚεϩοΫࢦ਺

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

• Elias Pampalk et al., Proceedings of the ACM Multimedia 2002 • ָۂྨࣅ౓Λࣗݾ૊৫ԽϚοϓ(SOM)Λ࢖ͬ ͯՄࢹԽ Content-based Organization and Visualization of Music Archives

Slide 21

Slide 21 text

Իڹ৺ཧֶΛߟྀͨ͠ɺௌײ্ͷloudnessͷม ԽΛಛ௃ྔͱͯ͠நग़͢Δ “Rhythm Patterns”ͱͯ͠ఏҊ͞ΕͯΔಛ௃ྔநग़ख๏

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

ϚεϩοΫࢦ਺͕ ࢉग़Ͱ͖ͦ͏ʂ

Slide 24

Slide 24 text

ॲཧ֓ཁ 1. STFTΛ͔͚ͯ(ର਺ई౓ͷ) εϖΫτϩάϥϜ Λऔಘ 2. (1) ΛϒϩοΫʹ෼ׂ͠(rolling window)ɺͦ ΕͧΕ࣌ؒ࣠ํ޲ʹSTFTΛ͔͚ͯέϓετϩ άϥϜΛऔಘ 3. (2) ʹରͯ͠60ύʔηϯλΠϧΛٻΊΔ

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

def minmax(pattern): return (pattern - pattern.min()) / (pattern.max() - pattern.min()) # ࡶ def mathrock_index(pattern): pattern = pattern.sum(axis=0) pattern = minmax(pattern) * 100 pattern = np.diff(pattern) return np.percentile(pattern, q=90) def calc_lfp(filename): cent = CentSpectrum(win_length=2048, hop_length=512) D = librosa.amplitude_to_db(cent.proc(filename)) D_normalized = cent.normalize(D) lfp = LogarithmicFluctuationPattern(hop_length=256) return lfp.proc(D_normalized)

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

MIRͷ࢝Ίํ

Slide 30

Slide 30 text

MIRͷ࢝Ίํ • MIREX΍ISMIRͷ࿦จ • ipynb • musicinformationretrieval.com • ΢Οʔϯ޻Պେͷnbviewer

Slide 31

Slide 31 text

MIRͷ࢝Ίํ • SpotifyͷAPIΛ࢖͏ • Audio Features for a Track • Audio Analysis for a Track

Slide 32

Slide 32 text

{ "danceability": 0.735, "energy": 0.578, "key": 5, "loudness": -11.84, "mode": 0, "speechiness": 0.0461, "acousticness": 0.514, "instrumentalness": 0.0902, "liveness": 0.159, "valence": 0.624, "tempo": 98.002, "type": "audio_features", "id": "06AKEBrKUckW0KREUWRnvT", "uri": "spotify:track:06AKEBrKUckW0KREUWRnvT", "track_href": “https://api.spotify.com/v1/tracks/…", "analysis_url": “https://api.spotify.com/v1/audio-analysis/…”, "duration_ms": 255349, "time_signature": 4 }

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

·ͱΊ • ৘ใ͸গͳ͍͚ͲMIRͷෑډ͸௿͍ • ϥΠϒϥϦ͸librosa͕͓͢͢Ί • SpotifyͷAPI΋͓͢͢Ί • ΦαΧφ͸ྑ͍

Slide 35

Slide 35 text

ਪ͠ۦಈ։ൃ Ұॹʹ࢝ΊͯΈ·͠ΐ͏ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʙ