Batch edit redondant blueprints?

Hi,
I’m working on a MIDI piano animation, where I have 3 functions for each notes.
I want it to be nicely animated so I use timelines.

The issue is that I have 88 noets, so I need 264 timelines and I’ll need to do the same process of copying nodes 264 times.
Is there any way to automate that process ?

Subsidiary question : Could I have used only 3 timelines, and each notes would’ve used a different instance of it with some multithreading ? (It has to keep track of the timelines because when starting the animation for a note, let’s say pressing anim, it has to stop every animation happening on the same note, like the release).

If anyone has an idea I’d love to hear more about it !

Thanks a lot :slight_smile:

You only have to make one note, then the others are just instances of that.

Are you using the timeline to move the key down and up?

Hi !
Thanks for your answer :slight_smile:

Yes that’s what I’m actually doing.
The issue is that every notes are in the same blueprint, is it still possible or does everything has to be separated ?
Other thing : Can it be an instance if it doesn’t share the same mesh ?

You need to make the mesh and note played etc configurable aspects of the original BP.

So you set them in the construction script, and expose the mesh and note etc as variables that can be edited on placement.

Thanks a lot, but it’s a little bit hard to understand for me.
Would you have any video that could help me ?

If I get it right, I need to edit the main blueprint that will place every notes manually ?
Then note after note it will create an instance of a note BP (which has the movement script in it)
Afterwards I create a Midi BP that ill listen to midi devices and trigger each corresponding notes ?

What are the differences between the notes?

Black or white key? The note they play? Apart from that they’re all the same, no?

Use macros or functions, or inheritance, functions and variables.

get repeating code into macro, expose variables.

Or post some pictures of your code, i bet somebody will reply with picture how you should do macro for that.

There are 3 different model for white notes, and then black and white. So that’s 4 different types.
I guess if it parses a txt file, where A, B, C, D represents each type of notes it might be doable.
But I have not clue on how to do this right now : spawn a mesh component that is a child of a note class ? This mother class would have editable mesh and one function that could be called from the midi blueprint. Is it possible ?

Thanks a lot, but I can do function of only parts of code : I can’t put a timeline into a function

Ok.

You don’t need to spawn or anything like that.

You have a note BP with the key mesh and the note it needs to play, right?

Just don’t set the mesh yet, leave it blank and make it a ‘instance editable’ parameter. Same with the note.

Then, when you drag the note into the scene, you set the mesh and the note.

You could do it with a data table of all the meshes and notes, but getting that working would probably take longer than just setting up the keyboard as above.

Here’s something about the construction script and instance editable variables

I get it, thanks a lot, but as you say it might take longer than doing the work manually ^^
It would be a proper way to do it thought

1 Like