void removeRows(int c) { for (int i = 0; i < c; i++) { int z = cubeList.Count - 1; for (int i2 = 0; i2 < cubeList[z].Count; i2++) { Transform t = cubeList[z][i2]; Destroy(t.gameObject); } cubeList.RemoveAt(z); Transform j = jackList.Last(); Destroy(j.gameObject); jackList.RemoveAt(jackList.Count - 1); seqList.RemoveAt(jackList.Count); clipPlayerSimple clipTemp = samplerList.Last(); int tempIndex = samplerList.Count - 1; clipTemp.gameObject.GetComponent <samplerLoad>().getTapeInfo(out tapeList[tempIndex][0], out tapeList[tempIndex][1]); rowMute[tempIndex] = clipTemp.gameObject.GetComponent <miniSamplerComponentInterface>().muteButton.isHit; Destroy(clipTemp.gameObject); samplerList.RemoveAt(tempIndex); curDimensions[1]--; } updateStepSelectVertical(); }
public monophone(GameObject g) { gameobject = g; adsr = g.GetComponent <adsrSignalGenerator>(); sampler = g.GetComponent <clipPlayerSimple>(); key = g.GetComponent <keyFrequencySignalGenerator>(); osc = g.GetComponents <oscillatorSignalGenerator>(); }
void addRows(int c) { for (int i = 0; i < c; i++) { cubeList.Add(new List <Transform>()); for (int i2 = 0; i2 < curDimensions[0]; i2++) { Transform t = (Instantiate(touchCubePrefab, Vector3.zero, Quaternion.identity) as GameObject).transform; t.parent = transform; t.localRotation = Quaternion.identity; float yMult = curDimensions[1]; float xMult = i2; t.localPosition = new Vector3(-cubeConst * xMult, -cubeConst * yMult, 0); t.localScale = Vector3.one; cubeList.Last().Add(t); float Hval = (float)curDimensions[1] / max; t.GetComponent <button>().Setup(i2, curDimensions[1], cubeStates[i2][curDimensions[1]], Color.HSVToRGB(Hval, .9f, .05f)); } Transform jack = (Instantiate(jackOutPrefab, Vector3.zero, Quaternion.identity) as GameObject).transform; jack.parent = transform; jack.localRotation = Quaternion.Euler(0, 0, -90); jack.localScale = Vector3.one; jack.localPosition = new Vector3(-cubeConst / 2f - .001f - cubeConst * (curDimensions[0] - 1), -cubeConst * curDimensions[1], 0); jackList.Add(jack); seqList.Add(jack.GetComponent <sequencer>()); clipPlayerSimple samp = (Instantiate(samplerPrefab, Vector3.zero, Quaternion.identity, transform) as GameObject).GetComponent <clipPlayerSimple>(); samp.transform.localRotation = Quaternion.identity; samp.transform.localScale = Vector3.one; samp.transform.localPosition = new Vector3(.081f, -cubeConst * curDimensions[1], -.028f); samp.seqGen = jack.GetComponent <sequencer>(); samp.gameObject.GetComponent <samplerLoad>().SetSample(tapeList[curDimensions[1]][0], tapeList[curDimensions[1]][1]); samp.gameObject.GetComponent <miniSamplerComponentInterface>().muteButton.startToggled = rowMute[curDimensions[1]]; samplerList.Add(samp); curDimensions[1]++; } updateStepSelectVertical(); }
void Awake() { player = GetComponent <clipPlayerSimple>(); muteButton = GetComponentInChildren <button>(); jackout = GetComponentInChildren <omniJack>(); }
void Awake() { player = GetComponent <clipPlayerSimple>(); signal = GetComponent <timelineTrackSignalGenerator>(); _deviceInterface = GetComponentInParent <timelineDeviceInterface>(); }