Tags: posts polarity-music Bitwig Tutorial ControllerScript

Melody Maker - Bitwig Piano Roll Extension

Tutorial | Jan 29, 2025

In this video, I introduced a new script I created for Bitwig Studio that addresses user complaints about the piano roll by generating random melodies in chosen scales with various customizable options like rest probability, note length variation, and octave start. The script is still experimental, and I'm seeking feedback from viewers to improve it, with plans to develop more features in the future. You can find the script in the description or on my GitHub or Patreon, and using it involves downloading a JavaScript file and setting it up in Bitwig's controller settings.

You can watch the Video on Youtube

Summary

Maybe you don't watch the video, here are some important takeaways:

In this video, I introduce a new feature I've developed for Bitwig Studio, which I've never showcased before. This idea stemmed from the feedback I've received regarding the piano roll in Bitwig Studio. Many users have expressed dissatisfaction with it, so I took it upon myself to explore solutions, and I believe I have created something worthwhile. What I'm presenting today is an experimental controller script designed to enhance melody creation within Bitwig Studio.

Starting with a blank Bitwig Studio project featuring just two instrument tracks, typically, you would create a note clip and manually paint notes on the piano roll. However, today's session deviates from the norm. I demonstrate a new controller script I've developed that allows you to generate note sequences programmatically. The script includes several options, including the ability to select musical scales. For this demonstration, I choose the Aeolian scale, more commonly known as the minor scale, and set it to a sharp key.

After setting the initial parameters, which I believe to be optimal starting values, I simply press generate and arrange, producing a melody in the key of sharp minor. The script offers a variety of controls to customize the generated sequence. For example, you can adjust the rest probability, which controls the presence of silent gaps within the sequence. Additionally, you can alter repetition values for more or less recurring motifs within the melody. There is also a note length variation option, allowing for longer or shorter notes, enhancing the rhythmic diversity.

Another customizable element is the octave start point, where you can dictate which octave the melody begins at, adding depth to your composition. The script can also allow or prevent repeating notes with a simple yes or no toggle. If repeating notes aren't desirable, the script will adjust them by moving them to different octaves or intervals to maintain melody interest without redundancy.

Furthermore, you can manipulate the probability of each note within the chosen scale using adjustable numeric values. This feature enables you to define the prominence of certain notes, thereby crafting melodies that are either darker or brighter, depending on your preference.

A unique feature of the script is the 'repaint' function. If you've manually edited the sequence but wish to revert to the last auto-generated version, a simple repaint action restores the previous sequence state. This can be done either in the arranger or the launcher view of Bitwig Studio, providing flexibility depending on your workflow preferences.

I developed this script using the Bitwig Studio controller API. However, I'm open to suggestions for improving it, such as incorporating GUI elements for better user interaction or organizing the interface. I invite viewers to share feedback, potential issues, or ideas for additional features in the comments.

You can download this experimental script from the video description, GitHub, or Patreon. To use it, simply drag it into Bitwig Studio, where it saves in the appropriate directory, or manually place it within the controller script folder under Documents. Once installed, you can activate it via the Bitwig Settings under Controllers by selecting my name, Polarity, and choosing the Melody Maker.

This video represents the first iteration of a potentially larger project. I have numerous ideas for future enhancements and other musical tools, but I want to gather user experiences and suggestions first. I hope viewers find this tool beneficial. Please try it, provide feedback, and engage with the development process. Thank you for watching, and don't forget to subscribe and leave a thumbs up. See you next time!

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.
[00:00:02] So today is kind of a premiere.
[00:00:04] I show you something I kind of never did before
[00:00:07] inside of Bitwig Studio.
[00:00:08] And the reason for this was that a lot of people
[00:00:10] complained about the piano roll in Bitwig Studio.
[00:00:14] So I thought about it and tried to come up
[00:00:17] with some solutions, some rocker rounds,
[00:00:18] and I kind of, I think I found something, okay?
[00:00:22] So here is Bitwig Studio in its purest form,
[00:00:26] pretty empty, nothing in there,
[00:00:28] just two instrument tracks.
[00:00:32] So what you usually do is you create a note clip here
[00:00:35] and you go into it and then you paint some notes, right?
[00:00:40] But not the day.
[00:00:41] The day we are gonna use this controller script here
[00:00:44] I just made.
[00:00:46] And like I said, that's just the beginning,
[00:00:49] it's just an experiment.
[00:00:50] Let me know what you think if it's actually helpful
[00:00:53] or if you like it.
[00:00:54] So here we can choose a scale
[00:00:57] and I want to use here Aeolian, which is minor.
[00:01:02] And of course, I want to choose the sharp, right?
[00:01:05] Then we have some other options here,
[00:01:07] but I kind of chose the right initial values, I think.
[00:01:12] And all we have to do now is hit generate and ranger.
[00:01:15] And we get here a note sequence, sounds like this.
[00:01:18] (upbeat music)
[00:01:21] (upbeat music)
[00:01:24] So it's a melody in the scale of the sharp minor, right?
[00:01:37] So we have here all kinds of options,
[00:01:40] we can change this outcome here.
[00:01:42] We can also regenerate, right?
[00:01:44] Multiple different random melodies.
[00:01:49] (upbeat music)
[00:01:52] So we can say rest probability here.
[00:01:54] This means how many rests or empty notes
[00:01:58] we want to have inside of the sequence.
[00:02:01] So at the moment it's 0%, so it's full of notes.
[00:02:04] 100% is no note at all.
[00:02:07] And then middle ground here is some empty spaces in between.
[00:02:12] (upbeat music)
[00:02:16] (upbeat music)
[00:02:19] Then we have your repetition.
[00:02:29] This is some kind of feedback value.
[00:02:32] This means you can see that the notes are all over the place.
[00:02:35] It's kind of random, but feedback or repetition
[00:02:40] gives you some small little repetitions
[00:02:43] inside of the melody.
[00:02:44] (upbeat music)
[00:02:47] Then we have note length variation.
[00:03:01] At the moment you can see if this is at 0%,
[00:03:04] we have only 16 notes.
[00:03:06] If you push this up here,
[00:03:09] we get some longer notes in between.
[00:03:12] (upbeat music)
[00:03:14] So 16 notes here, a quarter notes, eight notes, and so on.
[00:03:21] (upbeat music)
[00:03:24] So this also sounds kind of nice.
[00:03:37] Then we have octave start.
[00:03:40] This just defines where you start here on the piano roll.
[00:03:43] So this is one octave higher.
[00:03:45] (upbeat music)
[00:03:47] Right, or maybe lower.
[00:03:49] (upbeat music)
[00:03:51] I have this here on three by default.
[00:03:54] (upbeat music)
[00:03:55] Then we have repeating notes, or a low repeating notes.
[00:04:00] If you have this on yes,
[00:04:02] then sometimes you have here repeating notes.
[00:04:05] (upbeat music)
[00:04:06] And if you don't want to have this, you choose no.
[00:04:09] And then my script basically takes the second note
[00:04:12] and puts it maybe an octave higher, octave lower,
[00:04:15] or maybe a fifth higher, or a fourth higher, or lower.
[00:04:19] So it tries to find a different place
[00:04:23] to give you a better outcome
[00:04:24] instead of having your two repeating notes.
[00:04:27] But maybe sometimes you like to have repeating notes,
[00:04:30] so you can choose.
[00:04:32] (upbeat music)
[00:04:34] Then we have here, of course,
[00:04:37] probability for each note inside of the scale.
[00:04:41] So you can say here, or by default,
[00:04:43] you can see the tonic is 30%, right?
[00:04:45] The second note, or the third note, the mediant here is 10%.
[00:04:50] Then we have here the subdominant is, of course, higher,
[00:04:53] 20%, and also the fifth, the dominant is 20%,
[00:04:56] and then the submediant and the leading note is each 5%.
[00:05:01] So you can choose if you want to have more of these notes
[00:05:04] inside of your sequence, or less.
[00:05:07] And then you can make the melody darker or brighter
[00:05:11] in terms of outcome, right?
[00:05:14] You can go here with the 0% for fourth and fifth.
[00:05:18] (upbeat music)
[00:05:20] And it's much darker because the dominant is missing, or...
[00:05:25] (upbeat music)
[00:05:28] Let's bring this back here to 20%.
[00:05:30] (upbeat music)
[00:05:35] Then we have here something like repaint,
[00:05:37] or generate in launcher, generate in arranger.
[00:05:40] I show you this here what this means.
[00:05:42] So at the moment, we are in the arranger.
[00:05:44] So we can say generate in arranger.
[00:05:49] We can also create another clip here.
[00:05:52] And it's always the last clip you selected, right?
[00:05:55] That this one here uses.
[00:05:58] So you can create basically in another clip here,
[00:06:02] random notes.
[00:06:04] You can also do this here in the launcher.
[00:06:08] Launcher, arranger, launcher, okay.
[00:06:14] And then we have repaint.
[00:06:15] This means if you go into here,
[00:06:19] and you have the sequence,
[00:06:21] let's generate your sequence, this one,
[00:06:24] and then you modify it, right?
[00:06:26] You make some changes to it, and then you don't like it.
[00:06:31] Just repaint the last generated thing here.
[00:06:35] And then it's back to the last state basically.
[00:06:39] So you can repaint the generation.
[00:06:41] If you don't hit here, actually generate an arranger,
[00:06:44] you can just do this.
[00:06:45] You can also, I think, you can use the same sequence
[00:06:49] here in here.
[00:06:51] So you say repaint in launcher, and it's the same melody.
[00:06:54] This is the same melody more or less.
[00:06:58] This is how it works.
[00:06:59] It's, yeah, I needed to do this here
[00:07:02] because it's split up in the controller API.
[00:07:05] Maybe there's a walk around for this.
[00:07:07] Maybe someone can tell me in the comments
[00:07:09] if you are familiar with the controller scripting API.
[00:07:13] I also search for a way to put in here some GUI elements,
[00:07:17] like splitting this up into different parts.
[00:07:20] Would be nice to have here some kind of horizontal line
[00:07:22] or something like this in there.
[00:07:24] Let me know in the comments.
[00:07:26] So this is my melody maker script.
[00:07:27] Like I said, this is just an experiment.
[00:07:31] I plan to do some more of this stuff in the future.
[00:07:34] I have some thousands of ideas, right?
[00:07:38] Would be nice if you could just try this out,
[00:07:40] give me some feedback.
[00:07:42] Does it work?
[00:07:42] Is it helpful?
[00:07:44] Do you run into problems?
[00:07:45] What kind of features you want to have, and so on.
[00:07:48] But I, for myself, I have already a lot of ideas.
[00:07:52] This is just a test example or work of progress
[00:07:55] or just to try it out.
[00:07:58] So yeah, script is in the description below.
[00:08:01] It's probably also on my GitHub or my Patreon.
[00:08:05] And all you have to do is drag this into Bitwig Studio.
[00:08:09] I think it saves it then to the right directory.
[00:08:12] Or you put it into the controller script directory.
[00:08:16] I think it's under Documents, Bitwig Studio
[00:08:18] or something like this, and then it will show up.
[00:08:22] And then you have to go here into Settings, Controllers,
[00:08:27] and then you can see here, here's my melody maker.
[00:08:32] All you have to do is go down here, add controller,
[00:08:35] choose my name, polarity, use melody maker and hit add.
[00:08:40] And then it shows up here at the top.
[00:08:42] That's all you have to do.
[00:08:44] So it's pretty straightforward.
[00:08:45] It's just a simple JavaScript file
[00:08:49] that you have to download.
[00:08:51] And then it should work.
[00:08:53] Okay, that's it.
[00:08:54] Let me know what you think in the comments down below.
[00:08:56] Leave a thumbs up, leave subscriptions.
[00:08:57] See you next time, bye.
[00:08:59] [BLANK_AUDIO]