예제 #1
0
	def do_vexflow(self):

		#first muzik
		self.muzik()

		#vexflow now
		self.VexflowedMusic21Vexflow=vexflow.fromObject(
			self.MuzikedMusic21Converter)
예제 #2
0
def vexflow(outputStream):
    '''
    Takes in a stream outputStream, generates an HTML representation of it using vexflow, and
    outputs it with content-type text/html for displying in a browser.

    >>> sc = corpus.parse('bwv7.7').measures(0, 2)
    >>> (output, contentType) = alpha.webapps.templates.vexflow(sc)
    >>> contentType
    'text/html; charset=utf-8'
    '''
    from music21 import vexflow as vf
    outputHTML = vf.fromObject(outputStream, mode='html')
    return (outputHTML.encode('utf-8'), 'text/html; charset=utf-8')
예제 #3
0
파일: templates.py 프로젝트: 05565/music21
def vexflow(outputStream):
    '''
    Takes in a stream outputStream, generates an HTML representation of it using vexflow, and
    outputs it with content-type text/html for displying in a browser.
    
    >>> sc = corpus.parse('bwv7.7').measures(0,2)
    >>> (output, contentType) = alpha.webapps.templates.vexflow(sc)
    >>> contentType
    'text/html; charset=utf-8'
    '''
    from music21 import vexflow
    outputHTML = vexflow.fromObject(outputStream, mode='html')
    return (outputHTML.encode('utf-8'), 'text/html; charset=utf-8')