cemolcay / Midipianorollview
Licence: mit
Customisable UIScrollView subclass for rendering/editing MIDI notes on a piano roll view.
Stars: ✭ 55
Programming Languages
swift
15916 projects
Labels
Projects that are alternatives of or similar to Midipianorollview
Webmidi
Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).
Stars: ✭ 906 (+1547.27%)
Mutual labels: midi
Esp8266audio
Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
Stars: ✭ 972 (+1667.27%)
Mutual labels: midi
Kafkarefresh
Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development.
Stars: ✭ 1,033 (+1778.18%)
Mutual labels: uiscrollview
Beep
Beep sound library and utility for alerting end of a command execution. Beep can also play MIDI or text music score.
Stars: ✭ 39 (-29.09%)
Mutual labels: midi
Gnusmas Soundfonts
The Gnusmas GM Soundfont & other soundfonts' repository.
Stars: ✭ 19 (-65.45%)
Mutual labels: midi
Midi shield
Midi shield product 9595, available from SparkFun Electronics
Stars: ✭ 34 (-38.18%)
Mutual labels: midi
Touchosc2midi
a (linux compatible) TouchOSC Midi Bridge written in python
Stars: ✭ 44 (-20%)
Mutual labels: midi
Midiflip
🎹 MIDI music mayhem - flip, transpose, and arbitrarily remap pitches in MIDI files
Stars: ✭ 33 (-40%)
Mutual labels: midi
Mega Drive Midi Interface
Control the Sega Mega Drive's Yamaha YM2612 and PSG with MIDI
Stars: ✭ 39 (-29.09%)
Mutual labels: midi
Audioxtreamer
ASIO driver, Usb Driver, FX2LP Firmware, VHDL Fpga, Schematics & PCB Layout for the AudioXtreamer, a USB 2.0 32ch Audio/Midi interface for retrofitting into digital mixers/interfaces.
Stars: ✭ 22 (-60%)
Mutual labels: midi
Theconductor
Toolset for making musical applications with Unity, Max and Ableton.
Stars: ✭ 48 (-12.73%)
Mutual labels: midi
Sfz2bitwig
Convert .SFZ files into Bitwig Studio multisample instruments.
Stars: ✭ 37 (-32.73%)
Mutual labels: midi
Fluttermidicommand
A Flutter plugin to send and receive MIDI
Stars: ✭ 41 (-25.45%)
Mutual labels: midi
MIDIPianoRollView
Customisable UIScrollView subclass for rendering/editing MIDI notes on a piano roll view.
Demo
Requirements
- iOS 9.0+
- Swift 4.2+
- Xcode 10.0+
Install
CocoaPods
pod 'MIDIPianoRollView'
Usage
Create a MIDIPianoRollView
either from storyboard (subclass from UIScrollView
) or programmatically.
MIDIPianoRollView.Keys
- An enum that represents the data source of the piano roll's keys.
- It can be either
- A range of
UInt8
MIDI notes like30...50
(30th note to 50th note) - A
Scale
of notes between specified octave range - Or custom unordered pitches.
- A range of
MIDIPianoRollView.Bars
- An enum that represents the bar count on the piano roll.
- It can be either
- A fixed value by
.fixed(barCount)
- Or
.auto
that auto-calculating bar count by the data source.
- A fixed value by
MIDIPianoRollNote
- Set the
notes
data source array in order to pop the notes. - It is a
[MIDIPianoRollNote]
array that has the start position, duration, midi note and velocity data for each note.
MIDIPianoRollPosition
- This represents both position and duration values for the notes on the piano roll. Contains
bar
,beat
,subbeat
andcent
values. - Each of them are
Int
and confomrs toComparable
,Equatable
,Codable
and custom+
and-
operatros. - Each
bar
has a number ofbeat
s that the piano roll'stimesingature
has. - Each
beat
has 4subbeat
s. - Each
subbeat
has 240cent
s for fine tuning.
MIDIPianoRollCellView
- Each cell on the piano roll is a subclass of the
MIDIPianoRollCellView
. - You can basically create your custom cell view by subclassing it.
MIDIPianoRollRowView
- Each key view on the right side of the piano roll is a subclass of
MIDIPianoRollRowView
. - You can create your custom subclass may be with some piano key images and render it on the piano roll.
MIDIPianoRollMeasureView
- Measure is a custom view with bunch of
CALayer
s that rendering the position texts and guide lines. - You can set grid line width and colors.
- You can set measure position label font and text colors.
- If you don't want to render measure, then you can set the
isMeasureEnabled
property to false.
MIDIPianoRollView.ZoomLevel
- Zoom level represents the currently rendering beat value on the piano roll.
- It has a customisable
minZoomLevel
andmaxZoomLevel
range. - Each zoom level have note rate, for example,
-
.halfNotes
means a bar have 2 beats with 2 half notes, -
.quarterNotes
means a bar have 4 beats with 4 quarter notes.
-
- If
isZoomingEnabled
is set true, then you can horizontally pinch-to-zoom in or out between customisableminBeatWidth
andmaxBeatWidth
values to set currentbeatWidth
. - When a
beatWidth
hits the limit, the zoom level advances the next level depending on the zooming in or out. - You can disable this behaviour by setting
isZoomingEnabled
property to false. - The same behavior also controls the row height zooming. If you vertically pinch-to-zoom, then current
rowHeight
will scale betweenminRowHeight
andmaxRowHeight
properties.
MIDIPianoRollView.GridLine
- Contains line properties for grid line styling.
- You can set each line's width, color or dash pattern styling.
Editing
- You can enter the cell editing mode by setting
isEditing
property to true. - When you are in the edit mode, you can not scroll the view but you can pan the cells to move or resize.
- You can enable/disable the multiple editing by setting the
isMultipleEditingEnabled
property to true.- When it's enabled, you can drag your finger to render a multiple selection view to select all cells that under the drag-to-select box.
- Then you can move or resize the selected cells.
- When editing is done, piano roll will informs its delegate.
MIDIPianoRollViewDelegate
- Informs the delegate when the cell is edited.
- You can update your
notes
data source in the delegate calls.
func midiPianoRollView(_ midiPianoRollView: MIDIPianoRollView,
didMove cellView: MIDIPianoRollCellView,
to newPosition: MIDIPianoRollPosition,
pitch: UInt8)
- Informs delegate about that the cell is moved a new position and/or row.
- You can use the
pitch
value to determine which row is the cell moved.
func midiPianoRollView(_ midiPianoRollView: MIDIPianoRollView,
didResize cellView: MIDIPianoRollCellView,
to newDuration: MIDIPianoRollPosition)
- Informs delegate about that the cell's duration changed.
- Called when cell is resized.
func midiPianoRollViewMultipleEditingDraggingView(_ midiPianoRollView: MIDIPianoRollView) -> UIView?
- Return a custom UIView if you want to render your custom drag-to-select view.
Example Project
- Check out the example project for getting more information about the implementation.
Documentation
You can find the documentation here.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].