**Eye Tracker를 사용하여 Zepman에서 실험을 진행할 때 알아두어야 하는 내용**
1. <Gaze symbol 확인하기>
Ctrl + F7 -----> 실험 부스 안 컴퓨터 화면과 Experimenter 컴퓨터 화면 다 표시
F7 -----> Experimenter 컴퓨터 화면에만 표시 (점이 아주 작음)
==========================================================
2. <Stimuli randomize>
C:>Users>LG>Desktop>moma_kipi_final>habituation
a) test_page.zm 열기
// Shuffle tokens at start and on wrap around.
int i = toknum % tokens[type].size;
if (i == 0) tokens[type].shuffle(0, -1);
b) Randomize를 원치 않는다면 ↑위의 내용을 comment out
==========================================================
1차 수정
- Theo의 메일 내용 - 2020.01.30 오후 4:58
"That's a little bug in the script, so I can fix this. It is calculating the
relative looking time (in percent) which it needs for the habituation criterion, but it is
dividing by 0 because due to the look away the actual looking time was 0."
프로그래머분께서 직접 수정해주심.
2차 수정
- Theo의 메일 내용 - 2020.1.30 오후 9:24
"At first I thought I'd implement the change by using the drift-check target built into the
Zep eye-tracker stuff, but doing so would make it visually different from what you already have, so I decided no to go there. I've also fixed the division by 0 bug.
C:>Users>LG>Desktop>moma_kipi_final>habituation
task.zm 열기 ↓ 수정한 내용
else if (ltref > 0ms)
relativelt = 100 * real(curlt) / real(ltref);
==========================================================
- Theo의 메일 내용 - 2020.01.30 오후 4:58
"This probably happens when the experiment is showing the doll swinging back and forth.This is image (and some others) are SVG files. That means they are vector graphics and these are much more expensive to draw than a simple PNG image file. On a more powerful computer you wouldn't have the problem."
SVG 이미지 파일들을 PNG 파일로 다운 받아서 사용해야함. 그 다음 a), b) 수정
a) pretest,habituation,test,test2 폴더에서 eyetracker_infant.zm의 .svg를 다 .png로 수정
// Target images to be used instead of circles.
attention_target_image = stimuli_dir() + "images/teddy.png";
focus_target_image = stimuli_dir() + "images/teddy.png";
wakeup_target_image = stimuli_dir() + "images/sun.png";
// Image to display during camera setup and when testing tracking.
setup_target_image = stimuli_dir() + "images/doll.png";
b) moma_kipi.zp에서도 svg를 다 .png로 수정
But, 다음의 내용에 따라 경고 메세지는 또 나올 수 있음!!
- Theo의 메일 내용 - 2020.01.30 오후 4:58
"Note, there are still some SVG images shown in during eye-tracker setup so during
eye-tracker setup you might still see some warnings."
==========================================================
5. <Trials가 눈동자에 따라 잘 넘어가도록 하는 방법>
a) attention getter 바라보는 시간 수정
pretest,habituation,test,test2 폴더에서 defs.zm의 MIN_ATTENTION_FOCUS를 수정하기
MIN_ATTENTION_FOCUS = 500ms;
*500ms로 결정한 이유
"Maybe I can change the behaviour to accumulating looking time on the attention getter (not resetting when not looking at it) and once N ms of looking have been accumulated then continue to the stimulus part after the first gaze on the attention getter."
MIN_ATTENTION_FOCUS and gaze samples outside attention getter's AOI don't make it start over. So it won't that hard to get passed the attention getter. At the same time you can use a larger MIN_ATTENTION_FOCUS duration (I've set it to 500ms, for trying).
b) ATTENTION_AOI_RADIUS pixel을 수정
pretest,habituation,test,test2 폴더에서 defs.zm의 MIN_ATTENTION_FOCUS를 수정하기
ATTENTION_AOI_RADIUS = 400;
"The only reason I made it small at first is that if it is big and the gaze happens to lie
near the left or right of the attention getter AOI then your'e immediately looking at the
left or right image once the attention getter disappears. But since the looking time
counter doesn't start running until the first sound stimulus starts there will be no harm
I think. It is just that the smaller the AOI is the more centered the participant is
forced to look (less left or right bias)."
* attention getter인 초록색 네모가 화면에 있을 때 Enter key를 사용해서도 다음 trial로 넘어갈 수 있음. 그렇지만 gaze control로 진행하는 것이 우선이다.
==========================================================
6. <Eye Tracker가 엄마들의 눈동자를 잡아낼 수 있는 가능성에 대해>
"Some researchers make the parent wear a suncap angled down as much as possible. Sunglasses won't work, as the eye-tracker works with IR light."
==========================================================
7. <Habituation - "Looking at screen">
C:>Users>LG>Desktop>moma_kipi_final>habituation
test_page.zm에서 확인할 수 있다.
// Check if "looking at screen.
if (xeye >= canvas.x && yeye >= canvas.y &&
xeye < canvas.x + canvas.actual_width &&
yeye < canvas.y + canvas.actual_height)
{
looking = true;
// canvas.aoi_circle.is_visible = true;
}
else
{
looking = false;
// canvas.aoi_circle.is_visible = false;
}
==========================================================
8. <Look away duration>
In defs.zm you can turn enable or disable the max lookaway duration. Currently you have it enabled in habituation and disabled for the other phases. You can disable (set to 0ms) forhabituation as well.
In defs.zm of the hab phase you can set the habituation criterion. Currently 65% of
*first* block.
If you do want the 2s time out, just set MAX_LOOKAWAY_DURATION in defs.zm. In the latest version I provided yesterday I had set it to 0ms, since I understood you wanted that. Just set it back to 2000ms. The way it is now (with no end-trial-on-tool-long-lookaway) it will be pretty hard to reach the habitiation criterion anyway, so it's incorrect now.
C:>Users>LG>Desktop>moma_kipi_final>habituation
defs.zm에서 habituation만 MAX_LOOKAWAY_DURATION이 '2000ms', 나머지 단계는 '0ms'
dur MAX_LOOKAWAY_DURATION = 2000ms;
==========================================================
9. <Trial length>
// Number of tokens presented in trial.
const int TRIAL_LENGTH = 6;
==========================================================
10. <Timer lookaway>
habituation 단계에서 lookaway가 어떻게 count 되는지에 대한 설명
C:>Users>LG>Desktop>moma_kipi_final>habituation
test_page.zm에서 확인할 수 있다.
// Dedicated look-away timer to handle the case where the eye-tracker
// stops producing gaze samples instead of producing "no-eyes" gaze
// samples.
Timer lookaway
{
on_event:expire()
{
if (!looking) {
curnlt = expire_time - nolookstart;
lookedaway = true;
response.ignore_remaining_hits();
canvas.stop();
}
}
}
}
a) attention getter 바라보는 시간 수정
pretest,habituation,test,test2 폴더에서 defs.zm의 MIN_ATTENTION_FOCUS를 수정하기
MIN_ATTENTION_FOCUS = 500ms;
*500ms로 결정한 이유
- Theo 메일의 내용-2020.02.06 오후 4:26
"Maybe I can change the behaviour to accumulating looking time on the attention getter (not resetting when not looking at it) and once N ms of looking have been accumulated then continue to the stimulus part after the first gaze on the attention getter."
- Theo 메일의 내용-2020.02.10 오후 4:35
MIN_ATTENTION_FOCUS and gaze samples outside attention getter's AOI don't make it start over. So it won't that hard to get passed the attention getter. At the same time you can use a larger MIN_ATTENTION_FOCUS duration (I've set it to 500ms, for trying).
b) ATTENTION_AOI_RADIUS pixel을 수정
pretest,habituation,test,test2 폴더에서 defs.zm의 MIN_ATTENTION_FOCUS를 수정하기
ATTENTION_AOI_RADIUS = 400;
* 처음 ATTENTION_AOI_RADIUS 100px으로 했던 이유
- Theo 메일의 내용-2020.02.04 오후 4:24
near the left or right of the attention getter AOI then your'e immediately looking at the
left or right image once the attention getter disappears. But since the looking time
counter doesn't start running until the first sound stimulus starts there will be no harm
I think. It is just that the smaller the AOI is the more centered the participant is
forced to look (less left or right bias)."
* attention getter인 초록색 네모가 화면에 있을 때 Enter key를 사용해서도 다음 trial로 넘어갈 수 있음. 그렇지만 gaze control로 진행하는 것이 우선이다.
==========================================================
6. <Eye Tracker가 엄마들의 눈동자를 잡아낼 수 있는 가능성에 대해>
- Theo의 메일 내용
"Some researchers make the parent wear a suncap angled down as much as possible. Sunglasses won't work, as the eye-tracker works with IR light."
==========================================================
7. <Habituation - "Looking at screen">
- Theo의 메일 내용 - 2020.02.04 오후 5:01
"looking at screen" rather than "looking at stimulus". I've also implemented that the auditory stimuli stream halts (after the current stimulus is done) when the participant looks away and then continues with the next stimulus when looking back.
현재 moma_kipi 실험의 habituation은 "looking at screen" 형식으로 진행된다.
test_page.zm에서 확인할 수 있다.
// Check if "looking at screen.
if (xeye >= canvas.x && yeye >= canvas.y &&
xeye < canvas.x + canvas.actual_width &&
yeye < canvas.y + canvas.actual_height)
{
looking = true;
// canvas.aoi_circle.is_visible = true;
}
else
{
looking = false;
// canvas.aoi_circle.is_visible = false;
}
8. <Look away duration>
- Theo 메일의 내용-2020.02.04 오후 5:41
In defs.zm you can turn enable or disable the max lookaway duration. Currently you have it enabled in habituation and disabled for the other phases. You can disable (set to 0ms) forhabituation as well.
In defs.zm of the hab phase you can set the habituation criterion. Currently 65% of
*first* block.
- Theo 메일의 내용-2020.02.05 오후 4:26
If you do want the 2s time out, just set MAX_LOOKAWAY_DURATION in defs.zm. In the latest version I provided yesterday I had set it to 0ms, since I understood you wanted that. Just set it back to 2000ms. The way it is now (with no end-trial-on-tool-long-lookaway) it will be pretty hard to reach the habitiation criterion anyway, so it's incorrect now.
- 현재 moma_kipi 실험은 4개의 trial로 구성되어 총 6개의 blocks이 있는 habituation 단계에서만 첫 번째 blocks의 피험자 주시 시간과 비교하여 65% 이하가 되면 habituation이 완료된다. 또한 habituation에서만 피험자가 화면을 2초 이상 바라보지 않으면 해당 trial이 끝나는 것으로 설정되어 있다. (=2초 이내에 다시 화면을 보면 stimuli가 이어진다) 나머지 pretest, test, test2는 해당되지 않음.
C:>Users>LG>Desktop>moma_kipi_final>habituation
defs.zm에서 habituation만 MAX_LOOKAWAY_DURATION이 '2000ms', 나머지 단계는 '0ms'
dur MAX_LOOKAWAY_DURATION = 2000ms;
==========================================================
9. <Trial length>
- 현재 moma_kipi 실험의 habituation 단계에서 나오는 audio stimuli는 총 6개로 아래와 같으며, 아기들이 확실하게 '모마'와 '키피'를 명사로 인식할 수 있도록 '모마'와 '키피' 뒤에 6개의 접미사를 붙여서 녹음했다. 6개의 녹음 파일들 중에 3번만 과장된 목소리로 녹음했다.
1. "모마, 모마다"-과장 1. "키피, 키피다"-과장
2. "모마, 모마야" 2. "키피, 키피야"
3. "모마, 모마구나" 3. "키피, 키피구나"
4. "모마, 모마네"-과장 4. "키피, 키피네"-과장
5. "모마, 모마지" 5. "키피, 키피지"
6. "모마, 모마래"-과장 6. "키피, 키피래"-과장
habituation 단계의 trial 횟수 지정하는 방법
C:>Users>LG>Desktop>moma_kipi_final>habituation
defs.zm에서 확인할 수 있다.
const int TRIAL_LENGTH = 6;
==========================================================
10. <Timer lookaway>
habituation 단계에서 lookaway가 어떻게 count 되는지에 대한 설명
C:>Users>LG>Desktop>moma_kipi_final>habituation
test_page.zm에서 확인할 수 있다.
// Dedicated look-away timer to handle the case where the eye-tracker
// stops producing gaze samples instead of producing "no-eyes" gaze
// samples.
Timer lookaway
{
on_event:expire()
{
if (!looking) {
curnlt = expire_time - nolookstart;
lookedaway = true;
response.ignore_remaining_hits();
canvas.stop();
}
}
}
}
==========================================================
11. <Zep Eye Tracker setup menu>
Eye Tracker 셋업할 때 Zep 홈페이지에서 확인할 수 있는 링크 주소
==========================================================
12. <Dropout 한 결과도 표시하는 방법>
https://www.beexy.nl/zep2/wiki/doku.php?id=reference:zepman_options_menu#preferences
a) Zepman에서 왼쪽 상단 'Options' 클릭 ---> 'Preferences' 클릭
b) Hide sessions marked failed, aborted, or running
a) Zepman에서 왼쪽 상단 'Options' 클릭 ---> 'Preferences' 클릭
b) Hide sessions marked failed, aborted, or running
==========================================================
13. <Extract data specify>
블로그의 procedures에도 나와있다.
==========================================================
14. <Match & Mismatch grouping>
https://www.beexy.nl/zep2/wiki/doku.php?id=modules:grouping
현재 moma_kipi 실험은 'Match condition'과 'Mismatch condition'이 있다.
'Finished'인 데이터만 인정하여 'Match/Mismatch'가 밸런스를 이루도록 하는 방법은 링크에서 'Example 5, Select group from number of finished sessions'에 해당한다.
C:>Users>LG>Desktop>moma_kipi_final>modules
grouping.zm에서
int assign_participant_to_group()
{
// Select a group based on the number of finished sessions done so far for
// current experiment status. This function should not be used when you
// will be running parallel sessions. Because in that situation if you
// start two or more sessions around the same time they will all see the
// same number of finished sessions. You can enforce this by setting the
// database into single-user mode (see corresponding ZepMan feature).
return select_group_from_num_finished_sessions();
}
==========================================================
15. <Segmentation4 - HPP_syntax 실험 Checkerboard 크기>
아래 내용은 크기를 키우는 방법, 줄이는 방법은 반대로 낮은 숫자로 수정
C:>Users>LG>Desktop>>
CanvasGadget canvas
{
init()
{
// fill_pattern_color = TEST_PAGE_STIMULUS_COLOR;
size = 1000, 1000;
offset_x = width / 2;
offset_y = height / 2;
}
ImageShape attention
{
init()
{
load(stimuli_dir() + "images/checkerboard_big.png");
filter = PATTERN_FILTER_FAST;
}
void load(string fn, int w=800)
{
image = fn;
if (w>0) {
width = w;
height = -1;
}
else {
width = 0;
height = 0;
}
x = -int(actual_width/2);
y = -int(actual_height/2);
}
1) CanvasGadget canvas의 사이즈를 1000, 1000으로 수정 (=1000x1000 pixels)
2) ImageShape attention의 w 사이즈를 800으로 수정
==> 현재(2020.02.24) Checkerboard의 사이즈
==========================================================
2020.04.14 이후는 Part Welcome3에 동요를 추가해서 사용.
Part welcome3
{
on_event:entry()
{
// Simple animation of concentric circles. First one circle is
// shown, then two and so on. Once all circles are shown the
// action is reverted.
anim_page3.action(this);
// In 1s start playing a (baby song) sound file, repeat every 1s.
sound_playback.scaling_all = 1.0;
sound_playback.play(stimuli_dir() + "sounds/Part Welcome.wav",
now() + 1s, 2s);
}
on_event:exit()
{
sound_playback.abort();
}
}
동요는 각 실험 폴더>Stimuli>Sounds에 'Part Welcome.wav' 파일.
다른 Part Welcome으로 수정하려면 Part welcome3 대신 ↑위의 Part Welcome 1~5 넣기.
**2020.04.14 이전에 사용하던 Part Welcome
Part welcome
{
on_event:entry()
{
// Setup a slide show.
entry_page.add_image(stimuli_dir() + "images/fish.png");
entry_page.add_image(stimuli_dir() + "images/sun.png");
entry_page.add_image(stimuli_dir() + "images/wagon.png");
entry_page.action(this,
0s, // no timeout
5s); // change image every 5s
// In 1s start playing a (baby song) sound file once.
sound_playback.scaling_all = 1.0;
sound_playback.play(stimuli_dir() + "sounds/welcome.wav",
now() + 1s);
}
on_event:exit()
{
sound_playback.abort();
}
}
https://www.beexy.nl/zep2/wiki/doku.php?id=modules:grouping
현재 moma_kipi 실험은 'Match condition'과 'Mismatch condition'이 있다.
'Finished'인 데이터만 인정하여 'Match/Mismatch'가 밸런스를 이루도록 하는 방법은 링크에서 'Example 5, Select group from number of finished sessions'에 해당한다.
C:>Users>LG>Desktop>moma_kipi_final>modules
grouping.zm에서
int assign_participant_to_group()
{
// Select a group based on the number of finished sessions done so far for
// current experiment status. This function should not be used when you
// will be running parallel sessions. Because in that situation if you
// start two or more sessions around the same time they will all see the
// same number of finished sessions. You can enforce this by setting the
// database into single-user mode (see corresponding ZepMan feature).
return select_group_from_num_finished_sessions();
}
==========================================================
15. <Segmentation4 - HPP_syntax 실험 Checkerboard 크기>
아래 내용은 크기를 키우는 방법, 줄이는 방법은 반대로 낮은 숫자로 수정
- Theo 메일의 내용-2020.02.20 오후 5:14
I assume you want to keep the animation (it scares me).
Open left_page.zm and right_page.zm.
1. The canvas is now 400x400 pixels. So whatever shape you place on the canvas it will
always be chopped off at 400x400 pixels. Make the canvas say 1000x1000 pixels?
2. The ImageShape called attention has a load() function. This function has a width (w)
parameter that controls how to scale image. It was set at 400 which means the image will
be scaled to a size of 400 pixels wide. Make it 800. Since the animation will scale up and
down the image by a another factor of 1.25 the maximum image width will match the canvas
width.
3. If the animation is not really smooth, you might want to size down the checkerboard PNG
to 400x400 or so? This will be more efficient and it will look about the same.
Open left_page.zm and right_page.zm.
1. The canvas is now 400x400 pixels. So whatever shape you place on the canvas it will
always be chopped off at 400x400 pixels. Make the canvas say 1000x1000 pixels?
2. The ImageShape called attention has a load() function. This function has a width (w)
parameter that controls how to scale image. It was set at 400 which means the image will
be scaled to a size of 400 pixels wide. Make it 800. Since the animation will scale up and
down the image by a another factor of 1.25 the maximum image width will match the canvas
width.
3. If the animation is not really smooth, you might want to size down the checkerboard PNG
to 400x400 or so? This will be more efficient and it will look about the same.
CanvasGadget canvas
{
init()
{
// fill_pattern_color = TEST_PAGE_STIMULUS_COLOR;
size = 1000, 1000;
offset_x = width / 2;
offset_y = height / 2;
}
ImageShape attention
{
init()
{
load(stimuli_dir() + "images/checkerboard_big.png");
filter = PATTERN_FILTER_FAST;
}
void load(string fn, int w=800)
{
image = fn;
if (w>0) {
width = w;
height = -1;
}
else {
width = 0;
height = 0;
}
x = -int(actual_width/2);
y = -int(actual_height/2);
}
1) CanvasGadget canvas의 사이즈를 1000, 1000으로 수정 (=1000x1000 pixels)
2) ImageShape attention의 w 사이즈를 800으로 수정
==> 현재(2020.02.24) Checkerboard의 사이즈
==========================================================
16. <Zepman을 이용해서 experiment package 만들기>
- Theo 메일의 내용-2020.02.20 오후 4:23
Next time please use zepman to create the experiment package (the zip file).
How to create or install an experiment package using ZepMan is explained in the ZepMan
User Manual and also in the ZepMan Tutorial.
프로그래머분에게 실험실에서 Zepman을 이용해서 진행하고 있는 실험에 관해 질문하는 경우 파일을 보내드려야 할 때 알집을 사용해서 압축하는 것이 아닌!!, 홈페이지에 나와있는 'Create package'를 참고하여 zip 파일을 만들어서 보내드려야 합니다.
==========================================================
17. <Zep:error - overflow>
Zepman에서 실험을 실행했을 때 다음과 같은 메세지가 나오면 컴퓨터를 다시 시작합니다.
Running selected script "VisualCDI"...
[zep: error] Event(s) lost due to event queue overflow.
Exit status: 4
해결방법 : 컴퓨터 다시 시작!
==========================================================
==========================================================
17. <Zep:error - overflow>
Zepman에서 실험을 실행했을 때 다음과 같은 메세지가 나오면 컴퓨터를 다시 시작합니다.
Running selected script "VisualCDI"...
[zep: error] Event(s) lost due to event queue overflow.
Exit status: 4
해결방법 : 컴퓨터 다시 시작!
==========================================================
18. <Zepman license>
Zepman에서 다음과 같은 메세지가 나오면 license를 renewal 할 시간입니다.
교수님께 말씀드려서 프로그래머분이신 Theo에게 license renewal를 요청합니다.
새롭게 받은 license는 C:/Program Files/ZepMan-researcher <--- 여기 폴더에 넣어줍니다.
★기존의 license는 _old로 이름을 바꿔주시고 새롭게 받은 license가 'zepman-researcher'가 되도록 해주세요!! 그래야 Zepman에서 더 이상 license에 대한 메세지가 나오지 않습니다.
만약 renewal를 했는데도 Zepman에서 계속해서 license에 관한 메세지가 나온다면 프로그래머분께 말씀드립니다.
==========================================================
18. <Part Welcome>
1. Open moma_kipi.zp
2. Below this line (45):
import std_image_page;
Insert these:
import std_anim_page1;
import std_anim_page2;
import std_anim_page3;
import std_anim_page4;
import std_anim_page5;
Each of these modules defines a different type of animation. For this example we use all
of them.
3. Before this:
Part welcome
Insert this:
Part welcome1
{
on_event:entry()
{
// Simple animation of lines. The end points of each line describes
// a Lissajou curve.
anim_page1.action(this);
}
}
Part welcome2
{
on_event:entry()
{
// Simple animation of filled circles. The position of each circle
// describes a Lissajou curve.
anim_page2.action(this);
}
}
Part welcome3
{
on_event:entry()
{
// Simple animation of concentric circles. First one circle is
// shown, then two and so on. Once all circles are shown the
// action is reverted.
anim_page3.action(this);
}
}
Part welcome4
{
on_event:entry()
{
// Do image slide show or short movie consisting of separate
// frame images.
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-01.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-02.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-03.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-04.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-05.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-06.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-07.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-08.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-09.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-10.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-11.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-12.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-13.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-14.png");
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho rse-15.png");
anim_page4.action(this);
}
}
Part welcome5
{
on_event:entry()
{
// Do three image at a time slide show. The three images are
// displayed on a random location on a 3x3 grid with the
// restriction that there is always one image at each row.
anim_page5.add_image(stimuli_d ir() + "images/fish.png");
anim_page5.add_image(stimuli_d ir() + "images/sun.png");
anim_page5.add_image(stimuli_d ir() + "images/wagon.png");
anim_page5.add_image(stimuli_d ir() + "images/doll.png");
anim_page5.add_image(stimuli_d ir() + "images/teddy.png");
anim_page5.shuffle_images();
anim_page5.action(this);
}
}
4. Run the experiment. Each time you hit Enter or space the next type of animation will be
shown. They might go a little fast for an infant. That can be tweaked. You can also
combine them with playing the tune. Animation number 4 is supposed to show a lauching baby
instead of the horse, anyway you get the idea. For number 5 you could add more/other
images. If you like one of the animations you could use that one instead of the welcoming
slide show you already have.
- Theo 메일의 내용-2020.04.13 오후 3:38
1. Open moma_kipi.zp
2. Below this line (45):
import std_image_page;
Insert these:
import std_anim_page1;
import std_anim_page2;
import std_anim_page3;
import std_anim_page4;
import std_anim_page5;
Each of these modules defines a different type of animation. For this example we use all
of them.
3. Before this:
Part welcome
Insert this:
Part welcome1
{
on_event:entry()
{
// Simple animation of lines. The end points of each line describes
// a Lissajou curve.
anim_page1.action(this);
}
}
Part welcome2
{
on_event:entry()
{
// Simple animation of filled circles. The position of each circle
// describes a Lissajou curve.
anim_page2.action(this);
}
}
Part welcome3
{
on_event:entry()
{
// Simple animation of concentric circles. First one circle is
// shown, then two and so on. Once all circles are shown the
// action is reverted.
anim_page3.action(this);
}
}
Part welcome4
{
on_event:entry()
{
// Do image slide show or short movie consisting of separate
// frame images.
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.add_image(zep_dir() + "data/images/Muybridge-race-ho
anim_page4.action(this);
}
}
Part welcome5
{
on_event:entry()
{
// Do three image at a time slide show. The three images are
// displayed on a random location on a 3x3 grid with the
// restriction that there is always one image at each row.
anim_page5.add_image(stimuli_d
anim_page5.add_image(stimuli_d
anim_page5.add_image(stimuli_d
anim_page5.add_image(stimuli_d
anim_page5.add_image(stimuli_d
anim_page5.shuffle_images();
anim_page5.action(this);
}
}
4. Run the experiment. Each time you hit Enter or space the next type of animation will be
shown. They might go a little fast for an infant. That can be tweaked. You can also
combine them with playing the tune. Animation number 4 is supposed to show a lauching baby
instead of the horse, anyway you get the idea. For number 5 you could add more/other
images. If you like one of the animations you could use that one instead of the welcoming
slide show you already have.
2020.04.14 이후는 Part Welcome3에 동요를 추가해서 사용.
Part welcome3
{
on_event:entry()
{
// Simple animation of concentric circles. First one circle is
// shown, then two and so on. Once all circles are shown the
// action is reverted.
anim_page3.action(this);
// In 1s start playing a (baby song) sound file, repeat every 1s.
sound_playback.scaling_all = 1.0;
sound_playback.play(stimuli_dir() + "sounds/Part Welcome.wav",
now() + 1s, 2s);
}
on_event:exit()
{
sound_playback.abort();
}
}
다른 Part Welcome으로 수정하려면 Part welcome3 대신 ↑위의 Part Welcome 1~5 넣기.
**2020.04.14 이전에 사용하던 Part Welcome
Part welcome
{
on_event:entry()
{
// Setup a slide show.
entry_page.add_image(stimuli_dir() + "images/fish.png");
entry_page.add_image(stimuli_dir() + "images/sun.png");
entry_page.add_image(stimuli_dir() + "images/wagon.png");
entry_page.action(this,
0s, // no timeout
5s); // change image every 5s
// In 1s start playing a (baby song) sound file once.
sound_playback.scaling_all = 1.0;
sound_playback.play(stimuli_dir() + "sounds/welcome.wav",
now() + 1s);
}
on_event:exit()
{
sound_playback.abort();
}
}
댓글 없음:
댓글 쓰기