sebastiaan
About
- Username
- sebastiaan
- Joined
- Visits
- 7,321
- Last Active
- Roles
- Administrator
Comments
-
You would paste the script into a file and run it by typing "python [filename]" in a terminal. However, if you're new to Python I would advise you to go through a Python tutorial! "A Byte of Python" is an excellent start: http://…
-
(Quote) That's what it's for! (Quote) The playback sampling rate is fixed at 48Khz in OpenSesame 0.24. Your sound file probably has a different rate (33Khz?), which is why it sounds sped up. There are a few simple tricks to get around this: * Your…
-
Hi Mpaullin, Welcome to the forum and thank you for your interest in OpenSesame! The problem with using widgets (Tk, Qt, Gtk, and what have you) is that they typically draw on their own window, and not on the OpenSesame window. This is why you see…
-
Hi Andrea, One thing that is important to take into account is the restrictions imposed by the refresh rate of the monitor. Let's say the monitor is running at 100Hz, this means that a canvas can be shown at most every 10ms. If you try to show it m…
-
Thanks for the updated documentation. I have had a little play with Mantra in several lighting situations and I'm still struggling to get reliable tracking, even after adjusting the webcam settings. I'll keep trying though... I'm sorry to hear that…
-
Hi Andrea, You can create animations by showing static canvasses in succession. Since this is probably quite a common thing to do, I'll give a few examples. In order to fully understand these examples, you will need a basic understanding of Python.…
-
Hi Embodiment, I cannot really say, because that depends on the keyboard. OpenSesame reads the keyboard in pretty much the same way as all other software, so in that respect it wouldn't matter which software you use. Here's a nice paper on the sub…
-
Hi Embodiment, Welcome to the forum! Yes, that's certainly possible to implement. It will require a moderately complex inline script (where the clock is drawn), but nothing too overwhelming. All the required functionality is available in the opene…
-
Hi Mtoro, Welcome to the forum! Yes, that's possible. But you will need to refer directly to the libraries used by the back-end, because the openexp.keyboard module doesn't support "key up" functionality (I'll consider adding it, because…
-
Good to hear you got it working (mostly)! The increased response times probably come from a number of sources. * the playback latency (timing of sound playback is notoriously sloppy on regular hardware) * the recording latency (same story) * the pr…
-
I'm guessing that the easiest way is not to use the opensesamerun app per se, but simply create a native android gui (or maybe even only a simple Python script to begin with) to create and run an opensesame experiment. That way, there are really onl…
-
Hi Max, Welcome to the forum! You can indeed use the PyGame event queue. Actually, the openexp.keyboard classes are just very thin wrappers. Around PyGame in the case of the legacy and opengl back-ends, around PsychoPy in the case of the psycho ba…
-
Hi Sylvain, Welcome to the forum! You can use special characters, but it's a bit awkward right now. With 0.24, you need to enter special characters in Unicode notation. For example, the string 'MathU+00F4t' will show (in sketchpads etc.) as 'Mathô…
-
Hi Ismael, Welcome to the forum! I finally got around to doing a bit of work on Mantra (notably updating the installer to work with newer versions of Python) and I also extended the documentation a bit. It now describes the structure of the log-fi…
-
Actually Qt is being ported, the project is called "necessitas" and is supported by a library auto loader that automatically downloads required libraries (called ministro). I'm quite sure that we can used that project that is at first sigh…
-
1. Using item_index = self.get("count_Trial_sequence") the items do not reset to 0 when you move on to a different block or run... I fixed the problem by using:item_index = self.get("count_Trial_sequence") - (block_index * number…
-
Hi Christod, Sure, that's actually quite a minor change. I changed the script from the voicekey experiment (see above) as shown below. Now it records sound for a pre-specified duration, notes the response (the moment that the loudness exceeds the t…
-
Actually the opengl back-end in important for ma as I need high and precise refresh rates for the experiments I do. Small videos are show at refresh rate up to 160Hz (this is made on CRT monitors) so I really need the precision of this back-end. Ah…
-
I don't completely follow, but if you want to walk through a file line by line, something like the following should work (in your example the variable 'files' appears to be undefined): path = self.experiment.get_file("my_file_name.txt") f…
-
No, I'm afraid that isn't possible without some inline coding. But fortunately nothing terribly complicated. The following code snippet accepts keyboard input until 'return' is pressed and overlays the resulting string over the canvas of a sketchpad…
-
Sure, you can use the get_file() function. The file pool is located somewhere in a temporary folder. get_file() retrieves the full path to a file in the file pool. So something like this should do the trick: path = self.experiment.get_file("r…
-
Hi Durk, Welcome to the forum! Yes, I can see why you're puzzled. The reason why it doesn't work specifically for the canvas class is that this class employs 'type morphing'. There actually a number of different canvasses (openexp._canvas.legacy.l…
-
Hi Jjholiday, Thank you for your interest in OpenSesame and welcome to the forum! Your not doing anything wrong, really. What you're describing is know and inconvenient behavior of OpenSesame (issue fixed for 0.25), but luckily it's easily overcom…
-
Hi Obrousse, Thank you for your interest and welcome to the forum! Regarding the first display not being shown with the OpenGL back-end. Could you provide some details on the system that you are using? And do you observe the same behavior with all…
-
I just committed a patch. Unless you want to switch entirely to the experimental branch of OpenSesame 0.25, it's probably easiest to replace only the plugins/text_input folder. You can download the snapshot from GitHub (direct link). Please check …
-
Hi Adam, There are quite a lot of ways to do this, but the trick in general is to use a very short timeout value, and exit the loop as soon as a timeout has not occurred. So something like this should get you started: from openexp.keyboard import …
-
No there isn't, I'm afraid. :O But it will be a trivial modification to the plug-in. If it's important for your experiment, I can notify you here when I have updated the plug-in. You can then replace the plugins/text_input folder from your origina…
-
I'm impressed that you found this, because it's kind of tucked away there in the timing section! But yes, by increasing the buffer size you reduce the chance of getting choppy playback. These options should be more visible to the user, so I opened …
-
It's important to know that not all Python variables are automatically recognized by OpenSesame with the "[variable]" notation. Specifically, OpenSesame only recognizes variables that are properties of the experiment object. In practice, t…
-
Ah, I think I understand now. There is a variable "dist1", which has a value between 1 and 4, depending on where the target picture was presented. So "response" has to match "dist1". Is that correct? There are two ways…