Search in sources :

Example 11 with ChannelList

use of blue.mixer.ChannelList in project blue by kunstmusik.

the class BlueProjectPropertyChangeListener method attachListeners.

protected void attachListeners(BlueProject project) {
    if (project == null) {
        return;
    }
    Score score = project.getData().getScore();
    Mixer mixer = project.getData().getMixer();
    for (LayerGroup<? extends Layer> lg : score) {
        if (lg instanceof AudioLayerGroup) {
            AudioLayerGroup alg = (AudioLayerGroup) lg;
            ChannelList channelList = findChannelListForAudioLayerGroup(mixer, alg);
            lg.addLayerGroupListener(layerGroupListener);
            AudioLayerGroupBinding binding = new AudioLayerGroupBinding(alg, channelList);
            layerGroupBindings.put(alg, binding);
            for (AudioLayer layer : alg) {
                Channel channel = ChannelList.findChannelByAssociation(channelList, layer.getUniqueId());
                if (channel != null) {
                    layerBindings.put(layer, new AudioLayerChannelBinding(layer, channel));
                }
            }
        }
    }
    score.addListener(scoreListener);
}
Also used : Score(blue.score.Score) Mixer(blue.mixer.Mixer) Channel(blue.mixer.Channel) AudioLayerChannelBinding(blue.score.layers.audio.ui.bindings.AudioLayerChannelBinding) AudioLayerGroup(blue.score.layers.audio.core.AudioLayerGroup) ChannelList(blue.mixer.ChannelList) AudioLayerGroupBinding(blue.score.layers.audio.ui.bindings.AudioLayerGroupBinding) AudioLayer(blue.score.layers.audio.core.AudioLayer)

Aggregations

ChannelList (blue.mixer.ChannelList)11 Channel (blue.mixer.Channel)8 InstrumentAssignment (blue.InstrumentAssignment)4 Mixer (blue.mixer.Mixer)4 Instrument (blue.orchestra.Instrument)4 ArrayList (java.util.ArrayList)4 Arrangement (blue.Arrangement)3 Automatable (blue.automation.Automatable)3 Parameter (blue.automation.Parameter)2 ParameterList (blue.automation.ParameterList)2 BlueData (blue.BlueData)1 LinePoint (blue.components.lines.LinePoint)1 BlueProject (blue.projects.BlueProject)1 Score (blue.score.Score)1 AudioLayer (blue.score.layers.audio.core.AudioLayer)1 AudioLayerGroup (blue.score.layers.audio.core.AudioLayerGroup)1 AudioLayerChannelBinding (blue.score.layers.audio.ui.bindings.AudioLayerChannelBinding)1 AudioLayerGroupBinding (blue.score.layers.audio.ui.bindings.AudioLayerGroupBinding)1 PolyObject (blue.soundObject.PolyObject)1 Point (java.awt.Point)1