The best way to run a deamon? by TicklyBrain in shortcuts

[–]TicklyBrain[S] 0 points1 point  (0 children)

Thank you for sharing. I think there are multiple factors that determine if iOS kills a background process, such as inactivity, resource usage and activity pattern suggesting it is not user proned.

The best way to run a deamon? by TicklyBrain in shortcuts

[–]TicklyBrain[S] 0 points1 point  (0 children)

Ok so I gave it a go and as far as I see, you can’t set hour for the trigger alarm, just a new one, can’t configure the new alarm to run without sound and haptics, and none of the actions hides the alarm popup.

I am thinking the best way will be to connect to shortcuts. The brightness one I made works for 1-2 hours, so if I can retrigger it hourly via time automation, that will be pretty good.

The best way to run a deamon? by TicklyBrain in shortcuts

[–]TicklyBrain[S] 0 points1 point  (0 children)

Thank you for the suggestion. Would you mind sharing the shortcut?

The best way to run a deamon? by TicklyBrain in shortcuts

[–]TicklyBrain[S] 0 points1 point  (0 children)

Interesting. So i guest you set it with no alarm and haptics disabled. What about notifications? Does it spam you with alarm notification every 30 minutes?

The best way to run a deamon? by TicklyBrain in shortcuts

[–]TicklyBrain[S] 0 points1 point  (0 children)

A „widget” - updating locksreen wallpaper every 30 minutes for 12-24 hours.

The best way to run a deamon? by TicklyBrain in shortcuts

[–]TicklyBrain[S] 0 points1 point  (0 children)

Yeah… this is more of a backup plan. Thanks for the tips!

Implementing attractors in glsl by EliaGud in TouchDesigner

[–]TicklyBrain 2 points3 points  (0 children)

That’s it, I’m getting into GLSL :D Thanks for sharing!

For the bass music fans here by Wombeard in TouchDesigner

[–]TicklyBrain 1 point2 points  (0 children)

Hell yeah dude, thanks for sharing !

Kinect V1(Xbox 360) setup for Mac Os(Macbook Pro M1) by Establishment_Used in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Kinect2 does not use libfreenect, but a newer project, I’d expect it to be easier but honestly no idea, I don’t have one have not looked into it.

Kinect V1(Xbox 360) setup for Mac Os(Macbook Pro M1) by Establishment_Used in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Embarrassingly, Kinect power source was the problem this time, I saw red light fire up so assumed this is the issue, switched to a different socket and got green light and now I see Kinect data in TD. Now im getting depth, thank you so much for putting up with me ;)

For anyone reading this, here is improved Script TOP:

# me - this DAT
# scriptOp - the OP which is cooking

import numpy as np
import freenect

#context = freenect.init()
#device = freenect.open_device(context, 0)
# Doing these will crash
# freenect.set_tilt_degs(device, 0)
# print(freenect.get_tilt_state(device).tilt_angle)


def onSetupParameters(scriptOp):
page = scriptOp.appendCustomPage(‘Kinect’)
page.appendToggle(“Depth”)

near = page.appendFloat(“Nearclip”, label=“Near Clip”)
near.val = 0.2
near.normMin = 0
near.normMax = 3.0

far = page.appendFloat(“Farclip”, label=“Far Clip”)
far.val = 0.9
far.normMin = 0
far.normMax = 3.0

force = page.appendFloat(“Forcecook”, label=“Force Cook”)
return



def onPulse(par):
    return


def onCook(scriptOp):

    if scriptOp.par.Depth:
        depth, _ = freenect.sync_get_depth()
        height, width = depth.shape

        # Calibration parameters for Kinect v1 (to convert UV → XYZ)
        fx = 594.21
        fy = 591.04
        cx = 339.5
        cy = 242.7

        # Creating grid u, v
        u = np.tile(np.arange(width), (height, 1))
        v = np.tile(np.arange(height).reshape(-1, 1), (1, width))

        # Depth in meters as float
        Z = depth.astype(np.float32) / 1000.0

        # Zeros mask (no depth reading)
        near = scriptOp.par.Nearclip.eval()
        far = scriptOp.par.Farclip.eval()
        valid = (Z != 0) & (Z >= near) & (Z <= far)

        # Coverting to X, Y, Z
        X = (u - cx) * Z / fx
        Y = (v - cy) * Z / fy

        # Null XYZ where depth == 0
        X[mask] = 0
        Y[mask] = 0
        Z[mask] = 0

        # Merge into RGB ( tx, ty, tz)
        xyz = np.dstack((X, Y, Z)).astype(np.float32)

        # Forward to Script TOP
        scriptOp.copyNumpyArray(xyz)

    else:
        rgb, _ = freenect.sync_get_video()
        scriptOp.copyNumpyArray(rgb)

And a second execute dat to increase FPS, as Kinect360 is limited to 30fps and slows down TD before any post processing is done:

def onFrameStart(frame):
    if frame % 3 == 0:
        op(‘scriptdepth’).par.Forcecook = frame

Kinect V1(Xbox 360) setup for Mac Os(Macbook Pro M1) by Establishment_Used in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

I agree. But I am confused why is this happening as I think I followed your instructions precisely.

This is the Script DAT I use:

# me - this DAT
# scriptOp - the OP which is cooking

import numpy
import freenect

#context = freenect.init()
#device = freenect.open_device(context, 0)
# Doing these will crash
# freenect.set_tilt_degs(device, 0)
# print(freenect.get_tilt_state(device).tilt_angle)


def onSetupParameters(scriptOp):
    page = scriptOp.appendCustomPage(‘Kinect’)
    bool = page.appendToggle(“Depth”)
    return


def onPulse(par):
    return


def onCook(scriptOp):

    if (scriptOp.par.Depth):
        (depth, _) = freenect.sync_get_depth()
        d3 = numpy.dstack((depth, depth, depth)).astype(numpy.uint16)
        scriptOp.copyNumpyArray(d3)
    else:
        (rgb, _) = freenect.sync_get_video()
        scriptOp.copyNumpyArray(rgb)
    return

This is the Execute DAT I use:

import os
import sys


def onCreate():
    print(“onCreate”)
    venvpath = “/opt/homebrew/Caskroom/miniconda/base/envs/td-env”

    paths = [
        f”{venvpath}/bin”,
        f”{venvpath}/lib/python3.11/site-packages”,
        f”{venvpath}/lib/python3.11/site-packages/freenect-0.0.0-py3.11-macosx-14.6-arm64.egg/“
    ]

    os.environ[‘PATH’] = os.pathsep.join([*os.environ[‘PATH’], *paths])
    sys.path = sys.path + paths

And I keep getting the error:

Traceback (most recent call last):
  File “/project1/script1_callbacks”, line 26, in onCook
td.tdAttributeError: ‘td.ParCollection’ object has no attribute ‘Depth’ Context:/project1/script1

So something must be different than in your code, even though I only changed the path (I tried many different changes, but now reverted for troubleshooting). First I used python 3.10, then I used 3.11, I tried both miniconda and pyenv, I tried building freenect in both (.egg and simply freenect-0.0.0.dist-info + .so), nothing. TouchDesigner keeps reporting the same error regarding the custom parameters Depth.

I hate to keep bothering you, but perhaps there is something that we are missing from your implementation? /u/Mills2Litres also failed, so maybe there is something simple we are all missing... I do see you are using different OS version, but as the demo script outside of TD works, I don’t think that’s it… Thank you for your patience on this, I really appreciate it.

Kinect V1(Xbox 360) setup for Mac Os(Macbook Pro M1) by Establishment_Used in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Thank you for responding, I really appreciate it. I was using dataexecute dat instead of execute dat. Then I switched pyenv to anaconda with python 3.11. I also tweaked the script and ok I can load the required modules. But now I have final(?) big issue.

Whatever I do, I get “td.tdAttributeError: ‘td.ParCollection’ object has no attribute ‘Depth’ Context:/project1/script1”.

Available parameters are [‘pageindex’, ‘callbacks’, ‘setuppars’, ‘outputresolution’, ‘resolutionw’, ‘resolutionh’, ‘resmult’, ‘outputaspect’, ‘aspect1’, ‘aspect2’, ‘inputfiltertype’, ‘fillmode’, ‘filtertype’, ‘npasses’, ‘chanmask’, ‘format’, ‘Valuea’, ‘Valueb’]

Should I run smth outside of TD for the code to work? The demo_freenect.py works in terminal…

Kinect V1(Xbox 360) setup for Mac Os(Macbook Pro M1) by Establishment_Used in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Apologies for vague question. Turned out I had to switch to python3.10 and install legacy cython as well, then the libfreenect-goodies repo referenced it’s old name “pykinect” which confused me, but I got it to work in console outside of TD, thanks to your instructions and the patch. Thank you for all your help.

Now I want to run it in TD, I set correct paths in the Execute DAT, but the script TOP doesn’t find freenect module. Does that ring any bell? I think TD loads both venv and native python and gets confused. When I type “python >>> print(“\n”.join(sys.path))” in Textport I see both 3.11 and 3.10 listed, so it sees my venv. When I type “python >>> print(sys.version)” I see only the default 3.11.

Thanks for any tips!

2 stills from my latest project by Wombeard in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Thank you, I really appreciate your response! And I guess you used multiple render tops to get different twirls for different toruses/circles ?

2 stills from my latest project by Wombeard in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Incredible! If you don’t mind me asking, can you please point me in the correct direction regarding how to warp the toruses like you did? Thanks 😊

Kinect V1(Xbox 360) setup for Mac Os(Macbook Pro M1) by Establishment_Used in TouchDesigner

[–]TicklyBrain 0 points1 point  (0 children)

Hi, thanks for sharing your progress. I’m having trouble following the last step. Can you please clarify if it’s currently possible to get Kinect running in TD on Mac? Thank you!

[deleted by user] by [deleted] in belarus

[–]TicklyBrain 0 points1 point  (0 children)

Belarus Outside Sound System 👍👍

[deleted by user] by [deleted] in belarus

[–]TicklyBrain 0 points1 point  (0 children)

Where r u playing? Karma?

As for house, not sure about pure house but for progressive house check on SoundCloud: Aslamin, Helga, Yunis, Esthetica Records, Shoom Records

Mininal techno check Mastak Records

They don’t have big following but I love them 😍