Skip to content

Commit

Permalink
Smart quantization: map signals to steps
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaehn committed Jun 9, 2020
1 parent 94c8f01 commit c2eec87
Show file tree
Hide file tree
Showing 12 changed files with 638 additions and 396 deletions.
98 changes: 67 additions & 31 deletions BSchaffl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
lv2:extensionData ui:idleInterface ;
lv2:requiredFeature ui:idleInterface .

<https://www.jahnichen.de/plugins/lv2/BSchaffl#units_step>
a units:Unit ;
rdfs:label "steps" ;
units:symbol "steps" ;
units:render "%f steps" .

<https://www.jahnichen.de/plugins/lv2/BSchaffl>
a lv2:Plugin, lv2:DelayPlugin, lv2:MIDIPlugin, doap:Project;
doap:name "B.Schaffl" ;
Expand Down Expand Up @@ -107,254 +113,284 @@
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 6 ;
lv2:symbol "quantization_range" ;
lv2:name "Smart quantization range" ;
lv2:default 0.25 ;
lv2:minimum 0.0 ;
lv2:maximum 0.5 ;
units:unit <https://www.jahnichen.de/plugins/lv2/BSchaffl#units_step> ;
rdfs:comment "Range for smart quantization. MIDI messages are snapped to the respective steps if the MIDI signal is within this range from a step start/end. It is recommended to set the value to the half of the steps required by shortest expected note." ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 7 ;
lv2:symbol "quantization_mapping" ;
lv2:name "Smart quantization mapping" ;
lv2:portProperty lv2:integer , lv2:toggled ;
lv2:default 1 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
rdfs:comment "Enables mapping of a MIDI signal to the right step. All signals except NOTE_OFF are mapped to step starting within the smart quantization range. NOTE_OFF signals are mapped to step ending within the smart quantization range."
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 8 ;
lv2:symbol "quantization_positioning" ;
lv2:name "Smart quantization positioning" ;
lv2:portProperty lv2:integer , lv2:toggled ;
lv2:default 0 ;
lv2:minimum 0 ;
lv2:maximum 1 ;
rdfs:comment "NOT SUPPORTED YET! Enables placement of a MIDI signal to the right step position. All signals except NOTE_OFF are moved to start of the step starting within the smart quantization range. NOTE_ON signals are moved to end of the step ending within the smart quantization range. This feature produces latency!"
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 9 ;
lv2:symbol "position_01" ;
lv2:name "Position 01" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 7 ;
lv2:index 10 ;
lv2:symbol "position_02" ;
lv2:name "Position 02" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 8 ;
lv2:index 11 ;
lv2:symbol "position_03" ;
lv2:name "Position 03" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 9 ;
lv2:index 12 ;
lv2:symbol "position_04" ;
lv2:name "Position 04" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 10 ;
lv2:index 13 ;
lv2:symbol "position_05" ;
lv2:name "Position 05" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 11 ;
lv2:index 14 ;
lv2:symbol "position_06" ;
lv2:name "Position 06" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 12 ;
lv2:index 15 ;
lv2:symbol "position_07" ;
lv2:name "Position 07" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 13 ;
lv2:index 16 ;
lv2:symbol "position_08" ;
lv2:name "Position 08" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 14 ;
lv2:index 17 ;
lv2:symbol "position_09" ;
lv2:name "Position 09" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 15 ;
lv2:index 18 ;
lv2:symbol "position_10" ;
lv2:name "Position 10" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 16 ;
lv2:index 19 ;
lv2:symbol "position_11" ;
lv2:name "Position 11" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 17 ;
lv2:index 20 ;
lv2:symbol "position_12" ;
lv2:name "Position 12" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 18 ;
lv2:index 21 ;
lv2:symbol "position_13" ;
lv2:name "Position 13" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 19 ;
lv2:index 22 ;
lv2:symbol "position_14" ;
lv2:name "Position 14" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 20 ;
lv2:index 23 ;
lv2:symbol "position_15" ;
lv2:name "Position 15" ;
lv2:default 0.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 21 ;
lv2:index 24 ;
lv2:symbol "level_01" ;
lv2:name "Level 01" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 22 ;
lv2:index 25 ;
lv2:symbol "level_02" ;
lv2:name "Level 02" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 23 ;
lv2:index 26 ;
lv2:symbol "level_03" ;
lv2:name "Level 03" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 24 ;
lv2:index 27 ;
lv2:symbol "level_04" ;
lv2:name "Level 04" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 25 ;
lv2:index 28 ;
lv2:symbol "level_05" ;
lv2:name "Level 05" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 26 ;
lv2:index 29 ;
lv2:symbol "level_06" ;
lv2:name "Level 06" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 27 ;
lv2:index 30 ;
lv2:symbol "level_07" ;
lv2:name "Level 07" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 28 ;
lv2:index 31 ;
lv2:symbol "level_08" ;
lv2:name "Level 08" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 29 ;
lv2:index 32 ;
lv2:symbol "level_09" ;
lv2:name "Level 09" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 30 ;
lv2:index 33 ;
lv2:symbol "level_10" ;
lv2:name "Level 10" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 31 ;
lv2:index 34 ;
lv2:symbol "level_11" ;
lv2:name "Level 11" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 32 ;
lv2:index 35 ;
lv2:symbol "level_12" ;
lv2:name "Level 12" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 33 ;
lv2:index 36 ;
lv2:symbol "level_13" ;
lv2:name "Level 13" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 34 ;
lv2:index 37 ;
lv2:symbol "level_14" ;
lv2:name "Level 14" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 35 ;
lv2:index 38 ;
lv2:symbol "level_15" ;
lv2:name "Level 15" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:InputPort , lv2:ControlPort ;
lv2:index 36 ;
lv2:index 39 ;
lv2:symbol "level_16" ;
lv2:name "Level 16" ;
lv2:default 1.0 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [
a lv2:OutputPort , lv2:ControlPort ;
lv2:index 37 ;
lv2:index 40 ;
lv2:symbol "latency" ;
lv2:name "latency";
lv2:minimum 0 ;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TODO
## TODO's

* Show warning if latency exceeds maximum
* Smart quantization option: snap NOTE_ON to step start and NOTE_OFF to step end
* Smart quantization option: enable positioning feature
* Option to amplify NOTE_OFF velocity in the same way as NOTE_ON velocity
* Select between: stretch note position only / stretch note length only / stretch note position & length
* Option to change output step
Expand Down
Binary file added inc/smart_quantization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c2eec87

Please sign in to comment.