Before transpositions and such, it works, effectively, like this:
Where $P$ is the note name and $O$ is the octave number.
In western music, there are 8 "notes" per octave (though there are 12 actual tones). The notes in one octave are obtained from the previous octave by doubling the frequency. For example, $A4$ has a frequency of $440$ Hz, so $A3$ is $220$ Hz and $A5$ is $880$ Hz. The notes in a single octave are related by specific ratios of frequencies that are dependent on a few factors which can be read about here.
Transposition, in music, is the act of moving the notes of a song up or down based on the needs of key, instrument, and a number of other factors. For example, if you wanted to transpose $A4$ up 6 tones, you would get $D\sharp5$ (since the octave starts, traditionally, at $C$ and has period $12$).
So, the method by which OEIS does its "Listen to this Sequence" stuff works, more finely, like this:
- Add to the terms of the sequence the amount being transposed.
- Store the adjusted terms as hexadecimal values suitable for MIDI
- Write the notes (with start and stop instructions and other relevant data) as hexadecimal values to a MIDI file.
- (USER) Open MIDI file in appropriate player.
- (Player) Interpret hexadecimal values for terms from sequence as $P(n)$ and $O(n)$ from above.
- (Player) Use instrument base tone (varies by MIDI device) as a starting point.
- (Player) Adjust base tone to octave by doubling (or halving).
- (Player) Adjust octave tone to pitch by appropriate ratio.
For a list of Western music note frequencies, see here. Of course, it is cheaper on memory to just store the base frequency of $A4\rightarrow440$ and adjust from there.