use of blue.automation.Automatable in project blue by kunstmusik.
the class CSDRender method getStringChannels.
private ArrayList<StringChannel> getStringChannels(Arrangement arrangement, StringChannelNameManager scnm) {
ArrayList<StringChannel> params = new ArrayList<>();
for (int i = 0; i < arrangement.size(); i++) {
InstrumentAssignment ia = arrangement.getInstrumentAssignment(i);
if (ia.enabled) {
Instrument instr = ia.instr;
if (instr instanceof Automatable) {
Automatable auto = (Automatable) instr;
ArrayList<StringChannel> stringChannels = auto.getStringChannels();
if (stringChannels != null) {
params.addAll(stringChannels);
}
}
}
}
for (StringChannel strChannel : params) {
strChannel.setChannelName(scnm.getUniqueStringChannel());
}
return params;
}
use of blue.automation.Automatable in project blue by kunstmusik.
the class ParameterHelper method clearCompilationVarNames.
public static void clearCompilationVarNames(BlueData data) {
Arrangement arrangement = data.getArrangement();
for (int i = 0; i < arrangement.size(); i++) {
Instrument instr = arrangement.getInstrument(i);
if (instr instanceof Automatable) {
Automatable temp = (Automatable) instr;
temp.getParameterList().clearCompilationVarNames();
}
}
Mixer mixer = data.getMixer();
List<Channel> channels = mixer.getAllSourceChannels();
for (Channel channel : channels) {
clearChannelCompilationVar(channel);
}
ChannelList subChannels = mixer.getSubChannels();
for (Channel subChannel : subChannels) {
clearChannelCompilationVar(subChannel);
}
clearChannelCompilationVar(mixer.getMaster());
}
use of blue.automation.Automatable in project blue by kunstmusik.
the class ParameterHelper method getActiveParameters.
public static List<Parameter> getActiveParameters(Arrangement arr, Mixer mixer) {
List<Parameter> params = new ArrayList<>();
for (int i = 0; i < arr.size(); i++) {
InstrumentAssignment ia = arr.getInstrumentAssignment(i);
if (ia.enabled) {
Instrument instr = ia.instr;
if (instr instanceof Automatable) {
Automatable auto = (Automatable) instr;
ParameterList list = auto.getParameterList();
addActiveParametersFromList(params, list);
}
}
}
if (mixer != null && mixer.isEnabled()) {
List<Channel> channels = mixer.getAllSourceChannels();
for (Channel channel : channels) {
appendParametersFromChannel(params, channel);
}
ChannelList subChannels = mixer.getSubChannels();
for (Channel subChannel : subChannels) {
appendParametersFromChannel(params, subChannel);
}
appendParametersFromChannel(params, mixer.getMaster());
}
return params;
}
use of blue.automation.Automatable in project blue by kunstmusik.
the class ParameterHelper method appendParametersFromChannel.
private static void appendParametersFromChannel(List<Parameter> params, Channel channel) {
EffectsChain pre = channel.getPreEffects();
for (int i = 0; i < pre.size(); i++) {
ParameterList list = ((Automatable) pre.getElementAt(i)).getParameterList();
addActiveParametersFromList(params, list);
}
EffectsChain post = channel.getPostEffects();
for (int i = 0; i < post.size(); i++) {
ParameterList list = ((Automatable) post.getElementAt(i)).getParameterList();
addActiveParametersFromList(params, list);
}
if (channel.getLevelParameter().isAutomationEnabled()) {
params.add(channel.getLevelParameter());
}
}
use of blue.automation.Automatable in project blue by kunstmusik.
the class ParameterHelper method getAllParameters.
public static ArrayList<Parameter> getAllParameters(Arrangement arr, Mixer mixer) {
ArrayList<Parameter> params = new ArrayList<>();
for (int i = 0; i < arr.size(); i++) {
InstrumentAssignment ia = arr.getInstrumentAssignment(i);
if (ia.enabled) {
Instrument instr = ia.instr;
if (instr instanceof Automatable) {
Automatable auto = (Automatable) instr;
ParameterList list = auto.getParameterList();
params.addAll(list);
}
}
}
if (mixer != null && mixer.isEnabled()) {
List<Channel> channels = mixer.getAllSourceChannels();
for (Channel channel : channels) {
appendAllParametersFromChannel(params, channel);
}
ChannelList subChannels = mixer.getSubChannels();
for (Channel channel : subChannels) {
appendAllParametersFromChannel(params, channel);
}
appendAllParametersFromChannel(params, mixer.getMaster());
}
return params;
}
Aggregations