-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add STK + MIDIKit Recipe #140
Conversation
} | ||
|
||
init() { | ||
env = [AmplitudeEnvelope(osc[0]),AmplitudeEnvelope(osc[1]),AmplitudeEnvelope(osc[2]),AmplitudeEnvelope(osc[3]),AmplitudeEnvelope(osc[4]),AmplitudeEnvelope(osc[5]),AmplitudeEnvelope(osc[6]),AmplitudeEnvelope(osc[7]),AmplitudeEnvelope(osc[8]),AmplitudeEnvelope(osc[9]),AmplitudeEnvelope(osc[10])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma Spacing Violation: There should be no space before and one after any comma. (comma)
Line Length Violation: Line should be 200 characters or less: currently 302 characters (line_length)
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
||
func noteOff(pitch: Pitch) { | ||
for num in 0 ... 10 { | ||
if notes[num] == pitch.intValue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Where Violation: where
clauses are preferred over a single if
inside a for
. (for_where)
noteOn(pitch: pitch, velocity: 120) | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
||
func noteOn(pitch: Pitch, point _: CGPoint) { | ||
noteOn(pitch: pitch, velocity: 120) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
text: "", | ||
whiteKeyColor: .white, | ||
blackKeyColor: .black, | ||
pressedColor: color, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
var color: Color | ||
|
||
var body: some View { | ||
VStack{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
var pitch : Pitch | ||
var isActivated : Bool | ||
var color: Color | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
struct MIDIKitKeyboardKey: View { | ||
@State var MIDIKeyPressed = [Bool](repeating: false, count: 128) | ||
var pitch : Pitch | ||
var isActivated : Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
|
||
struct MIDIKitKeyboardKey: View { | ||
@State var MIDIKeyPressed = [Bool](repeating: false, count: 128) | ||
var pitch : Pitch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
No description provided.