Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNat <natcl@hotmail.com>2007-09-13 20:33:18 (GMT)
committer Nat <natcl@hotmail.com>2007-09-13 20:33:18 (GMT)
commita3b8d0fe198473f18495696025e6852c4d2c9f58 (patch)
treec43099929417716d868713c3ae8334275d235424
parent3080356e8c3d275634cb011a160d47f3a482cfbb (diff)
Jam works
-rw-r--r--TamTamJam.activity/Jam/Block.py4
-rw-r--r--TamTamJam.activity/Jam/Desktop.py2
-rw-r--r--TamTamJam.activity/Jam/Fillin.py6
-rw-r--r--TamTamJam.activity/Jam/GenRythm.py6
-rw-r--r--TamTamJam.activity/Jam/JamMain.py39
-rw-r--r--TamTamJam.activity/Jam/Parasite.py6
-rw-r--r--TamTamJam.activity/Jam/Picker.py6
-rw-r--r--TamTamJam.activity/Jam/Popup.py10
-rw-r--r--TamTamJam.activity/Jam/RythmGenerator.py6
-rw-r--r--TamTamJam.activity/Jam/Toolbars.py2
-rw-r--r--TamTamJam.activity/MANIFEST534
-rw-r--r--TamTamJam.activity/TamTam.py1229
-rw-r--r--TamTamJam.activity/TamTamJam.py135
-rw-r--r--TamTamJam.activity/activity/activity-tamtamjam.svg24
-rw-r--r--TamTamJam.activity/activity/activity.info6
-rw-r--r--TamTamJam.activity/po/TamTamJam.pot448
-rw-r--r--TamTamJam.activity/setup.py11
-rw-r--r--TamTamMini.activity/MANIFEST522
-rw-r--r--TamTamMini.activity/TamTamMini.py35
-rw-r--r--TamTamMini.activity/po/TamTamMini.pot423
-rw-r--r--TamTamMini.activity/setup.py11
-rw-r--r--common/Config.py19
-rw-r--r--common/Generation/GenerationPitch.py2
-rw-r--r--common/Generation/GenerationRythm.py2
-rwxr-xr-xcommon/Generation/Generator.py8
25 files changed, 2169 insertions, 1327 deletions
diff --git a/TamTamJam.activity/Jam/Block.py b/TamTamJam.activity/Jam/Block.py
index f0789fd..83be3f0 100644
--- a/TamTamJam.activity/Jam/Block.py
+++ b/TamTamJam.activity/Jam/Block.py
@@ -5,9 +5,9 @@ import gtk
import random
-import Config
+import common.Config as Config
-from Util.NoteDB import PARAMETER
+from common.Util.NoteDB import PARAMETER
#::: NOTE:
# All the graphics resources are loaded in Desktop and referenced here as necessary
diff --git a/TamTamJam.activity/Jam/Desktop.py b/TamTamJam.activity/Jam/Desktop.py
index 7b1acba..68bf14e 100644
--- a/TamTamJam.activity/Jam/Desktop.py
+++ b/TamTamJam.activity/Jam/Desktop.py
@@ -3,7 +3,7 @@ import pygtk
pygtk.require( '2.0' )
import gtk
-import Config
+import common.Config as Config
from gettext import gettext as _
diff --git a/TamTamJam.activity/Jam/Fillin.py b/TamTamJam.activity/Jam/Fillin.py
index 72e2ae3..8588f6d 100644
--- a/TamTamJam.activity/Jam/Fillin.py
+++ b/TamTamJam.activity/Jam/Fillin.py
@@ -4,9 +4,9 @@ import gtk
import gobject
from RythmGenerator import *
-from Util.CSoundClient import new_csound_client
-from Util.NoteDB import Note
-import Config
+from common.Util.CSoundClient import new_csound_client
+from common.Util.NoteDB import Note
+import common.Config as Config
class Fillin:
def __init__( self, nbeats, tempo, instrument, reverb, volume ):
diff --git a/TamTamJam.activity/Jam/GenRythm.py b/TamTamJam.activity/Jam/GenRythm.py
index d0e23e3..330e174 100644
--- a/TamTamJam.activity/Jam/GenRythm.py
+++ b/TamTamJam.activity/Jam/GenRythm.py
@@ -1,8 +1,8 @@
import random
-import Config
+import common.Config as Config
-from Generation.GenerationConstants import GenerationConstants
-from Generation.Utils import *
+from common.Generation.GenerationConstants import GenerationConstants
+from common.Generation.Utils import *
class GenRythm:
def drumRythmSequence(self, instrumentName, nbeats, density, regularity ):
diff --git a/TamTamJam.activity/Jam/JamMain.py b/TamTamJam.activity/Jam/JamMain.py
index c339ae6..3ea49fb 100644
--- a/TamTamJam.activity/Jam/JamMain.py
+++ b/TamTamJam.activity/Jam/JamMain.py
@@ -4,11 +4,9 @@ pygtk.require( '2.0' )
import gtk
import pango
-from SubActivity import SubActivity
-
import os, sys, shutil
-import Config
+import common.Config as Config
from gettext import gettext as _
import sugar.graphics.style as style
@@ -18,31 +16,31 @@ import Jam.Block as Block
from Jam.Toolbars import JamToolbar, DesktopToolbar
-from Util.CSoundNote import CSoundNote
-from Util.CSoundClient import new_csound_client
-import Util.InstrumentDB as InstrumentDB
-from Util import NoteDB
+from common.Util.CSoundNote import CSoundNote
+from common.Util.CSoundClient import new_csound_client
+import common.Util.InstrumentDB as InstrumentDB
+from common.Util import NoteDB
from Fillin import Fillin
from RythmGenerator import generator
-from Generation.GenerationConstants import GenerationConstants
-from Util.NoteDB import Note, Page
+from common.Generation.GenerationConstants import GenerationConstants
+from common.Util.NoteDB import Note, Page
-from Util import ControlStream
+from common.Util import ControlStream
import xdrlib
import time
import gobject
-import Util.Network as Net
+import common.Util.Network as Net
from sugar.presence import presenceservice
from sugar.graphics.xocolor import XoColor
from math import sqrt
-class JamMain(SubActivity):
+class JamMain(gtk.EventBox):
- def __init__(self, activity, set_mode):
- SubActivity.__init__(self, set_mode)
+ def __init__(self, activity):
+ gtk.EventBox.__init__(self)
self.activity = activity
@@ -273,7 +271,7 @@ class JamMain(SubActivity):
#-- Desktops ------------------------------------------
self.curDesktop = None
# copy preset desktops
- path = Config.TAM_TAM_ROOT+"/Resources/Desktops/"
+ path = Config.TAM_TAM_ROOT+"/common/Resources/Desktops/"
filelist = os.listdir( path )
for file in filelist:
shutil.copyfile( path+file, Config.SCRATCH_DIR+file )
@@ -318,15 +316,12 @@ class JamMain(SubActivity):
# SubActivity Handlers
def onActivate( self, arg ):
- SubActivity.onActivate( self, arg )
-
+ pass
def onDeactivate( self ):
- SubActivity.onDeactivate( self )
+ pass
- def onDestroy( self ):
- SubActivity.onDestroy( self )
-
- # clear up scratch folder
+ def onDestroy( self ):
+ #clear up scratch folder
path = Config.SCRATCH_DIR
filelist = os.listdir( path )
for file in filelist:
diff --git a/TamTamJam.activity/Jam/Parasite.py b/TamTamJam.activity/Jam/Parasite.py
index 084d092..74b9e0d 100644
--- a/TamTamJam.activity/Jam/Parasite.py
+++ b/TamTamJam.activity/Jam/Parasite.py
@@ -2,10 +2,10 @@ import pygtk
pygtk.require( '2.0' )
import gtk
-import Config
+import common.Config as Config
-from Util.NoteDB import PARAMETER
-from Util.CSoundClient import new_csound_client
+from common.Util.NoteDB import PARAMETER
+from common.Util.CSoundClient import new_csound_client
class LoopParasite:
diff --git a/TamTamJam.activity/Jam/Picker.py b/TamTamJam.activity/Jam/Picker.py
index b69a73f..8d59807 100644
--- a/TamTamJam.activity/Jam/Picker.py
+++ b/TamTamJam.activity/Jam/Picker.py
@@ -8,13 +8,13 @@ import os
import random #TEMP
import sets
-import Config
+import common.Config as Config
from gettext import gettext as _
from sugar.graphics.palette import Palette, WidgetInvoker
-from Util import ControlStream
-from Util import InstrumentDB
+from common.Util import ControlStream
+from common.Util import InstrumentDB
from Jam import Block
diff --git a/TamTamJam.activity/Jam/Popup.py b/TamTamJam.activity/Jam/Popup.py
index 9af550c..1e57293 100644
--- a/TamTamJam.activity/Jam/Popup.py
+++ b/TamTamJam.activity/Jam/Popup.py
@@ -3,7 +3,7 @@ import pygtk
pygtk.require( '2.0' )
import gtk
-import Config
+import common.Config as Config
from gettext import gettext as _
from sugar.graphics import style
@@ -11,12 +11,12 @@ from sugar.graphics.palette import Palette, Invoker, _palette_observer
import gobject
import Jam.Block as Block
-from Util.NoteDB import PARAMETER
-from Util.CSoundNote import CSoundNote
-from Util.CSoundClient import new_csound_client
+from common.Util.NoteDB import PARAMETER
+from common.Util.CSoundNote import CSoundNote
+from common.Util.CSoundClient import new_csound_client
from Jam.Parasite import LoopParasite
-from Generation.Generator import generator1, GenerationParameters
+from common.Generation.Generator import generator1, GenerationParameters
class SELECTNOTES:
ALL = -1
diff --git a/TamTamJam.activity/Jam/RythmGenerator.py b/TamTamJam.activity/Jam/RythmGenerator.py
index 4740160..537f598 100644
--- a/TamTamJam.activity/Jam/RythmGenerator.py
+++ b/TamTamJam.activity/Jam/RythmGenerator.py
@@ -1,8 +1,8 @@
import random
-import Config
-from Util.CSoundNote import CSoundNote
-from Generation.GenerationConstants import GenerationConstants
+import common.Config as Config
+from common.Util.CSoundNote import CSoundNote
+from common.Generation.GenerationConstants import GenerationConstants
from GenRythm import GenRythm
def generator( instrument, nbeats, density, regularity, reverbSend ):
diff --git a/TamTamJam.activity/Jam/Toolbars.py b/TamTamJam.activity/Jam/Toolbars.py
index 8a45c01..30001ef 100644
--- a/TamTamJam.activity/Jam/Toolbars.py
+++ b/TamTamJam.activity/Jam/Toolbars.py
@@ -8,7 +8,7 @@ from gettext import gettext as _
from sugar.graphics.palette import Palette, WidgetInvoker
from sugar.graphics.radiotoolbutton import RadioToolButton
-import Config
+import common.Config as Config
class JamToolbar( gtk.Toolbar ):
diff --git a/TamTamJam.activity/MANIFEST b/TamTamJam.activity/MANIFEST
new file mode 100644
index 0000000..47a3d81
--- /dev/null
+++ b/TamTamJam.activity/MANIFEST
@@ -0,0 +1,534 @@
+MANIFEST
+NEWS
+setup.py
+TamTamJam.py
+activity/activity-tamtamjam.svg
+activity/activity.info
+icons/XYBut.svg
+icons/XYButDown.svg
+icons/XYButDownClick.svg
+icons/accept.svg
+icons/cancel.svg
+icons/preset1.svg
+icons/preset10.svg
+icons/preset2.svg
+icons/preset3.svg
+icons/preset4.svg
+icons/preset5.svg
+icons/preset6.svg
+icons/preset7.svg
+icons/preset8.svg
+icons/preset9.svg
+icons/tam-help.svg
+icons/tempo1.svg
+icons/tempo2.svg
+icons/tempo3.svg
+icons/tempo4.svg
+icons/tempo5.svg
+icons/tempo6.svg
+icons/tempo7.svg
+icons/tempo8.svg
+icons/volume0.svg
+icons/volume1.svg
+icons/volume2.svg
+icons/volume3.svg
+Jam/Block.py
+Jam/Desktop.py
+Jam/Fillin.py
+Jam/GenRythm.py
+Jam/JamMain.py
+Jam/Parasite.py
+Jam/Picker.py
+Jam/Popup.py
+Jam/RythmGenerator.py
+Jam/__init__.py
+Jam/Toolbars.py
+common/__init__.py
+common/Config.py
+common/Util/CSoundClient.py
+common/Util/CSoundNote.py
+common/Util/ControlStream.py
+common/Util/Credits.py
+common/Util/InstrumentDB.py
+common/Util/InstrumentPanel.py
+common/Util/Instrument_.py
+common/Util/KeyboardWindow.py
+common/Util/LoopSettings.py
+common/Util/Network.py
+common/Util/NoteDB.py
+common/Util/NoteLooper.py
+common/Util/Profiler.py
+common/Util/Sound.py
+common/Util/ThemeWidgets.py
+common/Util/Trackpad.py
+common/Util/__init__.py
+common/Util/Clooper/Makefile
+common/Util/Clooper/SoundClient.i
+common/Util/Clooper/__init__.py
+common/Util/Clooper/aclient.cpp
+common/Util/Clooper/aclient.so
+common/Util/Clooper/audio.cpp
+common/Util/Clooper/cmd_csound.cpp
+common/Util/Clooper/log.cpp
+common/Util/Clooper/ttest.c
+common/Util/Clooper/ttest.h
+common/Util/Clooper/ttest.i
+common/Util/Clooper/ttest.py
+common/Util/Clooper/ttest_wrap.c
+common/Generation/Drunk.py
+common/Generation/GenerationConstants.py
+common/Generation/GenerationParametersWindow.py
+common/Generation/GenerationPitch.py
+common/Generation/GenerationRythm.py
+common/Generation/Generator.py
+common/Generation/Utils.py
+common/Generation/VariationPitch.py
+common/Generation/VariationRythm.py
+common/Generation/__init__.py
+common/Generation/bList.py
+common/Resources/__init__.py
+common/Resources/crop.csd
+common/Resources/tamtamorc.csd
+common/Resources/tooltips_en.py
+common/Resources/tooltips_fr.py
+common/Resources/Desktops/desktop0
+common/Resources/Desktops/desktop1
+common/Resources/Desktops/desktop2
+common/Resources/Desktops/desktop3
+common/Resources/Desktops/desktop4
+common/Resources/Desktops/desktop5
+common/Resources/Desktops/desktop6
+common/Resources/Desktops/desktop7
+common/Resources/Desktops/desktop8
+common/Resources/Desktops/desktop9
+common/Resources/Images/TamTam.png
+common/Resources/Images/acguit.png
+common/Resources/Images/acguitsel.png
+common/Resources/Images/alarm.png
+common/Resources/Images/alarmsel.png
+common/Resources/Images/all.png
+common/Resources/Images/allsel.png
+common/Resources/Images/animals.png
+common/Resources/Images/animalssel.png
+common/Resources/Images/arrowEditDown.png
+common/Resources/Images/arrowEditDownDown.png
+common/Resources/Images/arrowEditDownOver.png
+common/Resources/Images/arrowEditLeft.png
+common/Resources/Images/arrowEditLeftDown.png
+common/Resources/Images/arrowEditLeftOver.png
+common/Resources/Images/arrowEditRight.png
+common/Resources/Images/arrowEditRightDown.png
+common/Resources/Images/arrowEditRightOver.png
+common/Resources/Images/arrowEditUp.png
+common/Resources/Images/arrowEditUpDown.png
+common/Resources/Images/arrowEditUpOver.png
+common/Resources/Images/basse.png
+common/Resources/Images/bassesel.png
+common/Resources/Images/beat1.png
+common/Resources/Images/beat10.png
+common/Resources/Images/beat11.png
+common/Resources/Images/beat2.png
+common/Resources/Images/beat3.png
+common/Resources/Images/beat4.png
+common/Resources/Images/beat5.png
+common/Resources/Images/beat6.png
+common/Resources/Images/beat7.png
+common/Resources/Images/beat8.png
+common/Resources/Images/beat9.png
+common/Resources/Images/bird.png
+common/Resources/Images/birdsel.png
+common/Resources/Images/bottle.png
+common/Resources/Images/bottlesel.png
+common/Resources/Images/bubbles.png
+common/Resources/Images/bubblessel.png
+common/Resources/Images/byke.png
+common/Resources/Images/bykesel.png
+common/Resources/Images/camera.png
+common/Resources/Images/camerasel.png
+common/Resources/Images/car.png
+common/Resources/Images/carsel.png
+common/Resources/Images/cat.png
+common/Resources/Images/catsel.png
+common/Resources/Images/cello.png
+common/Resources/Images/cellosel.png
+common/Resources/Images/check.png
+common/Resources/Images/checkOff.svg
+common/Resources/Images/checkOn.svg
+common/Resources/Images/chimes.png
+common/Resources/Images/chimessel.png
+common/Resources/Images/clang.png
+common/Resources/Images/clangsel.png
+common/Resources/Images/clarinette.png
+common/Resources/Images/clarinettesel.png
+common/Resources/Images/cling.png
+common/Resources/Images/clingsel.png
+common/Resources/Images/complex1.png
+common/Resources/Images/complex2.png
+common/Resources/Images/complex3.png
+common/Resources/Images/complex4.png
+common/Resources/Images/complex5.png
+common/Resources/Images/complex6.png
+common/Resources/Images/complex7.png
+common/Resources/Images/complex8.png
+common/Resources/Images/concret.png
+common/Resources/Images/concretsel.png
+common/Resources/Images/crash.png
+common/Resources/Images/crashsel.png
+common/Resources/Images/dice.png
+common/Resources/Images/diceProp.png
+common/Resources/Images/dicePropSel.png
+common/Resources/Images/diceblur.png
+common/Resources/Images/diceinst.png
+common/Resources/Images/diceinstsel.png
+common/Resources/Images/didjeridu.png
+common/Resources/Images/didjeridusel.png
+common/Resources/Images/dog.png
+common/Resources/Images/dogsel.png
+common/Resources/Images/door.png
+common/Resources/Images/doorsel.png
+common/Resources/Images/dru0.png
+common/Resources/Images/dru1.png
+common/Resources/Images/dru2.png
+common/Resources/Images/dru3.png
+common/Resources/Images/dru4.png
+common/Resources/Images/drum1kit.png
+common/Resources/Images/drum1kitsel.png
+common/Resources/Images/drum1kitselgen.png
+common/Resources/Images/drum2kit.png
+common/Resources/Images/drum2kitsel.png
+common/Resources/Images/drum2kitselgen.png
+common/Resources/Images/drum3kit.png
+common/Resources/Images/drum3kitsel.png
+common/Resources/Images/drum3kitselgen.png
+common/Resources/Images/drum4kit.png
+common/Resources/Images/drum4kitsel.png
+common/Resources/Images/drum4kitselgen.png
+common/Resources/Images/drum5kit.png
+common/Resources/Images/drum5kitsel.png
+common/Resources/Images/drum5kitselgen.png
+common/Resources/Images/duck.png
+common/Resources/Images/duck2.png
+common/Resources/Images/duck2sel.png
+common/Resources/Images/ducksel.png
+common/Resources/Images/editTam.png
+common/Resources/Images/editTamDown.png
+common/Resources/Images/editTamOver.png
+common/Resources/Images/electronic.png
+common/Resources/Images/electronicsel.png
+common/Resources/Images/flute.png
+common/Resources/Images/flutesel.png
+common/Resources/Images/gam.png
+common/Resources/Images/gamsel.png
+common/Resources/Images/generic.png
+common/Resources/Images/genericsel.png
+common/Resources/Images/guit.png
+common/Resources/Images/guit2.png
+common/Resources/Images/guit2sel.png
+common/Resources/Images/guitsel.png
+common/Resources/Images/harmonica.png
+common/Resources/Images/harmonicasel.png
+common/Resources/Images/harmonium.png
+common/Resources/Images/harmoniumsel.png
+common/Resources/Images/helpShow1.jpg
+common/Resources/Images/helpShow2.jpg
+common/Resources/Images/helpShow3.jpg
+common/Resources/Images/helpShow4.jpg
+common/Resources/Images/helpShow5.jpg
+common/Resources/Images/helpShow6.jpg
+common/Resources/Images/helpShow7.jpg
+common/Resources/Images/helpShow8.jpg
+common/Resources/Images/helpShow9.jpg
+common/Resources/Images/helpTam.png
+common/Resources/Images/helpTamDown.png
+common/Resources/Images/helpTamOver.png
+common/Resources/Images/hit.png
+common/Resources/Images/hitSelected.png
+common/Resources/Images/horse.png
+common/Resources/Images/horsesel.png
+common/Resources/Images/instr0.png
+common/Resources/Images/instr1.png
+common/Resources/Images/instr2.png
+common/Resources/Images/instr3.png
+common/Resources/Images/instr4.png
+common/Resources/Images/jam-blockMask.png
+common/Resources/Images/kalimba.png
+common/Resources/Images/kalimbasel.png
+common/Resources/Images/keyboard.png
+common/Resources/Images/keyboardsel.png
+common/Resources/Images/koto.png
+common/Resources/Images/kotosel.png
+common/Resources/Images/laugh.png
+common/Resources/Images/laughsel.png
+common/Resources/Images/mando.png
+common/Resources/Images/mandosel.png
+common/Resources/Images/marimba.png
+common/Resources/Images/marimbasel.png
+common/Resources/Images/marquis.png
+common/Resources/Images/mic1.png
+common/Resources/Images/mic1sel.png
+common/Resources/Images/mic2.png
+common/Resources/Images/mic2sel.png
+common/Resources/Images/mic3.png
+common/Resources/Images/mic3sel.png
+common/Resources/Images/mic4.png
+common/Resources/Images/mic4sel.png
+common/Resources/Images/miniTam.png
+common/Resources/Images/miniTamDown.png
+common/Resources/Images/miniTamOver.png
+common/Resources/Images/miniplay.png
+common/Resources/Images/mysounds.png
+common/Resources/Images/mysoundssel.png
+common/Resources/Images/note.png
+common/Resources/Images/noteSelected.png
+common/Resources/Images/ocarina.png
+common/Resources/Images/ocarinasel.png
+common/Resources/Images/ounk.png
+common/Resources/Images/ounksel.png
+common/Resources/Images/ow.png
+common/Resources/Images/owsel.png
+common/Resources/Images/pageThumbnailBG.png
+common/Resources/Images/pageThumbnailBG0.png
+common/Resources/Images/pageThumbnailBG1.png
+common/Resources/Images/pageThumbnailBG2.png
+common/Resources/Images/pageThumbnailBG3.png
+common/Resources/Images/pageThumbnailBut0.png
+common/Resources/Images/pageThumbnailBut0Down.png
+common/Resources/Images/pageThumbnailBut1.png
+common/Resources/Images/pageThumbnailBut1Down.png
+common/Resources/Images/pageThumbnailBut2.png
+common/Resources/Images/pageThumbnailBut2Down.png
+common/Resources/Images/pageThumbnailBut3.png
+common/Resources/Images/pageThumbnailBut3Down.png
+common/Resources/Images/pageThumbnailMask.png
+common/Resources/Images/people.png
+common/Resources/Images/peoplesel.png
+common/Resources/Images/percussions.png
+common/Resources/Images/percussionssel.png
+common/Resources/Images/piano.png
+common/Resources/Images/pianosel.png
+common/Resources/Images/plane.png
+common/Resources/Images/planesel.png
+common/Resources/Images/reverb0.png
+common/Resources/Images/reverb1.png
+common/Resources/Images/reverb2.png
+common/Resources/Images/reverb3.png
+common/Resources/Images/reverb4.png
+common/Resources/Images/reverb5.png
+common/Resources/Images/rhodes.png
+common/Resources/Images/rhodessel.png
+common/Resources/Images/sampleBG.png
+common/Resources/Images/sampleNoteMask.png
+common/Resources/Images/saxo.png
+common/Resources/Images/saxosel.png
+common/Resources/Images/scrollBar.png
+common/Resources/Images/sheep.png
+common/Resources/Images/sheepsel.png
+common/Resources/Images/shenai.png
+common/Resources/Images/shenaisel.png
+common/Resources/Images/sitar.png
+common/Resources/Images/sitarsel.png
+common/Resources/Images/slap.png
+common/Resources/Images/slapsel.png
+common/Resources/Images/sliderDrum.png
+common/Resources/Images/sliderEditTempo.png
+common/Resources/Images/sliderEditVolume.png
+common/Resources/Images/sliderInst1.png
+common/Resources/Images/sliderInst2.png
+common/Resources/Images/sliderInst3.png
+common/Resources/Images/sliderInst4.png
+common/Resources/Images/sliderbutbleu.png
+common/Resources/Images/sliderbutjaune.png
+common/Resources/Images/sliderbutred.png
+common/Resources/Images/sliderbutvert.png
+common/Resources/Images/sliderbutviolet.png
+common/Resources/Images/sliderlong.png
+common/Resources/Images/slidershort.png
+common/Resources/Images/stop.png
+common/Resources/Images/strings.png
+common/Resources/Images/stringssel.png
+common/Resources/Images/synthTam.png
+common/Resources/Images/synthTamDown.png
+common/Resources/Images/synthTamOver.png
+common/Resources/Images/synthlabMask.png
+common/Resources/Images/tchiwo.png
+common/Resources/Images/tchiwosel.png
+common/Resources/Images/tempo1.png
+common/Resources/Images/tempo2.png
+common/Resources/Images/tempo3.png
+common/Resources/Images/tempo4.png
+common/Resources/Images/tempo5.png
+common/Resources/Images/tempo6.png
+common/Resources/Images/tempo7.png
+common/Resources/Images/tempo8.png
+common/Resources/Images/trackBG.png
+common/Resources/Images/trackBGDrum.png
+common/Resources/Images/trackBGDrumSelected.png
+common/Resources/Images/trackBGSelected.png
+common/Resources/Images/triangle.png
+common/Resources/Images/trianglesel.png
+common/Resources/Images/trumpet.png
+common/Resources/Images/trumpetsel.png
+common/Resources/Images/tuba.png
+common/Resources/Images/tubasel.png
+common/Resources/Images/violin.png
+common/Resources/Images/violinsel.png
+common/Resources/Images/voix.png
+common/Resources/Images/voixsel.png
+common/Resources/Images/volume0.png
+common/Resources/Images/volume1.png
+common/Resources/Images/volume2.png
+common/Resources/Images/volume3.png
+common/Resources/Images/water.png
+common/Resources/Images/watersel.png
+common/Resources/Images/winds.png
+common/Resources/Images/windssel.png
+common/Resources/Images/zap.png
+common/Resources/Images/zapsel.png
+common/Resources/Loops/loop1.ttl
+common/Resources/Loops/loop2.ttl
+common/Resources/Loops/loop3.ttl
+common/Resources/Sounds/acguit
+common/Resources/Sounds/alarm
+common/Resources/Sounds/banjo
+common/Resources/Sounds/basse
+common/Resources/Sounds/bird
+common/Resources/Sounds/bottle
+common/Resources/Sounds/bubbles
+common/Resources/Sounds/byke
+common/Resources/Sounds/camera
+common/Resources/Sounds/car
+common/Resources/Sounds/cat
+common/Resources/Sounds/cello
+common/Resources/Sounds/chimes
+common/Resources/Sounds/clang
+common/Resources/Sounds/clarinette
+common/Resources/Sounds/cling
+common/Resources/Sounds/crash
+common/Resources/Sounds/diceinst
+common/Resources/Sounds/didjeridu
+common/Resources/Sounds/dog
+common/Resources/Sounds/door
+common/Resources/Sounds/drum1chine
+common/Resources/Sounds/drum1crash
+common/Resources/Sounds/drum1floortom
+common/Resources/Sounds/drum1hardride
+common/Resources/Sounds/drum1hatpedal
+common/Resources/Sounds/drum1hatshoulder
+common/Resources/Sounds/drum1kick
+common/Resources/Sounds/drum1ridebell
+common/Resources/Sounds/drum1snare
+common/Resources/Sounds/drum1snaresidestick
+common/Resources/Sounds/drum1splash
+common/Resources/Sounds/drum1tom
+common/Resources/Sounds/drum2darbukadoom
+common/Resources/Sounds/drum2darbukafinger
+common/Resources/Sounds/drum2darbukapied
+common/Resources/Sounds/drum2darbukapiedsoft
+common/Resources/Sounds/drum2darbukaroll
+common/Resources/Sounds/drum2darbukaslap
+common/Resources/Sounds/drum2darbukatak
+common/Resources/Sounds/drum2hatflanger
+common/Resources/Sounds/drum2hatpied
+common/Resources/Sounds/drum2hatpied2
+common/Resources/Sounds/drum2tambourinepied
+common/Resources/Sounds/drum2tambourinepiedsoft
+common/Resources/Sounds/drum3cowbell
+common/Resources/Sounds/drum3cowbelltip
+common/Resources/Sounds/drum3cup
+common/Resources/Sounds/drum3djembelow
+common/Resources/Sounds/drum3djembemid
+common/Resources/Sounds/drum3djembesidestick
+common/Resources/Sounds/drum3djembeslap
+common/Resources/Sounds/drum3djembestickmid
+common/Resources/Sounds/drum3metalstand
+common/Resources/Sounds/drum3pedalperc
+common/Resources/Sounds/drum3rainstick
+common/Resources/Sounds/drum3tambourinehigh
+common/Resources/Sounds/drum3tambourinelow
+common/Resources/Sounds/drum4afrofeet
+common/Resources/Sounds/drum4fingersn
+common/Resources/Sounds/drum4mutecuic
+common/Resources/Sounds/drum4stompbass
+common/Resources/Sounds/drum4tambouri
+common/Resources/Sounds/drum4tr707clap
+common/Resources/Sounds/drum4tr707open
+common/Resources/Sounds/drum4tr808closed
+common/Resources/Sounds/drum4tr808sn
+common/Resources/Sounds/drum4tr909bass
+common/Resources/Sounds/drum4tr909kick
+common/Resources/Sounds/drum4tr909sn
+common/Resources/Sounds/drum5agogoaigu
+common/Resources/Sounds/drum5agogograve
+common/Resources/Sounds/drum5bongoaiguouvert
+common/Resources/Sounds/drum5bongograveouvert
+common/Resources/Sounds/drum5congaaiguouvert
+common/Resources/Sounds/drum5congagraveferme
+common/Resources/Sounds/drum5congagraveouvert
+common/Resources/Sounds/drum5guiroretour
+common/Resources/Sounds/drum5quicaaigu
+common/Resources/Sounds/drum5quicamedium
+common/Resources/Sounds/drum5timablesaiguslap
+common/Resources/Sounds/drum5timablesslap
+common/Resources/Sounds/drum5vibraslap
+common/Resources/Sounds/duck
+common/Resources/Sounds/duck2
+common/Resources/Sounds/flute
+common/Resources/Sounds/gam
+common/Resources/Sounds/guidice1
+common/Resources/Sounds/guidice10
+common/Resources/Sounds/guidice2
+common/Resources/Sounds/guidice3
+common/Resources/Sounds/guidice4
+common/Resources/Sounds/guidice5
+common/Resources/Sounds/guidice6
+common/Resources/Sounds/guidice7
+common/Resources/Sounds/guidice8
+common/Resources/Sounds/guidice9
+common/Resources/Sounds/guit
+common/Resources/Sounds/guit2
+common/Resources/Sounds/harmonica
+common/Resources/Sounds/harmonium
+common/Resources/Sounds/horse
+common/Resources/Sounds/kalimba
+common/Resources/Sounds/koto
+common/Resources/Sounds/lab1
+common/Resources/Sounds/lab2
+common/Resources/Sounds/lab3
+common/Resources/Sounds/lab4
+common/Resources/Sounds/lab5
+common/Resources/Sounds/lab6
+common/Resources/Sounds/laugh
+common/Resources/Sounds/mando
+common/Resources/Sounds/marimba
+common/Resources/Sounds/mic1
+common/Resources/Sounds/mic2
+common/Resources/Sounds/mic3
+common/Resources/Sounds/mic4
+common/Resources/Sounds/ocarina
+common/Resources/Sounds/ounk
+common/Resources/Sounds/ow
+common/Resources/Sounds/piano
+common/Resources/Sounds/plane
+common/Resources/Sounds/rhodes
+common/Resources/Sounds/saxo
+common/Resources/Sounds/sheep
+common/Resources/Sounds/shenai
+common/Resources/Sounds/sitar
+common/Resources/Sounds/slap
+common/Resources/Sounds/triangle
+common/Resources/Sounds/trumpet
+common/Resources/Sounds/tuba
+common/Resources/Sounds/violin
+common/Resources/Sounds/voix
+common/Resources/Sounds/water
+common/Resources/Sounds/zap
+common/Resources/SynthFiles/synthFile1
+common/Resources/SynthFiles/synthFile2
+common/Resources/SynthFiles/synthFile3
+common/Resources/SynthFiles/synthFile4
+common/Resources/SynthFiles/synthFile5
+common/Resources/SynthFiles/synthFile6
+common/Resources/SynthFiles/synthFile7
+common/Resources/SynthFiles/synthFile8
+common/Resources/SynthFiles/synthFile9
+common/Resources/SynthFiles/synthFile10 \ No newline at end of file
diff --git a/TamTamJam.activity/TamTam.py b/TamTamJam.activity/TamTam.py
deleted file mode 100644
index e282df9..0000000
--- a/TamTamJam.activity/TamTam.py
+++ /dev/null
@@ -1,1229 +0,0 @@
-import locale
-locale.setlocale(locale.LC_NUMERIC, 'C')
-import signal , time , sys , os, shutil
-import pygtk
-pygtk.require( '2.0' )
-import gtk
-
-import gobject
-import time
-
-import Config
-from Util.CSoundClient import new_csound_client
-from Util.Profiler import TP
-
-from Util.InstrumentPanel import InstrumentPanel
-from miniTamTam.miniTamTamMain import miniTamTamMain
-from Jam.JamMain import JamMain
-from Edit.MainWindow import MainWindow
-from Welcome import Welcome
-from SynthLab.SynthLabWindow import SynthLabWindow
-from Util.Trackpad import Trackpad
-from gettext import gettext as _
-#from Util.KeyboardWindow import KeyboardWindow
-import commands
-
-if __name__ != '__main__':
- try:
- from sugar.activity.activity import Activity
- from sugar.activity import activity
- FAKE_ACTIVITY = False
- if Config.DEBUG: print 'using sugar Activity'
- except ImportError:
- from FActivity import FakeActivity as Activity
- FAKE_ACTIVITY = True
- if Config.DEBUG: print 'using fake activity'
-else:
- from FActivity import FakeActivity as Activity
- if Config.DEBUG: print 'using fake activity'
-
-
-class TamTam(Activity):
- # TamTam is the topmost container in the TamTam application
- # At all times it has one child, which may be one of
- # - the welcome screen
- # - the mini-tamtam
- # - the synth lab
- # - edit mode
-
- def __init__(self, handle, mode='welcome'):
- Activity.__init__(self, handle)
- self.ensure_dirs()
-
- color = gtk.gdk.color_parse(Config.WS_BCK_COLOR)
- self.modify_bg(gtk.STATE_NORMAL, color)
-
- self.set_title('TamTam')
- self.set_resizable(False)
-
- self.trackpad = Trackpad( self )
- #self.keyboardWindow = KeyboardWindow(size = 8, popup = True)
- #self.keyboardWindow.color_piano()
-
- self.preloadTimeout = None
-
- self.focusInHandler = self.connect('focus_in_event',self.onFocusIn)
- self.focusOutHandler = self.connect('focus_out_event',self.onFocusOut)
- self.connect('notify::active', self.onActive)
- self.connect('destroy', self.onDestroy)
- self.connect( "key-press-event", self.onKeyPress )
- self.connect( "key-release-event", self.onKeyRelease )
- #self.connect( "key-press-event", self.keyboardWindow.handle_keypress)
- #self.connect( "key-release-event", self.keyboardWindow.handle_keyrelease)
- #self.connect( "button-press-event", self.keyboardWindow.handle_mousePress)
- #self.connect( "button-release-event", self.keyboardWindow.handle_mouseRelease)
-
- self.mode = None
- self.modeList = {}
-
- self.instrumentPanel = InstrumentPanel( force_load = False )
- self.preloadList = [ self.instrumentPanel ]
-
- #load the sugar toolbar
- self.toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(self.toolbox)
-
- self.activity_toolbar = self.toolbox.get_activity_toolbar()
- self.activity_toolbar.share.hide()
- self.activity_toolbar.keep.hide()
-
- self.toolbox.show()
-
- if self._shared_activity: # if we're joining a shared activity force mini
- self.set_mode("mini")
- else:
- self.set_mode(mode)
-
- def onPreloadTimeout( self ):
- if Config.DEBUG > 4: print "TamTam::onPreloadTimeout", self.preloadList
-
- t = time.time()
- if self.preloadList[0].load( t + 0.100 ): # finished preloading this object
- self.preloadList.pop(0)
- if not len(self.preloadList):
- if Config.DEBUG > 1: print "TamTam::finished preloading", time.time() - t
- self.preloadTimeout = False
- return False # finished preloading everything
-
- if Config.DEBUG > 4: print "TamTam::preload returned after", time.time() - t
-
- return True
-
- def doNothing(): #a callback function to appease SynthLab
- pass
-
- def set_mode(self, mode, arg = None):
- if Config.DEBUG: print 'DEBUG: TamTam::set_mode from', self.mode, 'to', mode
-
- if self.mode != None:
- self.modeList[ self.mode ].onDeactivate()
- if FAKE_ACTIVITY:
- self.remove( self.modeList[ self.mode ] )
-
- self.mode = None
- self.trackpad.setContext(mode)
-
- if mode == 'welcome':
- if not (mode in self.modeList):
- self.modeList[mode] = Welcome(self, self.set_mode)
- self.mode = mode
- #if len( self.preloadList ):
- # self.preloadTimeout = gobject.timeout_add( 300, self.onPreloadTimeout )
- elif self.preloadTimeout:
- gobject.source_remove( self.preloadTimeout )
- self.predrawTimeout = False
-
- if mode == 'jam':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Jam'
- self.modeList[mode] = JamMain(self, self.set_mode)
- self.mode = mode
-
- if mode == 'mini':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Mini'
- self.modeList[mode] = miniTamTamMain(self, self.set_mode)
- else:
- self.modeList[mode].regenerate()
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'edit':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Edit'
- self.modeList[mode] = MainWindow(self, self.set_mode)
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'synth':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam SynthLab'
- self.modeList[mode] = SynthLabWindow(self, self.set_mode, None)
- self.mode = mode
-
- if self.mode == None:
- print 'DEBUG: TamTam::set_mode invalid mode:', mode
- else:
- try: # activity mode
- self.set_canvas( self.modeList[ self.mode ] )
- except: # fake mode
- self.add( self.modeList[ self.mode ] )
- self.modeList[ self.mode ].onActivate(arg)
- self.show()
-
- def onFocusIn(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(True)
- if self.mode == 'synth':
- self.modeList[ self.mode ].updateSound()
- self.modeList[ self.mode ].updateTables()
- #csnd.load_instruments()
-
- def onFocusOut(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(False)
-
- def onActive(self, widget = None, event = None):
- pass
-
- def onKeyPress(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
- #print "-----", event.keyval, event.string, event.hardware_keycode
- if event.state == gtk.gdk.MOD1_MASK:
- key = event.keyval
- if key == gtk.keysyms.j:
- self.set_mode("jam")
- return
- elif key == gtk.keysyms.m:
- self.set_mode('mini')
- return
- elif key == gtk.keysyms.s:
- self.set_mode('synth')
- return
- elif key == gtk.keysyms.w:
- self.set_mode('welcome')
- return
- elif key == gtk.keysyms.e:
- self.set_mode('edit')
- return
- elif key == gtk.keysyms.t:
- self.toolbox.show()
- return
- elif key == gtk.keysyms.y:
- self.toolbox.hide()
- if self.mode:
- self.modeList[ self.mode ].onKeyPress(widget, event)
-
- def onKeyRelease(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyRelease in TamTam.py'
- self.modeList[ self.mode ].onKeyRelease(widget, event)
- pass
-
- def onDestroy(self, arg2):
- if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
- os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
-
- for m in self.modeList:
- if self.modeList[m] != None:
- self.modeList[m].onDestroy()
-
- csnd = new_csound_client()
- csnd.connect(False)
- csnd.destroy()
-
- gtk.main_quit()
-
- def ensure_dir(self, dir, perms=0777, rw=os.R_OK|os.W_OK):
- if not os.path.isdir( dir ):
- try:
- os.makedirs(dir, perms)
- except OSError, e:
- print 'ERROR: failed to make dir %s: %i (%s)\n' % (dir, e.errno, e.strerror)
- if not os.access(dir, rw):
- print 'ERROR: directory %s is missing required r/w access\n' % dir
-
- def ensure_dirs(self):
- self.ensure_dir(Config.TUNE_DIR)
- self.ensure_dir(Config.SYNTH_DIR)
- self.ensure_dir(Config.SNDS_DIR)
- self.ensure_dir(Config.SCRATCH_DIR)
-
- if not os.path.isdir(Config.PREF_DIR):
- os.mkdir(Config.PREF_DIR)
- os.system('chmod 0777 ' + Config.PREF_DIR + ' &')
- for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']:
- shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd)
- os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &')
-
- def read_file(self,file_path):
- subactivity_name = self.metadata['tamtam_subactivity']
- if subactivity_name == 'edit' \
- or subactivity_name == 'synth' \
- or subactivity_name == 'jam':
- self.set_mode(subactivity_name)
- self.modeList[subactivity_name].handleJournalLoad(file_path)
- elif subactivity_name == 'mini':
- self.set_mode(subactivity_name)
- else:
- return
-
- def write_file(self,file_path):
- if self.mode == 'edit':
- self.metadata['tamtam_subactivity'] = self.mode
- self.modeList[self.mode].handleJournalSave(file_path)
- elif self.mode == 'synth':
- self.metadata['tamtam_subactivity'] = self.mode
- self.modeList[self.mode].handleJournalSave(file_path)
- elif self.mode == 'mini':
- self.metadata['tamtam_subactivity'] = self.mode
- f = open(file_path,'w')
- f.close()
- elif self.mode == 'jam':
- self.metadata['tamtam_subactivity'] = self.mode
- self.modeList[self.mode].handleJournalSave(file_path)
-
-class TamTamJam(Activity):
- # TamTam is the topmost container in the TamTam application
- # At all times it has one child, which may be one of
- # - the welcome screen
- # - the mini-tamtam
- # - the synth lab
- # - edit mode
-
- def __init__(self, handle, mode='welcome'):
- Activity.__init__(self, handle)
- self.ensure_dirs()
-
- color = gtk.gdk.color_parse(Config.WS_BCK_COLOR)
- self.modify_bg(gtk.STATE_NORMAL, color)
-
- self.set_title('TamTam Jam')
- self.set_resizable(False)
-
- self.trackpad = Trackpad( self )
- #self.keyboardWindow = KeyboardWindow(size = 8, popup = True)
- #self.keyboardWindow.color_piano()
-
- self.preloadTimeout = None
-
- self.focusInHandler = self.connect('focus_in_event',self.onFocusIn)
- self.focusOutHandler = self.connect('focus_out_event',self.onFocusOut)
- self.connect('notify::active', self.onActive)
- self.connect('destroy', self.onDestroy)
- self.connect( "key-press-event", self.onKeyPress )
- self.connect( "key-release-event", self.onKeyRelease )
- #self.connect( "key-press-event", self.keyboardWindow.handle_keypress)
- #self.connect( "key-release-event", self.keyboardWindow.handle_keyrelease)
- #self.connect( "button-press-event", self.keyboardWindow.handle_mousePress)
- #self.connect( "button-release-event", self.keyboardWindow.handle_mouseRelease)
-
- self.mode = None
- self.modeList = {}
-
- self.instrumentPanel = InstrumentPanel( force_load = False )
- self.preloadList = [ self.instrumentPanel ]
-
- #load the sugar toolbar
- self.toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(self.toolbox)
-
- self.activity_toolbar = self.toolbox.get_activity_toolbar()
- self.activity_toolbar.share.hide()
- self.activity_toolbar.keep.hide()
-
- self.toolbox.show()
-
- self.set_mode("jam")
-
- def onPreloadTimeout( self ):
- if Config.DEBUG > 4: print "TamTam::onPreloadTimeout", self.preloadList
-
- t = time.time()
- if self.preloadList[0].load( t + 0.100 ): # finished preloading this object
- self.preloadList.pop(0)
- if not len(self.preloadList):
- if Config.DEBUG > 1: print "TamTam::finished preloading", time.time() - t
- self.preloadTimeout = False
- return False # finished preloading everything
-
- if Config.DEBUG > 4: print "TamTam::preload returned after", time.time() - t
-
- return True
-
- def doNothing(): #a callback function to appease SynthLab
- pass
-
- def set_mode(self, mode, arg = None):
- if Config.DEBUG: print 'DEBUG: TamTam::set_mode from', self.mode, 'to', mode
-
- if self.mode != None:
- self.modeList[ self.mode ].onDeactivate()
- if FAKE_ACTIVITY:
- self.remove( self.modeList[ self.mode ] )
-
- self.mode = None
- self.trackpad.setContext(mode)
-
- if mode == 'welcome':
- if not (mode in self.modeList):
- self.modeList[mode] = Welcome(self, self.set_mode)
- self.mode = mode
- if len( self.preloadList ):
- self.preloadTimeout = gobject.timeout_add( 300, self.onPreloadTimeout )
- elif self.preloadTimeout:
- gobject.source_remove( self.preloadTimeout )
- self.predrawTimeout = False
-
- if mode == 'jam':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Jam'
- self.modeList[mode] = JamMain(self, self.set_mode)
- self.mode = mode
-
- if mode == 'mini':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Mini'
- self.modeList[mode] = miniTamTamMain(self, self.set_mode)
- else:
- self.modeList[mode].regenerate()
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'edit':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Edit'
- self.modeList[mode] = MainWindow(self, self.set_mode)
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'synth':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam SynthLab'
- self.modeList[mode] = SynthLabWindow(self, self.set_mode, None)
- self.mode = mode
-
- if self.mode == None:
- print 'DEBUG: TamTam::set_mode invalid mode:', mode
- else:
- try: # activity mode
- self.set_canvas( self.modeList[ self.mode ] )
- except: # fake mode
- self.add( self.modeList[ self.mode ] )
- self.modeList[ self.mode ].onActivate(arg)
- self.show()
-
- def onFocusIn(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(True)
- if self.mode == 'synth':
- self.modeList[ self.mode ].updateSound()
- self.modeList[ self.mode ].updateTables()
- #csnd.load_instruments()
-
- def onFocusOut(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(False)
-
- def onActive(self, widget = None, event = None):
- pass
-
- def onKeyPress(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
- if event.state == gtk.gdk.MOD1_MASK:
- key = event.keyval
- if key == gtk.keysyms.j:
- self.set_mode("jam")
- return
- elif key == gtk.keysyms.m:
- self.set_mode('mini')
- return
- elif key == gtk.keysyms.s:
- self.set_mode('synth')
- return
- elif key == gtk.keysyms.w:
- self.set_mode('welcome')
- return
- elif key == gtk.keysyms.e:
- self.set_mode('edit')
- return
- elif key == gtk.keysyms.t:
- self.toolbox.show()
- return
- elif key == gtk.keysyms.y:
- self.toolbox.hide()
- if self.mode:
- self.modeList[ self.mode ].onKeyPress(widget, event)
-
- def onKeyRelease(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyRelease in TamTam.py'
- self.modeList[ self.mode ].onKeyRelease(widget, event)
- pass
-
- def onDestroy(self, arg2):
- if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
- os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
-
- for m in self.modeList:
- if self.modeList[m] != None:
- self.modeList[m].onDestroy()
-
- csnd = new_csound_client()
- csnd.connect(False)
- csnd.destroy()
-
- gtk.main_quit()
-
- def ensure_dir(self, dir, perms=0777, rw=os.R_OK|os.W_OK):
- if not os.path.isdir( dir ):
- try:
- os.makedirs(dir, perms)
- except OSError, e:
- print 'ERROR: failed to make dir %s: %i (%s)\n' % (dir, e.errno, e.strerror)
- if not os.access(dir, rw):
- print 'ERROR: directory %s is missing required r/w access\n' % dir
-
- def ensure_dirs(self):
- self.ensure_dir(Config.TUNE_DIR)
- self.ensure_dir(Config.SYNTH_DIR)
- self.ensure_dir(Config.SNDS_DIR)
- self.ensure_dir(Config.SCRATCH_DIR)
-
- if not os.path.isdir(Config.PREF_DIR):
- os.mkdir(Config.PREF_DIR)
- os.system('chmod 0777 ' + Config.PREF_DIR + ' &')
- for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']:
- shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd)
- os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &')
-
- def read_file(self,file_path):
- self.modeList['jam'].handleJournalLoad(file_path)
-
- def write_file(self,file_path):
- self.modeList['jam'].handleJournalSave(file_path)
-
-class TamTamEdit(Activity):
- # TamTam is the topmost container in the TamTam application
- # At all times it has one child, which may be one of
- # - the welcome screen
- # - the mini-tamtam
- # - the synth lab
- # - edit mode
-
- def __init__(self, handle, mode='edit'):
- Activity.__init__(self, handle)
- self.ensure_dirs()
-
- color = gtk.gdk.color_parse(Config.WS_BCK_COLOR)
- self.modify_bg(gtk.STATE_NORMAL, color)
-
- self.set_title('TamTam Edit')
- self.set_resizable(False)
-
- self.trackpad = Trackpad( self )
- #self.keyboardWindow = KeyboardWindow(size = 8, popup = True)
- #self.keyboardWindow.color_piano()
-
- self.preloadTimeout = None
-
- self.focusInHandler = self.connect('focus_in_event',self.onFocusIn)
- self.focusOutHandler = self.connect('focus_out_event',self.onFocusOut)
- self.connect('notify::active', self.onActive)
- self.connect('destroy', self.onDestroy)
- self.connect( "key-press-event", self.onKeyPress )
- self.connect( "key-release-event", self.onKeyRelease )
- #self.connect( "key-press-event", self.keyboardWindow.handle_keypress)
- #self.connect( "key-release-event", self.keyboardWindow.handle_keyrelease)
- #self.connect( "button-press-event", self.keyboardWindow.handle_mousePress)
- #self.connect( "button-release-event", self.keyboardWindow.handle_mouseRelease)
-
- self.mode = None
- self.modeList = {}
-
- self.instrumentPanel = InstrumentPanel( force_load = False )
- self.preloadList = [ self.instrumentPanel ]
-
- #load the sugar toolbar
- self.toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(self.toolbox)
-
- self.activity_toolbar = self.toolbox.get_activity_toolbar()
- self.activity_toolbar.share.hide()
- self.activity_toolbar.keep.hide()
-
- self.toolbox.show()
-
- self.set_mode("edit")
-
- def onPreloadTimeout( self ):
- if Config.DEBUG > 4: print "TamTam::onPreloadTimeout", self.preloadList
-
- t = time.time()
- if self.preloadList[0].load( t + 0.100 ): # finished preloading this object
- self.preloadList.pop(0)
- if not len(self.preloadList):
- if Config.DEBUG > 1: print "TamTam::finished preloading", time.time() - t
- self.preloadTimeout = False
- return False # finished preloading everything
-
- if Config.DEBUG > 4: print "TamTam::preload returned after", time.time() - t
-
- return True
-
- def doNothing(): #a callback function to appease SynthLab
- pass
-
- def set_mode(self, mode, arg = None):
- if Config.DEBUG: print 'DEBUG: TamTam::set_mode from', self.mode, 'to', mode
-
- if self.mode != None:
- self.modeList[ self.mode ].onDeactivate()
- if FAKE_ACTIVITY:
- self.remove( self.modeList[ self.mode ] )
-
- self.mode = None
- self.trackpad.setContext(mode)
-
- if mode == 'welcome':
- if not (mode in self.modeList):
- self.modeList[mode] = Welcome(self, self.set_mode)
- self.mode = mode
- if len( self.preloadList ):
- self.preloadTimeout = gobject.timeout_add( 300, self.onPreloadTimeout )
- elif self.preloadTimeout:
- gobject.source_remove( self.preloadTimeout )
- self.predrawTimeout = False
-
- if mode == 'jam':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Jam'
- self.modeList[mode] = JamMain(self, self.set_mode)
- self.mode = mode
-
- if mode == 'mini':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Mini'
- self.modeList[mode] = miniTamTamMain(self, self.set_mode)
- else:
- self.modeList[mode].regenerate()
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'edit':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Edit'
- self.modeList[mode] = MainWindow(self, self.set_mode)
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'synth':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam SynthLab'
- self.modeList[mode] = SynthLabWindow(self, self.set_mode, None)
- self.mode = mode
-
- if self.mode == None:
- print 'DEBUG: TamTam::set_mode invalid mode:', mode
- else:
- try: # activity mode
- self.set_canvas( self.modeList[ self.mode ] )
- except: # fake mode
- self.add( self.modeList[ self.mode ] )
- self.modeList[ self.mode ].onActivate(arg)
- self.show()
-
- def onFocusIn(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(True)
- if self.mode == 'synth':
- self.modeList[ self.mode ].updateSound()
- self.modeList[ self.mode ].updateTables()
- #csnd.load_instruments()
-
- def onFocusOut(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(False)
-
- def onActive(self, widget = None, event = None):
- pass
-
- def onKeyPress(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
- if event.state == gtk.gdk.MOD1_MASK:
- key = event.keyval
- if key == gtk.keysyms.j:
- self.set_mode("jam")
- return
- elif key == gtk.keysyms.m:
- self.set_mode('mini')
- return
- elif key == gtk.keysyms.s:
- self.set_mode('synth')
- return
- elif key == gtk.keysyms.w:
- self.set_mode('welcome')
- return
- elif key == gtk.keysyms.e:
- self.set_mode('edit')
- return
- elif key == gtk.keysyms.t:
- self.toolbox.show()
- return
- elif key == gtk.keysyms.y:
- self.toolbox.hide()
- if self.mode:
- self.modeList[ self.mode ].onKeyPress(widget, event)
-
- def onKeyRelease(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyRelease in TamTam.py'
- self.modeList[ self.mode ].onKeyRelease(widget, event)
- pass
-
- def onDestroy(self, arg2):
- if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
- os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
-
- for m in self.modeList:
- if self.modeList[m] != None:
- self.modeList[m].onDestroy()
-
- csnd = new_csound_client()
- csnd.connect(False)
- csnd.destroy()
-
- gtk.main_quit()
-
- def ensure_dir(self, dir, perms=0777, rw=os.R_OK|os.W_OK):
- if not os.path.isdir( dir ):
- try:
- os.makedirs(dir, perms)
- except OSError, e:
- print 'ERROR: failed to make dir %s: %i (%s)\n' % (dir, e.errno, e.strerror)
- if not os.access(dir, rw):
- print 'ERROR: directory %s is missing required r/w access\n' % dir
-
- def ensure_dirs(self):
- self.ensure_dir(Config.TUNE_DIR)
- self.ensure_dir(Config.SYNTH_DIR)
- self.ensure_dir(Config.SNDS_DIR)
- self.ensure_dir(Config.SCRATCH_DIR)
-
- if not os.path.isdir(Config.PREF_DIR):
- os.mkdir(Config.PREF_DIR)
- os.system('chmod 0777 ' + Config.PREF_DIR + ' &')
- for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']:
- shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd)
- os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &')
-
- def read_file(self,file_path):
- self.modeList['edit'].handleJournalLoad(file_path)
-
- def write_file(self,file_path):
- self.modeList['edit'].handleJournalSave(file_path)
-
-class TamTamSynthLab(Activity):
- # TamTam is the topmost container in the TamTam application
- # At all times it has one child, which may be one of
- # - the welcome screen
- # - the mini-tamtam
- # - the synth lab
- # - edit mode
-
- def __init__(self, handle, mode='synth'):
- Activity.__init__(self, handle)
- self.ensure_dirs()
-
- color = gtk.gdk.color_parse(Config.WS_BCK_COLOR)
- self.modify_bg(gtk.STATE_NORMAL, color)
-
- self.set_title('TamTam SynthLab')
- self.set_resizable(False)
-
- self.trackpad = Trackpad( self )
- #self.keyboardWindow = KeyboardWindow(size = 8, popup = True)
- #self.keyboardWindow.color_piano()
-
- self.preloadTimeout = None
-
- self.focusInHandler = self.connect('focus_in_event',self.onFocusIn)
- self.focusOutHandler = self.connect('focus_out_event',self.onFocusOut)
- self.connect('notify::active', self.onActive)
- self.connect('destroy', self.onDestroy)
- self.connect( "key-press-event", self.onKeyPress )
- self.connect( "key-release-event", self.onKeyRelease )
- #self.connect( "key-press-event", self.keyboardWindow.handle_keypress)
- #self.connect( "key-release-event", self.keyboardWindow.handle_keyrelease)
- #self.connect( "button-press-event", self.keyboardWindow.handle_mousePress)
- #self.connect( "button-release-event", self.keyboardWindow.handle_mouseRelease)
-
- self.mode = None
- self.modeList = {}
-
- self.instrumentPanel = InstrumentPanel( force_load = False )
- self.preloadList = [ self.instrumentPanel ]
-
- #load the sugar toolbar
- self.toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(self.toolbox)
-
- self.activity_toolbar = self.toolbox.get_activity_toolbar()
- self.activity_toolbar.share.hide()
- self.activity_toolbar.keep.hide()
-
- self.toolbox.show()
-
- self.set_mode("synth")
-
- def onPreloadTimeout( self ):
- if Config.DEBUG > 4: print "TamTam::onPreloadTimeout", self.preloadList
-
- t = time.time()
- if self.preloadList[0].load( t + 0.100 ): # finished preloading this object
- self.preloadList.pop(0)
- if not len(self.preloadList):
- if Config.DEBUG > 1: print "TamTam::finished preloading", time.time() - t
- self.preloadTimeout = False
- return False # finished preloading everything
-
- if Config.DEBUG > 4: print "TamTam::preload returned after", time.time() - t
-
- return True
-
- def doNothing(): #a callback function to appease SynthLab
- pass
-
- def set_mode(self, mode, arg = None):
- if Config.DEBUG: print 'DEBUG: TamTam::set_mode from', self.mode, 'to', mode
-
- if self.mode != None:
- self.modeList[ self.mode ].onDeactivate()
- if FAKE_ACTIVITY:
- self.remove( self.modeList[ self.mode ] )
-
- self.mode = None
- self.trackpad.setContext(mode)
-
- if mode == 'welcome':
- if not (mode in self.modeList):
- self.modeList[mode] = Welcome(self, self.set_mode)
- self.mode = mode
- if len( self.preloadList ):
- self.preloadTimeout = gobject.timeout_add( 300, self.onPreloadTimeout )
- elif self.preloadTimeout:
- gobject.source_remove( self.preloadTimeout )
- self.predrawTimeout = False
-
- if mode == 'jam':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Jam'
- self.modeList[mode] = JamMain(self, self.set_mode)
- self.mode = mode
-
- if mode == 'mini':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Mini'
- self.modeList[mode] = miniTamTamMain(self, self.set_mode)
- else:
- self.modeList[mode].regenerate()
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'edit':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Edit'
- self.modeList[mode] = MainWindow(self, self.set_mode)
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'synth':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam SynthLab'
- self.modeList[mode] = SynthLabWindow(self, self.set_mode, None)
- self.mode = mode
-
- if self.mode == None:
- print 'DEBUG: TamTam::set_mode invalid mode:', mode
- else:
- try: # activity mode
- self.set_canvas( self.modeList[ self.mode ] )
- except: # fake mode
- self.add( self.modeList[ self.mode ] )
- self.modeList[ self.mode ].onActivate(arg)
- self.show()
-
- def onFocusIn(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(True)
- if self.mode == 'synth':
- self.modeList[ self.mode ].updateSound()
- self.modeList[ self.mode ].updateTables()
- #csnd.load_instruments()
-
- def onFocusOut(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(False)
-
- def onActive(self, widget = None, event = None):
- pass
-
- def onKeyPress(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
- if event.state == gtk.gdk.MOD1_MASK:
- key = event.keyval
- if key == gtk.keysyms.j:
- self.set_mode("jam")
- return
- elif key == gtk.keysyms.m:
- self.set_mode('mini')
- return
- elif key == gtk.keysyms.s:
- self.set_mode('synth')
- return
- elif key == gtk.keysyms.w:
- self.set_mode('welcome')
- return
- elif key == gtk.keysyms.e:
- self.set_mode('edit')
- return
- elif key == gtk.keysyms.t:
- self.toolbox.show()
- return
- elif key == gtk.keysyms.y:
- self.toolbox.hide()
- if self.mode:
- self.modeList[ self.mode ].onKeyPress(widget, event)
-
- def onKeyRelease(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyRelease in TamTam.py'
- self.modeList[ self.mode ].onKeyRelease(widget, event)
- pass
-
- def onDestroy(self, arg2):
- if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
- os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
-
- for m in self.modeList:
- if self.modeList[m] != None:
- self.modeList[m].onDestroy()
-
- csnd = new_csound_client()
- csnd.connect(False)
- csnd.destroy()
-
- gtk.main_quit()
-
- def ensure_dir(self, dir, perms=0777, rw=os.R_OK|os.W_OK):
- if not os.path.isdir( dir ):
- try:
- os.makedirs(dir, perms)
- except OSError, e:
- print 'ERROR: failed to make dir %s: %i (%s)\n' % (dir, e.errno, e.strerror)
- if not os.access(dir, rw):
- print 'ERROR: directory %s is missing required r/w access\n' % dir
-
- def ensure_dirs(self):
- self.ensure_dir(Config.TUNE_DIR)
- self.ensure_dir(Config.SYNTH_DIR)
- self.ensure_dir(Config.SNDS_DIR)
- self.ensure_dir(Config.SCRATCH_DIR)
-
- if not os.path.isdir(Config.PREF_DIR):
- os.mkdir(Config.PREF_DIR)
- os.system('chmod 0777 ' + Config.PREF_DIR + ' &')
- for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']:
- shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd)
- os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &')
-
- def read_file(self,file_path):
- self.modeList['synth'].handleJournalLoad(file_path)
-
- def write_file(self,file_path):
- self.modeList['synth'].handleJournalSave(file_path)
-
-class TamTamMini(Activity):
- # TamTam is the topmost container in the TamTam application
- # At all times it has one child, which may be one of
- # - the welcome screen
- # - the mini-tamtam
- # - the synth lab
- # - edit mode
-
- def __init__(self, handle, mode='mini'):
- Activity.__init__(self, handle)
- self.ensure_dirs()
-
- color = gtk.gdk.color_parse(Config.WS_BCK_COLOR)
- self.modify_bg(gtk.STATE_NORMAL, color)
-
- self.set_title('TamTam Mini')
- self.set_resizable(False)
-
- self.trackpad = Trackpad( self )
- #self.keyboardWindow = KeyboardWindow(size = 8, popup = True)
- #self.keyboardWindow.color_piano()
-
- self.preloadTimeout = None
-
- self.focusInHandler = self.connect('focus_in_event',self.onFocusIn)
- self.focusOutHandler = self.connect('focus_out_event',self.onFocusOut)
- self.connect('notify::active', self.onActive)
- self.connect('destroy', self.onDestroy)
- self.connect( "key-press-event", self.onKeyPress )
- self.connect( "key-release-event", self.onKeyRelease )
- #self.connect( "key-press-event", self.keyboardWindow.handle_keypress)
- #self.connect( "key-release-event", self.keyboardWindow.handle_keyrelease)
- #self.connect( "button-press-event", self.keyboardWindow.handle_mousePress)
- #self.connect( "button-release-event", self.keyboardWindow.handle_mouseRelease)
-
- self.mode = None
- self.modeList = {}
-
- self.instrumentPanel = InstrumentPanel( force_load = False )
- self.preloadList = [ self.instrumentPanel ]
-
- #load the sugar toolbar
- self.toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(self.toolbox)
-
- self.activity_toolbar = self.toolbox.get_activity_toolbar()
- self.activity_toolbar.share.hide()
- self.activity_toolbar.keep.hide()
-
- self.toolbox.show()
-
- self.set_mode("mini")
-
- def onPreloadTimeout( self ):
- if Config.DEBUG > 4: print "TamTam::onPreloadTimeout", self.preloadList
-
- t = time.time()
- if self.preloadList[0].load( t + 0.100 ): # finished preloading this object
- self.preloadList.pop(0)
- if not len(self.preloadList):
- if Config.DEBUG > 1: print "TamTam::finished preloading", time.time() - t
- self.preloadTimeout = False
- return False # finished preloading everything
-
- if Config.DEBUG > 4: print "TamTam::preload returned after", time.time() - t
-
- return True
-
- def doNothing(): #a callback function to appease SynthLab
- pass
-
- def set_mode(self, mode, arg = None):
- if Config.DEBUG: print 'DEBUG: TamTam::set_mode from', self.mode, 'to', mode
-
- if self.mode != None:
- self.modeList[ self.mode ].onDeactivate()
- if FAKE_ACTIVITY:
- self.remove( self.modeList[ self.mode ] )
-
- self.mode = None
- self.trackpad.setContext(mode)
-
- if mode == 'welcome':
- if not (mode in self.modeList):
- self.modeList[mode] = Welcome(self, self.set_mode)
- self.mode = mode
- if len( self.preloadList ):
- self.preloadTimeout = gobject.timeout_add( 300, self.onPreloadTimeout )
- elif self.preloadTimeout:
- gobject.source_remove( self.preloadTimeout )
- self.predrawTimeout = False
-
- if mode == 'jam':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Jam'
- self.modeList[mode] = JamMain(self, self.set_mode)
- self.mode = mode
-
- if mode == 'mini':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Mini'
- self.modeList[mode] = miniTamTamMain(self, self.set_mode)
- else:
- self.modeList[mode].regenerate()
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'edit':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam Edit'
- self.modeList[mode] = MainWindow(self, self.set_mode)
- if self.instrumentPanel in self.preloadList:
- self.instrumentPanel.load() # finish loading
- self.modeList[mode].setInstrumentPanel( self.instrumentPanel )
- self.mode = mode
-
- if mode == 'synth':
- if not (mode in self.modeList):
- self.metadata['title'] = 'TamTam SynthLab'
- self.modeList[mode] = SynthLabWindow(self, self.set_mode, None)
- self.mode = mode
-
- if self.mode == None:
- print 'DEBUG: TamTam::set_mode invalid mode:', mode
- else:
- try: # activity mode
- self.set_canvas( self.modeList[ self.mode ] )
- except: # fake mode
- self.add( self.modeList[ self.mode ] )
- self.modeList[ self.mode ].onActivate(arg)
- self.show()
-
- def onFocusIn(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(True)
- if self.mode == 'synth':
- self.modeList[ self.mode ].updateSound()
- self.modeList[ self.mode ].updateTables()
- #csnd.load_instruments()
-
- def onFocusOut(self, event, data=None):
- if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
- csnd = new_csound_client()
- csnd.connect(False)
-
- def onActive(self, widget = None, event = None):
- pass
-
- def onKeyPress(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
- if event.state == gtk.gdk.MOD1_MASK:
- key = event.keyval
- if key == gtk.keysyms.j:
- self.set_mode("jam")
- return
- elif key == gtk.keysyms.m:
- self.set_mode('mini')
- return
- elif key == gtk.keysyms.s:
- self.set_mode('synth')
- return
- elif key == gtk.keysyms.w:
- self.set_mode('welcome')
- return
- elif key == gtk.keysyms.e:
- self.set_mode('edit')
- return
- elif key == gtk.keysyms.t:
- self.toolbox.show()
- return
- elif key == gtk.keysyms.y:
- self.toolbox.hide()
- if self.mode:
- self.modeList[ self.mode ].onKeyPress(widget, event)
-
- def onKeyRelease(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyRelease in TamTam.py'
- self.modeList[ self.mode ].onKeyRelease(widget, event)
- pass
-
- def onDestroy(self, arg2):
- if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
- os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
-
- for m in self.modeList:
- if self.modeList[m] != None:
- self.modeList[m].onDestroy()
-
- csnd = new_csound_client()
- csnd.connect(False)
- csnd.destroy()
-
- gtk.main_quit()
-
- def ensure_dir(self, dir, perms=0777, rw=os.R_OK|os.W_OK):
- if not os.path.isdir( dir ):
- try:
- os.makedirs(dir, perms)
- except OSError, e:
- print 'ERROR: failed to make dir %s: %i (%s)\n' % (dir, e.errno, e.strerror)
- if not os.access(dir, rw):
- print 'ERROR: directory %s is missing required r/w access\n' % dir
-
- def ensure_dirs(self):
- self.ensure_dir(Config.TUNE_DIR)
- self.ensure_dir(Config.SYNTH_DIR)
- self.ensure_dir(Config.SNDS_DIR)
- self.ensure_dir(Config.SCRATCH_DIR)
-
- if not os.path.isdir(Config.PREF_DIR):
- os.mkdir(Config.PREF_DIR)
- os.system('chmod 0777 ' + Config.PREF_DIR + ' &')
- for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']:
- shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd)
- os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &')
-
- def read_file(self,file_path):
- self.metadata['tamtam_subactivity'] = 'mini'
-
- def write_file(self,file_path):
- f = open(file_path,'w')
- f.close()
-
-
-
-if __name__ == "__main__":
- if len(sys.argv) > 1 :
- mainwin = TamTam(None, sys.argv[1])
- else:
- mainwin = TamTam(None, 'welcome')
-
- gtk.gdk.threads_init()
- gtk.main()
-
- sys.exit(0)
-
-
-
-
-
-
-
-
- def run_edit_mode():
- tamtam = MainWindow()
- mainwin = gtk.Window(gtk.WINDOW_TOPLEVEL)
- mainwin.set_title('TamTam Player')
- display = mainwin.get_display()
- screen = gtk.gdk.Display.get_default_screen(display)
- mainwin.set_geometry_hints( None, screen.get_width(), screen.get_height(), screen.get_width(), screen.get_height(), screen.get_width(), screen.get_height() )
- #mainwin.fullscreen() # don't need to specify full screen, it seem to sit properly anyway
- mainwin.set_resizable(False)
- mainwin.connect('destroy' , tamtam.destroy )
- #mainwin.connect( "configure-event", tamtam.handleConfigureEvent )
- mainwin.connect( "key-press-event", tamtam.onKeyPress )
- mainwin.connect( "key-release-event", tamtam.onKeyRelease )
- mainwin.connect( "delete_event", tamtam.delete_event )
- mainwin.add(tamtam)
- tamtam.show()
- mainwin.show()
- gtk.main()
diff --git a/TamTamJam.activity/TamTamJam.py b/TamTamJam.activity/TamTamJam.py
new file mode 100644
index 0000000..22b71bd
--- /dev/null
+++ b/TamTamJam.activity/TamTamJam.py
@@ -0,0 +1,135 @@
+import locale
+locale.setlocale(locale.LC_NUMERIC, 'C')
+import signal , time , sys , os, shutil
+import pygtk
+pygtk.require( '2.0' )
+import gtk
+
+import gobject
+import time
+
+import common.Config as Config
+from common.Util.CSoundClient import new_csound_client
+from common.Util.Profiler import TP
+
+from Jam.JamMain import JamMain
+from common.Util.Trackpad import Trackpad
+from gettext import gettext as _
+import commands
+from sugar.activity import activity
+
+class TamTamJam(activity.Activity):
+ def __init__(self, handle):
+ activity.Activity.__init__(self, handle)
+ self.ensure_dirs()
+
+ color = gtk.gdk.color_parse(Config.WS_BCK_COLOR)
+ self.modify_bg(gtk.STATE_NORMAL, color)
+
+ self.set_title('TamTam Jam')
+ self.set_resizable(False)
+
+ self.trackpad = Trackpad( self )
+
+ self.preloadTimeout = None
+
+ self.focusInHandler = self.connect('focus_in_event',self.onFocusIn)
+ self.focusOutHandler = self.connect('focus_out_event',self.onFocusOut)
+ self.connect('notify::active', self.onActive)
+ self.connect('destroy', self.onDestroy)
+ self.connect( "key-press-event", self.onKeyPress )
+ self.connect( "key-release-event", self.onKeyRelease )
+
+ #load the sugar toolbar
+ self.toolbox = activity.ActivityToolbox(self)
+ self.set_toolbox(self.toolbox)
+
+ self.activity_toolbar = self.toolbox.get_activity_toolbar()
+ self.activity_toolbar.share.hide()
+ self.activity_toolbar.keep.hide()
+
+ self.toolbox.show()
+
+ self.trackpad.setContext('jam')
+ self.jam = JamMain(self)
+ #self.modeList[mode].regenerate()
+
+ self.set_canvas( self.jam )
+
+ self.jam.onActivate(arg = None)
+ self.show()
+
+ def onPreloadTimeout( self ):
+ if Config.DEBUG > 4: print "TamTam::onPreloadTimeout", self.preloadList
+
+ t = time.time()
+ if self.preloadList[0].load( t + 0.100 ): # finished preloading this object
+ self.preloadList.pop(0)
+ if not len(self.preloadList):
+ if Config.DEBUG > 1: print "TamTam::finished preloading", time.time() - t
+ self.preloadTimeout = False
+ return False # finished preloading everything
+
+ if Config.DEBUG > 4: print "TamTam::preload returned after", time.time() - t
+
+ return True
+
+ def onFocusIn(self, event, data=None):
+ if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
+ csnd = new_csound_client()
+ csnd.connect(True)
+ #csnd.load_instruments()
+
+ def onFocusOut(self, event, data=None):
+ if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
+ csnd = new_csound_client()
+ csnd.connect(False)
+
+ def onActive(self, widget = None, event = None):
+ pass
+
+ def onKeyPress(self, widget, event):
+ pass
+
+ def onKeyRelease(self, widget, event):
+ pass
+
+ def onDestroy(self, arg2):
+ if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
+ os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
+
+ self.jam.onDestroy()
+
+ csnd = new_csound_client()
+ csnd.connect(False)
+ csnd.destroy()
+
+ gtk.main_quit()
+
+ def ensure_dir(self, dir, perms=0777, rw=os.R_OK|os.W_OK):
+ if not os.path.isdir( dir ):
+ try:
+ os.makedirs(dir, perms)
+ except OSError, e:
+ print 'ERROR: failed to make dir %s: %i (%s)\n' % (dir, e.errno, e.strerror)
+ if not os.access(dir, rw):
+ print 'ERROR: directory %s is missing required r/w access\n' % dir
+
+ def ensure_dirs(self):
+ self.ensure_dir(Config.TUNE_DIR)
+ self.ensure_dir(Config.SYNTH_DIR)
+ self.ensure_dir(Config.SNDS_DIR)
+ self.ensure_dir(Config.SCRATCH_DIR)
+
+ if not os.path.isdir(Config.PREF_DIR):
+ os.mkdir(Config.PREF_DIR)
+ os.system('chmod 0777 ' + Config.PREF_DIR + ' &')
+ for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']:
+ shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd)
+ os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &')
+
+ def read_file(self,file_path):
+ self.jam.handleJournalLoad(file_path)
+
+ def write_file(self,file_path):
+ self.jam.handleJournalSave(file_path)
diff --git a/TamTamJam.activity/activity/activity-tamtamjam.svg b/TamTamJam.activity/activity/activity-tamtamjam.svg
new file mode 100644
index 0000000..563df7b
--- /dev/null
+++ b/TamTamJam.activity/activity/activity-tamtamjam.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+ <!ENTITY stroke_color "#010101">
+ <!ENTITY fill_color "#FFFFFF">
+]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="activity-tamtam">
+
+ <path d=" M9.653,18.199h35.54c0.772,0,1.4,0.628,1.4,1.403v2.362c0,0.771-0.628,1.401-1.4,1.401H9.653c-0.775,0-1.403-0.628-1.403-1.401 v-2.361C8.25,18.826,8.877,18.199,9.653,18.199z" display="inline" fill="&stroke_color;" id="path8" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+
+ <rect display="inline" fill="&fill_color;" height="22.128" id="rect10" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" width="33.139" x="10.852" y="23.365"/>
+
+ <path d=" M9.653,45.493h35.54c0.772,0,1.4,0.627,1.4,1.401v2.362c0,0.775-0.628,1.405-1.4,1.405H9.653c-0.775,0-1.403-0.629-1.403-1.405 v-2.362C8.25,46.124,8.877,45.493,9.653,45.493z" display="inline" fill="&stroke_color;" id="path17" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+
+ <path d=" M10.851,45.491l8.544-22.126l7.896,22.125l7.926-22.126" display="inline" fill="none" id="path19" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+
+ <path d=" M43.987,45.491l-8.77-22.126" display="inline" fill="none" id="path21" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+
+ <line display="inline" fill="none" id="line27" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" x1="33.69" x2="48.336" y1="13.149" y2="5.948"/>
+
+ <line display="inline" fill="none" id="line29" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" x1="6.042" x2="20.658" y1="2.213" y2="9.48"/>
+
+ <path d=" M25.721,9.802c0.55,1.451-0.171,3.066-1.608,3.612c-1.437,0.545-3.049-0.188-3.599-1.639c-0.547-1.45,0.174-3.067,1.609-3.613 C23.561,7.62,25.172,8.352,25.721,9.802z" display="inline" fill="&fill_color;" id="path23" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.25"/>
+
+ <path d=" M33.338,16.442c-1.04,1.125-2.798,1.189-3.928,0.144c-1.128-1.044-1.197-2.801-0.155-3.927c1.041-1.125,2.8-1.19,3.926-0.146 C34.31,13.558,34.381,15.316,33.338,16.442z" display="inline" fill="&fill_color;" id="path25" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.25"/>
+</g></svg>
+
diff --git a/TamTamJam.activity/activity/activity.info b/TamTamJam.activity/activity/activity.info
new file mode 100644
index 0000000..8def01b
--- /dev/null
+++ b/TamTamJam.activity/activity/activity.info
@@ -0,0 +1,6 @@
+[Activity]
+name = TamTamJam
+service_name = org.laptop.TamTamJam
+icon = activity-tamtamjam
+class = TamTamJam.TamTamJam
+activity_version = 40
diff --git a/TamTamJam.activity/po/TamTamJam.pot b/TamTamJam.activity/po/TamTamJam.pot
new file mode 100644
index 0000000..ffbd55e
--- /dev/null
+++ b/TamTamJam.activity/po/TamTamJam.pot
@@ -0,0 +1,448 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-09-13 16:30-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: activity/activity.info:2
+msgid "TamTamJam"
+msgstr ""
+
+#: Jam/Desktop.py:61
+msgid "Instrument Properties"
+msgstr ""
+
+#: Jam/Desktop.py:62
+msgid "Drum Kit Properties"
+msgstr ""
+
+#: Jam/Desktop.py:63
+msgid "Loop Properties"
+msgstr ""
+
+#: Jam/Desktop.py:64
+msgid "Assign Key"
+msgstr ""
+
+#: Jam/JamMain.py:198
+msgid "Jam"
+msgstr ""
+
+#: Jam/JamMain.py:201
+msgid "Desktop"
+msgstr ""
+
+#: Jam/Popup.py:123 Jam/Popup.py:225
+msgid "Volume:"
+msgstr ""
+
+#: Jam/Popup.py:139
+msgid "Pan:"
+msgstr ""
+
+#: Jam/Popup.py:155 Jam/Popup.py:241
+msgid "Reverb:"
+msgstr ""
+
+#: Jam/Popup.py:260 Jam/Popup.py:364
+msgid "Beats:"
+msgstr ""
+
+#: Jam/Popup.py:276 Jam/Popup.py:380
+msgid "Regularity:"
+msgstr ""
+
+#: Jam/Popup.py:1329
+msgid "None"
+msgstr ""
+
+#: Jam/Toolbars.py:30
+msgid "Master Volume"
+msgstr ""
+
+#: Jam/Toolbars.py:43 common/Resources/tooltips_en.py:49
+#: common/Resources/tooltips_en.py:120
+msgid "Tempo"
+msgstr ""
+
+#: Jam/Toolbars.py:102
+msgid "Desktop 1"
+msgstr ""
+
+#: Jam/Toolbars.py:109
+#, python-format
+msgid "Desktop %d"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:8
+msgid "Select tool"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:9
+msgid "Draw tool"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:10
+msgid "Paint tool"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:12
+msgid "Generate new tune"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:14
+msgid "Generate page"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:15
+msgid "Page properties"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:16
+msgid "Delete page(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:17
+msgid "Duplicate page(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:18
+msgid "Add page"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:19
+msgid "Beats per page"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:20
+msgid "Save tune"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:21
+msgid "Load tune"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:23
+msgid "Generate track"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:24
+msgid "Track properties"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:25
+msgid "Clear track"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:26
+msgid "Duplicate track"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:28
+msgid "Note(s) properties"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:29
+msgid "Delete note(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:30
+msgid "Duplicate note(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:31 common/Resources/tooltips_en.py:32
+msgid "Move note in time"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:33
+msgid "Lower pitch"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:34
+msgid "Raise pitch"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:35 common/Resources/tooltips_en.py:36
+msgid "Modify duration"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:37
+msgid "Lower volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:38
+msgid "Raise volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:40
+msgid "Play"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:41
+msgid "Pause"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:42 common/Resources/tooltips_en.py:115
+msgid "Stop"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:43
+msgid "Keyboard recording"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:44
+msgid "Save as .ogg"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:45
+msgid "Rewind"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:46
+msgid "Save to journal and quit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:48
+msgid "Master volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:51 common/Resources/tooltips_en.py:52
+#: common/Resources/tooltips_en.py:53 common/Resources/tooltips_en.py:54
+#: common/Resources/tooltips_en.py:55
+msgid "Left click to mute, right click to solo"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:58
+msgid "-- Rythm density, | Rythm regularity"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:59
+msgid "-- Pitch regularity, | Pitch maximum step"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:60
+msgid "-- Average duration, | Silence probability"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:61 common/Resources/tooltips_en.py:98
+msgid "Drunk"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:62
+msgid "Drone and Jump"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:63 common/Resources/tooltips_en.py:100
+msgid "Repeater"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:64 common/Resources/tooltips_en.py:101
+msgid "Loop segments"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:65
+msgid "Major scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:66
+msgid "Harmonic minor scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:67
+msgid "Natural minor scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:68
+msgid "Phrygian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:69
+msgid "Dorian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:70
+msgid "Lydian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:71
+msgid "Myxolydian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:72
+msgid "Save preset"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:73
+msgid "Load preset"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:74 common/Resources/tooltips_en.py:117
+msgid "Generate"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:75
+msgid "Close"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:78
+msgid "Transpose up"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:79
+msgid "Transpose down"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:80
+msgid "Volume up"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:81
+msgid "Volume down"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:82
+msgid "Panoramisation"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:83 common/Resources/tooltips_en.py:113
+msgid "Reverb"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:84
+msgid "Attack duration"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:85
+msgid "Decay duration"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:86
+msgid "Lowpass filter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:87
+msgid "Highpass filter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:88
+msgid "Bandpass filter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:89
+msgid "Filter cutoff"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:90 common/Resources/tooltips_en.py:91
+#: common/Resources/tooltips_en.py:92 common/Resources/tooltips_en.py:93
+#: common/Resources/tooltips_en.py:94 common/Resources/tooltips_en.py:95
+#: common/Resources/tooltips_en.py:96
+msgid "Open algorithmic generator"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:97
+msgid "Line"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:99
+msgid "Drone and jump"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:102
+msgid "Minimum value"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:103
+msgid "Maximum value"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:104
+msgid "Specific parameter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:105
+msgid "Apply generator"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:106
+msgid "Cancel"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:111
+msgid "Volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:112
+msgid "Balance"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:114
+msgid "Play / Stop"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:116
+msgid "Left click to record, right click to record on top"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:118
+msgid "Complexity of beat"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:119
+msgid "Beats per bar"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:121
+msgid "Jazz / Rock Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:122
+msgid "African Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:123
+msgid "Arabic Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:124
+msgid "South American Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:125
+msgid "Electronic Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:126
+msgid "Record with the microphone"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:127
+msgid "Open SynthLab to create noise"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 1"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 2"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 3"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 4"
+msgstr ""
diff --git a/TamTamJam.activity/setup.py b/TamTamJam.activity/setup.py
index 5b21f11..1f73587 100644
--- a/TamTamJam.activity/setup.py
+++ b/TamTamJam.activity/setup.py
@@ -17,5 +17,14 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from sugar.activity import bundlebuilder
+import shutil
+import os
-bundlebuilder.start('TamTam')
+#We are removing the symlink to common and replacing it with the real common folder
+os.system('unlink common')
+shutil.copytree('../common', 'common')
+
+bundlebuilder.start('TamTamJam')
+#Restore the symlink
+os.system('rm -rf common')
+os.system('ln -s ../common common')
diff --git a/TamTamMini.activity/MANIFEST b/TamTamMini.activity/MANIFEST
new file mode 100644
index 0000000..0b06dea
--- /dev/null
+++ b/TamTamMini.activity/MANIFEST
@@ -0,0 +1,522 @@
+MANIFEST
+NEWS
+setup.py
+TamTamMini.py
+activity/activity-tamtam.svg
+activity/activity.info
+icons/keyrec.svg
+icons/loop.svg
+icons/micrec1.svg
+icons/micrec2.svg
+icons/micrec3.svg
+icons/micrec4.svg
+icons/micrec5.svg
+icons/micrec6.svg
+icons/minusrec.svg
+icons/overrec.svg
+icons/rec1.svg
+icons/rec2.svg
+icons/rec3.svg
+icons/rec4.svg
+icons/rec5.svg
+icons/rec6.svg
+Mini/Fillin.py
+Mini/GenRythm.py
+Mini/KeyboardStandAlone.py
+Mini/Loop.py
+Mini/MiniSequencer.py
+Mini/NoteStdAlone.py
+Mini/RythmGenerator.py
+Mini/__init__.py
+Mini/lps.py
+Mini/miniTamTamMain.py
+Mini/miniToolbars.py
+common/__init__.py
+common/Config.py
+common/Util/CSoundClient.py
+common/Util/CSoundNote.py
+common/Util/ControlStream.py
+common/Util/Credits.py
+common/Util/InstrumentDB.py
+common/Util/InstrumentPanel.py
+common/Util/Instrument_.py
+common/Util/KeyboardWindow.py
+common/Util/LoopSettings.py
+common/Util/Network.py
+common/Util/NoteDB.py
+common/Util/NoteLooper.py
+common/Util/Profiler.py
+common/Util/Sound.py
+common/Util/ThemeWidgets.py
+common/Util/Trackpad.py
+common/Util/__init__.py
+common/Util/Clooper/Makefile
+common/Util/Clooper/SoundClient.i
+common/Util/Clooper/__init__.py
+common/Util/Clooper/aclient.cpp
+common/Util/Clooper/aclient.so
+common/Util/Clooper/audio.cpp
+common/Util/Clooper/cmd_csound.cpp
+common/Util/Clooper/log.cpp
+common/Util/Clooper/ttest.c
+common/Util/Clooper/ttest.h
+common/Util/Clooper/ttest.i
+common/Util/Clooper/ttest.py
+common/Util/Clooper/ttest_wrap.c
+common/Generation/Drunk.py
+common/Generation/GenerationConstants.py
+common/Generation/GenerationParametersWindow.py
+common/Generation/GenerationPitch.py
+common/Generation/GenerationRythm.py
+common/Generation/Generator.py
+common/Generation/Utils.py
+common/Generation/VariationPitch.py
+common/Generation/VariationRythm.py
+common/Generation/__init__.py
+common/Generation/bList.py
+common/Resources/__init__.py
+common/Resources/crop.csd
+common/Resources/tamtamorc.csd
+common/Resources/tooltips_en.py
+common/Resources/tooltips_fr.py
+common/Resources/Desktops/desktop0
+common/Resources/Desktops/desktop1
+common/Resources/Desktops/desktop2
+common/Resources/Desktops/desktop3
+common/Resources/Desktops/desktop4
+common/Resources/Desktops/desktop5
+common/Resources/Desktops/desktop6
+common/Resources/Desktops/desktop7
+common/Resources/Desktops/desktop8
+common/Resources/Desktops/desktop9
+common/Resources/Images/TamTam.png
+common/Resources/Images/acguit.png
+common/Resources/Images/acguitsel.png
+common/Resources/Images/alarm.png
+common/Resources/Images/alarmsel.png
+common/Resources/Images/all.png
+common/Resources/Images/allsel.png
+common/Resources/Images/animals.png
+common/Resources/Images/animalssel.png
+common/Resources/Images/arrowEditDown.png
+common/Resources/Images/arrowEditDownDown.png
+common/Resources/Images/arrowEditDownOver.png
+common/Resources/Images/arrowEditLeft.png
+common/Resources/Images/arrowEditLeftDown.png
+common/Resources/Images/arrowEditLeftOver.png
+common/Resources/Images/arrowEditRight.png
+common/Resources/Images/arrowEditRightDown.png
+common/Resources/Images/arrowEditRightOver.png
+common/Resources/Images/arrowEditUp.png
+common/Resources/Images/arrowEditUpDown.png
+common/Resources/Images/arrowEditUpOver.png
+common/Resources/Images/basse.png
+common/Resources/Images/bassesel.png
+common/Resources/Images/beat1.png
+common/Resources/Images/beat10.png
+common/Resources/Images/beat11.png
+common/Resources/Images/beat2.png
+common/Resources/Images/beat3.png
+common/Resources/Images/beat4.png
+common/Resources/Images/beat5.png
+common/Resources/Images/beat6.png
+common/Resources/Images/beat7.png
+common/Resources/Images/beat8.png
+common/Resources/Images/beat9.png
+common/Resources/Images/bird.png
+common/Resources/Images/birdsel.png
+common/Resources/Images/bottle.png
+common/Resources/Images/bottlesel.png
+common/Resources/Images/bubbles.png
+common/Resources/Images/bubblessel.png
+common/Resources/Images/byke.png
+common/Resources/Images/bykesel.png
+common/Resources/Images/camera.png
+common/Resources/Images/camerasel.png
+common/Resources/Images/car.png
+common/Resources/Images/carsel.png
+common/Resources/Images/cat.png
+common/Resources/Images/catsel.png
+common/Resources/Images/cello.png
+common/Resources/Images/cellosel.png
+common/Resources/Images/check.png
+common/Resources/Images/checkOff.svg
+common/Resources/Images/checkOn.svg
+common/Resources/Images/chimes.png
+common/Resources/Images/chimessel.png
+common/Resources/Images/clang.png
+common/Resources/Images/clangsel.png
+common/Resources/Images/clarinette.png
+common/Resources/Images/clarinettesel.png
+common/Resources/Images/cling.png
+common/Resources/Images/clingsel.png
+common/Resources/Images/complex1.png
+common/Resources/Images/complex2.png
+common/Resources/Images/complex3.png
+common/Resources/Images/complex4.png
+common/Resources/Images/complex5.png
+common/Resources/Images/complex6.png
+common/Resources/Images/complex7.png
+common/Resources/Images/complex8.png
+common/Resources/Images/concret.png
+common/Resources/Images/concretsel.png
+common/Resources/Images/crash.png
+common/Resources/Images/crashsel.png
+common/Resources/Images/dice.png
+common/Resources/Images/diceProp.png
+common/Resources/Images/dicePropSel.png
+common/Resources/Images/diceblur.png
+common/Resources/Images/diceinst.png
+common/Resources/Images/diceinstsel.png
+common/Resources/Images/didjeridu.png
+common/Resources/Images/didjeridusel.png
+common/Resources/Images/dog.png
+common/Resources/Images/dogsel.png
+common/Resources/Images/door.png
+common/Resources/Images/doorsel.png
+common/Resources/Images/dru0.png
+common/Resources/Images/dru1.png
+common/Resources/Images/dru2.png
+common/Resources/Images/dru3.png
+common/Resources/Images/dru4.png
+common/Resources/Images/drum1kit.png
+common/Resources/Images/drum1kitsel.png
+common/Resources/Images/drum1kitselgen.png
+common/Resources/Images/drum2kit.png
+common/Resources/Images/drum2kitsel.png
+common/Resources/Images/drum2kitselgen.png
+common/Resources/Images/drum3kit.png
+common/Resources/Images/drum3kitsel.png
+common/Resources/Images/drum3kitselgen.png
+common/Resources/Images/drum4kit.png
+common/Resources/Images/drum4kitsel.png
+common/Resources/Images/drum4kitselgen.png
+common/Resources/Images/drum5kit.png
+common/Resources/Images/drum5kitsel.png
+common/Resources/Images/drum5kitselgen.png
+common/Resources/Images/duck.png
+common/Resources/Images/duck2.png
+common/Resources/Images/duck2sel.png
+common/Resources/Images/ducksel.png
+common/Resources/Images/editTam.png
+common/Resources/Images/editTamDown.png
+common/Resources/Images/editTamOver.png
+common/Resources/Images/electronic.png
+common/Resources/Images/electronicsel.png
+common/Resources/Images/flute.png
+common/Resources/Images/flutesel.png
+common/Resources/Images/gam.png
+common/Resources/Images/gamsel.png
+common/Resources/Images/generic.png
+common/Resources/Images/genericsel.png
+common/Resources/Images/guit.png
+common/Resources/Images/guit2.png
+common/Resources/Images/guit2sel.png
+common/Resources/Images/guitsel.png
+common/Resources/Images/harmonica.png
+common/Resources/Images/harmonicasel.png
+common/Resources/Images/harmonium.png
+common/Resources/Images/harmoniumsel.png
+common/Resources/Images/helpShow1.jpg
+common/Resources/Images/helpShow2.jpg
+common/Resources/Images/helpShow3.jpg
+common/Resources/Images/helpShow4.jpg
+common/Resources/Images/helpShow5.jpg
+common/Resources/Images/helpShow6.jpg
+common/Resources/Images/helpShow7.jpg
+common/Resources/Images/helpShow8.jpg
+common/Resources/Images/helpShow9.jpg
+common/Resources/Images/helpTam.png
+common/Resources/Images/helpTamDown.png
+common/Resources/Images/helpTamOver.png
+common/Resources/Images/hit.png
+common/Resources/Images/hitSelected.png
+common/Resources/Images/horse.png
+common/Resources/Images/horsesel.png
+common/Resources/Images/instr0.png
+common/Resources/Images/instr1.png
+common/Resources/Images/instr2.png
+common/Resources/Images/instr3.png
+common/Resources/Images/instr4.png
+common/Resources/Images/jam-blockMask.png
+common/Resources/Images/kalimba.png
+common/Resources/Images/kalimbasel.png
+common/Resources/Images/keyboard.png
+common/Resources/Images/keyboardsel.png
+common/Resources/Images/koto.png
+common/Resources/Images/kotosel.png
+common/Resources/Images/laugh.png
+common/Resources/Images/laughsel.png
+common/Resources/Images/mando.png
+common/Resources/Images/mandosel.png
+common/Resources/Images/marimba.png
+common/Resources/Images/marimbasel.png
+common/Resources/Images/marquis.png
+common/Resources/Images/mic1.png
+common/Resources/Images/mic1sel.png
+common/Resources/Images/mic2.png
+common/Resources/Images/mic2sel.png
+common/Resources/Images/mic3.png
+common/Resources/Images/mic3sel.png
+common/Resources/Images/mic4.png
+common/Resources/Images/mic4sel.png
+common/Resources/Images/miniTam.png
+common/Resources/Images/miniTamDown.png
+common/Resources/Images/miniTamOver.png
+common/Resources/Images/miniplay.png
+common/Resources/Images/mysounds.png
+common/Resources/Images/mysoundssel.png
+common/Resources/Images/note.png
+common/Resources/Images/noteSelected.png
+common/Resources/Images/ocarina.png
+common/Resources/Images/ocarinasel.png
+common/Resources/Images/ounk.png
+common/Resources/Images/ounksel.png
+common/Resources/Images/ow.png
+common/Resources/Images/owsel.png
+common/Resources/Images/pageThumbnailBG.png
+common/Resources/Images/pageThumbnailBG0.png
+common/Resources/Images/pageThumbnailBG1.png
+common/Resources/Images/pageThumbnailBG2.png
+common/Resources/Images/pageThumbnailBG3.png
+common/Resources/Images/pageThumbnailBut0.png
+common/Resources/Images/pageThumbnailBut0Down.png
+common/Resources/Images/pageThumbnailBut1.png
+common/Resources/Images/pageThumbnailBut1Down.png
+common/Resources/Images/pageThumbnailBut2.png
+common/Resources/Images/pageThumbnailBut2Down.png
+common/Resources/Images/pageThumbnailBut3.png
+common/Resources/Images/pageThumbnailBut3Down.png
+common/Resources/Images/pageThumbnailMask.png
+common/Resources/Images/people.png
+common/Resources/Images/peoplesel.png
+common/Resources/Images/percussions.png
+common/Resources/Images/percussionssel.png
+common/Resources/Images/piano.png
+common/Resources/Images/pianosel.png
+common/Resources/Images/plane.png
+common/Resources/Images/planesel.png
+common/Resources/Images/reverb0.png
+common/Resources/Images/reverb1.png
+common/Resources/Images/reverb2.png
+common/Resources/Images/reverb3.png
+common/Resources/Images/reverb4.png
+common/Resources/Images/reverb5.png
+common/Resources/Images/rhodes.png
+common/Resources/Images/rhodessel.png
+common/Resources/Images/sampleBG.png
+common/Resources/Images/sampleNoteMask.png
+common/Resources/Images/saxo.png
+common/Resources/Images/saxosel.png
+common/Resources/Images/scrollBar.png
+common/Resources/Images/sheep.png
+common/Resources/Images/sheepsel.png
+common/Resources/Images/shenai.png
+common/Resources/Images/shenaisel.png
+common/Resources/Images/sitar.png
+common/Resources/Images/sitarsel.png
+common/Resources/Images/slap.png
+common/Resources/Images/slapsel.png
+common/Resources/Images/sliderDrum.png
+common/Resources/Images/sliderEditTempo.png
+common/Resources/Images/sliderEditVolume.png
+common/Resources/Images/sliderInst1.png
+common/Resources/Images/sliderInst2.png
+common/Resources/Images/sliderInst3.png
+common/Resources/Images/sliderInst4.png
+common/Resources/Images/sliderbutbleu.png
+common/Resources/Images/sliderbutjaune.png
+common/Resources/Images/sliderbutred.png
+common/Resources/Images/sliderbutvert.png
+common/Resources/Images/sliderbutviolet.png
+common/Resources/Images/sliderlong.png
+common/Resources/Images/slidershort.png
+common/Resources/Images/stop.png
+common/Resources/Images/strings.png
+common/Resources/Images/stringssel.png
+common/Resources/Images/synthTam.png
+common/Resources/Images/synthTamDown.png
+common/Resources/Images/synthTamOver.png
+common/Resources/Images/synthlabMask.png
+common/Resources/Images/tchiwo.png
+common/Resources/Images/tchiwosel.png
+common/Resources/Images/tempo1.png
+common/Resources/Images/tempo2.png
+common/Resources/Images/tempo3.png
+common/Resources/Images/tempo4.png
+common/Resources/Images/tempo5.png
+common/Resources/Images/tempo6.png
+common/Resources/Images/tempo7.png
+common/Resources/Images/tempo8.png
+common/Resources/Images/trackBG.png
+common/Resources/Images/trackBGDrum.png
+common/Resources/Images/trackBGDrumSelected.png
+common/Resources/Images/trackBGSelected.png
+common/Resources/Images/triangle.png
+common/Resources/Images/trianglesel.png
+common/Resources/Images/trumpet.png
+common/Resources/Images/trumpetsel.png
+common/Resources/Images/tuba.png
+common/Resources/Images/tubasel.png
+common/Resources/Images/violin.png
+common/Resources/Images/violinsel.png
+common/Resources/Images/voix.png
+common/Resources/Images/voixsel.png
+common/Resources/Images/volume0.png
+common/Resources/Images/volume1.png
+common/Resources/Images/volume2.png
+common/Resources/Images/volume3.png
+common/Resources/Images/water.png
+common/Resources/Images/watersel.png
+common/Resources/Images/winds.png
+common/Resources/Images/windssel.png
+common/Resources/Images/zap.png
+common/Resources/Images/zapsel.png
+common/Resources/Loops/loop1.ttl
+common/Resources/Loops/loop2.ttl
+common/Resources/Loops/loop3.ttl
+common/Resources/Sounds/acguit
+common/Resources/Sounds/alarm
+common/Resources/Sounds/banjo
+common/Resources/Sounds/basse
+common/Resources/Sounds/bird
+common/Resources/Sounds/bottle
+common/Resources/Sounds/bubbles
+common/Resources/Sounds/byke
+common/Resources/Sounds/camera
+common/Resources/Sounds/car
+common/Resources/Sounds/cat
+common/Resources/Sounds/cello
+common/Resources/Sounds/chimes
+common/Resources/Sounds/clang
+common/Resources/Sounds/clarinette
+common/Resources/Sounds/cling
+common/Resources/Sounds/crash
+common/Resources/Sounds/diceinst
+common/Resources/Sounds/didjeridu
+common/Resources/Sounds/dog
+common/Resources/Sounds/door
+common/Resources/Sounds/drum1chine
+common/Resources/Sounds/drum1crash
+common/Resources/Sounds/drum1floortom
+common/Resources/Sounds/drum1hardride
+common/Resources/Sounds/drum1hatpedal
+common/Resources/Sounds/drum1hatshoulder
+common/Resources/Sounds/drum1kick
+common/Resources/Sounds/drum1ridebell
+common/Resources/Sounds/drum1snare
+common/Resources/Sounds/drum1snaresidestick
+common/Resources/Sounds/drum1splash
+common/Resources/Sounds/drum1tom
+common/Resources/Sounds/drum2darbukadoom
+common/Resources/Sounds/drum2darbukafinger
+common/Resources/Sounds/drum2darbukapied
+common/Resources/Sounds/drum2darbukapiedsoft
+common/Resources/Sounds/drum2darbukaroll
+common/Resources/Sounds/drum2darbukaslap
+common/Resources/Sounds/drum2darbukatak
+common/Resources/Sounds/drum2hatflanger
+common/Resources/Sounds/drum2hatpied
+common/Resources/Sounds/drum2hatpied2
+common/Resources/Sounds/drum2tambourinepied
+common/Resources/Sounds/drum2tambourinepiedsoft
+common/Resources/Sounds/drum3cowbell
+common/Resources/Sounds/drum3cowbelltip
+common/Resources/Sounds/drum3cup
+common/Resources/Sounds/drum3djembelow
+common/Resources/Sounds/drum3djembemid
+common/Resources/Sounds/drum3djembesidestick
+common/Resources/Sounds/drum3djembeslap
+common/Resources/Sounds/drum3djembestickmid
+common/Resources/Sounds/drum3metalstand
+common/Resources/Sounds/drum3pedalperc
+common/Resources/Sounds/drum3rainstick
+common/Resources/Sounds/drum3tambourinehigh
+common/Resources/Sounds/drum3tambourinelow
+common/Resources/Sounds/drum4afrofeet
+common/Resources/Sounds/drum4fingersn
+common/Resources/Sounds/drum4mutecuic
+common/Resources/Sounds/drum4stompbass
+common/Resources/Sounds/drum4tambouri
+common/Resources/Sounds/drum4tr707clap
+common/Resources/Sounds/drum4tr707open
+common/Resources/Sounds/drum4tr808closed
+common/Resources/Sounds/drum4tr808sn
+common/Resources/Sounds/drum4tr909bass
+common/Resources/Sounds/drum4tr909kick
+common/Resources/Sounds/drum4tr909sn
+common/Resources/Sounds/drum5agogoaigu
+common/Resources/Sounds/drum5agogograve
+common/Resources/Sounds/drum5bongoaiguouvert
+common/Resources/Sounds/drum5bongograveouvert
+common/Resources/Sounds/drum5congaaiguouvert
+common/Resources/Sounds/drum5congagraveferme
+common/Resources/Sounds/drum5congagraveouvert
+common/Resources/Sounds/drum5guiroretour
+common/Resources/Sounds/drum5quicaaigu
+common/Resources/Sounds/drum5quicamedium
+common/Resources/Sounds/drum5timablesaiguslap
+common/Resources/Sounds/drum5timablesslap
+common/Resources/Sounds/drum5vibraslap
+common/Resources/Sounds/duck
+common/Resources/Sounds/duck2
+common/Resources/Sounds/flute
+common/Resources/Sounds/gam
+common/Resources/Sounds/guidice1
+common/Resources/Sounds/guidice10
+common/Resources/Sounds/guidice2
+common/Resources/Sounds/guidice3
+common/Resources/Sounds/guidice4
+common/Resources/Sounds/guidice5
+common/Resources/Sounds/guidice6
+common/Resources/Sounds/guidice7
+common/Resources/Sounds/guidice8
+common/Resources/Sounds/guidice9
+common/Resources/Sounds/guit
+common/Resources/Sounds/guit2
+common/Resources/Sounds/harmonica
+common/Resources/Sounds/harmonium
+common/Resources/Sounds/horse
+common/Resources/Sounds/kalimba
+common/Resources/Sounds/koto
+common/Resources/Sounds/lab1
+common/Resources/Sounds/lab2
+common/Resources/Sounds/lab3
+common/Resources/Sounds/lab4
+common/Resources/Sounds/lab5
+common/Resources/Sounds/lab6
+common/Resources/Sounds/laugh
+common/Resources/Sounds/mando
+common/Resources/Sounds/marimba
+common/Resources/Sounds/mic1
+common/Resources/Sounds/mic2
+common/Resources/Sounds/mic3
+common/Resources/Sounds/mic4
+common/Resources/Sounds/ocarina
+common/Resources/Sounds/ounk
+common/Resources/Sounds/ow
+common/Resources/Sounds/piano
+common/Resources/Sounds/plane
+common/Resources/Sounds/rhodes
+common/Resources/Sounds/saxo
+common/Resources/Sounds/sheep
+common/Resources/Sounds/shenai
+common/Resources/Sounds/sitar
+common/Resources/Sounds/slap
+common/Resources/Sounds/triangle
+common/Resources/Sounds/trumpet
+common/Resources/Sounds/tuba
+common/Resources/Sounds/violin
+common/Resources/Sounds/voix
+common/Resources/Sounds/water
+common/Resources/Sounds/zap
+common/Resources/SynthFiles/synthFile1
+common/Resources/SynthFiles/synthFile2
+common/Resources/SynthFiles/synthFile3
+common/Resources/SynthFiles/synthFile4
+common/Resources/SynthFiles/synthFile5
+common/Resources/SynthFiles/synthFile6
+common/Resources/SynthFiles/synthFile7
+common/Resources/SynthFiles/synthFile8
+common/Resources/SynthFiles/synthFile9
+common/Resources/SynthFiles/synthFile10 \ No newline at end of file
diff --git a/TamTamMini.activity/TamTamMini.py b/TamTamMini.activity/TamTamMini.py
index 70ed410..0e6f4e2 100644
--- a/TamTamMini.activity/TamTamMini.py
+++ b/TamTamMini.activity/TamTamMini.py
@@ -86,9 +86,6 @@ class TamTamMini(activity.Activity):
if Config.DEBUG > 3: print 'DEBUG: TamTam::onFocusOut in TamTam.py'
csnd = new_csound_client()
csnd.connect(True)
- if self.mode == 'synth':
- self.modeList[ self.mode ].updateSound()
- self.modeList[ self.mode ].updateTables()
#csnd.load_instruments()
def onFocusOut(self, event, data=None):
@@ -100,44 +97,16 @@ class TamTamMini(activity.Activity):
pass
def onKeyPress(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyPress in TamTam.py'
- if event.state == gtk.gdk.MOD1_MASK:
- key = event.keyval
- if key == gtk.keysyms.j:
- self.set_mode("jam")
- return
- elif key == gtk.keysyms.m:
- self.set_mode('mini')
- return
- elif key == gtk.keysyms.s:
- self.set_mode('synth')
- return
- elif key == gtk.keysyms.w:
- self.set_mode('welcome')
- return
- elif key == gtk.keysyms.e:
- self.set_mode('edit')
- return
- elif key == gtk.keysyms.t:
- self.toolbox.show()
- return
- elif key == gtk.keysyms.y:
- self.toolbox.hide()
- if self.mode:
- self.modeList[ self.mode ].onKeyPress(widget, event)
+ pass
def onKeyRelease(self, widget, event):
- if Config.DEBUG > 5: print 'DEBUG: TamTam::onKeyRelease in TamTam.py'
- self.modeList[ self.mode ].onKeyRelease(widget, event)
pass
def onDestroy(self, arg2):
if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()'
os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*')
- for m in self.modeList:
- if self.modeList[m] != None:
- self.modeList[m].onDestroy()
+ self.mini.onDestroy()
csnd = new_csound_client()
csnd.connect(False)
diff --git a/TamTamMini.activity/po/TamTamMini.pot b/TamTamMini.activity/po/TamTamMini.pot
new file mode 100644
index 0000000..db65448
--- /dev/null
+++ b/TamTamMini.activity/po/TamTamMini.pot
@@ -0,0 +1,423 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-09-13 14:46-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: activity/activity.info:2
+msgid "TamTamMini"
+msgstr ""
+
+#: Mini/miniTamTamMain.py:151 common/Resources/tooltips_en.py:40
+msgid "Play"
+msgstr ""
+
+#: Mini/miniTamTamMain.py:152
+msgid "Record"
+msgstr ""
+
+#: Mini/miniTamTamMain.py:164
+msgid "TamTam"
+msgstr ""
+
+#: Mini/miniToolbars.py:31 common/Resources/tooltips_en.py:114
+msgid "Play / Stop"
+msgstr ""
+
+#: Mini/miniToolbars.py:60 common/Resources/tooltips_en.py:112
+msgid "Balance"
+msgstr ""
+
+#: Mini/miniToolbars.py:83 common/Resources/tooltips_en.py:83
+#: common/Resources/tooltips_en.py:113
+msgid "Reverb"
+msgstr ""
+
+#: Mini/miniToolbars.py:104
+msgid "Record microphone into slot 1"
+msgstr ""
+
+#: Mini/miniToolbars.py:110
+msgid "Record microphone into slot 2"
+msgstr ""
+
+#: Mini/miniToolbars.py:116
+msgid "Record microphone into slot 3"
+msgstr ""
+
+#: Mini/miniToolbars.py:130
+msgid "Click to record a loop"
+msgstr ""
+
+#: Mini/miniToolbars.py:136
+msgid "Click to add a loop"
+msgstr ""
+
+#: Mini/miniToolbars.py:143
+msgid "Click to clear all loops"
+msgstr ""
+
+#: Mini/miniToolbars.py:151
+msgid "Add new sound"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:8
+msgid "Select tool"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:9
+msgid "Draw tool"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:10
+msgid "Paint tool"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:12
+msgid "Generate new tune"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:14
+msgid "Generate page"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:15
+msgid "Page properties"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:16
+msgid "Delete page(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:17
+msgid "Duplicate page(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:18
+msgid "Add page"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:19
+msgid "Beats per page"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:20
+msgid "Save tune"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:21
+msgid "Load tune"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:23
+msgid "Generate track"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:24
+msgid "Track properties"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:25
+msgid "Clear track"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:26
+msgid "Duplicate track"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:28
+msgid "Note(s) properties"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:29
+msgid "Delete note(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:30
+msgid "Duplicate note(s)"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:31 common/Resources/tooltips_en.py:32
+msgid "Move note in time"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:33
+msgid "Lower pitch"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:34
+msgid "Raise pitch"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:35 common/Resources/tooltips_en.py:36
+msgid "Modify duration"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:37
+msgid "Lower volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:38
+msgid "Raise volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:41
+msgid "Pause"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:42 common/Resources/tooltips_en.py:115
+msgid "Stop"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:43
+msgid "Keyboard recording"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:44
+msgid "Save as .ogg"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:45
+msgid "Rewind"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:46
+msgid "Save to journal and quit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:48
+msgid "Master volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:49 common/Resources/tooltips_en.py:120
+msgid "Tempo"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:51 common/Resources/tooltips_en.py:52
+#: common/Resources/tooltips_en.py:53 common/Resources/tooltips_en.py:54
+#: common/Resources/tooltips_en.py:55
+msgid "Left click to mute, right click to solo"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:58
+msgid "-- Rythm density, | Rythm regularity"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:59
+msgid "-- Pitch regularity, | Pitch maximum step"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:60
+msgid "-- Average duration, | Silence probability"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:61 common/Resources/tooltips_en.py:98
+msgid "Drunk"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:62
+msgid "Drone and Jump"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:63 common/Resources/tooltips_en.py:100
+msgid "Repeater"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:64 common/Resources/tooltips_en.py:101
+msgid "Loop segments"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:65
+msgid "Major scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:66
+msgid "Harmonic minor scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:67
+msgid "Natural minor scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:68
+msgid "Phrygian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:69
+msgid "Dorian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:70
+msgid "Lydian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:71
+msgid "Myxolydian scale"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:72
+msgid "Save preset"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:73
+msgid "Load preset"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:74 common/Resources/tooltips_en.py:117
+msgid "Generate"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:75
+msgid "Close"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:78
+msgid "Transpose up"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:79
+msgid "Transpose down"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:80
+msgid "Volume up"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:81
+msgid "Volume down"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:82
+msgid "Panoramisation"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:84
+msgid "Attack duration"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:85
+msgid "Decay duration"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:86
+msgid "Lowpass filter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:87
+msgid "Highpass filter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:88
+msgid "Bandpass filter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:89
+msgid "Filter cutoff"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:90 common/Resources/tooltips_en.py:91
+#: common/Resources/tooltips_en.py:92 common/Resources/tooltips_en.py:93
+#: common/Resources/tooltips_en.py:94 common/Resources/tooltips_en.py:95
+#: common/Resources/tooltips_en.py:96
+msgid "Open algorithmic generator"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:97
+msgid "Line"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:99
+msgid "Drone and jump"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:102
+msgid "Minimum value"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:103
+msgid "Maximum value"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:104
+msgid "Specific parameter"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:105
+msgid "Apply generator"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:106
+msgid "Cancel"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:111
+msgid "Volume"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:116
+msgid "Left click to record, right click to record on top"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:118
+msgid "Complexity of beat"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:119
+msgid "Beats per bar"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:121
+msgid "Jazz / Rock Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:122
+msgid "African Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:123
+msgid "Arabic Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:124
+msgid "South American Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:125
+msgid "Electronic Kit"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:126
+msgid "Record with the microphone"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:127
+msgid "Open SynthLab to create noise"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 1"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 2"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 3"
+msgstr ""
+
+#: common/Resources/tooltips_en.py:128
+msgid "Record mic into slot 4"
+msgstr ""
diff --git a/TamTamMini.activity/setup.py b/TamTamMini.activity/setup.py
index 5b21f11..87a6a08 100644
--- a/TamTamMini.activity/setup.py
+++ b/TamTamMini.activity/setup.py
@@ -17,5 +17,14 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from sugar.activity import bundlebuilder
+import shutil
+import os
-bundlebuilder.start('TamTam')
+#We are removing the symlink to common and replacing it with the real common folder
+os.system('unlink common')
+shutil.copytree('../common', 'common')
+
+bundlebuilder.start('TamTamMini')
+#Restore the symlink
+os.system('rm -rf common')
+os.system('ln -s ../common common')
diff --git a/common/Config.py b/common/Config.py
index 47dd713..62461c7 100644
--- a/common/Config.py
+++ b/common/Config.py
@@ -1,14 +1,12 @@
# -*- coding: utf-8 -*-
import os
-import Util.InstrumentDB as InstrumentDB
+import common.Util.InstrumentDB as InstrumentDB
+from sugar.activity.activity import get_bundle_path
+from sugar import env
QUICKLOAD = os.path.isfile("QUICKLOAD") # skip loading inessential comenents to speed things up
SugarMode = True
-try:
- from sugar import env
-except ImportError:
- SugarMode = False
if os.path.isfile("DEBUG"):
f = open("DEBUG")
@@ -21,7 +19,7 @@ else:
print "Debug Level %d" % (DEBUG)
-TAM_TAM_ROOT = os.path.dirname(os.path.abspath(__file__))
+TAM_TAM_ROOT = get_bundle_path()
print 'INFO: loaded TAMTAM_ROOT=%s' % TAM_TAM_ROOT
@@ -29,8 +27,8 @@ print 'INFO: loaded TAMTAM_ROOT=%s' % TAM_TAM_ROOT
if os.path.isdir('/usr/share/activities/TamTamEdit.activity/Resources/Sounds'):
SOUNDS_DIR = "/usr/share/activities/TamTamEdit.activity/Resources/Sounds"
else:
- SOUNDS_DIR = TAM_TAM_ROOT + "/Resources/Sounds"
-FILES_DIR = TAM_TAM_ROOT + "/Resources"
+ SOUNDS_DIR = TAM_TAM_ROOT + "/common/Resources/Sounds"
+FILES_DIR = TAM_TAM_ROOT + "/common/Resources"
TUNE_DIR='/'
SYNTH_DIR='/'
if SugarMode == True:
@@ -49,7 +47,7 @@ else:
#PLUGIN
PLUGIN_DEBUG = PREF_DIR + "/clooper.log"
PLUGIN_VERBOSE = 0
-PLUGIN_UNIVORC = TAM_TAM_ROOT + "/Resources/tamtamorc.csd"
+PLUGIN_UNIVORC = TAM_TAM_ROOT + "common/Resources/tamtamorc.csd"
PLUGIN_KSMPS = 64
PLUGIN_RATE = 16000
#PLUGIN_KSMPS = 64
@@ -382,8 +380,7 @@ UNLOAD_TABLES_COMMAND = \
#################
LANGUAGE = 'En'
-IMAGE_ROOT = TAM_TAM_ROOT + '/Resources/Images/'
-
+IMAGE_ROOT = TAM_TAM_ROOT + '/common/Resources/Images/'
MAIN_WINDOW_PADDING = 5
BG_COLOR = '#404040'
diff --git a/common/Generation/GenerationPitch.py b/common/Generation/GenerationPitch.py
index 4012589..4eaf8ae 100644
--- a/common/Generation/GenerationPitch.py
+++ b/common/Generation/GenerationPitch.py
@@ -2,7 +2,7 @@ import random
import Drunk
import common.Config as Config
-from Generation.GenerationConstants import GenerationConstants
+from common.Generation.GenerationConstants import GenerationConstants
class GenerationPitch:
def __init__( self ):
diff --git a/common/Generation/GenerationRythm.py b/common/Generation/GenerationRythm.py
index 718c1ec..a840804 100644
--- a/common/Generation/GenerationRythm.py
+++ b/common/Generation/GenerationRythm.py
@@ -2,7 +2,7 @@ import Utils
import random
from math import sqrt
import common.Config as Config
-from Generation.GenerationConstants import GenerationConstants
+from common.Generation.GenerationConstants import GenerationConstants
class GenerationRythm:
diff --git a/common/Generation/Generator.py b/common/Generation/Generator.py
index b5640a6..4544d12 100755
--- a/common/Generation/Generator.py
+++ b/common/Generation/Generator.py
@@ -5,10 +5,10 @@ import Utils
import Drunk
import common.Config as Config
-from Util.CSoundNote import CSoundNote
-from Generation.GenerationConstants import GenerationConstants
-from Generation.GenerationRythm import GenerationRythm
-from Generation.GenerationPitch import GenerationPitch
+from common.Util.CSoundNote import CSoundNote
+from common.Generation.GenerationConstants import GenerationConstants
+from common.Generation.GenerationRythm import GenerationRythm
+from common.Generation.GenerationPitch import GenerationPitch
class GenerationParameters:
def __init__( self,