OSC Query CSV real time

112 views
Skip to first unread message

sirhc

unread,
Mar 11, 2023, 4:51:55 PM3/11/23
to QLab
Inspired by this cookbook article, https://qlab.app/cookbook/discosc, I was wondering if anyone had tried to query data outside of QLab like a CSV, XML, or excel file to change the parameters of a cue in real time. 

Here is what I would like to accomplish:

-shared CSV file
-audience would populate cells in CSV file with word or phrases
-the active text cue in QLab would query the cells and update in real time 

Thanks in advance!

micpool

unread,
Mar 12, 2023, 8:25:22 AM3/12/23
to QLab
A few questions,

How would the audience populate “cells” in a csv file? Is there even  a format of csv that has cell references?

When would the content of QLab active text be updated? When a new word or phrase is input?  Every:10 secs, looping around all current content?

How is the file shared?

Mic


sirhc

unread,
Mar 12, 2023, 6:05:11 PM3/12/23
to QLab
Trying to keep it simple, so for now it would be a file that allows co-authoring (Google Sheets or Excel Online).

At the moment, trying to keep it simple where pressing the "GO"  button updates the cue. When you hit "GO" again, it would go to the next row. We would like to control when the data is updated.

For now, a link where anyone can update the file at the same time. 

micpool

unread,
Mar 13, 2023, 8:21:33 AM3/13/23
to QLab
Screenshot 2023-03-13 at 12.13.54.png

Top Right Spreadsheet open in Excel.app on same mac running QLab which Script will get data from

Top left share of spreadsheet in Excel Online in Chrome Browser to show remote editing of shared file.

Spreadsheet initially populated with ChatGPT prompt:

"create 100 3 to 5 word phrases on the subject of Theatre Sound Design as a list without numbers."


Script (Won't currently work in QLab 5.1)

--Display text from column A of an open Excel spreadsheet (in excel.app)
repeat
set theDisplayTime to 3.0 --seconds to display each text
set theIndex to 1
repeat
tell application "Microsoft Excel" to tell active sheet
-- count active cells in column A
set theRowCount to ((first row index of (get end cell 101 of column 1 direction toward the top)))
if theIndex < theRowCount then
set theNewText to value of cell ("A" & theIndex as text)
else
exit repeat
end if
end tell
tell application id "com.figure53.QLab.5" to tell front workspace
set the live text of cue "TEXT" to theNewText
end tell
set theIndex to theIndex + 1
delay theDisplayTime
end repeat
end repeat

Screen recording in   QLab 5.0.12 and workspace attached.

Mic
Live Text From Excel.qlab5
Live Text From Spreadsheet-HD 1080p.mov

micpool

unread,
Mar 13, 2023, 8:46:38 AM3/13/23
to QLab
Version for GO for each line.
Live Text From Excel individual GO.qlab5

Sam Kusnetz

unread,
Mar 13, 2023, 8:57:13 AM3/13/23
to QLab
Script (Won't currently work in QLab 5.1)

Just to be clear, the reason this done at work in QLab 5.1 is that changing the text of a Text cue resets the cue. That was an error and will be fixed in the very near future.

Sam

––
Sam Kusnetz [he/him/his] (what is this?)
Figure 53
https://qlab.app | https://figure53.com

sirhc

unread,
Mar 13, 2023, 6:12:45 PM3/13/23
to QLab
Thank you so much!  This is what we're looking to do.  Going to dive into..

Appreciate the quick response!

Reply all
Reply to author
Forward
0 new messages