/
Rs1Converter.cs
697 lines (618 loc) · 28.5 KB
/
Rs1Converter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using RocksmithToolkitLib.DLCPackage.Manifest.Tone;
using RocksmithToolkitLib.Extensions;
using RocksmithToolkitLib.Sng;
using RocksmithToolkitLib.SngToTab;
using RocksmithToolkitLib.Xml;
namespace RocksmithToolkitLib.Song2014ToTab
{
public class Rs1Converter : IDisposable
{
#region Song XML file to Song Object
/// <summary>
/// Convert XML file to RS1 (Song)
/// </summary>
/// <param name="xmlFilePath"></param>
/// <returns>Song</returns>
public Song XmlToSong(string xmlFilePath)
{
Song song = Song.LoadFromFile(xmlFilePath);
return song;
}
#endregion
#region Song Object to Song Xml file
/// <summary>
/// Convert RS1 Song Object to XML file
/// </summary>
/// <param name="rsSong"></param>
/// <param name="outputPath"></param>
/// <param name="overWrite"></param>
/// <returns>RS Song XML file path</returns>
public string SongToXml(Song rsSong, string outputPath, bool overWrite)
{
if (File.Exists(outputPath) && overWrite)
File.Delete(outputPath);
else
{
var outputDir = Path.GetDirectoryName(outputPath);
var outputFile = String.Format("{0}_{1}", rsSong.Title, rsSong.Arrangement);
outputFile = String.Format("{0}{1}", outputFile.GetValidName(false, true).ToLower(), "_rs1.xml");
outputPath = Path.Combine(outputDir, outputFile);
}
using (var stream = File.OpenWrite(outputPath))
{
rsSong.Serialize(stream, false);
}
return outputPath;
}
#endregion
#region Song Object to SngFile Object
/// <summary>
/// Converts RS1 Song Object to RS1 SngFile Object
/// </summary>
/// <param name="rs1Song"></param>
/// <returns>SngFile</returns>
public SngFile Song2SngFile(Song rs1Song, string outputDir)
{
var rs1SngPath = SongToSngFilePath(rs1Song, outputDir);
SngFile sngFile = new SngFile(rs1SngPath);
return sngFile;
}
#endregion
#region Song to SngFilePath
/// <summary>
/// Converts RS1 Song Object to *.sng File
/// </summary>
/// <param name="rs1Song"></param>
/// <param name="outputPath"></param>
/// <returns>Path to binary *.sng file</returns>
public string SongToSngFilePath(Song rs1Song, string outputPath)
{
string rs1XmlPath;
using (var obj = new Rs1Converter())
rs1XmlPath = obj.SongToXml(rs1Song, outputPath, true);
ArrangementType arrangementType;
if (rs1Song.Arrangement.ToLower() == "bass")
arrangementType = ArrangementType.Bass;
else
arrangementType = ArrangementType.Guitar;
var sngFilePath = Path.ChangeExtension(rs1XmlPath, ".sng");
SngFileWriter.Write(rs1XmlPath, sngFilePath, arrangementType, new Platform(GamePlatform.Pc, GameVersion.None));
if (File.Exists(rs1XmlPath)) File.Delete(rs1XmlPath);
return sngFilePath;
}
#endregion
#region SngFilePath to ASCII Tablature
/// <summary>
/// SngFilePath to ASCII Tablature
/// </summary>
/// <param name="inputFilePath"></param>
/// <param name="outputDir"></param>
/// <param name="allDif"></param>
public void SngFilePathToAsciiTab(string inputFilePath, string outputDir, bool allDif)
{
using (var obj = new Sng2Tab())
obj.Convert(inputFilePath, outputDir, allDif);
}
#endregion
#region Song to Song2014
/// <summary>
/// Convert RS1 Song Object to RS2 Song2014 Object
/// RS1 to RS2014 Mapping Method
/// </summary>
/// <param name="rsSong"></param>
/// <param name="srcPath"></param>
/// <returns>Song2014</returns>
public Song2014 SongToSong2014(Song rsSong)
{
// Song to Song2014 Mapping
Song2014 rsSong2014 = new Song2014();
// song info parsed and loaded later from
// RS1 song.manifest.json file by RS1LoadFromFolder
rsSong2014.Version = "7";
rsSong2014.Title = rsSong.Title;
rsSong2014.Arrangement = rsSong.Arrangement;
rsSong2014.Part = rsSong.Part;
rsSong2014.Offset = rsSong.Offset;
rsSong2014.CentOffset = "0";
rsSong2014.SongLength = rsSong.SongLength;
rsSong2014.LastConversionDateTime = DateTime.Now.ToString("MM-dd-yy HH:mm");
rsSong2014.StartBeat = rsSong.Ebeats[0].Time;
// if RS1 CDLC Song XML originates from EOF it may
// already contain AverageTempo otherwise it gets calculated
rsSong2014.AverageTempo = rsSong.AverageTempo == 0 ? AverageBPM(rsSong) : rsSong.AverageTempo;
// tuning parsed from RS1 song.manifest.json file by RS1LoadFromFolder
rsSong2014.Tuning = rsSong.Tuning == null ? new TuningStrings { String0 = 0, String1 = 0, String2 = 0, String3 = 0, String4 = 0, String5 = 0 } : rsSong.Tuning;
rsSong2014.Capo = 0;
rsSong2014.ArtistName = rsSong.ArtistName;
rsSong2014.AlbumName = rsSong.AlbumName;
rsSong2014.AlbumYear = rsSong.AlbumYear;
rsSong2014.CrowdSpeed = "1";
// default arrangment properties
rsSong2014.ArrangementProperties = new SongArrangementProperties2014
{
Represent = 1,
StandardTuning = 1,
NonStandardChords = 0,
BarreChords = 0,
PowerChords = 0,
DropDPower = 0,
OpenChords = 0,
FingerPicking = 0,
PickDirection = 0,
DoubleStops = 0,
PalmMutes = 0,
Harmonics = 0,
PinchHarmonics = 0,
Hopo = 0,
Tremolo = 0,
Slides = 0,
UnpitchedSlides = 0,
Bends = 0,
Tapping = 0,
Vibrato = 0,
FretHandMutes = 0,
SlapPop = 0,
TwoFingerPicking = 0,
FifthsAndOctaves = 0,
Syncopation = 0,
BassPick = 0,
Sustain = 0,
BonusArr = 0,
RouteMask = rsSong2014.Arrangement == "Lead" ? 1 : (rsSong2014.Arrangement == "Rhythm" ? 2 : 4),
PathLead = rsSong2014.Arrangement == "Lead" ? 1 : 0,
PathRhythm = rsSong2014.Arrangement == "Rhythm" ? 1 : 0,
PathBass = rsSong2014.Arrangement == "Bass" ? 1 : 0
};
// tone defaults used to produce RS2014 CDLC
rsSong2014.ToneBase = "Default";
rsSong2014.ToneA = "Default";
rsSong2014.ToneB = "";
rsSong2014.ToneC = "";
rsSong2014.ToneD = "";
// these elements have direct mappings
rsSong2014.Phrases = rsSong.Phrases;
//rsSong2014.LinkedDiffs = rsSong.LinkedDiffs;
rsSong2014.LinkedDiffs = new SongLinkedDiff[0]; // prevents hanging
//rsSong2014.PhraseProperties = rsSong.PhraseProperties;
rsSong2014.PhraseProperties = new SongPhraseProperty[0]; // prevents hanging
rsSong2014.FretHandMuteTemplates = rsSong.FretHandMuteTemplates;
rsSong2014.Ebeats = rsSong.Ebeats;
rsSong2014.Sections = rsSong.Sections;
rsSong2014.Events = rsSong.Events;
// these elements have no direct mapping, order is important
rsSong2014 = ConvertTones(rsSong, rsSong2014);
rsSong2014 = ConvertChordTemplates(rsSong, rsSong2014);
rsSong2014 = ConvertNewLinkedDiff(rsSong, rsSong2014);
rsSong2014 = ConvertLevels(rsSong, rsSong2014);
rsSong2014 = ConvertPhraseIterations(rsSong, rsSong2014);
return rsSong2014;
}
public float AverageBPM(Song rsSong)
{
// a rough approximation of BPM based on ebeats and time
float beats = rsSong.Ebeats.Length;
float endTimeMins = rsSong.Ebeats[rsSong.Ebeats.Length - 1].Time / 60;
// float endTimeMins = rsSong.SongLength / 60;
float avgBPM = (float)Math.Round(beats / endTimeMins, 1);
return avgBPM;
}
private Song2014 ConvertTones(Song rsSong, Song2014 rsSong2014)
{
// no parallel element in RS1 so only initialiaze
rsSong2014.Tones = new SongTone2014[0];
return rsSong2014;
}
private Song2014 ConvertChordTemplates(Song rsSong, Song2014 rsSong2014)
{
// add chordTemplates elements
var chordTemplate = new List<SongChordTemplate2014>();
foreach (var songChordTemplate in rsSong.ChordTemplates)
{
// this could cause hangs
// if (String.IsNullOrEmpty(songChordTemplate.ChordName))
// continue;
chordTemplate.Add(new SongChordTemplate2014
{
ChordName = songChordTemplate.ChordName,
DisplayName = songChordTemplate.ChordName,
Finger0 = (sbyte)songChordTemplate.Finger0,
Finger1 = (sbyte)songChordTemplate.Finger1,
Finger2 = (sbyte)songChordTemplate.Finger2,
Finger3 = (sbyte)songChordTemplate.Finger3,
Finger4 = (sbyte)songChordTemplate.Finger4,
Finger5 = (sbyte)songChordTemplate.Finger5,
Fret0 = (sbyte)songChordTemplate.Fret0,
Fret1 = (sbyte)songChordTemplate.Fret1,
Fret2 = (sbyte)songChordTemplate.Fret2,
Fret3 = (sbyte)songChordTemplate.Fret3,
Fret4 = (sbyte)songChordTemplate.Fret4,
Fret5 = (sbyte)songChordTemplate.Fret5
});
}
// get rid of duplicate chords if any
// this seems to cause problems
// chordTemplate = chordTemplate.Distinct().ToList();
rsSong2014.ChordTemplates = chordTemplate.ToArray();
return rsSong2014;
}
private Song2014 ConvertNewLinkedDiff(Song rsSong, Song2014 rsSong2014)
{
// no parallel element in RS1 so only initialiaze
rsSong2014.NewLinkedDiff = new SongNewLinkedDiff[0];
return rsSong2014;
}
private Song2014 ConvertLevels(Song rsSong, Song2014 rsSong2014)
{
// add levels elements
var levels = new List<SongLevel2014>();
foreach (var songLevel in rsSong.Levels)
{
var anchors = new List<SongAnchor2014>();
var notes = new List<SongNote2014>();
var chords = new List<SongChord2014>();
var handShapes = new List<SongHandShape>();
for (int anchorIndex = 0; anchorIndex < songLevel.Anchors.Length; anchorIndex++)
{
var anchor = songLevel.Anchors[anchorIndex];
anchors.Add(new SongAnchor2014 { Fret = anchor.Fret, Time = anchor.Time, Width = 4 });
}
for (int noteIndex = 0; noteIndex < songLevel.Notes.Length; noteIndex++)
{
var songNote = songLevel.Notes[noteIndex];
notes.Add(GetNoteInfo(songNote));
}
for (int chordIndex = 0; chordIndex < songLevel.Chords.Length; chordIndex++)
{
// RS1 does not contain chordNotes so need to make them from chordtemplate
List<SongNote2014> chordNotes = new List<SongNote2014>();
var zChord = songLevel.Chords[chordIndex];
var zChordId = zChord.ChordId;
var zChordTemplate = rsSong.ChordTemplates[zChordId];
// this is ok no code crash
//if (String.IsNullOrEmpty(zChordTemplate.ChordName))
// continue;
if (zChordTemplate.Finger0 != -1) // finger > -1 is a string played
chordNotes.Add(DecodeChordTemplate(zChord, 0, zChordTemplate.Fret0));
if (zChordTemplate.Finger1 != -1)
chordNotes.Add(DecodeChordTemplate(zChord, 1, zChordTemplate.Fret1));
if (zChordTemplate.Finger2 != -1)
chordNotes.Add(DecodeChordTemplate(zChord, 2, zChordTemplate.Fret2));
if (zChordTemplate.Finger3 != -1)
chordNotes.Add(DecodeChordTemplate(zChord, 3, zChordTemplate.Fret3));
if (zChordTemplate.Finger4 != -1)
chordNotes.Add(DecodeChordTemplate(zChord, 4, zChordTemplate.Fret4));
if (zChordTemplate.Finger5 != -1)
chordNotes.Add(DecodeChordTemplate(zChord, 5, zChordTemplate.Fret5));
if (chordNotes.Any())
{
chords.Add(new SongChord2014 { ChordId = zChord.ChordId, ChordNotes = chordNotes.ToArray(), HighDensity = zChord.HighDensity, Ignore = zChord.Ignore, Strum = zChord.Strum, Time = zChord.Time });
// add chordNotes to songNotes for compatibility
notes.AddRange(chordNotes);
}
}
// get rid of duplicate notes if any
// this seems to cause problems
// notes = notes.Distinct().ToList();
for (int shapeIndex = 0; shapeIndex < songLevel.HandShapes.Length; shapeIndex++)
{
var handshape = songLevel.HandShapes[shapeIndex];
handShapes.Add(new SongHandShape { ChordId = handshape.ChordId, EndTime = handshape.EndTime, StartTime = handshape.StartTime });
}
levels.Add(new SongLevel2014 { Anchors = anchors.ToArray(), Chords = chords.ToArray(), Difficulty = songLevel.Difficulty, HandShapes = handShapes.ToArray(), Notes = notes.ToArray() });
}
rsSong2014.Levels = levels.ToArray();
return rsSong2014;
}
private Song2014 ConvertPhraseIterations(Song rsSong, Song2014 rsSong2014)
{
var phraseIterations = new List<SongPhraseIteration2014>();
foreach (var songPhraseIteration in rsSong.PhraseIterations)
{
// HeroLevels set to null -> prevent some hangs
phraseIterations.Add(new SongPhraseIteration2014 { PhraseId = songPhraseIteration.PhraseId, HeroLevels = null, Time = songPhraseIteration.Time });
}
rsSong2014.PhraseIterations = phraseIterations.ToArray();
return rsSong2014;
}
private SongNote2014 GetNoteInfo(SongNote songNote)
{
SongNote2014 songNote2014 = new SongNote2014();
songNote2014.Bend = (byte)songNote.Bend;
if (songNote.Bend > 0)
{
var bendValues = new List<BendValue>();
bendValues.Add(new BendValue { Step = songNote.Bend, Time = (float)Math.Round((songNote.Sustain * .333 / songNote.Bend) + songNote.Time, 3), Unk5 = 0 });
songNote2014.BendValues = bendValues.ToArray();
}
songNote2014.Fret = (sbyte)songNote.Fret;
songNote2014.HammerOn = (byte)songNote.HammerOn;
songNote2014.Harmonic = (byte)songNote.Harmonic;
songNote2014.Hopo = (byte)songNote.Hopo;
songNote2014.Ignore = (byte)songNote.Ignore;
songNote2014.PalmMute = (byte)songNote.PalmMute;
songNote2014.Pluck = (sbyte)songNote.Pluck; // -1; // EOF is non-compliant
songNote2014.PullOff = (byte)songNote.PullOff;
songNote2014.Slap = (sbyte)songNote.Slap; // -1; // EOF is non-compliant
songNote2014.SlideTo = (sbyte)songNote.SlideTo;
songNote2014.String = (byte)songNote.String;
songNote2014.Sustain = (float)songNote.Sustain;
songNote2014.Time = (float)songNote.Time;
songNote2014.Tremolo = (byte)songNote.Tremolo;
// initialize elements not present in RS1
songNote2014.LinkNext = 0;
songNote2014.Accent = 0;
songNote2014.LeftHand = -1;
songNote2014.Mute = 0;
songNote2014.HarmonicPinch = 0;
songNote2014.PickDirection = 0;
songNote2014.RightHand = -1;
songNote2014.SlideUnpitchTo = -1;
songNote2014.Tap = 0;
songNote2014.Vibrato = 0;
return songNote2014;
}
private SongNote2014 DecodeChordTemplate(SongChord songChord, int gString, int fret)
{
// RS2014
//<chord time="83.366" linkNext="0" accent="0" chordId="19" fretHandMute="0" highDensity="0" ignore="0" palmMute="0" hopo="0" strum="down">
// <chordNote time="83.366" linkNext="0" accent="0" bend="0" fret="3" hammerOn="0" harmonic="0" hopo="0" ignore="0" leftHand="-1" mute="0" palmMute="0" pluck="-1" pullOff="0" slap="-1" slideTo="-1" string="4" sustain="0.000" tremolo="0" harmonicPinch="0" pickDirection="0" rightHand="-1" slideUnpitchTo="-1" tap="0" vibrato="0"/>
// <chordNote time="83.366" linkNext="0" accent="0" bend="0" fret="3" hammerOn="0" harmonic="0" hopo="0" ignore="0" leftHand="-1" mute="0" palmMute="0" pluck="-1" pullOff="0" slap="-1" slideTo="-1" string="5" sustain="0.000" tremolo="0" harmonicPinch="0" pickDirection="0" rightHand="-1" slideUnpitchTo="-1" tap="0" vibrato="0"/>
//</chord>
// RS1
//<chord time="83.366" chordId="1" highDensity="0" ignore="0" strum="down"/>
//<chordTemplate chordName="A" finger0="-1" finger1="0" finger2="1" finger3="1" finger4="1" finger5="-1" fret0="-1" fret1="0" fret2="2" fret3="2" fret4="2" fret5="-1"/>
// finger > -1 is actual string
SongNote2014 songNote2014 = new SongNote2014();
songNote2014.Time = songChord.Time;
songNote2014.LinkNext = 0;
songNote2014.Accent = 0;
songNote2014.Bend = 0;
songNote2014.Fret = (sbyte)fret;
songNote2014.HammerOn = 0;
songNote2014.Hopo = 0;
songNote2014.Ignore = songChord.Ignore;
songNote2014.LeftHand = -1;
songNote2014.Mute = 0;
songNote2014.PalmMute = 0;
songNote2014.Pluck = -1;
songNote2014.PullOff = 0;
songNote2014.Slap = -1;
songNote2014.SlideTo = -1;
songNote2014.String = (byte)gString;
songNote2014.Sustain = 0.000f;
songNote2014.Tremolo = 0;
songNote2014.HarmonicPinch = 0;
songNote2014.PickDirection = 0;
songNote2014.RightHand = -1;
songNote2014.SlideUnpitchTo = -1;
songNote2014.Tap = 0;
songNote2014.Vibrato = 0;
return songNote2014;
}
# endregion
#region Song Xml File to Song2014 XML File
public string SongFile2Song2014File(string songFilePath, bool overWrite)
{
Song2014 song2014 = new Song2014();
using (var obj = new Rs1Converter())
song2014 = obj.SongToSong2014(Song.LoadFromFile(songFilePath));
if (!overWrite)
{
var srcDir = Path.GetDirectoryName(songFilePath);
var srcName = Path.GetFileNameWithoutExtension(songFilePath);
var backupSrcPath = String.Format("{0}_{1}.xml", Path.Combine(srcDir, srcName), "RS1");
// backup original RS1 file
File.Copy(songFilePath, backupSrcPath);
}
// write converted RS1 file
using (FileStream stream = new FileStream(songFilePath, FileMode.Create))
song2014.Serialize(stream, true);
return songFilePath;
}
#endregion
#region RS1 Tone to RS2 Tone2014
public Tone2014 ToneToTone2014(Tone rs1Tone)
{
Tone2014 tone2014 = new Tone2014();
Pedal2014 amp = new Pedal2014();
Pedal2014 cabinet = new Pedal2014();
Pedal2014 prepedal1 = new Pedal2014();
Pedal2014 rack1 = new Pedal2014();
Pedal2014 rack2 = new Pedal2014();
tone2014.ToneDescriptors = new List<string>();
// use Tone Key for better conversion
tone2014.Name = rs1Tone.Name ?? "default";
tone2014.Key = rs1Tone.Key ?? "DEFAULT";
tone2014.Volume = rs1Tone.Volume;
tone2014.IsCustom = true;
tone2014.NameSeparator = " - ";
tone2014.SortOrder = 0;
// setup some possible tone approximation conversions
// no direct mapping for RS1 -> RS2 Tones
// look here IEnumerable<ToneDescriptor> List()
// TODO: figure out better method for tone mapping
if (tone2014.Key.ToUpper().Contains("_COMBO"))
tone2014.Key = "Combo_OD";
if (tone2014.Key.ToUpper().Contains("_OD"))
{
tone2014.ToneDescriptors.Add("$[35716]OVERDRIVE");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Amp_MarshallJTM45";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Cab_Marshall1936_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
rack2.Type = "Racks";
rack2.Category = "Reverb";
rack2.PedalKey = "Rack_StudioVerb";
prepedal1.Type = "Pedals";
prepedal1.Category = "Distortion";
prepedal1.PedalKey = "Pedal_SuperDrive";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1,
Rack2 = rack2,
PrePedal1 = prepedal1
};
}
else if (tone2014.Key.ToUpper().Contains("_LEAD"))
{
tone2014.ToneDescriptors.Add("$[35724]LEAD");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Amp_AT120";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Cab_OrangePPC412_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
prepedal1.Type = "Pedals";
prepedal1.Category = "Distortion";
prepedal1.PedalKey = "Pedal_GermaniumDrive";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1,
PrePedal1 = prepedal1
};
}
else if (tone2014.Key.ToUpper().Contains("_DIS"))
{
tone2014.ToneDescriptors.Add("$[35722]DISTORTION");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Amp_GB100";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Cab_GB412CMKIII_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
rack2.Type = "Racks";
rack2.Category = "Reverb";
rack2.PedalKey = "Rack_StudioVerb";
prepedal1.Type = "Pedals";
prepedal1.Category = "Distortion";
prepedal1.PedalKey = "Pedal_GermaniumDrive";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1,
Rack2 = rack2,
PrePedal1 = prepedal1
};
}
else if (tone2014.Key.ToUpper().Contains("_CLEAN"))
{
tone2014.ToneDescriptors.Add("$[35720]CLEAN");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Amp_TW40";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Cab_TW112C_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1
};
}
else if (tone2014.Key.ToUpper().Contains("_ACOU"))
{
tone2014.ToneDescriptors.Add("$[35721]ACOUSTIC");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Amp_TW40";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Cab_GB412CMKIII_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
rack2.Type = "Racks";
rack2.Category = "Dynamics";
rack2.PedalKey = "Rack_StudioCompressor";
prepedal1.Type = "Pedals";
prepedal1.Category = "Filter";
prepedal1.PedalKey = "Pedal_AcousticEmulator";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1,
Rack2 = rack2,
PrePedal1 = prepedal1
};
}
else if (tone2014.Key.ToUpper().Contains("_BASS"))
{
tone2014.ToneDescriptors.Add("$[35715]BASS");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Bass_Amp_CH300B";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Bass_Cab_BT410BC_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1
};
}
else // default acoustic is better than nothing, right
{
// this is fix for bad RS1 CDLC tones
tone2014.Name = "default_acoustic";
tone2014.Key = "DEFAULT_ACOUSTIC";
//
tone2014.ToneDescriptors.Add("$[35721]ACOUSTIC");
amp.Type = "Amps";
amp.Category = "Amp";
amp.PedalKey = "Amp_TW40";
cabinet.Type = "Cabinets";
cabinet.Category = "Dynamic_Cone";
cabinet.PedalKey = "Cab_GB412CMKIII_57_Cone";
rack1.Type = "Racks";
rack1.Category = "Filter";
rack1.PedalKey = "Rack_StudioEQ";
rack2.Type = "Racks";
rack2.Category = "Dynamics";
rack2.PedalKey = "Rack_StudioCompressor";
prepedal1.Type = "Pedals";
prepedal1.Category = "Filter";
prepedal1.PedalKey = "Pedal_AcousticEmulator";
tone2014.GearList = new Gear2014()
{
Amp = amp,
Cabinet = cabinet,
Rack1 = rack1,
Rack2 = rack2,
PrePedal1 = prepedal1
};
}
return tone2014;
}
#endregion
public void Dispose() { }
}
}