void Start() { source = GetComponent <AudioSource>(); synth = GetComponent <HelmController>(); defaultPos = hand.position; text = GetComponent <TextMesh>(); }
void Update() { // Lets find all of the usable parameters var celProps = this.gameObject.GetComponent <celestialProperties>(); string celestialName = celProps.celestialName; int celestialID = celProps.celestialID; float celestialBodyDistance = celProps.celestialBodyDistance; float celestialOrbitFrequency = celProps.celestialOrbitFrequency; float celestialRotationalFrequency = celProps.celestialRotationalFrequency; float celestialBodyDiameter = celProps.celestialBodyDiameter; float celestialBodyTemperature = celProps.celestialBodyTemperature; // Setting parameters scaled to percentages HelmController controller = this.gameObject.GetComponent <AudioHelm.HelmController>(); // Scales LFO 1 frequency to orbit frequency (osc 1 + 2 amt) controller.SetParameterAtIndex(0, scale(celestialOrbitFrequency, 0.001f, 1000f, 0f, 1f)); // Scales LFO 2 frequency to rotational frequency (filter resonance %) controller.SetParameterAtIndex(1, scale(celestialRotationalFrequency, 0.001f, 1000f, 0f, 1f)); // Scales filter cutoff to temperature controller.SetParameterAtIndex(2, scale(celestialBodyTemperature, 0f, 4000f, 0.25f, 1f)); // Scales filter drive by size controller.SetParameterAtIndex(3, scale(celestialBodyDiameter, 0.001f, 1f, 0f, 0.25f)); }
void Awake() { _synth = GameObject.Find("Jumpy Ball Synth").GetComponent <HelmController> (); _notes = Scales.MinorPentatonic; _renderer = GetComponent <Renderer> (); InitColor(); Metronome.instance.SignalBeat += OnBeat; }
void Awake() { _boxCollider = GetComponent <BoxCollider> (); _synth = GetComponent <HelmController> (); RefreshChord(); GenerateBallBurst(); }
void Start() { instance = this; //floatnHelm.SetActive(false); headHelm.SetActive(false); startpos = transform.parent.Find("helm start"); endpos = transform.parent.Find("helm end"); transform.position = startpos.position; GetComponent<Rigidbody>().useGravity = false; }
void Start() { // Init inst = this; curChord = Chords.c4Major; // stupid inits lastChord = curChord; controller = MusicRef.inst.helmController; curSequencer = MusicRef.inst.sequencers[0]; Quantization = quantizationChoices[(int)curPrecision]; }
public static void PlayChord(Chord chord, HelmController controller, float velocity) { for (int i = 0; i < chord.notes.Length; i++) { int note = chord.notes[i]; if (controller.IsNoteOn(note)) { controller.NoteOff(note); } controller.NoteOn(note, velocity); } }
public static void StopChord(Chord chord, HelmController controller, Sequencer sequencer, bool forceNoteOff = false) { for (int i = 0; i < chord.notes.Length; i++) { int note = chord.notes[i]; if (controller.IsNoteOn(note)) { // 2. Stop only if the notes are NOT being played in the sequencer if (!sequencer.IsNoteOn(note) || forceNoteOff) { controller.NoteOff(note); } } } }
void Awake() { _synth = GetComponent <HelmController> (); float val = Random.value; if (val < 0.333f) { _chord = Chords.MajorSeventh; } else if (val < 0.667f) { _chord = Utils.Transpose(Chords.MajorSeventh, 5); } else { _chord = Utils.Transpose(Chords.MinorNine, 9); } _chord = Utils.ExtractRandom(_chord, 2); Randomize(); }
void Awake() { _synth = GetComponent <HelmController> (); Metronome.instance.SignalBeat += OnBeat; }
void Awake() { _helmController = transform.Find("Helm").gameObject.GetComponent <HelmController>(); _mastController = transform.Find("Mast").gameObject.GetComponent <MastController>(); }
void Awake() { _synth = GetComponent <HelmController> (); _initialScale = transform.localScale; _targetScale = _initialScale * _scaleMultiplier; }