It would save me a lot of time and avoid human error if I could add macros to a theme from code in Unity.
Here is my use case: I’m making a game that involves portal doors that connect a set of pocket dimensions. I have an instrument (a performer) in each discrete space, and I mute the volume of that instrument when there are no open doors that connect to that space. This means that whenever I create a need to add and configure a velocity macro for each performer.
Velocity is not the only proscribed macro that I will need to add to each performer in the future.
My portals also allow me to do some scaling shenanigans, so a particular portal might connect to a space, but at twice the normal scale, meaning the instrument in that room would need to drop an octave. So I’ll need to add a pitch macro for each performer, and I will probably add other per-performer macros to support future mechanics.
I know that Reactional Composer has a macro templating system, but this doesn’t significantly help in this use case since the macros I am creating are single block, and I need to edit each to target a specific performer.
Ideally I could write something like this in Unity:
ThemeMacro myMacro = ThemeObject.CreateNewMacro();
myMacro.AddVelocityMultiplierBlock(block params); //Where I specify a particular performer.
Playback.Theme.AddMacro(myMacro);
It would be helpful to access an array of instrument names from a theme to make configuring blocks less error prone.
I hope that it is feasible to add macros like this in script, and it might not be practical for all block types. As I mentioned above, the two blocks I know I would use in script are the velocity multiplier and the octave shifter.
Hi, I will discuss this on the next Roadmap meeting and well get back to you.
Just a quick question, do you have the latest Unity (are yuo in unity) plugin. That has support for some easier way to use the preformers (instruments) in the manager.
Hey there!
This is a great feature which we could add, but we just need to estimate the time,
Would you be able to share some more information about your timeline and the game you’re making?
I’m on luke.ritchie@reactionalmusic.com if you wanted to email me, or you’re welcome to post it here.
Best wishes,
Luke
I don’t think I will be integrating a great deal of music for at least another year. I should stress that this isn’t a blocker for me, but something that will reduce the amount of busywork that I do, and make it easier for me to maintain theme projects. I actually have another feature request that will be more useful to me in the near-term. I will write it up now.
I have thought of a scenario that highlights what I am getting at. Let’s say I have 10 themes in my game, each with an average of 5 performers. I need to add 2 macros for each performer, one to control volume and another to shift octave. That’s 100 simple macros that I need to configure by hand, which is not so bad if I add them piecemeal over the course of development.
But then let’s say that I want to make a universal tweak to one or both of the macros. I don’t want to go through and edit all 100 macros by hand. What if I want to add a 3rd or 4th macro to each performer?
With the right API interface, I think I could add simple macros like this in one to two dozen lines of code at most. Most levels will not need all the controls, so the logic could even avoid adding unused macros to themes after it is loaded in.