diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2014-05-12 13:52:54 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2014-05-12 13:52:54 (GMT) |
commit | fd4b5e7bec130e14f23c292ff799cd16233c301f (patch) | |
tree | 286a223c7b5b727299c1eaa1d8841c96f2145afb /ttcommon | |
parent | 1ea290779352d15e9b5874a2900b31218fb59365 (diff) |
Rename common directory to ttcommon to avoid confilict in sugar-build
Diffstat (limited to 'ttcommon')
263 files changed, 9225 insertions, 0 deletions
diff --git a/ttcommon/Config.py b/ttcommon/Config.py new file mode 100644 index 0000000..4113da2 --- /dev/null +++ b/ttcommon/Config.py @@ -0,0 +1,331 @@ +# -*- coding: utf-8 -*- +import os +import sys +import time +import gettext +import logging +from os.path import join + +from gi.repository import Gdk + +from sugar3.activity.activity import get_bundle_path, get_activity_root +from sugar3 import env + + +#QUICKLOAD = os.path.isfile("QUICKLOAD") # skip loading inessential comenents to speed things up + +FEATURES_OGG = True +FEATURES_MIC = None +FEATURES_LAB = None +FEATURES_NEWSOUNDS = None +FEATURES_GRAB_MOUSE = None + +if os.path.isfile("DEBUG"): + f = open("DEBUG") + l = f.read(10) + f.close() + if len(l): + DEBUG = int(l) + else: + DEBUG = 99 +else: + DEBUG = int(os.getenv("TAMTAM_DEBUG", "0")) + +logging.debug("Debug Level %d" % (DEBUG)) + +#PATHS + +TAM_TAM_ROOT = get_bundle_path() +INSTANCE_DIR = join(get_activity_root(), 'instance') +TMP_DIR = join(get_activity_root(), 'tmp') + +logging.debug('INFO: loaded TAMTAM_ROOT=%s' % TAM_TAM_ROOT) + +DATA_DIR = join(get_activity_root(), 'data') +SNDS_INFO_DIR = join(get_activity_root(), 'data', 'snds_info') +FILES_DIR = join(TAM_TAM_ROOT, "ttcommon", "Resources") +SOUNDS_DIR = join(FILES_DIR, "Sounds", "") +IMAGE_ROOT = join(FILES_DIR, "Images", "") + +for i in (INSTANCE_DIR, DATA_DIR, SNDS_INFO_DIR, TMP_DIR): + if not os.path.isdir(i): + os.makedirs(i) + +#PLUGIN +PLUGIN_DEBUG = os.getenv("CSOUND_LOGFILE", "") +PLUGIN_VERBOSE = DEBUG +PLUGIN_UNIVORC = join(FILES_DIR, "tamtamorc.csd") +PLUGIN_RATE = 16000 + +try: + from sugar3.graphics.toolbarbox import ToolbarBox, ToolbarButton + HAVE_TOOLBOX = True +except ImportError: + HAVE_TOOLBOX = False + +############## +## SOUNDS +############## + +ARECORD = "arecord " + os.getenv("TAMTAM_ARECORD", + "-f S16_LE -t wav -r 16000 -c2 -D hw:0,0") + +LOW, MID, HIGH, PUNCH = range(4) + +INSTRUMENT_TABLE_OFFSET = 5000 +INST_FREE = 5000 +INST_TIED = 5001 +INST_SIMP = 5011 +INST_PERC = 5021 + +CATEGORIES = ['all', 'animals', 'concret', 'keyboard', 'people', 'percussions', 'strings', 'winds'] + +if FEATURES_MIC or FEATURES_LAB: + CATEGORIES.append('mysounds') + +#CSOUND COMMANDS +CSOUND_LOAD_INSTRUMENT = 'f%d 0 0 -1 "%s" 0 0 0' +CSOUND_MIC_RECORD = 'i5201 0 5 %d' +CSOUND_UNLOAD_TABLES = 'i%d 0 0.1 %d' % (INST_FREE, 150) # removed magic number +CSOUND_NOTE_OFF = 'i %s.%s .2 0.01 1. 0. 0. 0.5 %d 0 0 0 0' % ('%d', '%d', INSTRUMENT_TABLE_OFFSET) +CSOUND_LOAD_LS_INSTRUMENT = 'f4999 0 0 -1 \"%s\" 0 0 0' +CSOUND_PLAY_LS_NOTE = 'i %i 0 -1' +CSOUND_STOP_LS_NOTE = 'i 5022 0 0.5' +CSOUND_RECORD_PERF = 'i5400 0 -1 "%s"' +CSOUND_STOP_RECORD_PERF = 'i5401 4 1 "%s"' + + +################# +## GUI CONSTANTS +################# + +if max(Gdk.Screen.width(), Gdk.Screen.height()) <= 800: + # Images created using `convert $i -resize 73%` command + IMAGE_ROOT_SCALED = join(IMAGE_ROOT, '73', '') + scale = lambda x: int(x * .73) +else: + IMAGE_ROOT_SCALED = IMAGE_ROOT + scale = lambda x: x + +LANGUAGE = 'En' +MAIN_WINDOW_PADDING = 5 + +BG_COLOR = '#404040' +FG_COLOR = '#818286' + +NOTE_HEIGHT = scale(9) # pixels +NOTE_IMAGE_PADDING = scale(6) +NOTE_IMAGE_PADDING_MUL2 = NOTE_IMAGE_PADDING * 2 +NOTE_IMAGE_TAIL = scale(1059) +NOTE_IMAGE_ENDLENGTH = scale(12) +HIT_HEIGHT = scale(13) # pixels +HIT_IMAGE_PADDING = scale(6) +HIT_IMAGE_PADDING_MUL2 = HIT_IMAGE_PADDING * 2 +TRACK_SPACING = scale(4) +TRACK_SPACING_DIV2 = TRACK_SPACING//2 +TRACK_COLORS = [("#00290B", "#00E847"), \ + ("#3F0200", "#E72500"), \ + ("#002642", "#0090EA"), \ + ("#313D00", "#F9EF00"), \ + ("#17083B", "#4A00ED")] +#TRACK_COLORS = [ ( "#00591B", "#00E847" ), \ +# ( "#6F1200", "#E72500" ), \ +# ( "#004682", "#0090EA" ), \ +# ( "#716D00", "#F9EF00" ), \ +# ( "#37187B", "#4A00ED" ) ] +BEAT_COLOR = "#999999" +BEAT_LINE_SIZE = 2 +PLAYHEAD_COLOR = "#666666" +PLAYHEAD_SIZE = 2 +PLAYHEAD_SIZE_DIV2 = PLAYHEAD_SIZE / 2.0 +MARQUEE_COLOR = "#FFFFFF" +MARQUEE_SIZE = 2 + +PAGE_BORDER_SIZE = 2 +PAGE_SELECTED_BORDER_SIZE = 5 +PAGE_WIDTH = scale(100) +PAGE_HEIGHT = scale(25) + +PAGE_THUMBNAIL_WIDTH = scale(92) +PAGE_THUMBNAIL_WIDTH_DIV2 = PAGE_THUMBNAIL_WIDTH / 2 +PAGE_THUMBNAIL_HEIGHT = scale(65) + +THUMBNAIL_TRACK_RECT = [ + (scale(2), scale(4), scale(83), scale(10)), + (scale(2), scale(14), scale(83), scale(10)), + (scale(2), scale(24), scale(83), scale(10)), + (scale(2), scale(34), scale(83), scale(10)), + (scale(2), scale(44), scale(83), scale(13)), + ] +THUMBNAIL_DRAG_COLOR = "#000000" +THUMBNAIL_TRACK_COLOR = "#FF0000" +THUMBNAIL_SELECTED_COLOR = "#2266FF" +THUMBNAIL_DISPLAYED_COLOR = "#CC1133" + +TOOLBAR_BCK_COLOR = '#404040' +WHITE_COLOR = '#FFFFFF' +### miniTamTam/SYNTHLAB SPECIFIC ### +INST_BCK_COLOR = '#999999' +PANEL_BCK_COLOR = '#CCCCCC' +PANEL_COLOR = '#CCCCCC' +SL_LINE_COLOR = "#666666" +SL_HIGHLIGHT_COLOR = "#FFFFFF" +SL_OVER_WIRE_COLOR = "#FFFFFF" +SL_OVER_GATE_COLOR = "#00FF18" +SL_OVER_GATE_REJECT_COLOR = "#B30000" +PANEL_RADIUS = 10 +PANEL_SPACING = 2 + +###Instrument Panel### +CATEGORY_BCK_COLOR = '#222222' +INSTRUMENT_GRID_COLOR = '#CCCCCC' + +###Welcome Screen Specific### +WS_PANEL_COLOR = '#404040' +WS_BCK_COLOR = '#CCCCCC' + +# hardware keycodes for mod keys +MOD_LSHIFT = 50 +MOD_RSHIFT = 62 +MOD_LCTRL = 37 +MOD_RCTRL = 109 +MOD_LALT = 64 +MOD_RALT = 113 + +######## +## Things that don't belong! +####### + + +class _ModKeys: + + def __init__(self): + self.shiftDown = False + self.ctrlDown = False + self.altDown = False + + def keyPress(self, code): + if code == MOD_LSHIFT or code == MOD_RSHIFT: + self.shiftDown = True + elif code == MOD_LCTRL or code == MOD_RCTRL: + self.ctrlDown = True + elif code == MOD_LALT or code == MOD_RALT: + self.altDown = True + + def keyRelease(self, code): + if code == MOD_LSHIFT or code == MOD_RSHIFT: + self.shiftDown = False + elif code == MOD_LCTRL or code == MOD_RCTRL: + self.ctrlDown = False + elif code == MOD_LALT or code == MOD_RALT: + self.altDown = False + +ModKeys = _ModKeys() + + +############ +## EDIT DEFAULTS +############ + +#DEFAULTS +PLAYER_TEMPO = 100 +PLAYER_TEMPO_LOWER = 30 +PLAYER_TEMPO_UPPER = 160 +DEFAULT_VOLUME = 50 + +#NUMERICAL CONSTANTS +NUMBER_OF_POSSIBLE_PITCHES = 25 +MINIMUM_PITCH = 24 +MAXIMUM_PITCH = MINIMUM_PITCH + NUMBER_OF_POSSIBLE_PITCHES - 1 +NUMBER_OF_POSSIBLE_PITCHES_DRUM = 13 +PITCH_STEP_DRUM = 2 +MINIMUM_PITCH_DRUM = 24 +MAXIMUM_PITCH_DRUM = MINIMUM_PITCH_DRUM + PITCH_STEP_DRUM*(NUMBER_OF_POSSIBLE_PITCHES_DRUM - 1) +MINIMUM_NOTE_DURATION = 1 # ticks +MS_PER_MINUTE = 60000.0 +TICKS_PER_BEAT = 12 +TICKS_PER_BEAT_DIV2 = TICKS_PER_BEAT/2 +MAXIMUM_BEATS = 12 # maximum beats per page +NUMBER_OF_TRACKS = 5 +NUMBER_OF_PAGES = 2 + +MINIMUM_AMPLITUDE = 0 +MAXIMUM_AMPLITUDE = 1 + +DEFAULT_GRID = 3 +DEFAULT_GRID_DIV2 = DEFAULT_GRID / 2.0 + +#################### +## KeyMapping +#################### + +LOOP_KEYS = [17, 18, 19, 20, 21, 32, 33, 34, 35, 45, 46, 47, 48, 51, 60, 61] +# Key = Hardware Keycode Value = Note + +KEY_MAP_PIANO = {24: 36, # Q + 25: 38, # W + 26: 40, # E + 27: 41, # R + 28: 43, # T + 29: 45, # Y + 30: 47, # U + 31: 48, # I + + 11: 37, # 2 + 12: 39, # 3 + 14: 42, # 5 + 15: 44, # 6 + 16: 46, # 7 + + 39: 25, # S + 40: 27, # D + 42: 30, # G + 43: 32, # H + 44: 34, # J + 46: 37, # L + + 52: 24, # Z + 53: 26, # X + 54: 28, # C + 55: 29, # V + 56: 31, # B + 57: 33, # N + 58: 35, # M + 59: 36} # , + + +KEY_MAP_NOTPIANO = {24: 24, # Q + 25: 25, # W + 26: 26, # E + 27: 27, # R + 28: 28, # T + 29: 29, # Y + 30: 30, # U + 31: 31, # I + 32: 32, # O + 33: 33, # P + + 38: 34, # A + 39: 35, # S + 40: 36, # D + 41: 37, # F + 42: 38, # G + 43: 39, # H + 44: 40, # J + 45: 41, # K + 46: 42, # L + + 52: 43, # Z + 53: 44, # X + 54: 45, # C + 55: 46, # V + 56: 47, # B + 57: 48} # N + +KEY_MAP = KEY_MAP_PIANO + + +def imagefile(filename): + if filename and not filename.startswith(os.sep): + filename = IMAGE_ROOT_SCALED + filename + return filename diff --git a/ttcommon/Generation/Drunk.py b/ttcommon/Generation/Drunk.py new file mode 100644 index 0000000..fb7b765 --- /dev/null +++ b/ttcommon/Generation/Drunk.py @@ -0,0 +1,162 @@ +# Random: +# Randomly choose, within a certain range, a new next value +# arg 1: maxStepSize (negative value not allowed stepSize == 0) +# arg 2: maximum value allowed + +import random + +class Drunk: + def __init__( self, minValue, maxValue, trackLength=None ): + self.minValue = min(minValue, maxValue) + self.maxValue = max(minValue, maxValue) + self.lastValue = random.randint( self.minValue, self.maxValue ) + + + def getNextValue( self, maxStepSize, maxValue ): + if self.lastValue < 0 or self.lastValue > maxValue: + return random.randint( self.minValue, maxValue ) + + direction = self.getDirection( maxValue ) + stepSize = self.getStepSize( direction, abs(maxStepSize), maxValue ) + + if maxStepSize < 0: + minStepSize = 1 + else: + minStepSize = 0 + + self.lastValue += direction * random.randint( minStepSize, stepSize ) + + if self.lastValue < self.minValue: + self.lastValue = self.minValue + elif self.lastValue > maxValue: #instead of 14... + self.lastValue = maxValue + else: + self.lastValue = self.lastValue + + return self.lastValue + + def getDirection( self, maxValue ): + if self.lastValue == 0: + return 1 + elif self.lastValue == maxValue: + return -1 + else: + return random.choice( [ 1, -1 ] ) + + def getStepSize( self, direction, maxStepSize, maxValue, ): + if direction == -1: + return min( maxStepSize, self.lastValue ) + else: + return min( maxStepSize, maxValue - self.lastValue ) + +class DroneAndJump( Drunk ): + def __init__( self, minValue, maxValue, trackLength=None ): + Drunk.__init__( self, minValue, maxValue, trackLength=None ) + self.minValue = min(minValue, maxValue) + self.maxValue = max(minValue, maxValue) + self.beforeLastValue = random.randint( self.minValue, self.maxValue ) #self.minValue + self.lastValue = self.beforeLastValue + 1 + + def getNextValue( self, maxStepSize, maxValue ): + if self.beforeLastValue != self.lastValue: + self.lastValue = self.beforeLastValue + return self.beforeLastValue + + self.beforeLastValue = self.lastValue + self.lastValue = Drunk.getNextValue( self, abs(maxStepSize), maxValue ) + return self.lastValue + + def getStepSize( self, direction, maxStepSize, maxValue ): + if random.randint( 0, 100 ) < 42: + return Drunk.getStepSize( self, direction, maxStepSize, maxValue ) + else: + return Drunk.getStepSize( self, direction, 0, maxValue ) + +class Repeter( Drunk ): + def __init__( self, minValue, maxValue, trackLength=None ): + Drunk.__init__( self, minValue, maxValue, trackLength=None) + self.minValue = min(minValue, maxValue) + self.maxValue = max(minValue, maxValue) + self.lastValue = random.randint( self.minValue, self.maxValue) + + def getNextValue( self, maxStepSize, maxValue ): + self.lastValue = Drunk.getNextValue( self, abs(maxStepSize), maxValue ) + return self.lastValue + + def getStepSize( self, direction, maxStepSize, maxValue ): + if random.randint( 0, 100 ) < 35: + return Drunk.getStepSize( self, direction, maxStepSize, maxValue ) + else: + return Drunk.getStepSize( self, direction, 0, maxValue ) + +class Loopseg( Drunk ): + def __init__( self, minValue, maxValue, trackLength=None ): + Drunk.__init__( self, minValue, maxValue, trackLength=None ) + self.recordedValues = [] + self.recordState = 2 + self.recordPlayback = 0 + self.loopPlayback = 1 + self.recordLength = random.randint( 3, 6 ) + self.recordLoopTime = random.randint( 1, 4 ) + + def getNextValue( self, maxStepSize, maxValue ): + if self.recordState == 2: + self.lastValue = Drunk.getNextValue( self, maxStepSize, maxValue ) + self.recordState = random.choice([2, 2, 2, 1]) + + if len(self.recordedValues) != self.recordLength and self.recordState == 1: + self.lastValue = Drunk.getNextValue( self, maxStepSize, maxValue ) + self.recordedValues.append( self.lastValue ) + elif self.recordState == 1 or self.recordState == 0: + self.recordState = 0 + if self.recordPlayback < self.recordLength: + self.loopAround() + else: + if self.loopPlayback < self.recordLoopTime: + self.recordPlayback = 0 + self.loopPlayback += 1 + self.loopAround() + else: + self.recordedValues = [] + self.recordState = 2 + self.recordPlayback = 0 + self.loopPlayback = 1 + self.recordLength = random.randint( 3, 6 ) + self.recordLoopTime = random.randint( 1, 4 ) + self.lastValue = Drunk.getNextValue( self, maxStepSize, maxValue ) + self.recordedValues = [self.lastValue] + return self.lastValue + + def loopAround( self ): + self.lastValue = self.recordedValues[self.recordPlayback] + self.recordPlayback += 1 + +class Line: + def __init__(self, minValue, maxValue, trackLength=20): + maxVal = max(minValue, maxValue) + if maxVal == minValue: + self.reverse = True + minVal = maxValue + self.lastValue = maxVal + else: + self.reverse = False + minVal = minValue + self.lastValue = minVal + + scale = float(maxVal - minVal) + if self.reverse: + self.inc = -scale/trackLength + else: + self.inc = scale/trackLength + + def getNextValue(self, rand, maxValue): + self.val = self.lastValue + int(random.randint(0, rand)*random.choice([-0.5,0.5])) + if self.val < 0: + self.val = 0 + elif self.val > maxValue: + self.val = maxValue + else: + self.val = self.val + self.lastValue = self.val+self.inc + return self.val + diff --git a/ttcommon/Generation/GenerationConstants.py b/ttcommon/Generation/GenerationConstants.py new file mode 100644 index 0000000..9704048 --- /dev/null +++ b/ttcommon/Generation/GenerationConstants.py @@ -0,0 +1,185 @@ +import random + +class GenerationConstants: + + TWO_ROOT_TWELVE = pow( 2, 1./12 ) + MAX_NOTES_PER_BAR = 12 + + PHRASE_LENGTH = 4 + PHRASE_COMPLEXITY = .5 + + TABLE_ONSET_VALUES = [ 3, 3, 6, 3, 6, 12, 4, 3, 6, 6, 12, 6, 12, 18, 8, 6, 12, 18, 12, 24, 12, 18, 36, 24, 36, 24, 48 ] + LOOP_TABLE_ONSET_VALUES = [ 3, 3, 6, 3, 6, 12, 6, 3, 6, 6, 12, 6, 12, 18, 12, 6, 12, 18, 12, 24, 12, 18, 12, 24, 18, 24, 24 ] + + # scaling constants + MAJOR = 0 + HARMONIC_MINOR = 1 + NATURAL_MINOR = 2 + PHRYGIEN = 3 + DORIEN = 4 + LYDIEN = 5 + MYXOLYDIEN = 6 + + SCALES = { MAJOR : [ -12, -10, -8, -7, -5, -3, -1, 0, 2, 4, 5, 7, 9, 11, 12 ], + HARMONIC_MINOR : [ -12, -10, -9, -7, -5, -4, -1, 0, 2, 3, 5, 7, 8, 11, 12 ], + NATURAL_MINOR : [ -12, -10, -9, -7, -5, -4, -2, 0, 2, 3, 5, 7, 8, 10, 12 ], + PHRYGIEN : [ -12, -11, -9, -7, -5, -4, -2, 0, 1, 3, 5, 7, 8, 10, 12 ], + DORIEN : [ -12, -10, -9, -7, -5, -3, -2, 0, 2, 3, 5, 7, 9, 10, 12 ], + LYDIEN : [ -12, -10, -8, -6, -5, -3, -1, 0, 2, 4, 6, 7, 9, 11, 12 ], + MYXOLYDIEN : [ -12, -10, -8, -7, -5, -3, -2, 0, 2, 4, 5, 7, 9, 10, 12 ]} + + + # Default parameters for algorithmic generation + + RYTHM_DENSITY_BANK = [.38, .26, .82, .48, .56, 1, 1, .91, 1, .91, .91, .32, 1, 1, .83, .6, .88] + RYTHM_REGU_BANK = [.94, .95, .89, .73, .8, 1, 1, .75, 1, .75, .84, .93, 1, 1, .87, .62, .8] + PITCH_REGU_BANK = [.04, 0, 0, .22, 0, .36, .35, .57, 0, 0, 0, 0, .28, .77, 0, 0, 0] + PITCH_STEP_BANK = [.28, .48, .39, .38, .27, .4, 1, .55, .29, .15, .4, .26, .25, 1, .33, .22, .27] + DURATION_BANK = [1, 1, 1, .97, 1, 1, 1, 1, 1, 1, .65, .86, 1, 1, .82, 1, .78] + SILENCE_BANK = [.07, 0, .17, .28, .21, 0, .17, .17, .2, .32, .33, .08, .06, .11, .11, .06, .37] + PATTERN_BANK = [0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,3] + SCALE_BANK = [MAJOR, NATURAL_MINOR, LYDIEN, HARMONIC_MINOR, MYXOLYDIEN] + + chooseDefault = random.randint(0,4) + DEFAULT_DENSITY = [.25, .88, .72, .25] #RYTHM_DENSITY_BANK[chooseDefault] + DEFAULT_RYTHM_REGULARITY = [.75, .8, .85, .5] #RYTHM_REGU_BANK[chooseDefault] + DEFAULT_PITCH_REGULARITY = [.5, .8, 0, .9] #PITCH_REGU_BANK[chooseDefault] + DEFAULT_STEP = [.5, .3, 1, .85] #PITCH_STEP_BANK[chooseDefault] + DEFAULT_DURATION = [.8, 1, .8, 1] #DURATION_BANK[chooseDefault] + DEFAULT_SILENCE = [.2, .5, .25, .12] #SILENCE_BANK[chooseDefault] + DEFAULT_PATTERN = [random.randint(0,3) for x in range(4)] + DEFAULT_SCALE = SCALE_BANK[chooseDefault] + + DEFAULT_RYTHM_METHOD = 0 + DEFAULT_PITCH_METHOD = 0 + DEFAULT_PAN = 0.5 + + DEFAULT_PITCH_VARIATION = 0 # 0 = 'melodic' 1 = 'harmonic' + DEFAULT_RYTHM_VARIATION = 0 # 0 = 'Cellule' 1 = 'Xnoise' + + DEFAULT_TONIQUE = 36 + + I = [ 0, 2, 4, 7, 9, 11, 14 ] + II = [ 1, 3, 5, 8, 10, 12 ] + III = [ 2, 4, 6, 9, 11, 13 ] + IV = [ 0, 3, 5, 7, 10, 12, 14 ] + V = [ 1, 4, 6, 8, 11, 13 ] + VI = [ 0, 2, 5, 7, 9, 12, 14 ] + VII = [ 1, 3, 6, 8, 10, 13 ] + + CHORDS_TABLE = [ I, V, I, II, V, I, VI, II, V, I, IV, VI, II, V, I, V, VI ] +# CHORDS_TABLE = [I, V, I, V, I, V, I, V, I, V, I, V, I, V ] + # pitch patterns constants + # PITCH_PATTERNS = [ 'Drunk', 'DroneAndJump', 'Repeter', 'Loopseg' ] + + # Parameters for probability scaling function + REPETITION_SCALE_MIN_MAPPING = 0 + REPETITION_SCALE_MAX_MAPPING = 25 + REPETITION_SCALE_STEPS = 25 + DENSITY_SCALE_MIN_MAPPING = 0 + DENSITY_SCALE_MAX_MAPPING = 38 + DENSITY_SCALE_STEPS = 38 + ARTICULATION_SCALE_MIN_MAPPING = .6 + ARTICULATION_SCALE_MAX_MAPPING = 1 + ARTICULATION_SCALE_STEPS = 10 + + # Rythmic durations, in ticks, and how many to complete figure (celluleRythmSequence) + DOUBLE_TICK_DUR = 3 + DOUBLE_HOW_MANY = 2 + HALF_TRIPLET_TICK_DUR = 4 + HALF_TRIPLET_HOW_MANY = 3 + HOLE_TRIPLET_TICK_DUR = 8 + HOLE_TRIPLET_HOW_MANY = 3 + + # Random generators default values (xnoiseRythmSequence) + RANDOM_BETA_PARAM = 0.004 + RANDOM_EXPO_PARAM = 5 + RANDOM_GAUSS_PARAM1 = 0.5 + RANDOM_GAUSS_PARAM2 = 0.1 + RANDOM_WEIBULL_PARAM1 = 0.5 + + RANDOM_WEIBULL_PARAM2 = 2.5 + + # Onsets probability tables (drumRythmSequence) + + PUNCH_ACCENTS = [ [], + [ 0 ], + [ 0, 1 ], + [ 0, 2, 1 ], + [ 0, 2, 3, 1 ], + [ 0, 3, 2, 4, 1], + [ 0, 3, 2, 5, 1, 4 ], + [ 0, 2, 4, 6, 5, 3, 1 ], + [ 0, 4, 2, 6, 3, 7, 5, 1 ], + [ 0, 4, 6, 2, 8, 5, 3, 7, 1], + [ 0, 6, 4, 8, 2, 5, 7, 3, 9, 1], + [ 0, 4, 6, 10, 8, 2, 5, 7, 9, 3, 1], + [0, 6, 4, 2, 8, 10, 7, 5, 3, 9, 11, 1] ] + + + LOW_ACCENTS = [ [], + [ 0 ], + [ 0, 1 ], + [ 0, 2, 1 ], + [ 0, 2, 3, 1 ], + [ 0, 3, 2, 4, 1 ], + [ 0, 3, 2, 5, 1, 4 ], + [ 0, 2, 4, 6, 5, 3, 1 ], + [ 0, 4, 2, 6, 3, 7, 5, 1 ], + [ 0, 4, 6, 2, 8, 5, 3, 7, 1 ], + [ 0, 6, 4, 8, 2, 5, 7, 3, 9, 1 ], + [ 0, 4, 6, 10, 8, 2, 5, 7, 9, 3, 1 ], + [0, 6, 4, 2, 8, 10, 7, 5, 3, 9, 11, 1 ] ] + + MID_ACCENTS = [ [], + [ 0, 1 ], + [ 0, 2, 3, 1 ], + [ 0, 2, 4, 3, 1, 5 ], + [ 0, 4, 6, 2, 7, 1, 3, 5 ], + [ 0, 6, 4, 8, 2, 1, 5, 3, 9, 7 ], + [ 0, 6, 11, 5, 3, 9, 10, 2, 8, 7, 1, 4 ], + [ 0, 4, 8, 12, 10, 13, 11, 9, 3, 2, 6, 5, 7, 1 ], + [ 0, 8, 4, 12, 6, 14, 2, 10, 7, 15, 1, 9, 3, 11, 5, 13 ], + [ 0, 8, 16, 4, 12, 14, 6, 2, 10, 7, 15, 1, 9, 3, 17, 11, 5, 13], + [ 0, 10, 8, 4, 16, 12, 6, 14, 18, 2, 7, 9, 15, 3, 1, 19, 5, 11, 13, 17], + [ 0, 8, 10, 16, 4, 20, 6, 12, 18, 14, 2, 9, 7, 3, 15, 21, 19, 1, 5, 11, 17, 13], + [ 0, 10, 8, 4, 16, 6, 20, 22, 18, 12, 2, 14, 7, 9, 15, 3, 19, 1, 21, 5, 23, 17, 11, 13] ] + + HIGH_ACCENTS = [ [], + [ 1, 0 ], + [ 1, 3, 2, 0 ], + [ 5, 1, 3, 4, 2, 0 ], + [ 5, 3, 1, 7, 2, 6, 4, 0 ], + [ 7, 9, 3, 5, 1, 2, 8, 4, 6, 0 ], + [ 4, 1, 7, 5, 3, 9, 10, 2, 8, 11, 6, 0 ], + [ 1, 7, 8, 5, 10, 13, 11, 9, 3, 2, 6, 12, 4, 0 ], + [ 13, 5, 11, 3, 9, 1, 15, 10, 7, 2, 14, 6, 12, 4, 8, 0 ], + [ 13, 5, 11, 17, 3, 9, 1, 15, 7, 10, 2, 6, 14, 12, 4, 16, 8, 0 ], + [ 17, 13, 11, 5, 19, 1, 3, 15, 9, 7, 2, 18, 14, 6, 12, 16, 4, 8, 10, 0 ], + [ 13, 17, 11, 5, 1, 19, 21, 15, 3, 7, 9, 2, 14, 18, 12, 6, 20, 4, 16, 10, 8, 0 ], + [ 13, 11, 17, 23, 5, 21, 1, 19, 3, 15, 9, 7, 14, 2, 12, 18, 22, 20, 6, 16, 4, 8, 10, 0 ] ] + + DRUM_PUNCH_ACCENTS = [[], [0], [0, 12], [0, 24, 12], [0, 24, 36, 12], [0, 36, 24, 48, 12], [0, 36, 24, 60, 12, 48], [0, 24, 48, 72, 60, 36, 12], [0, 48, 24, 72, 36, 84, 60, 12], [0, 48, 72, 24, 96, 60, 36, 84, 12], [0, 72, 48, 96, 24, 60, 84, 36, 108, 12], [0, 48, 72, 120, 96, 24, 60, 84, 108, 36, 12], [0, 72, 48, 24, 96, 120, 84, 60, 36, 108, 132, 12]] + DRUM_LOW_ACCENTS = [[], [0], [0, 12], [0, 24, 12], [0, 24, 36, 12], [0, 36, 24, 48, 12], [0, 36, 24, 60, 12, 48], [0, 24, 48, 72, 60, 36, 12], [0, 48, 24, 72, 36, 84, 60, 12], [0, 48, 72, 24, 96, 60, 36, 84, 12], [0, 72, 48, 96, 24, 60, 84, 36, 108, 12], [0, 48, 72, 120, 96, 24, 60, 84, 108, 36, 12], [0, 72, 48, 24, 96, 120, 84, 60, 36, 108, 132, 12]] + DRUM_MID_ACCENTS = [[], [0, 6], [0, 12, 18, 6], [0, 12, 24, 18, 6, 30], [0, 24, 36, 12, 42, 6, 18, 30], [0, 36, 24, 48, 12, 6, 30, 18, 54, 42], [0, 36, 66, 30, 18, 54, 60, 12, 48, 42, 6, 24], [0, 24, 48, 72, 60, 78, 66, 54, 18, 12, 36, 30, 42, 6], [0, 48, 24, 72, 36, 84, 12, 60, 42, 90, 6, 54, 18, 66, 30, 78], [0, 48, 96, 24, 72, 84, 36, 12, 60, 42, 90, 6, 54, 18, 102, 66, 30, 78], [0, 60, 48, 24, 96, 72, 36, 84, 108, 12, 42, 54, 90, 18, 6, 114, 30, 66, 78, 102], [0, 48, 60, 96, 24, 120, 36, 72, 108, 84, 12, 54, 42, 18, 90, 126, 114, 6, 30, 66, 102, 78], [0, 60, 48, 24, 96, 36, 120, 132, 108, 72, 12, 84, 42, 54, 90, 18, 114, 6, 126, 30, 138, 102, 66, 78]] + DRUM_HIGH_ACCENTS = [[], [6, 0], [6, 18, 12, 0], [30, 6, 18, 24, 12, 0], [30, 18, 6, 42, 12, 36, 24, 0], [42, 54, 18, 30, 6, 12, 48, 24, 36, 0], [24, 6, 42, 30, 18, 54, 60, 12, 48, 66, 36, 0], [6, 42, 48, 30, 60, 78, 66, 54, 18, 12, 36, 72, 24, 0], [78, 30, 66, 18, 54, 6, 90, 60, 42, 12, 84, 36, 72, 24, 48, 0], [78, 30, 66, 102, 18, 54, 6, 90, 42, 60, 12, 36, 84, 72, 24, 96, 48, 0], [102, 78, 66, 30, 114, 6, 18, 90, 54, 42, 12, 108, 84, 36, 72, 96, 24, 48, 60, 0], [78, 102, 66, 30, 6, 114, 126, 90, 18, 42, 54, 12, 84, 108, 72, 36, 120, 24, 96, 60, 48, 0], [78, 66, 102, 138, 30, 126, 6, 114, 18, 90, 54, 42, 84, 12, 72, 108, 132, 120, 36, 96, 24, 48, 60, 0]] + + # Gain boundaries + GAIN_MAX_BOUNDARY = 1. + GAIN_MID_MAX_BOUNDARY = .9 + GAIN_MID_MIN_BOUNDARY = .75 + GAIN_MIN_BOUNDARY = .65 + + # pitch mapping for drum kit + DRUMPITCH = {25: 24, 27: 26, 29: 28, 31: 30, 33: 32, 35: 34, 37: 36, 39: 38, 41: 40, 43: 42, 45: 44, 47: 46 } + + DRUM_COMPLEXITY1 = [ [ 24 ], [30] , [ 40 ], [ 46 ] ] + DRUM_COMPLEXITY2 = [ [ 24, 28 ], [ 30, 32 ], [ 36, 40 ], [ 46, 48 ] ] + DRUM_COMPLEXITY3 = [ [ 24, 26, 28 ], [ 30, 32, 34 ], [ 36, 38, 40 ], [ 42, 46, 48 ] ] + DRUM_COMPLEXITY4 = [ [ 24, 26, 28 ], [ 30, 32, 34 ], [ 36, 38, 40 ], [ 42, 44, 46, 48 ] ] + + TRANSPOSE = [0.5, 0.52973154717964765, 0.56123102415468651, 0.59460355750136051, 0.6299605249474366, 0.66741992708501718, 0.70710678118654757, 0.74915353843834076, 0.79370052598409979, 0.8408964152537145, 0.89089871814033927, 0.94387431268169353, 1.0, 1.0594630943592953, 1.122462048309373, 1.189207115002721, 1.2599210498948732, 1.3348398541700344, 1.4142135623730951, 1.4983070768766815, 1.5874010519681994, 1.681792830507429, 1.7817974362806785, 1.8877486253633868, 2.0] + + CELLULES_MARKERS = [ 8, 16, 21, 24 ] + CELLULES = [ [ 3, 3, 3, 3 ], [ 3, 3, 6 ], [ 3, 6, 3 ], [ 6, 3, 3 ], [ 4, 4, 4 ], [ 4, 8 ], [ 8, 4 ], [ 6, 6 ], [ 12 ], [ 6, 12, 6 ], [ 8, 8, 8 ], [ 8, 16 ], [ 16, 8 ], [ 12, 12 ], [ 18, 6 ], + [ 6, 18 ], [ 24 ], [ 12, 12, 12 ], [ 18, 18 ], [ 24, 12 ], [ 12, 24 ], [ 36 ], [ 12, 24, 12 ], [ 24, 24 ], [ 48 ] ] diff --git a/ttcommon/Generation/__init__.py b/ttcommon/Generation/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Generation/__init__.py diff --git a/ttcommon/Resources/Loops/loop02_0.ttl b/ttcommon/Resources/Loops/loop02_0.ttl new file mode 100644 index 0000000..2612e8a --- /dev/null +++ b/ttcommon/Resources/Loops/loop02_0.ttl @@ -0,0 +1,9 @@ +page_add 1 2 0 [] +note_add 1000 1 0 0 32 0.99985928761 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 38 0.682939553831 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 32 0.651752076192 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 38 0.668591772162 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 32 0.889173942414 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 38 0.669841961652 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 32 0.655526380723 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 38 0.718481783236 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop02_1.ttl b/ttcommon/Resources/Loops/loop02_1.ttl new file mode 100644 index 0000000..9a245cc --- /dev/null +++ b/ttcommon/Resources/Loops/loop02_1.ttl @@ -0,0 +1,8 @@ +page_add 1 2 0 [] +note_add 1001 1 0 0 36 0.910316671284 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 3 46 0.747296697473 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 38 0.692085319728 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 9 44 0.708999458584 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 36 0.79152160722 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 15 46 0.728970030437 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 38 0.714205938315 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop02_2.ttl b/ttcommon/Resources/Loops/loop02_2.ttl new file mode 100644 index 0000000..7953da6 --- /dev/null +++ b/ttcommon/Resources/Loops/loop02_2.ttl @@ -0,0 +1,5 @@ +page_add 1 2 0 [] +note_add 1002 1 0 0 32 0.947424486254 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 6 32 0.721472651996 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 12 32 0.831937627917 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 32 0.692257845757 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop02_3.ttl b/ttcommon/Resources/Loops/loop02_3.ttl new file mode 100644 index 0000000..6514dc1 --- /dev/null +++ b/ttcommon/Resources/Loops/loop02_3.ttl @@ -0,0 +1,2 @@ +page_add 1 2 0 [] +note_add 1003 1 0 0 32 0.906061777827 0.5 24 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop02_4.ttl b/ttcommon/Resources/Loops/loop02_4.ttl new file mode 100644 index 0000000..fb44d69 --- /dev/null +++ b/ttcommon/Resources/Loops/loop02_4.ttl @@ -0,0 +1,3 @@ +page_add 1 2 0 [] +note_add 1004 1 0 0 44 0.999710890606 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 46 0.673732534575 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop03_0.ttl b/ttcommon/Resources/Loops/loop03_0.ttl new file mode 100644 index 0000000..ecb71b0 --- /dev/null +++ b/ttcommon/Resources/Loops/loop03_0.ttl @@ -0,0 +1,13 @@ +page_add 1 3 0 [] +note_add 1000 1 0 0 32 0.989366069205 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 32 0.720801833684 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 32 0.749287810628 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 32 0.742196634139 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 32 0.815042129891 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 32 0.687728921021 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 32 0.701443840182 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 32 0.678818282301 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 32 0.81446439672 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 32 0.707508318321 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 32 0.699388479165 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 32 0.711786418725 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop03_1.ttl b/ttcommon/Resources/Loops/loop03_1.ttl new file mode 100644 index 0000000..f9ad6c3 --- /dev/null +++ b/ttcommon/Resources/Loops/loop03_1.ttl @@ -0,0 +1,11 @@ +page_add 1 3 0 [] +note_add 1001 1 0 0 36 0.982563337001 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 48 0.677869216687 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 9 43 0.684561864618 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 43 0.790931552908 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 15 36 0.684015006275 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 48 0.673900066009 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 43 0.785080465123 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 27 43 0.705954629686 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 36 0.730218556481 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 33 48 0.732122018719 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop03_2.ttl b/ttcommon/Resources/Loops/loop03_2.ttl new file mode 100644 index 0000000..fdc3c34 --- /dev/null +++ b/ttcommon/Resources/Loops/loop03_2.ttl @@ -0,0 +1,5 @@ +page_add 1 3 0 [] +note_add 1002 1 0 0 38 0.908581041036 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 12 32 0.88973063854 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 32 0.69634792235 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 36 0.792724331664 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop03_3.ttl b/ttcommon/Resources/Loops/loop03_3.ttl new file mode 100644 index 0000000..c9766ac --- /dev/null +++ b/ttcommon/Resources/Loops/loop03_3.ttl @@ -0,0 +1,4 @@ +page_add 1 3 0 [] +note_add 1003 1 0 0 32 0.977428103603 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 12 32 0.892916232237 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 18 36 0.746267101548 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop03_4.ttl b/ttcommon/Resources/Loops/loop03_4.ttl new file mode 100644 index 0000000..fa83771 --- /dev/null +++ b/ttcommon/Resources/Loops/loop03_4.ttl @@ -0,0 +1,5 @@ +page_add 1 3 0 [] +note_add 1004 1 0 0 36 0.984833132684 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 46 0.718419403505 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 24 41 0.789388809938 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 32 0.727520306786 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop04_0.ttl b/ttcommon/Resources/Loops/loop04_0.ttl new file mode 100644 index 0000000..78c1f25 --- /dev/null +++ b/ttcommon/Resources/Loops/loop04_0.ttl @@ -0,0 +1,17 @@ +page_add 1 4 0 [] +note_add 1000 1 0 0 36 0.95430647582 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 32 0.658691939837 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 36 0.747252681193 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 32 0.704895028464 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 36 0.758460247167 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 32 0.743618641081 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 36 0.721716943061 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 32 0.695172159459 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 36 0.792625787357 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 32 0.67165239417 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 36 0.692209994937 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 32 0.681830813385 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 36 0.812239275177 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 32 0.746191340695 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 36 0.743615433014 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 32 0.747473175282 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop04_1.ttl b/ttcommon/Resources/Loops/loop04_1.ttl new file mode 100644 index 0000000..0fa0ffd --- /dev/null +++ b/ttcommon/Resources/Loops/loop04_1.ttl @@ -0,0 +1,7 @@ +page_add 1 4 0 [] +note_add 1001 1 0 0 44 0.989486016936 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 44 0.698418925898 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 32 0.874028022809 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 41 0.730441737037 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 44 0.67006630257 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 44 0.674727483023 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop04_2.ttl b/ttcommon/Resources/Loops/loop04_2.ttl new file mode 100644 index 0000000..67b0366 --- /dev/null +++ b/ttcommon/Resources/Loops/loop04_2.ttl @@ -0,0 +1,6 @@ +page_add 1 4 0 [] +note_add 1002 1 0 0 46 0.912012070336 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 12 41 0.763762485784 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 32 0.736126045512 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 30 32 0.657320116366 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 42 48 0.714130787772 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop04_3.ttl b/ttcommon/Resources/Loops/loop04_3.ttl new file mode 100644 index 0000000..117a4ad --- /dev/null +++ b/ttcommon/Resources/Loops/loop04_3.ttl @@ -0,0 +1,4 @@ +page_add 1 4 0 [] +note_add 1003 1 0 0 48 0.953281741061 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 6 32 0.738512846816 0.5 24 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 30 36 0.741532470152 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop04_4.ttl b/ttcommon/Resources/Loops/loop04_4.ttl new file mode 100644 index 0000000..1b34256 --- /dev/null +++ b/ttcommon/Resources/Loops/loop04_4.ttl @@ -0,0 +1,10 @@ +page_add 1 4 0 [] +note_add 1004 1 0 0 48 0.943528178544 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 3 36 0.715139169634 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 32 0.694654106567 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 12 46 0.876023546144 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 24 48 0.782578989044 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 43 0.72836708845 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 32 0.872559774103 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 39 44 0.691343365943 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 42 48 0.734594689768 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop05_0.ttl b/ttcommon/Resources/Loops/loop05_0.ttl new file mode 100644 index 0000000..a700c70 --- /dev/null +++ b/ttcommon/Resources/Loops/loop05_0.ttl @@ -0,0 +1,21 @@ +page_add 1 5 0 [] +note_add 1000 1 0 0 36 0.932107581794 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 32 0.675577577824 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 36 0.684383784407 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 32 0.669389472795 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 36 0.856030361038 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 32 0.652798697108 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 36 0.682363327642 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 32 0.671184148029 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 36 0.85918561812 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 32 0.709884331451 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 36 0.6741801568 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 32 0.743932183841 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 36 0.843770324432 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 32 0.690697076684 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 36 0.719467342962 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 32 0.745708669546 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 36 0.854533128609 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 32 0.678610427404 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 36 0.670702992431 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 32 0.688640068104 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop05_1.ttl b/ttcommon/Resources/Loops/loop05_1.ttl new file mode 100644 index 0000000..67ac7da --- /dev/null +++ b/ttcommon/Resources/Loops/loop05_1.ttl @@ -0,0 +1,15 @@ +page_add 1 5 0 [] +note_add 1001 1 0 0 32 0.967893135243 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 46 0.687125890161 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 9 48 0.718087610473 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 46 0.764511375074 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 15 32 0.747719304646 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 46 0.710069874156 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 48 0.670818778808 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 46 0.76718554892 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 39 32 0.674955363526 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 46 0.666988194077 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 45 48 0.733962679855 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 46 0.790478232949 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 32 0.654033702519 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 57 46 0.685576842626 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop05_2.ttl b/ttcommon/Resources/Loops/loop05_2.ttl new file mode 100644 index 0000000..938dca0 --- /dev/null +++ b/ttcommon/Resources/Loops/loop05_2.ttl @@ -0,0 +1,8 @@ +page_add 1 5 0 [] +note_add 1002 1 0 0 32 0.953975113794 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 6 48 0.73996191673 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 32 0.662372909235 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 36 0.872159062195 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 30 36 0.718019324126 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 48 32 0.834029446459 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 54 48 0.736099698032 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop05_3.ttl b/ttcommon/Resources/Loops/loop05_3.ttl new file mode 100644 index 0000000..4f2ef84 --- /dev/null +++ b/ttcommon/Resources/Loops/loop05_3.ttl @@ -0,0 +1,5 @@ +page_add 1 5 0 [] +note_add 1003 1 0 0 32 0.981548028673 0.5 24 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 24 32 0.844742084481 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 41 0.822468509957 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 48 32 0.882417824406 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop05_4.ttl b/ttcommon/Resources/Loops/loop05_4.ttl new file mode 100644 index 0000000..baf2be2 --- /dev/null +++ b/ttcommon/Resources/Loops/loop05_4.ttl @@ -0,0 +1,8 @@ +page_add 1 5 0 [] +note_add 1004 1 0 0 32 0.90735368789 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 12 32 0.850828621275 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 15 43 0.712169838398 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 18 43 0.715862350703 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 34 0.887297930958 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 39 32 0.720284426596 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 42 32 0.698011766494 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop06_0.ttl b/ttcommon/Resources/Loops/loop06_0.ttl new file mode 100644 index 0000000..d2f7dba --- /dev/null +++ b/ttcommon/Resources/Loops/loop06_0.ttl @@ -0,0 +1,25 @@ +page_add 1 6 0 [] +note_add 1000 1 0 0 32 0.921114733322 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 32 0.655957694556 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 32 0.671270807728 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 32 0.694768801244 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 32 0.780227603486 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 32 0.723746292918 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 32 0.711968467875 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 32 0.654953733777 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 32 0.864831875594 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 32 0.709684598698 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 32 0.680162142542 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 32 0.674253527689 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 32 0.816207401937 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 32 0.683594143543 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 32 0.741697357887 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 32 0.71839862066 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 32 0.899849073174 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 32 0.668486947306 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 32 0.68402101838 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 32 0.696405215255 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 32 0.760683240228 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 32 0.675900317636 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 32 0.749191996222 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 32 0.651821036499 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop06_1.ttl b/ttcommon/Resources/Loops/loop06_1.ttl new file mode 100644 index 0000000..17bb12f --- /dev/null +++ b/ttcommon/Resources/Loops/loop06_1.ttl @@ -0,0 +1,14 @@ +page_add 1 6 0 [] +note_add 1001 1 0 0 34 0.977138938499 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 32 0.747551297965 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 32 0.810093246414 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 15 36 0.655551676233 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 34 0.681352673984 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 21 32 0.67154506976 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 32 0.891965567701 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 27 36 0.749518897533 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 34 0.701924693814 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 32 0.797169334375 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 32 0.861794600346 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 36 0.706317436925 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 66 34 0.666747699849 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop06_2.ttl b/ttcommon/Resources/Loops/loop06_2.ttl new file mode 100644 index 0000000..46bf0c9 --- /dev/null +++ b/ttcommon/Resources/Loops/loop06_2.ttl @@ -0,0 +1,8 @@ +page_add 1 6 0 [] +note_add 1002 1 0 0 32 0.971945764101 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 43 0.65049456657 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 44 0.841740492595 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 30 44 0.689062735826 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 42 32 0.739870281493 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 60 32 0.767222578817 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 66 43 0.69553127697 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop06_3.ttl b/ttcommon/Resources/Loops/loop06_3.ttl new file mode 100644 index 0000000..90df0da --- /dev/null +++ b/ttcommon/Resources/Loops/loop06_3.ttl @@ -0,0 +1,7 @@ +page_add 1 6 0 [] +note_add 1003 1 0 0 46 0.996839737936 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 6 32 0.655370478695 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 12 32 0.808561080003 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 24 34 0.79703642146 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 32 0.83096184728 0.5 24 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 60 32 0.774074064347 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop06_4.ttl b/ttcommon/Resources/Loops/loop06_4.ttl new file mode 100644 index 0000000..e5e9543 --- /dev/null +++ b/ttcommon/Resources/Loops/loop06_4.ttl @@ -0,0 +1,12 @@ +page_add 1 6 0 [] +note_add 1004 1 0 0 41 0.99226300143 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 12 48 0.833675122603 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 15 46 0.731299021867 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 18 46 0.748477899167 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 48 0.735857780115 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 32 0.849709660981 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 39 38 0.686967953375 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 42 44 0.698163010873 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 45 41 0.659557550294 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 48 48 0.857262323945 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 60 46 0.779519440212 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop07_0.ttl b/ttcommon/Resources/Loops/loop07_0.ttl new file mode 100644 index 0000000..e7b9ee4 --- /dev/null +++ b/ttcommon/Resources/Loops/loop07_0.ttl @@ -0,0 +1,29 @@ +page_add 1 7 0 [] +note_add 1000 1 0 0 44 0.960668250867 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 41 0.674207321488 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 44 0.734362222586 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 41 0.654866474165 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 44 0.868643464616 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 41 0.696937523027 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 44 0.66148762383 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 41 0.655993591676 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 44 0.873564876668 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 41 0.657079017965 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 44 0.741003605834 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 41 0.703264182119 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 44 0.814119223327 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 41 0.66936374141 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 44 0.679955978904 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 41 0.70856336316 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 44 0.759341048304 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 41 0.746547256267 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 44 0.676933444871 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 41 0.720471098726 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 44 0.86755339579 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 41 0.683523913426 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 44 0.657608601991 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 41 0.653374462124 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 72 44 0.894314312377 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 75 41 0.736867494683 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 78 44 0.666250541746 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 81 41 0.747987059432 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop07_1.ttl b/ttcommon/Resources/Loops/loop07_1.ttl new file mode 100644 index 0000000..708f514 --- /dev/null +++ b/ttcommon/Resources/Loops/loop07_1.ttl @@ -0,0 +1,16 @@ +page_add 1 7 0 [] +note_add 1001 1 0 0 32 0.977474510439 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 32 0.707918813499 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 32 0.733850711992 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 34 0.857051574163 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 32 0.668454750857 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 32 0.788716541461 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 32 0.86697793635 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 51 34 0.688630466836 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 32 0.67683408959 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 60 32 0.80114956131 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 66 32 0.706614786384 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 72 34 0.87371723136 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 75 32 0.723553578301 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 78 32 0.67938094618 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 81 32 0.651122275732 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop07_2.ttl b/ttcommon/Resources/Loops/loop07_2.ttl new file mode 100644 index 0000000..72fa05e --- /dev/null +++ b/ttcommon/Resources/Loops/loop07_2.ttl @@ -0,0 +1,10 @@ +page_add 1 7 0 [] +note_add 1002 1 0 0 32 0.994299643073 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 6 46 0.738402962047 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 12 32 0.834643979888 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 41 0.709677800192 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 32 0.792564704361 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 42 32 0.736310799475 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 54 46 0.735363369615 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 66 32 0.686480691914 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 72 41 0.813155491409 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop07_3.ttl b/ttcommon/Resources/Loops/loop07_3.ttl new file mode 100644 index 0000000..09898fa --- /dev/null +++ b/ttcommon/Resources/Loops/loop07_3.ttl @@ -0,0 +1,9 @@ +page_add 1 7 0 [] +note_add 1003 1 0 0 44 0.950684130482 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 6 38 0.743923505744 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 18 44 0.674226869975 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 41 0.894204673681 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 42 48 0.653172057252 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 48 32 0.869912247789 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 66 43 0.707500105747 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 78 44 0.712916834774 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop07_4.ttl b/ttcommon/Resources/Loops/loop07_4.ttl new file mode 100644 index 0000000..41829c5 --- /dev/null +++ b/ttcommon/Resources/Loops/loop07_4.ttl @@ -0,0 +1,11 @@ +page_add 1 7 0 [] +note_add 1004 1 0 0 32 0.929137794329 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 32 0.658516835329 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 18 38 0.681658393996 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 32 0.699822449365 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 32 0.817283176061 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 48 44 0.774057810069 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 66 48 0.747100920691 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 72 48 0.812377589911 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 75 32 0.681312168088 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 78 32 0.733215412992 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop08_0.ttl b/ttcommon/Resources/Loops/loop08_0.ttl new file mode 100644 index 0000000..a9e7c4a --- /dev/null +++ b/ttcommon/Resources/Loops/loop08_0.ttl @@ -0,0 +1,33 @@ +page_add 1 8 0 [] +note_add 1000 1 0 0 44 0.964205483761 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 44 0.651865744001 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 44 0.653396642859 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 44 0.688558247992 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 44 0.78652120346 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 44 0.659055701164 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 44 0.744066005297 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 44 0.669903086442 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 44 0.757356687106 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 44 0.713679510091 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 44 0.680212916118 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 44 0.702425459646 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 44 0.756115689115 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 44 0.711131722344 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 44 0.723075036701 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 44 0.692765358115 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 44 0.808823848013 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 44 0.668223705544 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 44 0.692958195306 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 44 0.671325742653 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 44 0.840218398486 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 44 0.74449136697 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 44 0.677903075922 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 44 0.685621355598 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 72 44 0.806256032 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 75 44 0.663346781982 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 78 44 0.691827856997 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 81 44 0.68135753616 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 84 44 0.806191023604 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 87 44 0.730719749924 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 90 44 0.733946176916 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 93 44 0.651926437205 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop08_1.ttl b/ttcommon/Resources/Loops/loop08_1.ttl new file mode 100644 index 0000000..98cc806 --- /dev/null +++ b/ttcommon/Resources/Loops/loop08_1.ttl @@ -0,0 +1,19 @@ +page_add 1 8 0 [] +note_add 1001 1 0 0 44 0.944269056188 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 46 0.729319114859 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 48 0.760543989618 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 15 36 0.722123755241 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 44 0.708072119865 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 46 0.894221345157 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 48 0.68244237846 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 36 0.777443117101 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 44 0.706365814249 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 46 0.831627419172 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 48 0.721992835095 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 60 36 0.803478459144 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 66 44 0.724597112713 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 72 46 0.823442728538 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 84 48 0.808131071659 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 87 36 0.65670209975 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 90 44 0.736655313059 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 93 46 0.707173856125 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop08_2.ttl b/ttcommon/Resources/Loops/loop08_2.ttl new file mode 100644 index 0000000..a2ba262 --- /dev/null +++ b/ttcommon/Resources/Loops/loop08_2.ttl @@ -0,0 +1,8 @@ +page_add 1 8 0 [] +note_add 1002 1 0 0 32 0.936290994236 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 32 0.747613725209 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 32 0.837035115234 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 36 32 0.861361469314 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 54 32 0.715305330981 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 72 32 0.805101422804 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 90 32 0.736154980793 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop08_3.ttl b/ttcommon/Resources/Loops/loop08_3.ttl new file mode 100644 index 0000000..207632b --- /dev/null +++ b/ttcommon/Resources/Loops/loop08_3.ttl @@ -0,0 +1,9 @@ +page_add 1 8 0 [] +note_add 1003 1 0 0 46 0.929352843013 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 12 46 0.836915427418 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 24 32 0.790263155895 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 43 0.784494030562 0.5 24 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 60 46 0.893530007497 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 72 46 0.809622907273 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 78 32 0.694420741809 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 84 46 0.795226231834 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop08_4.ttl b/ttcommon/Resources/Loops/loop08_4.ttl new file mode 100644 index 0000000..02e777c --- /dev/null +++ b/ttcommon/Resources/Loops/loop08_4.ttl @@ -0,0 +1,20 @@ +page_add 1 8 0 [] +note_add 1004 1 0 0 32 0.925659868182 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 32 0.6911667398 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 9 34 0.673847362322 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 12 34 0.869535420663 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 15 32 0.668348323168 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 18 32 0.709778522529 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 24 32 0.849447146337 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 32 0.711729398878 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 32 0.866612182294 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 39 32 0.657459654993 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 42 34 0.666975606662 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 48 34 0.789575824644 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 51 32 0.67884164747 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 54 32 0.744742212122 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 60 32 0.864169727314 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 63 32 0.654127259721 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 66 32 0.677590723757 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 78 32 0.693244118701 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 90 34 0.682008906013 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop09_0.ttl b/ttcommon/Resources/Loops/loop09_0.ttl new file mode 100644 index 0000000..a2a2875 --- /dev/null +++ b/ttcommon/Resources/Loops/loop09_0.ttl @@ -0,0 +1,37 @@ +page_add 1 9 0 [] +note_add 1000 1 0 0 46 0.947764415438 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 43 0.658715330453 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 46 0.731517704933 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 43 0.675263974808 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 46 0.87154899892 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 43 0.696613793749 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 46 0.729844473846 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 43 0.708347115296 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 46 0.829761577762 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 43 0.663388505786 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 46 0.723426166448 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 43 0.668570704132 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 46 0.862246548679 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 43 0.748631476403 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 46 0.711571455222 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 43 0.703930487754 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 46 0.859544195395 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 43 0.674156640881 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 46 0.729937128229 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 43 0.685638635438 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 46 0.887943715646 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 43 0.70357448061 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 46 0.706780754681 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 43 0.702266767734 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 72 46 0.803494224643 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 75 43 0.721963084996 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 78 46 0.733358551729 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 81 43 0.704391573465 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 84 46 0.789515426435 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 87 43 0.723108940538 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 90 46 0.710938024252 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 93 43 0.678002862829 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 96 46 0.766596988979 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 99 43 0.738497715805 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 102 46 0.721669110661 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 105 43 0.656578021764 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop09_1.ttl b/ttcommon/Resources/Loops/loop09_1.ttl new file mode 100644 index 0000000..8291a32 --- /dev/null +++ b/ttcommon/Resources/Loops/loop09_1.ttl @@ -0,0 +1,19 @@ +page_add 1 9 0 [] +note_add 1001 1 0 0 32 0.937141355284 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 3 32 0.719478462207 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 48 0.720884133263 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 9 43 0.713174231886 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 32 0.761717535633 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 32 0.681606973286 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 48 0.758114518196 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 43 0.839564832276 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 32 0.734985216027 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 32 0.793625294525 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 51 48 0.717544016903 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 43 0.742042480865 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 66 32 0.73577642886 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 72 32 0.753007731694 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 75 48 0.686873730756 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 78 43 0.68995193264 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 90 32 0.65180674643 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 96 32 0.757800092461 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop09_2.ttl b/ttcommon/Resources/Loops/loop09_2.ttl new file mode 100644 index 0000000..48d797c --- /dev/null +++ b/ttcommon/Resources/Loops/loop09_2.ttl @@ -0,0 +1,10 @@ +page_add 1 9 0 [] +note_add 1002 1 0 0 32 0.99576286255 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 12 43 0.752795807489 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 36 0.66906332588 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 36 32 0.755741418425 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 42 44 0.661876936235 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 48 32 0.847153152159 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 66 43 0.678761285868 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 78 36 0.738364766254 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 90 32 0.712907949451 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop09_3.ttl b/ttcommon/Resources/Loops/loop09_3.ttl new file mode 100644 index 0000000..9a9a012 --- /dev/null +++ b/ttcommon/Resources/Loops/loop09_3.ttl @@ -0,0 +1,13 @@ +page_add 1 9 0 [] +note_add 1003 1 0 0 38 0.996033240789 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 6 32 0.745776812216 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 12 32 0.827835616589 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 24 32 0.79249257228 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 38 0.847804948167 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 48 32 0.799010380796 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 66 32 0.739630347495 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 72 38 0.780463490871 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 78 32 0.666004883967 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 84 32 0.762447888193 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 96 32 0.80956287506 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 102 38 0.703028499787 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop09_4.ttl b/ttcommon/Resources/Loops/loop09_4.ttl new file mode 100644 index 0000000..082b216 --- /dev/null +++ b/ttcommon/Resources/Loops/loop09_4.ttl @@ -0,0 +1,18 @@ +page_add 1 9 0 [] +note_add 1004 1 0 0 32 0.915832699564 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 32 0.742663054845 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 12 32 0.875390486038 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 34 0.748210563485 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 34 0.836488278848 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 48 32 0.865767152798 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 54 46 0.650642284496 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 60 32 0.792115476415 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 72 32 0.782035718153 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 78 32 0.651385601751 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 81 32 0.723715657424 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 84 34 0.793024551054 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 90 34 0.687013359717 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 96 32 0.871123790865 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 99 46 0.747308141007 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 102 32 0.679192160091 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 105 32 0.670293110114 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop10_0.ttl b/ttcommon/Resources/Loops/loop10_0.ttl new file mode 100644 index 0000000..eea484f --- /dev/null +++ b/ttcommon/Resources/Loops/loop10_0.ttl @@ -0,0 +1,41 @@ +page_add 1 10 0 [] +note_add 1000 1 0 0 48 0.979891880558 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 36 0.653076003778 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 48 0.680309821502 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 36 0.732764225227 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 48 0.769826352246 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 36 0.678786909709 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 48 0.664885298095 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 36 0.698420420141 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 48 0.878552200587 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 36 0.662090560587 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 48 0.738971944787 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 36 0.667129605877 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 48 0.803116894964 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 36 0.716572754547 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 48 0.731258823897 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 36 0.712155634947 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 48 0.840071620981 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 36 0.660040151104 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 48 0.7434367206 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 36 0.703695191148 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 48 0.763280464574 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 36 0.66340948072 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 48 0.717965633538 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 36 0.698255623472 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 72 48 0.870481837423 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 75 36 0.70292879052 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 78 48 0.701239054462 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 81 36 0.707280218411 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 84 48 0.824319636365 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 87 36 0.652493438877 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 90 48 0.691791347032 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 93 36 0.674363442563 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 96 48 0.830719213625 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 99 36 0.661428250271 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 102 48 0.733125395714 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 105 36 0.726819629927 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 108 48 0.78346763842 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 111 36 0.69729234269 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 114 48 0.734224587843 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 117 36 0.654777125602 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop10_1.ttl b/ttcommon/Resources/Loops/loop10_1.ttl new file mode 100644 index 0000000..994b3c8 --- /dev/null +++ b/ttcommon/Resources/Loops/loop10_1.ttl @@ -0,0 +1,19 @@ +page_add 1 10 0 [] +note_add 1001 1 0 0 34 0.997748569928 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 3 44 0.723576813399 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 44 0.741871004859 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 38 0.689398479169 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 34 0.660355615404 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 44 0.82625049286 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 44 0.741988630551 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 38 0.775260691012 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 34 0.7332263108 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 57 44 0.703461223395 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 60 44 0.832207143811 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 72 38 0.808919522624 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 84 34 0.809984476763 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 90 44 0.661661695398 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 96 44 0.7522709434 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 102 38 0.651370296265 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 108 34 0.88308853473 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 114 44 0.656056171207 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop10_2.ttl b/ttcommon/Resources/Loops/loop10_2.ttl new file mode 100644 index 0000000..cd3615c --- /dev/null +++ b/ttcommon/Resources/Loops/loop10_2.ttl @@ -0,0 +1,11 @@ +page_add 1 10 0 [] +note_add 1002 1 0 0 44 0.95139538384 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 48 0.723914992791 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 30 32 0.72952006514 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 48 46 0.789405290609 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 60 32 0.8646752285 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 66 44 0.717710545482 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 72 48 0.751895182545 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 84 32 0.807500121395 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 102 46 0.721952453815 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 114 32 0.670629591428 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop10_3.ttl b/ttcommon/Resources/Loops/loop10_3.ttl new file mode 100644 index 0000000..1188351 --- /dev/null +++ b/ttcommon/Resources/Loops/loop10_3.ttl @@ -0,0 +1,12 @@ +page_add 1 10 0 [] +note_add 1003 1 0 0 32 0.918429565796 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 12 32 0.896238657828 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 24 43 0.859990108109 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 36 0.780084722939 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 54 38 0.727509225141 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 66 48 0.677444860539 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 78 32 0.704849216477 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 84 32 0.834177866777 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 96 32 0.776622928055 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 108 43 0.750845342026 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 114 36 0.706362269841 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop10_4.ttl b/ttcommon/Resources/Loops/loop10_4.ttl new file mode 100644 index 0000000..b97ea29 --- /dev/null +++ b/ttcommon/Resources/Loops/loop10_4.ttl @@ -0,0 +1,15 @@ +page_add 1 10 0 [] +note_add 1004 1 0 0 36 0.974377774474 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 12 44 0.753857800625 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 15 48 0.685571400538 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 18 32 0.67559477477 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 30 32 0.743901397279 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 33 36 0.734213988726 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 48 0.801032243062 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 54 32 0.68263985716 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 60 36 0.799444369922 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 66 44 0.656926424107 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 72 48 0.785283513034 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 84 32 0.819419200446 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 96 32 0.873983991491 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 114 36 0.736440156657 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop11_0.ttl b/ttcommon/Resources/Loops/loop11_0.ttl new file mode 100644 index 0000000..abeea45 --- /dev/null +++ b/ttcommon/Resources/Loops/loop11_0.ttl @@ -0,0 +1,45 @@ +page_add 1 11 0 [] +note_add 1000 1 0 0 36 0.974634285682 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 38 0.673218797384 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 36 0.747316415913 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 38 0.735031186526 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 36 0.792657089029 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 38 0.708314889372 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 36 0.699847328328 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 38 0.742779567047 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 36 0.755033182447 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 38 0.715603611197 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 36 0.726677112176 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 38 0.69062307368 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 36 0.888706194279 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 38 0.747272625347 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 36 0.688903817409 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 38 0.730027384767 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 36 0.767287283844 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 38 0.699532687227 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 36 0.675524597551 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 38 0.658223950464 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 36 0.867450964995 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 38 0.7495509036 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 36 0.749049330818 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 38 0.746446874509 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 72 36 0.865760071835 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 75 38 0.657124977406 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 78 36 0.694812492205 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 81 38 0.747782147274 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 84 36 0.846127569948 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 87 38 0.685257570694 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 90 36 0.685048422213 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 93 38 0.73231586802 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 96 36 0.884601979406 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 99 38 0.734779574708 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 102 36 0.691485138954 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 105 38 0.701989583699 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 108 36 0.791414806938 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 111 38 0.746642528046 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 114 36 0.746693851449 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 117 38 0.674224536557 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 120 36 0.820459199538 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 123 38 0.67092960404 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 126 36 0.687376413318 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 129 38 0.71222115059 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop11_1.ttl b/ttcommon/Resources/Loops/loop11_1.ttl new file mode 100644 index 0000000..c39f1c4 --- /dev/null +++ b/ttcommon/Resources/Loops/loop11_1.ttl @@ -0,0 +1,23 @@ +page_add 1 11 0 [] +note_add 1001 1 0 0 36 0.941898753203 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 12 32 0.785087753325 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 43 0.824557786201 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 30 44 0.716901825825 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 36 0.690092006379 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 45 32 0.722995861311 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 43 0.78432267112 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 60 44 0.858051777889 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 66 36 0.743693985084 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 69 32 0.657227900767 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 72 43 0.759573320592 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 84 44 0.882338848874 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 87 36 0.651051750015 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 90 32 0.707705322523 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 96 43 0.899243600614 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 99 44 0.712717212473 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 102 36 0.709697770717 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 105 32 0.740699865621 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 108 43 0.816120650387 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 111 44 0.737603961779 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 114 36 0.696177906281 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 126 32 0.721640187578 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop11_2.ttl b/ttcommon/Resources/Loops/loop11_2.ttl new file mode 100644 index 0000000..33be92c --- /dev/null +++ b/ttcommon/Resources/Loops/loop11_2.ttl @@ -0,0 +1,14 @@ +page_add 1 11 0 [] +note_add 1002 1 0 0 32 0.932892286323 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 12 32 0.863832221538 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 32 0.787489418868 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 30 32 0.708435753041 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 48 32 0.839307723839 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 54 32 0.684927262126 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 66 32 0.744329704618 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 72 32 0.884621164701 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 78 32 0.6930467573 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 84 32 0.792391292267 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 102 32 0.733672222962 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 108 32 0.78807633069 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 126 32 0.73862649862 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop11_3.ttl b/ttcommon/Resources/Loops/loop11_3.ttl new file mode 100644 index 0000000..232f3e8 --- /dev/null +++ b/ttcommon/Resources/Loops/loop11_3.ttl @@ -0,0 +1,12 @@ +page_add 1 11 0 [] +note_add 1003 1 0 0 41 0.97013767245 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 12 43 0.822035108795 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 24 48 0.889989168626 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 30 32 0.701126454681 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 42 32 0.739055337576 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 60 34 0.764608983725 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 66 41 0.695357420564 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 84 41 0.837910768334 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 102 43 0.737348803423 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 114 48 0.691485917531 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 126 32 0.657815450394 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop11_4.ttl b/ttcommon/Resources/Loops/loop11_4.ttl new file mode 100644 index 0000000..7bea87c --- /dev/null +++ b/ttcommon/Resources/Loops/loop11_4.ttl @@ -0,0 +1,15 @@ +page_add 1 11 0 [] +note_add 1004 1 0 0 32 0.939733299728 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 18 38 0.656413766467 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 36 32 0.880054467734 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 42 32 0.675041861362 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 45 44 0.725655372163 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 48 48 0.786593314089 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 60 36 0.822791398686 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 78 46 0.702175101524 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 84 32 0.758226862517 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 87 38 0.658139823066 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 90 32 0.668170127276 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 102 32 0.722681824748 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 108 44 0.836571624545 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 114 48 0.667576972982 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop12_0.ttl b/ttcommon/Resources/Loops/loop12_0.ttl new file mode 100644 index 0000000..e49f5fb --- /dev/null +++ b/ttcommon/Resources/Loops/loop12_0.ttl @@ -0,0 +1,49 @@ +page_add 1 12 0 [] +note_add 1000 1 0 0 41 0.922155761946 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 3 44 0.65350045039 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 6 41 0.657022496954 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 9 44 0.714751727313 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 12 41 0.85354349634 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 15 44 0.662294123372 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 18 41 0.727452922651 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 21 44 0.723569523495 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 24 41 0.833200297055 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 27 44 0.658504944959 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 30 41 0.662973869637 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 33 44 0.721346962099 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 36 41 0.833218537208 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 39 44 0.698601325063 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 42 41 0.689483454263 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 45 44 0.666183054395 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 48 41 0.816037781142 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 51 44 0.725250491697 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 54 41 0.656159719867 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 57 44 0.731945713157 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 60 41 0.821999860726 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 63 44 0.722186626397 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 66 41 0.701696400982 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 69 44 0.709734770938 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 72 41 0.862084602452 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 75 44 0.739586673346 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 78 41 0.684178756537 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 81 44 0.670494640759 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 84 41 0.809983681538 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 87 44 0.678563779847 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 90 41 0.680514820478 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 93 44 0.690880754953 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 96 41 0.874115164798 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 99 44 0.731705174476 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 102 41 0.68378231818 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 105 44 0.701359883096 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 108 41 0.856592797609 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 111 44 0.676599792138 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 114 41 0.703632532775 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 117 44 0.663629203217 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 120 41 0.806365437944 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 123 44 0.722292379583 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 126 41 0.658115890813 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 129 44 0.659717223548 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 132 41 0.828661376132 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 135 44 0.686035070327 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 138 41 0.714063553705 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1000 1 0 141 44 0.678090439045 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop12_1.ttl b/ttcommon/Resources/Loops/loop12_1.ttl new file mode 100644 index 0000000..6050064 --- /dev/null +++ b/ttcommon/Resources/Loops/loop12_1.ttl @@ -0,0 +1,29 @@ +page_add 1 12 0 [] +note_add 1001 1 0 0 41 0.990798818122 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 6 48 0.728222618336 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 18 44 0.720020221419 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 24 48 0.820706617647 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 36 41 0.754280833629 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 42 48 0.650837405159 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 48 44 0.866938100559 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 51 48 0.736567529887 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 54 41 0.656020489483 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 60 48 0.809392385769 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 66 44 0.653434163747 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 72 48 0.874087463664 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 78 41 0.660855905785 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 84 48 0.833722200168 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 87 44 0.688419803681 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 90 48 0.670022997837 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 93 41 0.658388832978 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 96 48 0.805544753099 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 99 44 0.699618040652 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 102 48 0.690339349793 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 108 41 0.803971677644 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 114 48 0.68052067326 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 117 44 0.675471950593 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 120 48 0.823756409447 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 126 41 0.734161745439 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 129 48 0.698206882543 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 132 44 0.803254657959 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1001 1 0 138 48 0.672000324737 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop12_2.ttl b/ttcommon/Resources/Loops/loop12_2.ttl new file mode 100644 index 0000000..638ffd9 --- /dev/null +++ b/ttcommon/Resources/Loops/loop12_2.ttl @@ -0,0 +1,17 @@ +page_add 1 12 0 [] +note_add 1002 1 0 0 32 0.992822719235 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 18 46 0.683065344763 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 24 32 0.854953231044 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 42 48 0.720690803169 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 48 36 0.858725947789 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 60 32 0.849123576607 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 66 46 0.690526197115 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 72 32 0.799919027209 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 84 48 0.799461741675 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 90 36 0.743540955168 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 96 32 0.765305209963 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 102 46 0.711305174906 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 108 32 0.87175080938 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 120 48 0.852562099733 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 132 36 0.759057589787 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1002 1 0 138 32 0.651613398376 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop12_3.ttl b/ttcommon/Resources/Loops/loop12_3.ttl new file mode 100644 index 0000000..cf582d1 --- /dev/null +++ b/ttcommon/Resources/Loops/loop12_3.ttl @@ -0,0 +1,13 @@ +page_add 1 12 0 [] +note_add 1003 1 0 0 41 0.905963287418 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 18 48 0.653981664043 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 30 44 0.717492007744 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 36 48 0.759163240751 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 48 32 0.847283474108 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 66 34 0.723148245474 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 72 41 0.805396504679 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 84 41 0.824886727128 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 90 48 0.695498873295 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 102 44 0.681381863923 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 108 48 0.82969480232 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1003 1 0 120 32 0.759419195855 0.5 24 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Loops/loop12_4.ttl b/ttcommon/Resources/Loops/loop12_4.ttl new file mode 100644 index 0000000..5ebf102 --- /dev/null +++ b/ttcommon/Resources/Loops/loop12_4.ttl @@ -0,0 +1,20 @@ +page_add 1 12 0 [] +note_add 1004 1 0 0 38 0.982488423346 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 6 32 0.746497368612 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 24 46 0.84791183248 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 42 48 0.742155800286 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 45 32 0.705971538547 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 48 32 0.890978181258 0.5 18 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 66 46 0.704742764765 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 72 48 0.886736349118 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 78 38 0.714276723016 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 84 32 0.852158007953 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 87 46 0.697063459875 0.5 3 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 90 48 0.656877774714 0.5 12 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 102 32 0.73965562793 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 108 32 0.767961495682 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 114 46 0.654603393702 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 120 48 0.868872298326 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 126 38 0.652928638258 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 132 32 0.842574221551 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit +note_add 1004 1 0 138 46 0.654273808088 0.5 6 0 1 0.005 0.098 0.1 0 1000 0 edit diff --git a/ttcommon/Resources/Sounds/acguit b/ttcommon/Resources/Sounds/acguit Binary files differnew file mode 100644 index 0000000..2e28014 --- /dev/null +++ b/ttcommon/Resources/Sounds/acguit diff --git a/ttcommon/Resources/Sounds/alarm b/ttcommon/Resources/Sounds/alarm Binary files differnew file mode 100644 index 0000000..73b7628 --- /dev/null +++ b/ttcommon/Resources/Sounds/alarm diff --git a/ttcommon/Resources/Sounds/armbone b/ttcommon/Resources/Sounds/armbone Binary files differnew file mode 100644 index 0000000..38fc68a --- /dev/null +++ b/ttcommon/Resources/Sounds/armbone diff --git a/ttcommon/Resources/Sounds/au_pipes b/ttcommon/Resources/Sounds/au_pipes Binary files differnew file mode 100644 index 0000000..0284d11 --- /dev/null +++ b/ttcommon/Resources/Sounds/au_pipes diff --git a/ttcommon/Resources/Sounds/babylaugh b/ttcommon/Resources/Sounds/babylaugh Binary files differnew file mode 100644 index 0000000..9c72bd3 --- /dev/null +++ b/ttcommon/Resources/Sounds/babylaugh diff --git a/ttcommon/Resources/Sounds/babyuhoh b/ttcommon/Resources/Sounds/babyuhoh Binary files differnew file mode 100644 index 0000000..705f61a --- /dev/null +++ b/ttcommon/Resources/Sounds/babyuhoh diff --git a/ttcommon/Resources/Sounds/banjo b/ttcommon/Resources/Sounds/banjo Binary files differnew file mode 100644 index 0000000..f15278d --- /dev/null +++ b/ttcommon/Resources/Sounds/banjo diff --git a/ttcommon/Resources/Sounds/basse b/ttcommon/Resources/Sounds/basse Binary files differnew file mode 100644 index 0000000..2bc1571 --- /dev/null +++ b/ttcommon/Resources/Sounds/basse diff --git a/ttcommon/Resources/Sounds/basse2 b/ttcommon/Resources/Sounds/basse2 Binary files differnew file mode 100644 index 0000000..744d196 --- /dev/null +++ b/ttcommon/Resources/Sounds/basse2 diff --git a/ttcommon/Resources/Sounds/bird b/ttcommon/Resources/Sounds/bird Binary files differnew file mode 100644 index 0000000..fbe8a29 --- /dev/null +++ b/ttcommon/Resources/Sounds/bird diff --git a/ttcommon/Resources/Sounds/bottle b/ttcommon/Resources/Sounds/bottle Binary files differnew file mode 100644 index 0000000..8f3d680 --- /dev/null +++ b/ttcommon/Resources/Sounds/bottle diff --git a/ttcommon/Resources/Sounds/bubbles b/ttcommon/Resources/Sounds/bubbles Binary files differnew file mode 100644 index 0000000..849ff02 --- /dev/null +++ b/ttcommon/Resources/Sounds/bubbles diff --git a/ttcommon/Resources/Sounds/byke b/ttcommon/Resources/Sounds/byke Binary files differnew file mode 100644 index 0000000..6f428b8 --- /dev/null +++ b/ttcommon/Resources/Sounds/byke diff --git a/ttcommon/Resources/Sounds/camera b/ttcommon/Resources/Sounds/camera Binary files differnew file mode 100644 index 0000000..8eaa5b5 --- /dev/null +++ b/ttcommon/Resources/Sounds/camera diff --git a/ttcommon/Resources/Sounds/car b/ttcommon/Resources/Sounds/car Binary files differnew file mode 100644 index 0000000..66e42ae --- /dev/null +++ b/ttcommon/Resources/Sounds/car diff --git a/ttcommon/Resources/Sounds/carhorn b/ttcommon/Resources/Sounds/carhorn Binary files differnew file mode 100644 index 0000000..fbbd02b --- /dev/null +++ b/ttcommon/Resources/Sounds/carhorn diff --git a/ttcommon/Resources/Sounds/cat b/ttcommon/Resources/Sounds/cat Binary files differnew file mode 100644 index 0000000..845ee8e --- /dev/null +++ b/ttcommon/Resources/Sounds/cat diff --git a/ttcommon/Resources/Sounds/cello b/ttcommon/Resources/Sounds/cello Binary files differnew file mode 100644 index 0000000..31720df --- /dev/null +++ b/ttcommon/Resources/Sounds/cello diff --git a/ttcommon/Resources/Sounds/chiken b/ttcommon/Resources/Sounds/chiken Binary files differnew file mode 100644 index 0000000..736bfd0 --- /dev/null +++ b/ttcommon/Resources/Sounds/chiken diff --git a/ttcommon/Resources/Sounds/chimes b/ttcommon/Resources/Sounds/chimes Binary files differnew file mode 100644 index 0000000..01c80e4 --- /dev/null +++ b/ttcommon/Resources/Sounds/chimes diff --git a/ttcommon/Resources/Sounds/clang b/ttcommon/Resources/Sounds/clang Binary files differnew file mode 100644 index 0000000..01476fc --- /dev/null +++ b/ttcommon/Resources/Sounds/clang diff --git a/ttcommon/Resources/Sounds/clang2 b/ttcommon/Resources/Sounds/clang2 Binary files differnew file mode 100644 index 0000000..cb1fed2 --- /dev/null +++ b/ttcommon/Resources/Sounds/clang2 diff --git a/ttcommon/Resources/Sounds/clarinette b/ttcommon/Resources/Sounds/clarinette Binary files differnew file mode 100644 index 0000000..5ed08c2 --- /dev/null +++ b/ttcommon/Resources/Sounds/clarinette diff --git a/ttcommon/Resources/Sounds/clavinet b/ttcommon/Resources/Sounds/clavinet Binary files differnew file mode 100644 index 0000000..db88314 --- /dev/null +++ b/ttcommon/Resources/Sounds/clavinet diff --git a/ttcommon/Resources/Sounds/cling b/ttcommon/Resources/Sounds/cling Binary files differnew file mode 100644 index 0000000..db3525f --- /dev/null +++ b/ttcommon/Resources/Sounds/cling diff --git a/ttcommon/Resources/Sounds/cow b/ttcommon/Resources/Sounds/cow Binary files differnew file mode 100644 index 0000000..5d31cf5 --- /dev/null +++ b/ttcommon/Resources/Sounds/cow diff --git a/ttcommon/Resources/Sounds/crash b/ttcommon/Resources/Sounds/crash Binary files differnew file mode 100644 index 0000000..8408175 --- /dev/null +++ b/ttcommon/Resources/Sounds/crash diff --git a/ttcommon/Resources/Sounds/cricket b/ttcommon/Resources/Sounds/cricket Binary files differnew file mode 100644 index 0000000..cb3504c --- /dev/null +++ b/ttcommon/Resources/Sounds/cricket diff --git a/ttcommon/Resources/Sounds/diceinst b/ttcommon/Resources/Sounds/diceinst Binary files differnew file mode 100644 index 0000000..5a41341 --- /dev/null +++ b/ttcommon/Resources/Sounds/diceinst diff --git a/ttcommon/Resources/Sounds/didjeridu b/ttcommon/Resources/Sounds/didjeridu Binary files differnew file mode 100644 index 0000000..d7556e7 --- /dev/null +++ b/ttcommon/Resources/Sounds/didjeridu diff --git a/ttcommon/Resources/Sounds/dog b/ttcommon/Resources/Sounds/dog Binary files differnew file mode 100644 index 0000000..c1e8e22 --- /dev/null +++ b/ttcommon/Resources/Sounds/dog diff --git a/ttcommon/Resources/Sounds/door b/ttcommon/Resources/Sounds/door Binary files differnew file mode 100644 index 0000000..2b3b21a --- /dev/null +++ b/ttcommon/Resources/Sounds/door diff --git a/ttcommon/Resources/Sounds/drum1chine b/ttcommon/Resources/Sounds/drum1chine Binary files differnew file mode 100644 index 0000000..bb29f18 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1chine diff --git a/ttcommon/Resources/Sounds/drum1crash b/ttcommon/Resources/Sounds/drum1crash Binary files differnew file mode 100644 index 0000000..5f520c2 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1crash diff --git a/ttcommon/Resources/Sounds/drum1floortom b/ttcommon/Resources/Sounds/drum1floortom Binary files differnew file mode 100644 index 0000000..f43cb2b --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1floortom diff --git a/ttcommon/Resources/Sounds/drum1hardride b/ttcommon/Resources/Sounds/drum1hardride Binary files differnew file mode 100644 index 0000000..94f052f --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1hardride diff --git a/ttcommon/Resources/Sounds/drum1hatpedal b/ttcommon/Resources/Sounds/drum1hatpedal Binary files differnew file mode 100644 index 0000000..0c0afe6 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1hatpedal diff --git a/ttcommon/Resources/Sounds/drum1hatshoulder b/ttcommon/Resources/Sounds/drum1hatshoulder Binary files differnew file mode 100644 index 0000000..395ef0b --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1hatshoulder diff --git a/ttcommon/Resources/Sounds/drum1kick b/ttcommon/Resources/Sounds/drum1kick Binary files differnew file mode 100644 index 0000000..0acfb56 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1kick diff --git a/ttcommon/Resources/Sounds/drum1kit b/ttcommon/Resources/Sounds/drum1kit new file mode 120000 index 0000000..f9dad7e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1kit @@ -0,0 +1 @@ +drum1kick
\ No newline at end of file diff --git a/ttcommon/Resources/Sounds/drum1ridebell b/ttcommon/Resources/Sounds/drum1ridebell Binary files differnew file mode 100644 index 0000000..6f6b6ce --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1ridebell diff --git a/ttcommon/Resources/Sounds/drum1snare b/ttcommon/Resources/Sounds/drum1snare Binary files differnew file mode 100644 index 0000000..54a6372 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1snare diff --git a/ttcommon/Resources/Sounds/drum1snaresidestick b/ttcommon/Resources/Sounds/drum1snaresidestick Binary files differnew file mode 100644 index 0000000..a99e846 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1snaresidestick diff --git a/ttcommon/Resources/Sounds/drum1splash b/ttcommon/Resources/Sounds/drum1splash Binary files differnew file mode 100644 index 0000000..49a334e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1splash diff --git a/ttcommon/Resources/Sounds/drum1tom b/ttcommon/Resources/Sounds/drum1tom Binary files differnew file mode 100644 index 0000000..ed1464c --- /dev/null +++ b/ttcommon/Resources/Sounds/drum1tom diff --git a/ttcommon/Resources/Sounds/drum2darbukadoom b/ttcommon/Resources/Sounds/drum2darbukadoom Binary files differnew file mode 100644 index 0000000..5a90725 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukadoom diff --git a/ttcommon/Resources/Sounds/drum2darbukafinger b/ttcommon/Resources/Sounds/drum2darbukafinger Binary files differnew file mode 100644 index 0000000..163aa3c --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukafinger diff --git a/ttcommon/Resources/Sounds/drum2darbukapied b/ttcommon/Resources/Sounds/drum2darbukapied Binary files differnew file mode 100644 index 0000000..006586a --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukapied diff --git a/ttcommon/Resources/Sounds/drum2darbukapiedsoft b/ttcommon/Resources/Sounds/drum2darbukapiedsoft Binary files differnew file mode 100644 index 0000000..cf2aaa8 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukapiedsoft diff --git a/ttcommon/Resources/Sounds/drum2darbukaroll b/ttcommon/Resources/Sounds/drum2darbukaroll Binary files differnew file mode 100644 index 0000000..ded7a31 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukaroll diff --git a/ttcommon/Resources/Sounds/drum2darbukaslap b/ttcommon/Resources/Sounds/drum2darbukaslap Binary files differnew file mode 100644 index 0000000..fd70b88 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukaslap diff --git a/ttcommon/Resources/Sounds/drum2darbukatak b/ttcommon/Resources/Sounds/drum2darbukatak Binary files differnew file mode 100644 index 0000000..329f619 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2darbukatak diff --git a/ttcommon/Resources/Sounds/drum2hatflanger b/ttcommon/Resources/Sounds/drum2hatflanger Binary files differnew file mode 100644 index 0000000..9dd9389 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2hatflanger diff --git a/ttcommon/Resources/Sounds/drum2hatpied b/ttcommon/Resources/Sounds/drum2hatpied Binary files differnew file mode 100644 index 0000000..84e774e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2hatpied diff --git a/ttcommon/Resources/Sounds/drum2hatpied2 b/ttcommon/Resources/Sounds/drum2hatpied2 Binary files differnew file mode 100644 index 0000000..cd21b17 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2hatpied2 diff --git a/ttcommon/Resources/Sounds/drum2kit b/ttcommon/Resources/Sounds/drum2kit new file mode 120000 index 0000000..abe57a3 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2kit @@ -0,0 +1 @@ +drum2darbukadoom
\ No newline at end of file diff --git a/ttcommon/Resources/Sounds/drum2tambourinepied b/ttcommon/Resources/Sounds/drum2tambourinepied Binary files differnew file mode 100644 index 0000000..d6b566a --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2tambourinepied diff --git a/ttcommon/Resources/Sounds/drum2tambourinepiedsoft b/ttcommon/Resources/Sounds/drum2tambourinepiedsoft Binary files differnew file mode 100644 index 0000000..4da2ea6 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum2tambourinepiedsoft diff --git a/ttcommon/Resources/Sounds/drum3cowbell b/ttcommon/Resources/Sounds/drum3cowbell Binary files differnew file mode 100644 index 0000000..3c52687 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3cowbell diff --git a/ttcommon/Resources/Sounds/drum3cowbelltip b/ttcommon/Resources/Sounds/drum3cowbelltip Binary files differnew file mode 100644 index 0000000..7b79fe2 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3cowbelltip diff --git a/ttcommon/Resources/Sounds/drum3cup b/ttcommon/Resources/Sounds/drum3cup Binary files differnew file mode 100644 index 0000000..6cf6da2 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3cup diff --git a/ttcommon/Resources/Sounds/drum3djembelow b/ttcommon/Resources/Sounds/drum3djembelow Binary files differnew file mode 100644 index 0000000..ad5fd0a --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3djembelow diff --git a/ttcommon/Resources/Sounds/drum3djembemid b/ttcommon/Resources/Sounds/drum3djembemid Binary files differnew file mode 100644 index 0000000..55b6d9f --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3djembemid diff --git a/ttcommon/Resources/Sounds/drum3djembesidestick b/ttcommon/Resources/Sounds/drum3djembesidestick Binary files differnew file mode 100644 index 0000000..94c29e6 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3djembesidestick diff --git a/ttcommon/Resources/Sounds/drum3djembeslap b/ttcommon/Resources/Sounds/drum3djembeslap Binary files differnew file mode 100644 index 0000000..d201e52 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3djembeslap diff --git a/ttcommon/Resources/Sounds/drum3djembestickmid b/ttcommon/Resources/Sounds/drum3djembestickmid Binary files differnew file mode 100644 index 0000000..9da83ba --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3djembestickmid diff --git a/ttcommon/Resources/Sounds/drum3kit b/ttcommon/Resources/Sounds/drum3kit new file mode 120000 index 0000000..2e6cdc8 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3kit @@ -0,0 +1 @@ +drum3djembesidestick
\ No newline at end of file diff --git a/ttcommon/Resources/Sounds/drum3metalstand b/ttcommon/Resources/Sounds/drum3metalstand Binary files differnew file mode 100644 index 0000000..059efcc --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3metalstand diff --git a/ttcommon/Resources/Sounds/drum3pedalperc b/ttcommon/Resources/Sounds/drum3pedalperc Binary files differnew file mode 100644 index 0000000..c271d66 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3pedalperc diff --git a/ttcommon/Resources/Sounds/drum3rainstick b/ttcommon/Resources/Sounds/drum3rainstick Binary files differnew file mode 100644 index 0000000..561d0d9 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3rainstick diff --git a/ttcommon/Resources/Sounds/drum3tambourinehigh b/ttcommon/Resources/Sounds/drum3tambourinehigh Binary files differnew file mode 100644 index 0000000..cf2c61e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3tambourinehigh diff --git a/ttcommon/Resources/Sounds/drum3tambourinelow b/ttcommon/Resources/Sounds/drum3tambourinelow Binary files differnew file mode 100644 index 0000000..ff8e278 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum3tambourinelow diff --git a/ttcommon/Resources/Sounds/drum4afrofeet b/ttcommon/Resources/Sounds/drum4afrofeet Binary files differnew file mode 100644 index 0000000..b2044da --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4afrofeet diff --git a/ttcommon/Resources/Sounds/drum4fingersn b/ttcommon/Resources/Sounds/drum4fingersn Binary files differnew file mode 100644 index 0000000..e6b60a5 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4fingersn diff --git a/ttcommon/Resources/Sounds/drum4kit b/ttcommon/Resources/Sounds/drum4kit new file mode 120000 index 0000000..5f87174 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4kit @@ -0,0 +1 @@ +drum4tr909sn
\ No newline at end of file diff --git a/ttcommon/Resources/Sounds/drum4mutecuic b/ttcommon/Resources/Sounds/drum4mutecuic Binary files differnew file mode 100644 index 0000000..ef0c0c0 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4mutecuic diff --git a/ttcommon/Resources/Sounds/drum4stompbass b/ttcommon/Resources/Sounds/drum4stompbass Binary files differnew file mode 100644 index 0000000..68dd316 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4stompbass diff --git a/ttcommon/Resources/Sounds/drum4tambouri b/ttcommon/Resources/Sounds/drum4tambouri Binary files differnew file mode 100644 index 0000000..5b32be2 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tambouri diff --git a/ttcommon/Resources/Sounds/drum4tr707clap b/ttcommon/Resources/Sounds/drum4tr707clap Binary files differnew file mode 100644 index 0000000..f9ea03e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr707clap diff --git a/ttcommon/Resources/Sounds/drum4tr707open b/ttcommon/Resources/Sounds/drum4tr707open Binary files differnew file mode 100644 index 0000000..f7d54bf --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr707open diff --git a/ttcommon/Resources/Sounds/drum4tr808closed b/ttcommon/Resources/Sounds/drum4tr808closed Binary files differnew file mode 100644 index 0000000..8995edd --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr808closed diff --git a/ttcommon/Resources/Sounds/drum4tr808sn b/ttcommon/Resources/Sounds/drum4tr808sn Binary files differnew file mode 100644 index 0000000..adde850 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr808sn diff --git a/ttcommon/Resources/Sounds/drum4tr909bass b/ttcommon/Resources/Sounds/drum4tr909bass Binary files differnew file mode 100644 index 0000000..6420213 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr909bass diff --git a/ttcommon/Resources/Sounds/drum4tr909kick b/ttcommon/Resources/Sounds/drum4tr909kick Binary files differnew file mode 100644 index 0000000..6e33dd3 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr909kick diff --git a/ttcommon/Resources/Sounds/drum4tr909sn b/ttcommon/Resources/Sounds/drum4tr909sn Binary files differnew file mode 100644 index 0000000..486ed42 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum4tr909sn diff --git a/ttcommon/Resources/Sounds/drum5agogoaigu b/ttcommon/Resources/Sounds/drum5agogoaigu Binary files differnew file mode 100644 index 0000000..3889332 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5agogoaigu diff --git a/ttcommon/Resources/Sounds/drum5agogograve b/ttcommon/Resources/Sounds/drum5agogograve Binary files differnew file mode 100644 index 0000000..5717751 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5agogograve diff --git a/ttcommon/Resources/Sounds/drum5bongoaiguouvert b/ttcommon/Resources/Sounds/drum5bongoaiguouvert Binary files differnew file mode 100644 index 0000000..95aba33 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5bongoaiguouvert diff --git a/ttcommon/Resources/Sounds/drum5bongograveouvert b/ttcommon/Resources/Sounds/drum5bongograveouvert Binary files differnew file mode 100644 index 0000000..d7d1e58 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5bongograveouvert diff --git a/ttcommon/Resources/Sounds/drum5congaaiguouvert b/ttcommon/Resources/Sounds/drum5congaaiguouvert Binary files differnew file mode 100644 index 0000000..a59ce75 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5congaaiguouvert diff --git a/ttcommon/Resources/Sounds/drum5congagraveferme b/ttcommon/Resources/Sounds/drum5congagraveferme Binary files differnew file mode 100644 index 0000000..a49c459 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5congagraveferme diff --git a/ttcommon/Resources/Sounds/drum5congagraveouvert b/ttcommon/Resources/Sounds/drum5congagraveouvert Binary files differnew file mode 100644 index 0000000..3b9503c --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5congagraveouvert diff --git a/ttcommon/Resources/Sounds/drum5guiroretour b/ttcommon/Resources/Sounds/drum5guiroretour Binary files differnew file mode 100644 index 0000000..025ebfb --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5guiroretour diff --git a/ttcommon/Resources/Sounds/drum5kit b/ttcommon/Resources/Sounds/drum5kit new file mode 120000 index 0000000..e1400d6 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5kit @@ -0,0 +1 @@ +drum5bongoaiguouvert
\ No newline at end of file diff --git a/ttcommon/Resources/Sounds/drum5quicaaigu b/ttcommon/Resources/Sounds/drum5quicaaigu Binary files differnew file mode 100644 index 0000000..d952c8c --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5quicaaigu diff --git a/ttcommon/Resources/Sounds/drum5quicamedium b/ttcommon/Resources/Sounds/drum5quicamedium Binary files differnew file mode 100644 index 0000000..57e92e6 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5quicamedium diff --git a/ttcommon/Resources/Sounds/drum5timablesaiguslap b/ttcommon/Resources/Sounds/drum5timablesaiguslap Binary files differnew file mode 100644 index 0000000..1b531b0 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5timablesaiguslap diff --git a/ttcommon/Resources/Sounds/drum5timablesslap b/ttcommon/Resources/Sounds/drum5timablesslap Binary files differnew file mode 100644 index 0000000..1e5ec3e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5timablesslap diff --git a/ttcommon/Resources/Sounds/drum5vibraslap b/ttcommon/Resources/Sounds/drum5vibraslap Binary files differnew file mode 100644 index 0000000..e539891 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum5vibraslap diff --git a/ttcommon/Resources/Sounds/drum6kit b/ttcommon/Resources/Sounds/drum6kit new file mode 120000 index 0000000..332b551 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6kit @@ -0,0 +1 @@ +drum6madal05
\ No newline at end of file diff --git a/ttcommon/Resources/Sounds/drum6madal00 b/ttcommon/Resources/Sounds/drum6madal00 Binary files differnew file mode 100644 index 0000000..6af692f --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal00 diff --git a/ttcommon/Resources/Sounds/drum6madal01 b/ttcommon/Resources/Sounds/drum6madal01 Binary files differnew file mode 100644 index 0000000..0a7dbdb --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal01 diff --git a/ttcommon/Resources/Sounds/drum6madal02 b/ttcommon/Resources/Sounds/drum6madal02 Binary files differnew file mode 100644 index 0000000..e12a412 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal02 diff --git a/ttcommon/Resources/Sounds/drum6madal03 b/ttcommon/Resources/Sounds/drum6madal03 Binary files differnew file mode 100644 index 0000000..b3a210e --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal03 diff --git a/ttcommon/Resources/Sounds/drum6madal04 b/ttcommon/Resources/Sounds/drum6madal04 Binary files differnew file mode 100644 index 0000000..fcef18f --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal04 diff --git a/ttcommon/Resources/Sounds/drum6madal05 b/ttcommon/Resources/Sounds/drum6madal05 Binary files differnew file mode 100644 index 0000000..a409f6c --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal05 diff --git a/ttcommon/Resources/Sounds/drum6madal06 b/ttcommon/Resources/Sounds/drum6madal06 Binary files differnew file mode 100644 index 0000000..e7c307d --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal06 diff --git a/ttcommon/Resources/Sounds/drum6madal07 b/ttcommon/Resources/Sounds/drum6madal07 Binary files differnew file mode 100644 index 0000000..25bf251 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal07 diff --git a/ttcommon/Resources/Sounds/drum6madal08 b/ttcommon/Resources/Sounds/drum6madal08 Binary files differnew file mode 100644 index 0000000..4bcba5a --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal08 diff --git a/ttcommon/Resources/Sounds/drum6madal09 b/ttcommon/Resources/Sounds/drum6madal09 Binary files differnew file mode 100644 index 0000000..3cb92ee --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal09 diff --git a/ttcommon/Resources/Sounds/drum6madal10 b/ttcommon/Resources/Sounds/drum6madal10 Binary files differnew file mode 100644 index 0000000..af6f451 --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal10 diff --git a/ttcommon/Resources/Sounds/drum6madal11 b/ttcommon/Resources/Sounds/drum6madal11 Binary files differnew file mode 100644 index 0000000..cddcf4a --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal11 diff --git a/ttcommon/Resources/Sounds/drum6madal12 b/ttcommon/Resources/Sounds/drum6madal12 Binary files differnew file mode 100644 index 0000000..1b3dc5b --- /dev/null +++ b/ttcommon/Resources/Sounds/drum6madal12 diff --git a/ttcommon/Resources/Sounds/duck b/ttcommon/Resources/Sounds/duck Binary files differnew file mode 100644 index 0000000..37b5f85 --- /dev/null +++ b/ttcommon/Resources/Sounds/duck diff --git a/ttcommon/Resources/Sounds/duck2 b/ttcommon/Resources/Sounds/duck2 Binary files differnew file mode 100644 index 0000000..1c62622 --- /dev/null +++ b/ttcommon/Resources/Sounds/duck2 diff --git a/ttcommon/Resources/Sounds/fingercymbals b/ttcommon/Resources/Sounds/fingercymbals Binary files differnew file mode 100644 index 0000000..aa1f221 --- /dev/null +++ b/ttcommon/Resources/Sounds/fingercymbals diff --git a/ttcommon/Resources/Sounds/flugel b/ttcommon/Resources/Sounds/flugel Binary files differnew file mode 100644 index 0000000..4367cc2 --- /dev/null +++ b/ttcommon/Resources/Sounds/flugel diff --git a/ttcommon/Resources/Sounds/flute b/ttcommon/Resources/Sounds/flute Binary files differnew file mode 100644 index 0000000..68a2580 --- /dev/null +++ b/ttcommon/Resources/Sounds/flute diff --git a/ttcommon/Resources/Sounds/foghorn b/ttcommon/Resources/Sounds/foghorn Binary files differnew file mode 100644 index 0000000..65549e6 --- /dev/null +++ b/ttcommon/Resources/Sounds/foghorn diff --git a/ttcommon/Resources/Sounds/frogs b/ttcommon/Resources/Sounds/frogs Binary files differnew file mode 100644 index 0000000..9b2831a --- /dev/null +++ b/ttcommon/Resources/Sounds/frogs diff --git a/ttcommon/Resources/Sounds/gam b/ttcommon/Resources/Sounds/gam Binary files differnew file mode 100644 index 0000000..dca077b --- /dev/null +++ b/ttcommon/Resources/Sounds/gam diff --git a/ttcommon/Resources/Sounds/guidice1 b/ttcommon/Resources/Sounds/guidice1 Binary files differnew file mode 100644 index 0000000..9e48310 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice1 diff --git a/ttcommon/Resources/Sounds/guidice10 b/ttcommon/Resources/Sounds/guidice10 Binary files differnew file mode 100644 index 0000000..8da4267 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice10 diff --git a/ttcommon/Resources/Sounds/guidice2 b/ttcommon/Resources/Sounds/guidice2 Binary files differnew file mode 100644 index 0000000..7b12043 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice2 diff --git a/ttcommon/Resources/Sounds/guidice3 b/ttcommon/Resources/Sounds/guidice3 Binary files differnew file mode 100644 index 0000000..68d1f45 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice3 diff --git a/ttcommon/Resources/Sounds/guidice4 b/ttcommon/Resources/Sounds/guidice4 Binary files differnew file mode 100644 index 0000000..3d72119 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice4 diff --git a/ttcommon/Resources/Sounds/guidice5 b/ttcommon/Resources/Sounds/guidice5 Binary files differnew file mode 100644 index 0000000..79cc786 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice5 diff --git a/ttcommon/Resources/Sounds/guidice6 b/ttcommon/Resources/Sounds/guidice6 Binary files differnew file mode 100644 index 0000000..dc2f756 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice6 diff --git a/ttcommon/Resources/Sounds/guidice7 b/ttcommon/Resources/Sounds/guidice7 Binary files differnew file mode 100644 index 0000000..af341b7 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice7 diff --git a/ttcommon/Resources/Sounds/guidice8 b/ttcommon/Resources/Sounds/guidice8 Binary files differnew file mode 100644 index 0000000..9901020 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice8 diff --git a/ttcommon/Resources/Sounds/guidice9 b/ttcommon/Resources/Sounds/guidice9 Binary files differnew file mode 100644 index 0000000..8798781 --- /dev/null +++ b/ttcommon/Resources/Sounds/guidice9 diff --git a/ttcommon/Resources/Sounds/guit b/ttcommon/Resources/Sounds/guit Binary files differnew file mode 100644 index 0000000..dfb1866 --- /dev/null +++ b/ttcommon/Resources/Sounds/guit diff --git a/ttcommon/Resources/Sounds/guit2 b/ttcommon/Resources/Sounds/guit2 Binary files differnew file mode 100644 index 0000000..fcb9163 --- /dev/null +++ b/ttcommon/Resources/Sounds/guit2 diff --git a/ttcommon/Resources/Sounds/guitmute b/ttcommon/Resources/Sounds/guitmute Binary files differnew file mode 100644 index 0000000..93026d6 --- /dev/null +++ b/ttcommon/Resources/Sounds/guitmute diff --git a/ttcommon/Resources/Sounds/guitshort b/ttcommon/Resources/Sounds/guitshort Binary files differnew file mode 100644 index 0000000..698364b --- /dev/null +++ b/ttcommon/Resources/Sounds/guitshort diff --git a/ttcommon/Resources/Sounds/harmonica b/ttcommon/Resources/Sounds/harmonica Binary files differnew file mode 100644 index 0000000..7b0af9f --- /dev/null +++ b/ttcommon/Resources/Sounds/harmonica diff --git a/ttcommon/Resources/Sounds/harmonium b/ttcommon/Resources/Sounds/harmonium Binary files differnew file mode 100644 index 0000000..5bc5fcb --- /dev/null +++ b/ttcommon/Resources/Sounds/harmonium diff --git a/ttcommon/Resources/Sounds/harpsichord b/ttcommon/Resources/Sounds/harpsichord Binary files differnew file mode 100644 index 0000000..dac451f --- /dev/null +++ b/ttcommon/Resources/Sounds/harpsichord diff --git a/ttcommon/Resources/Sounds/hey b/ttcommon/Resources/Sounds/hey Binary files differnew file mode 100644 index 0000000..0bd7b20 --- /dev/null +++ b/ttcommon/Resources/Sounds/hey diff --git a/ttcommon/Resources/Sounds/horse b/ttcommon/Resources/Sounds/horse Binary files differnew file mode 100644 index 0000000..b7756a3 --- /dev/null +++ b/ttcommon/Resources/Sounds/horse diff --git a/ttcommon/Resources/Sounds/kalimba b/ttcommon/Resources/Sounds/kalimba Binary files differnew file mode 100644 index 0000000..2e02b48 --- /dev/null +++ b/ttcommon/Resources/Sounds/kalimba diff --git a/ttcommon/Resources/Sounds/koto b/ttcommon/Resources/Sounds/koto Binary files differnew file mode 100644 index 0000000..9279a7f --- /dev/null +++ b/ttcommon/Resources/Sounds/koto diff --git a/ttcommon/Resources/Sounds/laugh b/ttcommon/Resources/Sounds/laugh Binary files differnew file mode 100644 index 0000000..05483ce --- /dev/null +++ b/ttcommon/Resources/Sounds/laugh diff --git a/ttcommon/Resources/Sounds/mando b/ttcommon/Resources/Sounds/mando Binary files differnew file mode 100644 index 0000000..092125b --- /dev/null +++ b/ttcommon/Resources/Sounds/mando diff --git a/ttcommon/Resources/Sounds/marimba b/ttcommon/Resources/Sounds/marimba Binary files differnew file mode 100644 index 0000000..489ba71 --- /dev/null +++ b/ttcommon/Resources/Sounds/marimba diff --git a/ttcommon/Resources/Sounds/mic1 b/ttcommon/Resources/Sounds/mic1 Binary files differnew file mode 100644 index 0000000..d26b87b --- /dev/null +++ b/ttcommon/Resources/Sounds/mic1 diff --git a/ttcommon/Resources/Sounds/mic2 b/ttcommon/Resources/Sounds/mic2 Binary files differnew file mode 100644 index 0000000..d26b87b --- /dev/null +++ b/ttcommon/Resources/Sounds/mic2 diff --git a/ttcommon/Resources/Sounds/mic3 b/ttcommon/Resources/Sounds/mic3 Binary files differnew file mode 100644 index 0000000..d26b87b --- /dev/null +++ b/ttcommon/Resources/Sounds/mic3 diff --git a/ttcommon/Resources/Sounds/mic4 b/ttcommon/Resources/Sounds/mic4 Binary files differnew file mode 100644 index 0000000..d26b87b --- /dev/null +++ b/ttcommon/Resources/Sounds/mic4 diff --git a/ttcommon/Resources/Sounds/ocarina b/ttcommon/Resources/Sounds/ocarina Binary files differnew file mode 100644 index 0000000..7b00cc6 --- /dev/null +++ b/ttcommon/Resources/Sounds/ocarina diff --git a/ttcommon/Resources/Sounds/ounk b/ttcommon/Resources/Sounds/ounk Binary files differnew file mode 100644 index 0000000..1272c5f --- /dev/null +++ b/ttcommon/Resources/Sounds/ounk diff --git a/ttcommon/Resources/Sounds/ow b/ttcommon/Resources/Sounds/ow Binary files differnew file mode 100644 index 0000000..8270199 --- /dev/null +++ b/ttcommon/Resources/Sounds/ow diff --git a/ttcommon/Resources/Sounds/piano b/ttcommon/Resources/Sounds/piano Binary files differnew file mode 100644 index 0000000..f98a513 --- /dev/null +++ b/ttcommon/Resources/Sounds/piano diff --git a/ttcommon/Resources/Sounds/plane b/ttcommon/Resources/Sounds/plane Binary files differnew file mode 100644 index 0000000..d20142a --- /dev/null +++ b/ttcommon/Resources/Sounds/plane diff --git a/ttcommon/Resources/Sounds/rhodes b/ttcommon/Resources/Sounds/rhodes Binary files differnew file mode 100644 index 0000000..16cd8ec --- /dev/null +++ b/ttcommon/Resources/Sounds/rhodes diff --git a/ttcommon/Resources/Sounds/sarangi b/ttcommon/Resources/Sounds/sarangi Binary files differnew file mode 100644 index 0000000..69bde54 --- /dev/null +++ b/ttcommon/Resources/Sounds/sarangi diff --git a/ttcommon/Resources/Sounds/saxo b/ttcommon/Resources/Sounds/saxo Binary files differnew file mode 100644 index 0000000..16de921 --- /dev/null +++ b/ttcommon/Resources/Sounds/saxo diff --git a/ttcommon/Resources/Sounds/saxsoprano b/ttcommon/Resources/Sounds/saxsoprano Binary files differnew file mode 100644 index 0000000..b9f63e9 --- /dev/null +++ b/ttcommon/Resources/Sounds/saxsoprano diff --git a/ttcommon/Resources/Sounds/sheep b/ttcommon/Resources/Sounds/sheep Binary files differnew file mode 100644 index 0000000..178bb43 --- /dev/null +++ b/ttcommon/Resources/Sounds/sheep diff --git a/ttcommon/Resources/Sounds/shenai b/ttcommon/Resources/Sounds/shenai Binary files differnew file mode 100644 index 0000000..115f125 --- /dev/null +++ b/ttcommon/Resources/Sounds/shenai diff --git a/ttcommon/Resources/Sounds/sitar b/ttcommon/Resources/Sounds/sitar Binary files differnew file mode 100644 index 0000000..6fdc321 --- /dev/null +++ b/ttcommon/Resources/Sounds/sitar diff --git a/ttcommon/Resources/Sounds/slap b/ttcommon/Resources/Sounds/slap Binary files differnew file mode 100644 index 0000000..6e1f375 --- /dev/null +++ b/ttcommon/Resources/Sounds/slap diff --git a/ttcommon/Resources/Sounds/templebell b/ttcommon/Resources/Sounds/templebell Binary files differnew file mode 100644 index 0000000..705fbbc --- /dev/null +++ b/ttcommon/Resources/Sounds/templebell diff --git a/ttcommon/Resources/Sounds/triangle b/ttcommon/Resources/Sounds/triangle Binary files differnew file mode 100644 index 0000000..8c3c1b9 --- /dev/null +++ b/ttcommon/Resources/Sounds/triangle diff --git a/ttcommon/Resources/Sounds/trumpet b/ttcommon/Resources/Sounds/trumpet Binary files differnew file mode 100644 index 0000000..3ce006d --- /dev/null +++ b/ttcommon/Resources/Sounds/trumpet diff --git a/ttcommon/Resources/Sounds/tuba b/ttcommon/Resources/Sounds/tuba Binary files differnew file mode 100644 index 0000000..9e47196 --- /dev/null +++ b/ttcommon/Resources/Sounds/tuba diff --git a/ttcommon/Resources/Sounds/ukulele b/ttcommon/Resources/Sounds/ukulele Binary files differnew file mode 100644 index 0000000..bfacc40 --- /dev/null +++ b/ttcommon/Resources/Sounds/ukulele diff --git a/ttcommon/Resources/Sounds/violin b/ttcommon/Resources/Sounds/violin Binary files differnew file mode 100644 index 0000000..f89733c --- /dev/null +++ b/ttcommon/Resources/Sounds/violin diff --git a/ttcommon/Resources/Sounds/voix b/ttcommon/Resources/Sounds/voix Binary files differnew file mode 100644 index 0000000..87f6ca6 --- /dev/null +++ b/ttcommon/Resources/Sounds/voix diff --git a/ttcommon/Resources/Sounds/water b/ttcommon/Resources/Sounds/water Binary files differnew file mode 100644 index 0000000..c6cee2e --- /dev/null +++ b/ttcommon/Resources/Sounds/water diff --git a/ttcommon/Resources/Sounds/zap b/ttcommon/Resources/Sounds/zap Binary files differnew file mode 100644 index 0000000..e401f6b --- /dev/null +++ b/ttcommon/Resources/Sounds/zap diff --git a/ttcommon/Resources/crop.csd b/ttcommon/Resources/crop.csd new file mode 100644 index 0000000..483e578 --- /dev/null +++ b/ttcommon/Resources/crop.csd @@ -0,0 +1,78 @@ +<CsoundSynthesizer> + +<CsOptions> +-W -d -n +</CsOptions> + +<CsInstruments> + +sr=16000 +ksmps=64 +nchnls=1 + +/**************************************************************** +Playing temp file +****************************************************************/ +instr 1 +Spath strget 999 +Stempfile strcat Spath, "/tempMic.wav" +asig diskin Stempfile, 1 +gasig dcblock asig + +endin + +/**************************************************************** +Crop silence at the beginning +****************************************************************/ +instr 2 +ktimer timeinstk +ain = gasig +krms rms ain +if ktimer > 40 then + ktrig trigger krms, 1500, 0 + if ktrig == 1 then + event "i", 3, 0, 2 + event "i", 4, 2, 0.01 + turnoff + endif +endif +endin + +/**************************************************************** +recording +****************************************************************/ +instr 3 +kenv adsr 0.01, 0.05, .9, 0.01 + +adel delay gasig, .005 + +Spath strget 999 +Sfile strcat Spath, "/micTemp.wav" + +ihandle fiopen Sfile, 2 + +fout Sfile, 2, adel*kenv + +;out adel*kenv +adel = 0 +endin + +/**************************************************************** +Audio input recording ( closing file ) +****************************************************************/ +instr 4 +Spath strget 999 +Sfile strcat Spath, "/micTemp.wav" +ficlose Sfile +endin + + +</CsInstruments> + +<CsScore> +f1 0 8192 10 1 +i1 0 4 +i2 0 4 +</CsScore> + +</CsoundSynthesizer> diff --git a/ttcommon/Resources/cropSynthLab.csd b/ttcommon/Resources/cropSynthLab.csd new file mode 100644 index 0000000..4abf203 --- /dev/null +++ b/ttcommon/Resources/cropSynthLab.csd @@ -0,0 +1,77 @@ +<CsoundSynthesizer> + +<CsOptions> +-W -d -n +</CsOptions> + +<CsInstruments> + +sr=16000 +ksmps=64 +nchnls=1 + +/**************************************************************** +Playing temp file +****************************************************************/ +instr 1 + +Spath strget 999 +Stempfile strcat Spath, "/tempMic.wav" +gilen filelen Stempfile +p3 = gilen +asig diskin Stempfile, 1 +gasig dcblock asig + +endin + +/**************************************************************** +Crop silence at the beginning +****************************************************************/ +instr 2 +ktimer timeinstk +ain = gasig +if ktimer > 40 then + event "i", 3, 0, gilen - 0.2 + event "i", 4, gilen - 0.2, 0.01 + turnoff +endif +endin + +/**************************************************************** +recording +****************************************************************/ +instr 3 +kenv adsr 0.01, 0.05, .9, 0.01 + +adel delay gasig, .005 + +Spath strget 999 +Sfile strcat Spath, "/micTemp.wav" + +ihandle fiopen Sfile, 2 + +fout Sfile, 2, adel*kenv + +;out adel*kenv +adel = 0 +endin + +/**************************************************************** +Audio input recording ( closing file ) +****************************************************************/ +instr 4 +Spath strget 999 +Sfile strcat Spath, "/micTemp.wav" +ficlose Sfile +endin + + +</CsInstruments> + +<CsScore> +f1 0 8192 10 1 +i1 0 4 +i2 0 4 +</CsScore> + +</CsoundSynthesizer> diff --git a/ttcommon/Resources/tamtamorc.csd b/ttcommon/Resources/tamtamorc.csd new file mode 100644 index 0000000..3adf81b --- /dev/null +++ b/ttcommon/Resources/tamtamorc.csd @@ -0,0 +1,1125 @@ +<CsoundSynthesizer> +<CsOptions> +-n -odac -m0 -W -s -d +</CsOptions> +<CsInstruments> +sr=16000 +ksmps=64 +nchnls=2 +giScale = 1/sr +giAliasSr = sr/2.1 + +gainrev init 0 +gaoutL init 0 +gaoutR init 0 +gasynth init 0 +gkTrackpadX init 0 +gkTrackpadY init 0 +gSpath strcpy " " + +/***************************** +matrix for TamTam's SynthLab +*****************************/ +zakinit 8, 32 + +/***************************** +opcodes needed by TamTam's SynthLab +*****************************/ + +opcode homeSine, a, kki +kpitch, kspread, iTable xin + +kspread = kspread + 1 + +kr1 randomi 0.99, 1.01, 3.45 +kr2 randomi 0.9901, 1.0101, 4.43 +kr3 randomi 0.9899, 1.0091, 5.25 +kr4 randomi 0.9889, 1.00921, 6.15 + +kpit1 = kpitch +kpit2 = kpit1*kspread +kpit3 = kpit2*kspread +kpit4 = kpit3*kspread +kpit5 = kpit4*kspread +kpit6 = kpit5*kspread +kpit7 = kpit6*kspread +kpit8 = kpit7*kspread + +a1 oscil 1000, kpit1*kr1, iTable +a2 oscil 1000, kpit2*kr2, iTable +a3 oscil 1000, kpit3*kr3, iTable +a4 oscil 1000, kpit4*kr4, iTable +a5 oscil 1000, kpit5*kr1, iTable +a6 oscil 1000, kpit6*kr2, iTable +a7 oscil 1000, kpit7*kr3, iTable +a8 oscil 1000, kpit8*kr4, iTable + +aout = a1+a2+a3+a4+a5+a6+a7+a8 +xout aout +endop + +opcode synthGrain, a, aaiiii +aindex, atrans, ifreq, iphase itable, itabdur xin +apha phasor ifreq, iphase +aenv tab apha, 42, 1 +atrig = int(1-aenv) +apos samphold aindex, atrig +adur samphold atrans, atrig + +aline = apha * adur * sr + apos +aline limit aline, 0 , itabdur +ag tablei aline, itable, 0 +aout = ag * aenv + +xout aout +endop + + +opcode ControlMatrice, i, iikkkk +iTable, iIndex, kc1, kc2, kc3, kc4 xin + +iSomme table iIndex, iTable+3 + +if iSomme == 0 then +goto noparams +endif + +iPar table iIndex, iTable + +if iSomme == 1 then +kp = iPar +elseif iSomme == 3 then +kp = iPar * kc1 +elseif iSomme == 5 then +kp = iPar * kc2 +elseif iSomme == 7 then +kp = iPar * ((kc1 + kc2)*.5) +elseif iSomme == 9 then +kp = iPar * kc3 +elseif iSomme == 11 then +kp = iPar * ((kc1 + kc3)*.5) +elseif iSomme == 13 then +kp = iPar * ((kc2 + kc3)*.5) +elseif iSomme == 15 then +kp = iPar * ((kc1 + kc2 + kc3)*.33) +elseif iSomme == 17 then +kp = iPar * kc4 +elseif iSomme == 19 then +kp = iPar * ((kc1 + kc4)*.5) +elseif iSomme == 21 then +kp = iPar * ((kc2 + kc4)*.5) +elseif iSomme == 23 then +kp = iPar * ((kc1 + kc2 + kc4)*.33) +elseif iSomme == 25 then +kp = iPar * ((kc3 + kc4)*.5) +elseif iSomme == 27 then +kp = iPar * ((kc1 + kc3 + kc4)*.5) +elseif iSomme == 29 then +kp = iPar * ((kc2 + kc3 + kc4)*.33) +elseif iSomme == 31 then +kp = iPar * ((kc1 + kc2 + kc3 + kc4)*.25) +endif + +if iTable == 5201 then +zkw kp, iIndex+1 +elseif iTable == 5202 then +zkw kp, iIndex+17 +endif + +xout iIndex + +noparams: +endop + +opcode SourceMatrice, i, iaaaa +iIndex, as1, as2, as3, as4 xin + +iSomme table iIndex-1, 5206 + +if iSomme == 0 then +goto noparams +endif + +if iSomme == 1 then +as = as1 +elseif iSomme == 2 then +as = as2 +elseif iSomme == 3 then +as = as1 + as2 +elseif iSomme == 4 then +as = as3 +elseif iSomme == 5 then +as = as1 + as3 +elseif iSomme == 6 then +as = as2 + as3 +elseif iSomme == 7 then +as = as1 + as2 + as3 +elseif iSomme == 8 then +as = as4 +elseif iSomme == 9 then +as = as1 + as4 +elseif iSomme == 10 then +as = as2 + as4 +elseif iSomme == 11 then +as = as1 + as2 + as4 +elseif iSomme == 12 then +as = as3 + as4 +elseif iSomme == 13 then +as = as1 + as3 + as4 +elseif iSomme == 14 then +as = as2 + as3 + as4 +elseif iSomme == 15 then +as = as1 + as2 + as3 + as4 +endif + +zaw as, iIndex +xout iIndex + +noparams: +endop + +opcode FxMatrice, i, iaaaa +iIndex, as1, as2, as3, as4 xin + +iSomme table iIndex-1, 5206 + +if iSomme == 0 then +goto noparams +endif + +if iSomme == 1 then +as = as1 +elseif iSomme == 2 then +as = as2 +elseif iSomme == 3 then +as = as1 + as2 +elseif iSomme == 4 then +as = as3 +elseif iSomme == 5 then +as = as1 + as3 +elseif iSomme == 6 then +as = as2 + as3 +elseif iSomme == 7 then +as = as1 + as2 + as3 +elseif iSomme == 8 then +as = as4 +elseif iSomme == 9 then +as = as1 + as4 +elseif iSomme == 10 then +as = as2 + as4 +elseif iSomme == 11 then +as = as1 + as2 + as4 +elseif iSomme == 12 then +as = as3 + as4 +elseif iSomme == 13 then +as = as1 + as3 + as4 +elseif iSomme == 14 then +as = as2 + as3 + as4 +endif + +zaw as, iIndex +xout iIndex + +noparams: +endop + +opcode controller, k, ii +iControlNum, idur xin + +iControlType table iControlNum-1, 5203 + +if iControlType == 0 then +goto nocontrol +endif + +ioffset = (iControlNum-1)*4 +iPar1 table ioffset, 5200 +iPar2 table ioffset+1, 5200 +iPar3 table ioffset+2, 5200 +iPar4 table ioffset+3, 5200 + +if iControlType == 1 then + kControl lfo iPar1, iPar2, int(iPar3) + kControl = kControl+iPar4 +elseif iControlType == 2 then + irange = (iPar2-iPar1)*.5 + kControl randi irange, iPar3, iPar4-.001, 0, irange+iPar1 +elseif iControlType == 3 then + kControl adsr iPar1*idur+.0001, iPar2*idur, iPar3, iPar4*idur +elseif iControlType == 4 then + if iPar3 == 0 then + kControl1 = ((gkTrackpadX+1)*.5)*(iPar2-iPar1)+iPar1 + elseif iPar3 == 1 then + kval = (gkTrackpadX+1)*.5 + kControl1 pow kval, 2 + kControl1 = kControl1 * (iPar2-iPar1) + iPar1 + endif + if iPar4 == 0 then + kControl = kControl1 + else + ktrig oscil 1, 1/iPar4, 45 + kControl samphold kControl1, ktrig, i(kControl1), 0 + endif +elseif iControlType == 5 then + if iPar3 == 0 then + kControl1 = ((gkTrackpadY+1)*.5)*(iPar2-iPar1)+iPar1 + elseif iPar3 == 1 then + kval = (gkTrackpadY+1)*.5 + kControl1 pow kval, 2 + kControl1 = kControl1 * (iPar2-iPar1) + iPar1 + endif + if iPar4 == 0 then + kControl = kControl1 + else + ktrig oscil 1, 1/iPar4, 45 + kControl samphold kControl1, ktrig, i(kControl1), 0 + endif +endif + +xout kControl + +nocontrol: +endop + +opcode source, a, ii +iSourceNum, ipitch xin + +iSourceType table iSourceNum+3, 5203 + +if iSourceType == 0 then +goto nosource +endif + +ioffset = (iSourceNum-1)*4 +kpara1 zkr ioffset+1 +kpara2 zkr ioffset+2 +kpara3 zkr ioffset+3 +kpara4 zkr ioffset+4 + +iPar1 table ioffset, 5201 +iPar2 table ioffset+1, 5201 +iPar3 table ioffset+2, 5201 +iPar4 table ioffset+3, 5201 + +if iSourceType == 1 then + aSource foscil 2000*kpara4, ipitch, kpara1, kpara2, kpara3, 1 +elseif iSourceType == 2 then + aSource gbuzz 5000*kpara4, ipitch*kpara1, int(abs(kpara2))+5, 0, kpara3+0.01, 2 +elseif iSourceType == 3 then + iPar2 = int(iPar2) + if iPar2 == 0 then + imode = 0 + elseif iPar2 == 1 then + imode = 10 + elseif iPar2 == 2 then + imode = 12 + endif + aSource vco2 2000*kpara4, ipitch*kpara1, imode, 0.1, 0, iPar3 +elseif iSourceType == 4 then + if iPar3 == 0 then + kvib = 0 + goto novib + else + kvibenv linseg 0, .3, 1, p3-.3, 1 + kvib oscil ipitch*.015, kpara3, 1 + endif + novib: + aSource pluck 5000*kpara4, ipitch*(abs(kpara1))+.001+kvib, 40, 0, 6 + aSource butterlp aSource, kpara2 +elseif iSourceType == 5 then + if int(iPar1) == 0 then + ar rand 5000*kpara4 + elseif int(iPar1) == 1 then + ar pinkish 5000*kpara4 + elseif int(iPar1) == 2 then + ar gauss 5000*kpara4 + endif + knoisebandwith limit abs(kpara3), 1, sr/2 + aSource butterbp ar, kpara2, knoisebandwith + aSource balance aSource, ar +elseif iSourceType == 6 then + iSndpitch = p4/261.626 + iLoopIndex = iPar2 * 3 + ils table iLoopIndex, 5755 + ile table iLoopIndex+1, 5755 + icd table iLoopIndex+2, 5755 + if ile == 0 then + ile = nsamp(5000+iPar2) * giScale - .01 + endif + if icd == 0 then + icd = .01 + endif + aSource flooper2 kpara4*.4, iSndpitch*abs(kpara1), ils, ile, icd, 5000+iPar2 + aSource butterlp aSource, abs(kpara3) +elseif iSourceType == 7 then + kvoy = int(kpara2*3) + kform1 table kvoy, 4 + kform2 table kvoy+1, 4 + kform3 table kvoy+2, 4 + kform1 port kform1, .1, 500 + kform2 port kform2, .1, 1500 + kform3 port kform3, .1, 2500 + kvibadev randomi -.0852, .0152, .5 + kvibfdev randomi -.032, .032, .5 + kvibfreqrand randomi kpara3-.75, kpara3+.75, .2 + kvibfatt linseg 0, .3, 1, p3-.3, 1 + kvib oscili (1+kvibadev)*kvibfatt, (kvibfreqrand+kvibfdev), 1 + kharm randomi 40, 50, 1.34 + kmul randomi .80, .84, 1.45 + kbam randomi 480., 510., 2.07 + kfunddev randomi -.0053, .0052, 1.05 + ar gbuzz kbam, (p4*kpara1*(1+kfunddev)+kvib), int(kharm), 0, kmul, 2 + a1 resonx ar, kform1, 140, 2, 1 + a2 resonx ar, kform2, 180, 2, 1 + a3 resonx ar, kform3, 220, 2 , 1 + aSource = ((a1*80)+(a2*55)+(a3*40))*kpara4 +elseif iSourceType == 8 then + iSndPitch = p4/261.626 + igrdur = .1 + itable = 5000+iPar2 + irealTable = 5500 + iSourceNum + itabdur = nsamp(itable) + ifreq = 1 / igrdur + kamp = kpara4 * .2 + aindex upsamp abs(kpara3) * itabdur + atrans upsamp kpara1 * igrdur * iSndPitch + + as1 synthGrain aindex, atrans, ifreq, 0.82, irealTable, itabdur + as2 synthGrain aindex, atrans, ifreq, .58, irealTable, itabdur + as3 synthGrain aindex, atrans, ifreq, .41, irealTable, itabdur + as4 synthGrain aindex, atrans, ifreq, 0.19, irealTable, itabdur + as5 synthGrain aindex, atrans, ifreq, 0, irealTable, itabdur + aSource = (as1+as2+as3+as4+as5)*kamp + aSource butterlp aSource, 7500 +elseif iSourceType == 9 then + aSource homeSine p4*kpara1, kpara2*0.1, iPar3+30 + aSource = aSource*kpara4 +elseif iSourceType == 10 then + Sname sprintf "/labmic%d", iPar2 + Sfullname strcat gSpath, Sname + iSndpitch = p4/261.626 + aSource diskin Sfullname, iSndpitch*abs(kpara3), 0, 1 + aSource = aSource * kpara4 +endif + +aSource dcblock aSource +xout aSource + +nosource: +endop + +opcode effects, a, ii +iFxNum, ipitch xin + +iFxType table iFxNum+7, 5203 + +if iFxType == 0 then +goto nofx +endif + +as1 zar iFxNum +as2 zar iFxNum+4 +as = as1+as2 + +ioffset = (iFxNum+3)*4 +kpara1 zkr ioffset+1 +kpara2 zkr ioffset+2 +kpara3 zkr ioffset+3 +kpara4 zkr ioffset+4 + +ioffset2 = (iFxNum-1)*4 +iPar1 table ioffset2, 5202 +iPar2 table ioffset2+1, 5202 +iPar3 table ioffset2+2, 5202 +iPar4 table ioffset2+3, 5202 + +if iFxType == 1 then + kwgfeed limit kpara3, 0, 1 + aFx wguide1 as, abs(kpara1)+1, kpara2, kwgfeed + aFx = aFx*kpara4 +elseif iFxType == 2 then + aFx lpf18 as*.0005, abs(kpara1)+20, kpara2, kpara3 + aFx = aFx*5000*kpara4 +elseif iFxType == 3 then + aFx bqrez as*kpara4, abs(kpara1)+20, abs(kpara2)+1, int(iPar3) + aFx balance aFx, as*kpara4 +elseif iFxType == 4 then + amod lfo 1, kpara1, int(iPar3) + aFx = ((as*amod*kpara2)+(as*(1-kpara2)))*kpara4 +elseif iFxType == 5 then + ain = as*kpara4 + krevLength limit kpara1, 0.01, 10 + arev reverb ain, krevLength + arev butterlp arev, kpara2 + aFx = (arev*kpara3)+(as*(1-kpara3)) +elseif iFxType == 6 then + fsig pvsanal as, 1024, 256, 1024, 1 + ftps1 pvscale fsig, kpara1 + aFx pvsynth ftps1 + adry delay as, iPar2 + aFx = ((aFx*kpara3)+(adry*(1-kpara3)))*kpara4 +elseif iFxType == 7 then + aeq1 butterbp as, 700, 400 + aeq2 butterbp as, 1500, 600 + aeq3 butterbp as, 3000, 1000 + aeq4 butterbp as, 5000, 2000 + aFx = (aeq1*kpara1)+(aeq2*kpara2)+(aeq3*kpara3)+(aeq4*kpara4) +elseif iFxType == 8 then + afeed init 0 + adel oscil kpara1, kpara2, 1 + adel = adel + kpara1 + kpara3 + adel limit adel, 0, 50 + aFx vdelay as+afeed, adel, 50 + afeed = aFx * kpara4 +endif + +xout aFx + +nofx: +endop + + +/**************************************************************** +Reverb + master out +*****************************************************************/ +instr 200 + +gktime timek + +kTrackpadX chnget "trackpadX" +gkTrackpadX = kTrackpadX / 600. +gkTrackpadX limit gkTrackpadX, -1, 1 + +kTrackpadY chnget "trackpadY" +gkTrackpadY = kTrackpadY / 450. +gkTrackpadY limit -gkTrackpadY, -1, 1 + +koutGain chnget "masterVolume" +koutGain = koutGain * 0.02 +gkduck init 1 +gkduck port gkduck, .03, 1. + +ain dcblock gainrev*0.05 +arev reverb ain, 2.5 +arev butterlp arev, 5000 + +aLeft butterlp gaoutL, 7500 +aRight butterlp gaoutR, 7500 + +aLeft eqfil aLeft, 4000, 1000, 0.125 +aRight eqfil aRight, 4000, 1000, 0.125 + +;aLeft butterhp aLeft, 150 +;aRight butterhp aRight, 150 + +aOutLeft dcblock (arev + aLeft) * koutGain * gkduck +aOutRight dcblock (arev + aRight) * koutGain * gkduck +gaRecL = aOutLeft +gaRecR = aOutRight + outs aOutLeft, aOutRight + + gaoutL = 0 + gaoutR = 0 + gainrev = 0 + +endin + +/**************************************************************** +ducking +****************************************************************/ +instr 5600 +gkduck linseg 1., 0.005, 0.05, 3.9, 0.05, 0.095, 1 +endin + +/**************************************************************** +Performance recording start +*****************************************************************/ +instr 5400 +Sname strget p4 +ihandle fiopen Sname, 2 +fout Sname, 2, gaRecL, gaRecR +clear gaRecL, gaRecR +endin + +/**************************************************************** +Performance recording stop ( closing file ) +*****************************************************************/ +instr 5401 +Sname strget p4 +turnoff2 5400, 8, 0 +ficlose Sname +endin + +/**************************************************************** +Handler audio input recording +****************************************************************/ +instr 5201 + +ktim timeinsts + +gkduck = .05 +itab = p4 +ain inch 1 +krms rms ain +ktrig trigger krms, 1500, 0 + +if ktrig == 1 then +event "i", 5202, 0 , 1, itab +turnoff +endif + +ithresh = p3 - 1 + +if ktim > ithresh then +gkduck linseg .05, .8, .05, .2, 1 +endif + +endin + +/**************************************************************** +Audio input recording +****************************************************************/ +instr 5202 +kenv adsr 0.005, 0.05, .9, 0.01 +gkduck linseg .05, .8, .05, .2, 1 +ain inch 1 + +adel delay ain, .01 + +Sname sprintf "/home/olpc/.sugar/default/tamtam/snds/mic%d", int(p4)-6 +ihandle fiopen Sname, 2 +event "i", 5212, 1 , .01, p4 + +fout Sname, 2, adel*kenv +adel = 0 +endin + +/**************************************************************** +Audio input recording ( closing file ) +****************************************************************/ +instr 5212 +Sname sprintf "/home/olpc/.sugar/default/tamtam/snds/mic%d", int(p4)-6 +ficlose Sname +endin + +/**************************************************************** +SynthLab mic recording +****************************************************************/ +instr 6000 +ain inch 1 +aindex phasor 1/p3 +tablew ain, aindex, 6000+p4, 1 +endin + +/**************************************************************** +SynthLab input recording +****************************************************************/ +instr 5204 + +Sname sprintf "/lab%d", int(p4)-85 +Sfile strcat gSpath, Sname +fout Sfile, 2, gasynth +clear gasynth +endin + +/************************ +TamTam's SynthLab instrument +************************/ +instr 5203 + +gSpath strget p10 + +if p5 != 0 then +event_i "i", 5204, 0, p3, p5 +endif + +aSource1 init 0 +aSource2 init 0 +aSource3 init 0 +aSource4 init 0 +aFx1 init 0 +aFx2 init 0 +aFx3 init 0 +aFx4 init 0 +aout init 0 + +ipitch = p4 + +kc1 controller 1,p3 +kc2 controller 2,p3 +kc3 controller 3,p3 +kc4 controller 4,p3 + +is1p1 ControlMatrice 5201, 0, kc1, kc2, kc3, kc4 +is1p2 ControlMatrice 5201, 1, kc1, kc2, kc3, kc4 +is1p3 ControlMatrice 5201, 2, kc1, kc2, kc3, kc4 +is1p4 ControlMatrice 5201, 3, kc1, kc2, kc3, kc4 +is2p1 ControlMatrice 5201, 4, kc1, kc2, kc3, kc4 +is2p2 ControlMatrice 5201, 5, kc1, kc2, kc3, kc4 +is2p3 ControlMatrice 5201, 6, kc1, kc2, kc3, kc4 +is2p4 ControlMatrice 5201, 7, kc1, kc2, kc3, kc4 +is3p1 ControlMatrice 5201, 8, kc1, kc2, kc3, kc4 +is3p2 ControlMatrice 5201, 9, kc1, kc2, kc3, kc4 +is3p3 ControlMatrice 5201, 10, kc1, kc2, kc3, kc4 +is3p4 ControlMatrice 5201, 11, kc1, kc2, kc3, kc4 +is4p1 ControlMatrice 5201, 12, kc1, kc2, kc3, kc4 +is4p2 ControlMatrice 5201, 13, kc1, kc2, kc3, kc4 +is4p3 ControlMatrice 5201, 14, kc1, kc2, kc3, kc4 +is4p4 ControlMatrice 5201, 15, kc1, kc2, kc3, kc4 + +aSource1 source 1, ipitch*2 +aSource2 source 2, ipitch*2 +aSource3 source 3, ipitch*2 +aSource4 source 4, ipitch*2 + +ifx1p1 ControlMatrice 5202, 0, kc1, kc2, kc3, kc4 +ifx1p2 ControlMatrice 5202, 1, kc1, kc2, kc3, kc4 +ifx1p3 ControlMatrice 5202, 2, kc1, kc2, kc3, kc4 +ifx1p4 ControlMatrice 5202, 3, kc1, kc2, kc3, kc4 +ifx2p1 ControlMatrice 5202, 4, kc1, kc2, kc3, kc4 +ifx2p2 ControlMatrice 5202, 5, kc1, kc2, kc3, kc4 +ifx2p3 ControlMatrice 5202, 6, kc1, kc2, kc3, kc4 +ifx2p4 ControlMatrice 5202, 7, kc1, kc2, kc3, kc4 +ifx3p1 ControlMatrice 5202, 8, kc1, kc2, kc3, kc4 +ifx3p2 ControlMatrice 5202, 9, kc1, kc2, kc3, kc4 +ifx3p3 ControlMatrice 5202, 10, kc1, kc2, kc3, kc4 +ifx3p4 ControlMatrice 5202, 11, kc1, kc2, kc3, kc4 +ifx4p1 ControlMatrice 5202, 12, kc1, kc2, kc3, kc4 +ifx4p2 ControlMatrice 5202, 13, kc1, kc2, kc3, kc4 +ifx4p3 ControlMatrice 5202, 14, kc1, kc2, kc3, kc4 +ifx4p4 ControlMatrice 5202, 15, kc1, kc2, kc3, kc4 + +ifx1in SourceMatrice 1, aSource1, aSource2, aSource3, aSource4 +ifx2in SourceMatrice 2, aSource1, aSource2, aSource3, aSource4 +ifx3in SourceMatrice 3, aSource1, aSource2, aSource3, aSource4 +ifx4in SourceMatrice 4, aSource1, aSource2, aSource3, aSource4 + +ifx1in1 FxMatrice 5, aFx1, aFx2, aFx3, aFx4 +ifx2in1 FxMatrice 6, aFx1, aFx2, aFx3, aFx4 +ifx3in1 FxMatrice 7, aFx1, aFx2, aFx3, aFx4 +ifx4in1 FxMatrice 8, aFx1, aFx2, aFx3, aFx4 + +aFx1 effects 1, ipitch +aFx2 effects 2, ipitch +aFx3 effects 3, ipitch +aFx4 effects 4, ipitch + +iSourceOut1 table 8, 5206 +iSourceOut2 table 9, 5206 +iSourceOut3 table 10, 5206 +iSourceOut4 table 11, 5206 +iFxOut1 table 12, 5206 +iFxOut2 table 13, 5206 +iFxOut3 table 14, 5206 +iFxOut4 table 15, 5206 + +aout = (aSource1*iSourceOut1)+(aSource2*iSourceOut2)+(aSource3*iSourceOut3)+(aSource4*iSourceOut4)+(aFx1*iFxOut1)+(aFx2*iFxOut2)+(aFx3*iFxOut3)+(aFx4*iFxOut4) + +kenv adsr p3*p6+0.001, p3*p7, p8, p3*p9 +aout = aout*kenv + +vincr gasynth, aout + + outs aout*.707, aout*.707 + +zacl 0, 8 + +endin + +/*********************** +DELETE RESOURCES +************************/ + +instr 5000 + +icount init 0 + +again: +ftfree 5000+icount, 0 +icount = icount+1 + +if icount < p4 goto again + +turnoff + +endin + +/************************* +Loop points editor +*************************/ +instr 5022 + +kstart chnget "lstart" +kend chnget "lend" +kdur chnget "ldur" +kvol chnget "lvol" + +idurfadein init 0.005 +idurfadeout init 0.095 +iampe0 init 1 +iampe1 init 1 +iampe2 init 1 + +itie tival +if itie == 1 igoto nofadein + +iampe0 init 0 +iskip = 1 + +nofadein: +iskip = 0 +igliss = 0.005 + +if p3 < 0 igoto nofadeout + +iampe2 init 0 + +nofadeout: + +idelta = idurfadein+idurfadeout +if idelta > abs(p3) then +idelta = abs(p3) +endif + +iampe0 = iampe0 +iampe2 = iampe2 +kenv linseg iampe0, idurfadein, iampe1, abs(p3)-idelta, iampe1, idurfadeout, iampe2 + + +ivibRand random 4.1, 5.7 + +kvibrato oscil .006, ivibRand, 1 + + tigoto tieskip + +a1 flooper2 0.5, 1+kvibrato, kstart, kend, kdur, 4999, 0, 0, 0, iskip + +a1 = a1*kenv*kvol + +gaoutL = a1*0.5+gaoutL +gaoutR = a1*0.5+gaoutR + +gainrev = a1*0.05+gainrev + + tieskip: +endin + +/************************* +Loop points editor, simple player +*************************/ +instr 5023 + +kvol chnget "lvol" + +p3 = nsamp(4999) * giScale + +a1 loscil 0.5, 1, 4999, 1 + +kenv adsr 0.005, 0.05, .8, 0.1 + +a1 = a1*kenv*kvol + +gaoutL = a1*0.5+gaoutL +gaoutR = a1*0.5+gaoutR + +gainrev = a1*0.05+gainrev + +endin + +/**************************************************************** +Soundfile player with miniTamTam's tied notes +****************************************************************/ +/************************* +pitch, reverbGain, amp, pan, table, att, dec, filtType, cutoff, loopstart, loopend, crossdur +*************************/ +instr 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010 + +idump = p16 +idump2 = p17 +idump3 = p18 +idump4 = p19 + +iTrackId = int(p1-5001) +SvolTrackName sprintf "trackVolume%0d", iTrackId +kvol chnget SvolTrackName +kvol = kvol * 0.01 +kvol port kvol, .01, i(kvol) + +idurfadein init 0.005 +idurfadeout init 0.095 +iampe0 init 1 +iampe1 = p6 +iampe2 init 1 + +itie tival +if itie == 1 igoto nofadein + +idurfadein init p9 +iampe0 init 0 +iskip = 1 +kpitch init p4 +kamp init p6 +kpan init p7 +krg init p5 + +nofadein: +iskip = 0 +igliss = 0.005 + +if p3 < 0 igoto nofadeout + +idurfadeout init p10 +iampe2 init 0 + +nofadeout: + +idelta = idurfadein+idurfadeout +if idelta > abs(p3) then +idelta = abs(p3) +endif + +iampe0 = iampe0 * p6 +iampe2 = iampe2 * p6 +kenv linseg iampe0, idurfadein, iampe1, abs(p3)-idelta, iampe1, idurfadeout, iampe2 + +kpitchBend port gkTrackpadX, .03, i(gkTrackpadX) +kpitchBend pow kpitchBend + 1, 5 +kampBend port gkTrackpadY, .03, i(gkTrackpadY) +kampBend pow kampBend + 1, 5 + +ivibRand random 4.1, 5.7 + +kvibrato oscil .006*kampBend, ivibRand*kpitchBend, 1 + + tigoto tieskip + +kpitch portk p4, igliss, p4 +kpan portk p7, igliss, p7 +krg portk p5, igliss, p5 +kcutoff portk p12, igliss, p12 +kls portk p13, igliss, p13 +kle portk p14, igliss, p14 +kcd portk p15, igliss, p15 + +a1 flooper2 1, kpitch+kvibrato, kls, kle, kcd, p8, 0, 0, 0, iskip + +if (p11-1) != -1 then +acomp = a1 +a1 bqrez a1, kcutoff, 6, p11-1 +a1 balance a1, acomp +endif + +if kpitch < 1 then +kalias = giAliasSr*kpitch +else +kalias = giAliasSr +endif + +a1 tone a1, kalias + +a1 = a1*kenv*kvol + +gaoutL = a1*(1-kpan)+gaoutL +gaoutR = a1*kpan+gaoutR + +gainrev = a1*krg+gainrev + + tieskip: +endin + + +/************************* +Soundfile player with edit's looped notes +*************************/ +instr 5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110 + +if p16 != -1 then + inum = frac(p16) * 10000 + itable2 = int(p16) + event_i "i", inum, 0, p3, p4, p5, p6, p7, itable2, p9, p10, p11, p12, p17, p18, p19, -1 +endif + +ipitch random p4*.995, p4*1.005 + +iTrackId = int(p1-5101) +SvolTrackName2 sprintf "trackVolume%0d", iTrackId +kvol chnget SvolTrackName2 +kvol = kvol * 0.01 +kvol port kvol, .01, 0 ;i(kvol) + +ivibRand random 4.1, 5.7 + +kvibrato oscil .006, ivibRand, 1 + +a1 flooper2 1, ipitch+kvibrato, p13, p14, p15, p8, 0, 0, 0 + +if (p11-1) != -1 then +acomp = a1 +a1 bqrez a1, p12, 6, p11-1 +a1 balance a1, acomp +endif + +;if p4 < 1 then +;ialias = giAliasSr*p4 +;else +;ialias = giAliasSr +;endif + +;a1 tone a1, ialias + +aenv adsr p9, 0.005, p6, p10 +a1 = a1*aenv*kvol + +gaoutL = a1*(1-p7)+gaoutL +gaoutR = a1*p7+gaoutR + +gainrev = a1*p5+gainrev + +endin + +/************************************************************** +Simple soundfile player (miniTamTam) +**************************************************************/ + +instr 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020 + +idump = p16 +idump2 = p17 +idump3 = p18 +idump4 = p19 + +iTrackId = int(p1-5011) +SvolTrackName3 sprintf "trackVolume%0d", iTrackId +kvol chnget SvolTrackName3 +kvol = kvol * 0.01 +kvol port kvol, .01 + +p3 = nsamp(p8) * giScale / p4 + +a1 loscil p6, p4, p8, 1 + +if (p11-1) != -1 then +acomp = a1 +a1 bqrez a1, p12, 6, p11-1 +a1 balance a1, acomp +endif + +if p4 < 1 then +ialias = giAliasSr*p4 +else +ialias = giAliasSr +endif + +a1 tone a1, ialias + +kenv adsr p9, 0.05, .8, p10 +a1 = a1*kenv*kvol + +gaoutL = a1*(1-p7)+gaoutL +gaoutR = a1*p7+gaoutR + +gainrev = a1*p5+gainrev + +endin + +/************************************************************** +Simple soundfile player (Edit) +**************************************************************/ + +instr 5111, 5112, 5113, 5114, 5115, 5116, 5117, 5118, 5119, 5120 + +if p16 != -1 then + inum = frac(p16) * 10000 + itable2 = int(p16) + event_i "i", inum, 0, p3, p4, p5, p6, p7, itable2, p9, p10, p11, p12, p17, p18, p19, -1 +endif + +iTrackId = int(p1-5111) +SvolTrackName4 sprintf "trackVolume%0d", iTrackId +kvol chnget SvolTrackName4 +kvol = kvol * 0.01 +kvol port kvol, .01 + +a1 loscil p6, p4, p8, 1 + +if (p11-1) != -1 then +acomp = a1 +a1 bqrez a1, p12, 6, p11-1 +a1 balance a1, acomp +endif + +;if p4 < 1 then +;ialias = giAliasSr*p4 +;else +;ialias = giAliasSr +;endif + +;a1 tone a1, ialias + +kenv adsr p9, 0.05, .8, p10 + +a1 = a1*kenv*kvol + +gaoutL = a1*(1-p7)+gaoutL +gaoutR = a1*p7+gaoutR + +gainrev = a1*p5+gainrev + +endin + + + +/******************************************************************** +soundfile player for percussion - resonance notes +********************************************************************/ +instr 5021 + +a1 flooper2 1, p4, .25, .750, .2, p8 + +if (p11-1) != -1 then +acomp = a1 +a1 bqrez a1, p12, 6, p11-1 +a1 balance a1, acomp +endif + +kenv expseg 0.001, .003, .6, p3 - .003, 0.001 +klocalenv adsr p8, 0.05, .8, p10 + +a1 = a1*kenv*klocalenv + +gaoutL = a1*(1-p7)+gaoutL +gaoutR = a1*p7+gaoutR + +gainrev = a1*p5+gainrev + +endin + +</CsInstruments> +<CsScore> +f1 0 8192 10 1 +f2 0 8192 11 1 1 + +f4 0 32 -2 250 2250 2980 420 2050 2630 590 1770 2580 + 750 1450 2590 290 750 2300 360 770 2530 520 900 2510 710 1230 2700 570 1560 2560 0 0 0 0 0 +f30 0 1024 10 1 0 .3 0 .1 +f31 0 1024 10 1 .5 .3 .25 .1 +f32 0 1024 10 1 0 .1 0 .3 .2 0 0 .1 +f33 0 1024 10 1 0 0 0 .1 0 0 .2 .1 0 0 .1 +f34 0 1024 10 1 .6 0 0 .4 .2 .1 0 0 .1 +f35 0 1024 10 1 .5 .3 0 .1 0 0 0 .1 .1 +f36 0 1024 10 1 0 .6 .4 .1 0 0 .2 .1 0 0 .1 +f37 0 1024 10 1 0 0 0 .1 .2 .1 0 0 0 .1 0 0 .1 +f38 0 1024 10 1 .4 .3 0 .1 .2 .1 .1 .1 0 0 0 0 .1 .05 +f39 0 1024 10 1 0 .5 0 0 .3 0 0 .2 0 .1 0 0 0 0 .2 0 0 0 .05 0 0 0 0 .03 ; ADDITIVE SYNTHESIS WAVE +f41 0 8193 19 .5 .5 270 .5 ; SIGMOID FUNCTION +f42 0 8192 -20 2 1 +f44 0 8192 5 1 8192 0.001 ; EXPONENTIAL FUNCTION +f45 0 512 7 0 500 0 2 1 10 1 +f5150 0 32768 7 0 32768 0 +f6001 0 131072 7 0 131072 0 +f6002 0 131072 7 0 131072 0 +f6003 0 131072 7 0 131072 0 +f6004 0 131072 7 0 131072 0 +i200 0 600000 +</CsScore> +</CsoundSynthesizer> diff --git a/ttcommon/Util/CSoundClient.py b/ttcommon/Util/CSoundClient.py new file mode 100644 index 0000000..1035655 --- /dev/null +++ b/ttcommon/Util/CSoundClient.py @@ -0,0 +1,412 @@ +import os +import socket +import select +import sys +import threading +import time +import array +from math import sqrt + +from ttcommon.Util.Clooper import * +import ttcommon.Config as Config + +from ttcommon.Generation.GenerationConstants import GenerationConstants +from ttcommon.Util import NoteDB +import ttcommon.Util.InstrumentDB as InstrumentDB + +loadedInstruments = [] + +_note_template = array.array('f', [0] * 19) + + +def _new_note_array(): + return _note_template.__copy__() + +def _noteid(dbnote): + return (dbnote.page << 16) + dbnote.id + +_loop_default=0 + + +class _CSoundClientPlugin: + + #array index constants for csound + (INSTR_TRACK, \ + ONSET, \ + DURATION, \ + PITCH, + REVERBSEND, \ + AMPLITUDE, \ + PAN, \ + INST_ID, \ + ATTACK, \ + DECAY, \ + FILTERTYPE, \ + FILTERCUTOFF, \ + INSTRUMENT2 ) = range(13) + + def __init__(self): + sc_initialize( Config.PLUGIN_UNIVORC, Config.PLUGIN_DEBUG, + Config.PLUGIN_VERBOSE, Config.PLUGIN_RATE) + self.on = False + #self.masterVolume = 100.0 + self.periods_per_buffer = 2 + global _loop_default + _loop_default = self.loopCreate() + self.instrumentDB = InstrumentDB.getRef() + + self.jamesSux = {} # temporyary dictionary of loopId: loopNumTicks, while I wait for james to implement it properly + + def __del__(self): + self.connect(False) + sc_destroy() + + def setChannel(self, name, val): + sc_setChannel(name, val) + + def setMasterVolume(self, volume): + sc_setChannel('masterVolume', volume) + + def setTrackVolume(self, volume, trackId): + sc_setChannel('trackVolume' + str(trackId + 1), volume) + + def setTrackpadX(self, value): + sc_setChannel('trackpadX', value) + + def setTrackpadY(self, value): + sc_setChannel('trackpadY', value) + + def micRecording(self, table): + sc_inputMessage(Config.CSOUND_MIC_RECORD % table) + + def load_mic_instrument(self, inst): + fileName = Config.DATA_DIR + '/' + inst + instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[inst].instrumentId + sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName)) + + def load_synth_instrument(self, inst): + fileName = Config.DATA_DIR + '/' + inst + instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[inst].instrumentId + sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName)) + + def load_ls_instrument(self, inst): + fileName = Config.DATA_DIR + '/' + inst + sc_inputMessage(Config.CSOUND_LOAD_LS_INSTRUMENT % fileName) + + def load_instruments(self): + for instrumentSoundFile in self.instrumentDB.instNamed.keys(): + if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab' or self.instrumentDB.instNamed[instrumentSoundFile].category == 'mysounds': + fileName = Config.DATA_DIR + '/' + instrumentSoundFile + else: + fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile + instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ instrumentSoundFile ].instrumentId + sc_inputMessage( Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName) ) + + def load_instrument(self, inst): + if not inst in loadedInstruments: + if inst[0:3] == 'mic' or inst[0:3] == 'lab' or self.instrumentDB.instNamed[inst].category == 'mysounds': + if os.path.isfile(os.path.join(Config.DATA_DIR, inst)): + fileName = os.path.join(Config.DATA_DIR, inst) + else: + fileName = os.path.join(Config.SOUNDS_DIR, 'armbone') + else: + fileName = os.path.join(Config.SOUNDS_DIR, inst) + instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ inst ].instrumentId + sc_inputMessage( Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName) ) + loadedInstruments.append(inst) + + def load_drumkit(self, kit): + if not kit in loadedInstruments: + for i in self.instrumentDB.instNamed[kit].kit.values(): + fileName = Config.SOUNDS_DIR + "/" + i + instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ i ].instrumentId + sc_inputMessage( Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName) ) + loadedInstruments.append(i) + loadedInstruments.append(kit) + + def connect(self, init=True): + def reconnect(): + if sc_start(self.periods_per_buffer) : + if (Config.DEBUG > 0) : print 'ERROR connecting' + else: + self.on = True + def disconnect(): + if sc_stop() : + if (Config.DEBUG > 0) : print 'ERROR connecting' + else: + self.on = False + + if init and not self.on : + reconnect() + if not init and self.on : + disconnect() + + def destroy(self): + self.connect(False) + sc_destroy() + + def inputMessage(self,msg): + sc_inputMessage(msg) + + def getTick(self): + return sc_getTickf() + + def adjustTick(self, amt): + sc_adjustTick(amt) + + def setTempo(self,t): + if (Config.DEBUG > 3) : print 'INFO: loop tempo: %f -> %f' % (t, 60.0 / (Config.TICKS_PER_BEAT * t)) + sc_setTickDuration(60.0 / (Config.TICKS_PER_BEAT * t)) + + + def loopCreate(self): + return sc_loop_new() + + def loopDestroy(self, loopId): + sc_loop_delete(loopId) + try: + del self.jamesSux[ loopId ] + except: + pass + + def loopClear(self): + global _loop_default + sc_loop_delete(_loop_default) + _loop_default = sc_loop_new() + try: + del self.jamesSux[ loopId ] + except: + pass + + + # this is function deletes an Event from a loop + # TODO: rename this function + def loopDelete(self, dbnote, loopId=_loop_default): + sc_loop_delScoreEvent( loopId, _noteid(dbnote)) + + def loopDelete1(self, page, id, loopId=_loop_default): + sc_loop_delScoreEvent( loopId, (page << 16) + id) + + def loopStart(self, loopId=_loop_default): + sc_loop_playing(loopId, 1) + + def loopPause(self, loopId=_loop_default): + sc_loop_playing(loopId, 0) + + def loopSetTick(self,t, loopId=_loop_default): + sc_loop_setTickf(loopId, t) + + def loopGetTick(self, loopId=_loop_default): + return sc_loop_getTickf(loopId) + + def loopSetNumTicks(self,n, loopId=_loop_default): + sc_loop_setNumTicks(loopId, n) + self.jamesSux[loopId] = n + + def loopGetNumTicks( self, loopId = _loop_default ): + return self.jamesSux[loopId] + + def loopSetTickDuration(self,d, loopId=_loop_default): + sc_loop_setTickDuration(loopId, d) + james + + def loopDeactivate(self, note = 'all', loopId=_loop_default): + if note == 'all': + sc_loop_deactivate_all(loopId) + else: + if (Config.DEBUG > 0) : print 'ERROR: deactivating a single note is not implemented' + + def loopUpdate(self, note, parameter, value,cmd, loopId=_loop_default): + page = note.page + track = note.track + id = note.id + if note.cs.mode == 'mini': + instrument_id_offset = 0 + elif note.cs.mode == 'edit': + if self.instrumentDB.instId[note.cs.instrumentId].kit != None: + instrument_id_offset = 0 + else: + instrument_id_offset = 100 + if (parameter == NoteDB.PARAMETER.ONSET): + if (Config.DEBUG > 2): print 'INFO: updating onset', (page<<16)+id, value + sc_loop_updateEvent( loopId, (page<<16)+id, 1, value, cmd) + elif (parameter == NoteDB.PARAMETER.PITCH): + if (Config.DEBUG > 2): print 'INFO: updating pitch', (page<<16)+id, value + pitch = value + if self.instrumentDB.instId[note.cs.instrumentId].kit != None: + instrument = self.instrumentDB.instNamed[ + self.instrumentDB.instId[note.cs.instrumentId].kit[pitch]] + csoundInstId = instrument.csoundInstrumentId + csoundTable = Config.INSTRUMENT_TABLE_OFFSET + instrument.instrumentId + if (Config.DEBUG > 2): print 'INFO: updating drum instrument (pitch)', (page<<16)+id, instrument.name, csoundInstId + sc_loop_updateEvent( loopId, (page<<16)+id, 0, (csoundInstId + instrument_id_offset) + note.track * 0.01, -1 ) + sc_loop_updateEvent( loopId, (page<<16)+id, 7, csoundTable , -1 ) + pitch = 1 + else: + pitch = GenerationConstants.TRANSPOSE[ pitch - 24 ] + sc_loop_updateEvent( loopId, (page<<16)+id, 3, pitch, cmd) + elif (parameter == NoteDB.PARAMETER.AMPLITUDE): + if (Config.DEBUG > 2): print 'INFO: updating amp', (page<<16)+id, value + sc_loop_updateEvent( loopId, (page<<16)+id, 5, value, cmd) + elif (parameter == NoteDB.PARAMETER.DURATION): + if (Config.DEBUG > 2): print 'INFO: updating duration', (page<<16)+id, value + sc_loop_updateEvent( loopId, (page<<16)+id, self.DURATION, value, cmd) + elif (parameter == NoteDB.PARAMETER.INSTRUMENT): + pitch = note.cs.pitch + instrument = self.instrumentDB.instId[value] + if instrument.kit != None: + instrument = self.instrumentDB.instNamed[instrument.kit[pitch]] + csoundInstId = instrument.csoundInstrumentId + csoundTable = Config.INSTRUMENT_TABLE_OFFSET + instrument.instrumentId + loopStart = instrument.loopStart + loopEnd = instrument.loopEnd + crossDur = instrument.crossDur + if (Config.DEBUG > 2): print 'INFO: updating instrument', (page<<16)+id, instrument.name, csoundInstId + sc_loop_updateEvent( loopId, (page<<16)+id, 0, (csoundInstId + (track+1) + instrument_id_offset) + note.track * 0.01, cmd ) + sc_loop_updateEvent( loopId, (page<<16)+id, 7, csoundTable, -1 ) + sc_loop_updateEvent( loopId, (page<<16)+id, 12, loopStart, -1 ) + sc_loop_updateEvent( loopId, (page<<16)+id, 13, loopEnd, -1 ) + sc_loop_updateEvent( loopId, (page<<16)+id, 14, crossDur , -1 ) + elif (parameter == NoteDB.PARAMETER.PAN): + sc_loop_updateEvent( loopId, (page<<16)+id, self.PAN, value, cmd) + elif (parameter == NoteDB.PARAMETER.REVERB): + sc_loop_updateEvent( loopId, (page<<16)+id, self.REVERBSEND, value, cmd) + elif (parameter == NoteDB.PARAMETER.ATTACK): + sc_loop_updateEvent( loopId, (page<<16)+id, self.ATTACK, value, cmd) + elif (parameter == NoteDB.PARAMETER.DECAY): + sc_loop_updateEvent( loopId, (page<<16)+id, self.DECAY, value, cmd) + elif (parameter == NoteDB.PARAMETER.FILTERTYPE): + sc_loop_updateEvent( loopId, (page<<16)+id, self.FILTERTYPE, value, cmd) + elif (parameter == NoteDB.PARAMETER.FILTERCUTOFF): + sc_loop_updateEvent( loopId, (page<<16)+id, self.FILTERCUTOFF, value, cmd) + elif (parameter == NoteDB.PARAMETER.INSTRUMENT2): + sc_loop_updateEvent( loopId, (page<<16)+id, self.INSTRUMENT2, value, cmd) + else: + if (Config.DEBUG > 0): print 'ERROR: loopUpdate(): unsupported parameter change' + + def loopPlay(self, dbnote, active, storage=_new_note_array(), + loopId=_loop_default ): + qid = (dbnote.page << 16) + dbnote.id + sc_loop_addScoreEvent( loopId, qid, 1, active, 'i', + self.csnote_to_array(dbnote.cs, storage)) + + def play(self, csnote, secs_per_tick, storage=_new_note_array()): + a = self.csnote_to_array(csnote, storage) + a[self.DURATION] = a[self.DURATION] * secs_per_tick + a[self.ATTACK] = max(a[self.ATTACK]*a[self.DURATION], 0.002) + a[self.DECAY] = max(a[self.DECAY]*a[self.DURATION], 0.002) + sc_scoreEvent('i', a) + + def csnote_to_array(self, csnote, storage): + return self._csnote_to_array1(storage, + csnote.onset, + csnote.pitch, + csnote.amplitude, + csnote.pan, + csnote.duration, + csnote.trackId, + csnote.attack, + csnote.decay, + csnote.reverbSend, + csnote.filterType, + csnote.filterCutoff, + csnote.tied, + csnote.instrumentId, + csnote.mode, + csnote.instrumentId2 ) + + def _csnote_to_array1(self, storage, onset, pitch, amplitude, pan, duration, + trackId, attack, decay, reverbSend, filterType, filterCutoff, + tied, instrumentId, mode, instrumentId2 = -1): + + rval=storage + instrument = self.instrumentDB.instId[instrumentId] + + if instrument.volatile != None: + sound = os.path.join(Config.DATA_DIR, instrument.name) + if os.path.isfile(sound): + st_mtime = os.stat(sound).st_mtime + if st_mtime != instrument.volatile: + instrument.volatile = st_mtime + loadedInstruments.remove(instrument.name) + self.load_instrument(instrument.name) + time.sleep(0.2) + + if instrument.kit != None: + instrument = self.instrumentDB.instNamed[instrument.kit[pitch]] + pitch = 1 + time_in_ticks = 0 + else: + pitch = GenerationConstants.TRANSPOSE[ pitch - 24 ] + time_in_ticks = 1 + + instrument_id_offset = 0 + # condition for tied notes + if instrument.csoundInstrumentId == Config.INST_TIED: + if tied: + if mode == 'mini': + duration = -1 + instrument_id_offset = 0 + elif mode == 'edit': + instrument_id_offset = 0 + if duration < 0: + duration = -1 + else: + if mode == 'mini': + instrument_id_offset = 0 + elif mode == 'edit': + instrument_id_offset = 100 + + if instrument.csoundInstrumentId == Config.INST_SIMP: + if mode == 'mini': + instrument_id_offset = 0 + elif mode == 'edit': + if instrument.name[0:4] == 'drum': + instrument_id_offset = 0 + else: + instrument_id_offset = 100 + + amplitude = amplitude / sqrt(pitch) * instrument.ampScale + rval[0] = (instrument.csoundInstrumentId + \ + (trackId+1) + instrument_id_offset) + trackId * 0.01 + rval[1] = onset + rval[2] = duration + rval[3] = pitch + rval[4] = reverbSend + rval[5] = amplitude + rval[6] = pan + rval[7] = Config.INSTRUMENT_TABLE_OFFSET + instrument.instrumentId + rval[8] = attack + rval[9] = decay + rval[10]= filterType + rval[11]= filterCutoff + rval[12]= float(instrument.loopStart) + rval[13]= float(instrument.loopEnd) + rval[14]= float(instrument.crossDur) + + if instrumentId2 != -1: + instrument2 = self.instrumentDB.instId[instrumentId2] + csInstrumentId2 = (instrument2.csoundInstrumentId + 100) * 0.0001 + rval[15] = Config.INSTRUMENT_TABLE_OFFSET + instrumentId2 + csInstrumentId2 + rval[16] = instrument2.loopStart + rval[17] = instrument2.loopEnd + rval[18] = instrument2.crossDur + else: + rval[15] = -1 + rval[16] = 0 + rval[17] = 0 + rval[18] = 0 + + return rval + +_Client = None + +def new_csound_client(): + global _Client + if _Client == None: + _Client = _CSoundClientPlugin() + _Client.connect(True) + _Client.setMasterVolume(100.0) + #_Client.load_instruments() + time.sleep(0.2) + return _Client diff --git a/ttcommon/Util/CSoundNote.py b/ttcommon/Util/CSoundNote.py new file mode 100644 index 0000000..ecc7c66 --- /dev/null +++ b/ttcommon/Util/CSoundNote.py @@ -0,0 +1,80 @@ +import ttcommon.Config as Config +import ttcommon.Util.InstrumentDB as InstrumentDB + +class CSoundNote : + def __init__( self, + onset, + pitch, + amplitude, + pan, + duration, + trackId, + instrumentId = 1, #self.instrumentDB.instNamed["flute"].instrumentId, + attack = 0.005, + decay = 0.098, + reverbSend = 0.1, + filterType = 0, + filterCutoff = 1000, + tied = False, + mode = 'edit', + instrumentId2 = -1 ): + + self.instrumentDB = InstrumentDB.getRef() + + self.onset = onset + self.pitch = pitch + self.amplitude = amplitude + self.pan = pan + self.duration = duration + self.trackId = trackId + self.instrumentId = instrumentId + #temp: catch old code trying to pass in instrument names here + int(instrumentId) + self.attack = attack + self.decay = decay + self.reverbSend = reverbSend + self.filterType = filterType + self.filterCutoff = filterCutoff + self.tied = tied + self.mode = mode + self.instrumentId2 = instrumentId2 + + def clone( self ): + return CSoundNote( self.onset, self.pitch, self.amplitude, self.pan, + self.duration, self.trackId, self.instrumentId, + self.attack, self.decay, self.reverbSend, + self.filterType, self.filterCutoff, self.tied, + self.mode, self.instrumentId2 ) + + def __getstate__unused(self): + return {'onset': self.onset, + 'pitch': self.pitch, + 'amplitude': self.amplitude, + 'pan': self.pan, + 'duration': self.duration, + 'trackId': self.trackId, + 'instrumentId': self.instrumentId, + 'attack': self.attack, + 'decay': self.decay, + 'reverbSend': self.reverbSend, + 'filterType': self.filterType, + 'filterCutoff': self.filterCutoff, + 'tied': self.tied, + 'mode': self.mode } + + def __setstate__unused(self,dict): + self.onset = dict['onset'] + self.pitch = dict['pitch'] + self.amplitude = dict['amplitude'] + self.pan = dict['pan'] + self.duration = dict['duration'] + self.trackId = dict['trackId'] + self.instrumentId = dict['instrumentId'] + self.attack = dict['attack'] + self.decay = dict['decay'] + self.reverbSend = dict['reverbSend'] + self.filterType = dict['filterType'] + self.filterCutoff = dict['filterCutoff'] + self.tied = dict['tied'] + self.mode = dict['mode'] + self.nchanges = 0 diff --git a/ttcommon/Util/Clooper/Makefile b/ttcommon/Util/Clooper/Makefile new file mode 100644 index 0000000..1a5a3c1 --- /dev/null +++ b/ttcommon/Util/Clooper/Makefile @@ -0,0 +1,32 @@ +CC=gcc + + +ARCH_OUT = $(shell arch) + +CSOUND_ARCH = $(shell if [ -z "$(shell arch | grep arm)" ]; then \ + echo $(ARCH_OUT) | grep 64 >/dev/null && echo linux64 || echo linux32; \ + else \ + echo $(ARCH_OUT); \ + fi) + +CSOUND_VERSION = $(shell csound --version 2>&1 | grep -o "Csound version [0-9]\+\.[0-9]\+" | awk '{print $$3}' | sed s/\\.//g) +LIB_NAME = $(CSOUND_ARCH)_$(CSOUND_VERSION) + +CXXFLAGS = $(shell python-config --cflags) \ + -Wall -Werror -fPIC -O2 -finline +LDFLAGS+= $(python-config --libs) \ + -lcsound + +all : aclient.so + rm -rf $(LIB_NAME) + mkdir $(LIB_NAME) + strip aclient.so + mv aclient.so $(LIB_NAME)/ + touch $(LIB_NAME)/__init__.py + +aclient.so : aclient.cpp + g++ $(CXXFLAGS) -shared -o $@ $< $(LDFLAGS) + +clean : + rm aclient*.so + diff --git a/ttcommon/Util/Clooper/SoundClient.i b/ttcommon/Util/Clooper/SoundClient.i new file mode 100644 index 0000000..80d77df --- /dev/null +++ b/ttcommon/Util/Clooper/SoundClient.i @@ -0,0 +1,14 @@ + +%module SClient + +%{ +#define SWIG_FILE_WITH_INIT +#include "SoundClient.h" +%} + +%pythoncode +%{ + +%} + +%include "SoundClient.h" diff --git a/ttcommon/Util/Clooper/__init__.py b/ttcommon/Util/Clooper/__init__.py new file mode 100644 index 0000000..363fc88 --- /dev/null +++ b/ttcommon/Util/Clooper/__init__.py @@ -0,0 +1,21 @@ +import os +import sys +import logging + +_sys_path = sys.path +_root_path = os.path.dirname(__file__) + +for i in os.listdir(_root_path): + path = os.path.join(_root_path, i) + if (os.path.isdir(path)): + sys.path = _sys_path + [os.path.join('.', path)] + try: + from aclient import * + logging.debug('use %s blobs' % path) + _sys_path = None + break + except Exception, e: + logging.debug('skip %s blobs: %s' % (path, e)) + +if _sys_path: + raise('cannot find proper binary blobs') diff --git a/ttcommon/Util/Clooper/aclient.cpp b/ttcommon/Util/Clooper/aclient.cpp new file mode 100644 index 0000000..e68b8cb --- /dev/null +++ b/ttcommon/Util/Clooper/aclient.cpp @@ -0,0 +1,988 @@ +#include <Python.h> + +#include <pthread.h> +#include <stdio.h> +#include <time.h> +#include <unistd.h> +#include <sys/time.h> +#include <sched.h> + +#include <vector> +#include <map> +#include <cmath> + +#include <csound/csound.h> + +#include "log.cpp" + + +int VERBOSE = 3; +FILE * _debug = NULL; +struct TamTamSound; +struct Music; +TamTamSound * g_tt = NULL; +Music * g_music = NULL; +static log_t * g_log = NULL; +const int STEP_eventMax = 16; //this is the most events that will be queued by a loop per step() + +/** + * Event is the type of event that Clooper puts in the loop buffer. + * It corresponds to a line of csound that starts with an 'i' + */ +struct Event +{ + char type; ///< if this event were listed in a csound file, the line would begin with this letter + int onset; ///< the onset time of this event (its temporal position) + bool time_in_ticks; ///< if true, then some parameters will be updated according to the tempo + bool active; ///< if true, then event() will actually do something + MYFLT prev_secs_per_tick; ///< normally used for ____, sometimes set to -1 to force recalculation of param[] entries + MYFLT duration, attack, decay;///< canonical values of some tempo-dependent parameters + std::vector<MYFLT> param; ///< parameter buffer for csound + + Event(char type, MYFLT * p, int param_count, bool in_ticks, bool active) + : type(type), onset(0), time_in_ticks(in_ticks), active(active), param(param_count) + { + assert(param_count >= 4); + onset = (int) p[1]; + duration = p[2]; + attack = param_count > 8 ? p[8]: 0.0; //attack + decay = param_count > 9 ? p[9]: 0.0; //decay + prev_secs_per_tick = -1.0; + for (int i = 0; i < param_count; ++i) param[i] = p[i]; + + param[1] = 0.0; //onset + } + /* + bool operator<(const Event &e) const + { + return onset < e.onset; + } + */ + void ev_print(FILE *f) + { + fprintf(f, "INFO: scoreEvent %c ", type); + for (size_t i = 0; i < param.size(); ++i) fprintf(f, "%lf ", param[i]); + fprintf(f, "[%s]\n", active ? "active": "inactive"); + } + /** + * Update the idx'th param value to have a certain value. + * + * Certain of the parameters are linked in strange hack-y ways, as defined by + * the constructor, and update() (which should be consistent with one another!) + * + * These events are for use with the file: TamTam/Resources/univorc.csd. + * So that file defines how the parameters will be interpreted by csound. + */ + void update(int idx, MYFLT val) + { + if ( (unsigned)idx >= param.size()) + { + if (_debug && (VERBOSE > 0)) fprintf(_debug, "ERROR: updateEvent request for too-high parameter %i\n", idx); + return; + } + if (time_in_ticks) + { + switch(idx) + { + case 1: onset = (int) val; break; + case 2: duration = val; break; + case 8: attack = val; break; + case 9: decay = val; break; + default: param[idx] = val; break; + } + prev_secs_per_tick = -1.0; //force recalculation + } + else + { + param[idx] = val; + } + } + /** + * An Event instance can be in an active or inactive state. If an Event instance + * is active, then event() will call a corresponding csoundScoreEvent(). If an + * Event instance is inactive, then event() is a noop. + */ + void activate_cmd(int cmd) + { + switch(cmd) + { + case 0: active = false; break; + case 1: active = true; break; + case 2: active = !active; break; + } + } + + /** + * Iff this instance is active, this call generates a csound event. + * Parameters are passed directly as a buffer of floats. If secs_per_tick + * != prev_secs_per_tick (possibly because prev_secs_per_tick was set to -1 + * by update() ) then this call will do some floating point ops to + * recalculate the parameter buffer. + */ + void event(CSOUND * csound, MYFLT secs_per_tick) + { + if (!active) return; + + if (time_in_ticks && (secs_per_tick != prev_secs_per_tick)) + { + param[2] = duration * secs_per_tick; + if (param.size() > 8) param[8] = std::max(0.002f, attack * param[2]); + if (param.size() > 9) param[9] = std::max(0.002f, decay * param[2]); + prev_secs_per_tick = secs_per_tick; + if (_debug && (VERBOSE > 2)) fprintf(_debug, "setting duration to %f\n", param[5]); + } + csoundScoreEvent(csound, type, ¶m[0], param.size()); + } +}; + +/** + * + * Loop is a repeat-able loop of Event instances. + * */ +struct Loop +{ + typedef int onset_t; + typedef int id_t; + typedef std::pair<onset_t, Event *> pair_t; + typedef std::multimap<onset_t, Event *>::iterator iter_t; + typedef std::map<id_t, iter_t>::iterator idmap_t; + + int tick_prev; + int tickMax; + MYFLT rtick; + + // a container of all events, sorted by onset time + // used for efficient playback + std::multimap<onset_t, Event *> ev; + // the playback head + std::multimap<onset_t, Event *>::iterator ev_pos; + // a container of pointers into ev, indexed by note id + // used for deleting, updating notes + std::map<id_t, iter_t> idmap; + int steps; + int playing; //true means that step() works, else step() is no-op + + Loop() : tick_prev(0), tickMax(1), rtick(0.0), ev(), ev_pos(ev.end()), steps(0), playing(0) + { + } + ~Loop() + { + //TODO: send these events to a recycling queue, don't erase them + for (iter_t i = ev.begin(); i != ev.end(); ++i) + { + delete i->second; + } + } + void deactivateAll() + { + for (iter_t i = ev.begin(); i != ev.end(); ++i) + { + i->second->activate_cmd(0); + } + } + MYFLT getTickf() + { + return fmod(rtick, (MYFLT)tickMax); + } + void setNumTicks(int nticks) + { + tickMax = nticks; + MYFLT fnticks = nticks; + if (rtick > fnticks) + { + rtick = fmodf(rtick, fnticks); + } + } + void setTickf(float t) + { + rtick = fmodf(t, (MYFLT) tickMax); + ev_pos = ev.lower_bound( (int) rtick ); + } + /** advance in play loop by rtick_inc ticks, possibly generate some + * csoundScoreEvent calls. + */ + void step(MYFLT rtick_inc, MYFLT secs_per_tick , CSOUND * csound) + { + if (!playing) return; + rtick += rtick_inc; + int tick = (int)rtick % tickMax; + if (tick == tick_prev) return; + + int events = 0; + int loop0 = 0; + int loop1 = 0; + if (!ev.empty()) + { + if (steps && (tick < tick_prev)) // should be true only after the loop wraps (not after insert) + { + while (ev_pos != ev.end()) + { + if (_debug && (VERBOSE > 3)) ev_pos->second->ev_print(_debug); + if (events < STEP_eventMax) ev_pos->second->event(csound, secs_per_tick); + ++ev_pos; + ++events; + ++loop0; + } + ev_pos = ev.begin(); + } + while ((ev_pos != ev.end()) && (tick >= ev_pos->first)) + { + if (_debug && (VERBOSE > 3)) ev_pos->second->ev_print(_debug); + if (events < STEP_eventMax) ev_pos->second->event(csound, secs_per_tick); + ++ev_pos; + ++events; + ++loop1; + } + } + tick_prev = tick; + if (_debug && (VERBOSE>1) && (events >= STEP_eventMax)) fprintf(_debug, "WARNING: %i/%i events at once (%i, %i)\n", events, (int)ev.size(),loop0,loop1); + ++steps; + } + void addEvent(int id, char type, MYFLT * p, int np, bool in_ticks, bool active) + { + Event * e = new Event(type, p, np, in_ticks, active); + + idmap_t id_iter = idmap.find(id); + if (id_iter == idmap.end()) + { + //this is a new id + iter_t e_iter = ev.insert(pair_t(e->onset, e)); + + //TODO: optimize by thinking about whether to do ev_pos = e_iter + ev_pos = ev.upper_bound( tick_prev ); + idmap[id] = e_iter; + } + else + { + g_log->printf(1, "%s duplicate note %i\n", __FUNCTION__, id); + } + } + void delEvent(int id) + { + idmap_t id_iter = idmap.find(id); + if (id_iter != idmap.end()) + { + iter_t e_iter = id_iter->second;//idmap[id]; + if (e_iter == ev_pos) ++ev_pos; + + delete e_iter->second; + ev.erase(e_iter); + idmap.erase(id_iter); + } + else + { + g_log->printf( 1, "%s unknown note %i\n", __FUNCTION__, id); + } + } + void updateEvent(int id, int idx, float val, int activate_cmd) + { + idmap_t id_iter = idmap.find(id); + if (id_iter != idmap.end()) + { + //this is a new id + iter_t e_iter = id_iter->second; + Event * e = e_iter->second; + int onset = e->onset; + e->update(idx, val); + e->activate_cmd(activate_cmd); + if (onset != e->onset) + { + ev.erase(e_iter); + + e_iter = ev.insert(pair_t(e->onset, e)); + + //TODO: optimize by thinking about whether to do ev_pos = e_iter + ev_pos = ev.upper_bound( tick_prev ); + idmap[id] = e_iter; + } + } + else + { + g_log->printf(1, "%s unknown note %i\n", __FUNCTION__, id); + } + } + void reset() + { + steps = 0; + } + void setPlaying(int tf) + { + playing = tf; + } +}; + +/** management of loops */ +struct Music +{ + typedef int loopIdx_t; + typedef std::map<int, Loop * > eventMap_t; + + eventMap_t loop; + int loop_nextIdx; + void * mutex; //modification and playing of loops cannot be interwoven + + Music() : + loop(), + loop_nextIdx(0), + mutex(csoundCreateMutex(0)) + { + } + ~Music() + { + for (eventMap_t::iterator i = loop.begin(); i != loop.end(); ++i) + { + delete i->second; + } + csoundDestroyMutex(mutex); + } + + void step(MYFLT amt, MYFLT secs_per_tick, CSOUND * csound) + { + csoundLockMutex(mutex); + for (eventMap_t::iterator i = loop.begin(); i != loop.end(); ++i) + { + i->second->step(amt, secs_per_tick, csound); + } + csoundUnlockMutex(mutex); + } + + /** allocate a new loop, and return its index */ + loopIdx_t alloc() + { + csoundLockMutex(mutex); + //find a loop_nextIdx that isn't in loop map already + while ( loop.find( loop_nextIdx) != loop.end()) ++loop_nextIdx; + loop[loop_nextIdx] = new Loop(); + csoundUnlockMutex(mutex); + return loop_nextIdx; + } + /** de-allocate a loop */ + void destroy(loopIdx_t loopIdx) + { + if (loop.find(loopIdx) != loop.end()) + { + csoundLockMutex(mutex); + //TODO: save the note events to a cache for recycling + delete loop[loopIdx]; + loop.erase(loopIdx); + csoundUnlockMutex(mutex); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + /** set the playing flag of the given loop */ + void playing(loopIdx_t loopIdx, int tf) + { + if (loop.find(loopIdx) != loop.end()) + { + csoundLockMutex(mutex); + loop[loopIdx]->setPlaying(tf); + csoundUnlockMutex(mutex); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + /** set the playing flag of the given loop */ + void addEvent(loopIdx_t loopIdx, int eventId, char type, MYFLT * p, int np, bool in_ticks, bool active) + { + if (loop.find(loopIdx) != loop.end()) + { + csoundLockMutex(mutex); + loop[loopIdx]->addEvent(eventId, type, p, np, in_ticks, active); + csoundUnlockMutex(mutex); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + void delEvent(loopIdx_t loopIdx, int eventId) + { + if (loop.find(loopIdx) != loop.end()) + { + csoundLockMutex(mutex); + loop[loopIdx]->delEvent(eventId); + csoundUnlockMutex(mutex); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + void updateEvent(loopIdx_t loopIdx, int eventId, int pIdx, float pVal, int activate_cmd) + { + if (loop.find(loopIdx) != loop.end()) + { + csoundLockMutex(mutex); + loop[loopIdx]->updateEvent(eventId, pIdx, pVal, activate_cmd); + csoundUnlockMutex(mutex); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + MYFLT getTickf(loopIdx_t loopIdx) + { + if (loop.find(loopIdx) != loop.end()) + { + return loop[loopIdx]->getTickf(); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + return 0.0; + } + } + void setTickf(loopIdx_t loopIdx, MYFLT tickf) + { + if (loop.find(loopIdx) != loop.end()) + { + loop[loopIdx]->setTickf(tickf); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + void setNumTicks(loopIdx_t loopIdx, int numTicks) + { + if (loop.find(loopIdx) != loop.end()) + { + loop[loopIdx]->setNumTicks(numTicks); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + void deactivateAll(loopIdx_t loopIdx) + { + if (loop.find(loopIdx) != loop.end()) + { + loop[loopIdx]->deactivateAll(); + } + else + { + g_log->printf(1, "%s() called on non-existant loop %i\n", __FUNCTION__ , loopIdx); + } + } + +}; + +/** + * The main object of control in the Clooper plugin. + * + * This guy controls the sound rendering thread, loads and unloads ALSA, + * maintains a csound instance, and maintains a subset of notes from the + * currently-loaded TamTam. + */ +struct TamTamSound +{ + /** the id of an running sound-rendering thread, or NULL */ + void * ThreadID; + /** a flag to tell the thread to continue, or break */ + enum {CONTINUE, STOP} PERF_STATUS; + /** our csound object, NULL iff there was a problem creating it */ + CSOUND * csound; + /** our note sources */ + Music music; + + MYFLT secs_per_tick; + MYFLT ticks_per_period; + MYFLT tick_adjustment; //the default time increment in thread_fn + MYFLT tick_total; + + /** the upsampling ratio from csound */ + int csound_frame_rate; + long csound_period_size; + + log_t * ll; + + TamTamSound(log_t * ll, char * orc, int framerate ) + : ThreadID(NULL), PERF_STATUS(STOP), csound(NULL), + music(), + ticks_per_period(0.0), + tick_adjustment(0.0), + tick_total(0.0), + csound_frame_rate(framerate), //must agree with the orchestra file + ll( ll ) + { + csound = csoundCreate(NULL); + int argc=4; + const char **argv = (const char**)malloc(argc*sizeof(char*)); + argv[0] = "csound"; + argv[1] = "-m0"; + argv[2] = "-+rtaudio=alsa"; + argv[3] = orc; + + ll->printf(1, "loading csound orchestra file %s\n", orc); + //csoundInitialize(&argc, &argv, 0); + csoundPreCompile(csound); + int result = csoundCompile(csound, argc, (char**)argv); + if (result) + { + csound = NULL; + ll->printf( "ERROR: csoundCompile of orchestra %s failed with code %i\n", orc, result); + } + free(argv); + csound_period_size = csoundGetOutputBufferSize(csound); + csound_period_size /= 2; /* channels */ + setTickDuration(0.05); + } + ~TamTamSound() + { + if (csound) + { + stop(); + ll->printf(2, "Going for csoundDestroy\n"); + csoundDestroy(csound); + } + ll->printf(2, "TamTamSound destroyed\n"); + delete ll; + } + bool good() + { + return csound != NULL; + } + + uintptr_t thread_fn() + { + assert(csound); + + tick_total = 0.0f; + while (PERF_STATUS == CONTINUE) + { + if (csoundPerformBuffer(csound)) break; + if (tick_adjustment > - ticks_per_period) + { + MYFLT tick_inc = ticks_per_period + tick_adjustment; + music.step( tick_inc, secs_per_tick, csound); + tick_adjustment = 0.0; + tick_total += tick_inc; + } + else + { + tick_adjustment += ticks_per_period; + } + } + + ll->printf(2, "INFO: performance thread returning 0\n"); + return 0; + } + static uintptr_t csThread(void *clientData) + { + return ((TamTamSound*)clientData)->thread_fn(); + } + int start(int ) + { + if (!csound) { + ll->printf(1, "skipping %s, csound==NULL\n", __FUNCTION__); + return 1; + } + if (!ThreadID) + { + PERF_STATUS = CONTINUE; + ThreadID = csoundCreateThread(csThread, (void*)this); + ll->printf( "INFO(%s:%i) aclient launching performance thread (%p)\n", __FILE__, __LINE__, ThreadID ); + return 0; + } + ll->printf( "INFO(%s:%i) skipping duplicate request to launch a thread\n", __FILE__, __LINE__ ); + return 1; + } + int stop() + { + if (!csound) { + ll->printf(1, "skipping %s, csound==NULL\n", __FUNCTION__); + return 1; + } + if (ThreadID) + { + PERF_STATUS = STOP; + ll->printf( "INFO(%s:%i) aclient joining performance thread\n", __FILE__, __LINE__ ); + uintptr_t rval = csoundJoinThread(ThreadID); + ll->printf( "INFO(%s:%i) ... joined\n", __FILE__, __LINE__ ); + if (rval) ll->printf( "WARNING: thread returned %zu\n", rval); + ThreadID = NULL; + return 0; + } + return 1; + } + + /** pass an array event straight through to csound. only works if perf. thread is running */ + void scoreEvent(char type, MYFLT * p, int np) + { + if (!csound) { + ll->printf(1, "skipping %s, csound==NULL\n", __FUNCTION__); + return; + } + if (!ThreadID) + { + if (_debug && (VERBOSE > 1)) fprintf(_debug, "skipping %s, ThreadID==NULL\n", __FUNCTION__); + return ; + } + if (_debug && (VERBOSE > 2)) + { + fprintf(_debug, "INFO: scoreEvent %c ", type); + for (int i = 0; i < np; ++i) fprintf(_debug, "%lf ", p[i]); + fprintf(_debug, "\n"); + } + csoundScoreEvent(csound, type, p, np); + } + /** pass a string event straight through to csound. only works if perf. thread is running */ + void inputMessage(const char * msg) + { + if (!csound) { + ll->printf(1, "skipping %s, csound==NULL\n", __FUNCTION__); + return; + } + if (!ThreadID) + { + if (_debug && (VERBOSE > 1)) fprintf(_debug, "skipping %s, ThreadID==NULL\n", __FUNCTION__); + return ; + } + if (_debug &&(VERBOSE > 3)) fprintf(_debug, "%s\n", msg); + csoundInputMessage(csound, msg); + } + /** pass a setChannel command through to csound. only works if perf. thread is running */ + void setChannel(const char * name, MYFLT vol) + { + if (!csound) { + ll->printf(1, "skipping %s, csound==NULL\n", __FUNCTION__); + return; + } + if (!ThreadID) + { + if (_debug && (VERBOSE > 1)) fprintf(_debug, "skipping %s, ThreadID==NULL\n", __FUNCTION__); + return ; + } + MYFLT *p; + if (!(csoundGetChannelPtr(csound, &p, name, CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL))) + *p = (MYFLT) vol; + else + { + if (_debug && (VERBOSE >0)) fprintf(_debug, "ERROR: failed to set channel: %s\n", name); + } + } + + /** adjust the global tick value by this much */ + void adjustTick(MYFLT dtick) + { + tick_adjustment += dtick; + } + void setTickDuration(MYFLT d ) + { + secs_per_tick = d; + ticks_per_period = csound_period_size / ( secs_per_tick * csound_frame_rate); + ll->printf( 3, "INFO: duration %lf := ticks_per_period %lf\n", secs_per_tick , ticks_per_period); + } + MYFLT getTickf() + { + return tick_total + tick_adjustment; + } +}; + + +static void cleanup(void) +{ + if (g_tt) + { + delete g_tt; + g_tt = NULL; + } +} + +#define DECL(s) static PyObject * s(PyObject * self, PyObject *args) +#define RetNone Py_INCREF(Py_None); return Py_None; + +//call once at end +DECL(sc_destroy) +{ + if (!PyArg_ParseTuple(args, "")) + { + return NULL; + } + if (g_tt) + { + delete g_tt; + g_tt = NULL; + if (_debug) fclose(_debug); + } + RetNone; +} +//call once at startup, should return 0 +DECL(sc_initialize) //(char * csd) +{ + char * str; + char * log_file; + int framerate; + if (!PyArg_ParseTuple(args, "ssii", &str, &log_file, &VERBOSE, &framerate )) + { + return NULL; + } + if ( log_file[0] ) + { + _debug = fopen(log_file,"w"); + if (_debug==NULL) + { + fprintf(stderr, "WARNING: fopen(%s) failed, logging to stderr\n", log_file); + _debug = stderr; + } + } + else + { + _debug = NULL; + fprintf(stderr, "Logging disabled on purpose\n"); + } + g_log = new log_t(_debug, VERBOSE); + g_tt = new TamTamSound(g_log, str, framerate); + g_music = & g_tt->music; + atexit(&cleanup); + if (g_tt->good()) + return Py_BuildValue("i", 0); + else + return Py_BuildValue("i", -1); +} +//compile the score, connect to device, start a sound rendering thread +DECL(sc_start) +{ + int ppb; + if (!PyArg_ParseTuple(args, "i", &ppb )) + { + return NULL; + } + return Py_BuildValue("i", g_tt->start(ppb)); +} +//stop csound rendering thread, disconnect from sound device, clear tables. +DECL(sc_stop) +{ + if (!PyArg_ParseTuple(args, "" )) + { + return NULL; + } + return Py_BuildValue("i", g_tt->stop()); +} +DECL(sc_scoreEvent) //(char type, farray param) +{ + char ev_type; + PyObject *o; + if (!PyArg_ParseTuple(args, "cO", &ev_type, &o )) + { + return NULL; + } + if (o->ob_type + && o->ob_type->tp_as_buffer + && (1 == o->ob_type->tp_as_buffer->bf_getsegcount(o, NULL))) + { + if (o->ob_type->tp_as_buffer->bf_getreadbuffer) + { + void * ptr; + size_t len; + len = o->ob_type->tp_as_buffer->bf_getreadbuffer(o, 0, &ptr); + float * fptr = (float*)ptr; + size_t flen = len / sizeof(float); + g_tt->scoreEvent(ev_type, fptr, flen); + + Py_INCREF(Py_None); + return Py_None; + } + else + { + assert(!"asdf"); + } + } + assert(!"not reached"); + return NULL; +} +DECL (sc_inputMessage) //(const char *msg) +{ + char * msg; + if (!PyArg_ParseTuple(args, "s", &msg )) + { + return NULL; + } + g_tt->inputMessage(msg); + RetNone; +} +DECL(sc_setChannel) //(string name, float value) +{ + const char * str; + float v; + if (!PyArg_ParseTuple(args, "sf", &str,&v)) + { + return NULL; + } + g_tt->setChannel(str,v); + Py_INCREF(Py_None); + return Py_None; +} +DECL(sc_getTickf) // () -> float +{ + if (!PyArg_ParseTuple(args, "")) + { + return NULL; + } + return Py_BuildValue("f", g_tt->getTickf()); +} +DECL(sc_adjustTick) // (MYFLT ntick) +{ + float spt; + if (!PyArg_ParseTuple(args, "f", &spt )) + { + return NULL; + } + g_tt->adjustTick(spt); + RetNone; +} +DECL(sc_setTickDuration) // (MYFLT secs_per_tick) +{ + float spt; + if (!PyArg_ParseTuple(args, "f", &spt )) + { + return NULL; + } + g_tt->setTickDuration(spt); + RetNone; +} +DECL(sc_loop_new) // () -> int +{ + if (!PyArg_ParseTuple(args, "" )) return NULL; + return Py_BuildValue("i", g_music->alloc()); +} +DECL(sc_loop_delete) // (int loopIdx) +{ + int loopIdx; + if (!PyArg_ParseTuple(args, "i", &loopIdx )) return NULL; + g_music->destroy(loopIdx); + RetNone; +} +DECL(sc_loop_getTickf) // (int loopIdx) -> float +{ + int idx; + if (!PyArg_ParseTuple(args, "i", &idx )) + { + return NULL; + } + return Py_BuildValue("f", g_music->getTickf(idx)); +} +DECL(sc_loop_setNumTicks) //(int loopIdx, int nticks) +{ + int loopIdx; + int nticks; + if (!PyArg_ParseTuple(args, "ii", &loopIdx, &nticks )) return NULL; + g_music->setNumTicks(loopIdx, nticks); + RetNone; +} +DECL(sc_loop_setTickf) // (int loopIdx, float pos) +{ + int loopIdx; + MYFLT pos; + if (!PyArg_ParseTuple(args, "if", &loopIdx, &pos )) return NULL; + g_music->setTickf(loopIdx, pos); + RetNone; +} +DECL(sc_loop_addScoreEvent) // (int loopIdx, int id, int duration_in_ticks, char type, farray param) +{ + int loopIdx, qid, inticks, active; + char ev_type; + PyObject *o; + if (!PyArg_ParseTuple(args, "iiiicO", &loopIdx, &qid, &inticks, &active, &ev_type, &o )) return NULL; + + if (o->ob_type + && o->ob_type->tp_as_buffer + && (1 == o->ob_type->tp_as_buffer->bf_getsegcount(o, NULL))) + { + if (o->ob_type->tp_as_buffer->bf_getreadbuffer) + { + void * ptr; + size_t len; + len = o->ob_type->tp_as_buffer->bf_getreadbuffer(o, 0, &ptr); + float * fptr = (float*)ptr; + size_t flen = len / sizeof(float); + + g_music->addEvent(loopIdx, qid, ev_type, fptr, flen, inticks, active); + + RetNone; + } + else + { + assert(!"asdf"); + } + } + assert(!"not reached"); + return NULL; +} +DECL(sc_loop_delScoreEvent) // (int loopIdx, int id) +{ + int loopIdx, id; + if (!PyArg_ParseTuple(args, "ii", &loopIdx, &id )) + { + return NULL; + } + g_music->delEvent(loopIdx, id); + RetNone; +} +DECL(sc_loop_updateEvent) // (int loopIdx, int id, int paramIdx, float paramVal, int activate_cmd)) +{ + int loopIdx, eventId; + int idx; + float val; + int cmd; + if (!PyArg_ParseTuple(args, "iiifi", &loopIdx, &eventId, &idx, &val, &cmd)) return NULL; + g_music->updateEvent(loopIdx, eventId, idx, val, cmd); + RetNone; +} +DECL(sc_loop_deactivate_all) // (int id) +{ + int loopIdx; + if (!PyArg_ParseTuple(args, "i", &loopIdx)) return NULL; + g_music->deactivateAll(loopIdx); + RetNone; +} +DECL(sc_loop_playing) // (int loopIdx, int tf) +{ + int loopIdx, tf; + if (!PyArg_ParseTuple(args, "ii", &loopIdx, &tf )) return NULL; + g_music->playing(loopIdx, tf); + RetNone; +} + +#define MDECL(s) {""#s, s, METH_VARARGS, "documentation of "#s"... nothing!"} +static PyMethodDef SpamMethods[] = { + MDECL(sc_destroy), + MDECL(sc_initialize), + MDECL(sc_start), + MDECL(sc_stop), + + MDECL(sc_setChannel), + MDECL(sc_inputMessage), + MDECL(sc_scoreEvent), + + MDECL(sc_getTickf), + MDECL(sc_adjustTick), + MDECL(sc_setTickDuration), + + MDECL(sc_loop_new), + MDECL(sc_loop_delete), + MDECL(sc_loop_getTickf), + MDECL(sc_loop_setTickf), + MDECL(sc_loop_setNumTicks), + MDECL(sc_loop_delScoreEvent), + MDECL(sc_loop_addScoreEvent), + MDECL(sc_loop_updateEvent), + MDECL(sc_loop_deactivate_all), + MDECL(sc_loop_playing), + {NULL, NULL, 0, NULL} /*end of list */ +}; + +PyMODINIT_FUNC +initaclient(void) +{ + (void) Py_InitModule("aclient", SpamMethods); +} + + diff --git a/ttcommon/Util/Clooper/armv7l_513/__init__.py b/ttcommon/Util/Clooper/armv7l_513/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/Clooper/armv7l_513/__init__.py diff --git a/ttcommon/Util/Clooper/armv7l_513/aclient.so b/ttcommon/Util/Clooper/armv7l_513/aclient.so Binary files differnew file mode 100644 index 0000000..fe50a03 --- /dev/null +++ b/ttcommon/Util/Clooper/armv7l_513/aclient.so diff --git a/ttcommon/Util/Clooper/cmd_csound.cpp b/ttcommon/Util/Clooper/cmd_csound.cpp new file mode 100644 index 0000000..ef94f84 --- /dev/null +++ b/ttcommon/Util/Clooper/cmd_csound.cpp @@ -0,0 +1,22 @@ + +#include <stdio.h> +#include <csound/csound.hpp> + +#include "SoundClient.h" + +int main( int argc, char ** argv) +{ + int userInput = 200; + int rval = sc_initialize(argv[1]); + sc_setMasterVolume(30.0); + + while ((userInput != 0) && (rval == 0)) + { + fprintf(stderr, "Enter a pitch\n"); + scanf("%i", &userInput); + //sc_instrumentLoad(5083, "/home/olpc/tamtam/Resources/Sounds/sitar"); + scanf("%i", &userInput); + } + + return 0; +} diff --git a/ttcommon/Util/Clooper/linux32_508/__init__.py b/ttcommon/Util/Clooper/linux32_508/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/Clooper/linux32_508/__init__.py diff --git a/ttcommon/Util/Clooper/linux32_508/aclient.so b/ttcommon/Util/Clooper/linux32_508/aclient.so Binary files differnew file mode 100755 index 0000000..9bc3bd5 --- /dev/null +++ b/ttcommon/Util/Clooper/linux32_508/aclient.so diff --git a/ttcommon/Util/Clooper/linux32_511_deb/__init__.py b/ttcommon/Util/Clooper/linux32_511_deb/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/Clooper/linux32_511_deb/__init__.py diff --git a/ttcommon/Util/Clooper/linux32_511_deb/aclient.so b/ttcommon/Util/Clooper/linux32_511_deb/aclient.so Binary files differnew file mode 100755 index 0000000..e9d88c3 --- /dev/null +++ b/ttcommon/Util/Clooper/linux32_511_deb/aclient.so diff --git a/ttcommon/Util/Clooper/linux32_513/__init__.py b/ttcommon/Util/Clooper/linux32_513/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/Clooper/linux32_513/__init__.py diff --git a/ttcommon/Util/Clooper/linux32_513/aclient.so b/ttcommon/Util/Clooper/linux32_513/aclient.so Binary files differnew file mode 100644 index 0000000..4f04b12 --- /dev/null +++ b/ttcommon/Util/Clooper/linux32_513/aclient.so diff --git a/ttcommon/Util/Clooper/linux64_/__init__.py b/ttcommon/Util/Clooper/linux64_/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/Clooper/linux64_/__init__.py diff --git a/ttcommon/Util/Clooper/linux64_/aclient.so b/ttcommon/Util/Clooper/linux64_/aclient.so Binary files differnew file mode 100755 index 0000000..eb9eddf --- /dev/null +++ b/ttcommon/Util/Clooper/linux64_/aclient.so diff --git a/ttcommon/Util/Clooper/linux64_511_deb/__init__.py b/ttcommon/Util/Clooper/linux64_511_deb/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/Clooper/linux64_511_deb/__init__.py diff --git a/ttcommon/Util/Clooper/linux64_511_deb/aclient.so b/ttcommon/Util/Clooper/linux64_511_deb/aclient.so Binary files differnew file mode 100755 index 0000000..0bfa7e4 --- /dev/null +++ b/ttcommon/Util/Clooper/linux64_511_deb/aclient.so diff --git a/ttcommon/Util/Clooper/log.cpp b/ttcommon/Util/Clooper/log.cpp new file mode 100644 index 0000000..d4a8c72 --- /dev/null +++ b/ttcommon/Util/Clooper/log.cpp @@ -0,0 +1,52 @@ +#ifndef LOG_HXX +#define LOG_HXX + +#include <stdarg.h> +#include <stdio.h> + +struct log_t +{ + FILE * _file; + int _level; + int _close; + + log_t(const char * logpath, int level = 0) : _file(NULL), _level(level), _close(1) + { + _file = fopen(logpath, "w"); + if (!_file) + { + fprintf(stderr, "Failed to open log file for writing: %s\n", logpath); + } + } + log_t(FILE * file, int level = 0): _file(file), _level(level), _close(0) + { + } + ~log_t() + { + if (_close && _file) fclose(_file); + } + void printf( const char * fmt, ... ) __attribute__(( format (printf, 2,3))) + { + if (!_file) return; + va_list ap; + va_start(ap,fmt); + ::vfprintf(_file, fmt, ap); + va_end(ap); + fflush(_file); + } + void printf( int level, const char * fmt, ... ) __attribute__(( format (printf, 3,4))) + { + if (level <= _level) + { + if (!_file) return; + fprintf(_file, "L%i:", level); + va_list ap; + va_start(ap,fmt); + ::vfprintf(_file, fmt, ap); + va_end(ap); + fflush(_file); + } + } +}; + +#endif diff --git a/ttcommon/Util/Clooper/ttest.c b/ttcommon/Util/Clooper/ttest.c new file mode 100644 index 0000000..9ff3d85 --- /dev/null +++ b/ttcommon/Util/Clooper/ttest.c @@ -0,0 +1,53 @@ + +#include <pthread.h> +#include <stdio.h> +#include <time.h> +#include <unistd.h> +#include <sys/time.h> + +double sleeptime = 0.0; +int usleep(int); +static void * threadfn(void * _arg) +{ + double pytime(const struct timeval * tv) + { + return (double) tv->tv_sec + (double) tv->tv_usec / 1000000.0; + } + struct timeval tv0, tv1; + double m = 0.0; + + int loops = 0; + + while (1) + { + gettimeofday(&tv0, 0); + usleep( (int) (sleeptime * 1000000) ); + gettimeofday(&tv1, 0); + double t0 = pytime(&tv0); + double t1 = pytime(&tv1); + if (t1 - t0 > 1.2 * sleeptime) + { + fprintf(stderr, "critical lagginess %lf\n", t1 - t0); + } + if (m < t1 - t0) + { + m = t1 - t0; + fprintf(stderr, "maximum lag %lf\n", m); + } + + if ( ( loops % 100 ) == 0 ) + { + fprintf(stderr, "loop (%lf)\n", t0); + } + ++loops; + } + return NULL; +} +void testtimer(double st) +{ + pthread_t pth; + sleeptime = st; + + pthread_create( &pth, NULL, &threadfn, NULL ); +} + diff --git a/ttcommon/Util/Clooper/ttest.h b/ttcommon/Util/Clooper/ttest.h new file mode 100644 index 0000000..111f10c --- /dev/null +++ b/ttcommon/Util/Clooper/ttest.h @@ -0,0 +1,15 @@ +#ifndef _MSL_MATH_H +#define _MSL_MATH_H + +#ifdef __cplusplus +extern "C" { +#endif + +void testtimer(double); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/ttcommon/Util/Clooper/ttest.i b/ttcommon/Util/Clooper/ttest.i new file mode 100644 index 0000000..0c88add --- /dev/null +++ b/ttcommon/Util/Clooper/ttest.i @@ -0,0 +1,15 @@ + +%module ttest + +%{ +#define SWIG_FILE_WITH_INIT +#include "ttest.h" +%} + +%pythoncode +%{ +def somefn(seed, mat): + +%} + +%include "ttest.h" diff --git a/ttcommon/Util/Clooper/ttest.py b/ttcommon/Util/Clooper/ttest.py new file mode 100644 index 0000000..302c8f3 --- /dev/null +++ b/ttcommon/Util/Clooper/ttest.py @@ -0,0 +1,54 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 1.3.31 +# +# Don't modify this file, modify the SWIG interface instead. +# This file is compatible with both classic and new-style classes. + +import _ttest +import new +new_instancemethod = new.instancemethod +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "thisown"): return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'PySwigObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + if (not static) or hasattr(self,name): + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) + +def _swig_getattr(self,class_type,name): + if (name == "thisown"): return self.this.own() + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError,name + +def _swig_repr(self): + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +import types +try: + _object = types.ObjectType + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 +del types + + + +testtimer = _ttest.testtimer + + diff --git a/ttcommon/Util/Clooper/ttest_wrap.c b/ttcommon/Util/Clooper/ttest_wrap.c new file mode 100644 index 0000000..a073e99 --- /dev/null +++ b/ttcommon/Util/Clooper/ttest_wrap.c @@ -0,0 +1,3042 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.31 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGPYTHON +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) +# if (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + + +/* Python.h has to appear first */ +#include <Python.h> + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic CAPI SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "3" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the swig runtime code. + In 99.9% of the cases, swig just needs to declare them as 'static'. + + But only do this if is strictly necessary, ie, if you have problems + with your compiler or so. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The swig conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old swig versions, you usually write code as: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit as: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + that seems to be the same, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + requires also to SWIG_ConvertPtr to return new result values, as + + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + swig errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() + + + */ +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + + + +#include <string.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store inforomation on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class<int>" == "Class<int >", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (l1 - f1) - (l2 - f2); +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* think of this as a c++ template<> or a scheme macro */ +#define SWIG_TypeCheck_Template(comparison, ty) \ + if (ty) { \ + swig_cast_info *iter = ty->cast; \ + while (iter) { \ + if (comparison) { \ + if (iter == ty->cast) return iter; \ + /* Move iter to the top of the linked list */ \ + iter->prev->next = iter->next; \ + if (iter->next) \ + iter->next->prev = iter->prev; \ + iter->next = ty->cast; \ + iter->prev = 0; \ + if (ty->cast) ty->cast->prev = iter; \ + ty->cast = iter; \ + return iter; \ + } \ + iter = iter->next; \ + } \ + } \ + return 0 + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +} + +/* Same as previous function, except strcmp is replaced with a pointer comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { + SWIG_TypeCheck_Template(iter->type == from, into); +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_Format(PyExc_RuntimeError, mesg); + } +} + + + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) PySwigClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); +} + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register int l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), min, l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), max, l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* PySwigClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} PySwigClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + PySwigClientData *data = (PySwigClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME PySwigClientData * +PySwigClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} + +SWIGRUNTIME void +PySwigClientData_Del(PySwigClientData* data) +{ + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== PySwigObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} PySwigObject; + +SWIGRUNTIME PyObject * +PySwigObject_long(PySwigObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +PySwigObject_format(const char* fmt, PySwigObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { + PyObject *ofmt = PyString_FromString(fmt); + if (ofmt) { + res = PyString_Format(ofmt,args); + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +PySwigObject_oct(PySwigObject *v) +{ + return PySwigObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +PySwigObject_hex(PySwigObject *v) +{ + return PySwigObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +PySwigObject_repr(PySwigObject *v) +#else +PySwigObject_repr(PySwigObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = PySwigObject_hex(v); + PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex)); + Py_DECREF(hex); + if (v->next) { +#ifdef METH_NOARGS + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next); +#else + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args); +#endif + PyString_ConcatAndDel(&repr,nrep); + } + return repr; +} + +SWIGRUNTIME int +PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ +#ifdef METH_NOARGS + PyObject *repr = PySwigObject_repr(v); +#else + PyObject *repr = PySwigObject_repr(v, NULL); +#endif + if (repr) { + fputs(PyString_AsString(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + +SWIGRUNTIME PyObject * +PySwigObject_str(PySwigObject *v) +{ + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + PyString_FromString(result) : 0; +} + +SWIGRUNTIME int +PySwigObject_compare(PySwigObject *v, PySwigObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; +} + +SWIGRUNTIMEINLINE int +PySwigObject_Check(PyObject *op) { + return ((op)->ob_type == PySwigObject_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); +} + +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +PySwigObject_dealloc(PyObject *v) +{ + PySwigObject *sobj = (PySwigObject *) v; + PyObject *next = sobj->next; + if (sobj->own) { + swig_type_info *ty = sobj->ty; + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } else { + const char *name = SWIG_TypePrettyName(ty); +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); +#endif + } + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +PySwigObject_append(PyObject* v, PyObject* next) +{ + PySwigObject *sobj = (PySwigObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!PySwigObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +PySwigObject_next(PyObject* v) +#else +PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +PySwigObject_disown(PyObject *v) +#else +PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +PySwigObject_acquire(PyObject *v) +#else +PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +PySwigObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#else + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + PySwigObject *sobj = (PySwigObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v); + } else { + PySwigObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v,args); + } else { + PySwigObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +PySwigObject_getattr(PySwigObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods PySwigObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + (binaryfunc)0, /*nb_divide*/ + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + (coercion)0, /*nb_coerce*/ + (unaryfunc)PySwigObject_long, /*nb_int*/ + (unaryfunc)PySwigObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ + (unaryfunc)PySwigObject_oct, /*nb_oct*/ + (unaryfunc)PySwigObject_hex, /*nb_hex*/ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject pyswigobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigObject", /* tp_name */ + sizeof(PySwigObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigObject_dealloc, /* tp_dealloc */ + (printfunc)PySwigObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)PySwigObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigObject_compare, /* tp_compare */ + (reprfunc)PySwigObject_repr, /* tp_repr */ + &PySwigObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + pyswigobject_type = tmp; + pyswigobject_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigobject_type; +} + +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own) +{ + PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} PySwigPacked; + +SWIGRUNTIME int +PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("<Swig Packed ", fp); + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +PySwigPacked_repr(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); + } else { + return PyString_FromFormat("<Swig Packed %s>", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +PySwigPacked_str(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return PyString_FromFormat("%s%s", result, v->ty->name); + } else { + return PyString_FromString(v->ty->name); + } +} + +SWIGRUNTIME int +PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; +} + +SWIGRUNTIMEINLINE int +PySwigPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); +} + +SWIGRUNTIME void +PySwigPacked_dealloc(PyObject *v) +{ + if (PySwigPacked_Check(v)) { + PySwigPacked *sobj = (PySwigPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject pyswigpacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigPacked", /* tp_name */ + sizeof(PySwigPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigPacked_dealloc, /* tp_dealloc */ + (printfunc)PySwigPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigPacked_compare, /* tp_compare */ + (reprfunc)PySwigPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + pyswigpacked_type = tmp; + pyswigpacked_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigpacked_type; +} + +SWIGRUNTIME PyObject * +PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (PySwigPacked_Check(obj)) { + PySwigPacked *sobj = (PySwigPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return PyString_FromString("this"); +} + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +SWIGRUNTIME PySwigObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (PySwigObject_Check(pyobj)) { + return (PySwigObject *) pyobj; + } else { + PyObject *obj = 0; +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !PySwigObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + PySwigObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (PySwigObject *)obj; + } +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own) { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (PySwigObject *)sobj->next; + } else { + if (ptr) *ptr = SWIG_TypeCast(tc,vptr); + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) *own = sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (!tc) return SWIG_ERROR; + *ptr = SWIG_TypeCast(tc,vptr); + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, whitout calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + PySwigObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = PySwigObject_New(ptr, type, own); + PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + PySwigClientData *data = (PySwigClientData *) ty->clientdata; + if (data) PySwigClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ + + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = PyString_FromString(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); + } else { + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +PySwigObject_GetDesc(PyObject *self) +{ + PySwigObject *v = (PySwigObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && PySwigObject_Check(obj)) { + const char *otype = (const char *) PySwigObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? PyString_AsString(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; +} + + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_char swig_types[0] +#define SWIGTYPE_p_gsl_complex swig_types[1] +static swig_type_info *swig_types[3]; +static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif + +/*----------------------------------------------- + @(target):= _ttest.so + ------------------------------------------------*/ +#define SWIG_init init_ttest + +#define SWIG_name "_ttest" + +#define SWIGVERSION 0x010331 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + +#define SWIG_FILE_WITH_INIT +#include "ttest.h" + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_testtimer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + + if (!PyArg_ParseTuple(args,(char *)":testtimer")) SWIG_fail; + testtimer(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +static PyMethodDef SwigMethods[] = { + { (char *)"testtimer", _wrap_testtimer, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gsl_complex = {"_p_gsl_complex", "gsl_complex *|msl_complex_t *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_char, + &_swigt__p_gsl_complex, +}; + +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gsl_complex[] = { {&_swigt__p_gsl_complex, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_char, + _swigc__p_gsl_complex, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { + return PyString_FromString("<Swig global variables>"); + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", PyString_AsString(str)); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* Number of items in variable part (ob_size) */ + (char *)"swigvarlink", /* Type name (tp_name) */ + sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ + 0, /* Itemsize (tp_itemsize) */ + (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ + (printfunc) swig_varlink_print, /* Print (tp_print) */ + (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ + (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc)swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + varlink_type = tmp; + varlink_type.ob_type = &PyType_Type; + type_init = 1; + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (c && (c = strstr(c, "swig_ptr: "))) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void SWIG_init(void) { + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + + m = Py_InitModule((char *) SWIG_name, SwigMethods); + d = PyModule_GetDict(m); + + SWIG_InitializeModule(0); + SWIG_InstallConstants(d,swig_const_table); + + +} + diff --git a/ttcommon/Util/InstrumentDB.py b/ttcommon/Util/InstrumentDB.py new file mode 100644 index 0000000..58439f8 --- /dev/null +++ b/ttcommon/Util/InstrumentDB.py @@ -0,0 +1,140 @@ +import os + +############## +## SOUNDS +############## + +class Instrument: + def __init__(self, id): + self.instrumentId = id + self.kitStage = False + self.volatile = None + + # build an Instrument instance from argument list + def loadFromArgs( self, name, csoundInstrumentId, register, loopStart, + loopEnd, crossDur, ampScale, kit, wav, img, category, nameTooltip = "" ): + self.name = name + self.csoundInstrumentId = csoundInstrumentId + self.instrumentRegister = register + self.loopStart = loopStart + self.loopEnd = loopEnd + self.crossDur = crossDur + self.ampScale = ampScale + self.kit = kit + self.wav = wav + self.img = img + self.category = category + self.nameTooltip = nameTooltip or name + + # build an Instrument instance by parsing a file + def loadFromPath(self, path ): + f = file(path, 'r') + magic = f.readline()[:-1] + if (magic != 'TamTam idf v1'): + raise 'given file has wrong header' + self.name = f.readline()[:-1] + self.csoundInstrumentId = float(f.readline()[:-1]) + self.register = f.readline()[:-1] + self.loopStart = float( f.readline()[:-1]) + self.loopEnd = float( f.readline()[:-1]) + self.crossDur = float( f.readline()[:-1]) + self.ampScale = float( f.readline()[:-1]) + self.kit = None + self.wav = f.readline()[:-1] + self.img = f.readline()[:-1] + self.category = f.readline() + f.close() + +class InstrumentDB: + + # initialize an empty InstrumentDB instance + def __init__(self): + self.labelSet = {'All':set([])} # <key> -> all instruments labelled by <key> + self.inst = [] # all instruments + self.instNamed = {} # <name> -> instrument with that name + self.instId = {} # <instrumentId> -> instrument + + # TEMP? add instrument from args + def addInstrumentFromArgs( self, name, csoundInstrumentId, register, loopStart, + loopEnd, crossDur, ampScale, kit, wav, img, category, + kitStage = False, volatile = False, nameTooltip = "" ): + i = Instrument(len(self.inst)) + self.inst += [ i ] + i.loadFromArgs( name, csoundInstrumentId, register, loopStart, loopEnd, crossDur, ampScale, kit, wav, img, category, nameTooltip ) + i.kitStage = kitStage + if volatile: i.volatile = 0 + self.instNamed[ i.name ] = i + self.instId[i.instrumentId] = i + + self.labelSet['All'].add(i) + if not self.labelSet.has_key(category): + self.labelSet[category] = set([]) + self.labelSet[category].add( i ) + + # add an instrument to the DB by reading from an instrument definition file + def addInstrument( self, path ): + from ttcommon.Util.CSoundClient import new_csound_client + csnd = new_csound_client() + i = Instrument(len(self.inst)) + self.inst += [ i ] + i.loadFromPath( path ) + self.instNamed[ i.name ] = i + self.instId[i.instrumentId] = i + #print 'labelSet... ', self.labelSet + self.labelSet['All'].add(i) + if not self.labelSet.has_key(category): + self.labelSet[category] = set([]) + self.labelSet[category].add( i ) + csnd.load_instrument(i.name) + + # try to load each file in a given folder as an instrument def. file + def scanInstrumentDir( self, path ): + dirlist = os.listdir( path ) + for fpath in dirlist: + try : + self.addInstrument( path + fpath ) + except : + print 'ERROR: scanning instrument path %s: file %s invalid' % (path, fpath) + + def getLabels( self ): + return self.labelSet.keys() + + def getSet( self, label ): + return self.labelSet[label] + + def getInstrument( self, id ): + return self.instId[id] + + def getInstrumentByName( self, name ): + try: + return self.instNamed[ name ] + except: + print "Instrument not found: ", name + return self.inst[0] + + def debug_summarize(self): + for i in self.inst: + print i.id, i.name + + for l in self.labelSet: + print l, [ i.name for i in self.labelSet[l]] + + +db_instance = None +def getRef(): + global db_instance + if (None == db_instance): + db_instance = InstrumentDB() + return db_instance + + +if __name__ == "__main__": + i1 = getRef() + i2 = getRef() + + print i1, i2 + + import sys + i1.scanInstrumentDir( sys.argv[1] ) + + i1.debug_summarize() diff --git a/ttcommon/Util/Instruments.py b/ttcommon/Util/Instruments.py new file mode 100644 index 0000000..da8ec92 --- /dev/null +++ b/ttcommon/Util/Instruments.py @@ -0,0 +1,680 @@ +import os +from gettext import gettext as _ + +import ttcommon.Config as Config +from ttcommon.Config import imagefile +import ttcommon.Util.InstrumentDB as InstrumentDB + +LOW = Config.LOW +MID = Config.MID +HIGH = Config.HIGH +PUNCH = Config.PUNCH + +INSTRUMENT_TABLE_OFFSET = Config.INSTRUMENT_TABLE_OFFSET +INST_FREE = Config.INST_FREE +INST_TIED = Config.INST_TIED +INST_SIMP = Config.INST_SIMP +INST_PERC = Config.INST_PERC + +instrumentDB = InstrumentDB.getRef() + + +def _addInstrument(name, csoundInstrumentId, instrumentRegister, category, + loopStart, loopEnd, crossDur, ampScale=1, kit=None, kitStage=False, + volatile=False, nameTooltip=""): + instrumentDB.addInstrumentFromArgs(name, csoundInstrumentId, + instrumentRegister, loopStart, loopEnd, crossDur, ampScale, kit, + name, imagefile(name + '.png'), category, kitStage=kitStage, + volatile=volatile, nameTooltip=nameTooltip) + +if Config.FEATURES_MIC: + _addInstrument("mic1", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1, volatile=True) + _addInstrument("mic2", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1, volatile=True) + _addInstrument("mic3", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1, volatile=True) + _addInstrument("mic4", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1, volatile=True) + +if Config.FEATURES_LAB: + _addInstrument("lab1", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1, volatile=True) + _addInstrument("lab2", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1, volatile=True) + _addInstrument("lab3", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1, volatile=True) + _addInstrument("lab4", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1, volatile=True) + _addInstrument("lab5", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1, volatile=True) + _addInstrument("lab6", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1, volatile=True) + +_addInstrument('ounk', INST_SIMP, MID, 'animals', + 0, 0, 0, 1, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Guinea_pig + nameTooltip=_('Guinea Pig')) +_addInstrument('gam', INST_TIED, HIGH, 'percussions', + .69388, .7536, .02922, 1.4, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Gamelan + nameTooltip=_('Gamelan')) +_addInstrument('guit', INST_TIED, MID, 'strings', + .08592, .75126, .33571, 0.7, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Electric_guitar + nameTooltip=_('Electric Guitar')) +_addInstrument('guitmute', INST_SIMP, MID, 'strings', + 0, 0, 0, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Electric_guitar + nameTooltip=_('Electric Guitar')) +_addInstrument('guitshort', INST_SIMP, MID, 'strings', + 0, 0, 0, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Electric_guitar + nameTooltip=_('Electric Guitar')) +_addInstrument('koto', INST_TIED, HIGH, 'strings', + .56523, .70075, .05954, 1, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Koto_%28musical_instrument%29 + nameTooltip=_('Koto')) +_addInstrument('banjo', INST_TIED, MID, 'strings', + .8928046875, 1.6325390625, .0525, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Banjo + nameTooltip=_('Banjo')) +_addInstrument('ukulele', INST_TIED, MID, 'strings', + .64097090625, 1.0887984375, .17375, 0.35, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Ukulele + nameTooltip=_('Ukulele')) +_addInstrument('harpsichord', INST_TIED, MID, 'keyboard', + .57529609375, .936075, .2, 0.35, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Harpsichord + nameTooltip=_('Harpsichord')) +_addInstrument('clarinette', INST_TIED, MID, 'winds', + 1.635276375, 2.72956523438, .2, 0.3, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Clarinet + nameTooltip=_('Clarinet')) +_addInstrument('flute', INST_TIED, MID, 'winds', + .47169, .53693, .02481, 1.3, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Flute + nameTooltip=_('Flute')) +_addInstrument("drum1hatpedal", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1hatshoulder", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1hardride", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1ridebell", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1snare", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1snaresidestick", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1crash", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1splash", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1tom", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1floortom", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1chine", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum1kick", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument('piano', INST_TIED, MID, 'keyboard', + 0.8883, 1.420524, .13575, 1, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Piano + nameTooltip=_('Piano')) +_addInstrument('dog', INST_SIMP, MID, 'animals', + 0, 0, 0, 1, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Dog + nameTooltip=_('Dog')) +_addInstrument('chiken', INST_TIED, MID, 'animals', + .1972125, .8689675781, .02, 0.5, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Chicken + nameTooltip=_('Chicken')) +_addInstrument('duck', INST_SIMP, MID, 'animals', + 0, 0, 0, 0.7, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Duck + nameTooltip=_('Duck')) +_addInstrument('armbone', INST_SIMP, MID, 'people', + 0, 0, 0, 0.8, + # TRANS: The sound made by a person doing this + # TRANS: http://en.wikipedia.org/wiki/Blowing_a_raspberry + nameTooltip=_('Raspberry')) +_addInstrument("drum2darbukadoom", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2darbukapied", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2darbukapiedsoft", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2hatflanger", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2darbukatak", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2darbukafinger", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2darbukaroll", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2darbukaslap", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2hatpied", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2tambourinepied", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2hatpied2", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum2tambourinepiedsoft", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3cowbell", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3cowbelltip", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3cup", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3djembelow", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3djembemid", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3djembesidestick", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3djembeslap", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3djembestickmid", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3metalstand", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3pedalperc", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3rainstick", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3tambourinehigh", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum3tambourinelow", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument('harmonica', INST_TIED, MID, 'winds', + .1531, .19188, .01792, 1, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Harmonica + nameTooltip=_('Harmonica')) +_addInstrument('alarm', INST_TIED, MID, 'concret', + 1.37555859375, 2.0286015625, .0675, 0.4, + # TRANS: The sound of an alarm bell + nameTooltip=_('Alarm')) +_addInstrument('bird', INST_TIED, MID, 'animals', + .1, 1, .05, 1, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Bird + nameTooltip=_('Bird')) +_addInstrument('frogs', INST_TIED, MID, 'animals', + 1.954453125, 4.350234375, .2, 0.5, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Frog + nameTooltip=_('Frog')) +_addInstrument('cat', INST_SIMP, MID, 'animals', + 0, 0, 0, 0.8, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Cat + nameTooltip=_('Cat')) +_addInstrument('cow', INST_SIMP, MID, 'animals', + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Cow + 0, 0, 0, 0.7, nameTooltip=_('Cow')) +_addInstrument('cricket', INST_SIMP, MID, 'animals', + 0, 0, 0, 0.5, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Cricket_%28insect%29 + nameTooltip=_('Cricket')) +_addInstrument('duck2', INST_SIMP, MID, 'animals', + 0, 0, 0, 1, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Duck + nameTooltip=_('Duck')) +_addInstrument('bottle', INST_TIED, MID, 'concret', + .20532, .41064, .05292, 0.8, + # TRANS: The sound of a bottle being hit + # TRANS: http://en.wikipedia.org/wiki/Bottle + nameTooltip=_('Bottle')) +_addInstrument('clang', INST_SIMP, MID, 'concret', + 0, 0, 0, 0.8, + # TRANS: The sound of a garbage can + nameTooltip=_('Dump')) +_addInstrument('clang2', INST_SIMP, MID, 'percussions', + 0, 0, 0, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Cymbal + nameTooltip=_('Cymbal')) +_addInstrument('ow', INST_SIMP, MID, 'people', + 0, 0, 0, 1, + # TRANS: The sound of a person being hit + nameTooltip=_('Ow')) +_addInstrument('hey', INST_SIMP, MID, 'people', + 0, 0, 0, 0.5, + # TRANS: A surprised shout + nameTooltip=_('Hey')) +_addInstrument('sheep', INST_SIMP, MID, 'animals', + 0, 0, 0, 1, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Sheep + nameTooltip=_('Sheep')) +_addInstrument('water', INST_SIMP, MID, 'concret', + 0, 0, 0, 1, + # TRANS: The sound of water splashing + # TRANS: http://en.wikipedia.org/wiki/Water + nameTooltip=_('Water')) +_addInstrument('zap', INST_TIED, MID, 'concret', + .299, .7323, .09895, 0.8, + # TRANS: A science-fiction ray gun sound + nameTooltip=_('Ray Gun')) +_addInstrument('trumpet', INST_TIED, MID, 'winds', + .91195, 1.652909375, .05375, 0.3, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Trumpet + nameTooltip=_('Trumpet')) +_addInstrument('clavinet', INST_TIED, MID, 'keyboard', + .6398328125, .9401625, .094, 0.4, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Clavinet + nameTooltip=_('Clavinet')) +_addInstrument('flugel', INST_TIED, MID, 'winds', + 1.291740625, 2.37588007813, .065, 0.3, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Flugelhorn + nameTooltip=_('Flugelhorn')) +_addInstrument('foghorn', INST_TIED, LOW, 'winds', + 2.07005, 3.758775, .2, 0.5, + # TRANS: The sound of a fog horn or ship horn + nameTooltip=_('Foghorn')) +_addInstrument('bubbles', INST_TIED, MID, 'concret', + 0.02, 1.177, 0.02, 0.7, + # TRANS: The sound of air bubbling through water + nameTooltip=_('Bubbles')) +_addInstrument('marimba', INST_TIED, MID, 'percussions', + .18883789, .343623047, .07625, 0.4, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Marimba + nameTooltip=_('Marimba')) +_addInstrument('triangle', INST_TIED, MID, 'percussions', + 2.27261836, 3.2965453, .2, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Triangle_%28instrument%29 + nameTooltip=_('Triangle')) +_addInstrument('fingercymbals', INST_TIED, HIGH, 'percussions', + 1.29635195312, 1.92448125, .094, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Finger_cymbals + nameTooltip=_('Fingercymbals')) +_addInstrument('laugh', INST_SIMP, MID, 'people', + 0, 0, 0, 1, + # TRANS: The sound of a laugh + nameTooltip=_('Laugh')) +_addInstrument('babylaugh', INST_TIED, MID, 'people', + 0.72920078, 1.63253906, 0.01, 0.3, + # TRANS: The sound of a baby laughing + nameTooltip=_('Baby Laugh')) +_addInstrument('babyuhoh', INST_SIMP, MID, 'people', + 0, 0, 0, 0.3, + # TRANS: The sound of a child making a mistake + nameTooltip=_('Baby Uh-oh')) +_addInstrument('voix', INST_TIED, MID, 'people', + .89608, .96092, .02343, 0.8, + # TRANS: A synthesized voice sound + nameTooltip=_('Voice')) +_addInstrument('cling', INST_TIED, MID, 'concret', + .09096, .7878, .18026, 0.7, + # TRANS: A tinkling sound + nameTooltip=_('Cling')) +_addInstrument('byke', INST_SIMP, MID, 'concret', + 0, 0, 0, 1, + # TRANS: The sound of a bicycle bell + # TRANS: http://en.wikipedia.org/wiki/Bicycle + nameTooltip=_('Bicycle bell')) +_addInstrument('door', INST_SIMP, MID, 'concret', + 0, 0, 0, 1, + # TRANS: The sound of a door slamming shut + nameTooltip=_('Door')) +_addInstrument('basse', INST_TIED, MID, 'strings', + 0.50470875, 0.833315, 0.09375, 1.4, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Electric_bass + nameTooltip=_('Electric Bass')) +_addInstrument('acguit', INST_TIED, MID, 'strings', + 0.5123225, 0.7491675, 0.08475, 0.5, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Acoustic_guitar + nameTooltip=_('Acoustic Guitar')) +_addInstrument('diceinst', INST_SIMP, MID, 'concret', + 0, 0, 0, 1.3, + # TRANS: The sound of tumbling + # TRANS: http://en.wikipedia.org/wiki/Dice + nameTooltip=_('Dice')) +_addInstrument('didjeridu', INST_TIED, LOW, 'winds', + .55669, 1.73704, .09178, 1.5, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Didjeridu + nameTooltip=_('Didjeridu')) +_addInstrument('harmonium', INST_TIED, MID, 'keyboard', + .242032, .898165625, .2, 0.6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Harmonium + nameTooltip=_('Harmonium')) +_addInstrument('horse', INST_SIMP, MID, 'animals', + 0, 0, 0, 0.6, + # TRANS: The sound made by this animal + # TRANS: http://en.wikipedia.org/wiki/Horse + nameTooltip=_('Horse')) +_addInstrument('kalimba', INST_TIED, MID, 'percussions', + .20751, .30161, .04658, 1.3, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Thumb_piano + nameTooltip=_('Kalimba')) +_addInstrument('mando', INST_TIED, MID, 'strings', + 0.507107031, 0.934144531, 0.2, 0.5, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Mandolin + nameTooltip=_('Mandolin')) +_addInstrument('ocarina', INST_TIED, MID, 'winds', + .06612, .19033, .01776, 0.8, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Ocarina + nameTooltip=_('Ocarina')) +_addInstrument('rhodes', INST_TIED, MID, 'keyboard', + 0.58100625, 0.821625, 0.067, 0.7, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Rhodes_piano + nameTooltip=_('Rhodes')) +_addInstrument('saxo', INST_TIED, MID, 'winds', + .53722, .6583, .05264, 0.25, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Saxophone + nameTooltip=_('Saxophone')) +_addInstrument('saxsoprano', INST_TIED, HIGH, 'winds', + .90721015625, 1.71199335938, .07675, 0.25, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Soprano_saxophone + nameTooltip=_('Soprano Saxophone')) +_addInstrument('shenai', INST_TIED, MID, 'winds', + .29003, .33072, .00634, 0.5, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Shehnai + nameTooltip=_('Shehnai')) +_addInstrument('sitar', INST_TIED, MID, 'strings', + 1.1361625, 1.575134375, .183, 0.3, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Sitar + nameTooltip=_('Sitar')) +_addInstrument('tuba', INST_TIED, LOW, 'winds', + .51063, .58384, .035, 1.2, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Tuba + nameTooltip=_('Tuba')) +_addInstrument('violin', INST_TIED, MID, 'strings', + .105, .30656, .028, 1, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Violin + nameTooltip=_('Violin')) +_addInstrument("guidice1", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice2", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice3", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice4", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice5", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice6", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice7", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice8", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice9", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("guidice10", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4afrofeet", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4fingersn", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4mutecuic", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4stompbass", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tambouri", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr707clap", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr707open", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr808closed", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr808sn", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr909bass", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr909kick", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum4tr909sn", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5timablesslap", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5congagraveouvert", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5timablesaiguslap", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5congagraveferme", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5guiroretour", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5vibraslap", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5congaaiguouvert", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5quicamedium", INST_SIMP, PUNCH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5quicaaigu", INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5agogograve", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5bongoaiguouvert", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5agogoaigu", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum5bongograveouvert", INST_SIMP, HIGH, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument('camera', INST_SIMP, MID, 'concret', + 0, 0, 0, 1, + # TRANS: The sound of a camera shutter + # TRANS: http://en.wikipedia.org/wiki/Camera + nameTooltip=_('Camera')) +_addInstrument('car', INST_TIED, MID, 'concret', + .67, 1.05761, .01, 0.6, + # TRANS: The sound of a car starting + nameTooltip=_('Car')) +_addInstrument('carhorn', INST_SIMP, MID, 'concret', + 0, 0, 0, 0.4, + # TRANS: The sound of a car horn honking + nameTooltip=_('Car Horn')) +_addInstrument('cello', INST_TIED, MID, 'strings', + 0.4761, 0.92244375, 0.19125, .6, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Cello + nameTooltip=_('Cello')) +_addInstrument('chimes', INST_TIED, MID, 'percussions', + 4.104825, 5.644134375, .02, 1, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Chimes + nameTooltip=_('Chimes')) +_addInstrument("crash", INST_SIMP, MID, 'concret', + 0, 0, 0, 1, + # TRANS: The sound of glass breaking + nameTooltip=_("Crash")) +_addInstrument("guit2", INST_TIED, MID, 'strings', + 1.186341406, 1.929568266, .2, 0.25, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Electric_guitar + nameTooltip=_("Electric Guitar")) +_addInstrument('plane', INST_SIMP, MID, 'concret', + 0, 0, 0, 0.6, + # TRANS: The sound of this vehicle + # TRANS: http://en.wikipedia.org/wiki/Airplane + nameTooltip=_('Plane')) +_addInstrument('slap', INST_SIMP, MID, 'concret', + 0, 0, 0, 0.7, + # TRANS: The sound of something being hit + nameTooltip=_('Slap')) +_addInstrument('templebell', INST_SIMP, MID, 'percussions', + 0, 0, 0, 1, + # TRANS: The sound made by a bell + nameTooltip=_('Temple Bell')) +_addInstrument('sarangi', INST_SIMP, MID, 'strings', + 0, 0, 0, 1, + # TRANS: The sound made by this instrument + # TRANS: http://en.wikipedia.org/wiki/Sarangi + nameTooltip=_('Sarangi')) +_addInstrument("drum6madal00", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal01", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal02", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal03", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal04", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal05", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal06", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal07", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal08", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal09", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal10", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal11", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument("drum6madal12", INST_SIMP, LOW, 'percussions', + 0, 0, 0, 1, kitStage=True) +_addInstrument('au_pipes', INST_TIED, MID, 'winds', + 0, 1, 0, 0.9, + # TRANS: The sound of a Solomon Islands pipe, named "'au tahana" + # TRANS: http://www.jstor.org/pss/851365 + nameTooltip=_('\'au tahana')) + +if Config.FEATURES_NEWSOUNDS: + try: + files = os.listdir(Config.SNDS_INFO_DIR) + for file in files: + instrumentDB.addInstrument(Config.SNDS_INFO_DIR + '/' + file) + except: + pass + +#jamId = os.path.split(os.path.realpath("/home/olpc/isolation/1/bundle_id_to_gid/org.laptop.TamTamJam"))[1] + + +DRUM1KIT = {24: "drum1kick", + 26: "drum1floortom", + 28: "drum1tom", + 30: "drum1chine", + 32: "drum1splash", + 34: "drum1crash", + 36: "drum1snaresidestick", + 38: "drum1snaresidestick", + 40: "drum1snare", + 42: "drum1ridebell", + 44: "drum1hardride", + 46: "drum1hatshoulder", + 48: "drum1hatpedal"} + +DRUM2KIT = {24: "drum2darbukadoom", + 26: "drum2darbukapied", + 28: "drum2darbukapiedsoft", + 30: "drum2hatflanger", + 32: "drum2darbukatak", + 34: "drum2darbukatak", + 36: "drum2darbukafinger", + 38: "drum2darbukaroll", + 40: "drum2darbukaslap", + 42: "drum2hatpied", + 44: "drum2tambourinepied", + 46: "drum2hatpied2", + 48: "drum2tambourinepiedsoft"} + +DRUM3KIT = {24: "drum3djembelow", + 26: "drum3pedalperc", + 28: "drum3djembeslap", + 30: "drum3tambourinehigh", + 32: "drum3tambourinelow", + 34: "drum3rainstick", + 36: "drum3djembemid", + 38: "drum3djembesidestick", + 40: "drum3djembestickmid", + 42: "drum3cowbell", + 44: "drum3cowbelltip", + 46: "drum3cup", + 48: "drum3metalstand"} + +DRUM4KIT = {24: "drum4afrofeet", + 26: "drum4tr909kick", + 28: "drum4tr909bass", + 30: "drum4stompbass", + 32: "drum4tr707open", + 34: "drum4mutecuic", + 36: "drum4tr808sn", + 38: "drum4tr707clap", + 40: "drum4tr909sn", + 42: "drum4tambouri", + 44: "drum4fingersn", + 46: "drum4fingersn", + 48: "drum4tr808closed"} + +DRUM5KIT = {24: "drum5timablesslap", + 26: "drum5timablesaiguslap", + 28: "drum5congagraveouvert", + 30: "drum5quicamedium", + 32: "drum5guiroretour", + 34: "drum5vibraslap", + 36: "drum5congagraveferme", + 38: "drum5quicaaigu", + 40: "drum5congaaiguouvert", + 42: "drum5agogoaigu", + 44: "drum5bongograveouvert", + 46: "drum5agogograve", + 48: "drum5bongoaiguouvert"} + +DRUM6KIT = {24: "drum6madal00", + 26: "drum6madal01", + 28: "drum6madal02", + 30: "drum6madal03", + 32: "drum6madal04", + 34: "drum6madal05", + 36: "drum6madal06", + 38: "drum6madal07", + 40: "drum6madal08", + 42: "drum6madal09", + 44: "drum6madal10", + 46: "drum6madal11", + 48: "drum6madal12"} + +_addInstrument("drum1kit", 0, 0, "percussions", 0, 0, 0, 1, DRUM1KIT, + # TRANS: http://en.wikipedia.org/wiki/Drum_set + nameTooltip=_('Jazz / Rock Kit')) +_addInstrument("drum2kit", 0, 0, "percussions", 0, 0, 0, 1, DRUM2KIT, + nameTooltip=_('African Kit')) +_addInstrument("drum3kit", 0, 0, "percussions", 0, 0, 0, 1, DRUM3KIT, + nameTooltip=_('Arabic Kit')) +_addInstrument("drum4kit", 0, 0, "percussions", 0, 0, 0, 1, DRUM4KIT, + nameTooltip=_('Electronic Kit')) +_addInstrument("drum5kit", 0, 0, "percussions", 0, 0, 0, 1, DRUM5KIT, + nameTooltip=_('South American Kit')) +_addInstrument("drum6kit", 0, 0, "percussions", 0, 0, 0, 1, DRUM6KIT, + nameTooltip=_('Nepali')) + +DRUMCOUNT = 6 diff --git a/ttcommon/Util/NoteDB.py b/ttcommon/Util/NoteDB.py new file mode 100644 index 0000000..de836b6 --- /dev/null +++ b/ttcommon/Util/NoteDB.py @@ -0,0 +1,813 @@ +import ttcommon.Util.InstrumentDB as InstrumentDB +import ttcommon.Config as Config + +class PARAMETER: + PAGE_BEATS, \ + PAGE_COLOR, \ + ONSET, \ + PITCH, \ + AMPLITUDE, \ + DURATION, \ + INSTRUMENT, \ + PAN, \ + REVERB, \ + ATTACK, \ + DECAY, \ + FILTERTYPE, \ + FILTERCUTOFF, \ + INSTRUMENT2 \ + = range(14) #python-stye enum + +class Note: + def __init__( self, page, track, id, cs ): + self.page = page + self.track = track + self.id = id + self.cs = cs + + self.csStack = [] + + def pushState( self ): + self.csStack.append( self.cs.clone() ) + + def popState( self ): + self.cs = self.csStack.pop() + +class Page: + def __init__( self, beats, color = 0, instruments = False, local = True ): # , tempo, insruments, color = 0 ): + self.instrumentDB = InstrumentDB.getRef() + self.beats = beats + self.ticks = beats*Config.TICKS_PER_BEAT + + self.color = color + + if not instruments: + self.instruments = [ self.instrumentDB.instNamed["kalimba"].instrumentId for i in range(Config.NUMBER_OF_TRACKS-1) ] + [ self.instrumentDB.instNamed["drum1kit"].instrumentId ] + else: + self.instruments = instruments[:] + + self.local = local # page local/global? + + self.nextNoteId = 0 # first note will be 1 + + def genId( self ): + self.nextNoteId += 1 + if self.nextNoteId == 65536: # short + print "note id overflow!" + # TODO think of how to handle this!? + return self.nextNoteId + + def setLocal( self, local ): + self.local = local + +class PageListener: + def notifyPageAdd( self, id, at ): + pass + + def notifyPageDelete( self, which, safe ): + pass + + def notifyPageDuplicate( self, new, at ): + pass + + def notifyPageMove( self, which, low, high ): + pass + + def notifyPageUpdate( self, which, parameter, value ): + pass + +class NoteListener: + def notifyNoteAdd( self, page, track, id ): + pass + def notifyNoteDelete( self, page, track, id ): + pass + def notifyNoteUpdate( self, page, track, id, parameter, value ): + pass + +class NoteDB: + def __init__( self ): + self.instrumentDB = InstrumentDB.getRef() + self.noteD = {} # bins containing all the notes by page, track, and id + # structure self.noteD[pageId][trackIndex][noteId] + + self.noteS = {} # bins containing all the notes by page and track + # first sorted by onset then by pitch (for drum hits) + # structure self.noteS[pageId][trackIndex][noteIndex] + + self.pages = {} # dict of Pages indexed by pageId + + self.tune = [] # list of pageIds ordered by tune + + #self.beatsBefore = {} # count of beats on previous pages indexed by page id + + self.listeners = [] # complete list of listeners + self.pageListeners = [] # list of listeners who want page notifications + self.noteListeners = [] # list of listeners who want note notifications + self.parasiteList = {} # dict of parasites indexed by listener + + self.parasiteD = {} # bin of parasites indexed by listener + self.parasiteS = {} # parasites sorted as in self.noteS, + + self.nextId = 0 # base id, first page will be 1 + + self.clipboard = [] # stores copied cs notes + self.clipboardArea = [] # stores the limits and tracks for each page in the clipboard + + def dumpToStream( self, ostream, localOnly = False ): + for pid in self.tune: + if not localOnly or self.pages[pid].local: + ostream.page_add(pid, self.pages[pid]) + for note in self.getNotesByPage( pid ): + ostream.note_add( note ) + + #-- private -------------------------------------------- + def _genId( self ): + self.nextId += 1 + if self.nextId == 65536: # short + print "page id overflow!" + # TODO think of how to handle this!? + return self.nextId + + #======================================================= + # Page Functions + + def addPage( self, pid, page, after = False ): + pid = self._newPage( pid, page ) + at = self._insertPage( pid, after ) + + #self._updateBeatsBefore( at ) + + for l in self.pageListeners: + l.notifyPageAdd( pid, at ) + + return pid + + def deletePages( self, which, instruments = False ): + beats = self.pages[self.tune[0]].beats + + low = 999999 + ind = -1 + for id in which: + ind = self.tune.index(id) + if ind < low: low = ind + + for t in range(Config.NUMBER_OF_TRACKS): + for n in self.noteD[id][t].keys(): + self.deleteNote( id, t, n ) + + #del self.beatsBefore[id] + + del self.noteD[id] + del self.noteS[id] + del self.parasiteD[id] + del self.parasiteS[id] + del self.pages[id] + + at = self.tune.index( id ) + self.tune.pop(at) + + if not len(self.tune): + self.addPage( -1, Page(beats, instruments = instruments) ) # always have at least one page + safe = self.tune[0] + #self._updateBeatsBefore(0) + else: + safe = self.tune[max(ind-1,0)] + #self._updateBeatsBefore(low) + + for l in self.pageListeners: + l.notifyPageDelete( which, safe ) + + def duplicatePages( self, which, after = False ): + sorted = [] + if after: first = self.tune.index(after)+1 + else: first = 0 + + i = j = 0 + while i < len(self.tune) and j < len(which): + if self.tune[i] in which: + sorted.append(self.tune[i]) + j += 1 + i += 1 + + new = {} + for cp in sorted: + id = self._newPage( -1, Page(self.pages[cp].beats,self.pages[cp].color,self.pages[cp].instruments) ) + self._insertPage( id, after ) + after = id + new[cp] = id + + #self._updateBeatsBefore( first ) + + for l in self.pageListeners: + l.notifyPageDuplicate( new, first ) + + for cp in sorted: + for t in range(Config.NUMBER_OF_TRACKS): + for n in self.noteD[cp][t].keys(): + self.duplicateNote( cp, t, n, new[cp], t, 0 ) + + return new + + def movePages( self, which, after = False ): + sorted = [] + if after: at = self.tune.index(after)+1 + else: at = 0 + low = high = at + + i = j = 0 + while i < len(self.tune): + if self.tune[i] in which: + sorted.append(self.tune[i]) + self.tune.pop(i) + if i < low: low = i + if i > high: high = i + if i < at: at -= 1 + j += 1 + else: + i += 1 + + self.tune = self.tune[:at] + sorted + self.tune[at:] + + #self._updateBeatsBefore( low ) + + for l in self.pageListeners: + l.notifyPageMove( sorted, low, high ) + + def updatePage( self, page, parameter, value ): + if parameter == PARAMETER.PAGE_BEATS: + ticks = value*Config.TICKS_PER_BEAT + if self.pages[page].beats > value: # crop some notes + dstream = [] + ustream = [] + for track in range(Config.NUMBER_OF_TRACKS): + dsub = [] + usub = [] + for note in self.getNotesByTrack(page, track): + if ticks <= note.cs.onset: + dsub.append( note.id ) + elif ticks < note.cs.onset + note.cs.duration: + usub.append( note.id ) + usub.append( ticks - note.cs.onset ) + if len(dsub): + dstream += [ page, track, len(dsub) ] + dsub + if len(usub): + ustream += [ page, track, PARAMETER.DURATION, len(usub)//2 ] + usub + if len(dstream): + self.deleteNotes( dstream + [-1] ) + if len(ustream): + self.updateNotes( ustream + [-1] ) + + self.pages[page].beats = value + self.pages[page].ticks = ticks + #self._updateBeatsBefore(self.tune.index(page)) + elif parameter == PARAMETER.PAGE_COLOR: + self.pages[page].color = value + + for l in self.pageListeners: + l.notifyPageUpdate( page, parameter, value ) + + # stream format: + # parameter id + # number of following pages (N) + # page id + # value + def updatePages( self, stream ): + i = [-1] + parameter = self._readstream(stream,i) + N = self._readstream(stream,i) + for j in range(N): + page = self._readstream(stream,i) + val = self._readstream(stream,i) + self.updatePage( page, parameter, val ) + + def getInstruments(self, pages): + dict = {} + for page in pages: + list = [] + for track in range(Config.NUMBER_OF_TRACKS): + list.append(self.instrumentDB.instId[self.pages[page].instruments[track]].name) + dict[page] = list[:] + return dict + + #-- private -------------------------------------------- + def _newPage( self, pid, page ): + if pid == -1 : pid = self._genId() + self.pages[pid] = page + self.noteD[pid] = [ {} for i in range(Config.NUMBER_OF_TRACKS) ] + self.noteS[pid] = [ [] for i in range(Config.NUMBER_OF_TRACKS) ] + self.parasiteD[pid] = [ {} for i in range(Config.NUMBER_OF_TRACKS) ] + self.parasiteS[pid] = [ {} for i in range(Config.NUMBER_OF_TRACKS) ] + for i in range(Config.NUMBER_OF_TRACKS): + for par in self.parasiteList.keys(): + self.parasiteD[pid][i][par] = {} + self.parasiteS[pid][i][par] = [] + return pid + + def _insertPage( self, pid, after ): + if not after: at = 0 + else: at = self.tune.index(after)+1 + self.tune.insert( at, pid ) + + return at + + #def _updateBeatsBefore( self, ind ): + # if ind == 0: beats = 0 + # else: beats = self.beatsBefore[self.tune[ind-1]] + self.pages[self.tune[ind-1]].beats + # for i in range(ind, len(self.tune)): + # self.beatsBefore[self.tune[ind]] = beats + # beats += self.pages[self.tune[ind]].beats + + + + #======================================================= + # Track Functions + + def setInstrument( self, pages, track, instrumentId ): + stream = [] + for page in pages: + self.pages[page].instruments[track] = instrumentId + notes = self.getNotesByTrack( page, track ) + sub = [] + for note in notes: + sub.append( note.id ) + sub.append( instrumentId ) + if len(sub): + stream += [ page, track, PARAMETER.INSTRUMENT, len(sub)//2 ] + sub + if len(stream): + self.updateNotes( stream + [-1] ) + + def setInstrument2( self, pages, track, instrumentId ): + stream = [] + for page in pages: + #self.pages[page].instruments[track] = instrumentId + notes = self.getNotesByTrack( page, track ) + sub = [] + for note in notes: + sub.append( note.id ) + sub.append( instrumentId ) + if len(sub): + stream += [ page, track, PARAMETER.INSTRUMENT2, len(sub)//2 ] + sub + if len(stream): + self.updateNotes( stream + [-1] ) + + #======================================================= + # Note Functions + + def addNote( self, nid, page, track, cs, hint = False ): + if nid == -1: nid = self.pages[page].genId() + n = self.noteD[page][track][nid] = Note( page, track, nid, cs ) + + if not hint: at = 0 + else: at = hint[0] + while at > 0: + onset = self.noteS[page][track][at-1].cs.onset + if onset <= cs.onset: + if onset <= cs.onset: break + elif self.noteS[page][track][at-1].cs.pitch <= cs.pitch: break + at -= 1 + last = len(self.noteS[page][track]) + while at < last: + onset = self.noteS[page][track][at].cs.onset + if onset >= cs.onset: + if onset > cs.onset: break + elif self.noteS[page][track][at].cs.pitch > cs.pitch: break + at += 1 + + self.noteS[page][track].insert( at, n ) + + for par in self.parasiteList.keys(): + parasite = self.parasiteList[par]( self, par, n ) + self.parasiteD[page][track][par][nid] = parasite.attach() # give parasites the option of return something other than themselves + self.parasiteS[page][track][par].insert( at, parasite.attach() ) + + if hint: hint[0] = at + 1 # assume the next note will fall after this one + + for l in self.noteListeners: + l.notifyNoteAdd( page, track, nid ) + + return nid + + # stream format: + # page id + # track index + # number of following notes (N) + # cs pointer + # ... up to N + # page id or -1 to exit + def addNotes( self, stream ): + new = {} + i = [-1] + p = self._readstream(stream,i) + while p != -1: + if p not in new: + new[p] = [ [] for x in range(Config.NUMBER_OF_TRACKS) ] + t = self._readstream(stream,i) + N = self._readstream(stream,i) + hint = [0] + for j in range(N): + new[p][t].append( self.addNote( -1, p, t, self._readstream(stream,i), hint ) ) + p = self._readstream(stream,i) + + return new + + def deleteNote( self, page, track, id ): + ind = self.noteS[page][track].index( self.noteD[page][track][id] ) + + for par in self.parasiteList.keys(): + self.parasiteD[page][track][par][id].destroy() + self.parasiteS[page][track][par].pop(ind) + del self.parasiteD[page][track][par][id] + + self.noteS[page][track].pop(ind) + del self.noteD[page][track][id] + + for l in self.noteListeners: + l.notifyNoteDelete( page, track, id ) + + # stream format: + # page id + # track index + # number of following notes (N) + # note id + # ... up to N + # page id or -1 to exit + def deleteNotes( self, stream ): + i = [-1] + p = self._readstream(stream,i) + while p != -1: + t = self._readstream(stream,i) + N = self._readstream(stream,i) + for j in range(N): + self.deleteNote( p, t, self._readstream(stream,i) ) + p = self._readstream(stream,i) + + def deleteNotesByTrack( self, pages, tracks ): + for p in pages: + for t in tracks: + notes = self.noteS[p][t][:] + for n in notes: + self.deleteNote( p, t, n.id ) + + def duplicateNote( self, page, track, id, toPage, toTrack, offset ): + cs = self.noteD[page][track][id].cs.clone() + cs.trackId = toTrack + cs.pageId = toPage + cs.onset += offset + ticks = self.pages[toPage].ticks + if cs.onset >= ticks: return False # off the end of the page + if cs.onset + cs.duration > ticks: + cs.duration = ticks - cs.onset + + return self.addNote( -1, toPage, toTrack, cs ) + + # stream format: + # page id + # track index + # toPage id + # toTrack index + # offset + # number of following notes (N) + # note id + # ... up to N + # page id or -1 to exit + def duplicateNotes( self, stream ): + i = [-1] + p = self._readstream(stream,i) + while p != -1: + t = self._readstream(stream,i) + toP = self._readstream(stream,i) + toT = self._readstream(stream,i) + offset = self._readstream(stream,i) + N = self._readstream(stream,i) + for j in range(N): + self.duplicateNote( p, t, self._readstream(stream,i), toP, toT, offset ) + p = self._readstream(stream,i) + + + def updateNote( self, page, track, id, parameter, value ): + if parameter == PARAMETER.ONSET: + self.noteD[page][track][id].cs.onset = value + self._resortNote( page, track, id ) + elif parameter == PARAMETER.PITCH: + self.noteD[page][track][id].cs.pitch= value + self._resortNote( page, track, id ) + elif parameter == PARAMETER.AMPLITUDE: + self.noteD[page][track][id].cs.amplitude = value + elif parameter == PARAMETER.DURATION: + self.noteD[page][track][id].cs.duration = value + elif parameter == PARAMETER.INSTRUMENT: + self.noteD[page][track][id].cs.instrumentId = value + elif parameter == PARAMETER.PAN: + self.noteD[page][track][id].cs.pan = value + elif parameter == PARAMETER.REVERB: + self.noteD[page][track][id].cs.reverbSend = value + elif parameter == PARAMETER.ATTACK: + self.noteD[page][track][id].cs.attack = value + elif parameter == PARAMETER.DECAY: + self.noteD[page][track][id].cs.decay = value + elif parameter == PARAMETER.FILTERTYPE: + self.noteD[page][track][id].cs.filterType = value + elif parameter == PARAMETER.FILTERCUTOFF: + self.noteD[page][track][id].cs.filterCutoff = value + elif parameter == PARAMETER.INSTRUMENT2: + self.noteD[page][track][id].cs.instrumentId2 = value + + for par in self.parasiteList.keys(): + self.parasiteD[page][track][par][id].updateParameter( parameter, value ) + + for l in self.noteListeners: + l.notifyNoteUpdate( page, track, id, parameter, value ) + + # stream format: + # page id + # track index + # parameter id + # number of following notes (N) + # note id + # value + # ... up to N + # page id or -1 to exit + def updateNotes( self, stream ): + i = [-1] + p = self._readstream(stream,i) + while p != -1: + t = self._readstream(stream,i) + param = self._readstream(stream,i) + N = self._readstream(stream,i) + for j in range(N): + self.updateNote( p, t, self._readstream(stream,i), param, self._readstream(stream,i) ) + p = self._readstream(stream,i) + + #-- private -------------------------------------------- + def _readstream( self, stream, i ): + i[0] += 1 + return stream[i[0]] + + def _resortNote( self, page, track, id ): + ins = out = self.noteS[page][track].index(self.noteD[page][track][id]) + cs = self.noteD[page][track][id].cs + while ins > 0: # check backward + onset = self.noteS[page][track][ins-1].cs.onset + if onset <= cs.onset: + if onset <= cs.onset: break + elif self.noteS[page][track][ins-1].cs.pitch <= cs.pitch: break + ins -= 1 + if ins == out: # check forward + ins += 1 + last = len(self.noteS[page][track]) + while ins < last: + onset = self.noteS[page][track][ins].cs.onset + if onset >= cs.onset: + if onset > cs.onset: break + elif self.noteS[page][track][ins].cs.pitch > cs.pitch: break + ins += 1 + + if ins != out: # resort + if ins > out: ins -= 1 + n = self.noteS[page][track].pop( out ) + self.noteS[page][track].insert( ins, n ) + for par in self.parasiteList.keys(): + p = self.parasiteS[page][track][par].pop( out ) + self.parasiteS[page][track][par].insert( ins, p ) + + + #======================================================= + # Clipboard Functions + + # stream format: + # page id + # track index + # number of following notes (N) + # note id + # ... up to N + # page id or -1 to exit + def notesToClipboard( self, stream ): + self.clipboard = [] + self.clipboardArea = [] + i = [-1] + pages = [] + p = self._readstream(stream,i) + while p != -1: + if p not in pages: + page = [ [] for x in range(Config.NUMBER_OF_TRACKS) ] + pageArea = { "limit": [ 99999, 0 ], + "tracks": [ 0 for x in range(Config.NUMBER_OF_TRACKS) ] } + pages.append(p) + self.clipboard.append(page) + self.clipboardArea.append(pageArea) + else: + ind = pages.index(p) + page = self.clipboard[ind] + pageArea = self.clipboardArea[ind] + t = self._readstream(stream,i) + pageArea["tracks"][t] = 1 + N = self._readstream(stream,i) + for j in range(N): + cs = self.noteD[p][t][self._readstream(stream,i)].cs.clone() + if cs.onset < pageArea["limit"][0]: pageArea["limit"][0] = cs.onset + if cs.onset + cs.duration > pageArea["limit"][1]: pageArea["limit"][1] = cs.onset + cs.duration + page[t].append( cs ) + p = self._readstream(stream,i) + + return self.clipboardArea + + def tracksToClipboard( self, pages, tracks ): + self.clipboard = [] + self.clipboardOrigin = [ 0, 0 ] + self.clipboardArea = [] + for p in pages: + page = [ [] for x in range(Config.NUMBER_OF_TRACKS) ] + pageArea = { "limit": [ 0, 99999 ], + "tracks": [ 0 for x in range(Config.NUMBER_OF_TRACKS) ] } + self.clipboard.append(page) + self.clipboardArea.append(pageArea) + for t in tracks: + pageArea["tracks"][t] = 1 + for id in self.noteD[p][t]: + cs = self.noteD[p][t][id].cs.clone() + page[t].append( cs ) + + return self.clipboardArea + + # trackMap = { X: Y, W: Z, ... }; X,W are track indices, Y,Z are clipboard indices + # instrumentMap = { X: Y, W: Z, ... }; X,W are track indices, Y,Z are instrument ids + def pasteClipboard( self, pages, offset, trackMap, instrumentMap = {} ): + if not len(self.clipboard): return + + deleteStream = [] + updateStream = [] + addStream = [] + + pp = 0 + ppMax = len(self.clipboard) + for p in pages: + ticks = self.pages[p].ticks + area = self.clipboardArea[pp] + area["limit"][0] += offset + area["limit"][1] += offset + for t in trackMap.keys(): + if not area["tracks"][trackMap[t]]: continue + if instrumentMap.has_key(t): + updateInstrument = True + instrumentId = instrumentMap[t] + else: + updateInstrument = False + tdeleteStream = [] + tupdateOStream = [] + tupdateDStream = [] + taddStream = [] + # clear area + for n in self.noteS[p][t]: + start = n.cs.onset + end = start + n.cs.duration + if area["limit"][0] <= start < area["limit"][1]: start = area["limit"][1] + if area["limit"][0] < end <= area["limit"][1]: end = area["limit"][0] + if start < area["limit"][0] and end > area["limit"][1]: end = area["limit"][0] + if end <= start: + tdeleteStream.append( n.id ) + elif start != n.cs.onset: + tupdateDStream += [ n.id, end - start ] + tupdateOStream += [ n.id, start ] + elif end != start + n.cs.duration: + tupdateDStream += [ n.id, end - start ] + if len(tdeleteStream): + deleteStream += [ p, t, len(tdeleteStream) ] + tdeleteStream + if len(tupdateOStream): + updateStream += [ p, t, PARAMETER.ONSET, len(tupdateOStream)//2 ] + tupdateOStream + if len(tupdateDStream): + updateStream += [ p, t, PARAMETER.DURATION, len(tupdateDStream)//2 ] + tupdateDStream + # paste notes + for cs in self.clipboard[pp][trackMap[t]]: + newcs = cs.clone() + newcs.onset += offset + if newcs.onset >= ticks: continue + if newcs.onset + newcs.duration > ticks: + newcs.duration = ticks - newcs.onset + newcs.pageId = p + newcs.trackId = t + if updateInstrument: + newcs.instrumentId = instrumentId + # TODO update any other parameters? + taddStream.append( newcs ) + if len(taddStream): + addStream += [ p, t, len(taddStream) ] + taddStream + + pp += 1 + if pp == ppMax: pp -= ppMax + + + + if len(deleteStream): + self.deleteNotes( deleteStream + [-1] ) + if len(updateStream): + self.updateNotes( updateStream + [-1] ) + if len(addStream): + return self.addNotes( addStream + [-1] ) + + return None + + def getClipboardArea( self, ind ): + N = len(self.clipboardArea) + while ind >= N: ind -= N + return self.clipboardArea[ind] + + #======================================================= + # Listener Functions + + def addListener( self, listener, parasite = None, page = False, note = False ): + if listener in self.listeners: + return # only one listener per object + + if parasite: + self.parasiteList[listener] = parasite + self._addParasite( listener, parasite ) + + if page: self.pageListeners.append( listener ) + if note: self.noteListeners.append( listener ) + self.listeners.append( listener ) + + def deleteListener( self, listener ): + self.listeners.remove( listener ) + if listener in self.pageListeners: + self.pageListeners.remove( listener ) + if listener in self.noteListeners: + self.noteListeners.remove( listener ) + if self.parasites.has_key( listener ): + self._deleteParasite( listener ) + del self.parasiteList[listener] + + #-- private -------------------------------------------- + def _addParasite( self, listener, parasite ): + for p in self.tune: + for t in range(Config.NUMBER_OF_TRACKS): + self.parasiteD[p][t][listener] = {} + self.parasiteS[p][t][listener] = [] + for n in self.noteD[p][t].keys(): + parasite( self, listener, self.noteD[p][t][n] ) + self.parasiteD[p][t][listener][n] = parasite.attach() # give parasites the option of returning something other than themselves + self.parasiteS[p][t][listener].insert( self.noteS[p][t].index( self.noteD[p][t][n]), parasite.attach() ) + + def _deleteParasite( self, listener ): + for p in self.tune: + for t in range(Config.NUMBER_OF_TRACKS): + for n in self.notes[p][t].keys(): + self.parasiteD[p][t][listener][n].destroy() + del self.parasiteD[p][t][listener] + del self.parasiteS[p][t][listener] + + #======================================================= + # Get Functions + + def getPageCount( self ): + return len(self.pages) + + def getTune( self ): + return self.tune + + def getPage( self, page ): + return self.pages[page] + + def getPageByIndex( self, ind ): + return self.tune[ind] + + def getPageIndex( self, page ): + return self.tune.index(page) + + # Not sure if this is useful! + #def getBeatsBeforePage( self, page ): + # return self.beatsBefore[page] + + def getNote( self, page, track, id, listener = None ): + if listener: + return self.parasiteD[page][track][listener][id] + return self.noteD[page][track][id] + + def getNotesByPage( self, page, listener = None ): + notes = [] + if listener: + for i in range(Config.NUMBER_OF_TRACKS): + notes.extend( self.parasiteS[page][i][listener] ) + else: + for i in range(Config.NUMBER_OF_TRACKS): + notes.extend( self.noteS[page][i] ) + return notes + + + def getNotesByTrack( self, page, track, listener = None ): + if listener: + return self.parasiteS[page][track][listener] + else: + return self.noteS[page][track] + + def getNotes(self, listener = None ): + notes = [] + for p in self.pages: + notes.extend( self.getNotesByPage(p, listener ) ) + return notes + + + def getCSNotesByPage( self, page ): + return map( lambda n: n.cs, self.getNotesByPage( page ) ) + + def getCSNotesByTrack( self, page, track ): + return map( lambda n: n.cs, self.getNotesByTrack( page, track ) ) diff --git a/ttcommon/Util/__init__.py b/ttcommon/Util/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/Util/__init__.py diff --git a/ttcommon/__init__.py b/ttcommon/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ttcommon/__init__.py |