public Harmonic(double amplitude, double frequency, double phase, HarmonicType harmonicKind) { _amplitude = amplitude; _frequency = frequency; _phase = phase; _harmonicKind = harmonicKind; }
public HarmonicsEffectInfo(HarmonicType harmonicType) { _harmonicType = harmonicType; switch (harmonicType) { case HarmonicType.Natural: _effectId = "harmonics-natural"; break; case HarmonicType.Artificial: _effectId = "harmonics-artificial"; break; case HarmonicType.Pinch: _effectId = "harmonics-pinch"; break; case HarmonicType.Tap: _effectId = "harmonics-tap"; break; case HarmonicType.Semi: _effectId = "harmonics-semi"; break; case HarmonicType.Feedback: _effectId = "harmonics-feedback"; break; } }
public Harmonic() { _harmonicKind = HarmonicType.Sin; _amplitude = 1; _frequency = 1; _phase = 0; }
public Harmonic(HarmonicType type, float amplitude, float frequency, float phase) { Type = type; Amplitude = amplitude; Frequency = frequency; Phase = phase; }
public Tonality(HarmonicType type, bool[] mask, int shift = 0) { string[] nameOfNotes = new string[] { "C", "Cs", "D", "Ds", "E", "F", "Fs", "G", "Gs", "A", "As", "B" }; if (type == HarmonicType.Major) { name = nameOfNotes[shift]; } else { name = nameOfNotes[shift] + "m"; } notes = new Note[7]; for (int i = 0, j = shift, notesFound = 0; i < mask.Length; i++, j++) { if (j + 1 > mask.Length) { j = 0; } if (mask[i]) { notes[notesFound++] = new Note(nameOfNotes[j]); } } }
public Harmonic(double amplitude = 0, double frequency = 0, double phase = 0, HarmonicType harmonicType = HarmonicType.Sin) { Amplitude = amplitude; Frequency = frequency; Phase = phase; Type = harmonicType; }
public void UpdateSelectedHarmonicType(HarmonicType type) { if (!_harmonicsContainer.IsEmpty()) { _harmonicsContainer.GetHarmonicByIndex(_harmonicsContainer.ActiveHarmonicIndex).Type = type; } }
public void SetHarmonicType(HarmonicType harmonicType) { _harmonicType = harmonicType; if (_observerHarmoic != null) { _observerHarmoic.PropertyChanges(); } }
public void SetHarmonicKind(HarmonicType harmonicKind) { _harmonicKind = harmonicKind; if (_observer != null) { _observer.HarmonicPropertiesChanged(); } }
protected override bool ShouldCreateGlyphForNote(EffectBarRenderer renderer, Note note) { if (!note.IsHarmonic) return false; if (note.Beat != _beat || note.HarmonicType > _beatType) { _beatType = note.HarmonicType; } return true; }
protected override bool ShouldCreateGlyphForNote(EffectBarRenderer renderer, Note note) { if (!note.IsHarmonic) { return(false); } if (note.Beat != _beat || note.HarmonicType > _beatType) { _beatType = note.HarmonicType; } return(true); }
public void GetValueByTime_DifferentTestData_GetExpectedValue( double amplitude, HarmonicType harmonicType, double frequency, double t, double phase, double expected) { // Arrange var harmonic = new Harmonic(amplitude, frequency, phase, harmonicType); // Act double result = harmonic.GetValueByTime(t); // Assert Assert.True(DoubleUtils.EqualsDoubles(expected, result)); }
public static string HarmonicToString(HarmonicType type) { switch (type) { case HarmonicType.Natural: return "N.H."; case HarmonicType.Artificial: return "A.H."; case HarmonicType.Pinch: return "P.H."; case HarmonicType.Tap: return "T.H."; case HarmonicType.Semi: return "S.H."; case HarmonicType.Feedback: return "Fdbk."; } return ""; }
public static string HarmonicToString(HarmonicType type) { switch (type) { case HarmonicType.Natural: return("N.H."); case HarmonicType.Artificial: return("A.H."); case HarmonicType.Pinch: return("P.H."); case HarmonicType.Tap: return("T.H."); case HarmonicType.Semi: return("S.H."); case HarmonicType.Feedback: return("Fdbk."); } return(""); }
public void SetHarmonicKind(HarmonicType kind) { _harmonic.SetHarmonicKind(kind); }
public void SetNewHarmonicKind(int index, HarmonicType value) { _harmonicContainer.GetAllHarmonic() [index].SetHarmonicKind(value); }
public void SetHarmonicType(int index, HarmonicType value) { _harmonicContainer.GetHarmonics()[index].SetHarmonicType(value); }
public void SetHarmonicType(HarmonicType harmonicType) { _harmonic.SetHarmonicType(harmonicType); }
public void ChangeHarmonicType(HarmonicType value) { _harmonic.Type = value; }