Search in sources :

Example 6 with INoteInput

use of de.mossgrabers.framework.daw.midi.INoteInput in project DrivenByMoss by git-moss.

the class AbstractControllerSetup method createNoteRepeatObservers.

protected void createNoteRepeatObservers(final C conf, final S surface) {
    final INoteInput defaultNoteInput = surface.getMidiInput().getDefaultNoteInput();
    if (defaultNoteInput == null)
        return;
    final INoteRepeat noteRepeat = defaultNoteInput.getNoteRepeat();
    conf.addSettingObserver(AbstractConfiguration.NOTEREPEAT_ACTIVE, () -> noteRepeat.setActive(conf.isNoteRepeatActive()));
    conf.addSettingObserver(AbstractConfiguration.NOTEREPEAT_PERIOD, () -> noteRepeat.setPeriod(conf.getNoteRepeatPeriod().getValue()));
    if (this.host.supports(Capability.NOTE_REPEAT_LENGTH))
        conf.addSettingObserver(AbstractConfiguration.NOTEREPEAT_LENGTH, () -> noteRepeat.setNoteLength(conf.getNoteRepeatLength().getValue()));
    if (this.host.supports(Capability.NOTE_REPEAT_MODE))
        conf.addSettingObserver(AbstractConfiguration.NOTEREPEAT_MODE, () -> noteRepeat.setMode(conf.getNoteRepeatMode()));
    if (this.host.supports(Capability.NOTE_REPEAT_OCTAVES))
        conf.addSettingObserver(AbstractConfiguration.NOTEREPEAT_OCTAVE, () -> noteRepeat.setOctaves(conf.getNoteRepeatOctave()));
}
Also used : INoteRepeat(de.mossgrabers.framework.daw.midi.INoteRepeat) INoteInput(de.mossgrabers.framework.daw.midi.INoteInput)

Aggregations

INoteInput (de.mossgrabers.framework.daw.midi.INoteInput)6 INoteRepeat (de.mossgrabers.framework.daw.midi.INoteRepeat)3 IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)2 BeatstepControlSurface (de.mossgrabers.controller.arturia.beatstep.controller.BeatstepControlSurface)1 GenericFlexiConfiguration (de.mossgrabers.controller.generic.GenericFlexiConfiguration)1 FlexiCommand (de.mossgrabers.controller.generic.controller.FlexiCommand)1 GenericFlexiControlSurface (de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface)1 ActionHandler (de.mossgrabers.controller.generic.flexihandler.ActionHandler)1 BrowserHandler (de.mossgrabers.controller.generic.flexihandler.BrowserHandler)1 ClipHandler (de.mossgrabers.controller.generic.flexihandler.ClipHandler)1 DeviceHandler (de.mossgrabers.controller.generic.flexihandler.DeviceHandler)1 EqHandler (de.mossgrabers.controller.generic.flexihandler.EqHandler)1 FxTrackHandler (de.mossgrabers.controller.generic.flexihandler.FxTrackHandler)1 GlobalHandler (de.mossgrabers.controller.generic.flexihandler.GlobalHandler)1 LayoutHandler (de.mossgrabers.controller.generic.flexihandler.LayoutHandler)1 MarkerHandler (de.mossgrabers.controller.generic.flexihandler.MarkerHandler)1 MasterHandler (de.mossgrabers.controller.generic.flexihandler.MasterHandler)1 MidiCCHandler (de.mossgrabers.controller.generic.flexihandler.MidiCCHandler)1 ModesHandler (de.mossgrabers.controller.generic.flexihandler.ModesHandler)1 NoteInputHandler (de.mossgrabers.controller.generic.flexihandler.NoteInputHandler)1