Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: I made a little APC40 App with colorizable clip-launch buttons

  1. #1
    Join Date
    Jan 2014
    Location
    North Carolina, USA
    Posts
    220

    Default I made a little APC40 App with colorizable clip-launch buttons

    APC40 LSX BPM Controller - V2

    Version 2 of this little doohickie is here...

    One of the things that I really wanted to accomplish with using the APC40 with LSX is to get things to work as closely as possible with the way things work, say when a musician is using the APC40 to control Abelton Live. They tap a tempo, select the quantization value, and select clip-launch buttons, and the clips play in tempo.

    Well, LSX doesn't have a way to sync its playback to BPM. This update of the APC40 LSX Controller is an attempt to get LSX to understand BPM.

    Note: This was not 100% successful - please read below for the full details

    Here is a screenshot of the new app in action:
    Click image for larger version. 

Name:	screen-shot.png 
Views:	39 
Size:	177.7 KB 
ID:	45740

    And a photo of the APC40 running LSX:
    Click image for larger version. 

Name:	apc40-photo.jpg 
Views:	42 
Size:	238.0 KB 
ID:	45743

    The UI has been polished a bit - and there is now a Tempo section. Things you can do with the tempo section include:

    * Tap tempo to establish a tempo - you can tap tempo using your mouse and clicking on the TAP butotn, or use the Tap Tempo button on the APC40.
    * Use your mouse to adjust the tempo - which decimal place you click on determines the scale of adjustments.
    * Use the APC40 tempo knob to adjust the tempo. Rotating the knob by itself inc/decs the tempo by 1bpm. Holding the shift key down inc/decs the tempo by 1/10th bpm

    There is also now simple transport control for LSX. Click the Play button on the App or on the APC40 and your show starts playing. Click play again and it stops. Its a toggle, and the LED on the APC 40 indicates whether the show is playing or not. Note though, that if you stop playback using LSX - it does not update the state of the APC40 (yet).

    Also, there are now more colors defined for the clip-launch buttons. The APC40mk2 supports a theoretical RGB color range for the LEDs of the clip-launch buttons. In reality, the colors are quite limited. You can now choose from a larger palette of colors.

    How to get things up an running in LSX

    * Download the APC40 LSX-BPM Controller app

    APC40 LSX BPM Controller

    * If you don't already have a Windows app for creating virtual MIDI channels (shame on Microsoft for not making this part of the OS), then download one of the following programs - this create virtual MIDI ports that we will use to pass MIDI data from the APC App to the Laser Show software.

    LoopMIDI
    LoopBe

    All we need from one of the apps is to create a virtual MIDI port - with loopMIDI it's as simple as launching the app and hitting the + button to add a virtual MIDI port.

    Next, we need to setup the APC40 Max app

    * Launch the APC40-LSX app
    * Doubleclick on the midiout button labeled FROM APC and select your APC40
    * Doubleclick on the midiin button labeled TO APC and select your APC40
    * Doubleclick on the midiout button labeled MIDI Through - and select the virtual MIDI channel created above. This is how the app communicates with LSX.
    * Under the "Select APC Model" step, choose the make of your APC40 - I haven't tested with an APC40mk1, but it should work. This will put the APC40 in "Live" mode and allow us to control the colors and behavior of the clip launch buttons.

    You should now be able to select any of the dropdowns to change the color of any of the clip-launch buttons.

    Setting up LSX

    I have now included template files for getting things running in LSX.

    Template Files

    * apc40-bpm-template.rtd

    This is a template show that should just automatically set everything up (though maybe not the midimap file) - it has a number display which shows the current BPM value received from the APC40 app (rounded for display only - internally its a fp number). It also has a flashing green circle which should flash on at every beeat.

    * apc40-bpm-midimap.MRM

    This is the file that defines the MIDI mapping from the APC 40.

    * APC40-bpm-simplified.SFX

    This is a loop event that handles all of the math of converting MIDI events from the APC40 app to LSX timeline events. This should automatically be included if you load the apc40-bpm-tempalte show.

    Click image for larger version. 

Name:	preview.PNG 
Views:	17 
Size:	99.4 KB 
ID:	45739


    Caveats about getting BPM Tempo to work with LSX

    When using the Live Show mode in LSX, you set the clock to Live Mode - which allows you to use an expression to control the playback speed - called Timeline Speed. My thought was that if I just figure out the scaler factor to go from BPM to this timeline speed, we can have BPM support in LSX.

    After lots of trial and error, it seemed pretty simple. Here is the equation:

    ts = BPM/(124.5*quantValue)

    ts is a timeline speed value with the limits set 0 - 50.

    where BPM is the standard beats per minute unit, and quantValue is a number that determines how many beats we want per cycle (loop). quantValue is actually scaled so that a value of 1 means that the loop repeats at 16th note intervals - with a value of 4 it repeats at quarter note intervals, a value of 16 it repeate at 4 beats (or 1 measure in 4/4 timing), etc...

    This was all well and good in theory. However, what I have discovered is that there is some non-linearity to this equation.

    This non-linearity can best be seen by a graph of the ts values at various BPM values:

    Click image for larger version. 

Name:	ts-drift-web.png 
Views:	15 
Size:	42.5 KB 
ID:	45738

    In calculating these values - I kept the quantValue static and simply adjusted the BPM and then played around with the ts value until it synced up perfectly for at least 10 measures.

    Once I found a ts value that synced up, it stayed in perfect sync for a long time. The problem is that these ts values don't seem to follow any linear relation to the BPM chosen.

    So, yeah, I don't understand why this is.


    It is still usable - just not over a wide range of BPM values. Hopefully at some point in the future I will gain some insight into how the timeline speed effect actually effects playback speed and how it relates to BPM (or any frequency unit).

    Let me know if you wanna use this and need help setting it up. Also let me know if you have any insight into how to better map BPM to Timeline Speed. I would love to get that 100% perfect.
    Attached Thumbnails Attached Thumbnails apc40lsx2.PNG  

    lsx-midi-in-settings.png  

    Last edited by BlueFang; 12-20-2014 at 00:34.

  2. #2
    Join Date
    Dec 2010
    Location
    DC/VA metro area, USA
    Posts
    554

    Default

    That looks like some impressive work!! Thanks so much for contributing! I hope to try this out "eventually."

    I am curious though, to know if the APC40 will still work in its "default" mode if you want to connect it to something else again? Or does the app permanently modify the APC40's memory or configuration?

  3. #3
    Join Date
    Aug 2009
    Location
    Churchill(hour S from Houston)
    Posts
    1,354

    Default

    @ Tribble--'Thanks so much for contributing'

    ditto from me--

    awesome dood!! see you at SELEM 2015 to buy you a drink!!

    subbing this thread for sure!!!

    PM me any time--Len
    BEYOND-FB3/APC40Mamba Black(clone & currently on loan) 2X 5paghetti & 2 I-Show 2X KGB 1000mW 532 DT40K (pair)XFX 1300 RGB full color RGB 30K DIY 3.5WRGB work in progress et al..assorted ttl chi-jectors--LOTS of LUMIA DIY pjs-
    Powered by Pangolin
    Former (2.5 yrs) ILDA Member- :-(
    uncertified ILDA LSO -- dont ask

  4. #4
    Join Date
    Jan 2014
    Location
    North Carolina, USA
    Posts
    220

    Default

    It's definitely not permanent. The mode is reset every time the APC40 is power cycled.

    The APC can run in 3 modes. The modes basically determine how the colors and LEDs of the buttons and knobs behave.

    Mode 0: Generic Mode - this is the mode that it defaults to on power up.
    This is meant to be the "generic" midi controller mode.
    The lighting of most of the buttons is controlled by the APC itself, according to the following rules

    - clip-launch buttons are momentary and light green when pushed
    - clip-stop buttons are momentary and light orange when pushed
    - track-select buttons operate as a radio group, with only one able to be activated at a time, and one is always "on". The color is orange (this is kinda annoying)
    - transport buttons (play/record) are toggle - alternating between lit and unlit.


    Mode 1: Ableton Live Mode - this is the mode that the APC40 switches to when running Ableton Live
    (This is the mode it is switched to when running the APC40 Laser Show software).
    - All buttons are momentary, and all colors are controlled by the software and not internal to the APC
    (basically, without any software host software running, you can mash buttons all day long, and they will never light up or give feedback that a button was pressed).
    - LED Rings around the knobs are controlled by the APC40 but can also be updated by the host software

    Mode 2: Ableton Live mode Alternate
    - All buttons are momentary
    - All LEDs are controlled by the host software (i.e., in this mode, if you turn a radio knob, you will not see the led ring update unless the software is updating the led ring).

  5. #5
    Join Date
    Dec 2010
    Location
    DC/VA metro area, USA
    Posts
    554

    Default

    Excellent info, thanks for the clarification! I will definitely put this on my to-try list without fear of messing anything up.

  6. #6
    Join Date
    Jan 2014
    Location
    North Carolina, USA
    Posts
    220

    Default

    I have released an update to this app - check the original post for details... BPM support for LSX is sorta kinda working - read first post for details.

  7. #7
    Join Date
    Jan 2005
    Location
    Norway
    Posts
    1,303

    Default

    is it possible to get LIGHT in my APC when I use Mamba ? it`s pretty lame with a totally black control board when controlling effects.

  8. #8
    Join Date
    Jan 2014
    Location
    North Carolina, USA
    Posts
    220

    Default

    This App should work with any software - the control of the LEDs on the APC is handled by the app and not by host laser software.

  9. #9
    Join Date
    Jan 2005
    Location
    Norway
    Posts
    1,303

    Default

    Quote Originally Posted by BlueFang View Post
    This App should work with any software - the control of the LEDs on the APC is handled by the app and not by host laser software.

    I totally forgot to say, I have the APC mini... still works ?

  10. #10
    Join Date
    Jan 2005
    Location
    Norway
    Posts
    1,303

    Default

    I did manage to get it working on the APC MINI

    But because of your APC40 layout, i only got green light (when I try red I got orange flashing) and when I hit a button the lights go OFF.
    But I`m happy that I got light in some of the buttons.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •