#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Copyright 2022, Nils Hilbricht, Germany ( https://www.hilbricht.net ) This file is part of the Laborejo Software Suite ( https://www.laborejo.org ), Laborejo2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 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. If not, see . """ import logging; logger = logging.getLogger(__name__); logger.info("import") from template.qtgui.constantsAndConfigs import ConstantsAndConfigs as TemplateConstantsAndConfigs import engine.api as api from PyQt5 import QtGui class ConstantsAndConfigs(TemplateConstantsAndConfigs): def __init__(self): super().__init__() self.ticksToPixelRatio = 128*3*5 #bigger value means less space between notes #api.D128 and 128*3*5 is also good. This gets changed during runtime as "Stretch Factor". Also: the QSettings save and reload this on a per-file basis. #a quarter note has 53760 ticks. that is 53760 / 1920 = 28 pixels. self.stafflineGap = 7 #it is 7 because it is an odd number, which has a middle. 123 4 567 which translates 1:1 to pixels. self.beamHeight = 2 self.magicPixel = 4 self.negativeMagicPixel = -2 self.trackHeight = self.stafflineGap * 10 self.trackHeight = self.stafflineGap * 12 self.noteHeadMode = True #False means rectangle noteheads self.availableEditModes = ("notation", "cc", "block") self.ccViewValue = 0 #0-127. Only has effect if ccView is True self.ccViewCallbacks = [] #list of functions. For example the main Window CC spin box and the block Editor CC spin box. constantsAndConfigs = ConstantsAndConfigs() #singleton