Exemplo n.º 1
0
def get_sequencer(options):
	movement = get_movement(options)
	movement.blocks = []
	movement.instruments = []
	set_ensemble(options, movement)
	set_instrument(options, movement)
	blocks = get_blocks(options)
	visual = get_visualization(options)

	for block in blocks:
		set_ensemble(options, block)
		set_block_options(options,block)
		movement.add_block(block)

	set_progressions(options, movement)

	load_fluidsynth(options)



	if movement.instruments == []:
		raise OptionError, "No instruments or ensemble selected."

	for x in movement.instruments:
		x.no_fluidsynth = options.no_fluidsynth

	seq = Sequencer(movement)
	seq.verbose = options.verbose
	seq.no_fluidsynth = options.no_fluidsynth
	seq.output_file = options.midifile
	if visual != None:
		seq.paint_function = visual.paint_screen
		seq.tick_function = visual.tick
		seq.update_function = visual.update_screen
	return seq