Reply To: Some final issues before the experiment

PennController for IBEX Forums Support Some final issues before the experiment Reply To: Some final issues before the experiment

#6658
danilchr1
Participant

Hello,

Thank you for reply.

I started the data collection for my first pilot project in my PhD.

1. I was able to solve the problem with the html page, the problem seemed to be as you suggested (basically the statement was repeated twice).

2. I have attached the code of my main file and a part of my old results file (the last three trials) (the full file is too long to attach all of it).

The .zip file in the line

1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,PennController,UploadRecordings,Filename,ac740bc8-3103-00ce-23a4-7d5981f0ad36.zip,1613560684170,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,async

in the trial before the last trial refers to the file filler1_APAdvAN_врата_четири_A.webm in the previous trial.

The .zip file in the line

1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,PennController,UploadRecordings,Filename,2b02bf46-7ba9-6d0a-4f64-ebf0ad7c8394.zip,1613560695207,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,async

in the last trial refers to the file filler1_APN_купичка_шест_A.webm in the trial before the last trial.

So, I have a .zip file ac740bc8-3103-00ce-23a4-7d5981f0ad36.zip containing the file filler1_APAdvAN_врата_четири_A.webm and I have a .zip file 2b02bf46-7ba9-6d0a-4f64-ebf0ad7c8394.zip containing the file filler1_APN_купичка_шест_A.webm.

I know the recordings of the trial before the last trial and the last trial are uploaded because I can see the lines

1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,Start,1613560695092,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,End,1613560695095,NULL

for the trial before the last trial, and the lines

1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,Start,1613560706672,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,End,1613560706674,NULL

for the last trial (which are the final two lines in results file). Indeed no audio files are missing and the audio of the last file is uploaded.

However the .zip file of that last file does not appear in the results file. There is no .zip filename after the final lines:

1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,Start,1613560706672,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,End,1613560706674,NULL

I have the .zip file 66894537-ea8a-05be-aa19-cdd7ea9a2c0d.zip, which stores the audio file filler2_APN_карамфил__A.webm of the final trial, but the .zip file is missing from the results file 6894537-ea8a-05be-aa19-cdd7ea9a2c0d.zip

It does not seem to be a problem of coding since the final uploading (which is asynchronous (the line used in the main file is indeed UploadRecordings(“sendAsync”, “noblock”)) and the next trial begins before the last upload has completed, which in turn explains why each .zip file points to the preceding trial) seems to happen after the execution of the final trial (as the second “sendAsync”) suggests.

Sequence("intro", "intro1",  "demo", "trials",  "demo1",  "demo2", "expbegin", sepWith("sendAsync", randomize("experiment")), "sendAsync", SendResults(), "bye")

Even though it will be good to resolve, or at least understand the problem, so that I can get the count .zip file of the las trial, I think that it might be an easier way to sort the results without having to use the .zip file. This is by marking the participants. Contrary to your previous suggestion I cannot input this information with my materials during the experiment, since I do not have a direct control of my participants. I have groups A, B and C each representing a separate list of items and each participant gets one of these groups with all the items within the group being randomized. What group each participant gets depends on the group of the previous participants (this follows the default set-up of PC-Ibex). However, there is a counter file which keeps track on the number of participants in order to perform the group assignment. Contrary again to your previous suggestion, I wouldn’t want to reset the value of this counter file, since this file contains important information about the number of participants. Instead I want to get that value and store it in a variable, so that I can identify the participants. It would be something like this, but I do not know if I can do that in Pc-Ibex:

a) get the counter value and store it in a variable

b) increase the value of that variable by one

b) convert the increased counter variable to string if it is a number (float or int)

c) use that string to label the audio files

Now each participant should have a separate id.

In addition I can check if the counter variable changed before the beginning and the end of the experimental trial in case other participants concluded the experiment at the same time. Then I can predict if certain audio files will need re-naming (which could be done after the data is collected) if two participants doing the experiment at the same time were assigned the same counter value.

Actually, the best possible solution would be to generate the participant hash string not at the end but at the beginning of the experiment, but I do not know if that is possible. This will ensure that every participant gets a unique id which could be used directly during the experiment.

3. During my pilot some people reported that they had problem continuing with the experiment. Two participants tried the experiment at the same time from different locations and they experienced being blocked and they had to restart the experiment. I experienced this problem myself, when I did a testing. I have put the code of the main file, instead (in case ли си искал да напишеш) there is a problem in the code that causes the problem. Could you have a look? It might not be the case since it works fine with some participants, but not with others. (generally the idea of the experiment is that people click on a button to listen to a sentence, then a new button pops up which allows them to record themselves, then another button that allows them to stop the recording, and then they click on a button in order to proceed to the next sentence). If the problem is not with the code and there is a problem with the platform it will be good to get this fixed.

It will be difficult to put the audio file resources that the participants listen to in a .zip file (since I read they need to be in same root directory, but right now that is not possible since many of the files have the same names (targets fileers1, fillers2 and fillers3 are labeled in the same way)).

Finally, I think that resulting the counter variable might not be a good idea since, as I mentioned previously, it contains useful information I could use to see the number of participants, and, hopefully, identifying the participants. Two participants getting the same list is not a problem since the groups are equivalent and distributed consecutively across the participants. The problem is for the Latin square design when the same participant sees the data twice in the case that he had to restart the experiment during a blocking experienced in his first unsuccessful trial. Even if I were to reset the count variable, (which as I said might not be ideal), I do not know when to do so, since I do not know when or if the participant will experience being blocked in the experiment. Resetting it each time at the beginning is also not good because then I will be generating the same group, and my materials are distributed across the three groups. I think the best solution will be avoiding the blocking in the first place. Otherwise, an ideal solution should be able to keep track whether the participant finished the experiment or not, what group he/she saw last in the cases when this specific participant (and not another participant) did not finish the experiment and he/she is re-doing the experiment. Only under those conditions (having a previous participant whose last attempt to complete the experiment was unsuccessful) can the system provide another group. Somehow this has to be explicitly labeled: that it is the same participant re-doing the experiment (although with a different group). Also, re-doing should only be possible when the last trial was unsuccessful, but not otherwise (unless explicitly allowed by the experimenter). Otherwise, when participants finish the experiment successfully the group can be incremented as normal. In addition there should be a way to store the total number of successful completions of the experiment (unsuccessful attempts excluded) (I think this is currently done with the count variable).

4. I will definitely consider trying the new PC-Ibex-farm, either for my real experiment or in future experiments.

Thank you.

Danil

xxxxxxxxxxxxxxxxxxxxxxxxxxx

Sample of the results.csv file

filler1_A_птица_пет_A.webm

The file c740bc8-3103-00ce-23a4-7d5981f0ad36.zip refers to the uploaded file previous trial

How do you upload the recordings? Do you insert asynchronous UploadedRecordings trials regularly? You can make them synchronous if you want to make sure that the experiment does not proceed to the next trial until the recordings have been uploaded (although your participants might have to wait a while after each trial)

I’m not sure why you wouldn’t get a line for the last zip file, but it could be that the specific way your experiment is coded makes it send results to the CSV file before it can run the last UploadedRecordings trial

1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,PennController,40,_Trial_,Start,1613560672238,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,PennController,UploadRecordings,Filename,3a61ff78-8bd8-f882-b727-ca33051efc36.zip,1613560672327,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,async
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,PennController,UploadRecordings,Status,Success,1613560672327,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,async
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,Button,continue,Click,Click,1613560684051,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,MediaRecorder,filler1_APAdvAN_врата_четири_A,Filename,filler1_APAdvAN_врата_четири_A.webm,1613560684053,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,MediaRecorder,filler1_APAdvAN_врата_четири_A,Recording,Start,1613560681609,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,MediaRecorder,filler1_APAdvAN_врата_четири_A,Recording,Stop,1613560682908,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,41,0,experiment,NULL,PennController,40,_Trial_,End,1613560684053,filler1,APAdvAN,четири,врата,При проверката се намериха четири отворени с много малкото ключе,врата,A,STE-027_mono.wav,filler1_APAdvAN_врата_четири_A,NULL
# Columns below this comment are as follows:
# 1. Time results were received.
# 2. MD5 hash of participant's IP address.
# 3. Controller name.
# 4. Item number.
# 5. Element number.
# 6. Type.
# 7. Group.
# 8. PennElementType.
# 9. PennElementName.
# 10. Parameter.
# 11. Value.
# 12. EventTime.
# 13. Comments.
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,Start,1613560684054,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,End,1613560684056,NULL
# Columns below this comment are as follows:
# 1. Time results were received.
# 2. MD5 hash of participant's IP address.
# 3. Controller name.
# 4. Item number.
# 5. Element number.
# 6. Type.
# 7. Group.
# 8. PennElementType.
# 9. PennElementName.
# 10. Parameter.
# 11. Value.
# 12. EventTime.
# 13. Type.
# 14. Condition Label.
# 15. Numeral.
# 16. Target Noun.
# 17. Final Sentence.
# 18. Target Noun.
# 19. Group.
# 20. Audio File.
# 21. Output Audio File.
# 22. Comments.
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,PennController,36,_Trial_,Start,1613560684058,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,PennController,UploadRecordings,Filename,ac740bc8-3103-00ce-23a4-7d5981f0ad36.zip,1613560684170,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,async
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,PennController,UploadRecordings,Status,Success,1613560684170,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,async
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,Button,continue,Click,Click,1613560695089,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,MediaRecorder,filler1_APN_купичка_шест_A,Filename,filler1_APN_купичка_шест_A.webm,1613560695090,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,MediaRecorder,filler1_APN_купичка_шест_A,Recording,Start,1613560692800,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,MediaRecorder,filler1_APN_купичка_шест_A,Recording,Stop,1613560694156,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,37,0,experiment,NULL,PennController,36,_Trial_,End,1613560695091,filler1,APN,шест,купичка,В шкафа стояха шест пълни с камъчета,купичка,A,STE-014_mono.wav,filler1_APN_купичка_шест_A,NULL
# Columns below this comment are as follows:
# 1. Time results were received.
# 2. MD5 hash of participant's IP address.
# 3. Controller name.
# 4. Item number.
# 5. Element number.
# 6. Type.
# 7. Group.
# 8. PennElementType.
# 9. PennElementName.
# 10. Parameter.
# 11. Value.
# 12. EventTime.
# 13. Comments.
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,Start,1613560695092,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,End,1613560695095,NULL
# Columns below this comment are as follows:
# 1. Time results were received.
# 2. MD5 hash of participant's IP address.
# 3. Controller name.
# 4. Item number.
# 5. Element number.
# 6. Type.
# 7. Group.
# 8. PennElementType.
# 9. PennElementName.
# 10. Parameter.
# 11. Value.
# 12. EventTime.
# 13. Type.
# 14. Condition Label.
# 15. Numeral.
# 16. Target Noun.
# 17. Final Sentence.
# 18. Target Noun.
# 19. Group.
# 20. Audio File.
# 21. Output Audio File.
# 22. Comments.
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,PennController,72,_Trial_,Start,1613560695096,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,PennController,UploadRecordings,Filename,2b02bf46-7ba9-6d0a-4f64-ebf0ad7c8394.zip,1613560695207,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,async
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,PennController,UploadRecordings,Status,Success,1613560695207,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,async
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,Button,continue,Click,Click,1613560706669,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,MediaRecorder,filler2_APN_карамфил__A,Filename,filler2_APN_карамфил__A.webm,1613560706671,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,MediaRecorder,filler2_APN_карамфил__A,Recording,Start,1613560704038,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,MediaRecorder,filler2_APN_карамфил__A,Recording,Stop,1613560705496,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,73,0,experiment,NULL,PennController,72,_Trial_,End,1613560706671,filler2,APN,,карамфил,От градината бяха откъснати засадените от девойката,карамфил,A,STE-044_mono.wav,filler2_APN_карамфил__A,NULL
# Columns below this comment are as follows:
# 1. Time results were received.
# 2. MD5 hash of participant's IP address.
# 3. Controller name.
# 4. Item number.
# 5. Element number.
# 6. Type.
# 7. Group.
# 8. PennElementType.
# 9. PennElementName.
# 10. Parameter.
# 11. Value.
# 12. EventTime.
# 13. Comments.
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,Start,1613560706672,NULL
1613560743,856aafdd008ea714bef357058d6b9c1c,PennController,1,0,sendAsync,NULL,PennController,UploadRecordings,_Trial_,End,1613560706674,NULL

xxxxxxxxxxxxxxxxxxxxxxxxxxx

full main.js file:

PennController.ResetPrefix(null) // Shorten command names (keep this line here)
//AddHost("http://sabotin.ung.si/~astepanov/SLO_COMP_audio/")
//AddHost("http://sabotin.ung.si/~astepanov/ru_wh_pictures/")
 
AddHost("http://sabotin.ung.si/~dk0035/")
 
 
var progressBarText = "прогрес"
 
 
Sequence("intro", "intro1",  "demo", "trials",  "demo1",  "demo2", "expbegin", sepWith("sendAsync", randomize("experiment")), "sendAsync", SendResults(), "bye")
 
////Sequence("expbegin", sepWith("sendAsync", randomize("experiment")))
 
 
////Sequence("intro", "intro1", "intro2", "trials")
////("intro", "trials")
 
////Sequence("intro", "intro1", "demo",  "trials", "demo1",  "demo2","expbegin", sepWith("sendAsync", randomize("experiment")) ok 
////Sequence("intro", "intro1", "trials","demo1",  "demo2","expbegin", sepWith("sendAsync", randomize("experiment")))
 
/////////InitiateRecorder("https://vecjezicnost.ung.si/media_rec/mediarec.php", "")
InitiateRecorder("https://vecjezicnost.ung.si/BGexp1/mediarec.php", "Моля, регулирайте настройките на своя браузър, за да разрешите достъп до микрофона. След това натиснете връзката по-долу.")
///InitiateRecorder("http://sabotin.ung.si/~dk0035/tests", "")
    .label("intro")
 
UploadRecordings("sendAsync", "noblock")
 
 
    let replaceConsentMic = ()=>{
            let consentLink = $(".PennController-PennController a.Message-continue-link");
            if (consentLink.length > 0 && consentLink[0].innerHTML.match(/^By clicking this link I understand that I grant this experiment's script access to my recording device/))
                consentLink.html("Давам съгласието си за използване на микрофона и за записване на гласа ми в този експеримент. ");
            else
                window.requestAnimationFrame( replaceConsentMic );
    };
    window.requestAnimationFrame( replaceConsentMic );
 
 
 
 
 
newTrial("intro1",
 
            newText("Здравейте! В рамките на изследователски проект в Университета в Нова Горица, Словения и Университета в Женева, Швейцария изследваме как носителите на езика устно обработват изречения с различна дължина и сложност.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
 
            ,
 
            newText("Експериментът отнема около 25 минути. Предоставените от Вас данни ще бъдат използвани само за целите на това научно изследване и няма да бъдат разпространявани неправомерно.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
        
           
            newText("Вашата задача е да изслушате незавършени изречения, след това да ги довършите, като произнесете само последната дума.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
 
 
           
            newText(`<i>Пример</i>:<br>
Вие чувате: Мартин беше построил красиви пясъчни<br>
Зададена дума: <i>замък</i><br>
Вие произнасяте: <i>замъци</i>`)
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
 
            ,
      
            newText("Моля, използвайте формите, които звучат най-добре за Вас, когато завършвате изреченията. Следвайте интуицията си, без да обмисляте отговора си при изпълнението на задачата и без да използвате помощ от други източници.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
      
     
           
            newText("Докато произнасяте последната дума, ще трябва да запишете гласа си, като използвате микрофона на компютъра си. За да запишете отговора си, натиснете върху бутон „Запис“. За да спрете записа, натиснете върху бутона „Стоп“.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
 
            newText("За да можете да запишете гласа си, ще Ви е нужен работещ микрофон. Преди да продължите по-нататък с експеримента, моля, пробвайте да запишете и изслушате своя глас, за да се уверите, че всичко работи, както трябва.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
 
  newMediaRecorder("test0_recording", "audio")
          .center()
          .print()
          .log()
          
    ,
 
              newButton("continue_to_questionaire", "Продължете нататък")
       .center()
       .print()
        .wait()
        .log()
           
 
   
  ).setOption("hideProgressBar",true)
 
,
 
    
newTrial("demo", 
 
 
    newHtml("demographics", "ru_wh_demo.html")
    .css("padding-top","10%")
    .css("line-height","1.4")
    .checkboxWarning("Моля, изберете една от възможностите.")
    .inputWarning("Моля, попълнете това поле.")
    .radioWarning("Моля, изберете една от възможностите.")
            .settings.log()
            .print()
            
            
 
    ,
        newButton("continue_to_examples", "Продължете нататък")
       .center()
       .print()
       .wait( 
           getHtml("demographics").test.complete()
              .failure( getHtml("demographics").warn() )
           )
        .log()
       ).setOption("hideProgressBar",true)
    ,
    
  
 
         
        
 
newTrial ("trials",
           
 
 
            newText("Ще започнем с две примерни изречения, за да добиете представа за задачата. След тях започва настоящият експеримент.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
 
           
  newButton("continue_to_example_1", "Продължете с пример 1")
          .print()
          .center()
          .wait()
          .log()
          
          ).setOption("hideProgressBar",true)
,
 
 
 
newTrial ("demo1", 
 
 newText("Пример 1:")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
    
    ,
    newButton("listen_to_example_1", "Изслушайте изречението")
    .css("line-height","1.4")
    .center()
    .print()
    .wait()
    .log()
    ,
 
 
 
    newAudio("test1_audio", "Training/mono/STE-001_mono.wav")
         .play()
         .wait()
    ,
    
    newTimer("wait", 500)
    .start()
    .wait()
    ,
 
    newText("")
    .print()
    ,
    
    newText("<p style=\"font-size:18pt\">кон</p>")
    .css("line-height","1.4")
    .css("padding-top","5%")
    .center()
    .print()
    ,
    
 
    
 
//  newText("instructions", "Моля, повторете и довършете изречението, като поставите думата по-горе в подходящата форма и запишете отговора си:")
//          .print()
//          .center()
//          .css("padding-bottom","20px")
//          .css("padding-top","20px")
 
 
  newText("instructions", "Моля, довършете изречението, като поставите думата по-горе в подходящата форма и запишете отговора си:")
          .print()
          .center()
          .css("padding-bottom","20px")
          .css("padding-top","20px")
 
 
//          newAudio("myAudio", "http://myserver/audio.mp3")
      ,
 
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
      ,
  
      newMediaRecorder("test1_recording", "audio")
          //.print()
          .log()
          .center()
          .once()
         
          
         ,
      
    newButton("Запис")
        .print()
        .wait()
        .remove()
        
    ,
 
    getMediaRecorder("test1_recording")
        .record()
        
    ,
 
    newButton("Стоп")
        .print()
        .wait()
        .remove()
        
    ,
 
    getMediaRecorder("test1_recording")
        .stop()
        
    ,
      
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
     
      ,
      
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
      ,
      
      newButton("continue_to_example_2", "Продължете с пример 2")
          .print()
          .center()
          .wait()
          .log()
).setOption("hideProgressBar",true)
,
 
newTrial("demo2", 
 
 newText("Пример 2:")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
    ,
    
    newButton("listen_to_example_2", "Изслушайте изречението")
    .css("line-height","1.4")
    .center()
    .print()
    .wait()
    .log()
    ,
 
 
    newAudio("test2_audio", "Training/mono/STE-002_mono.wav")
         .play()
         .wait()
    ,
    newTimer("wait", 500)
    .start()
    .wait()
    ,
 
 
    newText("")
    .print()
    ,
    
 
    newText("<p style=\"font-size:18pt\">крава</p>")
    .css("line-height","1.4")
    .center()
    .css("padding-top","5%")
    .print()
    ,
 
 
//  newText("instructions", "Моля, повторете и довършете изречението, като поставите думата по-горе в подходящата форма и запишете отговора си:")
//          .print()
//          .center()
//          .css("padding-bottom","20px")
//          .css("padding-top","20px")
 
 
  newText("instructions", "Моля, довършете изречението, като поставите думата по-горе в подходящата форма и запишете отговора си:")
          .print()
          .center()
          .css("padding-bottom","20px")
          .css("padding-top","20px")
 
//          newAudio("myAudio", "http://myserver/audio.mp3")
      ,
 
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
      ,
  
      newMediaRecorder("test2_recording", "audio")
          //.print()
          .log()
          .center()
          .once()
      ,
      
     newButton("Запис")
        .print()
        .wait()
        .remove()
        
    ,
 
    getMediaRecorder("test2_recording")
        .record()
        
    ,
 
    newButton("Стоп")
        .print()
        .wait()
        .remove()
        
    ,
 
    getMediaRecorder("test2_recording")
        .stop()
        
    ,
      
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
      ,
      
 
      newButton("continue_to_experiment", "Продължете с експеримента")
          .print()
          .center()
          .wait()
          .log()
 
).setOption("hideProgressBar",true)
 
,
 
newTrial ("expbegin",
           
      newText("Сега сме готови да започнем с основния експеримент.")
            .css("width","40em")
            .css("line-height","1.4")
            //.css("padding-top","40px")
            .css("padding-bottom","20px")
            .print()
            ,
 
      newButton("begin_experiment", "Започнете експеримента")
          .print()
          .center()
          .wait()
          .log()
).setOption("hideProgressBar",true)
,
 
Template("design_final.csv",
      variable => newTrial("experiment",
 
    fullscreen()
        ,
    
    newTimer(500)
        .start()
        .wait()
    ,
 
 
    newButton("listen_to_sentence", "Изслушайте изречението")
    .css("line-height","1.4")
    .center()
    .print()
    .wait()
    .log()
    ,
 
 
    newAudio("target", variable.PathOfAudioFile)
         .play()
         .wait()
    ,
    newTimer("wait", 500)
    .start()
    .wait()
    ,
 
 
    newText("")
    .print()
    ,
    
    newText("<p style=\"font-size:18pt\">"+variable.BaseFormOfTargetNoun+"</p>")
    .css("line-height","1.4")
    .css("padding-top","5%")
    .center()
    .print()
    ,
 
    
 
 
  newText("instructions", "Моля, довършете изречението, като поставите думата по-горе в подходящата форма и запишете отговора си:")
          .print()
          .center()
          .css("padding-bottom","20px")
          .css("padding-top","20px")
 
//          newAudio("myAudio", "http://myserver/audio.mp3")
      ,
 
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
      ,
  
 
          
        newMediaRecorder(variable.OutputAudioFile, "audio")
          //.print()
          .log()
          .center()
          .once()
      ,
      
     newButton("Запис")
        .print()
        .wait()
        .remove()
        
    ,
 
    getMediaRecorder(variable.OutputAudioFile)
        .record()
        
    ,
 
    newButton("Стоп")
        .print()
        .wait()
        .remove()
        
    ,
 
    getMediaRecorder(variable.OutputAudioFile)
        .stop()
        
      ,
      
     newText("")
      //.css("line-height","1.4")
      //.css("padding-top","5%")
      .print()
      ,
      
      newButton("continue_with_next_sentence", "Продължете със следващия пример")
          .print()
          .center()
          .wait()
          .log()
  
  
  ).setOption("hideProgressBar",false)
  .log("Type",variable.Type)
  .log("Condition Label",variable.ConditionLabel)
  .log("Numeral",variable.Numeral)
  .log("Target Noun",variable.BaseFormOfTargetNoun)
  .log("Final Sentence",variable.FinalSentence)
  .log("Target Noun",variable.BaseFormOfTargetNoun)
  .log("Group",variable.Group)
  .log("Audio File",variable.TargetAudioFile)
  .log("Output Audio File",variable.OutputAudioFile)
 
  )
,
  
newTrial( "bye" ,
   exitFullscreen()
   ,
   newText("Това е краят на екперимента. Благодарим Ви за участието! Ако имате въпроси относно експеримента, може да се обърнете по електронна поща към професор Артур Степанов 'arthur.stepanov@ung.si', професор Пенка Статева 'penka.stateva@ung.si' или Данил Христов 'danil.khristov@ung.si'.")
       .css("width","40em")
       .css("padding-top","10%")
       .css("line-height","1.4")
       .print()
 
  //  ,  
  // newButton()
      .wait()  // Wait for a click on a non-displayed button = wait here forever
          ).setOption("hideProgressBar",true)
 
 
DebugOff();
//.setOption("showProgressBar ",false)
//.setOption( "countsForProgressBar" , false )
// Make sure the progress bar is full upon reaching this last (non-)trial
  • This reply was modified 3 years, 1 month ago by Jeremy. Reason: added code formatting