Last night I changed the listing numbers on the left to reflect what they actually are on the Altair (ie changed 00 to 01, 01 to 02 etc.).
I sense there may be a conceptual skew that happened somewhere up the thread and I worry that you're unintentionally overcomplicating it. I assume you're looking at Dompier's original listing at the bottom of the linked page because we're talking in octal. That listing is already set up to do exactly what you're doing-- entering into the Altair front panel byte by byte-- and uses one line for each single byte of program data to be entered. Multibyte instructions (including ones with 16 bit operands) are
already listed in sequential byte order as you're supposed to enter them. For example:
000 LXI H 041
001 b2 xxx - ADDRESS OF FIRST
002 b3 xxx DATA ENTRY
This is listing the values that are meant to go into addresses 0, 1, and 2, in order. (The addresses are written in octal here, in the left column, but of course these numbers look the same as decimal or hex: it's just bytes zero, one, and two; the first three bytes in memory.)
The octal value 041 is an 8-bit value. That value goes into address zero. (It isn't a 16-bit value and doesn't need to be rearranged in any way.) The next two bytes, at 001 and 002, are here shown as "xxx" because he wants you to to just fill in the target address of the LXI instruction yourself. The reason he's making that your job is because he has two songs listed and you might want to switch between them. In Dompier's text, he shows the byte sets for the songs (Fool on the Hill, Daisy) after the program-- he's telling you to put the address of the start of your preferred song data into addresses 001 and 002 (so the program can find it). THIS is where you need to use the little-endian byte swap trick. So if you start entering the music data at address octal 040 for Fool as he notes, then you would input the (octal) 040 into byte address 001 and then zero (octal 000) into byte address 002, because the low byte (040) goes first followed by the higher-order byte (000).
Those three bytes in that sequence represent the full LXI instruction: the opcode and the address operand. Dompier's listing is already made for doing exactly what you're doing-- just walking down the list and depositing each byte into the Altair front panel one byte at a time. He also omits the tempo value at byte address octal 012 as you know, and for that you can enter value 040 (=hex $20) as you've found.
The only time in this whole entering process that you need to consider the 16-bit little endian byte swap is for those two bytes I noted that contain the address (a "pointer") to the start of the music data.
Again, as you continue onwards, it's just one byte for every address:
003 MOV A,M 176
004 CPI 376
005 b2 377 - START OVER DATA
Address 003 needs to contain the single byte value 176. The listing is telling you that this represents a MOV instruction but that's just for your reference here. Then address 004 needs to be set to the single byte value 376 (which represents the first byte of a CPI instruction). Address 005 gets octal value 377, which is the operand for the CPI instruction, but again you don't really need to worry about this, just go byte by byte down the listing.
The process is you reset to address zero, and switch in each byte as you go down the list, and do Deposit-Next or whatever so the address keeps incrementing for you. When you've entered the program you have to enter the music data, which Dompier starts at address 040 matching what you've keyed in above. (Note that there's a gap between the end of the program and the start of the music data here so you'll need to adjust the front panel address after finishing the program before you start entering music data bytes.)
Addendum, but I don't want to confuse further: The listing at the TOP of the linked page is the same program, but redone in hex, and also includes the song data addressed after the program, and all the DIY bytes ("xxx") already filled in. If you're fluent in hex, it might be easier to use this listing, which you could enter entirely by rote. If you'd like to work with Dompier's original octal ("builds character!") you can cross-check yourself on any uncertainties by scrolling up to see if it matches your expectations.