tngiloy wrote:This is a HUGE favor I'm asking, so I understand if I can't get what I need.
I use a URC remote which accepts hex codes in the Pronto format. I tried to convert NEC codes listed in the update using Yamaha converter with no luck.
Has anyone here found or translated to the Pronto hex codes for these RME ADI-DAC commands ?
I have a script for the RME ADI-2 Pro.
import Foundation
func printConfig(header:String, footer:String, format:String) {
let codeMap :[(String, UInt8)] = [
("PowerOn", 0xA0),
("PowerOff", 0x94),
("VolumeDown", 0xA1),
("VolumeUp", 0xA2),
("COAX", 0xA3),
("OPT", 0xA4),
("USB", 0xA5),
("1", 0xA6),
("2", 0xA7),
("3", 0xA8),
("4", 0xA9),
("Mute", 0xAA),
("B/T", 0xAB),
("EQ", 0xAC),
("LD", 0xAD),
("VOL", 0xAE),
("BassUp", 0xAF),
("BassDown", 0xB0),
("TrebleUp", 0xB1),
("TrebleDown", 0xB2),
("BalL", 0xB3),
("BalR", 0xB4),
("SEL", 0xB5),
("Setup1", 0xB6),
("Setup2", 0xB7),
("Setup3", 0xB8),
("Setup4", 0xB9),
("Setup5", 0xBA),
("Setup6", 0xBB),
("Setup7", 0xBC),
("Setup8", 0xBD),
("Setup9", 0xBE),
("Mono", 0x80),
("MonoToL", 0x81),
("MuteAll", 0x82),
("EQ+B/T+LD", 0x83),
("TogglePh/Line", 0x84),
("Polarity", 0x85),
("AutoDark", 0x86),
("Dim", 0x87),
("ToggleView", 0x88),
("Crossfeed1", 0x89),
("Crossfeed2", 0x8A),
("Crossfeed3", 0x8B),
("Crossfeed4", 0x8C),
("Crossfeed5", 0x8D),
("DACSDSharp", 0x8E),
("DACSDSlow", 0x8F),
("DACSharp", 0x90),
("DACSlow", 0x91),
("DACNOS", 0x92),
("DACSDLD", 0x93),
("SourceAES", 0x95),
("SourceSPDIF", 0x96),
("SourceOptical", 0x97),
("SourceAnalog", 0x98),
("SourceUSB1/2", 0x99),
]
func lircCode(_ code: UInt8) -> UInt32 {
func reversedBits(_ n: UInt16) -> UInt16 {
var n: UInt16 = n
var m: UInt16 = 0
var i: UInt16 = 16
while i > 0 && n != 0 {
m = m << 1 + n & 0b1
n = n >> 1
i -= 1
}
m = m << i
return m
}
let lirc_code = reversedBits(UInt16(code) | (UInt16(~code)<<8))
let device = UInt16(0x3412)
return (UInt32(reversedBits(device)) << 16) | UInt32(lirc_code)
}
print(header)
for pair in codeMap {
let function = pair.0
let code = lircCode(pair.1)
print (String(format:format, function, code))
}
print(footer)
}
func printLIRC() {
let header = """
begin remote
name RME
bits 32
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9000 4500
one 563 1687
zero 563 562
ptrail 563
repeat 9000 2250
gap 108000
toggle_bit_mask 0x0
frequency 38000
duty_cycle 33
begin codes
"""
let format = " %@\t0x%08X"
let footer = """
end codes
end remote
"""
printConfig(header:header, footer:footer, format:format)
}
printLIRC()
Run 'swift filename.swift > filename.lirc' and you'll get a LIRC output.
I list the code here in case someone needs to modify it for the DAC --- you just need to replace codeMap with the DAC values in the doc.
For the Pro, it should generate the following output
begin remote
name RME
bits 32
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9000 4500
one 563 1687
zero 563 562
ptrail 563
repeat 9000 2250
gap 108000
toggle_bit_mask 0x0
frequency 38000
duty_cycle 33
begin codes
PowerOn 0x482C05FA
PowerOff 0x482C29D6
VolumeDown 0x482C857A
VolumeUp 0x482C45BA
COAX 0x482CC53A
OPT 0x482C25DA
USB 0x482CA55A
1 0x482C659A
2 0x482CE51A
3 0x482C15EA
4 0x482C956A
Mute 0x482C55AA
B/T 0x482CD52A
EQ 0x482C35CA
LD 0x482CB54A
VOL 0x482C758A
BassUp 0x482CF50A
BassDown 0x482C0DF2
TrebleUp 0x482C8D72
TrebleDown 0x482C4DB2
BalL 0x482CCD32
BalR 0x482C2DD2
SEL 0x482CAD52
Setup1 0x482C6D92
Setup2 0x482CED12
Setup3 0x482C1DE2
Setup4 0x482C9D62
Setup5 0x482C5DA2
Setup6 0x482CDD22
Setup7 0x482C3DC2
Setup8 0x482CBD42
Setup9 0x482C7D82
Mono 0x482C01FE
MonoToL 0x482C817E
MuteAll 0x482C41BE
EQ+B/T+LD 0x482CC13E
TogglePh/Line 0x482C21DE
Polarity 0x482CA15E
AutoDark 0x482C619E
Dim 0x482CE11E
ToggleView 0x482C11EE
Crossfeed1 0x482C916E
Crossfeed2 0x482C51AE
Crossfeed3 0x482CD12E
Crossfeed4 0x482C31CE
Crossfeed5 0x482CB14E
DACSDSharp 0x482C718E
DACSDSlow 0x482CF10E
DACSharp 0x482C09F6
DACSlow 0x482C8976
DACNOS 0x482C49B6
DACSDLD 0x482CC936
SourceAES 0x482CA956
SourceSPDIF 0x482C6996
SourceOptical 0x482CE916
SourceAnalog 0x482C19E6
SourceUSB1/2 0x482C9966
end codes
end remote
Input that output to IrScrutunizer and you can export it to any format you want.
Here's the instruction: in IrScrutunizer,
1. Go to the "Import" panel, select the LIRC tab, in file URL, choose the file you just created. and press "Load File/URL".
2. You should see the RME code imported. Click the "Import all/param" button.
3. Go to "Export" panel, Select "export format" menu. Choose the format you want, such as , "irplus", or "Pronto Hex"
4. Go to the "Scrutinize Remote" panel, tap "Export" button.
you are done! happy remoting!