That seems to have done the trick! Sort of surprised - can you explain what its doing?by aboharbf - Questions and Answers
'16 bit strobe on falling edge' and '16 bit strobe on bit changes'by aboharbf - Questions and Answers
I did read the manual upon first having this problem - this one to be exact: , Page 12 has the pin out for the digital system. I've since learned there is no strobe bit, but the pin I had hooked it up to is not connected to anything on the Blackrock edge. I have both systems set to 'on rising edge', so I don't see how an unread strobe signal could be causing this problem.by aboharbf - Questions and Answers
Here is the cable I'm using, I have a 1 meter long version: I have all 3 of the GRND slots on the BNC-2090 occupied by ground cables for the wire. Unused bits are open, but they aren't being triggered inappropriately during these tests, and they aren't assigned in the Monkeylogic panel. Also, I've swapped the PCI slot being used in the machine, nothing changed. I'vby aboharbf - Questions and Answers
Update: I reseated the PCIe card in the machine, replugged in the wires, and redid the ports on the front of my BNC-2090 (the rainbow cable where the behavioral codes are sent out from) to use a nearly non-overlapping set of ports. (Used to be on Ports 1 and 2 mostly, now mostly on 0 with 2 wires on 1). The problem remains. Since I'm eager to get to recording, at the moment I'm relyiby aboharbf - Questions and Answers
Yes, on MKL it is set to 'on rising edge' and on Blackrock it is set to '16 bit strobe on rising edge'. The new system I am setting up is the digital system, and after testing with the analog system, I have the same issue. I added in 'eventmarker(X)' after each of the events which trigger the eventmarker normally - though the trial data in MKL showed the change, tby aboharbf - Questions and Answers
some additional bits of information - attached is a table of the codes I typically use along with the codes which I get instead, and their binary translations. the binary of the gotten code has the changed bits highlighted. It doesn't reveal any clear pattern about which bits are being misrepresented (that I can see).by aboharbf - Questions and Answers
Hey All, I've run into this odd problem where I am setting up a new system, and for some reason the strobe test yields the expected results, but the codes sent during the task don't match what is stored in the trial data. I'm not sure what to trouble shoot besides making sure all the connections are tight. Any ideas?by aboharbf - Questions and Answers
So I had an error in my userloop that caused it to be displayed for the fixation dot duration, I've fixed it and I see the number reach the end. Also the file I shared and the one I provide below was produced with it off. Is there a reason the Vsync frame box is gone in the latest version? I used the NVidia graphics controller to create a custom resolution for the monitor at 60 Hz (its aby aboharbf - Questions and Answers
So I happen to have a video where every frame is labeled. I ran the test, and surprisingly, the stimulus (at least in this case) was just stopping early. the video would have ~90 frames, the presentation would go to frame 20 - 30, then just stop. Attached is the folder with the files and stimuli, and a run where these frames were dropped - [1drv.ms]by aboharbf - Questions and Answers
So the reason I'm bringing this to your attention is that there are only 90 - 120 frames per video, and the video presentation appears normal despite these messages about skipped frames. Is it possible something is wrong on monkeylogic's side? How is it possible for it to appear normal if its reported over half of the frames dropping?by aboharbf - Questions and Answers
So I did a clean install of new drivers after upgrading the graphics card, same issue. I copied and saved the config file elsewhere and got the same problem. This folder has that run and a picture of the latency test. Let me know what I should try next - [1drv.ms]by aboharbf - Questions and Answers
1. Things updated were just routine graphics drivers from the nvidia site, and windows update, latest versions of each for the graphics card. 2. Folder w/ example bhv2 files - [1drv.ms]by aboharbf - Questions and Answers
So this is a problem I've had in the past: During the task, I get a number of skipped frames comparable to the number of frames shown (50 - 90 frames per trial). Example window here - [1drv.ms] - Strangely, the presentation itself looks normal. - Changing vsync spinlock from 3 to 2 doesn't fix the problem (reduces reported frames skipped though). - changing the refresh rates ofby aboharbf - Questions and Answers
TaskObjCon needs to be regenerated everytime, because it is the task object corresponding to the current condition, why make it persistent? Also I don't understand why in one case you'd need to pass stimStruct through the mltaskobject and in another case not.by aboharbf - Questions and Answers
Update: Some Visuals This code produces the described problem persistent TaskObjectFix if isempty(TaskObjectFix) TaskObjectFix = mltaskobject(stimStruct(end), MLConfig, TrialRecord); end % Make the choosen items into TaskObjects TaskObjCon = mltaskobject(stimStruct(condition), MLConfig, TrialRecord); C = ; RunTime = get_function_handle(embed_timingfile(MLConfig,timingfile,userby aboharbf - Questions and Answers
Ah ok, so I wrote the script this way and I'm running into a really odd problem. Instead of generating TaskObj as a persistent variable, and generating it with the entire list of stimuli via mltaskobject, i choose the fixation dot and the condition, run each through mltaskobject seperately, and stick them together before passing them out of the userloop as C. For some reason, in the &by aboharbf - Questions and Answers
So I'm working on a task where I am loading in ~400 1 second clips (.avi). On my desktop which can run it, looking at the resource manager in Windows shows it basically loading all 50 GB of RAM I have. On my other machine, the stimulus presentation one, there is 16 GB of RAM, and the same tasks leads to a wait time of ~1 - 2 minutes, and then suddenly MATLAB closes without any prompt mentionby aboharbf - Questions and Answers
Oooo so MonkeyLogic isn't actually bound by the codec itself, but by whats installed on the machine? Does codec choice effect performance? at the moment, when I run the userloop script and load these files (a few mb's each) it takes about 10 seconds to do so. Perhaps a different codec would perform better. I use VLC to play things so I was confused by it working there and not in ML. Thaby aboharbf - Questions and Answers
Update: Problem solved. Realizing the problem may have had to do w/ source of videos (and their respective codec use), i investigated and found that the videos having problems use H.264 compression (-c:v libx264 in ffmpeg), whereas those generated by MATLAB use the 'Motion JPEG AVI' (mjpeg) by default (VideoWriter). Switching to the mpjpeg encoding in my ffmpeg script (-c:v mjpeg) geby aboharbf - Questions and Answers
Additional notes Problem seems to be in mltaskobject code, line 305 - obj.ID(m) = mgladdmovie(o.Name); When trying to run this command, it hits some sort of error at line 24 - id = mdqmex(2,2,filename,buffering_time,device); This line, rather than spitting out an ID, leads to the delete(obj) method of mltaskobject being called.by aboharbf - Questions and Answers
Has anyone run into issues presenting .avi files? I recently created some using ffmpeg, and monkeylogic is recognizing it as 'Not supported file type'. other .avis i have (produced via MATLAB, without ffmpeg) work alright. any insights would be appreciated it.by aboharbf - Questions and Answers
So to solve this, ultimately, I had to change the refresh rate on my monitor from 100 Hz to 60 Hz. The subject screen is a CRT which gets info from a spliter, and I'm guessing something with the windows October 2020 updates related to refresh rates has messed w/ how things were previously working. Since I'm not using stimuli @ above 60 Hz, I don't believe it will be an issue (alsoby aboharbf - Questions and Answers
No hardware has changed to my knowledge (I'm not the only one using this machine, so I will double check that), and the monitor is set to being the main display already, with the 'extend display' setting.by aboharbf - Questions and Answers
Latency test attached, and simulation mode produces the same effect. What additional details can I provide?by aboharbf - Questions and Answers
Hey All, I recently updated monkeylogic and started running a userloop script I wrote about a year ago, which worked fine then. Now, I am getting the error for skipped frames on every repetition. Anyway to troubleshoot this? Let me know when you get a chance. Thanks a lot.by aboharbf - Questions and Answers
same issue unfortunately. Tried mlplayer() and got the following: K>> mlplayer('File') Error using cd Cannot CD to (Name is nonexistent or not a directory). Error in mlplayer/load_data (line 722) = fileparts(datafile); cd(p); set(gcf,'name',['MonkeyLogic Player: ' n e]); Error in mlplayer (line 76) load_data(datafile);by aboharbf - Questions and Answers
Trying to use mlplayer to watch back files recently, and I get the following error consistently: Reference to non-existent field 'Stimuli'. Error in mlmat/read (line 48) val = a.(name); Error in mlexportstim (line 23) Stimuli = fid.read('Stimuli'); Error in mlplayer/load_data (line 674) mlexportstim(tempdir,datafile); Error in mlby aboharbf - Questions and Answers
It is better to use Jaewon's method of simply reading the Trial structure, but if you or someone involved is insistent on the information being recorded by the ephys machine along with the data, you can send eventmarkers matching the condition number + 100. I use this, and have a step in my code that cross references the condition table collected via the trial record structure with that geneby aboharbf - Questions and Answers
so upon loading the webcam data for a particular trial, I find that the frame data is an X * Y * N structure, where X and Y seem to reasonably be the pixels, and N would have to be the number of frames. when observing the same trial in mlplayer, it is 4.3 seconds long, and the camera data plays next to it the whole time. at the 30 FPS I was using, this should produce 129 frames, but the N inby aboharbf - Questions and Answers