Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     rand           = new System.Random();
     synthVariables = new Dictionary <string, object>()
     {
         { "SynthVolume", synthVolume },
         { "attack", attack },
         { "delay", delay },
         { "sustain", sustain },
         { "release", release },
         { "reverbActive", reverbActive },
         { "reverbMix", reverbMix },
         { "delayActive", delayActive },
         { "delayTime", delayTime },
         { "delayMax", delayMax },
         { "synthRootNote", synthRootNote },
     };
     chuck.ExecuteCommand("chuck --status");
     chuck.ExecuteCommand("chuck --status");
     chuck.ExecuteCommand("chuck + Chuck_Scripts//Main.ck:70:.5:76");
     chuck.ExecuteCommand("chuck --status");
     StartCoroutine(UpdateChuckVariables());
     InitChuckVariables();
     printSynthVars();
 }
Beispiel #2
0
 public void TogglePlaying()
 {
     if (!isPlaying)
     {
         chuck.ExecuteCommand("chuck + Chuck_Scripts//PlayLoop.ck:" + name);
         isPlaying = true;
     }
     else if (isPlaying)
     {
         chuck.ExecuteCommand("chuck + Chuck_Scripts//StopPlayLoop.ck:" + name);
         isPlaying = false;
     }
 }
    public void ToggleRecordLoop()
    {
        //if its not recording, start
        if (!isRecording)
        {
            string name = newLoopNameField.text;
            if (name == "")
            {
                name = loopList.Count.ToString();
            }
            //create the loop object and add it to loopList as well as add the UI element with LoopScroller
            Loop newLoop = new Loop(name, gameObject.GetComponent <Looper>());
            loopScroller.GetComponent <LoopScroller>().AddElement(name, true);
            loopList.Add(newLoop);
            chuck.ExecuteCommand("chuck + Chuck_Scripts//record.ck:" + name);
            isRecording = true;
        }
        //if its already recording, set the state to not recording
        else
        {
            isRecording = false;
            //start the loop playing after its been recorded
            loopList[loopList.Count - 1].TogglePlaying();

            //user must press tab for chuck to recognize the end of recording.
            //this makes sense because the user wont have time to grab the mouse and click a button at the end of their loop
        }
    }
 public override void PlayAnswer(MyProcess chuck)
 {
     chuck.ExecuteCommand("chuck + Chuck_Scripts//PlayInterval.ck:70:.8:63:" + answerList.ElementAt(0) + ":" + answerList.ElementAt(1) + ":" + answerList.ElementAt(2));
 }
Beispiel #5
0
 public override void PlayAnswer(MyProcess chuck)
 {
     chuck.ExecuteCommand("chuck + Chuck_Scripts//PlayInterval.ck:70:.8:63:0:" + intervalStrings.IndexOf(answer));
 }