예제 #1
0
        void DoUpdate()
        {
            UpdatePosition();

            if (length != currentLength)
            {
                if (reference != IntPtr.Zero)
                {
                    Native.HelmAllNotesOff(currentChannel);
                    Native.ChangeSequencerLength(reference, length);
                }
                currentLength = length;
            }
            if (channel != currentChannel)
            {
                if (reference != IntPtr.Zero)
                {
                    Native.HelmAllNotesOff(currentChannel);
                    Native.ChangeSequencerChannel(reference, channel);
                }
                currentChannel = channel;
            }
            if (loop != currentLoop)
            {
                if (reference != IntPtr.Zero)
                {
                    Native.LoopSequencer(reference, loop);
                }
                currentLoop = loop;
            }
        }
예제 #2
0
        void Awake()
        {
            InitNoteRows();
            CreateNativeSequencer();
            Native.ChangeSequencerChannel(reference, channel);
            Native.ChangeSequencerLength(reference, length);

            for (int i = 0; i < allNotes.Length; ++i)
            {
                foreach (Note note in allNotes[i].notes)
                {
                    note.TryCreate();
                }
            }
            AllNotesOff();
        }
예제 #3
0
        void Awake()
        {
            InitNoteRows();
            CreateNativeSequencer();
            Native.ChangeSequencerChannel(reference, channel);
            Native.ChangeSequencerLength(reference, length);

            for (int i = 0; i < allNotes.Length; ++i)
            {
                foreach (Note note in allNotes[i].notes)
                {
                    note.TryCreate();
                }
            }
            AllNotesOff();
            Native.SyncSequencerStart(reference, 0.0);
            syncTime = AudioSettings.dspTime;
        }