Tutorial for writing custom control surface scripts?

Discuss music production with Ableton Live.
synnack
Posts: 2053
Joined: Fri Mar 02, 2007 10:55 pm
Location: Boston, MA
Contact:

Post by synnack » Sun Jan 18, 2009 2:37 am

Post your whole file, otherwise how can we really help you?

I suspect you didn't edit these lines.

[Globals]
# The channel that the controller should send on
GlobalChannel: 0
# If your controller is connected via USB, replace ControllerName
# with the name of the respective port. Live will then try to
# recognize the ports for you when you select your Instant-Mappings
InputName: ControllerName
OutputName: ControllerName
MBP | Live 9 Suite | Max for Live | Push | MOTU Ultralite | iPad | Analog Modular Synths | Moog Voyager
aka "Tempus3r" | Music | Blog | Twitter | Soundcloud

Image

logic_user99
Posts: 1965
Joined: Fri Oct 26, 2007 3:58 pm
Location: Nottingham, UK

Post by logic_user99 » Sun Jan 18, 2009 11:07 am

Sorry, tempus3r. Should have thought of that...

[Globals]
# The channel that the controller should send on
GlobalChannel: 1
# If your controller is connected via USB, replace ControllerName
# with the name of the respective port. Live will then try to
# recognize the ports for you when you select your Instant-Mappings
InputName: Automap MIDI
OutputName: Automap MIDI

# If your controller has pads that send notes, you can use them to
# play the visible pads in your DrumRacks. Just replace the -1 for
# the note (and channel) of the respective pad. The arrangement of
# the pads in the DrumRacks is as follows:
# 1 2 3 4
# 5 6 7 8
# 9 10 11 12
# 13 14 15 16
# (If you leave the channel of a pad at -1, Live will assume that
# the pad uses the global channel)
Pad1Note: -1
Pad2Note: -1
Pad3Note: -1
Pad4Note: -1
Pad5Note: -1
Pad6Note: -1
Pad7Note: -1
Pad8Note: -1
Pad9Note: -1
Pad10Note: -1
Pad11Note: -1
Pad12Note: -1
Pad13Note: -1
Pad14Note: -1
Pad15Note: -1
Pad16Note: -1
Pad1Channel: -1
Pad2Channel: -1
Pad3Channel: -1
Pad4Channel: -1
Pad5Channel: -1
Pad6Channel: -1
Pad7Channel: -1
Pad8Channel: -1
Pad9Channel: -1
Pad10Channel: -1
Pad11Channel: -1
Pad12Channel: -1
Pad13Channel: -1
Pad14Channel: -1
Pad15Channel: -1
Pad16Channel: -1

[MixerControls]
# Again enter the appropriate CCs for the respective controls.
# If all sliders use the global channel to send their data,
# you can leave the channels at -1. You can, of course, use
# encoders or knobs instead of sliders.
VolumeSlider1: -1
VolumeSlider2: -1
VolumeSlider3: -1
VolumeSlider4: -1
VolumeSlider5: -1
VolumeSlider6: -1
VolumeSlider7: -1
VolumeSlider8: -1
Slider1Channel: -1
Slider2Channel: -1
Slider3Channel: -1
Slider4Channel: -1
Slider5Channel: -1
Slider6Channel: -1
Slider7Channel: -1
Slider8Channel: -1
MasterVolumeSlider: -1
MasterSliderChannel: -1
Send1Knob1: 0
Send1Knob2: 1
Send1Knob3: 2
Send1Knob4: 3
Send1Knob5: 4
Send1Knob6: 5
Send1Knob7: 6
Send1Knob8: 7
Send2Knob1: 16
Send2Knob2: 17
Send2Knob3: 18
Send2Knob4: 19
Send2Knob5: 20
Send2Knob6: 21
Send2Knob7: 22
Send2Knob8: 23
TrackArmButton1: 8
TrackArmButton2: 9
TrackArmButton3: 10
TrackArmButton4: 11
TrackArmButton5: 12
TrackArmButton6: 13
TrackArmButton7: 14
TrackArmButton8: 15

VolumeMapMode: Absolute
SendsMapMode: Absolute

[TransportControls]
# The transport buttons are also expected not to be toggles.
StopButton: -1
PlayButton: -1
RecButton: -1
LoopButton: -1
RwdButton: -1
FfwdButton: -1

I've only assigned the sends & track arm buttons at the moment... everything else is controlled by the MPD. Halp?
Macbook | Live 7.0.18 |

synnack
Posts: 2053
Joined: Fri Mar 02, 2007 10:55 pm
Location: Boston, MA
Contact:

Post by synnack » Sun Jan 18, 2009 1:36 pm

I'm not 100% sure on this and I'm too hung over to test it but to get it to work for me before InputName and OutputName had to be set to the exact string that ableton sees for your controller. Not a string you assign.

Is Automap MIDI actually how it shows up in the device list?
MBP | Live 9 Suite | Max for Live | Push | MOTU Ultralite | iPad | Analog Modular Synths | Moog Voyager
aka "Tempus3r" | Music | Blog | Twitter | Soundcloud

Image

logic_user99
Posts: 1965
Joined: Fri Oct 26, 2007 3:58 pm
Location: Nottingham, UK

Post by logic_user99 » Sun Jan 18, 2009 2:06 pm

tempus3r wrote:I'm not 100% sure on this and I'm too hung over to test it but to get it to work for me before InputName and OutputName had to be set to the exact string that ableton sees for your controller. Not a string you assign.

Is Automap MIDI actually how it shows up in the device list?
Aye, AFAIK it is correct like that. Because the Nocturn doesn't automap to Live, you have to use one of the proprietary MIDI channels to control Live (so 1 thru 16 if you were to use the MIDI Mapping mode).
Macbook | Live 7.0.18 |

[outofocus]
Posts: 67
Joined: Fri Oct 18, 2002 9:16 pm
Location: köln, germany

Post by [outofocus] » Thu Jan 22, 2009 11:43 pm

Hello,

I try to use a Pocket Dial with userconfig.txt mapping but it does not work.
I have set the Pocket Dial to Preset 111: Rel. Ctrl (two compl.)64-79 and Channel 1.
I just want to control the FXDevices and Instruments with it.

This is my file:

Code: Select all

# Config File for User-defined Instant Mappings

# We assume that the controls on your MIDI controller
# send CCs (except for pads). All controls that do not have
# an explicit channel setting are expected to use the
# global channel. CCs & Notes are counted from 0-127
# and channels from 0-15.

[Globals]
# The channel that the controller should send on
GlobalChannel: 1
# If your controller is connected via USB, replace ControllerName
# with the name of the respective port. Live will then try to 
# recognize the ports for you when you select your Instant-Mappings
InputName: PocketDial
OutputName: PocketDial
# If your controller has pads that send notes, you can use them to
# play the visible pads in your DrumRacks. Just replace the -1 for
# the note (and channel) of the respective pad. The arrangement of
# the pads in the DrumRacks is as follows:
#   1     2     3     4
#   5     6     7     8
#   9    10    11    12  
#  13    14    15    16
# (If you leave the channel of a pad at -1, Live will assume that
#  the pad uses the global channel)
Pad1Note: -1
Pad2Note: -1
Pad3Note: -1
Pad4Note: -1
Pad5Note: -1
Pad6Note: -1
Pad7Note: -1
Pad8Note: -1
Pad9Note: -1
Pad10Note: -1
Pad11Note: -1
Pad12Note: -1
Pad13Note: -1
Pad14Note: -1
Pad15Note: -1
Pad16Note: -1
Pad1Channel: -1
Pad2Channel: -1
Pad3Channel: -1
Pad4Channel: -1
Pad5Channel: -1
Pad6Channel: -1
Pad7Channel: -1
Pad8Channel: -1
Pad9Channel: -1
Pad10Channel: -1
Pad11Channel: -1
Pad12Channel: -1
Pad13Channel: -1
Pad14Channel: -1
Pad15Channel: -1
Pad16Channel: -1

[DeviceControls]
# The Encoders will control the device parameters (you can also
# use knobs or sliders). Replace the -1's with the CCs sent by 
# the respective controls on your controller. You can also set
# the channel for each controller if it differs from the global
# channel (if you leave the channel of an encoder at -1, Live
# will assume that the encoder uses the global channel).
Encoder1: 64
Encoder2: 65
Encoder3: 66
Encoder4: 67
Encoder5: 68
Encoder6: 69
Encoder7: 70
Encoder8: 71
Encoder9: 72
Encoder10: 73
Encoder11: 74
Encoder12: 75
Encoder13: 76
Encoder14: 77
Encoder15: 78
Encoder16: 79
EncoderChannel1: -1
EncoderChannel2: -1
EncoderChannel3: -1
EncoderChannel4: -1
EncoderChannel5: -1
EncoderChannel6: -1
EncoderChannel7: -1
EncoderChannel8: -1
# Enter the respective map mode for the encoders here. The following
# map modes are available:
# - Absolute
# - Absolute14Bit
# - LinearSignedBit 
# - LinearSignedBit2
# - LinearTwoCompliment
# - LinearBinaryOffset
# - AccelSignedBit 
# - AccelSignedBit2
# - AccelTwoCompliment
# - AccelBinaryOffset
# Consult the controller's documentation to find out which mode to use.
EncoderMapMode: LinearTwoCompliment
# Buttons used here are expected to not be toggles (i.e., sending 
# value 0 every second time you press it).
Bank1Button: -1
Bank2Button: -1
Bank3Button: -1
Bank4Button: -1
Bank5Button: -1
Bank6Button: -1
Bank7Button: -1
Bank8Button: -1
NextBankButton: -1
PrevBankButton: -1
LockButton: -1

[MixerControls]
# Again enter the appropriate CCs for the respective controls.
# If all sliders use the global channel to send their data,
# you can leave the channels at -1. You can, of course, use
# encoders or knobs instead of sliders.
VolumeSlider1: 64
VolumeSlider2: -1
VolumeSlider3: -1
VolumeSlider4: -1
VolumeSlider5: -1
VolumeSlider6: -1
VolumeSlider7: -1
VolumeSlider8: -1
Slider1Channel: -1
Slider2Channel: -1
Slider3Channel: -1
Slider4Channel: -1
Slider5Channel: -1
Slider6Channel: -1
Slider7Channel: -1
Slider8Channel: -1
MasterVolumeSlider: -1
MasterSliderChannel: -1
Send1Knob1: -1
Send1Knob2: -1
Send1Knob3: -1
Send1Knob4: -1
Send1Knob5: -1
Send1Knob6: -1
Send1Knob7: -1
Send1Knob8: -1
Send2Knob1: -1
Send2Knob2: -1
Send2Knob3: -1
Send2Knob4: -1
Send2Knob5: -1
Send2Knob6: -1
Send2Knob7: -1
Send2Knob8: -1
TrackArmButton1: -1
TrackArmButton2: -1
TrackArmButton3: -1
TrackArmButton4: -1
TrackArmButton5: -1
TrackArmButton6: -1
TrackArmButton7: -1
TrackArmButton8: -1
VolumeMapMode: Absolute
SendsMapMode: Absolute

[TransportControls]
# The transport buttons are also expected not to be toggles.
StopButton: -1
PlayButton: -1
RecButton: -1
LoopButton: -1
RwdButton: -1
FfwdButton: -1


---

doc holiday
Posts: 1683
Joined: Thu Jan 24, 2008 1:49 am
Location: NOW

Post by doc holiday » Thu Jan 22, 2009 11:46 pm

logic_user99 wrote:BUMP! Can anyone post a copy of one of their UserScripts? I just can't get this shit to work...

Have changed the '-1's to CC#s, and put it in a new folder etc. Live sees the folder, but it's not picking up the knob movements. BAH!
i'm going way out on a limb... i haven't used this file in a while, but some times midi channels go 0-15 and sometimes 1-16 you might be on the wrong channel????

fishmonkey
Posts: 4479
Joined: Wed Oct 24, 2007 4:50 am

Post by fishmonkey » Fri Jan 23, 2009 8:00 am

doc holiday wrote:
logic_user99 wrote:BUMP! Can anyone post a copy of one of their UserScripts? I just can't get this shit to work...

Have changed the '-1's to CC#s, and put it in a new folder etc. Live sees the folder, but it's not picking up the knob movements. BAH!
i'm going way out on a limb... i haven't used this file in a while, but some times midi channels go 0-15 and sometimes 1-16 you might be on the wrong channel????
yep, that's the most likely cause...

some equipment/software uses 0-15 (direct translation from hexadecimal), and some represent the channels as 1-16...

bulo
Posts: 434
Joined: Sat Sep 09, 2006 7:57 pm
Location: France
Contact:

Post by bulo » Thu Jan 29, 2009 11:22 pm

There's nothing to map the pans in the user script.
Does this mean that it's not possible?
Thanks.
My tongue spits english like a frog and my head is currently searching for a comprehensive language.
And I shit here

doc holiday
Posts: 1683
Joined: Thu Jan 24, 2008 1:49 am
Location: NOW

Post by doc holiday » Fri Jan 30, 2009 12:54 am

can you map sends yet?

there was one version of live 6 where you could map the sends.

fishmonkey
Posts: 4479
Joined: Wed Oct 24, 2007 4:50 am

Post by fishmonkey » Fri Jan 30, 2009 1:49 am

sends yes, pans no...

Mackie Control emulation is the way to go if you want full control...

bulo
Posts: 434
Joined: Sat Sep 09, 2006 7:57 pm
Location: France
Contact:

Post by bulo » Fri Jan 30, 2009 9:54 pm

Ok, thanks.
So it won't be possible for because I use an ozonic.
My tongue spits english like a frog and my head is currently searching for a comprehensive language.
And I shit here

fishmonkey
Posts: 4479
Joined: Wed Oct 24, 2007 4:50 am

Post by fishmonkey » Fri Jan 30, 2009 11:28 pm

you should be able to program your Ozonic to do the basics of Mackie Control emulation... if you can program the channels of the Ozonic controls then it is also good to set up your encoders as a second non-MC mapping so that they automatically map to the macros knobs of Live devices... then you can have the best of both worlds...

one problem with the instant mappings is that there is no way to control more than the first 8 channels (volume/sends) of a Live set, but you can do this using MC emulation...

channelite
Posts: 472
Joined: Sat Sep 15, 2007 8:25 pm
Location: Nevada, USA

Re: Tutorial for writing custom control surface scripts?

Post by channelite » Wed Apr 22, 2009 4:55 am

This looks really cool. I'm trying to make a Control Surface for my Korg MS2000R. The knobs are really smooth. Can't seem to get it to work. Since it's connected via midi through an MBox 2, should that be the Input Output name? I have the MS2000R on midi channel 14, should that be the global?

# Config File for User-defined Instant Mappings

# We assume that the controls on your MIDI controller
# send CCs (except for pads). All controls that do not have
# an explicit channel setting are expected to use the
# global channel. CCs & Notes are counted from 0-127
# and channels from 0-15.

[Globals]
# The channel that the controller should send on
GlobalChannel: 14
# If your controller is connected via USB, replace ControllerName
# with the name of the respective port. Live will then try to
# recognize the ports for you when you select your Instant-Mappings
InputName: Mbox 2 (Port 1)
OutputName: Mbox 2 (Port 1)

fishmonkey
Posts: 4479
Joined: Wed Oct 24, 2007 4:50 am

Re: Tutorial for writing custom control surface scripts?

Post by fishmonkey » Wed Apr 22, 2009 5:26 am

channelite wrote:This looks really cool. I'm trying to make a Control Surface for my Korg MS2000R. The knobs are really smooth. Can't seem to get it to work. Since it's connected via midi through an MBox 2, should that be the Input Output name? I have the MS2000R on midi channel 14, should that be the global?
check if your MS2000R numbers the MIDI channels from 0-15 or from 1-16... if it goes from 1-16 then your global channel in the instant mapping file should be 13 instead...

the port names are not crucial, you can select them manually in the Live prefs anyway... the names give Live a hint so that it can attempt to choose the right ports automatically...

channelite
Posts: 472
Joined: Sat Sep 15, 2007 8:25 pm
Location: Nevada, USA

Re: Tutorial for writing custom control surface scripts?

Post by channelite » Wed Apr 22, 2009 2:03 pm

Yep, changing the midi channel one lower worked. I think also closing the UserConfiguration.txt file and relaunching Live made it work too. When I was trying it last time, I wasn't restarting Live or closing the file, just saving the file.

Post Reply