New Tool (3.0,3.1): xStream

cool stuff

Erm I have have some questions regarding making a algorithm with it…

  1. To add a slider (or popup, checkbox and so on) to control arguments you need to define it in the model definition (lua file)

This is most easily done by hitting ‘reveal location’, it should open explorer, finder etc. and focus the lua file. If not (running OSX?) then I need to look into it.

But the principle is the same - open the lua file in a text editor of some kind, and perhaps copy-paste one of the arguments from another definition.

I have not fully documented the arguments and their properties, all the possibilities are currently onlyavailable ‘by example’

  1. You seem to be initializing the variable ‘n’ the first time the callback is executed, then adding on consecutive runs. Eventually it will reach the value 3.

But the easiest would probably be to explain the purpose of your code.

Edit: maybe you just want to ‘push’ note-column 1 into note-column 2? This could expressed as simple as this:

xline.note_columns[2] = xline.note_columns[1]
xline.note_columns[1] = {}
  1. You can detect a note-off either by it’s value or string:
if (note_value == 120) then
 -- note off detected
end

if (note_string == "OFF") then
 -- note off detected
end

xStream is using the same syntax as in the Renoise API for note and effect columns:

https://github.com/renoise/xrnx/blob/master/Documentation/Renoise.Song.API.lua#L2805

  1. Depends on what you do with them. Note-offs (or even empty notes) is not a ‘special case’, they are merely values/strings.

The only special case would be if you try to transpose a note beyond it’s valid range. C-0 is the lowest possible note, so

transposing such a note down would make it remain at C-0 and log a warning message in the scripting console :slight_smile:

–

Btw: as I wanted to test-drive your code, I hit the ‘new’ button to create a new model from scratch.

But this actually threw an error, seems to be a small bug which was introduced in v1.02.

Will fix, of course.

Thank you for the infos!

by hitting ‘reveal location’, it should open explorer, finder etc. and focus the lua file. If not (running OSX?) then I need to look into it.

Yes, doesn’t seem to work on OSX so far… Edited the definition, works now. The only strange thing is, it seems I have to completely disable and re-enable xstream, before I can see any external made changes.

  1. You seem to be initializing the variable ‘n’ the first time the callback is executed, then adding on consecutive runs. Eventually it will reach the value 3.

But the easiest would probably be to explain the purpose of your code. I think you want to ‘push’ note-column 1 into note-column 2?

I wanna do some note splitting, I the way that for each num_notes on one col, it will be splitted to num_tracks/cols. E.g. having a mono 16th note track, settings 1,2, it should split the notes alternating. I want to do this for multiple vsti instancing, individual note panning.

I don’t want to use this in live. Only as an editing tool.

So here I would like to have a counter that initializes every time I press “fill track” on row 1. So currently, it won’t initialize on repeating press on “fill track”?

You can detect a note-off either by it’s value or string:

Depends on what you do with them. Note-offs (or even empty notes) is not a ‘special case’, they are merely values/strings.

Thanks, I made some logical mistake, now it seem to work to move the note-off along with the note.

Click to view contents
--[[============================================================================
split notes.lua
============================================================================]]--
return {
arguments = {
  {
      name = "num_tracks",
      value = 2,
      properties = {
          min = 2,
          max = 5,
          quant = 1,
          display_as_hex = false,
      },
      description = "Number of splitted, separated tracks",
  },
  {
      name = "num_notes",
      value = 1,
      properties = {
          min = 1,
          quant = 1,
          max = 32,
      },
      description = "Number of following notes on each track",
  },
  {
      name = "remap_instrument",
      value = 2,
      properties = {
          items = {
              "off",
              "on",
          },
          display = "switch",
      },
  },
},
presets = {
},
data = {
},
callback = [[
if (not n) then n = 1 end
if (t == nil) then t = 0 end
num_tracks = args.num_tracks
num_notes = args.num_notes
--renoise.song().selected_note_column_index
offset_col = rns.selected_note_column_index
if (offset_col > 0) then
  if (xline.note_columns[offset_col].note_value ~= nil and xline.note_columns[offset_col].note_string ~= "OFF") then
  print("counter "..n..":")
  print(xline.note_columns[offset_col].note_value)
    n = n + 1
    if n > num_notes then
      t = t + 1
      n = 1
    end
  end
  
  
  tt = offset_col+(t%(num_tracks))
  xline.note_columns[tt] = xline.note_columns[offset_col]
  
  if (args.remap_instrument == 2) then
    xline.note_columns[tt].instrument_value = xline.note_columns[tt].instrument_value+tt-1
  end
  
  if (tt ~= offset_col) then
    xline.note_columns[offset_col] = {} 
  end
  
end

]],
}

3.1 spoiler, nice :slight_smile:

I really hope not!

I see none of the things that are actually great about Redux! No note column names! No sliders for Volume, Pan, Delay!

But I do see that there is no accordion in the sampler anymore, which indeed means that it is not 3.0.

I am officially worried again!!! I thought all the Redux stuff will be in Renoise 3.1?

Maybe this is some of the earlier alpha builds?

Can this tool go through a selection of notes and sort these over time, from lowest note to highest note or the other way around?

Yes, with some limitations. For example, I hacked into ledger’s ‘Reorder Notes’ tool to restrict drum notes to specific columns.
The trouble with that sorting algorithm (in an xStream context) is that it requires two passes - one to collect data about the notes and another pass to do the actual re-ordering. Sorting by two dimensions (pitch/time) can quickly become complex.

But - sometimes, simple is good too. I could, for example, easily see a model which would pick out specific notes and place them in specific columns.

It would certainly meet my own requirements for the modification I made to Ledgers tool (which was to clean up drum tracks).

I have to completely disable and re-enable xstream, before I can see any external made changes.

Yes, we need a ‘reload’ button for these sort of situations. Good that you worked it out anyway.

I wanna do some note splitting, I the way that for each num_notes on one col, it will be splitted to num_tracks/cols. E.g. having a mono 16th note track, settings 1,2, it should split the notes alternating. I want to do this for multiple vsti instancing, individual note panning.

Ahh, I see :slight_smile: Couldn’t really figure it out by just looking.

I thought all the Redux stuff will be in Renoise 3.1?

It’s pretty much the headline of that release: all of Redux will certainly belong to Renoise.

But maybe in a different way than you imagined.

Thx danoise, one more question:

How can I accessrenoise.song().selected_note_column_index from inside xstream?

Thx danoise, one more question:

How can I accessrenoise.song().selected_note_column_index from inside xstream?

The quick and dirty way is to replace ‘renoise.song()’ with ‘rns’ - it’s just a shortcut, you can access any song property from there.

And since you are using it offline, it should be safe enough to access it like this.

(for a more advanced approach suitable for realtime output, check out the ‘Args-Polling’ example model)

Thanks, updated code above.

I really hope not!

I see none of the things that are actually great about Redux! No note column names! No sliders for Volume, Pan, Delay!

But I do see that there is no accordion in the sampler anymore, which indeed means that it is not 3.0.

I am officially worried again!!! I thought all the Redux stuff will be in Renoise 3.1?

Maybe this is some of the earlier alpha builds?

Any “official” thoughts on that?

Regarding that video above: If someone reaches the one hour point, they are rewarded with something reminiscent of actual music.

Also, it could be turned into a drinking game:

If you take a hit every time I say “the thing is…”, you will be blasted quite quickly :smashed:

GAME ON!!!

I usually don’t tease with pre-announcements, but I could not sit on this: a major update is on its way.

I’ve basically explored the possibilities of Fsus4’s vision - having a grand “switchboard” for quick access to any of the xStream models.

screenshot-1.04c.png?raw=1

Edit: another screenshot - even more compact interface
screenshot-1.04d.png?raw=1

Or how about this one…
screenshot-1.04e.png?raw=1

You can think of that grid on the right side as ‘customizable shortcuts’, which will allow quick access to any model+preset combination with a single keystroke,
Workflow-wise, this is much better than having to (1) select a model, (2) find the right preset, and then (3) trigger the shortcut to “apply to pattern”

Right now, it’s using persistent storage - you can create models, presets and preset banks, and they will all load into the grid on startup.
But further down the line, xStream could support sessions - in which a particular grid would load up for a particular song.

Oh, and the grid ties really fine into live performances as well. Especially true, since the next version will have proper “scheduling” - switching is no longer done on a line-to-line basis, but can happen over the duration of a beat,bar,block or pattern.

Expect the next update to arrive in a couple of days

Any “official” thoughts on that?

Apparently not :frowning:

I usually don’t tease with pre-announcements, but I could not sit on this: a major update is on its way.

I’ve basically explored the possibilities of Fsus4’s vision - having a grand “switchboard” for quick access to any of the xStream models.

Edit: another screenshot - even more compact interface

Or how about this one…

You can think of that grid on the right side as ‘customizable shortcuts’, which will allow quick access to any model+preset combination with a single keystroke,

Workflow-wise, this is much better than having to (1) select a model, (2) find the right preset, and then (3) trigger the shortcut to “apply to pattern”

Right now, it’s using persistent storage - you can create models, presets and preset banks, and they will all load into the grid on startup.

But further down the line, xStream could support sessions - in which a particular grid would load up for a particular song.

Oh, and the grid ties really fine into live performances as well. Especially true, since the next version will have proper “scheduling” - switching is no longer done on a line-to-line basis, but can happen over the duration of a beat,bar,block or pattern.

Expect the next update to arrive in a couple of days

Wooow man, I can see why you couldn’t wait sharing… :smiley:

Everybody loves grids!!

But yeah, have been burning the midnight old oil for a few days now. Hopefully, the redesign will be worth it :slight_smile:

I usually don’t tease with pre-announcements, but I could not sit on this: a major update is on its way.

Lovely. Can’t wait to run this in 3.1. If there was an Oscar award forbest script, xStream woulddeserve it. A nice bonus effect is that people will use this tool and get sucked into Lua scripting as well. Anice and safeway to start experimenting.One idea here is to build another tool, based on xStream but rewritten to serve asan introduction to Renoise scripting, where each machine served as a mini tutorial.

Keep up the great work danoise, this tool isreally agame changer. :walkman:

A new version of xStream is out (supports Renoise 3.1). Get it here

As promised, the interface has been completely rewritten. It’s much more flexible now - won’t (necessarily) take up your entire screen :slight_smile:

screenshot-1.35-expanded.png?raw=1
#1: Expanded mode

screenshot-1.35-compact.png?raw=1
#2: Compact mode - still useful :slight_smile:

New features

  • Flexible GUI - collapse or expand any part of the interface - layout is stored/recalled across sessions.
  • Scheduling - switch models or presets on a line/beat/bar/block or pattern basis.
  • Favorites - a MIDI/key-mappable grid that contain shortcuts to any model/preset combination.
  • External preset banks - automatically saved and available on next xStream session - can be favorited too.
  • Cleaned up models, added a few new ones (Args-Control, Granular).
  • Dialog keyhandler - will handle certain keystrokes, pass the rest along to Renoise
    [Tab] = toggle expanded UI
    [Esc] = toggle Renoise edit mode
    [Space] = (re-)startstreaming + playback
    [’] = toggle mute
    A bit more about favorites
    Each shortcut you add to the grid can be set to a particular “launch mode”

AUTOMATIC - the default choice, will automatically decide output method:

  1. streaming output (when playing).
  2. apply to selection (when stopped, selection exists).
  3. apply to track (when stopped, no selection).

STREAMING - allow you to specify the scheduling method line/beat/bar/block or pattern

SELECTION - write output to the selected lines in the pattern-track,
allow you to specify whether output is relative to top of pattern or the selection itself.

TRACK -write output to entire pattern-track.

Issues (updated)

  • Deleting patterns while running the tool should no longer throw errors
  • In general, there should be less chance of user code to throw errors (increased number of protected calls)
  • Scheduling models should be working, but presets might miss a few lines to begin with. Also, scheduling near a boundary might cause the scheduling to miss - this is simply not done yet, but will be addressed in the next version.

Neat!

Forgot to add that all files are OVERWRITTEN when you install a Renoise tool.

So, if you’ve been cooking some models of your own, please take a backup of the “/models” folder before proceeding.

(a planned feature is the ability to import and export all customizations you’ve made…)

Also, arguments are specified a little differently in this version - a lot more straightforward, actually. See “Args-Controls” for an example of this.

Finally, I added a Granular model - it’s just using just pattern commands, but can really warp a sample beyond recognition :slight_smile:

WOW :dribble:

The minimized custom sized grid with presetbuttonsis totally awesome!! :drummer:

Well done danoise,the updated xStream just spiced up the 3.1 release even further. The midi routing stuff in 3.1 blew me away, so much fun there with lots of plugins. ButxStream filled the cool hightech spot for this release, thank you. :walkman:

New model: Exponential Delay (v1.31)
The famous bouncing ball and many other effects can be achieved with this one.

How to use: download and installxStream and then, from the model popup, select “Exponential Delay”
The model takes input from the the first note column and writes output to the following columns (see image)

model_expdelay.png?raw=1

  • Discovered a small bug which ignores the state of checkboxes when recalling presets - will fix.

HOWTO: download the file, paste into the xStream “models” folder and re/start tool