* Changes in 2.2.45 (Mar 28, 2024) - When NI samples were not read out quickly on low-performance machines, data acquisition stopped with an undisplayed error, which made some modal dialogs like the calibration tools not responsive to user input. The measures to mitigate sample loss and capture those errors are taken. (Thanks to Caitlyn Bartsch) - The WebcamMonitor adapter failed to display video correctly, when MJPEG was chosen. It is fixed. (Thanks to Spencer Waters) * Changes in 2.2.44 (Feb 16, 2024) - The BlackrockLED adapter that has been broken since 2.2.36 (May 24, 2023) is fixed. - Minor fixes * Changes in 2.2.43 (Jan 12, 2024) + The port number for the TOM-rs eye tracker can be changed in the UI menu. (Thanks to Amirali Soltani Tehrani) - It is fixed that WaitThenHold and FreeThenHold did not set AcquiredTime and RT correctly when there were intervening adapters between SingleTarget and them. (Thanks to Yidong_YANG from the NIMH ML forum) * Changes in 2.2.42 (Dec 15, 2023) + The polynomial transform is supported in the [2-D Spatial Transformation] calibration tool. This transform allows mapping a curved voltage space to a rectangular eye space. - Minor fixes. * Changes in 2.2.41 (Nov 29, 2023) + A new timing script fuction, include(), is added. It includes other script files into the current script. * Changes in 2.2.40 (Oct 11, 2023) + The PhotoDiode adapter can toggle the photodiode trigger when an eventcode is issued, which can be used to check the duration of image presentation. - The adapters that manipulate the properties of graphic objects, such as CurveTracer, ImageChanger, GraphicProperty and BackgroundColorChanger, use a list of parameters. The list was incorrectly reused if a frame was skipped at the very last frame of the scene. It is fixed now. + The GraphicProperty adapter now returns the time when new properties were applied. * Changes in 2.2.39 (Aug 27, 2023) + UTF-8 system encoding support * Changes in 2.2.38 (Jul 20, 2023) + The TTLOutput adapter can send out pulses of variable lengths with variable delays. - Minor fixes * Changes in 2.2.37 (Jun 15, 2023) + The number of parameters that can be received from TCP/IP eye trackers is increased from eight to ten. - Fixed the issue that the Success property of SingleTarget and MultiTarget was not reset when those adapters were reused in the same trial. This error was introduced in 2.2.28 (Jul 5, 2022). - Fixed a problem in using a movie as a FIX TaskObject. - Fixed an error in seeking in non-streaming movies. - Fixed a problem in replaying non-streaming movies. * Changes in 2.2.36 (May 24, 2023) + SineGrating and RandomDotMotion are now graphic adapters. + Graphic adapters can be targets of behavior tracking adapters, such as SingleTarget, MultiTarget, CurveTracer and DragAndDrop. + Graphic objects (both TaskObjects and adapters) used as targets are now turned on and off automatically, when a scene starts and ends. There is no need to display them separately. + mlplayer finds stimulus files used in adapters better. + New adpaters: RectangularRDM, RectRDM_RF_Mapper See "task\runtime v2\8 random dot motion" and "task\runtime v2\9 rdm receptive field mapper" for how to use them. - The [Save Stimuli] feature did not work when ImageGraphic/MovieGraphic was used as Target in SingleTarget/MultiTarget. This error was introduced in 2.2.28 (Jul 5, 2022) and is fixed now. * Changes in 2.2.35 (Apr 3, 2023) + The [Revert] button is added to the calibration tools so that changes can be undone without exiting the tool. + RewardScheduler can set which reward channel to trigger now. - An error that occurred when replaying GraphicContainer is fixed. - A problem that visual stimuli show up again during ITI when users manually update the subject screen is fixed. (Thanks to Kenji Koyano) * Changes in 2.2.34 (Mar 2, 2023) + The option to set the pixels per degree to that of the central one degree rather than the average across the entire screen is added. This is useful for getting more accurate stimulus size and coordinates, when the subject screen is larger than 20 degrees. https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#AdjustedPPD + A new property, AllowEarlyFix, is added to WaitThenHold, FreeThenHold and MultiTarget. Its value is true, by default. When it is false, the adapters stop as soon as the scene starts, if the XY tracker is already inside the fixation window. * Changes in 2.2.33 (Feb 8, 2023) + A new adapter, BlinkDetector, is added. - The problem that conditions files are not loaded when a file named Condition.m is in the MATLAB path is fixed. (Thanks to Peter Kaskan) - A missing property in ComplementaryWindow caused an error. It is added back. (Thanks to Kazutaka Maeda) * Changes in 2.2.32 (Jan 7, 2023) + Triggering an Arduino digital pin via goodmonkey() is supported. See alert_function.Arduino.m, regarding to how to set the arduino object. Use the 'JuiceLine' option to specify the pin, as shown below. goodmonkey(100,'juiceline','D2'); % use the D2 pin - The problem that 24-bit wav files were played incorrectly is fixed. * Changes in 2.2.31 (Sep 26, 2022) + A new TCP/IP module for ViewPoint eye trackers that does not depend on the ViewPoint Client is added. * Changes in 2.2.30 (Aug 29, 2022) + User-defined task flow control functions, such as condition selection functions, block selection functions and block change functions, can accept MLConfig as a second input argument. - Stimulus paths that begin with a backslash in the conditions file are treated as absolute paths. * Changes in 2.2.29 (Jul 29, 2022) + MJPEG support for webcam recording - Fixed a problem in decoding movies of which size is not a multiple of 16. * Changes in 2.2.28 (Jul 5, 2022) + Support for Tobii Pro eye trackers (v2.2 only) + Graphic adapters can be set as targets in many behavior analyzing adapters, including SingleTarget and MultiTarget. + A new graphic adapter, GraphicContainer, is added. This adapter can aggregate multiple graphic adapters into one. + Graphic adapters have the "Enable" property now. If there are multiple objects in an adapter, they can be selectively turned on/off with it. box = BoxGraphic(null_); box.List = { [1 0 0], [1 0 0], [2 2], [-5 0]; ... [0 0 1], [0 0 1], [2 2], [5 0] }; % two boxes in the adapter box.Enable(2) = false; % turn off the 2nd box + MultiTarget 1) A bug that MultiTarget did not stop immediately after a fixation break is fixed. 2) It has a new option ("AllowFixBreak") that allows fixation break before committing to one target. + JoyTracker & Joy2Tracker Turning on and off the joystick cursor is done with a tracker method now, in consistency with MouseTracker. joy_.showcursor(true); % show the cursor of the 1st joystick joy2_.showcursor(false); % hide the cursor of the 2nd joystick + MouseTracker For consistency with JoyTracker, now the mouse cursor is shown all the time, not just only when the MouseTracker is actually used in the scene. To control the appearance and position of the mouse cursor, use the following two tracker methods. mouse_.showcursor(false); % hide the mouse cursor from the subject mouse_.setCursorPos([xdeg ydeg]); % move the mouse cursor for the XY pos + mlplayer runs some scene framework tasks more correctly now. + Increased the number of TTLs to 16. - The error that the space key crashed the calibration tools is fixed. This bug was introduced in the previous version. - The problem that closing the IO test window with the X button terminated the task is fixed. (Thanks to lucast4 from the NIMH ML forum) - Minor fixes * Changes in 2.2.27 (Apr 23, 2022) + Changed the C++ compiler to Visual Studio 2022 + Updated the random-dot-motion receptive field (RF) mapper & grating RF mapper tasks. - A bug that creating movies from matrices crashed MATLAB at the end of a trial is fixed. This error was introduced in 2.2.24 (Jan 20, 2022). - Minor fixes * Changes in 2.2.26 (Apr 3, 2022) + Better detection of the refresh rate + Better retrieval of the sound driver info + Better time alignment of voice recording * Changes in 2.2.25 (Mar 4, 2022) + Whether to invert TTL output can be set in the I/O menu. See https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#DAQSettings + ImageChanger, BackgroundColorChanger and CurveTracer can repeat the sequence multiple times with the Repetition property now. * Changes in 2.2.24 (Jan 20, 2022) + The MP4 container (*.mp4, *.m4v) and H.264 decoding are supported. In other words, MP4 files can be used as movie stimuli. + WebcamMonitor can display the captured video on the subject screen. - A mistake in the color format conversion of the YUV2 webcam video is fixed. Now the video will look more natural. * Changes in 2.2.23 (Jan 1, 2022) + AudioSound can set the looping property to repeat sounds indefinitely. - BHV2 files created with NIMH ML 2.0 earlier than the Apr 15, 2019 version may not be readable, if you try to read them: 1) in MATLAB R2020a or later 2) with a later version of NIMH ML (e.g., v2.2) 3) on the operating system of a different language or platform (e.g., localized Windows or Linux) To fix it, type the following two lines on the MATLAB command window before reading the files. See fopen for all available encoding schemes. % change 'windows-1252' to an appropriate encoding setpref('NIMH_MonkeyLogic','DefaultEncoding','windows-1252'); setpref('NIMH_MonkeyLogic','MachineFormat','ieee-le'); - Movie files of which frame times are encoded incorrectly due to round-off errors are handled better. - convert_format() warns of overwriting exsting files. - Minor fixes & improvements * Changes in 2.2.22 (Dec 7, 2021) + Support for the lab streaming layer is implemented. + Visual stimuli can be stretched in different ratios to X & Y directions. Use a scale parameter of a two-element vector, instead of a scalar. For example, rescale_object(1, 2); % make TaskObject#1 twice larger to both directions rescale_object(1, [2 0.5]; % twice larger in width but half size in height This also works in visual stimulus adapters, such as BoxGraphic, that has the Scale property. + The limits in the number of stimulus changes and scenes that can be replayed are removed. + Loading conditions files that contain multiple movies became faster. - The photodiodetuner is disabled for NVIDIA graphics boards, since it does not seem working with them. - The error that KeyChecker does not keep the timestamps of multiple key strokes is fixed. * Changes in 2.2.21 (Nov 11, 2021) - The problem that connecting to a non-existing TCP device crashed MATLAB is fixed. - The warming-up routine is improved to be more effective in both v1 and v2 scripts. - A fliptime variability issue is resolved. (Thanks to Thomas Cherian) - Minor fixes * Changes in 2.2.20 (Oct 27, 2021) + Custom eye trackers and josticks can be connected to NIMH ML via Ethernet. https://monkeylogic.nimh.nih.gov/docs_NetworkedEyeJoy.html - A remaining software timer problem in 2.2.19 is fixed. (Thanks to curiousgeorge from the NIMH ML forum) - The error that version 2.2 still requested to install DirectX End-User Runtime on new computers is fixed. * Changes in 2.2.19 (Oct 12, 2021) - The problem that the frequency of the OS software timer does not change to 1 ms in Win10 2004 or later is fixed. * Changes in 2.2.18 (Sep 7, 2021) + Parallel ports support up to 11 digital output lines and 5 digital input lines. DO pins: 2, 3, 4, 5, 6, 7, 8, 9, 1, 14, 16, 17 (LSB -> MSB) DI pins: 15, 13, 12, 10, 11 (LSB -> MSB) - Some objects that do not provide the fieldnames method can be saved in the data files now. * Changes in 2.2.17 (Jul 26, 2021) - Loading a new task sometimes failed when another task is already loaded, due to a change introdued in 2.2.12 (Mar 16, 2021). It is fixed now. (Thanks to Pam Noble). - A problem that data files stored in the MAT format were not replayed in some cases is fixed. (Thansk to Somesh from the NIMH ML forum) - The scenes including PhotoDiode can be replayed now. (Thanks to gianni from the NIMH ML forum) - In the 2-D spatial transformation tool, the numbers indicating selected fix points show above the fix points now. * Changes in 2.2.16 (Jun 19, 2021) + The BHV2, BHVZ and H5 formats can store MATLAB's object-based data types such as string, datetime, categorical, table, etc. - The keyboard toolbox is integrated into MGL (for 2.2 only). - Previously the very first touch automatically generated mouse events so that it could be used for clicking. However, such a behavior added a burden on touch processing and made the mouse cursor move to the touch location when touch and mouse are used together. Now the mouse events are selectively generated only when they are necessary. - Some input signals were not properly received when the ITI recording option was turned on. It is fixed now. (Thanks to Bwang from the NIMH ML forum) - A problem that streaming movies are sometimes frozen when looped is fixed. (Thanks to VHohendorf from the NIMH ML forum) * Changes in 2.2.15 (Jun 1, 2021) + A new adapter, OnOffGraphic, is added. + MovieGraphic and AudioSound can change their playback position. + AnalogInputMonitor and WebcamMonitor can set the monitor position in normalized units. - A playback problem related with ComplementaryWindow is fixed. - mlplayer can search stimuli in relative paths from the datafile location. - The problem that mlhdf5 does not handle 64-bit intergers properly is fixed. (Thanks to lucast4 from the NIMH forum) - Fixed the ITI duration bug introduced in the previous release. * Changes in 2.2.14 (May 2, 2021) + Now get_analog_data() can retrieve extra eye data received via TCP/IP. - The error message for incorrectly initialized editables became clearer. - The measurement of the ITI duration became more accurate. - The problem that mlconcatenate failed to combine touch data is fixed. (Thanks to Pawel Kusmierek) - The error that occurred when invalid objects were saved in bhv2, bhvz or h5 is fixed. * Changes in 2.2.13 (Apr 8, 2021) - The serialport class of NIMH ML is renamed SerialPort to resolve a name conflict with MATLAB's new serial port object. * Changes in 2.2.12 (Mar 16, 2021) + userplot.m in the task directory is used as the user plot function, even if the file is not selected in the main menu. + A new adapter, BackgroundColorChanger, is added. - The location of the default configuration file (monkeylogic_cfg2.mat) is moved from tempdir to %LocalAppData%\NIMH_MonkeyLogic. - The problem that errors in the timing scripts were reported repeatedly even after they were fixed is resolved. - behaviorsummary works smoothly now even when the necessary directories are not added to the MATLAB path. - The placement of resizable windows became more accurate. - Improved detection of when to save settings. - rewind_movie, rewind_sound, get_movie_duration and get_sound_duration are deprecated and replaced with rewind_object and get_object_duration. * Changes in 2.2.11 (Mar 8, 2021) + mlplayer reproduces the scenes that reused the same adapters better. This improvement applys to new data files only. - A problem that mlplayer displayed undelivered reward for some data files is fixed. - A bug that typing in SubjectName just reloaded the current configuration is fixed. * Changes in 2.2.10 (Mar 1, 2021) + The F12 key blocks all hotkeys so that they may not be invoked accidently when typing outside NIMH ML. - Bug fixes and stability improvements * Changes in 2.2.8 (Feb 7, 2021) + The installation of DirectX End-User Runtime is not required anymore. + A new function, convert_format, is added. It rewrites data files from one format to another. - An error that occurred when multiple objects were created with PolygonGraphic is fixed. (Thanks to lucast4 from the NIMH ML forum) - Minor fixes and stability improvements * Changes in 2.2.7 (Jan 27, 2021) + Selected values in the signal type, I/O boards, Subsystem and Ch/Ports panels are not reset to the first value when the [Assign] button is clicked. This makes it easy to assign other signal types subsequently. + DIO lines can be configured for input or output individually, even though they are in the same port. Since it is not programmatically detectable whether an NI board supports this per-line configuration or not, it is now users' responsibility to check the compatibility of the board. Most of NI boards supports it. See the following link for the list of those devices. https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kHmdSAE&l=en-US NIMH DAQ Toolbox was capable of this from the beginning but the feature was simply blocked in the main menu, to keep compatibility with old NI boards. Misconfiguration of the DIO input/output direction can crash MATLAB. - A critical issue in the flushdata function of NIMH DAQ Toolbox is fixed. It could crash MATLAB while the new [I/O Test] window was open. * Changes in 2.2.6 (Jan 22, 2021) + All Pause menu options are reviewed so that using them may not alter the subject screen. + Now the refresh button updates screen device info as well. + When the joystick cursor is not shown to the subject, the cursor on the control screen becomes an open shape to indicate it. - Improved detection of prerequisite libraries * Changes in 2.2.5 (Jan 5, 2021) - Bug fixes and improvements in mouse functions and the MouseTracker adpater - The I/O Test window failed when the touch input was selected. It is fixed. - A problem that the background color of the subject screen became black after the I/O Test window was closed is fixed. - A bug that sometimes menuitems respond to key input instead of mouse click is fixed. * Changes in 2.2.4 (Dec 15, 2020) + Now the [I/O Test] window can be opened from the Pause menu as well as the main menu. + High Frequency and Voice are added to the [I/O Test] window. + If signal recording during ITI is selected in the main menu, a warning message is displayed while the task is paused, to indicate that data acquisition is still in progress in the background. + The GraphicProperty adapter is improved to control multiple properties better. * Changes in 2.2.3 (Nov 2, 2020) + MouseTracker (mouse_) can be linked with SingleButton now to detect mouse clicks. + High frequency DAQ can be selected even when only one NI board is available, if the board is not used for normal 1-kHz acquisition. + The labels of error codes used for trialerror() can be replaced with user- defined labels. See the manual page of trialerror(). - An error that the Sequential adapter updated the first flip time of the scene incorrectly from the second child chain is fixed. (Thanks to RN8JR from the NIMH ML forum) - A problem that sound looping did not work in some cases is now fixed. * Changes in 2.2.2 (Oct 8, 2020) + The stability of sound playback in WASAPI Exclusive is improved. + A button for reloading the device list is added to the I/O submenu and the Other device settings menu. There is no need to restart NIMH ML when new hardware is plugged. - The timestamp inserted in the formatted filename is determined when the run button is clicked. (Thanks to RN8JR from the NIMH ML forum) - A problem that the photodiode tuning tool saves an incorrect threshold value is fixed. (Thanks to suzukit from the NIMH ML forum) * Changes in 2.2.1 (Aug 28, 2020) + Codes for old MATLAB versions and 32-bit libraries are removed for better performance. + Visual feedback is automatically disabled when touching the screen. + The minimum buffer size (3 ms or less) is supported in WASAPI Shared mode for low audio latency. + The control screen is resizable while the task is paused. This is useful for large monitors. mlplayer and calibration tools are also resizable now. * Changes in NIMH MonkeyLogic 2 (Aug 25, 2020) + The IO Test screen is movable now. - An error that AI Sample Rate could not be set to 100 Hz is fixed. (Thanks to lucast4 from the NIMH ML forum) * Changes in NIMH MonkeyLogic 2 (Aug 17, 2020) + AudioSound, ImageChanger, ImageGraphic, MovieGraphic and Stimulator take functions (char arrays that contains a function name and its arguments) as input, instead of numeric matrices that those functions produce. This will help with the reduction of the datafile size. + Animated GIFs can be used as movie sources now. - A bug in the z-order function is fixed. * Changes in NIMH MonkeyLogic 2 (Aug 5, 2020) + A new file format that supports zip compression, BHVZ. + The window size of mlplayer is adjustable now. * Changes in NIMH MonkeyLogic 2 (Jul 21, 2020) + The DragAndDrop adapter now supports multiple drop locations. - Bug fix in XAudio sound playback * Changes in NIMH MonkeyLogic 2 (Jul 7, 2020) + MGL can change the z-order of graphic objects with the "zorder" property. An object with a zero z-order is shown in the back and the one with a higher z-order is presented in front of others that have lower z-order numbers. If the z-order of two objects are the same, the one created earlier is drawn on top of the other. The z-order of TaskObjects or graphic adapters can be changed as below. TaskObject(3).Zorder = 1; % change the z-order of TaskObject#3 TaskObject.Zorder(3) = 1; % the same as above line box = BoxGraphic(null_); box.Zorder = 1; % all graphic adapters have the Zorder property now. box.Zorder(2) = 1; % in case there are multiple objects in one adapter. + A new adapter, PropertyMonitor, is added. * Changes in NIMH MonkeyLogic 2 (Jun 15, 2020) + Bug fixes and stability patches for audio engine control * Changes in NIMH MonkeyLogic 2 (May 25, 2020) + Support for minimum latency sound playback via WASAPI (Windows Audio Session API) Shared & Exclusive modes. - Minor fixes * Changes in NIMH MonkeyLogic 2 (Apr 9, 2020) + Support for low-latency voice recording via Windows Audio Session API (WASAPI) exclusive mode. - Fixed a bug that crashed MATLAB R2020a when the properties of analoginput and analogoutput objects are dumped in the command window. - Fixed an error that occurred when trying to read non-existing variables from *.mat data files. (Thanks to aboharbf from the NIMH ML forum) - A typo in the userloop example and manual is fixed. (Thanks to Rom from the NIMH ML forum) * Changes in NIMH MonkeyLogic 2 (Mar 16, 2020) + You can adjust the transparency of overlaid webcam videos in mlplayer. - mlsetpath introduced in Feb 3, 2020 did not process relative paths correctly and therefore caused an error when reading stimuli sometimes. It is fixed now. - If 'clear all' was executed while the NIMH ML main windows was open and then a task was started right away, eye tracers were not displayed. It is fixed. (Thanks to Carlos Ponce) * Changes in NIMH MonkeyLogic 2 (Mar 9, 2020) + When more than one NI board is installed, one of them can be run at an arbitrary sample rate (possibly faster than 1 kHz). Choose the device to run fast in the Other device settings and assign the channels to "High Frequency" in the I/O menu. To read "High Frequency" signals from the data file, use the mlreadsignal function. + Voice recording also produces large data and sometimes causes an out-of-memory error when loaded all at once. To prevent it, now the signal is stored as a separate variable, not in AnalogData.Voice, and should be read with the mlreadsignal function. + The mlreadwebcam function is integrated into mlreadsignal. - mglpngwrite is rewritten to process double-type image matrices correctly. (Thanks to Camillo Padoa-Schioppa) - The problem that the last two versions did not detect stimulus files with an uppercase extension is fixed. (Thanks to Carlos Ponce) - The photodiode tuner can handle signal input with reversed polarity now. (Thanks to Mitch and RN8JR from the NIMH ML forum) - In some tasks written with the scene framework, a trial was not correctly replayed by mlplayer from the second run. It is fixed now. * Changes in NIMH MonkeyLogic 2 (Feb 10, 2020) + A new adapter, ImageStabilizer, is added. - An output property, RT (reaction or response time), is added to WaitThenHold, FreeThenHold, OnsetDetector and MultiTarget. - A problem that graphic adapters combined with Sequential are turned off one frame early at the end of a scene is fixed. * Changes in NIMH MonkeyLogic 2 (Feb 3, 2020) + Now NIMH ML searches for stimulus files through a pre-determined path list so that the files may be stored anywhere in the disk. The path list can be managed in the "Set path" menu. The order of paths searched is as below. 1) The given path of the file, if the filename is a full-path string 2) Task directory, where the conditions file or userloop file exists 3) NIMH ML installation path 4) From the top of the search path list - When to pop up the [Save settings] dialog is determined more accurately. * Changes in NIMH MonkeyLogic 2 (Jan 23, 2020) + Now webcam videos can be compressed and added to the data file. You can attach previously exported video files back to the data file as well with the mlimportwebcam function. + mlplay processes webcam data much faster now. + New WebcamMonitor adapter. This adapter can slow down the whole operation of NIMH ML significantly, if the image size is large. - When a movie is created from a MATLAB matrix, the time unit of the frame rate is supposed to be milliseconds, but internally it was treated as seconds. It is fixed now. - MGL did not draw graphic objects of the same color as the default color key ([255 128 0]). It is fixed now and the default color key is changed to [30 31 32]. * Changes in NIMH MonkeyLogic 2 (Dec 27, 2019) - Fixed a bug in the error logic that "repeat delayed" put a newly selected condition back to the queue, instead of the previous error condition. (Thanks to Ben Basile) - The problem that DAQ settings are not loaded properly when switching from a conditions-file-based task to a userloop-based task is fixed. + Webcam data can be exported as AVI or MP4 (R2012a or later), instead of being stored in BHV2, which will decrease the size of the main data file. To extract webcam data from existing data files, you can use the mlexportwebcam function. + mlplayer exports video as MP4 if it is supported (R2012a or later). + The new photodiode tuner and its manual page are added. + Support for Blackrock LED driver * Changes in NIMH MonkeyLogic 2 (Nov 18, 2019) + SND and STM objects stop when turned off explicitly by toggleobject. Also STM resets the output to 0. Both objects can be reused multiple times during a trial. They first should be explicitly turned off by toggleobject (although the stimuli already ended). Then SND has to be rewound by the rewind_sound function before toggled on. For STM, the retriggerable flag has to be set in the conditions file. - The problem that values of editables are reset when the Latency test or the I/O test is executed is fixed. * Changes in NIMH MonkeyLogic 2 (Nov 8, 2019) + A new adapter, AnalogInputMonitor, is added for online analog input monitoring. + During the I/O Test, the voltage range of each General Input in the display can be adjusted. To change the range, click one General Input panel and then click the current max/min voltage shown on the right side of the panel. Use the arrow cursor keys to increase/decrease the value. + Voice recording is available from the Non-DAQ device settings. This feature does not use hardware acceleration yet so there can be a few hundred millisecond delay. - A problem that ImageChanger did not handle multiple MGL IDs properly (since build 187) is fixed. - A mistyped variable name in bhv2mat.m is fixed. (Thanks to aboharbf from the ML forum) - The way of converting old config files (*_cfg2.mat) is improved. (Thanks to kms from the ML forum) * Changes in NIMH MonkeyLogic 2 (Oct 4, 2019) + Now double/logical variables with 6 or less elements can be editable. - Two errors in mltaskobject.m due to mistyped object and property names are fixed. (Thanks to aboharbf from the ML forum) - An error that occurred when the userloop returned the timing filename as a cell scalar is fixed. (Thanks to Soo Hyun Park) * Changes in NIMH MonkeyLogic 2 (Sep 12, 2019) - A different method to process window move events is implemented, to avoid the 'JavaFrame figure property' warning in R2019b or later. * Changes in NIMH MonkeyLogic 2 (Aug 19, 2019) + Now the scale and angle of graphic TaskObjects can be manipulated. See the manual of rescale_object() and rotate_object(). + A range-type editable is available. You can use a slider control to adjust a value. * Changes in NIMH MonkeyLogic 2 (Aug 6, 2019) + Digital input, like buttons, is also sampled at 1kHz and recorded to the data file during tasks written in timing script v1. This has been already supported in timing script v2. + A new adapter, Sequential, is added. See the manual for details. - Fixed the problem that properties of newly-created graphic adapters are not applied in some cases. - Fixed the problem that eventmakers set by one adapter may be deleted by another before being sent out. * Changes in NIMH MonkeyLogic 2 (Jul 31, 2019) + A problem that ML crashes on some non-English versions of Windows is fixed. + All graphic functions and GUIs are rewritten for faster performance in recent versions of MATLAB. + Now all graphic adapters supports multiple object creation via the List property and you can adjust properties of each object independently. Please see the function manual for details. box = BoxGraphic(null_); % edgecolor, facecolor, size, position, scale, angle box.List = { [0 0 1], [1 0 0], [2 2], [-5 0], 1, 0; [0 1 0], [0 0 1], [1 1], [5 0], 2, 45 }; box.Position(2,:) = [5 5]; % move the 2nd object to a new location box.Angle(1) = 45; % rotate the 1st object by 45 degrees + All graphic adapters, including TextGraphic, ImageGraphic and MovieGraphic, have new properties, Scale and Angle, which controls the size and rotation of the graphic object(s). + SingleTarget is updated to respond more sensitively to touch input. + MultiTarget can use a different Threshold for each target now. + Task flow control options in the Task menu are disabled when a userloop function is loaded, to indicate that those options are not used with the userloop. + You can abort the task immediately in the userloop by assigning -1 to TrialRecord.NextBlock. + mp3 can be used for sound stimuli (R2012b or later). + STM objects can be created from WAV files. + mlplayer remembers directories previously searched for stimuli and custom adapters. - In the alert_function, 'task_end' doesn't occur after 'task_aborted' anymore. * Changes in NIMH MonkeyLogic 2 (Jun 7, 2019) + A new adapter, DragAndDrop. See the "task\runtime v2\22 drag and drop" task for an example. - Now the conditions file allows using decimals that are not 0-prefixed, like [.4 .4 .4]. (Thanks to Arjun Ramakrishnan) - Fixed that Stimulator reset analogoutput after the WaveformNumber was changed. (Thanks to Daniel Hahnke) - Fixed that CircleGraphic drew boxes, instead of circles, when parameters were given as List. - Audio routines in MGL are rewritten. - Fixed a broken chain in the AudioSound adapter - Fixed that SND TaskObjects were played at the beginning of the first trial. * Changes in NIMH MonkeyLogic 2 (May 21, 2019) + TCP/IP support for ISCAN DQW software (ver. 1.21E or later) * Changes in NIMH MonkeyLogic 2 (May 9, 2019) + MATLAB is slow at the very first run. A warming-up procedure is reintroduced to improve the performance in the first trial. + The TaskObject type, MOV, provides an option to loop the movie when the end is reached. mov(filename, Xdeg, Ydeg, looping) + Now there is an explicit way to play movies like the original ML. gen(moviefile,0,0) % in the conditions file function [imdata,info] = moviefile(TrialRecord,MLConfig) % gen script imdata = 'moviefile.avi'; info.FrameByFrame = 1; end + The Frequency column of the conditions file can be 0. - Minor fixes * Changes in NIMH MonkeyLogic 2 (Apr 15, 2019) + During the eye/joystick calibration, some UI control remained focused and responded to key input undesirably. This has been a known problem, but there is no effective way to prevent this, because MATLAB figures are not native windows and there are some limits in controlling them. As an alternative solution, a UI lock button is added so that the UI controls can be disabled when they are not needed. + In the 2-D spatial transformation calibration, the fixation point stayed on the screen once presented, unless the reward method was "On Fixation". Now it can be turned off anytime by pressing the 'B' key. - The problem that the stimulus preview failed when a GEN function returned a movie without the alpha channel is fixed. (Thanks to Keith Purpura) * Changes in NIMH MonkeyLogic 2 (Apr 8, 2019) - A typo in the ImageGraphic adapter is fixed. Line 60 of ImageGraphic.m from : case {'double','unit8'} to : case {'double','uint8'} - When BHV2 files were read on the Unix or Mac platform, an error occurred sometimes due to the character encoding difference. It is fixed now. (Thanks to Peter Schade) * Changes in NIMH MonkeyLogic 2 (Apr 1, 2019) + mlplayer is improved to correctly replay data files produced by recent ML versions. (Thanks to Daniel Hahnke) + Now you can choose which eye (or joystick) between #1 and #2 you want to import previous calibration from. * Changes in NIMH MonkeyLogic 2 (Mar 23, 2019) + An error that occurred when the touch trace was displayed is fixed. * Changes in NIMH MonkeyLogic 2 (Mar 20, 2019) + Now a logical (true or false) can be an editable variable. Also a new editable type, '-category', is added. A category-type variable must be a cell char array of which the last element indicates the selected item. var1 = true; var2 = {'Red', 'Green', 'Blue', 'Blue'}; % var2{end} is the chosen item editable('var1', '-category', 'var2'); - An issue of the Stimulator adapter that the waveform is transposed incorrectly when it is n-by-n is fixed. + The Stimulator adapter can send out multiple waveforms in a trial. To do this, provide waveform data in a cell array and set the waveform number before each run_scene call. stim = Stimulator(null_); stim.Channel = [1 2]; stim.Waveform = {repmat([1 0.5; 0 0],5,1) [0.1 0.2 0.3 0.4 0.5 0; 0.5 0.4 0.3 0.2 0.1 0]'}; stim.Frequency = 100; stim.WaveformNumber = 1; % waveform #1 scene = create_scene(stim); run_scene(scene); % The scene ends when the stimulation is done stim.WaveformNumber = 2; % waveform #2 run_scene(scene); % Do not create the Stimulator object twice * Changes in NIMH MonkeyLogic 2 (Mar 15, 2019) + SineGrating can be shown in different colors and with different windows. See the 'task\runtime v2\19 gabor patch' task. * Changes in NIMH MonkeyLogic 2 (Mar 7, 2019) + Support for the second eye input. Binocular signals or two eye trackers can be connected. For TCP/IP eyetrackers, only binocular input can be used. A new runtime functions, eye2_position(), is added. get_analog_data() also works for the 2nd eye. gen_analog_data('eye2',1000); eyejoytrack() can monitor the 2nd eye with 'acquirefix2' and 'holdfix2'. For the scene framework, a new tracker, eye2_, is added. In the simulation mode, the 2nd eye is emulated with the following keys: 'J' (left), 'L' (right), 'I' (up), 'K' (down). - Fixes for EyeLink and the 2nd joystick - Fixed for ImageGraphic & MovieGraphic * Changes in NIMH MonkeyLogic 2 (Feb 28, 2019) + Update for digitalio of NIMH DAQ Toolbox. Improved detection for SUNIX PCI parallel port cards - Update for analoginput of NIMH DAQ Toolbox. - Revision of the adapter inheritance hierarchy and minor fixes - Broken TCP/IP eyetracker UIs since Feb 18, 2019 are fixed. * Changes in NIMH MonkeyLogic 2 (Feb 25, 2019) + Now sound streaming is supported. Any wav file that is longer than 10 sec will be played in the streaming mode. + The AudioSound adapter can accept an MGL ID of a created sound object. * Changes in NIMH MonkeyLogic 2 (Feb 21, 2019) - If a movie was not rewinded quickly within a frame interval (typically due to its large size), the rewind call was repeated endlessly and made MATLAB unresponsive. It is fixed now. + The MovieGraphic adapter can determine whether to repeat the movie when the end is reached. * Changes in NIMH MonkeyLogic 2 (Feb 18, 2019) + Now reward devices can be triggered wirelessly via Bluetooth. For how to make a wireless TTL generator and set it up with ML, see the 'doc\Bluetooth' directory. + The condition-selection- and block-selection routines are rewritten. If the condition selection function returns -1, the current block ends and a new block begins. If the block selection function or block change function returns -1, the task ends. + Error handling is improved so that the 'trial_end', 'block_end' and 'task_end' hooks of the alert_function are called before exit, if 'task_start', 'block_start' and 'trial_start' have called. * Changes in NIMH MonkeyLogic 2 (Jan 14, 2019) - A problem that sound stimuli sometimes crash MATLAB is fixed. (Thanks to Jack_23 from the ML forum) * Changes in NIMH MonkeyLogic 2 (Jan 7, 2019) + Multi-touch is now supported. Touch input is not acquired through the mouse any more and there are some related-changes made. Users can activate touch input and set the number of touches to simultaneously track (up to 10) in the Non-DAQ device settings menu. In the data file, the touch data is now stored under the Touch field of the AnalogData structure, not under the Mouse field. As more touches are tracked, more columns are added to the Touch data field, like the following. [x1 y1 x2 y2 x3 y3 ...]; % AnalogData.Touch Two timing script functions, touch_position() & istouching(), are added. Touch input can be tested in the IO Test menu. Mouse input is still supported (in the scene framework only) for those adapters that require mouse and keyboard controls, such as Grating_RF_Mapper or RDM_RF_Mapper. You should use the mouse tracker (mouse_) for them, instead of the touch tracker (touch_). mouse_ is available, when the "Mouse / Key" option is checked in the Non-DAQ devices menu. + Users can choose how many USB joystick buttons to record to the data file. + In case that the userplot function is set, the control screen window spares larger space for the user plot. - The problem that BHV2 takes more time to save is fixed. (Thanks to pschade from the ML forum) - When the error logic was 'repeat delayed' and the last trial in a block was failed, the trial was not repeated correctly. It is fixed now. * Changes in NIMH MonkeyLogic 2 (Dec 21, 2018) + Support for time-stamped video capture from webcams. I don't have many webcams to test with, so some cams may not work yet. Captured video can be played and exported with mlplayer, or directly read from the data file. + Support for the second joystick. You can use either 1) two analog joysticks, 2) two USB joysticks or 3) one USB joystick + one analog joystick. Two new runtime functions, joystick2_position() and showcursor2(), are added for the 2nd joystick. get_analog_data() also works with the 2nd joystick. gen_analog_data('joystick2',1000); % or 'joy2' eyejoytrack() can monitor the 2nd joystick with 'acquiretarget2' and 'holdtarget2'. For the scene framework, a new tracker, joy2_, is added. In the simulation mode, the 2nd joystick is emulated with the following keys: 'A' (left), 'D' (right), 'W' (up), 'S' (down). * Changes in NIMH MonkeyLogic 2 (Nov 30, 2018) + The vertical direction of the USB joystick is inverted so that the cursor moves up and down to the direction of the handle without calibration. + USB joysticks work in the I/O test now. Also their device names are displayed correctly on the menu. + The reading speed of BHV2 is significantly improved (for new files). + All modal dialogs can be closed with the ESC key now. * Changes in NIMH MonkeyLogic 2 (Oct 15, 2018) + The inheritance structure of adapters is revised so that the adapters can be grouped easily according to their types. + The timing script function manual is revised for new contents and error corrections. + The parallel port is enabled in the DAQ toolbox. If you have a parallel port, you may be asked to install the driver. The installer is in the daqtoolbox directory. * Changes in NIMH MonkeyLogic 2 (Oct 4, 2018) + New adapters: TriggerTimer + The timing script function manual is updated for all recently added adapters. * Changes in NIMH MonkeyLogic 2 (Oct 1, 2018) + New adapters: Concurrent, ImageGraphic, MovieGraphic, AudioSound, Stimulator, TTLOutput + Presentation of stimuli created by adapters can be triggered later by another adapter. + Graphic adapters can present multiple objects from one adapter. - A problem related with the initialization of AndAdapter and OrAdapter is fixed. (Thanks to yzeyang from the ML forum) * Changes in NIMH MonkeyLogic 2 (Sep 28, 2018) - The new adapters, SineGrating & ImageChanger, are added. - Minor fixes * Changes in NIMH MonkeyLogic 2 (Sep 14, 2018) - The editable window is scrollable now, when there are many (>20) variables. - The WaitThenHold and FreeThenHold adapters are modified to be friendly with multiple tracking sources aggregated with AndAdapter or OrAdapter. * Changes in NIMH MonkeyLogic 2 (Sep 10, 2018) - The 'Fallback screen rect.' menu now accepts negative numbers. - Now there are two options how to handle the skipped frames. TrialRecord.DiscardSkippedFrames = true; % default value When TrialRecord.DiscardSkippedFrames is true, ML will discard the frames of which presentation times are passed by and the next frame number will be recalculated from the current trial time. In this way, movies can keep up with the elapse of the time, regardless of the occurrence of skipped frames, but you may not be able to track which frame is presented at what time. If TrialRecord.DiscardSkippedFrames is false, every single frame of a movie is presented in due order, even if ML misses the right presentation timing. You must set TrialRecord.DiscardSkippedFrames false, if you need to know which frame is presented when. - The SkippedFrameTimeInfo is modified to have more intuitive meanings. SkippedFrameTimeInfo(:,1) - trialtime that the frame was supposed to be presented SkippedFrameTimeInfo(:,2) - trialtime that the frame was actually presented SkippedFrameTimeInfo(:,3) - The number of frames skipped SkippedFrameTimeInfo(:,4) - Frame length (msec) SkippedFrameTimeInfo(:,5:end) - Additional time information * Changes in NIMH MonkeyLogic 2 (Aug 21, 2018) + A new example task, grating receptive field mapper, is added. (See the task\runtime v2\15 grating receptive field mapper directory.) * Changes in NIMH MonkeyLogic 2 (Aug 10, 2018) + A new example task, preferential viewing, and new adapters are added. (See the task\runtime v2\14 preferential viewing directory.) * Changes in NIMH MonkeyLogic 2 (Aug 2, 2018) - A problem with USB joystick buttons is fixed. - The initial state of showcursor() is fixed correctly. * Changes in NIMH MonkeyLogic 2 (Jul 27, 2018) - When the ITI recording option is chosen, the AbsoluteTrialStartTime is supposed to be the beginning of the ITI. However, a change that was made in Feb 16, 2018 reverted it to the beginning of the trial, while the analog data still included the samples acquired during the ITI. This made it difficult to find data positions corresponding to event times (you need to concatenate the analog data of all trials and cut it again based on the AbsoluteTrialStartTime). This error is fixed. (Thanks to Danial Hahnke) + Now TimingFileByCond is stored in the data file. [data,MLConfig,TrialRecord] = mlread; TrialRecord.TaskInfo.TimingFileByCond * Changes in NIMH MonkeyLogic 2 (Jul 20, 2018) + The z-order of the subject screen is adjusted so that the subject screen can cover the whole screen when NIMH ML is run with only one monitor. - An error related to resizing gray images is fixed. (Thanks to Peter Schade) * Changes in NIMH MonkeyLogic 2 (Jul 17, 2018) + A new adapter, FrameMarker, is added. Users can send out eventcode(s) with it, when a certain number of frames is presented. fm = FrameMarker(null_); fm.FrameEvent = [10 2]; % 2 when the 10th frame is presented * Changes in NIMH MonkeyLogic 2 (Jul 5, 2018) + A new timing script function, set_bgcolor(), is added. Unlike idle(), this function changes the background color of the subject screen permanently. To show the change, a screen update command (toggleobject, eyejoytrack, idle or run_scene) should be followed. set_bgcolor([1 0 0]); % change the background color to red idle(1000); % present the screen for one second set_bgcolor([]); % change it back to the original color idle(0); % present the screen * Changes in NIMH MonkeyLogic 2 (Jun 25, 2018) + TaskObject can be indexed with "end" now. + A minor change in the initialization routine to improve the toggleobject performance for the very first frame of the first trial. * Changes in NIMH MonkeyLogic 2 (Jun 20, 2018) + Users can add a custom function, to manipulate the calibration. For example, you can make the cursor move to a particular direction only. See the example in the task\runtime 1\8 customized calibration directory. + bhv2mat, a function that converts BHV2 files to the MAT format, is added. - The filename format should be ignored, when a data file name is manually typed, but that was not the case. It is fixed now. - "Strobe Bit" is not necessary in the "send and clear" mode. (Thanks to Daniel Hahnke) * Changes in NIMH MonkeyLogic 2 (Jun 5, 2018) - The problem that run_scene does not trigger TTL objects is fixed. (Thanks to Daniel Hahnke) - Minor corrections in the manuals * Changes in NIMH MonkeyLogic 2 (May 21, 2018) + The manuals entirely re-written for NIMH ML (HTML & PDF) are included in the distribution packages. The HTML files explain the usage of TaskObject in the conditions file and the syntax of runtime functions and adapters. They can be brought up from the main menu with a button click. The PDF file covers all other topics of NIMH ML in general (see the doc directory). + When the block switched manually and the error logic was "repeat immediately", a new condition was not selected from the new block until the current trial was correctly finished. This is fixed now. (Thanks to Herrick) + bhv_variable can take multiple name/value pairs. bhv_variable('name1', value1, 'name2', value2, ...); + The idle command can send out eventcode(s) to notice external devices the timing of the background color change. idle(1000, [1 0 0], 10); % red screen for 1 sec, marked with 10 idle(1000, [], 10); % mark the code in sync with the next frame % the color change is not necessary + The FrameCounter adapter used to run for N+1 frames. The one additional frame was necessary to turn off stimuli. This behavior is changed. Now the FrameCounter runs exactly N frames and finishes the scene without turning off the stimuli. Actually the stimuli are off at the end of the scene but the last (N+1) frame in which they are removed is not presented, to give users a chance to start a new scene without a gap. Users need to call the idle command (the duration can be 0) to turn off the stimuli (by present a blank screen), if they don't need to run another scene after a FrameCounter scene. - AndAdapter, OrAdapter and NotAdapter are modified, to make them act as described in the manual. * Changes in NIMH MonkeyLogic 2 (May 14, 2018) - A memory leak problem of the movie object is fixed. * Changes in NIMH MonkeyLogic 2 (May 9, 2018) + NIMH ML can create movies from a set of image files or from frame data generated from scripts. This is not a new feature, but there was a bug that prevented it from working. A new example task is added to show how this works. See the "task\runtime v1\6 sine grating" directory. + The GEN script can take a second argument, MLConfig, now. * Changes in NIMH MonkeyLogic 2 (May 3, 2018) + Now users can determine the origin of the forced eye drift correction ("C" key), which previously occurred to the center of the visual space ([0 0]) only. To change the origin, define a hotkey like the following in the timing script. If the coordinates are not provided, the position of the currently presented visual stimulus (the one closest to the current eye position) will be used as the origin. hotkey('c', 'forced_eye_drift_correction([x y]);'); % x & y in visual angles hotkey('c', 'forced_eye_drift_correction;'); % to current visual stimulus hotkey('c', 'forced_eye_drift_correction([0 0]);'); % default setup In the calibration tools, the origin of the correction is alway [0 0]. + New example tasks & minor fixes - The time during which the message loop is called is adjusted, to fix a problem that touch is not smoothly detected under a certain condition. * Changes in NIMH MonkeyLogic 2 (Apr 26, 2018) + eyejoytrack has new options, 'acquirefunc' and 'holdfunc', which allow eyejoytrack to use an arbitrary function as a source of a tracking signal. eyejoytrack('acquirefunc', @function_handle, function_args, duration); eyejoytrack('holdfunc', @function_handle, function_args, duration); The function should return a logical scalar ('holdfunc') or a logical vector ('acquirefunc'). The 'acquirefunc' option makes eyejoytrack end when the function output changes from false to true and the 'holdfunc' option, from true to false. - Registering different editable variables from multiple timing scripts works fine now. * Changes in NIMH MonkeyLogic 2 (Apr 23, 2018) + The photodiode tuning tool is improved to use the falling edges as well to determine the tuning state. + When reading a BHV2 file fails, mlbhv2 shows a warning, instead of an error, and returns the data that is read until the problem occurs. + The Origin & Gain calibration method displays the counts of attempted trials and acquired fixation on the screen now. * Changes in NIMH MonkeyLogic 2 (Apr 16, 2018) + A tool for tuning screen presentation timing is included. Users can use this tool to minimize the latency from the screen flip command to the photo detector response. It is required to turn on the photodiode trigger and assign the photodiode signal to an analog input channel, to use this tool. * Changes in NIMH MonkeyLogic 2 (Apr 10, 2018) + Auto drift correction can be adjusted in the pause menu now. - When multiple eventcodes were sent as a vector, some digital bits in higher digits were not reset properly after the first code. So, if the next code in the vector was smaller than the preceding one, an incorrect code could be stamped. It is fixed now. - An error that occurred in some DAQ board models while setting a default input/output voltage range is fixed. (Thanks to Keith Purpura) - A problem that, when reading the H5 format file, the types of some variables were not set back to their original types is fixed. (Thanks to Daniel Amaya) - The timing of screen flips is adjusted so that it becomes closer to the time of the eventcode stamped together. (Thanks to Carlos Ponce) * Changes in NIMH MonkeyLogic 2 (Mar 28, 2018) - Multi-selection in the "Blocks to run" dialog did not work when there were only two blocks. It is fixed. (Thanks to Keith Purpura) - When the "First block to run" was manually selected, the selected block was not removed from the available block pool and therefore was run twice during the first round. It is fixed. (Thanks to Keith Purpura) * Changes in NIMH MonkeyLogic 2 (Mar 26, 2018) + The GUI button that opened the runtime folder was replaced with the 'Save stimuli' button in Mar 19, 2018. To open the runtime file, double-click the name of the timing script in the list from now on. If the runtime file is not created yet, it will just open the runtime folder, which is Windows's temp directory. - A problem that the auto eye drift correction fails under a certain condition in which 'holdfix' is concurrently used with other tracking methods in eyejoytrack() is fixed. (Thanks to Wing from the ML forum) - It seems that buttons didn't work when the threshold was empty ('[]') in the eyejoytrack(). That shouldn't be the case, so it is fixed. An empty threshold resets the previously used threshold to the default value. (3 for analog buttons and 0.5 for digital buttons) * Changes in NIMH MonkeyLogic 2 (Mar 23, 2018) - When eyejoytrack was called with the 'releasetarget' option (touch input), tracking didn't stop upon an early release of the touch. It is fixed. (Thanks to Simon Nougaret) * Changes in NIMH MonkeyLogic 2 (Mar 22, 2018) + A new tracking option, '~touchtarget' is added to eyejoytrack(). This option allows you to monitor whether touch is placed outside the target window. ontarget = eyejoytrack('touchtarget',1,3,'~touchtarget',1,3,5000); % ontarget will be [1 0], if the subject touches the target, or [0 1], if % the subject touches outside the target. - An error occurred during stimuli saving, when there was no TaskObject or only one created from file sources. Plus, mlexportstim was not included in the app package. All are fixed. * Changes in NIMH MonkeyLogic 2 (Mar 19, 2018) + Now stimulus files used in the task can be saved within the data file. NIMH ML does not save all the files defined in the conditions file but the ones actually used in the task. mlexportstim, a function that extracts saved stimuli from a data file, is added to the package. * Changes in NIMH MonkeyLogic 2 (Mar 15, 2018) - The "I/O Test" couldn't be run, if ML was installed with the zip file and the "I/O test" was the first test you ran after starting ML. It works now. - In the mlplayer, unused non-visual objects were displayed from Time 0. It is fixed. + You can use the full path in the conditions file, to indicate the location of TaskObject items. (Thanks to pschade from ML forum) * Changes in NIMH MonkeyLogic 2 (Mar 8, 2018) - The update in Feb 23, 2018 made CurrentTrialWithinBlock start from 0. It is fixed. - Users can stop the eventmarker 13 from being stamped for skipped frames, if it is not necessary. TrialRecord.MarkSkippedFrames = false; % true, by default. * Changes in NIMH MonkeyLogic 2 (Feb 27, 2018) + Touchscreen support on Windows 10 is improved. Now touchscreens that use Windows 10's native driver should work fine. Since this requires to process Windows messages, the "Run Message Loop" must be activated always and therefore is removed from the menu. In addition, the "press and hold" is disabled programmatically, so users do not need to disable it manually. Reading existing configuration files with this version (or later) may generate a warning, due to the removal of the "Run Message Loop" menu, but it will disappear once the configuration is saved in the new format. - Fixed a bug that the SingleTarget adapter does not report the window-cross time correctly when the subject is already fixating on the target and therefore messes up the eye drift correction mechanism. * Changes in NIMH MonkeyLogic 2 (Feb 23, 2018) + Previously syntax errors in the timing script produced just warnings so the task proceeded incorrectly with an empty runtime. Now it stops the task with an appropriate error message so that users can correct it. - When BlockChangeFunction and BlockSelectionFunction are identical, the value that the BlockChangeFunction returns indicates the next block. Previously ML tried to set the next block even when this number was 0 and caused an error. Now the problem is fixed. (Thanks to Peter Lauro) * Changes in NIMH MonkeyLogic 2 (Feb 16, 2018) + When the 'task_aborted' hook is called in the alert function, the 'task_end' hook is called as well subsequently. - An error that NIMH DAQ Toolbox falls into an infinite loop in some systems and crashes MATLAB with a stack overflow is fixed. - In the 2-D Spatial Transformation method, only pre-selected fixation points (i.e., those that have a number behind) are clickable and can be presented to subjects now. This prevents some user errors. - minor fixes * Changes in NIMH MonkeyLogic 2 (Jan 29, 2018) + New adapters, TextGraphic and CurveTracer, are added. + A new example task, task\runtime v2\curve trace, is added. * Changes in NIMH MonkeyLogic 2 (Jan 25, 2018) - A memory leak that occurred when the SND objects were created from vectors, not from files, is fixed. * Changes in NIMH MonkeyLogic 2 (Jan 23, 2018) - The data file recorded with SmoothPursuit is replayable now. * Changes in NIMH MonkeyLogic 2 (Jan 19, 2018) - A problem that EyeLink DLLs are not loaded when mlplayer is called before monkeylogic is fixed. * Changes in NIMH MonkeyLogic 2 (Jan 17, 2018) + New adapters, FreeThenHold & SmoothPursuit, are added. + A new example task, task\runtime v2\pursuit eye movement, is added. - A problem in the eye auto drift correction of trialholder_v2 is fixed. * Changes in NIMH MonkeyLogic 2 (Jan 8, 2018) - The problem that trialholder_v2 shows an error ("Index exceeds Matrix dimensions. (mlaq.get.Button, Line 273)") when buttons are defined is fixed. (Thanks to aboharbf from ML forum) - An error that occurred when reading bitmap images with paletted colors is fixed. - A problem that movie playback stops when there is a missing frame in the video is fixed. * Changes in NIMH MonkeyLogic 2 (Jan 4, 2018) + ML2 can record signals during inter-trial intervals now. A new checkbox option to activate this feature is added on the main menu. Extra analog samples acquired during ITI will be added to the beginning of the next trial's data segment. Also all the events of the next trial will be timed from the ITI start, as if the trial is delayed by the ITI. The AISampleRate will be fixed to 1000 Hz, when this option is turned on. + A new function, mlconcatenate, is added to read analog data as one long seamless array across all trials. This function also converts the timestamps of all events to absolute trial time measured from the task start. To read data files with mlconcatenate, the sample rate of the data must be 1000 Hz. ML2 uses the CPU clock to time events, while analog signals are digitized based on the NI board's clock. Typically there is a few nanosecond difference between those clocks, which results in a missing/extra sample every few minutes. To avoid this temporal error being accumulated, mlconcatenate takes the CPU clock as a base and fills the missing NI samples with the ones immediately preceding or discards the extra NI samples. If you are using a signal processing system, like Plexon or TDT, it is recommended to feed all your signals to the system and let them recorded there so that all samples are digitized based on the same clock. + NIMH daqtoolbox provides a couple of new methods to improve timing accuracy. For example, flushdata() is a function that removes previously collected samples. ML2 uses this function to mark the location of the very first recorded sample, by calling it when the trial clock starts. When multiple adapters are used, however, there is an inevitable time gap between flushing the first adapter and the last one, which can be longer than 1 ms if there are too many samples to delete or just because MATLAB is too slow. To reduce this gap, I added flushmarker(), a function that quickly scans adapters and just marks the positions to flush without removing samples yet. Since the function does not perform the time-consuming part itself, it can return within a millisecond even when it is called for the first time. Then, actual sample removal can be performed later by flushdata(), when the time accuracy is not critical. % old way start(DAQ); flushdata(DAQ); timestamp = toc(global_timer); % You want this timestamp to be close to the % moment of flushing the first adapter in DAQ % new way start(DAQ); flushmarker(DAQ); % flushmarker() is faster so the gap with the timestamp = toc(global_timer); % timestamp is much shorter. flushdata(DAQ); % Old samples collected before flushmarker() % are flushed here. - The problem that the calibration tools show a warning message at the space key press in the Dec 14, 2017 version is fixed. * Changes in NIMH MonkeyLogic 2 (Dec 14, 2017) + Now ML2 supports Ethernet links for Arrington ViewPoint Eye Tracker & SR Research EyeLink series. To enable the Ethernet link, go to the "Non-DAQ Devices Settings" on the ML menu and choose one in the "TCP/IP Eye Tracker". Non-DAQ devices have priority over DAQ devices, when they both are set in the Input/Output menu. + Touchscreens that use Windows's native driver can be supported now. To enable this feature, go to the "Non-DAQ Devices Settings" on the ML menu and check on "Touchscreen". It will activate a side menu, "Run Message Loop". Then, check on that side menu, too. Although this will fix the previously reported problem, you should not turn on this "Run Message Loop" option, if your touchscreen works fine without it. - The problem that SingleTarget's Success becomes empty when there is no input data is fixed. * Changes in NIMH MonkeyLogic 2 (Dec 1, 2017) - A typo in Line 70 of run_time.m that stopped the latency test & IO test is fixed. (Thanks to aboharbf from ML forum) + Functions that simulate Stimulation and TTL are included. They replace the output channels/ports during the simulation mode, but do not send out actual signals. May not work in all cases. * Changes in NIMH MonkeyLogic 2 (Nov 28, 2017) + analogoutput of NIMH daqtoolbox is updated so that it can quickly stops and retrigger output for closed loop stimulation. An example task is in the "task\runtime v2\8 closed loop stimulation" directory. - The problem that occurred when trying to use a rectangular fixation window with eyejoytrack() is fixed. It was a side effect of the recent graphic library update for the runtime v2. (Thanks to aboharbf from ML forum) * Changes in NIMH MonkeyLogic 2 (Nov 21, 2017) + Now you can make ML2 send out notifications to your Slack apps. Obviously this requires an internet connection to your ML2 computer and you need to download the Slack app on your smartphone or desktop. See alert_funcion.m for the instructions. If you want different notifications for different tasks, make a copy of alert_function.m in your task directory and modify the copy. Don't forget to turn on 'Alert' on the main menu. * Changes in NIMH MonkeyLogic 2 (Nov 20, 2017) + All adapters are re-written to inherit from their superclasses. + In the original ML, only numeric scalar variables can be editable, but, in ML2, strings can be editable as well. Now ML2 can have 3 special types of editable variables: -file, -dir and -color. If variables are declared as editables with these keywords, users can use MATLAB's file dialog or color pick-up dialog to set the variables. editable('-file','parameter_file'); editable('-color',{'face_color','edge_color'}); + Now editable variables can be accessed from userloop via TrialRecord (read only). For example, the editables defined in the timing file as shown above can be read in the userloop like the following. TrialRecord.Editable.parameter_file TrialRecord.Editable.face_color TrialRecord.Editable.edge_color * Changes in NIMH MonkeyLogic 2 (Nov 9, 2017) + A problem that mlplayer sometimes crashes MATLAB when it is closed during a playback is fixed. + It is found that VC++ 2013 Redistributable (x64) - 12.0.40649 uses a different uninstall signature. The new signature is added to ML, but, in case that it changes again, users can choose to bypass the detection code. + New adapters and task examples - repmat(A,1,1,3) is not compatible with R2013a or earlier, so changed to repmat(A,[1 1 3]). (Thanks to Xiaomin Yue) * Changes in NIMH MonkeyLogic 2 (Nov 2, 2017) + An edit field for JuiceLine is added to all reward argument dialogs. + During the reward polarity test, the number of triggered reward drops is displayed along with JuiceLine and Duration. You can also stop the test in the middle by pressing the ESC key. This is for those who use the test for reward calibration. + The JuiceLine of the manual reward ('R' key) during user tasks is determined as given in the reward argument dialog of the main menu. * Changes in NIMH MonkeyLogic 2 (Oct 30, 2017) + Now goodmonkey() can deliver rewards in the non-blocking mode. When the 'nonblocking' argument is non-zero (1 or 2), goodmonkey() returns the control immediately and triggers rewards in the background process. This non-blocking mode is for giving rewards while continuously updating visual stimuli, for example, during a movie playback. Therefore, it is most useful when you write tasks with the new trialholder_v2 and is not necessary in a usual situation. If you use the non-blocking mode, make it sure that the task continues long enough to finish all background reward delivery. Otherwise, some reward events may be stampted after the trial end code (18). goodmonkey(100, 'numreward',3, 'pausetime',300, 'nonblocking',1); Here is the list of the arguments that goodmonkey() can take: NumReward : number of drops PauseTime : interval between drops, in milliseconds TriggerVal : triggering voltage for analogoutput JuiceLine : reward channel to trigger, for digitalio only EventMarker: behavioral code(s) to stamp for each drop NonBlocking: 0 (blocking, by default) 1 (non-blocking, yield to other threads, less precise timing) 2 (non-blocking, do not yield, more precise timing) JuiceLine, EventMarker and NonBlocking are not remembered by goodmonkey(), unlike NumReward, PauseTime and TriggerVal, and need to be set every time when goodmonkey() is called. * Changes in NIMH MonkeyLogic 2 (Oct 23, 2017) - ML2 made an error while staring a task, if mlplayer was running already. This error was patched in the previous version, but the patch was not perfect and introduced another bug. Now all things work fine. - A mistake made in the eye drift correction of the trialholder_v2 is fixed. To use the eye drift correction in trialholder_v2, the WaitThenHold adapter must be used. * Changes in NIMH MonkeyLogic 2 (Oct 20, 2017) - The structure of the adapters (building blocks for creating scenes in trialholder_v2) is straightened out for unified interface. * Changes in NIMH MonkeyLogic 2 (Oct 17, 2017) + The control screen backround is supposed to be blue only when the trial is running and gray otherwise. This works correctly now. + A new trialholder function, bhv_code, allows you to add BehavioralCode within the timing file. bhv_code(code_number1, code_name1, code_number2, code_name2, ...); - Fixed that mlplayer doesn't use the actual refresh rate and therefore replays trials incorrectly under a certain condition. - Minor changes & fixes * Changes in NIMH MonkeyLogic 2 (Oct 12, 2017) + mlplayer can replay datafiles created with the new trialholder (v2). + Better handling of skipped frames for long movies - Minor changes & fixes * Changes in NIMH MonkeyLogic 2 (Sep 27, 2017) - There was a mistake in sorting the screen device order, so the fix related to the main menu position was not working perfectly. Now it is patched. - get_movie_duration() was retuning the number in seconds. Now it returns the length in milliseconds. * Changes in NIMH MonkeyLogic 2 (Sep 25, 2017) + A new example task (shapes) that demonstrates how to draw arbitrary-shaped stimuli is added. - Minor fixes * Changes in NIMH MonkeyLogic 2 (Sep 22, 2017) + A new trialholder (a.k.a. runtime) is added. This new trialholder provides a way to detect complex behaviors and control dynamic visual stimuli. See the example tasks included (dms with new runtime, random dot motion and timer demo). Detailed documentation will be added later. * Changes in NIMH MonkeyLogic 2 (Sep 20, 2017) - The problem that the mlplayer screen doesn't come back when "Export to AVI" is cancelled is fixed. - In previous versions, movies are rewound automatically when they are toggled off so that they can be reused in the same trial. This introduces a unnecessary delay when the movie is big. Now users have to explicitly rewind them with rewind_movie(). - When a new configuration profile is created for a new subject in previous versions, the menu settings are copied from the last subject's profile, but the editable variables of the new profile are reset to the values defined in the timing file. Now the editable variables are also copied from the last subject's profile. - Minor fixes * Changes in NIMH MonkeyLogic 2 (Aug 25, 2017) + reward_function.m supports multi-channel reward devices via multiple digital lines by default. To trigger a different reward channel, use the 'juiceline' option as below. goodmonkey(100,'juiceline',2); % trigger Reward 2 for 100 msec goodmonkey(100,'juiceline',[1 3]); % trigger Reward 1 & 3 simultaneously + Now gray-scale bitmap files can be used. (Thanks to Xiaomin Yue) + Now the ML main menu shows up on the screen where the command window is located (Thanks to Sebastien Ballesta) + Quotation marks (double or single) added to each field in the conditions file are processed properly now. (Thanks to hoptman from ML forum) - Minor fixes * Changes in NIMH MonkeyLogic 2 (Jul 24, 2017) - The problem of the space origin floating when the slip correction is made by the 'C' key during the 2-D spatial transformation calibration is fixed. (Thanks to Carlos Ponce) * Changes in NIMH MonkeyLogic 2 (Jul 19, 2017) + The pause menu items are mouse-clickable now. + A button to reset eye/joystick calibration is added to the main menu. + When the calibration tools are closed without saving the changes, a question dialog will be pop up to confirm. - A testing code accidentally inserted in the sound module is removed. * Changes in NIMH MonkeyLogic 2 (Jul 17, 2017) + Image Processing Toolbox is not requied any more, even when the 2-D Spatial Transformation is used for the calibration. - The origin-gain calibration supports the rotation manipulation, to compensate the distorsion in the input signal due to, for example, the tilted eye camera. - All calibration methods, including 'Raw Signal', allow the temporary rotation of the space with the following command. This change is reset in the next trial and, for the origin-gain calibration, its effect is additional to the rotation change during the calibration. EyeCal.rotate(degree); JoyCal.rotate(degree); * Changes in NIMH MonkeyLogic 2 (Jul 12, 2017) - The imresize() function used in the recent releases is replaced with mglimresize(), which is not dependent on Image Processing Toolbox. - NIMH daqtoolbox prints out more detailed information for NI-DAQmx errors. - The default input range of analoginput is changed to [-10 10] for better compatibility with MATLAB DAQ. * Changes in NIMH MonkeyLogic 2 (Jul 7, 2017) + The main menu GUI can be collapsed so that ML2 can be run on a smaller screen (1024 x 768). - Minor fixes * Changes in NIMH MonkeyLogic 2 (Jul 5, 2017) + The I/O test panel is added. This panel is accessible from the main menu and users can test analoginput (eye, joystick, touch, etc.), stimulation and TTL with it. - Minor fixes * Changes in NIMH MonkeyLogic 2 (Jun 30, 2017) - When stimuli are pre-loaded with the userloop and not turned off by the end of a trial, they can show up in the next trial. To prevent this, pre-loaded stimuli are deactivated at the end of each trial. - The problem that SND created from wav data, not from the file, does not play is fixed. * Changes in NIMH MonkeyLogic 2 (Jun 27, 2017) + mlplayer can handle repositioning of visual objects, frame manipulation of movies and background color changes. It is required to record data with this version of ML (or later), to get those features replayed correctly. - Movie-related codes are refactored. Decoding is twice faster now. * Changes in NIMH MonkeyLogic 2 (Jun 13, 2017) + The trial replay tool, mlplayer, is added. - The problem that the conditions are not refreshed when the block is switched is fixed (Thanks to Sheena from the ML forum). * Changes in NIMH MonkeyLogic 2 (May 25, 2017) + mlbhv2.m caches the positions of the variables in the file and improves the reading speed after the first access. - The problem that structure arrays are read backward from the data file (bhv2, h5) is fixed. * Changes in NIMH MonkeyLogic 2 (May 18, 2017) + Support for individualized configurations and editable variables. When a conditions file is selected, the very last saved configuration is loaded by default. Then, the configuration for a particular subject can be chosen by changing the subject name. + When the data file with the same name exists already and the user chooses overwriting, the old file is moved to Recycle Bin rather than deleted directly. The question dialog is updated to show the choices and actions more clearly. + The following keyboard controls work in both origin-gain and 2-D spatial transform calibration methods now. r: manual reward -: decrease reward duration by 10 ms =: increase reward duration by 10 ms c: eye slip correction u: undo eye slip correction + The eye offset at the time of the slip correction during trials (manual correction by the 'c' key or auto drift correction) is recorded to the data file. - Many minor fixes * Changes in NIMH MonkeyLogic 2 (May 11, 2017) + Now the behaviorsummary shows the figure drawn by the userplot function, if the function is provided. + Another reward mode is added to the 2-D spatial transform calibration, in which the fixation cue moves to the next calibration point upon the space key press. - The gain range in the origin-gain calibration is increased from [-10 10] to [-20 20]. - The index of the currently selected calibration target was not updated appropriately in the 2-D spatial transform calibration, if a target was chosen by a mouse click. As a result, when the target presentation was resumed by the keyboard, the target adjacent to the previously selected one was displayed, instead of the one adjacent to the current target. This problem is fixed now. - The problem that the reward function did not get custom reward variables when it was tested from the main menu is fixed. * Changes in NIMH MonkeyLogic 2 (May 8, 2017) + STM and TTL can be triggered in the simulation mode now, if actual hardware exists. + Reward on & off times are recorded even when the Reward I/O is not assigned. + As in the ML1, 'reward_dur' is defined as an editable variable by default and its value can be increased/decreased by 10 with the '-' & '=' keys. + If the DAQ boards indicated in the loaded configuration do not exist, the configuration is not automatically saved when the run button is clicked. This prevents the I/O mapping in the configuration file from being overwritten when the task is temporarily tested in a different computer. * Changes in NIMH MonkeyLogic 2 (May 2, 2017) + The reward count is displayed above the water drop icon now. - The conditions file header items that contain spaces before and after them are read correctly now. (Thanks to Ben Basile) - The fixation target in the 2-D transformation calibration is turned off when a reward is delivered with a space key press. (Thanks to Ben Basile and crponce) - Calibration points in the 2-D transformation calibration can be toggled off even when they are not currently on the fixation points. * Changes in NIMH MonkeyLogic 2 (Apr 21, 2017) + Now the length of the strobe pulses can be customized in the main menu, according to the required specification of the recording system. - Now eventcodes are marked in the behavioral data file, even though the 'Behavioral Codes' and 'Strobe bit' are not assigned in the main menu. The reward-on and -off times of goodmonkey() still won't be recorded unless 'Reward' is assigned. - A problem that ML couldn't parse out the pic object description when the width and height were given as decimals. This happens when the conditions file is generated with a script provided in the original ML. - get_analog_data() is fixed to receive the name of the General Input signals in the original ML's convention, like 'gen1'. (Thanks to Soohyun Park) - Fixed an error in the DirectX 9 detection * Changes in NIMH MonkeyLogic 2 (Apr 12, 2017) - An error that occurred during manual eye/joystick drift correction while using 2-D Spatial Transformation is fixed. (Thanks to crponce from the ML forum) - The previous patch related to movie presentation introduced a new bug that disabled the movie preview. It is fixed now. * Changes in NIMH MonkeyLogic 2 (Apr 10, 2017) + Now the fixation threshold of eyejoytrack() can be specified as a rectangle with a two-element vector. (Thanks to SeanC from the ML forum) + An option that delivers reward on typing the space key is added to the 2-D Spatial Transformation calibration tool. (Thanks to crponce from the ML forum) - The fixation window sizes in the calibration tools are fixed to be radii correctly. The sizes of all circle objects in NIMH ML2 are represented in radius. - A problem that movie objects couldn't be turned off when they ended before the duration of idle() or eyejoytrack() is fixed. * Changes in NIMH MonkeyLogic 2 (Apr 5, 2017) + Added the following new fields to Screen and TrialRecord to improve the compatibility with old timing scripts. Screen.BackgroundColor Screen.PixelsPerDegree TrialRecord.DataFile * Changes in NIMH MonkeyLogic 2 (Mar 31, 2017) + Now pre-loading stimuli and timing files is possible when running the task with a userloop file so that the required ITI can be minimized (See the included example task, movie preloading. Thanks to mkytch from the ML forum) - Fixed the problem with "Chart Blocks" that occurs when multiple block numbers are given in one condition line. (Thanks to mkytch from the ML forum) * Changes in NIMH MonkeyLogic 2 (Mar 28, 2017) + Changed the name convention of the cfg file from '*_cfg.mat' to '*_cfg2.mat' so that the old cfg files are not overwritten. The old cfg files are not compatible with NIMH ML 2. - Fixed the problem that the location of the user plot was incorrect in old MATLAB versions. - Fixed the problem that the background color of the subject screen does not change during the idle command, when there is no object to update. (Thanks to Xiaomin Yue) - Fixed an error made in the previous version that prevented editable variables from loading * Changes in NIMH MonkeyLogic 2 (Mar 27, 2017) + Now the behavior summary is shown at the end of tasks, as in the previous versions. - An error made in the previous version that disables Stimulation and Mouse is fixed. - The timing accuracy of goodmonkey (reward on/off time and eventmarker) is improved. * Changes in NIMH MonkeyLogic 2 (Mar 24, 2017) - Fixed an error in assigning strings that contain commas and semi-colons to editable variables. - Fixed the problem that the simulation mode did not work with Stimulation and TTL. * Changes in NIMH MonkeyLogic 2 (Mar 22, 2017) - Fixed the problem that TrialRecord.CurrentConditionStimulusInfo does not reflect the taskobject info correctly. (Thanks to crponce from the ML forum) - Fixed the problem that the x & y positions of gen objects defined in the conditions file are provided as char, not numeric. (Thanks to neo3dot1415 and crponce from the ML forum) - Fixed the problem that the intertrial-interval is not counted for the duration specified by set_iti(). * Changes in NIMH MonkeyLogic 2 (Mar 20, 2017) + Due to the just-in-time compilation of MATLAB, the timestamps of eventmarker were off by a few milliseconds from the actual flip times of toggleobject for the first few trials, until all the codes were compiled and cached. Now stimulus presentation (Stimulations, TTLs, and audio sounds) and timestamp- marking are processed at the DLL level without going through MATLAB scripts so that there is no such delay any longer. - An error made in the previous release is fixed. It prevented the changes of timing files from being applied immediately. * Changes in NIMH MonkeyLogic 2 (Mar 17, 2017) + Improved support for the userloop function (see the 'dms with userloop' example in the task directory for further details) + Made the sizes of all circle-shaped objects represented in radius irrespective of their units. This makes the fixation point and the eye/joystick/touch tracers almost twice bigger when you change their shape from Square to Circle without adjusting their sizes. However, it is consistent with the fact that the CRC objects in the conditions file and the window threshold of eyejoytrack() are also in radius and therefore less confusing.