⇝ Renoise 3.5.4 and Redux 1.4.4 Bugfix Update

Download

The auto-updater options in Renoise and Redux also won’t pick up the new builds yet.
EDIT: all up to date now …

Fixes

Renoise: Linux

  • Linux: Audio worker threads (for multicore audio processing) did not use proper real-time priorities: Forum Link

Renoise: Lua API

  • Lua API: It’s now allowed to set “Renoise OSC Device” as MIDI input device for instruments: Forum Link
  • Lua API: NoteColumn and EffectColumn == and ~= returned a wrong result. Forum Link

Renoise & Redux: Phrase Scripts

  • Cycles: Fixed a bug which sometimes caused events to drop from the output of polyphonic patterns using , Github Link
  • Cycles: Fixed wrong behavior of overridden sample assignments Github Link
  • Cycles: note() now accepts number strings such as note("48") Github Link
  • table: table.tostring did not check for recursive table elements Github Link

Also pattrns.renoise.com playground now memorizes/restores script via an URL hash. This way you can create links to examples or custom scripts.

26 Likes

Thanks !

Also pattrns.renoise.com playground now memorizes/restores script via an URL hash. This way you can create links to examples or custom scripts.

Awesome ! I was wondering how to share some current experimentations.

edit: It seems I managed to break this feature

When I tried to paste the content of Renoise Pattrns script - ★ Melody Generator - "Exotic Scales + Renoise Scales" edition · GitHub in the playground, I got `Error: string contains an invalid character`. Nevertheless, it may be understandable, as I used unicode chars in this (big) script.

…Y..yay..:upside_down_face: Good to have bugfixes!

1 Like

Unicode characters in the script such as break this. Will fix that. Thanks.

1 Like

1 Like

Could be off-topic but I wanted to leave this somewhere. Thank you so much for everything you’ve done. Renoise has been a continued source of joy for me for over 10 years now and I am deeply grateful to everyone that was involved in its creation. Thank you, as well, for keeping it alive through bugfixes such as this one. I’m sure I’m not the only one who feels incredibly grateful for what Renoise has given them.

15 Likes

@Kristian_Amlie @taktik Sorry if I’m misunderstanding or mistaken.

When Renoise’s audio thread freezes, it seems to cause the OS to freeze as well.
Could it be that Renoise’s priority is set too high?

The following shell script appears to allow I to check the priority of real-time processes.
I found it here.
https://linuxmusicians.com/viewtopic.php?t=27121

#!/usr/bin/env bash
#
# script from Robbert Yabridge
#
# Some applications like to spawn high priority realtime threads. This can cause
# latency spikes during DAW usage.

thread_blacklist_re='^(webrtc_audio_mo|InotifyEventThr)$'
process_blacklist_re='^/usr/lib/(firefox|signal-)'

# To make it easier to see what's going on and which threads we're going to
# reschedule, we'll print all realtime threads with their thread names and the
# first part of their command, and we'll mark the threads we're going to
# reschedule.
realtime_threads=$(ps hxH -u "$USER" -o tid:30,rtprio:30,comm:30,command |
    # HACK: Since thread names can contain spaces and ps doesn't have a way to
    #       specify a delimiter, we'll hack around this a bit by making every
    #       every column fixed width and then manually adding tabs. This would
    #       have been neater with some proper parsing, but, oh well...
    #       We'll also truncate the last column for readability's sake.
    sed -E 's/^(.{30}) /\1\t/;
            s/(\t.{30}) /\1\t/;
            s/(\t.{30}) /\1\t/;
            s/  +//g;
            s/(\t[^ ]+)( [^\t]+)?$/\1/' |
    awk -F$'\t' '($2 >= 5) {
                    if ($3 ~ THREAD_RE || $4 ~ PROCESS_RE) { printf "x\t" } else { printf " \t" }
                    print $2 "\t" $1 "\t" $3 "\t" $4;
                  }' THREAD_RE="$thread_blacklist_re" PROCESS_RE="$process_blacklist_re" |
    column -ts$'\t')
need_rescheduling=$(echo "$realtime_threads" | awk '$1 == "x" { print $3 }')

echo "$realtime_threads"

if [[ -z $need_rescheduling ]]; then
    echo -e "\nNothing to do here, modify the blacklists if needed."
else
    echo -e "\nSetting all marked threads to SCHED_OTHER..."
    echo "$need_rescheduling" | xargs --no-run-if-empty -n1 chrt -po 0
fi

Running this makes it appear that Audio Slave has a higher priority than /usr/bin/pipewire. My naive guess is that this seems like it could be a problem, but what do you think?

$ rt-robbert.sh
   83  2831166  data-loop.0     renoise
   90  2831187  Audio Slave 01  renoise
   90  2831188  Audio Slave 02  renoise
   83  3124645  data-loop.0     mpv
   88  4084638  data-loop.0     /usr/bin/pipewire
   83  4084645  data-loop.0     /usr/bin/wireplumber
   83  4084637  data-loop.0     /usr/bin/pipewire-pulse
   83  4084828  data-loop.0     qjackctl

Nothing to do here, modify the blacklists if needed.
$ 
$ ulimit -r
98
$ 

@tkna: For me the priorities are back to what they were in Renoise 3.4. How the priority is calculated exactly, I do not know, since it is five levels below jack (jackd: 95, renoise: 90), but it’s in acceptable range I think. Only taktik can answer what the detailed logic is.

Is this a good way to display real-time threads? The ps options are complex and I don’t fully understand them, but I tried to use relatively straightforward options here.

ps -eLo rtprio,priority,pid,tid,user,comm,command | sort -r | $PAGER

Got it. Since assigning a value of -5 from pipewire seems to work fine for now, I’ll set up the Renoise startup script like this.

#!/bin/bash

if [ ! "$*" == "" ] ; then
    for i in "$@" ; do
        renoise $i &
        sleep 1
    done
else renoise &
fi

rtprio=$(expr $(ps -eLo rtprio,command  | grep /usr/bin/pipewire$ | grep -v "^ *-" | awk '{ print $1 }') - 5)

while ps -C renoise > /dev/null ; do
    ps -eLo tid,comm | grep "Audio Slave" | awk '{print $1}' | xargs -n1 -r chrt --fifo --pid $rtprio
    sleep 5
done

The main audio thread (created by Renoise when using ALSA) uses the highest possible RT priority. So does the MIDI output scheduler thread, because it is, well, also time-critical.

The audio worker threads use a slightly lower RT priority, so the MIDI scheduler can interrupt them if necessary.

It is unlikely to cause problems if the audio slaves have a higher priority than Pipewire, because the Pipewire thread (if I understand it’s role correctly) kicks off and then waits for the audio worker threads to finish their jobs. The worker threads don’t run constantly.

1 Like

Unicode characters in scripts should work now at https://pattrns.renoise.com/
You maybe need to force reload the page though…

2 Likes

I don’t have enough knowledge to fully understand it yet, but at least for general use, is that okay?
I often run 4 to 8 instances of Renoise during live performances, sometimes pushing the BPM and LPB to their limits and overworking them. Currently, Audio Slave seems to have a priority 5 lower than pipewire, and there don’t appear to be any issues with xrun or latency. So, just to be safe, I’ll try running it with the above shell script and see how it goes.

Awesome, thanks !

It may seem a small thing, but using special chars / glyphs in labels or lua tables / enums can really help the UX.

I’ll make a documentation pass on the pattrns scripts I use the most and will post them somewhere (where would it be appropriate, btw ?)

1 Like