From a3b8d0fe198473f18495696025e6852c4d2c9f58 Mon Sep 17 00:00:00 2001 From: Nat Date: Thu, 13 Sep 2007 20:33:18 +0000 Subject: Jam works --- (limited to 'common') diff --git a/common/Config.py b/common/Config.py index 47dd713..62461c7 100644 --- a/common/Config.py +++ b/common/Config.py @@ -1,14 +1,12 @@ # -*- coding: utf-8 -*- import os -import Util.InstrumentDB as InstrumentDB +import common.Util.InstrumentDB as InstrumentDB +from sugar.activity.activity import get_bundle_path +from sugar import env QUICKLOAD = os.path.isfile("QUICKLOAD") # skip loading inessential comenents to speed things up SugarMode = True -try: - from sugar import env -except ImportError: - SugarMode = False if os.path.isfile("DEBUG"): f = open("DEBUG") @@ -21,7 +19,7 @@ else: print "Debug Level %d" % (DEBUG) -TAM_TAM_ROOT = os.path.dirname(os.path.abspath(__file__)) +TAM_TAM_ROOT = get_bundle_path() print 'INFO: loaded TAMTAM_ROOT=%s' % TAM_TAM_ROOT @@ -29,8 +27,8 @@ print 'INFO: loaded TAMTAM_ROOT=%s' % TAM_TAM_ROOT if os.path.isdir('/usr/share/activities/TamTamEdit.activity/Resources/Sounds'): SOUNDS_DIR = "/usr/share/activities/TamTamEdit.activity/Resources/Sounds" else: - SOUNDS_DIR = TAM_TAM_ROOT + "/Resources/Sounds" -FILES_DIR = TAM_TAM_ROOT + "/Resources" + SOUNDS_DIR = TAM_TAM_ROOT + "/common/Resources/Sounds" +FILES_DIR = TAM_TAM_ROOT + "/common/Resources" TUNE_DIR='/' SYNTH_DIR='/' if SugarMode == True: @@ -49,7 +47,7 @@ else: #PLUGIN PLUGIN_DEBUG = PREF_DIR + "/clooper.log" PLUGIN_VERBOSE = 0 -PLUGIN_UNIVORC = TAM_TAM_ROOT + "/Resources/tamtamorc.csd" +PLUGIN_UNIVORC = TAM_TAM_ROOT + "common/Resources/tamtamorc.csd" PLUGIN_KSMPS = 64 PLUGIN_RATE = 16000 #PLUGIN_KSMPS = 64 @@ -382,8 +380,7 @@ UNLOAD_TABLES_COMMAND = \ ################# LANGUAGE = 'En' -IMAGE_ROOT = TAM_TAM_ROOT + '/Resources/Images/' - +IMAGE_ROOT = TAM_TAM_ROOT + '/common/Resources/Images/' MAIN_WINDOW_PADDING = 5 BG_COLOR = '#404040' diff --git a/common/Generation/GenerationPitch.py b/common/Generation/GenerationPitch.py index 4012589..4eaf8ae 100644 --- a/common/Generation/GenerationPitch.py +++ b/common/Generation/GenerationPitch.py @@ -2,7 +2,7 @@ import random import Drunk import common.Config as Config -from Generation.GenerationConstants import GenerationConstants +from common.Generation.GenerationConstants import GenerationConstants class GenerationPitch: def __init__( self ): diff --git a/common/Generation/GenerationRythm.py b/common/Generation/GenerationRythm.py index 718c1ec..a840804 100644 --- a/common/Generation/GenerationRythm.py +++ b/common/Generation/GenerationRythm.py @@ -2,7 +2,7 @@ import Utils import random from math import sqrt import common.Config as Config -from Generation.GenerationConstants import GenerationConstants +from common.Generation.GenerationConstants import GenerationConstants class GenerationRythm: diff --git a/common/Generation/Generator.py b/common/Generation/Generator.py index b5640a6..4544d12 100755 --- a/common/Generation/Generator.py +++ b/common/Generation/Generator.py @@ -5,10 +5,10 @@ import Utils import Drunk import common.Config as Config -from Util.CSoundNote import CSoundNote -from Generation.GenerationConstants import GenerationConstants -from Generation.GenerationRythm import GenerationRythm -from Generation.GenerationPitch import GenerationPitch +from common.Util.CSoundNote import CSoundNote +from common.Generation.GenerationConstants import GenerationConstants +from common.Generation.GenerationRythm import GenerationRythm +from common.Generation.GenerationPitch import GenerationPitch class GenerationParameters: def __init__( self, -- cgit v0.9.1