Exemple #1
0
 def test_get_tuning(self):
     self.assertTrue(
         tunings.get_tuning("guitar", "Standard").instrument == "Guitar")
 def test_get_tuning(self):
     self.assert_(tunings.get_tuning('guitar', 'Standard').instrument
                   == 'Guitar')
Exemple #3
0
 def setUp(self):
     self.guitar6 = tunings.get_tuning("guitar", "Standard", 6, 1)
     self.guitar12 = tunings.get_tuning("guitar", "Standard", 6, 2)
 def setUp(self):
     self.guitar = tunings.get_tuning('Guitar', 'standard', 6, 1)
 def setUp(self):
     self.guitar6 = tunings.get_tuning('guitar', 'Standard', 6, 1)
     self.guitar12 = tunings.get_tuning('guitar', 'Standard', 6, 2)
 def test_get_tuning(self):
     self.assert_(
         tunings.get_tuning('guitar', 'Standard').instrument == 'Guitar')
Exemple #7
0
	def setUp(self):
		self.guitar = tunings.get_tuning("Guitar", "standard", 6, 1)
 def setUp(self):
     self.guitar = tunings.get_tuning("Guitar", "standard", 6, 1)
 def setUp(self):
     self.guitar6 = tunings.get_tuning('guitar', 'Standard', 6, 1)
     self.guitar12 = tunings.get_tuning('guitar', 'Standard', 6, 2)
Exemple #10
0
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""Functions to convert mingus.containers to pretty ASCII tablature."""

import mingus.extra.tunings as tunings
from mingus.core.mt_exceptions import RangeError, FingerError
import os

default_tuning = tunings.get_tuning('Guitar', 'Standard', 6, 1)


def begin_track(tuning, padding=2):
    """Helper function that builds the first few characters of every bar."""
    # find longest shorthand tuning base
    names = [x.to_shorthand() for x in tuning.tuning]
    basesize = len(max(names)) + 3

    # Build result
    res = []
    for x in names:
        r = ' %s' % x
        spaces = basesize - len(r)
        r += ' ' * spaces + '||' + '-' * padding
        res.append(r)
Exemple #11
0
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""Functions to convert mingus.containers to pretty ASCII tablature."""
from __future__ import absolute_import

import mingus.extra.tunings as tunings
from mingus.core.mt_exceptions import RangeError, FingerError
import os
from six.moves import range

default_tuning = tunings.get_tuning("Guitar", "Standard", 6, 1)


def begin_track(tuning, padding=2):
    """Helper function that builds the first few characters of every bar."""
    # find longest shorthand tuning base
    names = [x.to_shorthand() for x in tuning.tuning]
    basesize = len(max(names)) + 3

    # Build result
    res = []
    for x in names:
        r = " %s" % x
        spaces = basesize - len(r)
        r += " " * spaces + "||" + "-" * padding
        res.append(r)
Exemple #12
0
 def test_get_tuning(self):
         self.assert_(tunings.get_tuning("guitar", "Standard").instrument == "Guitar")
Exemple #13
0
	def setUp(self):
		self.guitar6 = tunings.get_tuning("guitar", "Standard", 6, 1)
		self.guitar12 = tunings.get_tuning("guitar", "Standard", 6, 2)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

================================================================================

        The tablature module provides the necessary functions to convert
        mingus.containers to pretty ASCII tablature.

================================================================================"""

import mingus.extra.tunings as tunings
from mingus.core.mt_exceptions import RangeError, FingerError
import os

default_tuning = tunings.get_tuning("Guitar", "Standard", 6, 1)


def begin_track(tuning, padding=2):
    """Helper function that builds the first few characters of every bar."""

    # find longest shorthand tuning base

    names = [x.to_shorthand() for x in tuning.tuning]
    basesize = len(max(names)) + 3

    # Build result

    res = []
    for x in names:
        r = " %s" % x
 def setUp(self):
     self.guitar = tunings.get_tuning('Guitar', 'standard', 6, 1)
Exemple #16
0
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

================================================================================

        The tablature module provides the necessary functions to convert
        mingus.containers to pretty ASCII tablature.

================================================================================"""

import mingus.extra.tunings as tunings
from mingus.core.mt_exceptions import RangeError, FingerError
import os

default_tuning = tunings.get_tuning('Guitar', 'Standard', 6, 1)


def begin_track(tuning, padding=2):
    """Helper function that builds the first few characters of every bar."""

        # find longest shorthand tuning base

    names = [x.to_shorthand() for x in tuning.tuning]
    basesize = len(max(names)) + 3

        # Build result

    res = []
    for x in names:
        r = ' %s' % x