Wow, Ivan this is great.
Really smart to set the parent’s custom parameters for the target track and clipslot in the OSC callback.
It gives people way more functionallity out of the box than just dumping the clip details in table and leaving it to them build something to get data from the track that their highlighted clip lives in.
I do think however that the most useful information someone would expect to pull from the detailClip property is the name / slot of the selected clip, so I added a select that picks the highlighted clip’s row from the out_clips table and out DAT to the tox, so you can wire that to straight to DAT Execute and script a callback. There’s nothing stopping anyone from doing this outside the component of course, I just thought it would be convenient.
Other changes:
- When you use the arrow keys or mouse to move your detail selection from clip to clip in the same track, you always get just one message in the OSCin DAT, but if you move it from a clip to an empty slot, or from a clip to a clip in a neighbouring track, or if you are moving it from a track header to a neighbouring track header, you’ll get two or more messages in the OSCin DAT. I’m not sure what the implications are for performance here, I feel like setting the parent().par.Track and Slot.MenuIndex parameters in the callback even if they haven’t changed probably isn’t too expensive but in any case I edited the callback to avoid settings those parametes if the last received message == the current message.
- Line 77 in AbletonTrackExt was throwing KeyError: ‘hasMIDIOutput’ whenever the detail clip selection changed. I fixed that.
Some things I noticed:
- When you move your clip detail selection from on track to another, the ‘Include clip playing data’ channels disappear from the CHOP output until you triger another clip in that track.
- The ‘Include clip playing data’ toggle seems to be broken for me.
- When you have a midi clip highlighted and the next clip you highlight is an audio clip you get the error below:
[code]# TDA Remote Script Error #
Traceback (most recent call last):
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 290, in _handle_request_noblock
self.process_request(request, client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 318, in process_request
self.finish_request(request, client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\Python\lib\SocketServer.py”, line 652, in init
self.handle()
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\OSC.py”, line 1797, in handle
self._unbundle(decoded)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\OSC.py”, line 1779, in _unbundle
self.replies += self.server.dispatchMessage(decoded[0], decoded[1][1:], decoded[2:], self.client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\OSC.py”, line 1741, in dispatchMessage
reply = self.callbacks[addr](pattern, tags, data, client_address)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\TDA.py”, line 307, in onMsgListener
msg[4] if len(msg) > 4 else ‘’)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\Listeners.py”, line 55, in add
returnAddress, id)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\Listeners.py”, line 191, in addSpecial
addInfo = addFunction(property, returnAddress, extra)
File “C:\ProgramData\Ableton\Live 9 Suite\Resources\MIDI Remote Scripts\TouchDesigner\Listeners.py”, line 256, in addMIDINotes
clip.add_notes_listener(callback)
AttributeError: ‘NoneType’ object has no attribute ‘add_notes_listener’
End TDA Remote Script Error #[/code]
I’ve attached my version of the .tox, note I was working in the current stable build.
I’ll continue testing this in my project and report back with any problems or improvements. Thanks again for your speedy response!
Regards,
Corey.
abletonDetailClip_1.tox (9.47 KB)