xinyiguan / py2lispIDyOM

A Python package for IDyOM
https://xinyiguan.github.io/py2lispIDyOM/
MIT License
10 stars 3 forks source link

some questions about 'my_experiment.run ()' #17

Open siqiyou opened 1 year ago

siqiyou commented 1 year ago

Hello @xinyiguan Thanks for your helpful project! However, some music can’t be counted when project run to ‘my_experiment.run ()’. Error messages were attached to the question, and look forward to your answer~

running lisp script To load "clsql": Load 1 ASDF system: clsql ; Loading "clsql"

To load "idyom": Load 1 ASDF system: idyom ; Loading "idyom" ..........

Inserting data into database: dataset 66022123143047. Inserting data into database: dataset 99022123143047. Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name): 0: [REPLACE-FUNCTION] Call a different function with the same arguments 1: [CALL-FORM ] Call a different form 2: [RETRY ] Retry EVAL of current toplevel form. 3: [CONTINUE ] Ignore error and continue loading file "/Users/yousiqi/Downloads/install_idyom/experiment_history/21-02-23_14.30.43/compute.lisp". 4: [ABORT ] Abort loading file "/Users/yousiqi/Downloads/install_idyom/experiment_history/21-02-23_14.30.43/compute.lisp". 5: Ignore runtime option --load "experiment_history/21-02-23_14.30.43/compute.lisp". 6: Skip rest of --eval and --load options. 7: Skip to toplevel READ/EVAL/PRINT loop. 8: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).

(MAX) [external] 0]

debugger invoked on a SB-INT:SIMPLE-PROGRAM-ERROR @52AD7DB4 in thread

<THREAD "main thread" RUNNING {1001080003}>:

invalid number of arguments: 0

xinyiguan commented 1 year ago

Hi @siqiyou,

A few quick checks and let's see from there:

siqiyou commented 1 year ago

Thank you for your reply~

First, I check your suggestions as bellow:

  1. Yes, these files were successfully loaded.

  2. the script: (start-idyom) (idyom-db:import-data :mid "experiment_history/21-02-23_14.30.43/experiment_input_data_folder/test_dataset/" "TEST_DATASET" 66022123143047) (idyom-db:import-data :krn "experiment_history/21-02-23_14.30.43/experiment_input_data_folder/pretrain_dataset/" "PRETRAIN_DATASET" 99022123143047) (idyom:idyom 66022123143047 '(cpitch onset) '(cpitch onset) :models :both :pretraining-ids '(99022123143047) :k 1 :detail 3 :output-path "experiment_history/21-02-23_14.30.43/experiment_output_data_folder/" :overwrite nil) (quit)

  3. Combined with the documentation of IDyOM, 'cpitch' and 'onset', these two viewpoints were sufficient for my materials, so I didn't change the way the model was configured. my_experiment.set_parameters(target_viewpoints=['cpitch', 'onset'], source_viewpoints=['cpitch', 'onset'], models=':both', k=1, detail=3)

  4. Yes, the examples could run smoothly with the provided dataset.

In addition, before you reply, I simplified the music that I said couldn't be counted, and model could be done well. However, just some notes were removed, so I still feel confused about that. TT

xinyiguan commented 1 year ago

Note that IDyOM model is intended for melody (or monophonic texture). So everything works fine now?

siqiyou commented 1 year ago

Yeah, I know that, but I am curious about that. According to Cheung et al. (2019, current biology), the entropy and information content of chords were calculated with IDyOM. In addition, the music we used to test was also melody. As shown by figure1, the one on the left is the music that the model can't calculate (N38-old), the right one can be calculated (N38-new). Please ignore the occasional polyphonic texture, which appears to be automatically generated by the software when MIDI is turned on.

Cheung, V. K. M., Harrison, P. M. C., Meyer, L., Pearce, M. T., Haynes, J.-D., & Koelsch, S. (2019). Uncertainty and Surprise Jointly Predict Musical Pleasure and Amygdala, Hippocampus, and Auditory Cortex Activity. Current Biology. doi:10.1016/j.cub.2019.09.067

figure1

xinyiguan commented 1 year ago

Sorry for jumping in this late. Have you already resolved your problem? You might want to sanity check the midi info for your melodies (the overlapping onset, offset of events). I cannot tell much just by looking at the scores.

For the model used in (Cheung et al. 2019), you may want to look more into the details in how they configure the model. To my knowledge, they use different viewpoints(which I don't think they are available in the current public version of IDyOM) as proxies of certain aspects of chord/harmony quality.

xinyiguan commented 1 year ago

@siqiyou FYI, the new version of IDyOM (v1.7) has just published and they have included a set of new viewpoints (harmony and chords) in the model.

JiaLinLi0822 commented 1 year ago

Hello, @xinyiguan Thank you so much for providing Python API for IDyOM! However, when I installed the new iDyOM(v1.7) version on my Mac(m1 pro), the example code in tutorial 1 can't run smoothly with the provided datasets. Could you please help me to fix this problem? here is the error:

running lisp script To load "clsql": Load 1 ASDF system: clsql ; Loading "clsql"

To load "idyom": Load 1 ASDF system: idyom ; Loading "idyom" ..............

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Retry using IDYOM-MESSAGE-DETAIL-LEVEL. 1: [USE-VALUE ] Use specified value. 2: [STORE-VALUE] Set specified value and use it. 3: [RETRY ] Retry EVAL of current toplevel form. 4: Ignore error and continue loading file "/Users/lijialin/Downloads/py2lispIDyOM-master/tutorials/experiment_history/26-05-23_22.18.40/compute.lisp". 5: [ABORT ] Abort loading file "/Users/lijialin/Downloads/py2lispIDyOM-master/tutorials/experiment_history/26-05-23_22.18.40/compute.lisp". 6: Ignore runtime option --load "experiment_history/26-05-23_22.18.40/compute.lisp". 7: Skip rest of --eval and --load options. 8: Skip to toplevel READ/EVAL/PRINT loop. 9: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).

(UTILS:MESSAGE "Inserting 15 compositions into database: dataset 66052623221840." :DETAIL 1 :ADD-NEW-LINE T) source: (<= DETAIL IDYOM-MESSAGE-DETAIL-LEVEL) 0] While evaluating the form starting at line 2, column 0 of #P"/Users/lijialin/Downloads/py2lispIDyOM-master/tutorials/experiment_history/26-05-23_22.18.40/compute.lisp":

debugger invoked on a UNBOUND-VARIABLE @53710594 in thread

<THREAD "main thread" RUNNING {70045F01E3}>:

The variable IDYOM-MESSAGE-DETAIL-LEVEL is unbound.