Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 02-07-2024, 11:55 AM   #1
Talagan
Human being with feelings
 
Join Date: Feb 2016
Location: Paris / France
Posts: 315
Default [Script] One Small Step : Alternative step input methods for Reaper

This is the official support thread for One Small Step.

One Small Step is a tool for performing MIDI note step input in REAPER. It is an alternative to Reaper’s standard step input, offering more control and tools, and allowing the use of the sustain pedal (+ keyboard modifier keys) for performing actions.



The main aspects of this tool are the following:
  • It offers multiple input methods, based on MIDI Controller key press, key release events, or strict sustain pedal/action validation.

  • It has multiple edit modes : Write, Insert, Replace, Repitch/Revel, Compress/Stretch, for inputing, inserting, erasing, translating, reworking notes with minimal use of the mouse. It will work outside of the MIDI editor (directly in the arrange view) ; this offers additional comfort and can speed up your workflow.

  • It also has a snappy navigation mode with the sustain pedal, over the project grid, the item grid, note bounds, item bounds, etc.

  • It also addresses some issues with workflows that use the input FX chain for routing/transposing MIDI (because Reaper’s standard input bypasses the fx input chain, see the last section for an explanation).

  • It has playback capabilities to hear back what you've just input.

                            


Quick snapshots

Using OSS in the arrange view, with playback :


Inputing with grid length options and swing :


The Write Mode :


The Insert Mode :


The Replace Mode :


The Repitch/Revel Mode :


The Navigation Mode :


The Stretch/Compress Mode (Insert Mode alternative submode with marker) :


The Stuff Mode (Replace Mode alternative submode with marker) :




                            
Installation / Update instructions

The current version is available through ReaPack, from the official ReaTeam/ReaScripts repo.

You will also need to install two extensions (if you don't, you'll be reminded to do so). The first one is ReaImGui and the other one is Julian Sader's API js_ReaScriptAPI.


                            
How to use

You can now refer to the full documentation, located here (chose your version then) :

https://bentalagan.github.io/onesmallstep-doc/

Launch the action called talagan_OneSmallStep.lua (some other actions are provided but we'll get on this later). You should now see OSS's main dialog - One Small Step is active (it is active as long as this dialog is visible).



At the top of it, the name of the target MIDI track / item / take will be displayed if there's one eligible that matches your current selection. It is important to note that the track should be armed for record (OSS will give you an indication if you forgot to arm the recording). If everything's ready, a red circle will glow, meaning that in this configuration, One Small Step is able to do its job (listen to MIDI events, and step input/patch the current MIDI item). When you're done with OSS, just close the window and it will be inactive.

The most logical way to summon OSS is to simply create a toolbar button in Reaper by assigning it the talagan_OneSmallStep.lua action. OSS handles the color of the button depending on its state, and the button will be fully togglable. An icon is provided with the installation (toolbar_one_small_step.png).


                            
More on the step input + input FX chain issues

A bit more of explanation on that point : if you intensively use MIDI JSFXs on your track FX input chains for various purposes (transposition, routing, velocity modification, etc) like I do, you may have already encountered this problem.

Since the default step input process is controlled by the MIDI control path of Reaper (for various very pertinent reasons), the FX input chain is bypassed. That means, when recording, and when step inputing, your MIDI flow will not behave the same way (channels are likely to be wrong, as well as note heights and velocities...). More funny, the piano roll preview will not match what is really written to the MIDI item by the step input process.

To address this, One Small Step installs a dedicated JSFX at the end of the input FX chain of the track of the MIDI item you're editing, that listens to MIDI Note events, and puts them in a buffer. One Small Step allows you then to "commit" those notes in the MIDI item, depending on the method you've chosen (key release, sustain pedal event, dedicated reaper action called by your computer keyboard).

(For archiving purpose, threads evoking this pb : here, here)

                            
Known bugs/limitations

Since OSS adds a helper JSFX to your tracks, atm it is not possible to avoid having an "add JSFX" entry in the undo stack. OSS also has an option to automatically cleanup these companion JSFXs on window close, but this will add a "remove JSFX" entry in the undo stack when closing OSS. Thus, when undoing things, you may fall on these entries and wonder why the undo is not working as expected (needing to undo twice the first time). I personally do not tick the "cleanup companion JSFXs on close" option, and launch the cleanup with a toolbar button regularly to avoid this annoying behaviour. The solution will be to add/remove the companion JSFXs silently, but atm it's not possible with Reaper's api.

At the moment, this tool is very young and bugs may happen. If you like it, don't hesitate to report and ask for some features. I'll do my best do make it evolve in the right direction (provided I have the time and motivation at the right moment!).

                            
Credits

One Small Step uses and heavily relies on Jeremy Bernstein (sockmonkey72)'s MIDIUtils library . Thanks for the precious work !

I have used important ideas from this great tool by tenfour. Epic hail and thanks to him !

Thanks to @cfillion for the precious pieces of advice given during the code review for reapack !

A lot of thanks to all donators, and forum members that help this tool to get better ! @stevie, @hipox, @MartinTL, @henu, @Thonex, @smandrap, @SoaSchas, @daodan, @inthevoid, @dahya, @User41, @Spookye, @R.Cato, @samlletas

                            

Donation

If you like One Small Step and want to donate to support the development, you can donate here :



Thanks a lot for your support !

                            

Changelog

V0.9.13 (May, 2024, the 2nd) :
  • [Bug Fix] [Write Mode] Commit back broken (thanks @samlletas !)
  • [Bug Fix] [Insert Mode] Cut + Add does not support extending held notes (thanks @samlletas !)

V0.9.12 (May, 2024, the 1st) :
  • [Feature] Added some options to tweak the insert mode behavior when inserting in the middle of existing notes (thanks @samlletas !)
  • [Bug Fix] Repitch mode would not work for fresh installs (thanks @samlletas !)
  • [Bug Fix] Navigation mode snap would not work (or partially ?) for fresh installs
  • [Rework] Ported all operations to the 'MIDIUtils' library by @sockmonkey72 (thanks Jeremy !!)

V0.9.11 (April, 2024, the 6th) :
  • [Feature] Velocity Limiter

V0.9.10 (March, 2024, the 19th) :
  • [Feature] Compress/Stretch Submode
  • [Feature] Stuff Submode
  • [Enhance] Force item bound snapping if item grid snap is on
  • [Rework] PPQ Precise operations
  • [Rework] New code architecture and file hierarchy, big code rework
  • [Rework] Addind debugging support for Visual Studio Code (using mavriq lua sockets, thanks @mavriq)

V0.9.9 (March, 2024, the 14th) :
  • [Rework] Changed toolbar icon color
  • [Bug Fix] [Repitch Mode] Patched MIDIUtils API : successive snapped notes would be borked by the automatic overlap correction option (thanks @smandrap)
  • [Bug Fix] [Write Mode] CommitBack action would be blocked by sustain pedal blocker if called from action (thanks @hipox !)
  • [Bug Fix] [Write Mode] Sustain Pedal blocking system when (stepping back + miss) was broken

V0.9.8 (March, 2024, the 14th) :
  • [Bug Fix] Enhancing behaviour of the repitch mode when Reaper’s “Autocorrect overlapping notes” is checked (thanks @smandrap & @Stevie !)

V0.9.7 (March 2024, the 13th) :
  • [Feature] Added repitch (+revel) mode (thanks @smandrap !)
  • [Fix] Added missing “Change Edit Mode” actions
  • [Doc] Added help button that redirects to current documentation
  • [Rework] Re arranged settings panel
  • [Rework] Reworked some icons and colors
  • [Rework] Started to use MIDI Utils API by sockmonkey72 instead of default MIDI API

V0.9.6 (March, 2024, the 9th) :
  • [Feature] Added Replace mode
  • [Feature] Added Navigate mode
  • [Feature] Added auto-scroll arrange view option
  • [Feature] [All Input Modes] Handle grid size for note length with modifier factor
  • [Feature] [All Input Modes] Handle swing for grid size note length
  • [Feature] [Navigate] Snap on project grid (with swing)
  • [Feature] [Navigate] Snap on item grid (with swing)
  • [Feature] [Navigate] Snap on note start/ends
  • [Feature] [Navigate] Snap on item bounds
  • [Feature] [Navigate] Added option to allow navigation on key events (does not input notes)
  • [Feature] [Write] Step back delete/shortening now happens on every key press/release event (notes should match keys)
  • [Feature] [Write] Added option to prevent the cursor from being moved back if step back delete fails (notes don’t match keys, the user missed)
  • [Feature] [Insert] Step back delete can now make holes
  • [Feature] Added system to engage modes with buttons or with customizable modifiers
  • [Rework] [Write] Reworked Delete/Step back logic
  • [Rework] [Insert] Reworked Delete/Step back logic
  • [Rework] Removed option “do not add notes if step back modifier key is pressed”, not pertinent anymore
  • [Rework] Removed option “erase note ends even if they do not align on cursor”, since the eraser does more complex things, it does not fit in the new flow
  • [Bug Fix] n-tuplets always used a value of 2/n, now using precpow2(n)/n
  • [Bug Fix] Create new items when advancing only if insert mode is on
  • [Bug fix] Icons/Images coould be randomly wrong

V0.9.5 (February, 2024, the 29th) :
  • [Feature] Added pedal repeater
  • [Feature] Added insert/cursor mode (inserts + move things forward, deletes backwards)
  • [UI] Aded status icons for modifier modes/keys (insert / backward / insert+backward)
  • [Rework] Changed folder structure

V0.9.4 (February, 2024, the 26th) :
  • [Feature] Added option to allow erasing note endings that do not match cursor when stepping back
  • [Feature] Keypress Mode : Added Sustain Inertia to detect held keys when pressing other keys (can be disabled)
  • [Feature] Added options to tweak Key Release / Key Press reaction times
  • [Feature] Added option to choose if input notes are selected or not
  • [Feature] Added option to automatically cleanup JSFXs on closing (thanks @stevie !)
  • [Feature] Added option to prevent notes from being inserted if the sustain pedal modifier key is pressed (this blocks insertion, useful in KP mode when starting an erase operation)
  • [Bug Fix] Project boundaries were not updated if the edited item was the last one and was extended (thanks @daodan !)
  • [Bug Fix] Reduced intensive CPU usage when OSS is running due to unuseful calls to Undo_Begin/End

V0.9.3 (February, 2024, the 23th) :
  • [Feature] The commit action/sustain pedal now extend notes if they were already held before (thanks @henu, @Martintl)
  • [Feature] Added Commit Back action to "do things" backward (shorten/remove notes) (thanks @Hipox)
  • [Feature] Added a modifier key setting (ctrl, shift, etc), to use in conjunction with the sustain pedal to trigger the commit back action (lol)
  • [Feature] Added settings panel
  • [Feature] Added setting to allow targetting items even if they are not selected (but the track is, and the cursor is contained by an item)
  • [Feature] Added setting to allow the automatic creation of MIOI items if none is selected
  • [Feature] It is possible to chose if the playback marker should be deleted, kept, or backed up for later when quitting OSS
  • [Feature] Added independent scripts to change the input mode
  • [Bug Fix] The helper JSFX window no longer pops up when it is added to a track and the "plugins > autofloat newly added JSFX windows" option is on (thanks @daodan)
  • [Bug Fix] The pedal reset + undo could mess up the state of the plugin (now, the plugin does not touch the JSFX params anymore)
  • [Bug Fix] After opening OSS, the plugin would periodically trigger a refocus event on the Reaper main window. This now happen only once when needed.
  • [Bug Fix] Forgot to index the standalone set/remove playback marker action
  • [Rework] Better behaviour when changing focus between window, arrange view and midi editor
  • [Rework] Removed action mode (merged it with the Pedal Mode, they are actually the same)
  • [Rework] Input mode icons redesign
  • [Rework] Code src/architecture rework

V0.9.1 (February, 2024, the 16th) :
  • [Feature] Added Keyboard Press mode
  • [Feature] Added playback (rewind and play) action (n measures)
  • [Feature] Added playback marker support

V0.9 (February, 2024, the 13th) :
  • Added support for complex note length modification (+/- fractions between 0 and 1)
  • More compact UI (save space)
  • Reworked sustain pedal and action roles in all modes
  • Removed OFF mode : Redundant with closing OSS
  • Bug Fix : "change note len param source" actions where called "change note len modifier" instead
  • Big code refactoring

V0.8 (February, 2024, the 10th) :
  • MIDI Items are now extended if the input notes overflow
  • Added Project Grid and MIDI Item conf modes to change the source for the note length
  • Added support for n-tuplets
  • Allow the use of the commit action in keyboard mode to insert rests
  • Allow the use of the commit action in pedal mode to act as the sustain pedal
  • Bug Fix : When launched from a toolbar button, update the button to OFF state when crashing or being terminated by REAPER

V0.1 (February, 2024, the 7th) :
  • Initial version
                            

Original post (for archiving purposes) :

Hi dear reaper friends,

I release today the first version of a tool that I had to develop for my own needs which is called One Small Step. It is an alternative to the default step input method shipped with Reaper.

(PRESENTATION)

I hope you'll enjoy using this as much as I do !

Cheers,

Ben

Last edited by Talagan; 05-06-2024 at 02:01 PM.
Talagan is online now   Reply With Quote
Old 02-07-2024, 09:05 PM   #2
User41
Human being with feelings
 
Join Date: Aug 2020
Posts: 255
Default

Very cool. I’m looking forward to trying this one out.
User41 is offline   Reply With Quote
Old 02-08-2024, 01:35 AM   #3
smandrap
Human being with feelings
 
smandrap's Avatar
 
Join Date: Feb 2021
Location: Right here
Posts: 1,776
Default

Huge kudos for this. It’s amazing, the sustain mode is incredibly cool.

Would you consider growing the right side of the MIDI item according to the inserted notes? Using the tool from the MIDI editor places notes outside item bounds without resizing them

Edit: this is what i mean:

__________________
My Scripts

Last edited by smandrap; 02-08-2024 at 02:21 AM.
smandrap is online now   Reply With Quote
Old 02-08-2024, 04:49 AM   #4
Talagan
Human being with feelings
 
Join Date: Feb 2016
Location: Paris / France
Posts: 315
Default

Quote:
Originally Posted by smandrap View Post
Would you consider growing the right side of the MIDI item according to the inserted notes? Using the tool from the MIDI editor places notes outside item bounds without resizing them.
Sure, it's done and I'll release an update in the next few days (giving some time to integrate other requests if there are some). Thanks for your feedback !
Talagan is online now   Reply With Quote
Old 02-08-2024, 05:08 AM   #5
Spookye
Human being with feelings
 
Spookye's Avatar
 
Join Date: Jul 2018
Location: Torino, Italia
Posts: 772
Default

Thnx Talagan! Extraordinary tool that was missing. Thank you so much
__________________
Cupboard Home Studio YT
https://www.youtube.com/channel/UCm8...X1912MA260ELzg
Spookye is offline   Reply With Quote
Old 02-10-2024, 01:58 AM   #6
Talagan
Human being with feelings
 
Join Date: Feb 2016
Location: Paris / France
Posts: 315
Default

Hey, I've updated the tool to V0.8 today.



Here's the changelog :
  • MIDI Items are now extended if the input notes overflow
  • Added Project Grid and MIDI Item conf modes to change the source for the note length
  • Added support for n-tuplets
  • Allow the use of the commit action in keyboard mode to insert rests
  • Allow the use of the commit action in pedal mode to act as the sustain pedal
  • Bug Fix : When launched from a toolbar button, update the button to OFF state when crashing or being terminated by REAPER


With the grid/item conf settings, this update should fit to more workflows. As usual, any comments / BR / FR are appreciated as long as I'm able to answer !

Enjoy !

Last edited by Talagan; 02-10-2024 at 02:21 AM.
Talagan is online now   Reply With Quote
Old 02-12-2024, 06:16 PM   #7
R.Cato
Human being with feelings
 
Join Date: Dec 2020
Posts: 57
Default

An amazing tool. Thank you so much for sharing this.
R.Cato is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.