devNotes 5-01-16 fibo Begin the Beguine

https://kode54.net/bassmididrv/BASSMIDI_Driver_Installation_and_Configuration.htm

https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-unity

http://www.collab.net/downloads/subversion

https://www.youtube.com/user/forierochannel/videos

sdssds1

A Familiar Opponent – Adaptive Music – Asset Sore

http://csharpsynthproject.codeplex.com/

Call backs

shim_120

 

zfsgd17

using UnityEngine;
using System.Collections;
using ProceduralToolkit;
using System.Collections.Generic;
using System.IO;


public class Fibo_Rider : MonoBehaviour
{
    StreamWriter sWrite;

    public ArgosMeshDraft_Fibonacci AMD_Base;

    List<GameObject> gO_List = new List<GameObject>();

    GameObject goMyPivot;
    GameObject goTweenFollower;

    Quaternion qStart;
    Quaternion qEnd;

    int m_startLoc;
    int m_toLoc;
    int m_deltLoc;
    int m_numPoints;
    float m_pathTime;


    public void initFromSpawner(int FibLoc, int delt, int numPoints, float pathTime )
    {
        //sWrite = new StreamWriter("Fibo_Rider4.csv");
        m_startLoc = FibLoc;
        m_deltLoc = delt;
        m_toLoc = FibLoc + delt;
        m_pathTime = pathTime;
        m_numPoints = numPoints;

        GameObject gFibSphere = GameObject.Find("Fibonacci_Sphere");
        ArgosFibonacci aF = gFibSphere.GetComponent<ArgosFibonacci>();
        AMD_Base = aF.aMF_Base;

        Quaternion q0, q1;

        q0 = Quaternion.LookRotation(AMD_Base.funcVerts[m_startLoc].vPos.normalized);
        q1 = Quaternion.LookRotation(AMD_Base.funcVerts[m_toLoc].vPos.normalized);
        transform.rotation = q0;
        transform.position = AMD_Base.funcVerts[FibLoc].vPos;

        goTweenFollower = transform.Find("TweenFollower").gameObject;

        goMyPivot = new GameObject();
        goMyPivot.transform.position = new Vector3(0, 0, 0);
        goMyPivot.transform.rotation = Quaternion.identity;

        transform.SetParent(goMyPivot.transform);
        goTweenFollower.transform.SetParent(transform);//this
        goTweenFollower.transform.position = Vector3.zero;

        qEnd = q1 * Quaternion.Inverse(q0);
        qStart = Quaternion.identity;

        iTween.MoveTo(goTweenFollower, iTween.Hash("x", 1, "time", m_pathTime, "easetype", "easeInOutBack", "onstart", "fibTweenStarted", "onstartparams", "FIB Rider Started...", "onupdate", "fibTweenUpdate", "onupdateparams", FibLoc.ToString(), "oncomplete", "fibTweenComplete", "oncompleteparams", "fib Tween DONE", "onCompleteTarget", gameObject, "onStartTarget", gameObject, "onUpdateTarget", gameObject));

        m_numPoints--;
    }

    void fibTweenStarted(string textToDisplay)
    {
        print("fibTween on Start " + textToDisplay);
    }

    int CBcount = 0;
    float fAccumTime = 0.0f;
    void fibTweenUpdate(string textToDisplay)
    {
        //print("fibTweenUpdate " + textToDisplay + " call count = " + CBcount.ToString() + " pos = " + goTweenFollower.transform.position.x.ToString("F3") + " deltaTime = " + Time.deltaTime.ToString("F3"));

        float sTime = goTweenFollower.transform.position.x;
        goMyPivot.transform.rotation = Quaternion.LerpUnclamped(qStart, qEnd, sTime);

        CBcount++;
    }

    void fibTweenComplete(string textToDisplay)
    {
        Quaternion q0, q1;

        goMyPivot.transform.rotation = Quaternion.LerpUnclamped(qStart, qEnd, 1.0f);

        if (--m_numPoints > 0)
        {
            q0 = Quaternion.LookRotation(AMD_Base.funcVerts[m_toLoc].vPos.normalized); 
            m_toLoc += m_deltLoc;
            q1 = Quaternion.LookRotation(AMD_Base.funcVerts[m_toLoc].vPos.normalized);

            qEnd = q1 * Quaternion.Inverse(q0) * goMyPivot.transform.rotation;
            qStart = goMyPivot.transform.rotation;

            goTweenFollower.transform.position = Vector3.zero;

            iTween.MoveTo(goTweenFollower, iTween.Hash("x", 1, "time", m_pathTime, "easetype", "easeInOutBack", "onstart", "fibTweenStarted", "onstartparams", "FIB Rider Started...", "onupdate", "fibTweenUpdate", "onupdateparams", m_toLoc.ToString(), "oncomplete", "fibTweenComplete", "oncompleteparams", "fib Tween DONE", "onCompleteTarget", gameObject, "onStartTarget", gameObject, "onUpdateTarget", gameObject));
        }
    }

	void Update ()
    {
	
	}
}

//public enum EaseType
//{
//    easeInQuad,
//    easeOutQuad,
//    easeInOutQuad,
//    easeInCubic,
//    easeOutCubic,
//    easeInOutCubic,
//    easeInQuart,
//    easeOutQuart,
//    easeInOutQuart,
//    easeInQuint,
//    easeOutQuint,
//    easeInOutQuint,
//    easeInSine,
//    easeOutSine,
//    easeInOutSine,
//    easeInExpo,
//    easeOutExpo,
//    easeInOutExpo,
//    easeInCirc,
//    easeOutCirc,
//    easeInOutCirc,
//    linear,
//    spring,
//    /* GFX47 MOD START */
//    //bounce,
//    easeInBounce,
//    easeOutBounce,
//    easeInOutBounce,
//    /* GFX47 MOD END */
//    easeInBack,
//    easeOutBack,
//    easeInOutBack,
//    /* GFX47 MOD START */
//    //elastic,
//    easeInElastic,
//    easeOutElastic,
//    easeInOutElastic,
//    /* GFX47 MOD END */
//    punch
//}

 

using UnityEngine;
using System.Collections;
using ProceduralToolkit;
using UnityEngine.UI;
using System.Collections.Generic;
using System.IO;

public class ArgosFibonacci : MonoBehaviour
{
    public float m_fRadius = 1.5f;
    public int numQuads = 2500;

    public ArgosMeshDraft_Fibonacci aMF_Base = new ArgosMeshDraft_Fibonacci();
    public ArgosMeshDraft_Fibonacci aMF_Full = new ArgosMeshDraft_Fibonacci();

    StreamWriter sWrite;

    public Slider SFibonacci;
    public Text sFibText_Val;

    public GameObject vert_Prefab;

    public class GO_Tracker
    {
        public GameObject go;
        public FibVert fV_FuncVert;
    }

    public List<GO_Tracker> lstFIB_GO = new List<GO_Tracker>();

    void Start ()
    {
        //sWrite = new StreamWriter("Argos_Fibonacci.cs.txt");

        aMF_Full.Clear();

        Quaternion q;
        Vector3 vN_In;

        sphere_fibonacci_build_cartesian(numQuads);

        Vector3[] v = new Vector3[4];

        for (int i = 0; i < aMF_Base.funcVerts.Count; i++)
        {
            vN_In = aMF_Base.funcVerts[i].vPos;
            q = Quaternion.LookRotation(vN_In);

            Vector3 targetright = q * Vector3.right;
            Vector3 targetUp = q * Vector3.up;

            float scl = 1.334f*m_fRadius/Mathf.Sqrt((float)numQuads);

            v[0] = vN_In - scl * targetright - scl * targetUp;
            v[1] = vN_In - scl * targetright + scl * targetUp;
            v[2] = vN_In + scl * targetright + scl * targetUp;
            v[3] = vN_In + scl * targetright - scl * targetUp;

            aMF_Full.Add(MeshDraft.Quad(v[0], v[1], v[2], v[3]));
        }
        GetComponent<MeshFilter>().mesh = aMF_Full.ToMesh();


        //foreach (GO_Tracker gActedUpon in lstFIB_GO)
        //{
        //    gActedUpon.go.transform.position = gActedUpon.fV_FuncVert.vPos;
        //}
    }

    public void onSliderChanged()
    {
        float val = SFibonacci.value;
        sFibText_Val.text = val.ToString();
        Quaternion q;
        Vector3 v;

        int num = lstFIB_GO.Count;

        for (int i = 0; i < num; i++)
        {
            lstFIB_GO[i].go.transform.localScale = new Vector3(val, val, val);
        }

    }

    void sphere_fibonacci_build_cartesian(int num)