Clockworx Music Nodes - some issues to solve

My developer skills are pretty much zero, so I haven’t been able to offer any help as I follow the development, but I will say this project looks cool!

I know Animation Nodes won’t allow the ‘wrong’ types of sockets to connect, but not specifically how.

1 Like

Ahah! I have sorted it so sockets only connect to others of the same kind, other than Generic sockets, which can connect to anything else!

So, whilst I was laying under my old lady doing a repetitive task that required little brain power, I solved the issue. Now before you all get the wrong end of the stick, I should point out that by “my old lady” I am referring to my glider and obviously not Mrs. Clockmender (some people’s minds…tut, tut), I hope that is all clear now. :roll_eyes:

Speaking of which, or is that witch? :rofl: when I got home I explained to Mrs. C. how I was going to sort the problem, to which she replied that what I had come up with was in fact the correct solution and that she had not told me earlier of this, because she felt it would be better for me if I worked it out for myself. This is presumably what has happened here also… :stuck_out_tongue_closed_eyes:

As a side issue I also found out how to automatically colour code the nodes based upon what they do:

Whilst you might say that the colours are bloody awful, at least they have proved the point and can be changed. :wink:

I have not posted my new nodes onto GitHub yet, I may do this some time next week once I have finished playing around with them, the nodes that is. :face_with_hand_over_mouth:

Cheers, Clock. :tumbler_glass: :crazy_face:


Next thing on my ToDo list was Baking Sound to Controls:

Successfully accomplished, you can specify the sound file, the maximum frequency range, the number of frequency splits (I use harmonic splits based upon the n/12th root of 0.5) and a host of other factors to bake a sound to the controls’ F-Curves.

These controls can then be used to animate objects, although I have not done that in a project yet, but do have the necessary nodes in place already, these are the ones I use to animate from MIDI controls.

Cheers, Clock. :tumbler_glass:

PS. As a bonus, I also worked out how to switch the context to different editors…

Here are the F-Curves in the Graph Editor:

Yay! :joy: - sound-bake animated objects:


hey clocking mate, I think the time has come to do that famous screen recording that shows the results at the rhythm of music :grin:


Soon! I have not resolved the issue of rendering an animation, currently the nodes are not executing between frames when you render animation, although if I render a frame, then advance the Timeline, then render the next frame, they are actioned. So I have two options:

  • Work out how the “fudge” to get the Blender render animation to work.

  • Write a simple Render Animation routine where the Timeline is advanced and each frame rendered and the image saved to disc, this I can do quite easily (I hope).

I have one more thing to do before I do a video, which I will record with my camera so you can see the MIDI controller in action, then I will make a compilation of the various bits, like sound production, DAW, Live MIDI, Sound Bake, Sound Animate, etc. That thing is to built the DAW notes from a MIDI file, I have all the code I need in various bits - the ones that Bake the MIDI file to controls.

So, a little patience please and we will get there, there is no manual for this stuff, I am having to experiment all the time to get things to work, sometimes it takes hours to get a “simple” thing to work.

Cheers, Clock. :dancer:

PS. Screen Capture videos on my Mac are not going to to work as “Mac” wants to record at 60fps and that taxes the CPU for this stuff…

1 Like

This is part of The Entertainer by Scott Joplin taken from a MIDI file I played, these notes took a billionth of a second to write with the new function on the MIDI Bake node:

OK, done that, I am rapidly running to of excuses not to produce a “Features” video…

Cheers, Clock. :dancer:


Still not cured the cursed render animation issue, but then I understand it took @jacqueslucke something like 2.5 millennia and a Cray computer to cure the problem with Animation nodes…


I’m also eagerly waiting for a video demo!

Regarding rendering the animation, I often use this simple script that I wrote:

import bpy

scene = bpy.context.scene
fp = scene.render.filepath
current_frame = bpy.context.scene.frame_current
frames = range(1, 100)

for i in frames:
    scene.render.filepath = fp + str(i)
    bpy.ops.render.render(write_still = True)
scene.render.filepath = fp

Before the Animation Nodes rendering issue was solved, this worked well to render animations with it.

1 Like

Sir, you are a star, I will try this out later today!, pity I can only give you one “Like” for this…


Brilliant! here is the result, note the timeline has advanced and the animation has worked, I will output a video later, but this worked, although I made a node of it and altered a few things:

Thank you many times… :joy:

Here is my Operator code:

import bpy

class CM_OT_RenderAnimation(bpy.types.Operator):
    bl_idname = "cm_audio.render_animation"
    bl_label = "Render Animation"

    def poll(cls, context):
        cm_node = context.node
        return cm_node.render_dir not in ["", "//"]

    def execute(self, context):
        scene = context.scene
        cm_node = context.node
        path = bpy.path.abspath(cm_node.render_dir)
        scene.render.filepath = path
        bpy.context.scene.frame_current = cm_node.strt_frame

        for i in range(cm_node.strt_frame, cm_node.stop_frame + 1):
            scene.render.filepath = f"{path}render{i}"
            bpy.ops.render.render(write_still = True)

        return {"FINISHED"}

No sound yet, but here is a sample:

Cheers, Clock.


Yay! First Time Ever I Used These Nodes:

All done with CMN from the MIDI file; sound, animation & render. :notes: :film_strip: :film_projector: :thinking:

A bit primitive, but one must start somewhere…

Cheers, Clock :tumbler_glass: :dancer:

@nokipaike - it’s a start for a video…


Done with the Sound Bake Node. :face_with_hand_over_mouth: :hear_no_evil:


Next item on the ToDo was to animate Shapekeys using MIDI Controls:

So, here I have used the drum track from “First Time…” to animate this mesh, it has a shapekey for each drum note. I have also revised the Collection and Object nodes so they use PointerProperties (“it’s about frickin’ time you worked that one out Clock”), but maintained the “Object(s): Filtered” node so you can still make a list of objects using a search string, same goes for my “Collection(s): Filtered” node. The index of -1 means all objects BTW, not the last one…

Cheers, Clock. :stuffed_flatbread:

PS. I really appreciate the “likes”


Now, one thing is still vexing me. If I alter a node, like add a new socket, etc. I have to delete the node in my projects and add it in again. Is there a way for the nodes to automatically update in the project, if I change the node code. I expect to have to exit Blender and re-start, things like props in the appropriate section def draw_buttons() do update, but new sockets don’t.

Anyway I will see if anyone knows this, otherwise I guess I just keep endlessly trawling the 'net…

Cheers, Clock.

Video from the Shapekey setup shown above:

Cheers, Clock. :service_dog: :footprints: :poop:

PS. I now have a Material input node to apply materials to the DAW notes generator:

PPS. I haven’t cured the refresh thing yet…


do you see that everything starts to take shape? :joy:

1 Like

I am getting there, I have just re-written virtually every node to make the system better & easier to develop and have dropped the Live Sound thing, I cannot get Sounddevice to do exactly what I want and to be honest can’t see the point in it when you can use Bake Sound to make videos… The there is always Audvis add-on, I know it is paid, but I cannot see the point in trying to emulate it.

These new nodes allow me to animate Materials and Colours ,etc. I have also made a Compare node that could be used to change something after a certain frame number for example:

100% • 75% • 50%

Cheers, Clock.

Latest Video:

This one uses the new Bounce node (borrowed from my older AN nodes) to bounce the first two objects and the Frame Ramp node to rotate the cone, here is the node tree:

I have also added a Compare, Condition & Maths nodes to the suite to enable more intricate modification of input signals. I hope to have these new nodes uploaded shortly after some more testing. Some of the new nodes were borrowed from my older AN additions, adapted to the new system. The new system also includes nodes to modify materials’ colours, etc.

I have also re-written a lot of the code so it now uses standard Blender sockets where possible.

Here are some of the other new nodes in a test project:

Cheers, Clock. :upside_down_face:


This node tree switched the colour to the animated blue colour from green on frame 300:

The Condition node uses Input 1 if the Bool is True, else Input 2.


This part of the node tree on this project changes the object colour to red every 18 frames, for one frame only using the Periodic Trigger node:

It also pulses the cone every 24 frames. The Periodic Trigger can trigger at any phase of the Cycle Length, above it is at 0, but this can be changed to say 7 when it will pulse on the 7th frame of each Cycle.

This part of the node tree below uses the Trigonometry node to make an animation based upon both Sine and Cosine functions, causing the object to rotate about 0,0,0 in a 3m radius locus:

I have uploaded these changes to my GitHub now.

Cheers, Clock. :dash: :bomb:

PS. I am going to check that the Condition node can switch sounds generated by the Audio Sounds nodes…


Well, this lot seems to work fine now, I can trigger lots of events and animations by a variety of means:

I have some more testing to do though… I have also altered the Animate Node so it will animate a list of objects, or bones.

Cheers, “Lockdown” Clock. :lock_with_ink_pen:

1 Like

A new test video using the new and modified nodes:

The sound was made with Fruity Loops some years ago, when I still had a Windows machine in my house, now they are banned due to the on-going takeover by the Macs and Ubuntus…

Here is the node tree:

The curve at the front is animated using shapekeys, the rest using the Trig node and other modified inputs/animation modules.

Cheers, Clock. :notes:


I have added a facility to generate Trig based waves in objects:

This might also be useful in PDT, so I will add it to that also. These can be used to interpret sounds, or to provide a path to animate objects along, when the simple wave is converted to a curve. Here I have combined two waves for Sine & Cosine and made a solid from them.

Cheers, Clock. :business_suit_levitating:

1 Like