# set directory to the CD_Diss Folder
# Please change here the folder!
setwd("C:/Users/bauer/Desktop/CD_Diss/")

setwd("MultivariateOnsetDetection/Functions")

file.sources = list.files(pattern="*.R")
sapply(file.sources,source)

# load libraries
library(tuneR)
library(signal)



#####################################################################################################
### example Bello 93
# online onset detection

						   
path.wav = "../bello93.wav"
path.time = "../bello93.txt"
O = multiOnsetDetection(path.wav, path.time, type = "online") 
  

O$fMeasure	#0.9045383
			

####################################################################################################
# offline onset detection

path.wav = "../bello93.wav"
path.time = "../bello93.txt"						   

O = multiOnsetDetection(path.wav, path.time, type = "offline")   

O$fMeasure	# 0.9420732

	