Exemplo n.º 1
0
 def _initBackends(self):
     # XXX this should be refactored some - make backends pluggable and
     # indicate which to start from a command line, etc.
     try:
         from bl.instrument import fsynth
         if self.synthChannels == 'stereo':
             return
         if self.synthChannels == 'mono':
             pool = fsynth.MonoPool()
         elif self.synthChannels == 'quad':
             pool = fsynth.QuadPool()
         else:
             try:
                 self.synthChannels = int(self.synthChannels)
             except ValueError:
                 raise ValueError(
                     'synthChannels should be one of mono, '
                     'stereo, quad or an integer')
             synths = dict(
                 (n, fsynth.Synth) for n in range(self.synthChannels))
             pool = fsynth.NConnectionPool(synths)
         fsynth.suggestDefaultPool(pool)
     except ImportError:
         log.msg('fluidsynth will not be available at runtime')
         pass
Exemplo n.º 2
0
 def setUp(self):
     self.patch(fsynth, 'Synth', Synth)
     defaultPool = fsynth.defaultPool
     self.addCleanup(fsynth.suggestDefaultPool, defaultPool)
     fsynth.suggestDefaultPool(fsynth.StereoPool())
     Instrument = MockInstrument
     self.instr1 = Instrument()
     self.instr2 = Instrument()
     self.layer = Layer([self.instr1, (self.instr2, ([24, 25],))])
Exemplo n.º 3
0
 def setUp(self):
     self.patch(fsynth, "Synth", Synth)
     defaultPool = fsynth.defaultPool
     self.addCleanup(fsynth.suggestDefaultPool, defaultPool)
     fsynth.suggestDefaultPool(fsynth.StereoPool())
     Instrument = MockInstrument
     self.instr1 = Instrument()
     self.instr2 = Instrument()
     self.layer = Layer([self.instr1, (self.instr2, ([24, 25],))])
Exemplo n.º 4
0
 def _initBackends(self):
     # XXX this should be refactored some - make backends pluggable and
     # indicate which to start from a command line, etc.
     try:
         from bl.instrument import fsynth
         if self.synthChannels == 'stereo':
             return
         if self.synthChannels == 'mono':
             pool = fsynth.MonoPool()
         elif self.synthChannels == 'quad':
             pool = fsynth.QuadPool()
         else:
             try:
                 self.synthChannels = int(self.synthChannels)
             except ValueError:
                 raise ValueError('synthChannels should be one of mono, '
                                  'stereo, quad or an integer')
             synths = dict(
                 (n, fsynth.Synth) for n in range(self.synthChannels))
             pool = fsynth.NConnectionPool(synths)
         fsynth.suggestDefaultPool(pool)
     except ImportError:
         log.msg('fluidsynth will not be available at runtime')
         pass
Exemplo n.º 5
0
 def setUp(self):
     self.patch(fsynth, 'Synth', Synth)
     defaultPool = fsynth.defaultPool
     self.addCleanup(fsynth.suggestDefaultPool, defaultPool)
     fsynth.suggestDefaultPool(fsynth.StereoPool())
Exemplo n.º 6
0
 def setUp(self):
     self.patch(fsynth, "Synth", Synth)
     defaultPool = fsynth.defaultPool
     self.addCleanup(fsynth.suggestDefaultPool, defaultPool)
     fsynth.suggestDefaultPool(fsynth.StereoPool())