Esempio n. 1
0
        public static Section GenTestSection2(IAudioClipPack clipPack)
        {
            var section	= new Section();

            // BPM:120, 4/4 -> 1bar = 4beat

            var automations		= TestAutomation();

            var layer1			= Layer.GenTestLayer(clipPack.GetHandle("test-sec2-1"));
            section.m_layers[0]	= layer1;

            var layer2			= Layer.GenTestLayer(clipPack.GetHandle("test-sec2-2"));
            layer2.AddTensionAutomation(automations[1]);
            section.m_layers[1]	= layer2;

            var layer3			= Layer.GenTestLayer(clipPack.GetHandle("test-sec2-3"));
            layer3.AddTensionAutomation(automations[0]);
            section.m_layers[2]	= layer3;

            var layer4			= Layer.GenTestLayer(clipPack.GetHandle("test-sec2-4"));
            layer4.AddTensionAutomation(automations[2]);
            section.m_layers[3]	= layer4;

            section.inTypeNatural	= InType.KickIn;
            section.inTypeManual	= InType.FadeIn;
            section.outTypeNatural	= OutType.LeaveIt;
            section.outTypeManual	= OutType.FadeOut;
            section.doNotOverlapFillIn	= false;

            section.beatFillIn		= 0;
            section.beatStart		= 1 * 4;
            section.beatEnd			= 9 * 4;

            return section;
        }
Esempio n. 2
0
        public static Section GenTestSection2(IAudioClipPack clipPack)
        {
            var section = new Section();

            // BPM:120, 4/4 -> 1bar = 4beat

            var automations = TestAutomation();

            var layer1 = Layer.GenTestLayer(clipPack.GetHandle("test-sec2-1"));

            section.m_layers[0] = layer1;

            var layer2 = Layer.GenTestLayer(clipPack.GetHandle("test-sec2-2"));

            layer2.AddTensionAutomation(automations[1]);
            section.m_layers[1] = layer2;

            var layer3 = Layer.GenTestLayer(clipPack.GetHandle("test-sec2-3"));

            layer3.AddTensionAutomation(automations[0]);
            section.m_layers[2] = layer3;

            var layer4 = Layer.GenTestLayer(clipPack.GetHandle("test-sec2-4"));

            layer4.AddTensionAutomation(automations[2]);
            section.m_layers[3] = layer4;

            section.inTypeNatural      = InType.KickIn;
            section.inTypeManual       = InType.FadeIn;
            section.outTypeNatural     = OutType.LeaveIt;
            section.outTypeManual      = OutType.FadeOut;
            section.doNotOverlapFillIn = false;

            section.beatFillIn = 0;
            section.beatStart  = 1 * 4;
            section.beatEnd    = 9 * 4;

            return(section);
        }
Esempio n. 3
0
        //
        public static Layer CreateFromJSON(JSONObject json, IAudioClipPack clipPack)
        {
            var newlayer		= new Layer();

            var clipname		= json.GetField("clip").str;
            newlayer.clipHandle	= clipPack.GetHandle(clipname);

            json.GetField("tension", (tensionarr) =>
                {
                    var list	= tensionarr.list;
                    var count	= list.Count;
                    for(int i = 0; i < count; i++)
                    {
                        newlayer.AddTensionAutomation(Engine.Utils.ParseAutomationFromJSON(list[i]));
                    }
                });

            return newlayer;
        }
Esempio n. 4
0
        //

        public static Layer CreateFromJSON(JSONObject json, IAudioClipPack clipPack)
        {
            var newlayer = new Layer();

            var clipname = json.GetField("clip").str;

            newlayer.clipHandle = clipPack.GetHandle(clipname);

            json.GetField("tension", (tensionarr) =>
            {
                var list  = tensionarr.list;
                var count = list.Count;
                for (int i = 0; i < count; i++)
                {
                    newlayer.AddTensionAutomation(Engine.Utils.ParseAutomationFromJSON(list[i]));
                }
            });

            return(newlayer);
        }