Basic wrote:Creating the template has been fine and pretty fun. I've been following the instructions of anomad and reading the online module manual and to be honest I've been getting a little lost

this is a whole new world for me.
I entered this line of code in the correct place...
allMidiDevices = modul8.getMidiDestinationsList()
print "all midi ", allMidiDevices
I then viewed the code and it showed the APC20 as listed which was great.
The problem i have at the moment is where do i put this variable - lpName = Akai APC20 - Akai APC20 - and what does it actually mean?
. in my case, lpName is a variable name i chose to represent 'launchpad name' - you could just as easily call your variable apc20Name if you want...
lpName = 'Launchpad - Launchpad'
modul8.sendMidi(lpName,1,'NOTE_ON',note,val)
. so, in my code example, lpName is the device i'm sending the midi to (a launchpad). for your situation, you could be verbose if you chose to, ie:
module.sendMidi('Akai APC20 - Akai APC20',1,'NOTE_ON', note,val)
@anomad you mention setting the light colour? How do i go about that again? you started a sentence but it appears to have disappeared or was that intentional?

Lastly (for now) how do i connect one of the 'M 1' buttons to M8 itself? I know i can connect between layer 1-10 but i can't see an option to connect to one of the media panel previews?
. if the apc20 is like the launchpad, you need to know what MIDI note each button is sending and use that as a starting point.
. if it's like the ap40, this image might help -
http://4.bp.blogspot.com/_j9zS9x1UVfc/T ... c40_22.jpg.
. if the upper left button on the grid is note 56, you could write something like :
module.sendMidi('Akai APC20 - Akai APC20',1,'NOTE_ON', 56 ,3)
. to turn the led in the upper right hand corner red (per the list above). i don't have an apc20, but i'm guessing something like this would work
. you can use MIDI monitor (
http://www.snoize.com/MIDIMonitor/ ) to see what MIDI data is being sent back and forth.
. if i understand the second part of your question (and what it looks like you're trying to do from your illustrations) - you'll need to know which Media Bank you're in (1-8) and then you can set media for the current layer like this :
modul8.setValue('ctrl_layer_media', myMediaID, 0)
. myMediaID is a variable (my own name, nothing modul8 specific) where mediaID= 0 is bank 1, media in upper left corner - mediaID = 16 is bank 2, media in upper left corner, media=19 is bank 2, media in upper right corner, etc.- see 'Media Preview Control' in the online manual
. i would suggest having M 1 send a value called something like mediaOffset = 0, M 2 send mediaOffset =1, M 3 send mediaOffset = 2 etc,
. lets say you're setting a variable called mediaBank that corresponds to bank 1-8
. then when the button is pressed, it sends a value for mediaOffset
. then the media ID you want would be
myMediaID = ((mediaBank -1) * 16 ) + mediaOffset
modul8.setValue('ctrl_layer_media', myMediaID, 0)
. so, lets say BANK1 is selected ( mediaBank = 1 )
. and you press the M 1 button (mediaOffset = 0 )
(( 1 -1 ) * 16 ) + 0 = 0
so myMediaID would = 0 which is the first media asset.
. clear as mud?

-james
(a nomad. )