How to add a UComponent class to a Blueprint Macro Library?

Hi all,

I’m quite new to UE4 and I’m trying to develop a system for procedurally generated sound effects. Ideally I’d like to code my own oscillators/effects as Synth Components/Source Effects, then use these components in the graph editor to generate my sound effect. I would then save that as a Blueprint Macro Library so I can simply add my graph to any actor and just drag and drop the actor in the scene to hear the sound effect generated in real time. So far, I’ve managed to create a simple beeping noise inside an Actor Blueprint class.

I am now trying to use macros to implement the functionality I described above.
I noticed that I can collapse my graph in a macro node which is quite useful. The problem is how do i use this macro inside another actor? I have found nothing online or in the documentation about doing this.

I also tried creating my sound generation graph directly inside a Blueprint Macro Library, but for some reason it won’t let me add my custom Synth. In fact I can’t add any components, just default nodes. In the normal actor blueprint editor, there is a pane on the left side with an “Add Component” button, but in the Blueprint Macro Library editor there’s nothing there.

Any help?

Macros are only really collections of nodes, you can’t put components etc in there.

I’m not entirely sure, but I think you might have more joy if you put all this functionality into a BP actor, and then use class inheritance to pass it to other actors. IE, make child actors from it.

Thanks for your answer.
Unfortunately that doesn’t work for me because if I make a child actor I can’t edit the parameters of the sound generator inside of that actor, to do so I’d have to directly edit the parent class which kinda defeats to purpose. Is there any other way to do this?

I don’t know how you’re setting the generator up, but presumably you do that using variable, which of course can be different in the child.

Could you clarify what you mean be using “variables”? Do you mean those that you can add under “my blueprint”? For reference, this is my event graph for the sound effect generator:

There are two variables, frequency and interval. This is what I see when I create a child from this class:

Where can I access and change the frequency and interval parameters in this child actor blueprint? I tried playing with the sliders under “Default” on the right pane but that didn’t change anything.

Again, thanks for your help

No, I don’t mean child inside another blueprint. I mean to make an actor which fulfils all your expectations, the make child blueprints from that:

Here’s something about inheritance: