Skip to content

Commit

Permalink
Rename application to Gum.
Browse files Browse the repository at this point in the history
  • Loading branch information
stackp committed Mar 25, 2012
1 parent 001adcd commit 0cc8441
Show file tree
Hide file tree
Showing 43 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1 +1 @@
include scalpel/fast/fast.h
include gum/fast/fast.h
2 changes: 1 addition & 1 deletion README
@@ -1,3 +1,3 @@
Please see this page for detailed installation instructions:

http://scalpelsound.online.fr/?page_id=457
https://github.com/stackp/Gum
4 changes: 2 additions & 2 deletions scalpel.desktop → gum.desktop
@@ -1,8 +1,8 @@
[Desktop Entry]
Name=Scalpel
Name=Gum
GenericName=Audio Editor
Comment=An audio editor
Exec=scalpel %f
Exec=gum %f
Terminal=false
Type=Application
Icon=editcut
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions scalpel/app.py → gum/app.py
@@ -1,10 +1,10 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel.lib import event
from scalpel.models import graphmodel, cursor, edit, selection
from scalpel.controllers import control, player, effect
from gum.lib import event
from gum.models import graphmodel, cursor, edit, selection
from gum.controllers import control, player, effect
import os.path
import glob
import imp
Expand Down
3 changes: 3 additions & 0 deletions gum/constants.py
@@ -0,0 +1,3 @@
__appname__ = "Gum"
__version__ = '0.8.2'
__url__ = 'https://github.com/stackp/Gum'
File renamed without changes.
24 changes: 12 additions & 12 deletions scalpel/controllers/control.py → gum/controllers/control.py
@@ -1,13 +1,13 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel.models import edit
from scalpel.models import clipboard
from scalpel.controllers.player import Player
from scalpel.lib.event import Signal
from scalpel.controllers import effect
import scalpel.app
from gum.models import edit
from gum.models import clipboard
from gum.controllers.player import Player
from gum.lib.event import Signal
from gum.controllers import effect
import gum.app
import traceback

class Controller(object):
Expand All @@ -21,7 +21,7 @@ def __init__(self, sound, player, graph, selection):
self.error = Signal()

def new(self):
scalpel.app.open_()
gum.app.open_()

def _report_exception(method):
"""Method decorator.
Expand All @@ -48,7 +48,7 @@ def open(self, filename):
if self._sound.is_fresh():
self.load_sound(filename)
else:
scalpel.app.open_(filename)
gum.app.open_(filename)

@_report_exception
def load_sound(self, filename):
Expand Down Expand Up @@ -204,16 +204,16 @@ def __getattr__(self, name):
class FileNotSaved(Exception): pass

def test_Controller():
from scalpel.lib.mock import Fake
from gum.lib.mock import Fake

# Test opening a file
ctrl = Controller(Fake(), Fake(), Fake(), Fake())
ctrl.open('../../sounds/test1.wav')
assert ctrl._sound != None

def test_fix_selection():
from scalpel.lib.mock import Fake, Mock
from scalpel.models.selection import Selection
from gum.lib.mock import Fake, Mock
from gum.models.selection import Selection
import numpy

# Undo
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions scalpel/controllers/player.py → gum/controllers/player.py
@@ -1,10 +1,10 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

import alsaaudio
import threading
from scalpel.lib.event import Signal
from gum.lib.event import Signal
import numpy

class AlsaBackend(object):
Expand Down Expand Up @@ -94,7 +94,7 @@ def is_playing(self):

# test
def testPlayer():
from scalpel.lib.mock import Mock
from gum.lib.mock import Mock
from math import sin
SR = 44100
f0 = 440
Expand All @@ -107,7 +107,7 @@ def testPlayer():
player = Player(sound)
player.thread_play().join()

from scalpel.lib import pysndfile
from gum.lib import pysndfile
f = pysndfile.sndfile('../../sounds/test1.wav')
data = f.read_frames(f.get_nframes())
sound.frames = data
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scalpel/fx/bitcrusher.py → gum/fx/bitcrusher.py
@@ -1,5 +1,5 @@
from scalpel.controllers import effect
from scalpel.views.gtkeffect import Dialog
from gum.controllers import effect
from gum.views.gtkeffect import Dialog
import numpy

nbits_last = 8
Expand Down
4 changes: 2 additions & 2 deletions scalpel/fx/convolution.py → gum/fx/convolution.py
@@ -1,5 +1,5 @@
from scalpel.controllers import effect
from scalpel.models import clipboard, edit
from gum.controllers import effect
from gum.models import clipboard, edit
import numpy

def nextpow2(n):
Expand Down
4 changes: 2 additions & 2 deletions scalpel/fx/monoize.py → gum/fx/monoize.py
@@ -1,5 +1,5 @@
from scalpel.controllers import effect
from scalpel.models import edit
from gum.controllers import effect
from gum.models import edit

def replace_frames(sound, y):
sound.frames = y
Expand Down
4 changes: 2 additions & 2 deletions scalpel/fx/svf.py → gum/fx/svf.py
@@ -1,5 +1,5 @@
from scalpel.controllers.effect import effects
from scalpel.views.gtkeffect import Dialog
from gum.controllers.effect import effects
from gum.views.gtkeffect import Dialog
import numpy
import functools

Expand Down
4 changes: 2 additions & 2 deletions scalpel/fx/volume.py → gum/fx/volume.py
@@ -1,5 +1,5 @@
from scalpel.controllers import effect
from scalpel.views import gtkeffect
from gum.controllers import effect
from gum.views import gtkeffect

volume_last = 100

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions scalpel/models/cursor.py → gum/models/cursor.py
@@ -1,8 +1,8 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel.lib.event import Signal
from gum.lib.event import Signal
from threading import Thread, Event, Lock

# Cursor position can be set by a Selection object. When Player is
Expand Down Expand Up @@ -108,7 +108,7 @@ def _store_player_position(self):

def test():
import time
from scalpel.lib.mock import Fake
from gum.lib.mock import Fake

class Empty: pass

Expand Down
8 changes: 4 additions & 4 deletions scalpel/models/edit.py → gum/models/edit.py
@@ -1,9 +1,9 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel.lib.event import Signal
from scalpel.lib import pysndfile
from gum.lib.event import Signal
from gum.lib import pysndfile
from scikits import samplerate
from copy import copy
import os.path
Expand Down Expand Up @@ -638,7 +638,7 @@ def testSound():
assert False

# expand user symbol
from scalpel.lib import mock
from gum.lib import mock
def fake_sndfile(filename):
assert '~' not in filename
return mock.Fake()
Expand Down
18 changes: 9 additions & 9 deletions scalpel/models/graphmodel.py → gum/models/graphmodel.py
@@ -1,8 +1,8 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel.lib.event import Signal
from gum.lib.event import Signal
try:
import fast
except ImportError:
Expand Down Expand Up @@ -290,7 +290,7 @@ def test_overview():
assert len(_condense(b, 0, l, l/100)) == 100

def test_middle():
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake
import numpy
sound = Mock({"numchan": 1})
sound.changed = Fake()
Expand All @@ -310,7 +310,7 @@ def test_intersection():
assert intersection((5, 9), (1, 4)) == None

def test_Graph():
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake
import numpy

sound = Mock({"numchan": 1})
Expand Down Expand Up @@ -342,7 +342,7 @@ def foo(self):


def test_zoom():
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake
import numpy

sound = Mock({"numchan": 1})
Expand Down Expand Up @@ -405,7 +405,7 @@ def test_zoom():

def test_zoom_in():
import numpy
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake
sound = Mock({"numchan": 1})
sound.changed = Fake()

Expand All @@ -425,7 +425,7 @@ def test_zoom_in():

def test_zoom_in_on():
import numpy
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake
sound = Mock({"numchan": 1})
sound.changed = Fake()
data = numpy.array([1, 2, 3, 4], DTYPE)
Expand All @@ -446,7 +446,7 @@ def test_zoom_in_on():

def test_scroll():
import numpy
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake

sound = Mock({})
data = numpy.array([1, 2, 3, 4])
Expand Down Expand Up @@ -484,7 +484,7 @@ def test_density():

def test_channels():
import numpy
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake
sound = Mock({"numchan": 1})
sound.changed = Fake()
sound.frames = numpy.array(range(1000000), DTYPE)
Expand Down
6 changes: 3 additions & 3 deletions scalpel/models/selection.py → gum/models/selection.py
@@ -1,8 +1,8 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel.lib.event import Signal
from gum.lib.event import Signal

class Selection(object):
"""Represents a selection on a Graph object.
Expand Down Expand Up @@ -92,7 +92,7 @@ def get(self):

def test_selection():
from graphmodel import Graph
from scalpel.lib.mock import Fake
from gum.lib.mock import Fake

class FakeGraph():
density = 10
Expand Down
6 changes: 3 additions & 3 deletions scalpel/run.py → gum/run.py
@@ -1,11 +1,11 @@
#!/usr/bin/env python

# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel import app
from scalpel.views import gtkui
from gum import app
from gum.views import gtkui
import sys

def run():
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions scalpel/views/gtkui.py → gum/views/gtkui.py
@@ -1,18 +1,18 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

from scalpel import constants
from gum import constants

# pygtk gets program name from sys.argv[0]. This name appears in
# taskbars when windows are grouped together.
import sys
sys.argv[0] = constants.__appname__

from scalpel import app
from scalpel.controllers import control
from scalpel.views.gtkwaveform import GraphView, GraphScrollbar
from scalpel.views.gtkfiledialog import OpenFileDialog, SaveFileDialog, \
from gum import app
from gum.controllers import control
from gum.views.gtkwaveform import GraphView, GraphScrollbar
from gum.views.gtkfiledialog import OpenFileDialog, SaveFileDialog, \
SaveSelectionFileDialog
import copy
import os.path
Expand Down Expand Up @@ -128,7 +128,7 @@ def _make_ui_manager(self):
</menu>
<menu action="Effects">
</menu>
<menu action="Scalpel">
<menu action="Gum">
<menuitem action="About"/>
</menu>
</menubar>
Expand Down Expand Up @@ -171,7 +171,7 @@ def _make_ui_manager(self):
('Edit', None, '_Edit'),
('View', None, '_View'),
('Effects', None, 'Effe_cts'),
('Scalpel', None, '_Scalpel'),
('Gum', None, '_Gum'),
('New', gtk.STOCK_NEW, None, None, '', self.new),
('Open', gtk.STOCK_OPEN, None, None, '', self.open),
('Save', gtk.STOCK_SAVE, None, None, '', self.save),
Expand Down Expand Up @@ -552,7 +552,7 @@ def forward(*args):
# -- Tests

def test():
from scalpel.lib.mock import Fake, Mock
from gum.lib.mock import Fake, Mock
graph = Mock({"frames_info":(0, 0, [], []),
"channels": [[(0, 0.5)]],
"set_width": None,
Expand Down
6 changes: 3 additions & 3 deletions scalpel/views/gtkwaveform.py → gum/views/gtkwaveform.py
@@ -1,12 +1,12 @@
# Scalpel sound editor (http://scalpelsound.online.fr)
# Gum sound editor (https://github.com/stackp/Gum)
# Copyright 2009 (C) Pierre Duquesne <stackp@online.fr>
# Licensed under the Revised BSD License.

import gtk
import gobject
import cairo
try:
from scalpel import fast
from gum import fast
except ImportError:
HAVE_FAST = False
else:
Expand Down Expand Up @@ -508,7 +508,7 @@ def update_scrollbar(self):
# -- Tests

if __name__ == '__main__':
from scalpel.lib.mock import Mock, Fake
from gum.lib.mock import Mock, Fake

def test_layered():

Expand Down

0 comments on commit 0cc8441

Please sign in to comment.