Example #1
0
 public function __construct(Song $song)
 {
     parent::__construct();
     # Build sequence
     $channelRouter = new ChannelRouter();
     $channelRouterConfigurator = new ChannelRouterConfigurator($channelRouter);
     $channelRouterConfigurator->configureRouter($song->getChannels());
     $settings = (new MidiSettings())->getdefaults();
     $midiSequenceParser = new MidiSequenceParser($song, self::ADD_FIRST_TICK_MOVE | self::ADD_DEFAULT_CONTROLS | self::ADD_MIXER_MESSAGES);
     $midiSequenceParser->setTranspose($settings->getTranspose());
     $midiSequenceParser->parse(new MidiSequenceHandler($song->countTracks() + 1, $channelRouter, $this));
 }
Example #2
0
 protected function configureChannelRouter(Song $song)
 {
     $this->channelRouter = new ChannelRouter();
     $routerConfigurator = new ChannelRouterConfigurator($this->channelRouter);
     $routerConfigurator->configureRouter($song->getChannels());
 }