FANDOM


O2Jam note files (unofficial) / O2Jam music files are files that carry arrangements of notes and general information of a song that can be played in the rhythm music game O2Jam.

By convention, the OJN file and the corresponding OJM file have the same filename.

Integers in this file format are in little-endian (reversed order). Integers, unless specified, are assumed to be 32-bit integers. "Short integers" are 2-bit integers. "Bytes" are 8-bit integers. "Singles" are 32-bit floating-point values.

SpecificationEdit

HeaderEdit

(300 bytes)

Offset Size Description
0 (0) 4 Song ID (Official songs start with 100). Integer.
4 (4) 4 Hex 4F 4A 4E 00 (reads "OJN\0"). Null-terminated string, fixed.
8 (8) 4 Encoder value (9A 99 39 40). Unknown type, fixed.
12 (C) 4 Genre (see below). Integer.
16 (10) 4 BPM, as it will be displayed when the song is selected. Single.
20 (14) 8 Difficulty level (for each of Easy, Normal and Hard; last 2 bits unused). Short integer each.
28 (1C) 12 (Total) note count per difficulty. (×3, with background music notes) (Easy, Normal and Hard) Integer each.
40 (28) 12 Playable note count per difficulty. (×3, without background music notes) (Easy, Normal and Hard. Integer each.
52 (34) 12 Measure count per difficulty. (×3) (Easy, Normal and Hard) Integer each.
64 (40) 12 Block count per difficulty. See #Note section. (×3) (Easy, Normal and Hard) Integer each.
76 (4C) 2 Unknown, always hex 1D (decimal 29)
78 (4E) 4 Unknown, always equal to the song ID. Integer.
82 (52) 58 Title. Null-terminated string.
140 (8C) 64 Artist. Null-terminated string.
204 (CC) 32 Notecharter. Null-terminated string.
236 (EC) 32 Name of the OJM file. Null-terminated string.
268 (10C) 4 Size of the title image in the image section, in bytes. Integer.
272 (110) 12 Duration of the song in seconds. (×3) (Easy, Normal and Hard). Integer.
284 (11C) 16 Offsets in the file for Easy, Normal and Hard note sections. Integer each. (Consequently, the first field here would be always 0x2C 01 00 00 in little-endian = 0x12C = 300.) Empty note sections have a size of 0. (For example, if the easy section is empty, the offsets for easy and normal would be the same)
300 (12C) 4 Offset in the file for the image section.
304 (130) Terminal offset
  • Strings
    Strings such as the artist field are null-terminated. Maximum size of string is 31 characters for a 32-bit space. Unused space are filled with zeros (corresponding to the null character (NUL "\0")).
  • Genre
    Each integer corresponds to a genre:
    • 0 - Ballad
    • 1 - Rock
    • 2 - Dance
    • 3 - Techno
    • 4 - Hip-hop
    • 5 - Soul/R&B
    • 6 - Jazz
    • 7 - Funk
    • 8 - Classical
    • 9 - Traditional
    • 10 - Etc.

Note sectionsEdit

The full specification is unknown.

There are three note sections for easy, normal and hard difficulty.

Each section is composed of blocks. The total number of blocks in each note section is specified in the header.

Block specificationEdit

Each block contains a header and the main message. The header is as follows:

Offset Size Description
0 (0) 4 The measure number on which the block is assigned. Integer.
4 (4) 2 The channel type. Short integer.
6 (6) 2 The number of data points in the block. Short integer.

Data point specificationEdit

Data points follow the block header. These are 32 bits long. On channel 1 (BPM change), this is just a single value representing the new BPM to use in the song. On channels 2 to 8 (playable notes), the structure is as follows:

Offset Size Description
0 (0) 2 Determines whether to use the WAV or the OGG category. (Values unknown)
2 (2) 1
3 (3) 1 The note type. Byte.

In an OJM file, imported sounds are categorized into WAV and OGG, and are identified by a number starting from 1. References are distinct from each category, so WAV003 is different from OGG003. When a reference in a data point is 0, nothing is placed at that point.

Note types:

  • 0 - normal note
  • 2 - start of a long note
  • 3 - end of a long note

Channel assignmentEdit

  • 1 - BPM change.
  • 2 to 8 - Playable notes.
  • 9 and above - Background music / auto-play notes.

Note that the block structure is similar to the individual lines in Be-Music Script. (See sections Game data and Channel assignment.) An illustration of the note placement system is also there.

Image sectionEdit

This section is composed of a JPEG title image, whose size is specified in the header, and a BMP thumbnail right after the title image.

See alsoEdit

Notes and referencesEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.