extractMelody.m File Reference

Go to the source code of this file.

Functions

overlap indexes sw (ovidx)
 

Variables

 function [y]
 
Initialize M = length(w)
 
analysis window size Ns = 1024
 
FFT size for synthesis H = 256
 
hop size for analysis and synthesis soundlength = length(x)
 
length of input sound array hNs = Ns/2
 
half synthesis window size hM = (M-1)/2
 
half analysis window size pin = max(hNs+1,1+hM)
 
initialize sound pointer to middle of analysis window pend = soundlength-max(hM,hNs)
 
last sample to start a frame fftbuffer = zeros(N,1)
 
initialize buffer for FFT y = zeros(soundlength+Ns/2,1)
 
output sine component w = w/sum(w)
 
normalize analysis window sw = zeros(Ns,1)
 
 ow = triang(2*H-1)
 
overlapping window ovidx = Ns/2+1-H+1:Ns/2+H
 
 bh = blackmanharris(Ns)
 
Load melody file melody = loadMelodyFile(melodyFile)
 
 i =0
 

Function Documentation

overlap indexes sw ( ovidx  )

Variable Documentation

synthesis window bh = blackmanharris(Ns)

Definition at line 21 of file extractMelody.m.

last sample to start a frame fftbuffer = zeros(N,1)

Definition at line 14 of file extractMelody.m.

function[y]
Initial value:
= extractMelody(x,w,N,melodyFile)
%e.g. y = extractMelody(x,hamming(2025),4096,'baby.txt')
#define N
Definition: vf_pp7.c:200
Discrete Time axis x
initialize buffer for FFT y
Definition: extractMelody.m:15
output sine component w
Definition: extractMelody.m:16

Definition at line 1 of file extractMelody.m.

FFT size for synthesis H = 256

Definition at line 8 of file extractMelody.m.

half synthesis window size hM = (M-1)/2

Definition at line 11 of file extractMelody.m.

length of input sound array hNs = Ns/2

Definition at line 10 of file extractMelody.m.

i =0

Definition at line 29 of file extractMelody.m.

Initialize M = length(w)

Definition at line 6 of file extractMelody.m.

melody = loadMelodyFile(melodyFile)

Definition at line 27 of file extractMelody.m.

analysis window size Ns = 1024

Definition at line 7 of file extractMelody.m.

overlapping window ovidx = Ns/2+1-H+1:Ns/2+H

Definition at line 19 of file extractMelody.m.

ow = triang(2*H-1)

Definition at line 18 of file extractMelody.m.

initialize sound pointer to middle of analysis window pend = soundlength-max(hM,hNs)

Definition at line 13 of file extractMelody.m.

half analysis window size pin = max(hNs+1,1+hM)

Definition at line 12 of file extractMelody.m.

hop size for analysis and synthesis soundlength = length(x)

Definition at line 9 of file extractMelody.m.

normalize analysis window sw = zeros(Ns,1)

Definition at line 17 of file extractMelody.m.

output sine component w = w/sum(w)

Definition at line 16 of file extractMelody.m.

initialize buffer for FFT y = zeros(soundlength+Ns/2,1)

Definition at line 15 of file extractMelody.m.