//
        public static TransitionScenario CreateFromJSON(JSONObject json)
        {
            var scen	= new TransitionScenario();

            json.GetField("intro", (intro) =>
                {
                    var list	= intro.list;
                    var count	= list.Count;
                    for(var i = 0; i < count; i++)
                    {
                        var auto	= Engine.Utils.ParseAutomationFromJSON(list[i]);
                        scen.AddIntroAutomation(auto);
                    }
                });

            json.GetField("outro", (outro) =>
                {
                    var list	= outro.list;
                    var count	= list.Count;
                    for(var i = 0; i < count; i++)
                    {
                        var auto	= Engine.Utils.ParseAutomationFromJSON(list[i]);
                        scen.AddOutroAutomation(auto);
                    }
                });

            return scen;
        }
        //

        public static TransitionScenario CreateFromJSON(JSONObject json)
        {
            var scen = new TransitionScenario();

            json.GetField("intro", (intro) =>
            {
                var list  = intro.list;
                var count = list.Count;
                for (var i = 0; i < count; i++)
                {
                    var auto = Engine.Utils.ParseAutomationFromJSON(list[i]);
                    scen.AddIntroAutomation(auto);
                }
            });

            json.GetField("outro", (outro) =>
            {
                var list  = outro.list;
                var count = list.Count;
                for (var i = 0; i < count; i++)
                {
                    var auto = Engine.Utils.ParseAutomationFromJSON(list[i]);
                    scen.AddOutroAutomation(auto);
                }
            });

            return(scen);
        }
Esempio n. 3
0
        public static TransitionScenario GenTestScenario()
        {
            var scen = new TransitionScenario();

            var intro_vol = new Automation();

            intro_vol.targetParam = Automation.TargetParam.Volume;
            intro_vol.AddPoint(0, 0);
            intro_vol.AddPoint(1, 1);
            scen.AddIntroAutomation(intro_vol);

            var outro_vol = new Automation();

            outro_vol.targetParam = Automation.TargetParam.Volume;
            outro_vol.AddPoint(1, 0);
            outro_vol.AddPoint(0, 1);
            scen.AddOutroAutomation(outro_vol);

            return(scen);
        }
Esempio n. 4
0
    void Start()
    {
        Application.targetFrameRate	= -1;

        // TEST : 버퍼 사이즈를 조절해본다.
        var audioSettings			= AudioSettings.GetConfiguration();
        Debug.Log("original buffer size is : " + audioSettings.dspBufferSize);
        //audioSettings.dspBufferSize	= 2048;
        //AudioSettings.Reset(audioSettings);
        //

        m_tracks[0]			= LibSequentiaMain.instance.LoadTrack("libsequentia/data/track1");
        m_tracks[1]			= LibSequentiaMain.instance.LoadTrack("libsequentia/data/track2");

        m_tscen				= LibSequentiaMain.instance.LoadTransitionScenario("libsequentia/data/ts_simpledj");

        LibSequentiaMain.instance.tension	= 1;

        var track1	= m_tracks[0];
        var track2	= m_tracks[1];

        m_stateSeq.Add(new StepState() { curtrack = track1, step = 1 });
        m_stateSeq.Add(new StepState() { curtrack = track1, step = 2 });
        m_stateSeq.Add(new StepState() { curtrack = track1, step = 3 });
        m_stateSeq.Add(new StepState() { curtrack = track1, step = 4 });
        m_stateSeq.Add(new StepState() { curtrack = track1, step = 5, newtrack = track2, newstep = 1, tscen = m_tscen });
        m_stateSeq.Add(new StepState() { curtrack = track1, step = 6, newtrack = track2, newstep = 2, tscen = m_tscen });
        m_stateSeq.Add(new StepState() { curtrack = track1, step = 7, newtrack = track2, newstep = 3, tscen = m_tscen });
        m_stateSeq.Add(new StepState() { curtrack = track2, step = 4 });
        m_stateSeq.Add(new StepState() { curtrack = track2, step = 5 });
        m_stateSeq.Add(new StepState() { curtrack = track2, step = 6 });
        m_stateSeq.Add(new StepState() { curtrack = track2, step = 7 });
    }
Esempio n. 5
0
        public static TransitionScenario GenTestScenario2()
        {
            var scen				= new TransitionScenario();

            var intro_vol			= new Automation();
            intro_vol.targetParam	= Automation.TargetParam.Volume;
            intro_vol.AddPoint(0, 0);
            intro_vol.AddPoint(0.5f, 1);
            intro_vol.AddPoint(1.0f, 1);
            scen.AddIntroAutomation(intro_vol);
            var intro_lowcut		= new Automation();
            intro_lowcut.targetParam	= Automation.TargetParam.LowCut;
            intro_lowcut.AddPoint(0, 1);
            intro_lowcut.AddPoint(0.5f, 1);
            intro_lowcut.AddPoint(0.5f, 0);
            intro_lowcut.AddPoint(1, 0);
            scen.AddIntroAutomation(intro_lowcut);

            var outro_vol			= new Automation();
            outro_vol.targetParam	= Automation.TargetParam.Volume;
            outro_vol.AddPoint(0, 1);
            outro_vol.AddPoint(0.5f, 1);
            outro_vol.AddPoint(1, 0);
            scen.AddOutroAutomation(outro_vol);
            var outro_lowcut		= new Automation();
            outro_lowcut.targetParam	= Automation.TargetParam.LowCut;
            outro_lowcut.AddPoint(0, 0);
            outro_lowcut.AddPoint(0.5f, 0);
            outro_lowcut.AddPoint(0.5f, 1);
            outro_lowcut.AddPoint(1, 1);
            scen.AddOutroAutomation(outro_lowcut);

            return scen;
        }