Twitch Chat Integration – Reading Dynamic .Log File
May 21 2020 | 3:18 pm
Hello! I recently tried to integrate Twitch chat into a synthesizer patch using Chatty, a Java based desktop client which writes the chat log to a .log file. The patch is below but basically I use a 'read' message to load the file in, 'query' message for the number of lines, then output the most recent into regexp~, which recognises certain phrases.
However Max is unable to read the file 'live' – filewatch~ doesn't recognise that the file is being updated at all, even when it is clearly being written to by Chatty. Moreover if I use a 'read' message specifying the pathname and bang into it periodically, it doesn't update to the current state of the file (the number of lines doesn't update).
Essentially, I want to be able to leave this patch on overnight, while it keeps reading the messages that are given to it by Twitch chat. Does anyone know why this could be happening?
Thanks in advance, Helios