SequencerView
class SequencerView : UIView
View corresponding to sequencer collection view and note picker
-
Undocumented
Declaration
Swift
@IBOutlet weak var collectionView: UICollectionView! -
Undocumented
Declaration
Swift
@IBOutlet weak var pickerCollectionView: UICollectionView! -
Undocumented
Declaration
Swift
@IBOutlet weak var pickerWidth: NSLayoutConstraint! -
Undocumented
Declaration
Swift
@IBOutlet weak var visualEffectContainerView: UIView! -
Undocumented
Declaration
Swift
fileprivate let pickerDelegate: PickerDelegate -
Undocumented
Declaration
Swift
fileprivate var timeDivision: TimeDivision { get set } -
Undocumented
Declaration
Swift
fileprivate var notes: [Note] -
Undocumented
Declaration
Swift
private var activeSelectingPath: IndexPath! -
Undocumented
Declaration
Swift
private var isAnimatingPicker: Bool -
Undocumented
Declaration
Swift
private var shouldUpdateMarker: Bool -
Undocumented
Declaration
Swift
private var markerIndex: Int { get set } -
Timer for polling playhead UI positioning
Declaration
Swift
private var currentBeatTimer: Timer -
Indicate playing state. Will set beat timer for playhead
Declaration
Swift
private var isPlaying: Bool { get set } -
Undocumented
Declaration
Swift
override func awakeFromNib() -
Undocumented
Declaration
Swift
override init(frame: CGRect) -
Undocumented
Declaration
Swift
required init?(coder aDecoder: NSCoder) -
Undocumented
Declaration
Swift
override func layoutSubviews() -
Common initializer for sequencer view UI and initial state
Declaration
Swift
func commonInit() -
Pinch recognizer for changing the time division
Declaration
Swift
@IBAction func didPinchOnCollectionView(_ sender: UIPinchGestureRecognizer) -
Update UI for the sequencer playhead positioning
Declaration
Swift
@objc func updateCurrentPositionMarker(clear: Bool = false)Parameters
clearOptional bool to clear the playhead UI. Used when sequencer is stopped. Default value is false
-
Highlight row of collection view
Declaration
Swift
func highlightRow(_ index: Int)Parameters
indexInteger for row in collection view to highlight
-
Unhighlight row of collection view
Declaration
Swift
func unhighlightRow(_ index: Int)Parameters
indexInteger for row in collection view to unhighlight
-
Deselect row. Turns all sequencer cells UI to disabled state
Declaration
Swift
func deselectRow(_ index: Int)Parameters
indexInteger for index of row to deselect
-
Deselects all the cells. Puts the cells in the disabled state.
Declaration
Swift
func deselectCells() -
Select cell by putting sequencer cell into ‘enabled’ state
Declaration
Swift
func selectCell(_ indexPath: IndexPath)Parameters
indexPathIndexPath of the collection view cell to enable
-
Deselect cell by putting sequencer cell into ‘disabled’ state
Declaration
Swift
func deselectCell(_ indexPath: IndexPath)Parameters
indexPathIndexPath of the collection view cell to disable
-
Partially fill cell. This creates a UI representation of a ‘partial’ event occuring in the sequencer cell. For example: an eighth note on a quarter note grid will partially fill the cell corresponding to the nearest quarter note.
Declaration
Swift
func partialFillCell(_ indexPath: PartialIndexPath)Parameters
indexPathThe PartialIndexPath (an indexPath with double values for row and section) representing the cell to partially fill
-
Clear all partially filled cells
Declaration
Swift
func clearPartialFillCells() -
Show the sequencer note picker view according to the sender.
Declaration
Swift
@objc func showPicker(sender: UILongPressGestureRecognizer)Parameters
senderUILongPressGestureRecognizer corresponding to an active sequencer note visible on screen
-
Animates the sequencer cell while picking a new note
Declaration
Swift
func animatePicker(cell: UICollectionViewCell)Parameters
cellUICollectionViewCell view to animate scale
-
Hide note picker view
Declaration
Swift
func hidePicker(indexPath: IndexPath? = nil)Parameters
indexPathOptional IndexPath for hiding and selecting the new sequencer note for that row
-
Updates collection view event state. Used for transfering UI event state from one ‘timeDivision’ (i.e. quarter, eighth, etc..) to another denomination
Declaration
Swift
private func updateCollectionViewEventState() -
Clear the sequencer UI for the specified track or all tracks.
Declaration
Swift
func clear(_ track: Int? = nil)Parameters
clearInt for track UI to clear or all tracks if none specified
-
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int -
Undocumented
Declaration
Swift
func numberOfSections(in collectionView: UICollectionView) -> Int -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
-
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat -
Undocumented
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
-
Undocumented
Declaration
Swift
func didUpdatePlaying(_ isPlaying: Bool) -
Undocumented
Declaration
Swift
func didUpdateTempo(_ tempo: Double)
SequencerView Class Reference