Esempio n. 1
0
 /// <summary>
 /// Stop all runing processes, if programm is closed.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainWindow_Closed(object sender, System.EventArgs e)
 {
     MidiController.Close();
     MidiInputCtrl.Close();
     PbCtrl.Disconnect();
     OscCtrl.Close();
 }
Esempio n. 2
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            Core.SetWnd(this);
            CuelistCtrl.Init();
            FollowCtrl.Init();
            GoCtrl.Init();
            LogCtrl.Init();
            LogCtrl.Status("CueController 3.43b");
            MidiController.Init();
            MidiInputCtrl.Init();
            MidiOutputCtrl.Init();
            PbCtrl.Init();
            BeamerlistCtrl.Init();
            RecentFilesCtrl.Init();
            ReadWriteCtrl.Init();
            MatrixCtrl.Init();
            ScriptlistCtrl.Init();
            CopyCutCtrl.Init();
            OscCtrl.Init();
            OscListCtrl.Init();

            string[] args = Environment.GetCommandLineArgs();
            if (args.Length >= 2)
            {
                ReadWriteCtrl.Read(args[1]);
            }
        }
Esempio n. 3
0
 void Start()
 {
     // Setup dropdown menu options and change handler
     dropdown = GetComponent <Dropdown>();
     dropdown.AddOptions(MidiInputCtrl.AvailableMidiDevices());
     dropdown.onValueChanged.AddListener(delegate { OnValueChangedHandler(dropdown); });
 }
Esempio n. 4
0
    public void ListMidiDevices()
    {
        UnityEngine.Debug.unityLogger.logEnabled = true;
        var devices = MidiInputCtrl.AvailableMidiDevices();

        foreach (var d in devices)
        {
            UnityEngine.Debug.Log(string.Format("Midi Input Device: {0}", d));
        }
    }
Esempio n. 5
0
 private void NoteMuteButton_Click(object sender, RoutedEventArgs e)
 {
     if (MidiInputCtrl.noteMute)
     {
         MidiInputCtrl.NoteMute(false);
     }
     else
     {
         MidiInputCtrl.NoteMute(true);
     }
 }
Esempio n. 6
0
    public void Connect(string deviceName)
    {
        int midiIndex = MidiInputCtrl.AvailableMidiDevices().IndexOf(deviceName);

        UnityEngine.Debug.Log("Connecting to " + deviceName);
        if (midiIndex == -1)
        {
            throw new System.ArgumentException("Invalid Midi Input Device Name");
        }

        midiInput = new InputDevice(midiIndex);
        midiInput.ChannelMessageReceived += HandleChannelMessageReceived;
    }
Esempio n. 7
0
    private GameObject completedMenu;                           // The instantiated completed menu game object

    void Awake()
    {
        //Implement Psuedo-Singleton
        if (Control == null)
        {
            DontDestroyOnLoad(gameObject);
            Control = this;
        }
        else if (Control != this)
        {
            Destroy(gameObject);
        }

        //Initialize Midi In (so objects can subscribe to it upon load)
        MidiIn = new MidiInputCtrl();

        //Initialize Logger
        Logger = new LogWriter();
    }
Esempio n. 8
0
        public static void ExecuteCueSend(Cue cue)
        {
            if (cue.send != null)
            {
                switch (cue.send.type)
                {
                case SendType.NOTE:
                    MidiOutputCtrl.SendNote(cue.send.note);
                    break;

                case SendType.MATRIX:
                    MatrixCtrl.SendMatrixCmd(cue.send.matrixCmd);
                    break;

                case SendType.MSC:
                    MidiOutputCtrl.SendMSC(cue.send.mscCmd);
                    break;

                case SendType.MUTE:
                    switch (cue.send.mute.Item1)
                    {
                    case MuteType.ALL:
                        MidiInputCtrl.NoteMute(cue.send.mute.Item2);
                        MidiInputCtrl.MscMute(cue.send.mute.Item2);
                        OscCtrl.OscMute(cue.send.mute.Item2);
                        break;

                    case MuteType.MSC:
                        MidiInputCtrl.MscMute(cue.send.mute.Item2);
                        break;

                    case MuteType.NOTE:
                        MidiInputCtrl.NoteMute(cue.send.mute.Item2);
                        break;

                    case MuteType.OSC:
                        OscCtrl.OscMute(cue.send.mute.Item2);
                        break;
                    }
                    break;

                case SendType.SC:
                    PbCtrl.Play(cue.send.pbCue);
                    break;

                case SendType.SCRIPT:
                    ScriptlistCtrl.ExecuteScript(cue.send.scriptNr);
                    break;

                case SendType.SHUTTER:
                    BeamerlistCtrl.Shutter(cue.send.beamerShutter.Item1, cue.send.beamerShutter.Item2);
                    break;

                case SendType.PB:
                    PbCtrl.ExecuteCmd(cue.send.pbCmd);
                    break;

                case SendType.OSC:
                    OscCtrl.Send(cue.send.oscCmd);
                    break;
                }
            }
        }
Esempio n. 9
0
 private void UnmuteMidiButton_Click(object sender, RoutedEventArgs e)
 {
     MidiInputCtrl.NoteMute(false);
     MidiInputCtrl.MscMute(false);
     OscCtrl.OscMute(false);
 }