Jump to content


Photo

New Tool (3.0,3.1): xStream

live coding sandbox

  • Please log in to reply
155 replies to this topic

#151 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1485 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted Today, 13:27

Sounds very promising. xLine is at the heart of xStream - it could indeed bring a lot of extra performance  :)

 

1) I assume that 90% of overhead is related to song() access and 10% to the classes/flexibility :) It seems that this can be optimized simply by modifying xLine.do_read and xLine.do_write, if I want to experiment?

 

2) Is your buffering-system a bottleneck in itself (using idle loop), or will the idle loop make the performance adapt? What I'm asking is if speed improvements will be noticable when stress testing, or if the 0.1s update frequency will work as some sort of constant, with the only variable being how many lines ahead are needed for reliable writing?

 

EDIT: Well, I can use the TRK button for measurements anyway.


Edited by joule, Today, 13:30.


#152 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6411 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted Today, 14:33

xLine.do_read and xLine.do_write, if I want to experiment?

 

Yes - but not quite that simple. If the xLine itself managed everything - note columns, effect columns and automation - it would be quite a monster class.

Instead, you want to look closer at xLinePattern (which really should be called xPatternLine, eheh...). This class deals with things that can be expressed through the pattern (basically the xLine without the automation envelope component). 

And if you keep following the breadcrumb trail, it will take you to xNoteColumn and xEffectColumn as well  :)

 

Together, those classes form a complete, 'virtual' representation of pattern data, without any references to renoise.song().

The purpose of the xNote/EffectColumn classes is also to accept both numbers and strings as input (number_string/amount_string), which is always stored internally in the class as a number (number_value, amount_value).

But with the optimization you have in mind, it might make sense to flip this around and make those classes prefer strings internally. Otherwise, there will be some unnecessary converting back and forth. 

 

Btw: I have just committed a few things on github to properly split the pending changes for the stacked model. 

The goal is simply for us to have a clean slate to work on. So master is now the current version of xStream (1.57) + some bugfixes I've committed in the meantime. 

I'm testing this a bit right now, to make sure I didn't accidentally break something...


Tracking with Stuff. API wishlist | Soundcloud


#153 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1485 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted Today, 16:03

I'm familiarizing myself with the structure.. I guess it would be fine to just hi-jack the xLinePattern.do_read() to start with.

 

By the way! When TRK-rendering a track with only one note column and 256 lines, the do_read() function is triggered 32896 times (checked with a global variable++). I also get the feeling that the number of times this function is executed is non-linear to the number of lines (136 times triggered on a 16 line pattern). I'm mentioning it if something really fishy is going on that takes up a lot of resources.



#154 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6411 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted Today, 16:35

I'm familiarizing myself with the structure.. I guess it would be fine to just hi-jack the xLinePattern.do_read() to start with

 

Sure, working on a single part should make it easier for both of us. 

 

 

By the way! When TRK-rendering a track with only one note column and 256 lines, the do_read() function is triggered 32896 times (checked with a global variable++).

 

Haha, that's a lot !!

But yes, there would be an overhead when streaming, because it reads lines multiple times to pick up "just in time" changes. 

But it shouldn't be *that* much, and not needed at all when applying to track ("offline mode"). So, yes, something's stinky in there. 

 

To be fair, I have deep-dived into the "xStreamBuffer" in the newer sources (the stacked model branch). So that one is already a lot more efficient in the whole input/output department. 

Guess I'll focus on that branch, and figure out how it can be merged nicely what you're bringing to the (lua) table  ;)


Tracking with Stuff. API wishlist | Soundcloud


#155 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1485 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted Today, 20:11

I think I managed so commit something on Github. It turns out the overhead of other stuff is a lot more than i expected, so the speed-up of do_read() is only 66% or so (depending on how many columns that are read).


Edited by joule, Today, 20:11.


#156 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6411 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted Today, 21:14

Merged !! 

66% faster is what I call a substantial speed-up. And nice and readable, too :-D

 

If you were expecting more, well, blame it on me. I will port some of my improvements over in the following days - 

that should prove especially beneficial for the offline mode ;)


Tracking with Stuff. API wishlist | Soundcloud






Also tagged with one or more of these keywords: live coding, sandbox