Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6125753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:17:03+00:00 2026-05-23T16:17:03+00:00

I am constructing a tuning fork app. The fork should allow up to 12

  • 0

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*:


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;

How do I write my file using JSON? ( I would like to create a minimum of typing on the part of the user — how succinct can I get it? Could someone give me an example for the first theme? )

And how do I parse it into the structures using https://github.com/johnezang/JSONKit?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:17:03+00:00Added an answer on May 23, 2026 at 4:17 pm

    Here’s a valid JSON example based on your thoughts:

    [
        {
            "name": "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"
            }
        },
        {
            "name": "Bass Guitar Standard Tuning",
            "comment": "EADG using 12-TET tuning",
            "presets": {
                "E1": "41.204",
                "A1": "55.000",
                "D2": "73.416",
                "G2": "97.999"
            }
        }
    ]
    

    Read a file and parse using JSONKit:

    NSData* jsonData = [NSData dataWithContentsOfFile: path];
    JSONDecoder* decoder = [[JSONDecoder alloc]
                                 initWithParseOptions:JKParseOptionNone];
    NSArray* json = [decoder objectWithData:jsonData];
    

    After that, you’ll have to iterate over the json variable using a for loop.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am constructing a tuning fork app. The fork should allow up to 12
We are constructing an application that will be interacting with Exchange 2007 calendar functions.
//Constructing set of all Places in Conflict with each other int l_placeVec, l_placeVec1,p; for(SP_ListListNode::const_iterator
I am constructing a task app ( For fun) & i just sat down
I am constructing an application which will be able to output data to RSS
I am constructing an asp.net tree view by querying sharepoint user profiles. The accountname
Im constructing an array of objects like this: var postData = []; $.each(selectedFields, function
I'm constructing a regex which will accept at least 1 alpha numerical character and
I have problems constructing a reg exp. I think I should use lookahead/behind but
I am constructing a little app in javascript right now but I've clashed into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.