Retrospective Midi Recording- Bitwig Piano Roll Extension
Tutorial | Feb 28, 2025
In this video, I demonstrate how to use a retrospective recording feature for MIDI notes in Bitwig Studio, allowing you to capture notes even if you forget to hit record. I explain how my custom controller script works to record MIDI data into a buffer while also passing it through to Bitwig, and I mention an upcoming update that will integrate a diatonic transposer directly into the script. Additionally, I share that new scales have been included in the zip file that viewers can download and try out, and I invite feedback and ideas in the comments.
You can watch the Video on Youtube
- support me on Patreon
- download (all scripts)
Summary #
Maybe you don't watch the video, here are some important takeaways:
In this video, I'm sharing a feature in Bitwig Studio that I think you'll really enjoy: retrospective recording for MIDI notes. This concept was suggested by several viewers, and I finally gave it a try. Imagine you’re playing around on your keyboard, discovering a melody you love, but you didn't hit record. Usually, that means you'd lose those notes, but with retrospective recording, that's no longer a problem.
Here’s how it works: when you're in Bitwig Studio with an instrument track open and playing on your MIDI keyboard, the notes are automatically captured in the background. To access them, you can create a new note clip and pull all the last notes you played into the arranger. This feature ensures that even if you don’t hit record, your latest musical idea is still saved.
The retrospective recording script I've created records every MIDI note and event, along with the time it occurred, using JavaScript date objects. By calculating the time between each event and using the tempo, I can accurately position the notes in the grid. Although the timing uses JavaScript date and time objects, and is rounded to the 16th note grid, meaning it's not perfectly precise, it's a handy tool to ensure you don’t lose your creative ideas.
My script uses a 16-bar buffer, storing notes from the most recent moment backwards, refreshing every time you play new notes. You can also clip these notes to a launcher, maintaining all previous notes until you play something new. The notes won't vanish unless overwritten by new key presses.
One caveat is that you need to switch your usual MIDI controller script to this new retrospective controller script. For instance, I typically use my Arturia Keystep Pro script, but for this feature to work, I replace it with my new script. By adding it as a new controller in Bitwig Studio and selecting my Keystep Pro as the MIDI input, I capture all the MIDI data into this buffer while still passing the notes through to Bitwig Studio.
Additionally, I'm working on a new feature for this script, which includes a diatonic transposer. Typically, when you use a diatonic transposer in Bitwig, you have key corrected notes filtered through an effect but when you record, you record only what you've played, not the processed output. My goal is to integrate this transposer directly into the controller script so that you can capture the corrected notes in the note clip without needing a secondary track. This feature is still in development but should be ready soon.
For those eager to try this out, I’ve packaged everything into a zip file that you can download and extract into your controller script folder. This package includes some new scales contributed by Frank from Jana Brothers, which you might find interesting to explore.
I hope this feature is as helpful for you as it has been for me in retaining creative musical ideas. I'm keen to hear your feedback and any ideas for improvement. Thanks for watching, and I'll see you in the next video. Bye!
Transcription #
This is what im talking about in this video. The text is transcribed by AI, so it might not be perfect. If you find any mistakes, please let me know.
You can also click on the timestamps to jump to the right part of the video, which should be helpful.
[00:00:00] Hey folks, welcome back to another video on this Friday and I tried to make a short but I think
[00:00:05] you really like this one. So a lot of people suggested this that I need to try this and
[00:00:11] here's an example. So let's say we are in Bitwig Studio, we have here an instrument track, we have
[00:00:18] a piano, BST already running and you start to play on your keyboard, right? So you play around and
[00:00:34] you figure something out and maybe you think well this was actually really nice and it's probably
[00:00:41] gonna be a masterpiece but you know we just didn't hit record so we don't have any notes in here.
[00:00:49] So now we just create here a new note clip and we can say just give me into the ranger
[00:01:00] all the last notes we just played and you can see it here. Maybe move the play it over here.
[00:01:07] So this is basically retrospect or retrospective recording for MIDI notes. It always records the
[00:01:25] notes and only when you press notes on a keyboard or when there is MIDI input. So it works like this.
[00:01:35] Let's open this up and press here, repaint multiple times. So you can see nothing happens but when I
[00:01:40] start to play. So nothing will happen when you don't press a note on the keyboard and every
[00:01:56] time you press a note you save some kind of MIDI event into a JavaScript object also with the date
[00:02:04] and time. So I use JavaScript date objects or the date yeah the date object to figure out the time
[00:02:10] between the last event and the current event and then I figure out with the tempo where to put notes
[00:02:17] in the grid or in this piano roll grid. So it sounds actually more complicated than it is and
[00:02:24] there's also always a 16 bar buffer. Maybe I can do it longer if you want to but I choose to use
[00:02:31] 16 bars and I also always record from the end here. So it goes until the beginning here and then it
[00:02:49] starts to remove notes and new notes always appearing here at the end. And you can also just
[00:02:58] maybe use here a note clip inside of the launcher, do the same thing, paste it into the launcher right
[00:03:05] and then we have the same thing here and you always keep all these notes. Nothing changes until
[00:03:12] you press a new key basically on the keyboard and then it takes the time from the last event here
[00:03:18] which was now a minute ago and then it moves all the notes to the left side and shows you the new
[00:03:26] notes here right. But if you don't press anything on the keyboard you keep basically all these notes
[00:03:32] forever. So this is how it works. It sounds more complicated than it is. Maybe it's not highly
[00:03:40] precise so don't rely on it. The timing is just based on javascript date and time object so it's
[00:03:47] probably not super super precise and then I also rounded to 16 notes to the 16 note grid here.
[00:03:56] So it's not super precise but at least you don't lose your idea, your melody or you know just what
[00:04:05] you played on the keyboard. Okay so this is retrospect or retrospective recording for MIDI
[00:04:14] notes. The only downside to the script in my opinion is that you need to exchange this controller
[00:04:21] script for your old MIDI controller script. So in here controllers right, usually I use my Arturia
[00:04:32] Keystep Pro controller script but it doesn't do anything special and I don't use any special
[00:04:38] features of this controller script. It's just there to give me basically a MIDI input in the
[00:04:45] select dropdown. So I disable this here. I don't use this. I actually can delete this
[00:04:51] and then I create basically here a new controller,
[00:04:55] polarity where it is here and then I use retrospect and this is more or less like a
[00:05:05] very generic basic MIDI or MIDI keyboard controller script but with this added feature
[00:05:12] that it records into a buffer. So I hit add and then I select here my Keystep Pro as a MIDI input.
[00:05:19] This is very important. So now the MIDI keyboard plays into my controller script. I record everything
[00:05:25] in an into a buffer there and it also passes on all these notes to Bitwig Studio here to
[00:05:33] retrospect keyboards. So you have to select this here in the MIDI input dropdown then you can just
[00:05:39] play notes live and also feed notes into my controller script here, right? Let's click here,
[00:05:50] repaint. Here I can see basically here.
[00:05:57] So you never lose actually any notes that you play on the keyboard and it's always
[00:06:06] recording because it kind of hijacks all the incoming MIDI data and pushes it into
[00:06:13] in JavaScript array and also give you the throughput of the MIDI keyboard directly into
[00:06:20] Bitwig Studio. There's also something I'm currently working on which is here the scale
[00:06:26] mode and scale. This doesn't work at the moment. There isn't there's coming an update at the weekend
[00:06:31] or maybe next week where I want to include also a diatronic transposer directly into the controller
[00:06:38] script. So usually when you play here in Bitwig Studio you use a diatronic transposer like the
[00:06:44] key filter and then you correct all the incoming notes to the scale and the mode. The problem is
[00:06:54] when you hit record you basically record what you play on the keyboard not the output of this
[00:07:01] key filter. If you want to record the output of this key filter you have to create another
[00:07:06] instrument track and then you know choose here and go to here and then select key filter as an
[00:07:12] output and then record everything that comes out of the key filter into a second instrument
[00:07:19] track which is super complicated. So I want to include basically this key filter directly
[00:07:25] into the controller script so you get all the corrected notes directly into the note clip.
[00:07:32] So this is the idea but it's not implemented yet. It takes a bit of time. Like I said maybe next week
[00:07:38] maybe on the weekend I'm just implemented here to drop down for the scale and the scale mode.
[00:07:44] I'm using also the code I already did here for the melody maker and the scale maker. I just you
[00:07:53] know have to test it and it takes a bit of time. But it's coming soon and this one here already
[00:07:59] works as intended in my opinion so you can try it out. I also put this or put everything into this
[00:08:06] zip file, download all. You can just download the zip file and extract it into your controller
[00:08:13] script folder and then you should be up to date. I also included new scales here. Frank from
[00:08:22] Jana Brothers sent me different or multiple new scales that you can try out. It's also included
[00:08:30] then in the zip file or in the scales.js file. So this is also new. So this is retrospect. I hope
[00:08:38] you like it. Send me your feedback, send me your ideas. I think it works great for me. I tested
[00:08:44] this here the last few days and yeah it kind of works nicely. Let me know in the comments.
[00:08:51] That's it for today. Have fun with this and see you in the next video. Bye.