Radiation detector send to trigger lights
-
@dusx: Thanks! That will be very helpful if we deal with files. Trying to understand how to have OSC listener "hear" the network send from LabView in real time?
-
open the communication menu --> stream setup --> and click on auto-detect input. The source machine has to send to the IP address of the receiving computer.
Best Michel
-
@jetjaguar said:
@dusx: Thanks! That will be very helpful if we deal with files. Trying to understand how to have OSC listener "hear" the network send from LabView in real time?
You basically need to know the IP address and the port number it is sending to.
It's a little hard to explain how this work over text/written words.
-
also> check the OSC port number in Preferences. it needs to be the same as the one being used by your interface application to send the OSC. i think i remember correctly that the default is 1234. if you change it in Izzy, you need to restart Izzy for it to take effect. and> OSC coming into Izzy needs to start with a forward slash.
-
A tutorial I did for TouchOSC and Isadora. The methods are the same, just pretend Touch OSC is instead LabView (....kinda)
-
Excellent! Will play with all of this over next week or so, great community of support for Izzy.
-
@dusx- Could you explain this more? It is looking more like a live OSC send will not work with the hardware we have available. When you say Read () and Include (). What are you putting that into, a text file? what actor are you using to get the info into Isadora? Javascript actor? Thanks.
-
These are Javascript functions. These functions are specific to Javascript in Isadora, they have been added to facilitate external data.
This tutorial covers the use of include() https://support.troikatronix.c...
read() is easier, it takes what ever text is in the file and stores it in memory, you can then assign it to a variable.var myText = read("path/to/data/file.txt");
this line of code will read the file.txt file and store its contents in myText.
If this file contains JSON formatted data, you can use JSON.parse() to convert the data into a native Javascript data format.var objData = JSON.parse(myText);
above we take the text content of myText and parse it into a Javascript object (think array for now).
The tutorial linked above also covers some basics of JSON, so it may be helpful in understanding what JSON.parse() does as well.
Since read() unlike include() doesn't need to be located an the first line of your Javascript code, it is possible to use it in a way that will read the external file continuously.
You should however limit the speed at which this file is being read (determined by how the code is constructed). Also, depending on how this external text file is created/written to, you may experience a file lock.
Where both the writer and reader try to access the file at the same time. I am not sure what the outcome of this situation would be, perhaps just a Javascript error for that attempt. -
@dusx- Thank you! Right now we are reading our .text file as an array with the DataArray actor and getting excellent results. I will look at the tutorial if we decide to go this route.
-
Just did a quick test, and reading a txt file at 120hz (not suggested) that contained a single number.
Where I had the txt file open in a text editor and manually changed and saved the file numerous times caused 0 issues, so the file lock consideration seems minimal (and would be the same for the data array).the code used for loading a single value in a text file called read.txt:
function main()
{
var i = read('read.txt');
return [i];
}the above code runs every time an input come into the Javascript actor.
To run this at a specific rate, I connected a Pulse Generators trigger output to the Javascript actors input 1.
Then the code will be run each time the pulse triggers the JS actor.