Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8 Release #279

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
1701fa6
Issue #269: Add API to MIKMIDISequence for converting between beats a…
armadsen Aug 25, 2019
a129db8
Issue #269: Add method to convert from MusicTimeStamp to seconds to M…
armadsen Aug 26, 2019
bf1e08c
Merge branch 'master' into issue-269
armadsen Aug 26, 2019
1002134
Issue #269: Add options to MIKMIDISequencer time conversion methods, …
armadsen Sep 1, 2019
aeec51b
Issue #269: Implement -[MIKMIDISequencer timeInSecondsForMusicTimeSta…
armadsen Sep 2, 2019
eb52ab1
Issue #269: Add documentation for time conversion methods.
armadsen Sep 2, 2019
38a65cc
Fix some methods that bridge weirdly into Swift, particularly initial…
armadsen Sep 3, 2019
a880041
Add rate property to MIKMIDISequencer. Fixes #273
armadsen Oct 8, 2019
e9845c8
Create FUNDING.yml
armadsen Sep 2, 2019
4d97fa8
Update README.md
armadsen Sep 3, 2019
f18094c
Add rate property to MIKMIDISequencer. Fixes #273
armadsen Oct 8, 2019
7cf4cd5
Issue #273: Make MIKMIDISequencer time conversion methods respect ove…
armadsen Oct 15, 2019
02f6264
Merge branch 'issue-273' of github.com:mixedinkey-opensource/MIKMIDI …
armadsen Oct 15, 2019
b497f27
Issue #275: Add performance test and baseline for -[MIKMIDISequence t…
armadsen Nov 5, 2019
e785b79
Use event cache in implementation of -[MIKMIDITrack eventsOfClass:fro…
armadsen Nov 5, 2019
f309081
Merge change from master
armadsen Nov 5, 2019
8ed185c
Merge branch 'master' into issue-273
armadsen Nov 5, 2019
e657065
Issue #269: Add API to MIKMIDISequence for converting between beats a…
armadsen Aug 25, 2019
1a648b5
Issue #269: Add method to convert from MusicTimeStamp to seconds to M…
armadsen Aug 26, 2019
16653b7
Issue #269: Add options to MIKMIDISequencer time conversion methods, …
armadsen Sep 1, 2019
a932cbd
Issue #269: Implement -[MIKMIDISequencer timeInSecondsForMusicTimeSta…
armadsen Sep 2, 2019
db7cc28
Issue #269: Add documentation for time conversion methods.
armadsen Sep 2, 2019
a4e43a1
Merge branch 'master' into 1.8
armadsen Nov 5, 2019
2718068
Merge
armadsen Nov 5, 2019
bd0cb8c
Merge branch '1.8' into issue-273
armadsen Nov 5, 2019
b0ee1fa
Merge pull request #280 from mixedinkey-opensource/issue-273
armadsen Nov 5, 2019
a338b07
Merge branch '1.8' into issue-275
armadsen Dec 15, 2019
b616259
Merge pull request #283 from mixedinkey-opensource/issue-275
armadsen Dec 15, 2019
bf143f1
Issue #282: Don't re-sort tempo events after filtering in -[MIKMIDISe…
armadsen Dec 15, 2019
bc97bb3
Issue #282: Add (private) MIKMIDITempoTrack to cache tempo events. Sp…
armadsen Dec 15, 2019
763ecde
Issue #282: Avoid redundant calls to -timeInSecondsForMusicTimeStamp …
armadsen Dec 15, 2019
41b23c6
Merge pull request #284 from mixedinkey-opensource/issue-282
armadsen Jan 15, 2020
86f20b4
Increase required accuracy of time conversion tests
armadsen May 19, 2020
223de83
Issue #292: Update to latest recommended settings (Xcode 12 beta)
armadsen Jul 8, 2020
9616395
Issue #292: Switch all includes in MIKMIDI headers to use #import <MI…
armadsen Jul 8, 2020
48082bc
Use NSEC_PER_SEC instead of hard coded nanoseconds
armadsen Aug 14, 2020
075674e
Merge branch 'issue-292-apple-silicon' of github.com:mixedinkey-opens…
armadsen Aug 14, 2020
9ffaef0
Move to angle bracket includes in public framework headers. Fixes Iss…
armadsen Aug 17, 2020
5da721c
Merge branch 'master' into 1.8
armadsen Aug 17, 2020
1bf0095
Bump deployment targest to iOS 9 and macOS 10.9
armadsen Sep 19, 2020
7e9ec95
Bump deployment targest to iOS 9 and macOS 10.9 in framework project …
armadsen Sep 20, 2020
aa2eb23
Merge pull request #299 from mixedinkey-opensource/issue-292-apple-si…
armadsen Nov 15, 2020
c7ea540
Merge branch 'master' into 1.8
armadsen Jan 7, 2021
c5c247a
Merge branch 'master' into 1.8
armadsen Jan 14, 2021
8ac9fd9
Issue #304: Add includesThreeByteManufacturerID to MIKMIDISystemExclu…
armadsen Jan 31, 2021
dc8ec52
Merge pull request #305 from mixedinkey-opensource/issue-304-force-th…
armadsen Jan 31, 2021
f4e1d29
Fix setSysexData: clobbering manufacturer ID if includesThreeByteManu…
armadsen Jan 31, 2021
b5b8cd5
Issue #306: Add new convenience method for MIKMIDISystemExclusiveComm…
armadsen Jan 31, 2021
2327e3d
Merge pull request #307 from mixedinkey-opensource/issue-306-sysex-in…
armadsen Jan 31, 2021
446f567
Issue #308: Fix parsing 3 byte manufacturer IDs in MIKMIDISystemExclu…
armadsen Jan 31, 2021
81f2a41
Merge pull request #309 from mixedinkey-opensource/issue-308-zero-man…
armadsen Jan 31, 2021
06679c7
Issue #310: Add new memberwise convenience method to MIKMIDIPitchBend…
armadsen Feb 10, 2021
a8a05a1
Merge pull request #311 from mixedinkey-opensource/issue-310-pitch-be…
armadsen Feb 10, 2021
f5f218d
Issue #324: Add specialized -isEqual: method to MIKMIDIEvent
armadsen Dec 16, 2021
122c8ae
Issue #324: Implement NSCopying in MIKMIDISequence and add associated…
armadsen Dec 16, 2021
b49eb8c
Issue #324: Improve performance of copying events into a track, along…
armadsen Dec 16, 2021
878723b
Merge branch 'master' into 1.8
armadsen Feb 22, 2022
702d485
Issue #327: Add new capability to MIKMIDICommand creation machinery t…
armadsen Feb 14, 2022
1d74f60
Issue #327: Add basic MIKMIDIMachineControlLocateCommand subclass. WIP
armadsen Feb 14, 2022
54c5185
Issue #327: Flesh out implementation of MIKMIDIMachineControlCommand …
armadsen Feb 14, 2022
bf04a2a
Issue #327: Make MIKMIDIMachineControlLocateTargetCommand a subclass …
armadsen Feb 14, 2022
e00aa46
Issue #327: Fix building tests target
armadsen Feb 14, 2022
7fd4e26
Issue #327: Implement specialized functionality of MIKMMCLocateTarget…
armadsen Feb 14, 2022
5bbdf7c
Issue #327: Implement convenience method for creating MIKMMCLocateTar…
armadsen Feb 14, 2022
5b60952
Issue #327: Add -additionalCommandDescription implementation to MIKMM…
armadsen Feb 14, 2022
8214bd1
Add tempo retrieval test
armadsen Jun 17, 2022
7e3933c
Merge branch '1.8' of github.com:mixedinkey-opensource/MIKMIDI into 1.8
armadsen Jun 17, 2022
6c7f059
Merge branch 'master' into 1.8
armadsen Jun 17, 2022
a77f943
Issue #297: Fix weird bridging of -[MIKMIDIClientSourceEndpoint initW…
armadsen Jun 19, 2022
763ba06
Merge branch 'master' into 1.8
armadsen Jun 19, 2022
5f0761c
Merge branch '1.8' into issue-297-client-source-endpoint-initializer
armadsen Jun 19, 2022
cf4ac5b
Merge pull request #336 from mixedinkey-opensource/issue-297-client-s…
armadsen Jun 19, 2022
ac26527
Update to latest recommended settings (Xcode 14.0 beta1)
armadsen Jun 19, 2022
178aa45
Fix use of Mac-only -isEqualTo: causing build failure for iOS
armadsen Jun 23, 2022
c4011df
Updated deployment target to macOS 10.11 to fix linking on Xcode 15.x…
PatrickMIK Feb 1, 2024
1447c9e
MIKMIDIPacketListSizeForCommands() now accounts for the fact that on …
PatrickMIK Oct 9, 2024
ca6cbe4
Better types and stricter value checking when looping over MIDIPacket…
PatrickMIK Oct 17, 2024
302e7f8
Fixed nullability issues.
PatrickMIK Nov 6, 2024
dbfab29
Now defaulting to a command lenght of 1 if we couldn't figure it out.
PatrickMIK Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = MIK;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Mixed In Key";
};
buildConfigurationList = 9DB2A5EE192D184D0047A3EB /* Build configuration list for PBXProject "MIDI Files Testbed" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -343,6 +343,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -351,14 +352,17 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -393,6 +397,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -401,14 +406,17 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -436,6 +444,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Source/MIDI Files Testbed-Prefix.pch";
Expand All @@ -451,6 +460,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Source/MIDI Files Testbed-Prefix.pch";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7525" systemVersion="14C1514" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15400" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7525"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15400"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="MIKMainWindowController">
Expand All @@ -17,7 +18,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="480" height="360"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<view key="contentView" id="bjF-sO-f3j">
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
<autoresizingMask key="autoresizingMask"/>
Expand All @@ -41,10 +42,10 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yxv-Ce-QrW">
<rect key="frame" x="390" y="316" width="73" height="26"/>
<rect key="frame" x="386" y="316" width="77" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="BX3-0d-ikz" id="e7m-FA-thV">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<font key="font" metaFont="system"/>
<menu key="menu" id="xEd-Qa-ruC">
<items>
<menuItem title="Item 1" state="on" id="BX3-0d-ikz"/>
Expand Down Expand Up @@ -109,7 +110,7 @@
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="66N-u6-qWG">
<rect key="frame" x="20" y="20" width="440" height="279"/>
<clipView key="contentView" id="TRb-H3-fEu">
<rect key="frame" x="1" y="1" width="166" height="79"/>
<rect key="frame" x="0.0" y="0.0" width="440" height="279"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<customView identifier="FlippedScrollContentContainer" translatesAutoresizingMaskIntoConstraints="NO" id="e8Y-Fj-noD" customClass="MIKFlippedScrollContentContainerView">
Expand Down Expand Up @@ -139,28 +140,52 @@
<constraint firstItem="TbG-Pk-GIu" firstAttribute="height" secondItem="66N-u6-qWG" secondAttribute="height" priority="499" id="Rhe-zz-aQ4"/>
<constraint firstItem="TbG-Pk-GIu" firstAttribute="width" secondItem="66N-u6-qWG" secondAttribute="width" priority="499" id="sMF-8v-snG"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="QM4-rs-jPX">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="QM4-rs-jPX">
<rect key="frame" x="1" y="80" width="166" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="oAs-ip-mnU">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="oAs-ip-mnU">
<rect key="frame" x="167" y="1" width="15" height="79"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gae-60-TCU">
<rect key="frame" x="262" y="320" width="75" height="19"/>
<sliderCell key="cell" continuous="YES" state="on" alignment="left" minValue="0.5" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="8Jf-9i-Gjg"/>
<connections>
<binding destination="-2" name="value" keyPath="sequencer.rate" id="Kif-Rq-wOB"/>
</connections>
</slider>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gvF-Hl-naY">
<rect key="frame" x="343" y="322" width="37" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="ISD-lm-4lE">
<numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="decimal" formatWidth="-1" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" maximumFractionDigits="3" id="j3O-vZ-BqN"/>
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="-2" name="value" keyPath="sequencer.rate" id="Zmj-xM-yKQ"/>
</connections>
</textField>
</subviews>
<constraints>
<constraint firstItem="eSe-hq-VkU" firstAttribute="baseline" secondItem="FGs-7w-fIc" secondAttribute="baseline" id="0r6-Fc-wlf"/>
<constraint firstItem="eSe-hq-VkU" firstAttribute="baseline" secondItem="6ro-dS-WBO" secondAttribute="baseline" id="1W0-W0-uPG"/>
<constraint firstItem="6ro-dS-WBO" firstAttribute="leading" secondItem="bjF-sO-f3j" secondAttribute="leading" constant="20" symbolic="YES" id="6xX-m0-HjF"/>
<constraint firstItem="6ro-dS-WBO" firstAttribute="top" secondItem="bjF-sO-f3j" secondAttribute="top" constant="20" symbolic="YES" id="8F5-6k-xGC"/>
<constraint firstItem="gae-60-TCU" firstAttribute="centerY" secondItem="FGs-7w-fIc" secondAttribute="centerY" id="BO3-76-Sud"/>
<constraint firstItem="66N-u6-qWG" firstAttribute="top" secondItem="6ro-dS-WBO" secondAttribute="bottom" constant="20" id="Gie-yv-4ch"/>
<constraint firstItem="66N-u6-qWG" firstAttribute="leading" secondItem="bjF-sO-f3j" secondAttribute="leading" constant="20" id="Gmk-15-BtN"/>
<constraint firstItem="gvF-Hl-naY" firstAttribute="leading" secondItem="gae-60-TCU" secondAttribute="trailing" constant="10" id="U5Q-Mz-pYH"/>
<constraint firstItem="FGs-7w-fIc" firstAttribute="baseline" secondItem="Yxv-Ce-QrW" secondAttribute="baseline" id="YW7-Yn-AOk"/>
<constraint firstItem="FGs-7w-fIc" firstAttribute="leading" secondItem="eSe-hq-VkU" secondAttribute="trailing" constant="12" symbolic="YES" id="Z30-Ap-cbi"/>
<constraint firstAttribute="trailing" secondItem="Yxv-Ce-QrW" secondAttribute="trailing" constant="20" symbolic="YES" id="cMb-KV-09e"/>
<constraint firstItem="gae-60-TCU" firstAttribute="leading" secondItem="FGs-7w-fIc" secondAttribute="trailing" constant="8" id="e9p-R7-qe0"/>
<constraint firstItem="eSe-hq-VkU" firstAttribute="leading" secondItem="6ro-dS-WBO" secondAttribute="trailing" constant="12" symbolic="YES" id="eea-wH-bX4"/>
<constraint firstAttribute="bottom" secondItem="66N-u6-qWG" secondAttribute="bottom" constant="20" id="hbT-kV-NcJ"/>
<constraint firstItem="gvF-Hl-naY" firstAttribute="centerY" secondItem="Yxv-Ce-QrW" secondAttribute="centerY" id="iJe-Br-mcz"/>
<constraint firstItem="Yxv-Ce-QrW" firstAttribute="leading" secondItem="gvF-Hl-naY" secondAttribute="trailing" constant="10" id="ikh-ee-3cJ"/>
<constraint firstAttribute="trailing" secondItem="66N-u6-qWG" secondAttribute="trailing" constant="20" id="y1j-mW-Gt6"/>
</constraints>
</view>
Expand Down
33 changes: 33 additions & 0 deletions Framework/MIKMIDI Tests/MIKMIDICommandTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,39 @@ - (void)testChannelPressureCommand
XCTAssertEqual(mutableCommand.pressure, 27, @"Setting the pressure on a MIKMutableMIDIChannelPressureCommand instance failed.");
}

- (void)testPitchBendChangeCommand
{
MIDIPacket packet = MIKMIDIPacketCreate(0, 1, @[@0xef]);
XCTAssertTrue([[MIKMIDICommand commandWithMIDIPacket:&packet] isKindOfClass:[MIKMIDIPitchBendChangeCommand class]]);

Class immutableClass = [MIKMIDIPitchBendChangeCommand class];
Class mutableClass = [MIKMutableMIDIPitchBendChangeCommand class];

MIKMIDIPitchBendChangeCommand *command = [[immutableClass alloc] init];
XCTAssert([command isMemberOfClass:[immutableClass class]], @"[[MIKMIDIPitchBendChangeCommand alloc] init] did not return an MIKMIDIPitchBendChangeCommand instance.");
XCTAssert([[MIKMIDICommand commandForCommandType:MIKMIDICommandTypePitchWheelChange] isMemberOfClass:[immutableClass class]], @"[MIKMIDICommand commandForCommandType:MIKMIDICommandTypeSystemExclusive] did not return an MIKMIDIPitchBendChangeCommand instance.");
XCTAssert([[command copy] isMemberOfClass:[immutableClass class]], @"[MIKMIDIPitchBendChangeCommand copy] did not return an MIKMIDIPitchBendChangeCommand instance.");
XCTAssertEqual(command.commandType, MIKMIDICommandTypePitchWheelChange, @"[[MIKMIDIPitchBendChangeCommand alloc] init] produced a command instance with the wrong command type.");
XCTAssertEqual(command.data.length, 3, "MIKMIDIPitchBendChangeCommand had an incorrect data length %@ (should be 3)", @(command.data.length));

MIKMutableMIDIPitchBendChangeCommand *mutableCommand = [command mutableCopy];
XCTAssert([mutableCommand isMemberOfClass:[mutableClass class]], @"-[MIKMIDIPitchBendChangeCommand mutableCopy] did not return an mutableClass instance.");
XCTAssert([[mutableCommand copy] isMemberOfClass:[immutableClass class]], @"-[mutableClass mutableCopy] did not return an MIKMIDIPitchBendChangeCommand instance.");

NSDate *date = [NSDate date];
MIKMIDIPitchBendChangeCommand *convenienceTest = [MIKMIDIPitchBendChangeCommand pitchBendChangeCommandWithPitchChange:42 channel:2 timestamp:date];
XCTAssertNotNil(convenienceTest);
XCTAssert([convenienceTest isMemberOfClass:[immutableClass class]], @"[MIKMIDIPitchBendChangeCommand pitchBendChangeCommandWithPitchChange:...] did not return an MIKMIDIPitchBendChangeCommand instance.");
XCTAssertEqual(convenienceTest.pitchChange, 42);
XCTAssertEqual(convenienceTest.channel, 2);

MIKMutableMIDIPitchBendChangeCommand *mutableConvenienceTest = [MIKMutableMIDIPitchBendChangeCommand pitchBendChangeCommandWithPitchChange:42 channel:2 timestamp:date];
XCTAssertNotNil(mutableConvenienceTest);
XCTAssert([mutableConvenienceTest isMemberOfClass:[mutableClass class]], @"[MIKMutableMIDIPitchBendChangeCommand pitchBendChangeCommandWithPitchChange:...] did not return an MIKMutableMIDIPitchBendChangeCommand instance.");
XCTAssertEqual(mutableConvenienceTest.pitchChange, 42);
XCTAssertEqual(mutableConvenienceTest.channel, 2);
}

- (void)testKeepAliveCommand
{
MIDIPacket packet = MIKMIDIPacketCreate(0, 1, @[@0xfe]);
Expand Down
2 changes: 1 addition & 1 deletion Framework/MIKMIDI Tests/MIKMIDIEventCachingTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ - (void)setUp
self.sequence = sequence;
}

- (void)testPerformanceExample {
- (void)testTempoEventsPerformance {
// This is an example of a performance test case.
[self measureBlock:^{
for (NSInteger i=0; i<5000; i++) {
Expand Down
Loading