Hi everybody!
I’m new to touch and I’m using it to build a tool to compose a projection show for a band. The basic requirement is that we can assign various video files to trigger upon receiving midi notes, so we can drop all of our video content into the project and ‘jam’ the video via midi along with the songs until we have a sequence we are happy with.
I’m using a DAT table of file paths against their midi note number and moviefilein target OP name, so when the midi in DAT callback executes on note on messages it can update the file parameter of the appropriate movie player with something like op(targetLayer).param.file = op(‘movieTable’)[str(index), ‘path’]
This works fine with our HAP encoded files with acceptable latency for live triggering from a midi controller when pre-read frames is set on the moviefilein TOPs, but only when the trim start is parameter set to 0 on the trim page of the moviefilein parameters.
When the trim start is set to anything other than zero it seems the pre-read frames setting has no effect, or touch slows down while decoding and skipping forward to the appropriate frame. Re triggering the video with the cue / pulse function after it has been launched doesn’t result in the same slow down, probably because the frame is still in GPU memory?
Is there any way to pre-read frames from the trim start position instead of from the first frame of the movie? I’ve tried a variety of combinations of settings on the tune and play page to improve the launch latency of trimmed clips with no success. Any suggestions would be appreciated 
The eventual plan is to record / sequence midi in Ableton Live and use one of the non realtime recording methods described in the following link to render our fast cutting beat synced composition into one HAP file per projector for simple playback.
derivative.ca/wiki088/index … with_Audio
Thanks!
Corey.
i tried to reproduce your issue but to no avail, always instant on my system. But I have my video’s on a SSD drive, do you? HAP codec requires a high drive read speed.
derivative.ca/wiki088/index.php?title=Hap
“Since the files have a high data rate the main bottleneck you will often hit is SSD read speed, which can be fixed by using a RAID0 setup of SSD drives”
The videos are on an internal SSD. What resolution did you test with? I’m using 3840 x 2160. I understand that it might not be realistic to expect instant playback from hi-res files but it’s so close to being perfect that I’m not ready to give up until I’m sure…
My HAP files were encoded in Adobe media encoder. I found some threads describing files encoded by touch performed better due to Malcom’s chunking tweaks. It seems likely that you’re not seeing the same latency because your files are making use of the encoding improvements.
See here - viewtopic.php?f=20&t=7703&p=29113&hilit=hap+encode#p29113 (aha! Of course you’re in that thread).
I couldn’t do a reliable comparison as the moviefileout is limited to 1280x1280 until I cough up for a license, so the playback improvement I got from encoding in touch could be attributed the lower resolution, the chunked encoding or the fact that it’s HAPQ instead of HAP.
From what I’ve read it looks like touch is still the only way to encode into HAP and make use of Malcom’s improvements to the codec. Is that true? If so is there a workflow for batch encoding through touch? Would it be a script that iterates over a folder DAT and encodes each file via moviefileout in realtime?
Thanks for the help!
I’ve also noticed that latency when launching from a trim start point is randomly better or worse depending on where you set the trim start parameter, if that gives any clues.
If it’s a single drive, it’s likely that read speed is the issue. For larger files I use multiple SSD’s in raid-0. If you need serious read speed I would recommend M.2 PCIe SSDs. See also this discussion here: viewtopic.php?f=4&t=5133
and more hap info here: derivative.ca/wiki088/index.php?title=Hap
HAP chunked encoding was specifically developed to allow multiple cpu’s to do the decoding for >HD material, so yes it would apply for your case.
Keith made a nice batch encoder for hap:
viewtopic.php?f=22&t=6430
Thanks for all the help.
Keith’s batch converter is great! I’ll just have to wait until the funds come through for the commercial license before I can see what improvement I get with touch’s chunked HAP-Q, before finally upgrading my hardware to raid.
Unless someone just happens to have a 3840 x 2160 touch HAP-Q encoded video sitting in the cloud somewhere for me to download and test with… 
C.