public Part(MusicTheory theory, Random rand, Rhythm rhythm, int rhythmNumber, Melody melody, int melodyNumber, int measureLength, double rhythmCrowdedness, double noteLengthAdjustment, double regularity, int lowerPitchLimit, int octaveRange, bool forceChord, bool forceDiatonic) : this(theory, rand, rhythm, rhythmNumber, melody, melodyNumber, measureLength) { this.rhythmCrowdedness = rhythmCrowdedness; this.noteLengthAdjustment = noteLengthAdjustment; this.regularity = regularity; this.lowerPitchLimit = lowerPitchLimit; this.octaveRange = octaveRange; this.forceChord = forceChord; this.forceDiatonic = forceDiatonic; }
// Konstruktor der Klasse, erhält eine Instanz der Klasse Rhythm als Parameter public Critics(Rhythm r) { // Initialisierung der Instanzvariablen moveTile = new List<int[]>(); jumpTile = new List<int[]>(); rhythm = r; currentDistance = 50; levelList = new List<int>(); secLevel = new List<int[]>(); distanceList = new List<int>(); // Füllung der Listen moveTile und jumpTile FillMoveList(); FillJumpList(); }
public Part(MusicTheory theory, Random rand, Rhythm rhythm, int rhythmNumber, Melody melody, int melodyNumber, int measureLength) { //Get instance of InputParameters InputParameters inputParameters = InputParameters.Instance; this.theory = theory; this.rand = rand; this.rhythm = rhythm; this.rhythmNumber = rhythmNumber; this.melody = melody; this.melodyNumber = melodyNumber; this.measureLength = measureLength; //Set rhythm crowdedness based on input parameters rhythmCrowdedness = inputParameters.MeanPartRhythmCrowdedness + (inputParameters.MeanPartRhythmCrowdedness * (rand.NextDouble() - 0.5) * inputParameters.PartRhythmCrowdednessVariance); //Set note length adjustment based on input parameters noteLengthAdjustment = 0.5 + (0.5 * (rand.NextDouble() - 0.5) * inputParameters.PartNoteLengthVariance); //Set octave range based on input parameters octaveRange = (int)Math.Round(theory.PART_OCTAVE_RANGE * inputParameters.MeanPartOctaveRange); octaveRange += (int)Math.Round(octaveRange * (rand.NextDouble() - 0.5) * inputParameters.PartOctaveRangeVariance); octaveRange = (int)MathHelper.Clamp(octaveRange, 1, Automatone.PIANO_SIZE / 12); //Set random lower pitch limit lowerPitchLimit = rand.Next(Automatone.PIANO_SIZE - (octaveRange * MusicTheory.OCTAVE_SIZE)) + Automatone.LOWEST_NOTE_CHROMATIC_NUMBER; forceChord = false; forceDiatonic = false; //Set regularity based on input parameters regularity = 0; if (rand.NextDouble() < inputParameters.BeatDefinition) { forceChord = true; regularity = rand.NextDouble(); } }
public SecondaryQueen(ISecondaryMovingStrategy secondaryMovingStrategy, Rhythm rhythm, ISecondaryShootingStrategy secondaryShootingStrategy) { }
public King(KingStep _kingStep, Rhythm rhythm) { }
public bool IsPartialSmart(Rhythm rhythm, Intelligence intelligence) { return(true); }
protected Queen(Rhythm rhythm) { }
void Start() { rhythmObject = GetComponentInChildren <Rhythm>(); }
// Start wird für die Initialisierung verwendet void Start() { // Wertzuweisung der Rhythmusparameter durch die gewählten Werte vom Generatormenü rhythmLength = float.Parse(PlayerPrefs.GetString("length")); rhythmDensity = PlayerPrefs.GetString("density"); rhythmType = PlayerPrefs.GetString("type"); // Erzeugung eines Rhythmus Rhythm rhythm = new Rhythm(rhythmLength, rhythmDensity, rhythmType); // Generierung eines Levels basierend auf dem Rhythmus levelWithCritics = new Critics(rhythm); levelWithCritics.CreateLevel(); spawnPosition = CreateLevel(spawnPosition); CreateRightSpace(6f, spawnPosition); // Lücken deaktivieren, die den Zugang zum Multiweg behindern DeactivateGaps(); }
protected SecondaryGame(Dictionary <int, float> _markAllocation, List <Player> _players, TraceType _traceType, Dictionary <int, int> _switchingTimes, CartesianPlane cartesianPlane, Rhythm currentRhythm, Music currentMusic) { }
protected Agent(Rhythm rhythm) { }
protected Game(Dictionary <int, float> _markAllocation, List <Player> _players, Dictionary <int, int> _switchingTimes, CoordinateSystem coordinateSystem, Music currentMusic, Rhythm currentRhythm) { }
public TertiaryQueen(ITertiaryMovingStrategy teriaryMovingStrategy, Rhythm rhythm, ITertiaryShootingStrategy tertiaryShootingStrategy) { }
public TertiaryQueen(ITertiaryMovingStrategy teriaryMovingStrategy, Rhythm rhythm) { }
protected PrimaryGame(Dictionary <int, float> _markAllocation, List <PrimaryPlayer> _players, Primary_Trace_Type _traceType, Dictionary <int, int> _switchingTimes, NumberLine numberLine, Rhythm currentRhythm, Music currentMusic) { }
public void DecreaseIntelligence(Rhythm rhythmKey, float amount) { }
int ExportOrFindBeat(Chord chord) { var beat = new Beat(); beat.Id = gpif.Beats.Count; foreach (var note in chord.Notes) { int id = ExportOrFindNote(note.Value); beat.Notes.Add(id); } // there seem to be a few accidental ties set in the Rocksmith XMLs // so unset the tie status on any strings that weren't in the current chord. for (int i = 0; i < 6; ++i) { if (!chord.Notes.ContainsKey(i)) { link[i] = false; } } // should we display a strum hint? if (chord.BrushDirection != Chord.BrushType.None) { var brushProp = new Property() { Name = "Brush" }; if (chord.BrushDirection == Chord.BrushType.Down) { brushProp.Direction = "Down"; } else { brushProp.Direction = "Up"; } if (beat.Properties == null) { beat.Properties = new List <Property>(); } beat.Properties.Add(brushProp); } // tremolo picking if (chord.Tremolo) { // 32nd notes tremolo picking (should be appropriate) beat.Tremolo = "1/8"; } // slap/pop notes if (chord.Slapped) { if (beat.Properties == null) { beat.Properties = new List <Property>(); } beat.Properties.Add(new Property() { Name = "Slapped", Enable = new Property.EnableType() }); } if (chord.Popped) { if (beat.Properties == null) { beat.Properties = new List <Property>(); } beat.Properties.Add(new Property() { Name = "Popped", Enable = new Property.EnableType() }); } // construct rhythm var rhythm = new Rhythm(); rhythm.Id = gpif.Rhythms.Count; switch (chord.Duration) { case 192: rhythm.NoteValue = "Whole"; break; case 168: // should avoid this, split note instead (TODO) rhythm.NoteValue = "Half"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 2 }; break; case 144: rhythm.NoteValue = "Half"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 96: rhythm.NoteValue = "Half"; break; case 84: // should avoid this, split note instead (TODO) rhythm.NoteValue = "Quarter"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 2 }; break; case 72: rhythm.NoteValue = "Quarter"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 48: rhythm.NoteValue = "Quarter"; break; case 36: rhythm.NoteValue = "Eighth"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 32: rhythm.NoteValue = "Quarter"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 24: rhythm.NoteValue = "Eighth"; break; case 18: rhythm.NoteValue = "16th"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 16: rhythm.NoteValue = "Eighth"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 12: rhythm.NoteValue = "16th"; break; case 9: rhythm.NoteValue = "32nd"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 8: rhythm.NoteValue = "16th"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 6: rhythm.NoteValue = "32nd"; break; case 4: rhythm.NoteValue = "32nd"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 3: rhythm.NoteValue = "64th"; break; case 2: rhythm.NoteValue = "64th"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 1: rhythm.NoteValue = "128th"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; default: Console.WriteLine(" Warning: Rhythm Duration {0} not handled, defaulting to quarter note.", chord.Duration); rhythm.NoteValue = "Quarter"; break; } // see if this rhythm already exists, otherwise add var searchRhythm = gpif.Rhythms.Find(x => x.Equals(rhythm)); if (searchRhythm != null) { rhythm = searchRhythm; } else { gpif.Rhythms.Add(rhythm); } beat.Rhythm.Ref = rhythm.Id; // should we display a chord name? if (chord.ChordId != -1 && chord.ChordId != prevChordId) { beat.Chord = chord.ChordId.ToString(); } prevChordId = chord.ChordId; if (chord.Section != null) { beat.FreeText = chord.Section; } // see if this beat already exists, otherwise add var searchBeat = gpif.Beats.Find(x => x.Equals(beat)); if (searchBeat != null) { beat = searchBeat; } else { gpif.Beats.Add(beat); } return(beat.Id); }
public Dictionary <Rhythm, float> GetPartialIntelligence(Rhythm rhythm) { return(new Dictionary <Rhythm, float>()); }
protected TertiaryGame(Dictionary <int, float> _markAllocation, List <Player> _players, TraceType _traceType, Dictionary <int, int> _switchingTimes, R3Plane plane, Rhythm currentRhythm, Music currentMusic) { }
public King(KingDirection _kingDirection, KingStep _kingStep, Rhythm rhythm) { }
public PrimaryQueen(IPrimaryMovingStrategy primaryMovingStrategy, Rhythm rhythm) { }
public SecondaryQueen(ISecondaryMovingStrategy secondaryMovingStrategy, Rhythm rhythm) { }
int ExportOrFindBeat(Chord chord) { var beat = new Beat(); beat.Id = gpif.Beats.Count; foreach (var note in chord.Notes) { int id = ExportOrFindNote(note.Value); beat.Notes.Add(id); } // there seem to be a few accidental ties set in the Rocksmith XMLs // so unset the tie status on any strings that weren't in the current chord. for (int i = 0; i < 6; ++i) { if (!chord.Notes.ContainsKey(i)) link[i] = false; } // should we display a strum hint? if (chord.BrushDirection != Chord.BrushType.None) { var brushProp = new Property() { Name = "Brush" }; if (chord.BrushDirection == Chord.BrushType.Down) brushProp.Direction = "Down"; else brushProp.Direction = "Up"; if (beat.Properties == null) beat.Properties = new List<Property>(); beat.Properties.Add(brushProp); } // tremolo picking if (chord.Tremolo) { // 32nd notes tremolo picking (should be appropriate) beat.Tremolo = "1/8"; } // slap/pop notes if (chord.Slapped) { if (beat.Properties == null) beat.Properties = new List<Property>(); beat.Properties.Add(new Property() { Name = "Slapped", Enable = new Property.EnableType() }); } if (chord.Popped) { if (beat.Properties == null) beat.Properties = new List<Property>(); beat.Properties.Add(new Property() { Name = "Popped", Enable = new Property.EnableType() }); } // construct rhythm var rhythm = new Rhythm(); rhythm.Id = gpif.Rhythms.Count; switch (chord.Duration) { case 192: rhythm.NoteValue = "Whole"; break; case 168: // should avoid this, split note instead (TODO) rhythm.NoteValue = "Half"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 2 }; break; case 144: rhythm.NoteValue = "Half"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 96: rhythm.NoteValue = "Half"; break; case 84: // should avoid this, split note instead (TODO) rhythm.NoteValue = "Quarter"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 2 }; break; case 72: rhythm.NoteValue = "Quarter"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 48: rhythm.NoteValue = "Quarter"; break; case 36: rhythm.NoteValue = "Eighth"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 32: rhythm.NoteValue = "Quarter"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 24: rhythm.NoteValue = "Eighth"; break; case 18: rhythm.NoteValue = "16th"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 16: rhythm.NoteValue = "Eighth"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 12: rhythm.NoteValue = "16th"; break; case 9: rhythm.NoteValue = "32nd"; rhythm.AugmentationDot = new Rhythm.Dot() { Count = 1 }; break; case 8: rhythm.NoteValue = "16th"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 6: rhythm.NoteValue = "32nd"; break; case 4: rhythm.NoteValue = "32nd"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 3: rhythm.NoteValue = "64th"; break; case 2: rhythm.NoteValue = "64th"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; case 1: rhythm.NoteValue = "128th"; rhythm.PrimaryTuplet = new Rhythm.Tuplet() { Den = 2, Num = 3 }; break; default: Console.WriteLine(" Warning: Rhythm Duration {0} not handled, defaulting to quarter note.", chord.Duration); rhythm.NoteValue = "Quarter"; break; } // see if this rhythm already exists, otherwise add var searchRhythm = gpif.Rhythms.Find(x => x.Equals(rhythm)); if (searchRhythm != null) rhythm = searchRhythm; else gpif.Rhythms.Add(rhythm); beat.Rhythm.Ref = rhythm.Id; // should we display a chord name? if (chord.ChordId != -1 && chord.ChordId != prevChordId) { beat.Chord = chord.ChordId.ToString(); } prevChordId = chord.ChordId; if (chord.Section != null) beat.FreeText = chord.Section; // see if this beat already exists, otherwise add var searchBeat = gpif.Beats.Find(x => x.Equals(beat)); if (searchBeat != null) beat = searchBeat; else gpif.Beats.Add(beat); return beat.Id; }
public PercussionMusicClip(Tempo tempo, Rhythm rhythm) { Tempo = tempo; Rhythm = rhythm; }