#!/usr/bin/env python3 """ Open Sound Control send/recieve daemon for Tascam Firewire control surface ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright (c) 2012-2014 Scott Bahling This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see the file COPYING); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA :license: GPL-2.0, see COPYING for details """ import buttons.py def init_buttons(console): unit = console.unit strips = console.strips return {5: [None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, strips[1].fader, strips[2].fader, strips[3].fader, strips[4].fader, strips[5].fader, strips[6].fader, strips[7].fader, strips[8].fader, strips[0].fader, None, None, None, None, None, None, None, ], 6: [None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, buttons.StripSelButton(unit, 'Strip 1 Sel', strips[1]), buttons.StripSelButton(unit, 'Strip 2 Sel', strips[2]), buttons.StripSelButton(unit, 'Strip 3 Sel', strips[3]), buttons.StripSelButton(unit, 'Strip 4 Sel', strips[4]), buttons.StripSelButton(unit, 'Strip 5 Sel', strips[5]), buttons.StripSelButton(unit, 'Strip 6 Sel', strips[6]), buttons.StripSelButton(unit, 'Strip 7 Sel', strips[7]), buttons.StripSelButton(unit, 'Strip 8 Sel', strips[8]), buttons.StripSoloButton(unit, 'Strip 1 Solo', strips[1]), buttons.StripSoloButton(unit, 'Strip 2 Solo', strips[2]), buttons.StripSoloButton(unit, 'Strip 3 Solo', strips[3]), buttons.StripSoloButton(unit, 'Strip 4 Solo', strips[4]), buttons.StripSoloButton(unit, 'Strip 5 Solo', strips[5]), buttons.StripSoloButton(unit, 'Strip 6 Solo', strips[6]), buttons.StripSoloButton(unit, 'Strip 7 Solo', strips[7]), buttons.StripSoloButton(unit, 'Strip 8 Solo', strips[8]), ], 7: [buttons.StripMuteButton(unit, 'Strip 1 Mute', strips[1]), buttons.StripMuteButton(unit, 'Strip 2 Mute', strips[2]), buttons.StripMuteButton(unit, 'Strip 3 Mute', strips[3]), buttons.StripMuteButton(unit, 'Strip 4 Mute', strips[4]), buttons.StripMuteButton(unit, 'Strip 5 Mute', strips[5]), buttons.StripMuteButton(unit, 'Strip 6 Mute', strips[6]), buttons.StripMuteButton(unit, 'Strip 7 Mute', strips[7]), buttons.StripMuteButton(unit, 'Strip 8 Mute', strips[8]), buttons.EncoderButton(unit, 'AUX5'), buttons.EncoderButton(unit, 'AUX7'), buttons.EncoderButton(unit, 'AUX6'), buttons.EncoderButton(unit, 'AUX8'), None, None, None, None, buttons.Button(unit, 'FLIP'), buttons.EncoderButton(unit, 'AUX1'), buttons.EncoderButton(unit, 'AUX3'), buttons.EncoderButton(unit, 'PAN'), buttons.EncoderButton(unit, 'AUX2'), buttons.EncoderButton(unit, 'AUX4'), None, None, buttons.Button(unit, 'Control Panel'), buttons.Button(unit, 'F1'), buttons.Button(unit, 'ALL SAFE'), buttons.Button(unit, 'F5'), buttons.Button(unit, 'CUT'), buttons.Button(unit, 'COPY'), buttons.ModButton(unit, 'ALT'), buttons.ModButton(unit, 'SHIFT'), ], 8: [buttons.Button(unit, 'F2'), buttons.ClrSoloButton(unit, 'CLR SOLO'), buttons.LoopButton(unit, 'LOOP'), buttons.Button(unit, 'DEL'), buttons.Button(unit, 'PASTE'), buttons.Button(unit, 'UNDO'), buttons.ModButton(unit, 'CTRL'), buttons.Button(unit, 'Foot Switch'), buttons.Button(unit, 'Gain Enc A', None), buttons.Button(unit, 'Gain Enc B', None), buttons.Button(unit, 'Q Enc A', None), buttons.Button(unit, 'Q Enc B', None), None, None, None, None, buttons.Button(unit, 'Freq Enc A', None), buttons.Button(unit, 'Freq Enc B', None), None, None, None, None, None, None, None, buttons.ComputerButton(unit, 'COMPUTER'), None, None, buttons.Button(unit, 'CLOCK'), buttons.Button(unit, 'ROUTE'), None, None, ], 9: [buttons.Button(unit, 'F7'), buttons.Button(unit, 'F8'), buttons.Button(unit, 'F9'), buttons.Button(unit, 'F10'), buttons.Button(unit, 'READ'), buttons.Button(unit, 'WRT'), buttons.Button(unit, 'TCH'), buttons.Button(unit, 'LATCH'), buttons.Button(unit, 'HIGH'), buttons.Button(unit, 'HI-MID'), buttons.Button(unit, 'LOW-MID'), buttons.Button(unit, 'LOW'), buttons.ArrowButton(unit, 'UP'), buttons.ArrowButton(unit, 'LEFT'), buttons.ArrowButton(unit, 'DOWN'), buttons.ArrowButton(unit, 'RIGHT'), buttons.Button(unit, 'REC ENABLE'), buttons.NudgeButton(unit, 'NUDGE LEFT', -1), buttons.NudgeButton(unit, 'NUDGE RIGHT', 1), buttons.BankSwitchButton(unit, 'BANK LEFT', -1), buttons.BankSwitchButton(unit, 'BANK RIGHT', 1), buttons.Button(unit, 'LOCATE LEFT'), buttons.Button(unit, 'LOCATE RIGHT'), buttons.Button(unit, 'SHTL'), buttons.Button(unit, 'SET'), buttons.Button(unit, 'IN'), buttons.Button(unit, 'OUT'), buttons.TransportButton(unit, 'REW'), buttons.TransportButton(unit, 'F.FWD'), buttons.TransportButton(unit, 'STOP'), buttons.TransportButton(unit, 'PLAY'), buttons.TransportButton(unit, 'REC'), ] }