#! Praat script p2/speakers/draw_cards.praat.txt form P2 experiment cards choice Which: 2 button Title button Eight words button Filler1 button Filler2 endform Erase all Font size... 1 Times # A4 paper is 210 x 297 mm paperwidth = 210/25.4 paperheight = 297/25.4 leftoffset = -0.5 topoffset = -0.5 Viewport... leftoffset leftoffset+paperwidth topoffset topoffset+paperheight Axes... 0 1 0 1 if which$ <> "Title" Draw line... 0.5 0 0.5 1 endif Draw line... 0 0.5 1 0.5 Viewport... leftoffset leftoffset+paperwidth topoffset topoffset+paperheight/2 Draw line... 0 0.5 1 0.5 Viewport... leftoffset leftoffset+paperwidth topoffset+paperheight/2 topoffset+paperheight Draw line... 0 0.5 1 0.5 Font size... 72 if which$ = "Title" Viewport... leftoffset leftoffset+paperwidth topoffset topoffset+paperheight/4 Viewport text... Centre Half 0 THIS is a Viewport... leftoffset leftoffset+paperwidth topoffset+paperheight/4 topoffset+paperheight/2 Viewport text... Centre Half 0 as well. elsif which$ = "Eight words" call eight ship sheep Snicker sneaker lead lid filling feeling elsif which$ = "Filler1" call eight car bicycle chair kitchen pad lip speaker mailing elsif which$ = "Filler2" call eight warning table warning table warning table warning table endif procedure eight a$ b$ c$ d$ e$ f$ g$ h$ call put 'a$' 1 1 call put 'b$' 1 2 call put 'c$' 2 1 call put 'd$' 2 2 call put 'e$' 3 1 call put 'f$' 3 2 call put 'g$' 4 1 call put 'h$' 4 2 endproc procedure put text$ row column x1 = leftoffset + (column - 1) * paperwidth / 2 x2 = x1 + paperwidth / 2 y1 = topoffset + (row - 1) * paperheight / 4 y2 = y1 + paperheight / 4 Viewport... x1 x2 y1 y2 Viewport text... Centre Half 0 'text$' endproc