Apologies for posting to this thread, after some internal debate it seemed like the best place.
I’m working on expanding the base teletype code to support the input and output expanders for the Teletype and I’ve ran into an interesting behavior that, while I await my replacement FTDI cable, I was wondering if anyone had any ideas as to what could be going on. It centers around inconsistent behavior with the metronome script vs. the trigger scripts.
Output is working great for me with the straight i2c transmissions (via i2c_master_tx); I’ve been able to blast messages of varying length and everything stays solid with no perceptible timing impact. Whoot!
Input is also working pretty well. I’m able to use a slightly modified version of the i2c_master_rx command to send out a message and retrieve a value. (The modification was to pass the data array into the function so that the value could be extracted.) The remote i2c device gets the command and then returns the value. It is perfect in that regard. I’ve executed these pull commands countless of times from the realtime command line and as scripts running off of triggers. In fact, in a trigger, I can pound it ridiculously fast for as long as I want with any function ordering.
There is one circumstance where I can get the Teletype to lock up 100% of the time. If I add the read command to the metronome script and it is not preceded by and i2c send command, the device will lock. If there is a send command prior, I can run the metronome script for hours or as fast as I want (M 1) without any issue. It is shockingly responsive in that regard. but, if I don’t issue a send command prior to the read command, the thing locks instantly.
This works without fail in a metronome script:
TO.TR.PULSE 1
CV 1 TI.PARAM 1
The first knob of the input expander drives the Teleype’s CV output. Again, I can run that as fast as I want (M 1) without problem. I can even read it four times in a row (there is no caching) and it blazes:
TO.TR.PULSE 1
L 1 4 : CV I TI.PARAM 1
Omit the TO.TR.PULSE 1 and the Teletype freezes - even though it will work from a trigger script.
CV 1 TI.PARAM 1
Switch to the Teletypes param and it works without error.
CV 1 PARAM
Any thoughts offhand about the metronome processing and what could be at work here? I’m scratching my head a bit as the same script executed off of a trigger works. Strange.
–
You can reference my fork here if you are curious beyond the above high-level question:
https://github.com/bpcmusic/teletype/tree/to_operator
b