Skip to content

Commit

Permalink
Merge pull request #50 from orchetect/dev
Browse files Browse the repository at this point in the history
Dev merge
  • Loading branch information
orchetect authored Nov 5, 2021
2 parents 5f9917f + 96e13e9 commit d84d0ea
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 298 deletions.
76 changes: 0 additions & 76 deletions Sources/MIDIKit/Common/Utilities/DataReader.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,14 @@ extension MIDI.Event {
extension MIDI.Event.SysEx {

@inline(__always)
public func midi1RawBytes() -> [MIDI.Byte] {
public func midi1RawBytes(
leadingF0: Bool = true,
trailingF7: Bool = true
) -> [MIDI.Byte] {

[0xF0] + manufacturer.bytes + data + [0xF7]
(leadingF0 ? [0xF0] : [])
+ manufacturer.bytes + data
+ (trailingF7 ? [0xF7] : [])

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,18 @@ extension MIDI.Event {
extension MIDI.Event.UniversalSysEx {

@inline(__always)
public func midi1RawBytes() -> [MIDI.Byte] {
public func midi1RawBytes(
leadingF0: Bool = true,
trailingF7: Bool = true
) -> [MIDI.Byte] {

[0xF0,
MIDI.Byte(universalType.rawValue),
deviceID.uInt8Value,
subID1.uInt8Value,
subID2.uInt8Value]
+ data
+ [0xF7]
(leadingF0 ? [0xF0] : [])
+ [MIDI.Byte(universalType.rawValue),
deviceID.uInt8Value,
subID1.uInt8Value,
subID2.uInt8Value]
+ data
+ (trailingF7 ? [0xF7] : [])

}

Expand Down
212 changes: 0 additions & 212 deletions Tests/MIDIKitTests/Common/Utilities/DataReader Tests.swift

This file was deleted.

0 comments on commit d84d0ea

Please sign in to comment.