Skip to content

Commit

Permalink
Merge pull request #10 from togrupe/feature/introduce-xlsx-support-wi…
Browse files Browse the repository at this point in the history
…th-color-support

Feature/introduce xlsx support with color support
  • Loading branch information
togrupe authored Oct 27, 2022
2 parents f980f11 + be5a8ff commit 40a19f8
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 9 deletions.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
Python and midi/tcp based tool to prepare channel lists for Allen & Heath dlive systems. Based on an excel sheet the following parameters can be preconfigured and in one or more steps be written into the dlive system via midi/tcp.
- Channel Name
- Channel Color
- 48V Phantom Power
- 48V Phantom Power (only for mixrack local sockets 1-64)

## Use Cases
* Single source for channel lists in multi console situations
* Better overview on all channels during preparation phase
* Sync channel names and colors for virtual soundchecks (planned for future release)

## Used Python Libraries
* mido - Midi Library
Expand All @@ -17,15 +22,24 @@ Excel sheet, please edit the columns: Name, Color and Phantom

![Excel](excel.png)

An example Excel file named: **dLiveChannelList.xls** can be found in the root folder.
An example Excel file named: **dLiveChannelList.xlsx** can be found in the root folder.
By default, the channels 1-128 are available in the sheet. If you need less,
just delete the channels you don't want to process. Empty lines in between are not supported.

Microsoft Excel and LibreOffice Calc Spreadsheet can be used to write / save the sheets.
Please make sure that you save your changes in the (*.xls) format.
Please make sure that you save your changes in the (*.xlsx) format.

The following colors are allowed:
blue, red, light blue, purple, green, yellow, black, white
* blue
* red
* light blue
* purple
* green
* yellow
* black
* white

If the given color does not match, the default color black is used instead.

## Settings on the dlive console
The Midi Channel setting on dlive under `Utils/Shows -> Control -> Midi` should be be set to : `12 to 16`, which is default.
Expand Down
Binary file removed dLiveChannelList.xls
Binary file not shown.
Binary file added dLiveChannelList.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mido
pandas
xlrd
openpyxl
Binary file modified excel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import dliveConstants
from ChannelListEntry import ChannelListEntry

logging.basicConfig(filename='main.log', level=logging.ERROR)
logging.basicConfig(filename='main.log', level=logging.DEBUG)

version = "1.5.0"
version = "1.6.0"

is_network_communication_allowed = dliveConstants.allow_network_communication

Expand All @@ -28,7 +28,7 @@ def trigger_channel_renaming(message, output, names):
# Trim name if length of name > 6
if len(str(item.get_name())) > 6:
trimmed_name = str(item.get_name())[0:6]
logging.info("Channel name will be trimmed to 6 characters, before: " + str(item.get_name()) + " after: " + str(
logging.warning("Channel name will be trimmed to 6 characters, before: " + str(item.get_name()) + " after: " + str(
trimmed_name))
else:
trimmed_name = str(item.get_name())
Expand All @@ -53,9 +53,8 @@ def trigger_channel_renaming(message, output, names):


def color_channel(output, channel, color):
colour = dliveConstants.lcd_color_black

lower_color = str(color).lower()

if lower_color == "blue":
colour = dliveConstants.lcd_color_blue
elif lower_color == "red":
Expand All @@ -72,6 +71,9 @@ def color_channel(output, channel, color):
colour = dliveConstants.lcd_color_black
elif lower_color == 'white':
colour = dliveConstants.lcd_color_white
else:
logging.warning("Given color: " + lower_color + " is not supported, setting default color: black")
colour = dliveConstants.lcd_color_black

payload_array = [root.midi_port, dliveConstants.sysex_message_set_channel_colour, channel,
colour]
Expand Down
Binary file modified overview.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 40a19f8

Please sign in to comment.