public static BeatSaberJSONClass ConvertUnityDataToBSData(BeatMapData data)
        {
            BeatSaberJSONClass bsaberJSON = new BeatSaberJSONClass();

            bsaberJSON.info = new InfoJSON();
            bsaberJSON.info.beatsPerMinute = (int)data.beatsPerMinute;
            bsaberJSON.info.authorName     = data.mapArtist;
            bsaberJSON.info.songSubName    = data.songArtist;
            bsaberJSON.info.songName       = data.songName;
            // TODO merge with existing info if any //
            bsaberJSON.info.difficultyLevels    = new DifficultyLevel[1];
            bsaberJSON.info.difficultyLevels[0] = DifficultyLevel.Generate(data.difficulty,
                                                                           data.songFileName, (int)data.songOffset);
            List <BSNote> notes = new List <BSNote>();

            for (int count = 0; count < data.notes.Length; count++)
            {
                if (!data.notes[count].inverted)
                {
                    BSNote bSNote = new BSNote();
                    if (data.notes[count].color == Note.NoteColor.LEFT)
                    {
                        bSNote._type = 0;
                    }
                    else
                    {
                        bSNote._type = 1;
                    }
                    bSNote._cutDirection = BSNote.GetBSaberCutDirection(data.notes[count].slashDirection);
                    bSNote._lineIndex    = (int)data.notes[count].gridPosition.x;
                    bSNote._lineLayer    = (int)data.notes[count].gridPosition.y;
                    bSNote._time         = data.notes[count].timeToSpawn;
                    notes.Add(bSNote);
                }
            }
            BeatMap.Log("Notes exported with count " + notes.Count);
            LevelJSON level = new LevelJSON();

            level._beatsPerMinute = (int)data.beatsPerMinute;
            level._version        = "1.0";
            level._beatsPerBar    = 16;
            level._noteJumpSpeed  = 10;
            level._shufflePeriod  = .5f;
            level._notes          = notes.ToArray();
            bsaberJSON.level      = level;
            return(bsaberJSON);
        }