Website Faviconnotations

Notations and some important data structures used in Habbo Hotel

View the Project on GitHub Habbianos/notations

Habbo Music Notation (HMN) v1.0

Table of Contents

1. Introduction

1.1. Abstract

Habbo Music Notation (HMN) v1 is a standard for the text-based notation designed to represent music compositions in the Traxmachine system of Habbo Hotel. It encodes structured data for music layers, sample references, and durations as a single-line string.

While HMN v1 reflects how Habbo Hotel interprets music tracks, it is not an official Sulake notation, and future changes may not be adopted by Sulake.

1.2. Scope and Intent

1.2.1. This Document

This specification exists to formalize and document how Habbo encodes Traxmachine music for storing purposes. It is:

1.2.2. The Notation

HMN v1 is a textual representation of layered musical data that enables:

1.3. Audience

This document is aimed at developers, researchers, archivists, and enthusiasts involved in the Habbo Hotel community, particularly those working on tools for music playback, preservation, and analysis of Traxmachine compositions. It also serves as a common reference for understanding, implementing, and manipulating the Habbo Music Notation (HMN), which can be used for tasks such as developing interoperable software, emulators, and documentation for fan-driven projects. The audience also includes data scientists who may utilize this notation in music-related research or analysis. Familiarity with basic programming concepts, string manipulation, and digital audio representation is recommended but not required.

2. Status of This Document

HMN v1.0 defines the a known structure for how Traxmachine music compositions used to be stored, based on the original implementation in Habbo Hotel.

HMN is a community-maintained. While efforts are made to ensure accuracy, Sulake may change the format at any time. Future extensions will aim to preserve backward compatibility whenever possible.

3. Normative Language

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

4. Conformance

An implementation is considered HMN v1.0 compliant if it adheres to the syntax, processing rules, and constraints defined in this document. A conforming parser implementation:

A valid HMN v1.0 string MUST:

  1. Follow the syntax definition in Section 5.
  2. Maintain correct data formatting (colons, semicolons, and numbers).
  3. Not exceed the specified sample ID range (0-648).
  4. Ensure that durations are positive integers up to 150 and multiples of its sample duration.

5. Syntax Definition

5.1. Overview

An HMN v1 string represents a sequence of musical layers, each comprising a list of samples defined by identifiers and durations.

5.2. Grammar

The following Extended Backus-Naur Form (EBNF) defines the syntax of HMN v1.0:

<layerList>   ::= <layer>+
<layer>       ::= <layerId> ":" <sampleList> ":"
<layerId>     ::= [1-4]
<sampleList>  ::= <sample> (";" <sample>)*
<sample>      ::= <sampleId> "," <duration>
<sampleId>    ::= 0 | <posIntUpTo648>
<duration>    ::= <posIntUpTo150>

5.3. Lexical Constraints

Field Type Range Description
layerId Integer 1-4 Identifier for each musical layer
sampleId Integer 0-648 Reference to global sound sample’s identifier (0 = silence)
duration Integer 1-150 Time in units of 2 seconds

5.4. Regular Expression (Simplified)

The following regular expression can be used to validate the general structure of an HMN v1.0 string:

/^(?:(\d+):(?:(\d+),(\d+))(;(?:(\d+),(\d+)))*:)+$/

6. Processing Model

6.1. Layer Semantics

6.2. Sample Handling

6.3. Duration Constraints

6.4. Error Handling

Error Code Description
ERR_SAMPLE_ID_RANGE sampleId is outside the valid range 0-648.
ERR_INVALID_DURATION duration is outside the valid range 1-150.
ERR_FORMAT_SYNTAX Missing or misplaced delimiters (:, ;, ,).
ERR_EMPTY_LAYER Layer is declared but contains no samples.

An HMN-compliant parser MUST reject invalid files and return an appropriate error.


7. Example Entries

7.1. Basic Example

The following is an example of a valid HMN v1.0 string:

1:12,4;34,2;0,1;56,6:2:22,3;45,2;67,4:3:0,5;31,3;44,2:4:12,6;34,4:

Explanation:

7.2. Example from “Habbowood” (Michael Bauble)

This example is a more complex sequence from the music “Habbowood” by Michael Bauble:

1:280,4;265,4;264,4;263,8;0,16:2:262,4;263,8;266,4;267,4;264,12;262,4:3:0,4;268,8;269,4;270,4;268,8;282,4;285,4:4:0,20;74,4;75,3;81,3;0,6:

7.3. Other Examples

Check more examples at Traxmachine - Demos.


8. Extensibility and Future Work

The following extensions MAY be introduced in future versions:

  1. More than 4 layers for enhanced complexity.
  2. Expanded sample ID ranges for oficial songs or future releases
  3. A binary format (HMN-B) for compact storage.

Future revisions will maintain backward compatibility wherever feasible, and such extensions will be versioned appropriately.


9. Security Considerations

While HMN is purely textual and does not involve code execution, parsers MUST:

Important

This notation DOES NOT have any user-specific information, so by itself it DOES NOT ensures that the user owns the sample pack that contains the sample that was used. It is meant to be this way so that the playback can use the same entry without exposing information about the song’s author. It is important to understand this if you’re saving user generated content, where the user is not meant to have access to all samples.


10. References


Changelog

⬆️ Back to top

✏️ Edit this page on GitHub