1 : <?php
2 :
3 : /**
4 : * \Midi\Event\ChannelPrefixEvent
5 : *
6 : * @package Midi
7 : * @subpackage Event
8 : * @copyright © 2009 Tommy Montgomery <http://phpmidiparser.com/>
9 : * @since 1.0
10 : */
11 :
12 : namespace Midi\Event;
13 :
14 : /**
15 : * Represents the channel prefix meta event
16 : *
17 : * @package Midi
18 : * @subpackage Event
19 : * @since 1.0
20 : * @todo Document what this event actually does
21 : */
22 1 : class ChannelPrefixEvent extends MetaEvent {
23 :
24 : /**
25 : * Constructor
26 : *
27 : * @since 1.0
28 : *
29 : * @param int $channel Valid values: 0-15
30 : */
31 : public function __construct($channel) {
32 3 : parent::__construct(array($channel));
33 3 : }
34 :
35 : /**
36 : * @since 1.0
37 : *
38 : * @return string
39 : */
40 : public function getParamDescription() {
41 1 : return 'channel: ' . $this->data[0];
42 : }
43 :
44 : /**
45 : * @since 1.0
46 : * @uses MetaEventType::CHANNEL_PREFIX
47 : *
48 : * @return int
49 : */
50 : public function getSubtype() {
51 1 : return MetaEventType::CHANNEL_PREFIX;
52 : }
53 :
54 : }
55 :
|