In [2]:
import pandas as pd
from ipywidgets import widgets
from IPython.display import display, Audio
from IPython.core.display import display, HTML
from evaluation_load import load_interface1, load_interface2, search_sounds_and_show_results, load_personal, load_questions

INSTRUCTIONS

Go on by clicking on "Run cell" button (above us). DO NOT click again on "Run cell" button unless you have gone to next cell. Please, in order to continue with the questionarie, click manually on next cell and then click on "Run cell" button.

Definitions:

  • Brightness: indicator of the amount of high-frequency content in a sound.
  • Hardness: forcefulness of a sound's attack.
  • Depth (as a timbral attribute): emphasis on low-frequency content.
  • Roughness: regulation of pleasantness of a sound (sensory dissonance).

DRUM RETRIEVAL INTERFACE

DISPLAY PRELIMINARY INTERFACE. CHOOSE INSTRUMENT AND CATEGORY CLASSES AND AS MANY HIGH-LEVEL DESCRIPTORS AS YOU WANT.


In [3]:
instrument, category, accordion = load_interface1()
check1, slider1, check2, slider2, check3, slider3, check4, slider4 = load_interface2()
display(accordion)
display(check1,slider1)
display(check2,slider2)
display(check3,slider3)
display(check4,slider4)


DISPLAY RETRIEVED DRUM SAMPLE.


In [4]:
search_sounds_and_show_results(instrument, category, check1, slider1, check2, slider2, check3, slider3, check4, slider4)


Retrieved sound ID:  34830

EVALUATION

WRITE YOUR NAME AND SELECT YOUR MUSICAL EXPERIENCE


In [5]:
name,exp,exp2 = load_personal()
display(name,exp,exp2)


ANSWER THE FOLLOWING QUESTIONS:


In [6]:
response1, response2, response3 = load_questions()
print "Does the retrieved sample really correspond to the expected drum instrument class?"
display(response1)


Does the retrieved sample really correspond to the expected drum instrument class?

In [7]:
print "Does the retrieved sample really correspond to the expected drum category class?"
display(response2)


Does the retrieved sample really correspond to the expected drum category class?

In [8]:
print "Select how you think the system has interpreted your selection based on High-Level Descriptors."
display(response3)


Select how you think the system has interpreted your selection based on High-Level Descriptors.

GATHER ANSWERS INFORMATION.


In [9]:
if check1.value is True:
    bright = slider1.value
else:
    bright = 'NaN'
if check2.value is True:
    depth = slider2.value
else:
    depth = 'NaN'
if check3.value is True:
    hard = slider3.value
else:
    hard = 'NaN'
if check4.value is True:
    rough = slider4.value
else:
    rough = 'NaN'
print "User name: " + name.value, "\n", "Musical experience as: " + exp.value[0], "\n", "Years of experience: " + exp2.value[0], "\n"
print "Instrument: " + instrument.value, "\n", "Category: " + category.value, "\n"
print "Brightness: " + str(bright), "\n", "Depth: " + str(depth), "\n", "Hardness:  " + str(hard), "\n", "Roughness: " + str(rough), "\n"
print "Correct instrument? " + response1.value, "\n", "Correct category? " + response2.value, "\n", "High-level descriptors? "+response3.value, "\n"


User name: Name and Surname 
Musical experience as: None 
Years of experience: None 

Instrument: kick 
Category: acoustic 

Brightness: NaN 
Depth: NaN 
Hardness:  NaN 
Roughness: NaN 

Correct instrument? NO 
Correct category? NO 
High-level descriptors? BAD 

ADD TO CSV.


In [9]:
df = pd.read_csv('test.csv',index_col=0)
d = [name.value,exp.value[0],exp2.value[0],instrument.value,category.value,bright,depth,hard,rough,response1.value,response2.value,response3.value]
df.loc[len(df)] = [d[n] for n in range(len(df.columns))]
df.to_csv('test.csv')
df


Out[9]:
name experience years instrument category brightness depth hardness roughness response1 response2 response3
0 Example Drummer More than 5 years kick acoustic NaN 0.8 NaN NaN YES YES GOOD
1 Name and Surname None None kick acoustic NaN NaN NaN NaN NO NO BAD

RESET VARIABLES AND START AGAIN TO EVALUATE A NEW DRUM SAMPLE.


In [ ]:
%reset

END


In [ ]: