A student of mine is working on a moral dilemma type experiment. Like
the one's Joshua Greene runs with EPRIME (boo). We're both new to the
program. I'm definitely a builder type of guy, and he's motivated to
code things (but he's also a builder type of guy as well). The goal
is to make a paragraph scroll slowly from left to right (opposite of
the star wars scroll) a few words at a time. We're not too picky
right now, but we were wondering if there was a way to do this with
either the builder or the coder. Realize that we are novices when it
comes to the coder, so, the more help the better.
Here are two things that we were thinking of (and please don't laugh):
1) make a movie file of scrolling text, but the only problem is that
neither of us can figure out what software would allow us to make a
movie that is just text 2) use this very sad HTML code that I just
made...But we don't really know how to put HTML code into psychopy.
Realize that I know that this sounds totally stupid for those of you
who know how to code is python because there is probably some command
that allows us to export our dilemmas from the EXCEL file that holds
them to the screen in a scrolling from left to right manner.
So, if you were us, what would you do? And how would you do it?
Thanks
Brian and Steve
Just so you can laugh at me, here's my sad HTML code.
<body bgcolor ="Black">
<font size = "50" font color = "White">
<center>
<br>
<br>
<br>
<br>
<marquee behavior="scroll" direction="left" width = 250 scrollamount =
"7"> You are standing next to a fat man. That fat man. Is really
fat. A trolley comes at the fat man..... Ignore the words for now,
but you get the ponit. </marquee>
</center>
PsychoPy has animation capabilities built-in (it can even produce and export movies itself (e.g. if you want to show your stimuli in PowerPoint/Keynote presentations)). But here you just want to animate stimuli directly.
e.g. create a text stimulus. In the 'pos' (position) field, type: [frameN, 0] and select "set every frame" in the popup button next to that field.
Push the Run button and your text will move from left to right, at one pixel per screen refresh, but stay at a fixed y-coordinate. In essence, you can enter an arbitrary formula in the position field and the stimulus will be-redrawn at a new position on each frame. frameN here refers to the number of frames shown so far, and you can extend the formula to produce what you need.
Cheers,
Michael
On 29 Feb, 2012, at 17:13, Brian Drwecki wrote:
> So, if you were us, what would you do? And how would you do it?
-- Michael R. MacAskill, PhD michael.macask...@nzbri.org Research Director, New Zealand Brain Research Institute
How much text are you talking about though? You might find performance issues (jittering motion) if you try to render a lot of text in one go, in which case you may have to switch to using images of text. But give Michael's approach a try because it's definitely the most straight-forward.
> PsychoPy has animation capabilities built-in (it can even produce and export movies itself (e.g. if you want to show your stimuli in PowerPoint/Keynote presentations)). But here you just want to animate stimuli directly.
> e.g. create a text stimulus. In the 'pos' (position) field, type: > [frameN, 0] and select "set every frame" in the popup button next to that field.
> Push the Run button and your text will move from left to right, at one pixel per screen refresh, but stay at a fixed y-coordinate. In essence, you can enter an arbitrary formula in the position field and the stimulus will be-redrawn at a new position on each frame. frameN here refers to the number of frames shown so far, and you can extend the formula to produce what you need.
> Cheers,
> Michael
> On 29 Feb, 2012, at 17:13, Brian Drwecki wrote:
>> So, if you were us, what would you do? And how would you do it?
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
> PsychoPy has animation capabilities built-in (it can even produce and export movies itself (e.g. if you want to show your stimuli in PowerPoint/Keynote presentations)). But here you just want to animate stimuli directly.
> e.g. create a text stimulus. In the 'pos' (position) field, type:
> [frameN, 0] and select "set every frame" in the popup button next to that field.
> Push the Run button and your text will move from left to right, at one pixel per screen refresh, but stay at a fixed y-coordinate. In essence, you can enter an arbitrary formula in the position field and the stimulus will be-redrawn at a new position on each frame. frameN here refers to the number of frames shown so far, and you can extend the formula to produce what you need.
> Cheers,
> Michael
> On 29 Feb, 2012, at 17:13, Brian Drwecki wrote:
> > So, if you were us, what would you do? And how would you do it?
> --
> Michael R. MacAskill, PhD michael.macask...@nzbri.org
> Research Director,
> New Zealand Brain Research Institute
It works very well,. Here are some tips for other people who want to
create scrolling text in the future. I wanted my text to scroll from
right to left. So if you keep your eyes in the middle of the screen
the next word to read would come from the right (as if you were
actually reading text). The original formula posted above scrolls the
other way. So, you have to put a negative sign in front of the
formula for it to scroll the other way. However, when I first tried
this, it was not working. This is because you have to change the
units to pixel (which seems like common sense now, but at the time I
was confused). Also, you have to make sure you have an end time set,
otherwise it just flickers. I also set my letter height to 100
pixels. The other problem I had was that I wanted the text to start
blank and scroll into the screen. So, I wrote [2000-frameN, 0] and
this worked really well. We appreciate the help. FYI, this is the
best free experimental software out there, thanks for making it.
Brian and Steve
On Feb 29, 7:26 am, Brian Drwecki <drwe...@gmail.com> wrote:
> Thanks guys, we'll implement this and provide an update on how it
> works!
> On Feb 28, 9:37 pm, Michael MacAskill <michael.macask...@otago.ac.nz>
> wrote:
> > Dear Brian and Steve,
> > Welcome aboard!
> > PsychoPy has animation capabilities built-in (it can even produce and export movies itself (e.g. if you want to show your stimuli in PowerPoint/Keynote presentations)). But here you just want to animate stimuli directly.
> > e.g. create a text stimulus. In the 'pos' (position) field, type:
> > [frameN, 0] and select "set every frame" in the popup button next to that field.
> > Push the Run button and your text will move from left to right, at one pixel per screen refresh, but stay at a fixed y-coordinate. In essence, you can enter an arbitrary formula in the position field and the stimulus will be-redrawn at a new position on each frame. frameN here refers to the number of frames shown so far, and you can extend the formula to produce what you need.
> > Cheers,
> > Michael
> > On 29 Feb, 2012, at 17:13, Brian Drwecki wrote:
> > > So, if you were us, what would you do? And how would you do it?
> > --
> > Michael R. MacAskill, PhD michael.macask...@nzbri.org
> > Research Director,
> > New Zealand Brain Research Institute
> > 66 Stewart St http://www.nzbri.org/macaskill > > Christchurch 8011 Ph: +64 3 3786 072
> > NEW ZEALAND Fax: +64 3 3786 080
On Wednesday, February 29, 2012 4:49:24 PM UTC+1, Brian Drwecki wrote:
> It works very well,. Here are some tips for other people who want to > create scrolling text in the future. I wanted my text to scroll from > right to left. So if you keep your eyes in the middle of the screen > the next word to read would come from the right (as if you were > actually reading text). The original formula posted above scrolls the > other way. So, you have to put a negative sign in front of the > formula for it to scroll the other way. However, when I first tried > this, it was not working. This is because you have to change the > units to pixel (which seems like common sense now, but at the time I > was confused). Also, you have to make sure you have an end time set, > otherwise it just flickers. I also set my letter height to 100 > pixels. The other problem I had was that I wanted the text to start > blank and scroll into the screen. So, I wrote [2000-frameN, 0] and > this worked really well. We appreciate the help. FYI, this is the > best free experimental software out there, thanks for making it.
> Brian and Steve
> On Feb 29, 7:26 am, Brian Drwecki <drwe...@gmail.com> wrote: > > Thanks guys, we'll implement this and provide an update on how it > > works!
> > On Feb 28, 9:37 pm, Michael MacAskill <michael.macask...@otago.ac.nz> > > wrote:
> > > Dear Brian and Steve,
> > > Welcome aboard!
> > > PsychoPy has animation capabilities built-in (it can even produce and > export movies itself (e.g. if you want to show your stimuli in > PowerPoint/Keynote presentations)). But here you just want to animate > stimuli directly.
> > > e.g. create a text stimulus. In the 'pos' (position) field, type: > > > [frameN, 0] and select "set every frame" in the popup button next to > that field.
> > > Push the Run button and your text will move from left to right, at one > pixel per screen refresh, but stay at a fixed y-coordinate. In essence, > you can enter an arbitrary formula in the position field and the stimulus > will be-redrawn at a new position on each frame. frameN here refers to the > number of frames shown so far, and you can extend the formula to produce > what you need.
> > > Cheers,
> > > Michael
> > > On 29 Feb, 2012, at 17:13, Brian Drwecki wrote:
> > > > So, if you were us, what would you do? And how would you do it?
> > > -- > > > Michael R. MacAskill, PhD michael.macask...@nzbri.org > > > Research Director, > > > New Zealand Brain Research Institute
> > > 66 Stewart St http://www.nzbri.org/macaskill > > > Christchurch 8011 Ph: +64 3 3786 072 > > > NEW ZEALAND Fax: +64 3 3786 080