Duplex mapping for nanoKONTROL Studio

Hello,

Please find an adaption that I did for a Korg nanoKontrol Studio.
I’m still searching a way to set block loop size on the wheel.
An other problem I have is setting “Buttons3” group as trigger for parameter automation record. I would like like to set the record_method (disabled, interleaved or punch-in) with those buttons for each parameter respectively, but can’t find a way to do it. Could the “States” in the .xml help?

If I try with some application like

Automateable = {
mappings = {
record_method = {
group_name = “Buttons3”,
},
},

I have following error:

xOscClient: Renoise OSC server was found at 127.0.0.1:8000
*** .\xLib/classes/xAutomation.lua:114: variable ‘xStreamPos’ is not declared
*** stack traceback:
*** [C]: in function ‘_error’
*** [string “local mt = getmetatable(_G)…”]:29: in function <[string “local mt = getmetatable(_G)…”]:24>
*** .\xLib/classes/xAutomation.lua:114: in function ‘record’
*** .\Duplex/Applications/Effect.lua:520: in function ‘on_change’
*** .\Duplex/UISlider.lua:723: in function <.\Duplex/UISlider.lua:720>
*** (tail call): ?
*** .\Duplex/UISlider.lua:368: in function ‘do_change’
*** .\Duplex/MessageStream.lua:368: in function ‘?’
*** .\Duplex/MessageStream.lua:378: in function ‘_handle_or_pass’
*** .\Duplex/MessageStream.lua:167: in function ‘_process_fader_message’
*** .\Duplex/MessageStream.lua:140: in function ‘?’
*** .\Duplex/MessageStream.lua:146: in function ‘input_message’
*** .\Duplex/Device.lua:582: in function ‘_send_message’
*** .\Duplex/MidiDevice.lua:612: in function ‘build_message’
*** .\Duplex/MidiDevice.lua:555: in function <.\Duplex/MidiDevice.lua:202>

Thanks in advance for your help.

–[[----------------------------------------------------------------------------
– Duplex.NanoKontrol2
----------------------------------------------------------------------------]]–

duplex_configurations:insert {

– configuration properties
name = “nanoKONO”,
pinned = true,

– device properties
device = {
class_name = “NanoKontrol”,
display_name = “nanoKONO”,
device_port_in = “nanoKONTROL Studio”,
device_port_out = “nanoKONTROL Studio”,
control_map = “Controllers/nanoKONO/Controlmaps/nanoKONO.xml”,
thumbnail = “Controllers/nanoKONO/nanoKONO.bmp”,
protocol = DEVICE_PROTOCOL.MIDI
},

applications = {
Mixer = {
mappings = {
solo = {
group_name = “Buttons2”,
},
mute = {
group_name = “Buttons1”,
},
levels = {
group_name = “Faders”,
},
},
options = {
invert_mute = 1,
follow_track = 1,
take_over_volume = 1,
pre_post = 2,
}
},
Effect = {
mappings = {
parameters = {
group_name = “Encoders”,
},
device_prev = {
group_name = “MARKER”,
index = 2,
},
device_next = {
group_name = “MARKER”,
index = 3,
},
}
},
– Navigator = {
– mappings = {
– blockpos = {
– group_name = “Transport”,
– index = 1,
– },
– prev_block = {
– group_name = “Wheel”,
– index = 1,
– },
– next_block = {
– group_name = “Wheel”,
– index = 1,
– },
– }
– },
Transport = {
mappings = {
loop_pattern = {
group_name = “CYCLE”,
index = 1,
},
goto_previous = {
group_name = “Pattern and Track”,
index = 1,
},
goto_next = {
group_name = “Pattern and Track”,
index = 2,
},
block_loop = {
group_name = “Transport”,
index = 1
},
stop_playback = {
group_name = “Transport”,
index = 2,
},
start_playback = {
group_name = “Transport”,
index = 3,
},
edit_mode = {
group_name = “Transport”,
index = 4,
},
follow_player = {
group_name = “MARKER”,
index = 1,
},
},
options = {
pattern_switch = 2,
pattern_play = 2,
}
},
TrackSelector = {
mappings = {
prev_track = {
group_name = “Pattern and Track”,
index = 3,
},
next_track = {
group_name = “Pattern and Track”,
index = 4,
},
select_track = {
group_name = “Buttons4”,
},
},
},
}
}

NanoKontrol Koskhun based on work of satobox, craftomaniac, Cuubic, spktkpkt Controlmap for Korg NanoKONTROL Studio Please set the "LED mode" to [External] in the Korg Editor
      <Group name="CYCLE" orientation="horizontal">
        <Param value="CC#54" type="button" name="Control Button #1" aspect="0.6"  maximum="127" minimum="0"/>      
      </Group>
    
      <Group name="MARKER" orientation="horizontal">            
        <Param value="CC#55" type="button" name="Control Button #1" aspect="0.6"  maximum="127" minimum="0"/>
        <Param value="CC#56" type="button" name="Control Button #2" aspect="0.6"  maximum="127" minimum="0"/>
        <Param value="CC#57" type="button" name="Control Button #3" aspect="0.6"  maximum="127" minimum="0"/>            
      </Group>
    </Row>
  
    <Row>  
      <Group name="Pattern and Track" orientation="horizontal">            
        <Param value="CC#58" type="button" name="Control Button #1" aspect="0.6" maximum="127" minimum="0"/>
        <Param value="CC#59" type="button" name="Control Button #2" aspect="0.6" maximum="127" minimum="0"/>
        <Param value="CC#60" type="button" name="Control Button #3" aspect="0.6"  maximum="127" minimum="0"/>
        <Param value="CC#61" type="button" name="Control Button #4" aspect="0.6"  maximum="127" minimum="0"/>
      </Group>
    </Row>
    
    <Row>
      <Group name="Transport" orientation="horizontal">
        <Param value="CC#62" type="button" name="Control Button #1"  maximum="127" minimum="0"/>
        <Param value="CC#63" type="button" name="Control Button #2"  maximum="127" minimum="0"/>
        <Param value="CC#80" type="button" name="Control Button #3"  maximum="127" minimum="0"/>
        <Param value="CC#81" type="button" name="Control Button #4"  maximum="127" minimum="0"/>
      </Group>
    </Row>
    
    <Row>
      <Group name="Wheel" orientation="horizontal">
        <Param value="CC#86" type="dial" name="Wheel #1" size="3" aspect="1" maximum="127" minimum="0"/>
      </Group>
    </Row>
  
  </Column>
  
  <Column>                
    
     <Group name="Buttons1" orientation="horizontal" columns="8">
      <Param value="CC#21|Ch1" type="button" name="Button #1"  maximum="127" minimum="0"/>
      <Param value="CC#22|Ch1" type="button" name="Button #2"  maximum="127" minimum="0"/>
      <Param value="CC#23|Ch1" type="button" name="Button #3"  maximum="127" minimum="0"/>
      <Param value="CC#24|Ch1" type="button" name="Button #4"  maximum="127" minimum="0"/>
      <Param value="CC#25|Ch1" type="button" name="Button #5"  maximum="127" minimum="0"/>
      <Param value="CC#26|Ch1" type="button" name="Button #6"  maximum="127" minimum="0"/>
      <Param value="CC#27|Ch1" type="button" name="Button #7"  maximum="127" minimum="0"/>
      <Param value="CC#28|Ch1" type="button" name="Button #8"  maximum="127" minimum="0"/>
    </Group>
    
    <Group name="Buttons2" orientation="horizontal" columns="8">
      <Param value="CC#29|Ch1" type="button" name="Button #1"  maximum="127" minimum="0"/>
      <Param value="CC#30|Ch1" type="button" name="Button #2"  maximum="127" minimum="0"/>
      <Param value="CC#31|Ch1" type="button" name="Button #3"  maximum="127" minimum="0"/>
      <Param value="CC#33|Ch1" type="button" name="Button #4"  maximum="127" minimum="0"/>
      <Param value="CC#34|Ch1" type="button" name="Button #5"  maximum="127" minimum="0"/>
      <Param value="CC#35|Ch1" type="button" name="Button #6"  maximum="127" minimum="0"/>
      <Param value="CC#36|Ch1" type="button" name="Button #7"  maximum="127" minimum="0"/>
      <Param value="CC#37|Ch1" type="button" name="Button #8"  maximum="127" minimum="0"/>
    </Group>        
    
    <Group name="Buttons3" orientation="horizontal" columns="8">
      <Param value="CC#38|Ch1" type="button" name="Button #1"  maximum="127" minimum="0"/>
      <Param value="CC#39|Ch1" type="button" name="Button #2"  maximum="127" minimum="0"/>
      <Param value="CC#40|Ch1" type="button" name="Button #3"  maximum="127" minimum="0"/>
      <Param value="CC#41|Ch1" type="button" name="Button #4"  maximum="127" minimum="0"/>
      <Param value="CC#42|Ch1" type="button" name="Button #5"  maximum="127" minimum="0"/>
      <Param value="CC#43|Ch1" type="button" name="Button #6"  maximum="127" minimum="0"/>
      <Param value="CC#44|Ch1" type="button" name="Button #7"  maximum="127" minimum="0"/>
      <Param value="CC#45|Ch1" type="button" name="Button #8"  maximum="127" minimum="0"/>
    </Group>
    
    <Group name="Buttons4" orientation="horizontal" columns="8">
      <Param value="CC#46|Ch1" type="button" name="Button #1" maximum="127" minimum="0"/>
      <Param value="CC#47|Ch1" type="button" name="Button #2" maximum="127" minimum="0"/>
      <Param value="CC#48|Ch1" type="button" name="Button #3" maximum="127" minimum="0"/>
      <Param value="CC#49|Ch1" type="button" name="Button #4" maximum="127" minimum="0"/>
      <Param value="CC#50|Ch1" type="button" name="Button #5" maximum="127" minimum="0"/>
      <Param value="CC#51|Ch1" type="button" name="Button #6" maximum="127" minimum="0"/>
      <Param value="CC#52|Ch1" type="button" name="Button #7" maximum="127" minimum="0"/>
      <Param value="CC#53|Ch1" type="button" name="Button #8" maximum="127" minimum="0"/>
    </Group>
    
    <Group name="Encoders" orientation="horizontal">
      <Param value="CC#13|Ch1" type="dial" name="Dial #1"  maximum="127" minimum="0"/>
      <Param value="CC#14|Ch1" type="dial" name="Dial #2"  maximum="127" minimum="0"/>
      <Param value="CC#15|Ch1" type="dial" name="Dial #3"  maximum="127" minimum="0"/>
      <Param value="CC#16|Ch1" type="dial" name="Dial #4"  maximum="127" minimum="0"/>
      <Param value="CC#17|Ch1" type="dial" name="Dial #5"  maximum="127" minimum="0"/>
      <Param value="CC#18|Ch1" type="dial" name="Dial #6"  maximum="127" minimum="0"/>
      <Param value="CC#19|Ch1" type="dial" name="Dial #7"  maximum="127" minimum="0"/>
      <Param value="CC#20|Ch1" type="dial" name="Dial #8"  maximum="127" minimum="0"/>
    </Group>
    
    <Group name="Faders" orientation="horizontal">
      <Param value="CC#2|Ch1" type="fader" name="Fader #1"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#3|Ch1" type="fader" name="Fader #2"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#4|Ch1" type="fader" name="Fader #3"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#5|Ch1" type="fader" name="Fader #4"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#6|Ch1" type="fader" name="Fader #5"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#8|Ch1" type="fader" name="Fader #6"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#9|Ch1" type="fader" name="Fader #7"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
      <Param value="CC#12|Ch1" type="fader" name="Fader #8"  orientation="vertical" size="4"  maximum="127" minimum="0"/>
    </Group>        
    
  </Column>        
</Row>