I am constructing a tuning fork app. The fork should allow up to 12 preset pitches.
Moreover, I wish to allow the user to choose a theme. Each theme will load a set of presets (not necessary to use all of them).
My configuration file would look something like this*:
(* of course I am happy to modify the format in order to simplify the necessary code, the consideration is that the customer will be building their own file by hand, so I want to avoid unnecessary overhead / obfuscation)
theme: "A3"
comment: "An octave below concert pitch (ie A4 440Hz)"
presets: {
A3 220Hz=220.0
}
//
http://en.wikipedia.org/wiki/Guitar_tuning
theme: "Guitar Standard Tuning"
comment:"EADGBE using 12-TET tuning"
presets: {
E2=82.41
A2=110.00
D3=146.83
G3=196.00
B3=246.94
E4=329.63
}
theme: "Bass Guitar Standard Tuning"
comment: "EADG using 12-TET tuning"
presets: {
E1=41.204
A2=55.000
D3=73.416
G3=97.999
}
...which need to be extracted into some structure like this:
@class Preset
{
NSString* label;
double freq;
}
@class Theme
{
NSString* label;
NSMutableArray* presets;
}
NSMutableArray* themes;
What are my options? How can I achieve this tidily? Can anyone point me towards some relevant code?
(NOTE: this is NOT a duplicate of another question that has practically an identical title, so please don't flag it just because the titles match)
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)