Crashing with duplex & homemade application

So.

This time I’ve made it with a Duplex application. Or this is what I suspect. My renoise crashes like so:

  1. I open renoise, have this Duplex folder as my duplex folder. (Dropbox link to a zip archive of my current Duplex tool folder) It contains for TouchOSC a new control map, a new configuration, and my guessed main offender; a new Duplex Application called VolPanDel.lua.**
  2. I open this song. 3753 MuBR4_4.xrns (Some other songs will crash with this behaviour too, but some others won’t… This one was short and had no external VSTs or VSTis)
  3. I press play.*
  4. When the song reaches the end of pattern and pattern would change, renoise crashes.

*My play is ‘space-bar’, will play from the start of the pattern, will have cursor follow on. IF I PLAY BY CLICKING WITH THE MOUSE FROM THE SEQUENCE LIST PLAY , I will not have pattern follow on and renoise will not crash.

**VolPanDel.lua is running by default when I open renoise.

More notes: I suspect this is related to my Duplex application because
a ) I’ve not seen anything like this with this or any other song before I started this wretched piece of code.
b )I already know My Duplex application is flawed. It will throw an error (sumthing about notifiers failing. again…) when renoise is loaded and one tries to change track. But it’s a clean error.
c ) Renoise will not crash if I first open the tool browser and disable Duplex altogether.

Are there T-shirts up for grabs for people crashing officially released renoise versions with say, 10 or so different methods? ^_^

Well, haven’t actually confirmed the bug here, but props for discovering another one - crash bugs needs to be squashed!!

But when you are saying some things are flawed in the application, what exactly are you thinking about?
I’m thinking perhaps you are doing something in an unexpected way, which is why the bug hasn’t been discovered… and this time, I haven’t had the time to look into the actual code

Hey, not a bad idea. A special 10xBUG combo edition

Oh. Do you get the error message, still? Wait, let me get that one more time…

  
*** ./Duplex/Applications/VolPanDel.lua:264: attempt to index local 'self' (a nil value)  
*** stack traceback:  
*** ./Duplex/Applications/VolPanDel.lua:264: in function <.><br>
<br>```

<br>
Ok. Seems that one actually was NOT about notifiers. But it's triggered by one so, well. Got confused.<br>
<br>
[quote="danoise, post:2, topic:37524"]<br>
But when you are saying some things are flawed in the application, what exactly are you thinking about? <br>
I'm thinking perhaps you are doing something in an unexpected way, which is why the bug hasn't been discovered... and this time, I haven't had the time to look into the actual code <br>[/quote]<br>
<br>
I'm probably doing something in an unexpected way. I'm not sure what the expected way would be, though, so it's hard to say.. <img src="https://files.renoise.com/forum/emoticons/default/smile.gif" class="bbc_emoticon" alt=":)">/&gt;/&gt;/&gt;/&gt;/&gt; I am a bit confused about the error message. It pops up in the scenario where I open renoise and then change track. It does not for instance repeat itself after a tool reload. It's a one-shot. It seems to kill VolPanDel, but Duplex still runs. Don't know if this is to be expected.<br>
<br>
And I can't figure out what's going on with the error. I just don't get it. It's coming from a function VolPanDel:update_faders() that's supposed to update the Duplex faders. (I remember I've got it working for a while, but then all went all mad again). It would seem to me that the VolPanDel object ("method" of which the VolPanDel:update_faders() -function IS) is nil. Can't figure out how or why but so it seems. <img src="https://files.renoise.com/forum/emoticons/default/wacko.gif" class="bbc_emoticon" alt=":wacko:">/&gt;/&gt;/&gt;/&gt;/&gt; Maybe I'm just missing something totally obvious here...<br>
<br>
--EDIT<br>
<br>
Yeah, also: my renoise WON'T crash if when starting renoise I on purpose change the track and get the error message (killing VolPanDel). So if somehow turns out the culprit's not actually VolPanDel, I'd be really surprised. ..<br>
<br>
--EDIT<br>
<br>
LOGS AHEAD:<br>
<br>
yeah. didn't work. gonna try attaching.<br>
<br>
Ok. Gonna try stripping the log and pasting again.<br>
<br>

[details="Click to view contents"]

<br>

```<br><br>
============================================================<br>
Version : Renoise V2.8.1 (Aug 15 2012)<br>
Date : 2012-11-14<br>
Time : 00:46:08<br>
OS : Mac OS X 10.8.2 (i386)<br>
============================================================<br>
<br>
CPU: Found 2 enabled unit(s) with 1 core(s) / 1 logical processor(s) per unit. 2 cores, 2 logical processors are enabled in total.<br>
<br>
Application: Showing the splash window...<br>
Application: Initializing the API...<br>
<br>
Graphport: Initializing Freeimage...<br>
<br>
GraphPort: Initializing the Font Engine...<br>
<br>
CoreAudio: Enumerating devices...<br>
CoreAudio: ======== device enumeration: 1 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: Apple Inc.: Built-in Input<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of input channels: 2<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: Apple Inc.: Built-in Input<br>
CoreAudio: GetStreamFormat FAILED<br>
CoreAudio: ======== device enumeration: 2 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: Apple Inc.: Built-in Output<br>
CoreAudio: GetStreamFormat FAILED<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: Apple Inc.: Built-in Output<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of output channels: 2<br>
CoreAudio: ======== device enumeration: 3 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: Apple Inc.: HDMI<br>
CoreAudio: GetStreamFormat FAILED<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: Apple Inc.: HDMI<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of output channels: 2<br>
CoreAudio: ======== device enumeration: 4 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: Apple Inc.: HDMI<br>
CoreAudio: GetStreamFormat FAILED<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: Apple Inc.: HDMI<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of output channels: 2<br>
CoreAudio: ======== device enumeration: 5 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: M-Audio, Inc.: M-Audio Fast Track<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of input channels: 2<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: M-Audio, Inc.: M-Audio Fast Track<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of output channels: 2<br>
CoreAudio: ======== device enumeration: 6 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: ma++ ingalls for Cycling '74: Soundflower (2ch)<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of input channels: 2<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: ma++ ingalls for Cycling '74: Soundflower (2ch)<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of output channels: 2<br>
CoreAudio: ======== device enumeration: 7 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: ma++ ingalls for Cycling '74: Soundflower (16ch)<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 64<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 64<br>
CoreAudio: Channels per frame: 16<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 16<br>
CoreAudio: Size in bytes: 32768<br>
CoreAudio: Total number of input channels: 16<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: ma++ ingalls for Cycling '74: Soundflower (16ch)<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 64<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 64<br>
CoreAudio: Channels per frame: 16<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 16<br>
CoreAudio: Size in bytes: 32768<br>
CoreAudio: Total number of output channels: 16<br>
CoreAudio: ======== device enumeration: 8 of 8 ========<br>
CoreAudio: <br>
CoreAudio: --- Device Input information ---<br>
CoreAudio: Driver name: ma++ ingalls for Cycling '74: Greatdy System Audio<br>
CoreAudio: SampleRate: 44100.000000<br>
CoreAudio: mFormatID: 'mcpl'<br>
CoreAudio: Flags: 0x 9<br>
CoreAudio: Bytes per packet: 8<br>
CoreAudio: Frames per packet: 1<br>
CoreAudio: Bytes per frame: 8<br>
CoreAudio: Channels per frame: 2<br>
CoreAudio: Bits per channel: 32<br>
CoreAudio: Device audio buffers:<br>
CoreAudio: Number of buffers: 1<br>
CoreAudio: -- Buffer 0 --<br>
CoreAudio: Number of channels: 2<br>
CoreAudio: Size in bytes: 4096<br>
CoreAudio: Total number of input channels: 2<br>
CoreAudio: <br>
CoreAudio: --- Device Output information ---<br>
CoreAudio: Driver name: ma++ ingalls for Cycling '74: Greatdy System Audio<br>
CoreAudio: GetStreamFormat FAILED<br>
<br>
CoreMIDI: Creating client 'Renoise'...<br>
CoreMIDI: Creating an input port...<br>
CoreMIDI: Creating an output port...<br>
CoreMIDI: Creating a virtual input port...<br>
CoreMIDI: Enumerating devices...<br>
CoreMIDI: Adding input device 'IAC-ohjain (VŠylŠ 1)'<br>
CoreMIDI: Adding input device 'Verkko (Ipad)'<br>
CoreMIDI: Adding output device 'IAC-ohjain (VŠylŠ 1)'<br>
CoreMIDI: Adding output device 'Verkko (Ipad)'<br>
<br>
ReWire Slave: ReWire shared library is already installed and up to date...<br>
ReWire Slave: ReWire slave engine is already installed and up to date...<br>
ReWire Slave: ReWire Panel was initialized...<br>
ReWire Slave: ReWire Slave mode failed to init (no master is running)...<br>
<br>
ReWire Master: Successfully opened<br>
<br>
Application: Start running...<br>
Application: Loading the preferences...<br>
<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Auto-ExtendSamplelist.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Autoselectsinglelinemode.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.BatchEditName.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Colormate.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Cursortweaks.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Devicekeynavigator.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Displayactiveclipboard.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Dummyguiforomnikeyclass.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Editsteptweaks.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.FlipSampleList.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.I_s_selectdummytool.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.InsertEmptyClone.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.IrGrabber.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.LoopPatternSelection.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.PatternEditorShortcut.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Patterntrim.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.SamplelistKeybinds.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Searchtoolkeybindssinechar.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Shortcutwizard.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.Sketch.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.vader.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.kmaki.VelocityLayerer.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ __MyTools__ /com.renoise.Freesound.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/AS.Beatslaughter.MixerUtilities.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.bystrano.AutoClonePatterns.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.kibiger.ReNoam.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.mxb.FileFormats.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.mxb.ReSynth.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.nisanmol.AutomationCleaner.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.CreateTool.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.CustomPatternNavigation.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.Duplex.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.EpicArpeggiator.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.FindAndReplace.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.GridPie.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.IRCclient.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.Nibbles.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.NotesRandomizer.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.PatternRotate.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.PatternSplitPlus.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.Rubberband.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.SampleMorpher.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.ToggleDSPs.xrnx/'...<br>
<br>
Exception: The XML file '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.ToolUpdater.xrnx/manifest.xml' does not exist!<br>
Exception: The XML file '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.UpdateChecker.xrnx/manifest.xml' does not exist!<br>
<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/cortex.scripts.CaptureOctave.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/de.airmann.AutoColors.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/dk.bladre.Marks.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/dot.dotdot.AutomationMate.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/joule.no0b.AliasIdenticalTracks.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/joule.no0b.CollapseEmptyTracks.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/joule.no0b.MoveDeviceChain.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/joule.no0b.OrganizeInstruments.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ledger.scripts.ConvertInstrumentNumber.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ledger.scripts.NoteOffTool.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/ledger.scripts.SearchTrack02.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/net.artfwo.NoiseReduction.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/net.syflom.BlockLoopSize.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/nl.jeweett.InstrMixer_ok.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/nl.jeweett.SliceMaster.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/org.illformed.AutomationFromNotes.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/org.illformed.DefaultWindowPreset.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/Tools/com.renoise.ToolUpdater.xrnx/'...<br>
ScriptingTools: Initializing Scripting Tool: '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/Tools/com.renoise.UpdateChecker.xrnx/'...<br>
<br>
Application: Init...<br>
<br>
DspDevices: Registering native DSP effects...<br>
DspDevices: Registering native plugin DSP effects...<br>
<br>
Audio Plugins: Searching for VST plugins in '/Library/Audio/Plug-Ins/VST/'<br>
Audio Plugins: Searching for VST plugins in '/Users/samppahannikainen/Library/Audio/Plug-Ins/VST/'<br>
<br>
CoreAudio: Using SampleRate 44100 (requested: 44100)...<br>
CoreAudio: Output device buffer size: 448<br>
CoreAudio: Intput device buffer size: 448<br>
CoreAudio: Outtput device extra latency frames: 70<br>
CoreAudio: Intput device extra latency frames: 70<br>
CoreAudio: Using Latency 10.158731 - MaxBufferFrameSize: 448 (requested latency 10.158731)...<br>
CoreAudio: Opening Capture Device 1 'M-Audio, Inc.: M-Audio Fast Track' (1 Stereo Channels)...<br>
CoreAudio: Opening Playback Device 3 'M-Audio, Inc.: M-Audio Fast Track' (1 Stereo Channels)...<br>
CoreAudio: Enumerating Input Channel Names...<br>
CoreAudio: Input ChannelName 0 failed (not supported)<br>
CoreAudio: Enumerating Output Channel Names...<br>
CoreAudio: Output ChannelName 0 failed (not supported)<br>
CoreAudio: Allocating Input Buffers...<br>
CoreAudio: Allocating Output Buffers...<br>
CoreAudio: Output IOProc was successfully installed...<br>
CoreAudio: Starting Device M-Audio, Inc.: M-Audio Fast Track...<br>
CoreAudio: Output Device is up and running...<br>
CoreAudio: Up and running<br>
<br>
CoreMIDI: Trying to open the input device 'Verkko (Ipad)'<br>
CoreMIDI: Successfully opened device 'Verkko (Ipad)'<br>
<br>
Application: Loading the template document...<br>
<br>
MIDI: Loading MIDI actions from file '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/GlobalMidiActions.lua'...<br>
<br>
Osc: Loading OSC actions from file '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/GlobalOscActions.lua'...<br>
<br>
Player: Constructing...<br>
Player: Creating the slave threads...<br>
Player: Start running...<br>
<br>
GUI: Creating the Document GUI...<br>
GUI: Successfully constructed<br>
<br>
GraphPort: Initializing in WindowedMode<br>
GraphPort: Successfully initialized<br>
<br>
Application: Init OK<br>
Application: Enter MainLoop...<br>
<br>
Application: Releasing the old document...<br>
<br>
MIDI: Loading MIDI actions from file '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/GlobalMidiActions.lua'...<br>
<br>
Osc: Loading OSC actions from file '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/GlobalOscActions.lua'...<br>
<br>
Player: Constructing...<br>
Player: Creating the slave threads...<br>
Player: Start running...<br>
<br>
GUI: Creating the Document GUI...<br>
GUI: Successfully constructed<br>
<br>
Application: Loading 'MuBR4_4.xrns'...<br>
<br>
MIDI: Loading MIDI actions from file '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/GlobalMidiActions.lua'...<br>
<br>
Osc: Loading OSC actions from file '/Applications/Renoise_2_8_1.app/Contents/Resources/Scripts/GlobalOscActions.lua'...<br>
<br>
Player: Constructing...<br>
Player: Creating the slave threads...<br>
Player: Start running...<br>
<br>
GUI: Creating the Document GUI...<br>
GUI: Successfully constructed<br>
<br>
Application: Successfully loaded 'MuBR4_4.xrns'.<br>
<br>
ScriptingEngine: ./Duplex/Applications/VolPanDel.lua:264: attempt to index local 'self' (a nil value)<br>
stack traceback:<br>
	./Duplex/Applications/VolPanDel.lua:264: in function <.><br>
<br>
<br>
Error Message: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/Scripts/Tools/com.renoise.Duplex.xrnx/main.lua' failed in one of its notifiers.<br>
Error Message: The notifier will be disabled to prevent further errors.<br>
Error Message: Please contact the author (danoise [bjorn.nesby@googlemail.com]) for assistance...<br>
Error Message: ./Duplex/Applications/VolPanDel.lua:264: attempt to index local 'self' (a nil value)<br>
Error Message: stack traceback:<br>
Error Message: ./Duplex/Applications/VolPanDel.lua:264: in function <.><br>
<br>
CrashLog: 0 libsystem_c.dylib 0x9a4d486b _sigtramp + 43<br>
CrashLog: 1 ??? 0xffffffff 0x0 + 4294967295<br>
CrashLog: 2 Renoise 0x00cc1f2b Renoise + 13373227<br>
CrashLog: 3 Renoise 0x00ab8bf5 Renoise + 11238389<br>
CrashLog: 4 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 5 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 6 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 7 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 8 Renoise 0x00ab8c65 Renoise + 11238501<br>
CrashLog: 9 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 10 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 11 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 12 Renoise 0x00a8c2fd Renoise + 11055869<br>
CrashLog: 13 Renoise 0x00abc064 Renoise + 11251812<br>
CrashLog: 14 Renoise 0x005bdd49 Renoise + 6016329<br>
CrashLog: 15 Renoise 0x005bda87 Renoise + 6015623<br>
CrashLog: 16 Renoise 0x005be87f Renoise + 6019199<br>
CrashLog: 17 Renoise 0x00abcda7 Renoise + 11255207<br>
CrashLog: 18 Renoise 0x00a6447d Renoise + 10892413<br>
CrashLog: 19 Renoise 0x00a661d8 Renoise + 10899928<br>
CrashLog: 20 Renoise 0x00a674f6 Renoise + 10904822<br>
CrashLog: 21 Renoise 0x004924b9 Renoise + 4789433<br>
CrashLog: 22 Renoise 0x004aa540 Renoise + 4887872<br>
CrashLog: 23 Renoise 0x00182fef Renoise + 1581039<br>
CrashLog: 24 Renoise 0x0051dc76 Renoise + 5360758<br>
CrashLog: 25 Renoise 0x004fdb93 Renoise + 5229459<br>
CrashLog: 26 Renoise 0x0068186c Renoise + 6817900<br>
CrashLog: 27 Renoise 0x004fdb93 Renoise + 5229459<br>
CrashLog: 28 Renoise 0x00683229 Renoise + 6824489<br>
CrashLog: 29 Renoise 0x001864d1 Renoise + 1594577<br>
CrashLog: 30 Renoise 0x00ab7da7 Renoise + 11234727<br>
CrashLog: 31 Renoise 0x00abc04a Renoise + 11251786<br>
CrashLog: 32 Renoise 0x005bdd62 Renoise + 6016354<br>
CrashLog: 33 Renoise 0x00559223 Renoise + 5603875<br>
CrashLog: 34 Renoise 0x0059c840 Renoise + 5879872<br>
CrashLog: 35 Foundation 0x9673c7d4 __NSFireTimer + 117<br>
CrashLog: 36 CoreFoundation 0x94c179b6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22<br>
CrashLog: 37 CoreFoundation 0x94c17355 __CFRunLoopDoTimer + 709<br>
CrashLog: 38 CoreFoundation 0x94bfc162 __CFRunLoopRun + 1730<br>
CrashLog: 39 CoreFoundation 0x94bfb63a CFRunLoopRunSpecific + 378<br>
CrashLog: 40 CoreFoundation 0x94bfb4ab CFRunLoopRunInMode + 123<br>
CrashLog: 41 HIToolbox 0x9104915a RunCurrentEventLoopInMode + 242<br>
CrashLog: 42 HIToolbox 0x91048ec9 ReceiveNextEventCommon + 374<br>
CrashLog: 43 HIToolbox 0x91048d44 BlockUntilNextEventMatchingListInMode + 88<br>
CrashLog: 44 AppKit 0x99800a3a _DPSNextEvent + 724<br>
CrashLog: 45 AppKit 0x9980026c -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119<br>
CrashLog: 46 AppKit 0x997f66cc -[NSApplication run] + 855<br>
CrashLog: 47 Renoise 0x0059bf6a Renoise + 5877610<br>
CrashLog: 48 Renoise 0x0056e3a5 Renoise + 5690277<br>
CrashLog: 49 Renoise 0x0004f4d5 Renoise + 320725<br>
CrashLog: 50 Renoise 0x00491e4c Renoise + 4787788<br>
CrashLog: 51 Renoise 0x00019026 Renoise + 98342<br>
CrashLog: 52 Renoise 0x00018f4d Renoise + 98125<br>
<br>
Application: Caught an unhandled exception (Thread: GUI)!<br>
Application: Saving a backup...<br>
<br>
Error Message: A fatal error or crash occurred (unhandled exception in thread: GUI).<br>
Error Message: A backup of the current document was saved at<br>
Error Message: '/Users/samppahannikainen/Library/Preferences/Renoise/V2.8.1/CrashBackups/MuBR4_4_11_14_2012__0_46_crash.xrns'...<br>
Error Message: This either happened because of a bug in Renoise, or because of a bug in one of its loaded components (plugins). Please contact <bug> and report this problem, so that it can be fixed.<br>
Error Message: Note: It's very important that we know exactly what has happened (what you were doing before this message popped up), or the problem cannot be replicated/analyzed. Please include a description of what you were doing and which components were being used...<br>
<br>
CrashLog: 0 libsystem_c.dylib 0x9a4d486b _sigtramp + 43<br>
CrashLog: 1 ??? 0xffffffff 0x0 + 4294967295<br>
CrashLog: 2 AppKit 0x99808b13 -[NSWindow _commonAwake] + 754<br>
CrashLog: 3 AppKit 0x997c5a77 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 1652<br>
CrashLog: 4 AppKit 0x997c4b3f -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1063<br>
CrashLog: 5 AppKit 0x997c4704 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 70<br>
CrashLog: 6 Renoise 0x005e0aa4 Renoise + 6159012<br>
CrashLog: 7 Renoise 0x005ae879 Renoise + 5953657<br>
CrashLog: 8 Renoise 0x005af475 Renoise + 5956725<br>
CrashLog: 9 Renoise 0x005b0ca8 Renoise + 5962920<br>
CrashLog: 10 Renoise 0x005be88e Renoise + 6019214<br>
CrashLog: 11 Renoise 0x00abcda7 Renoise + 11255207<br>
CrashLog: 12 Renoise 0x00a6447d Renoise + 10892413<br>
CrashLog: 13 Renoise 0x00a661d8 Renoise + 10899928<br>
CrashLog: 14 Renoise 0x00a674f6 Renoise + 10904822<br>
CrashLog: 15 Renoise 0x004924b9 Renoise + 4789433<br>
CrashLog: 16 Renoise 0x001a7b5b Renoise + 1731419<br>
CrashLog: 17 Renoise 0x004a0ca1 Renoise + 4848801<br>
CrashLog: 18 Renoise 0x0055b9d0 Renoise + 5614032<br>
CrashLog: 19 Renoise 0x0055c202 Renoise + 5616130<br>
CrashLog: 20 libsystem_c.dylib 0x9a4d486b _sigtramp + 43<br>
CrashLog: 21 ??? 0xffffffff 0x0 + 4294967295<br>
CrashLog: 22 Renoise 0x00cc1f2b Renoise + 13373227<br>
CrashLog: 23 Renoise 0x00ab8bf5 Renoise + 11238389<br>
CrashLog: 24 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 25 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 26 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 27 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 28 Renoise 0x00ab8c65 Renoise + 11238501<br>
CrashLog: 29 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 30 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 31 Renoise 0x00ab8c1e Renoise + 11238430<br>
CrashLog: 32 Renoise 0x00a8c2fd Renoise + 11055869<br>
CrashLog: 33 Renoise 0x00abc064 Renoise + 11251812<br>
CrashLog: 34 Renoise 0x005bdd49 Renoise + 6016329<br>
CrashLog: 35 Renoise 0x005bda87 Renoise + 6015623<br>
CrashLog: 36 Renoise 0x005be87f Renoise + 6019199<br>
CrashLog: 37 Renoise 0x00abcda7 Renoise + 11255207<br>
CrashLog: 38 Renoise 0x00a6447d Renoise + 10892413<br>
CrashLog: 39 Renoise 0x00a661d8 Renoise + 10899928<br>
CrashLog: 40 Renoise 0x00a674f6 Renoise + 10904822<br>
CrashLog: 41 Renoise 0x004924b9 Renoise + 4789433<br>
CrashLog: 42 Renoise 0x004aa540 Renoise + 4887872<br>
CrashLog: 43 Renoise 0x00182fef Renoise + 1581039<br>
CrashLog: 44 Renoise 0x0051dc76 Renoise + 5360758<br>
CrashLog: 45 Renoise 0x004fdb93 Renoise + 5229459<br>
CrashLog: 46 Renoise 0x0068186c Renoise + 6817900<br>
CrashLog: 47 Renoise 0x004fdb93 Renoise + 5229459<br>
CrashLog: 48 Renoise 0x00683229 Renoise + 6824489<br>
CrashLog: 49 Renoise 0x001864d1 Renoise + 1594577<br>
CrashLog: 50 Renoise 0x00ab7da7 Renoise + 11234727<br>
CrashLog: 51 Renoise 0x00abc04a Renoise + 11251786<br>
CrashLog: 52 Renoise 0x005bdd62 Renoise + 6016354<br>
CrashLog: 53 Renoise 0x00559223 Renoise + 5603875<br>
CrashLog: 54 Renoise 0x0059c840 Renoise + 5879872<br>
CrashLog: 55 Foundation 0x9673c7d4 __NSFireTimer + 117<br>
CrashLog: 56 CoreFoundation 0x94c179b6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22<br>
CrashLog: 57 CoreFoundation 0x94c17355 __CFRunLoopDoTimer + 709<br>
CrashLog: 58 CoreFoundation 0x94bfc162 __CFRunLoopRun + 1730<br>
CrashLog: 59 CoreFoundation 0x94bfb63a CFRunLoopRunSpecific + 378<br>
CrashLog: 60 CoreFoundation 0x94bfb4ab CFRunLoopRunInMode + 123<br>
CrashLog: 61 HIToolbox 0x9104915a RunCurrentEventLoopInMode + 242<br>
CrashLog: 62 HIToolbox 0x91048ec9 ReceiveNextEventCommon + 374<br>
CrashLog: 63 HIToolbox 0x91048d44 BlockUntilNextEventMatchingListInMode + 88<br>
CrashLog: 64 AppKit 0x99800a3a _DPSNextEvent + 724<br>
CrashLog: 65 AppKit 0x9980026c -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119<br>
CrashLog: 66 AppKit 0x997f66cc -[NSApplication run] + 855<br>
CrashLog: 67 Renoise 0x0059bf6a Renoise + 5877610<br>
CrashLog: 68 Renoise 0x0056e3a5 Renoise + 5690277<br>
CrashLog: 69 Renoise 0x0004f4d5 Renoise + 320725<br>
CrashLog: 70 Renoise 0x00491e4c Renoise + 4787788<br>
CrashLog: 71 Renoise 0x00019026 Renoise + 98342<br>
CrashLog: 72 Renoise 0x00018f4d Renoise + 98125<br>
<br>
ReWire Slave: FAILED to close the ReWire Panel API (caught fatal exception)!<br>
ReWire Slave: ReWire Panel FAILED to close (Error: 666)<br>
<br>
ReWire Master: FAILED to query close ReWire Master OK (caught fatal exception)!<br>
ReWire Master: Close FAILED (ReWire is not ready to be closed)...<br>
<br>
CoreAudio: Stopping Device 'M-Audio, Inc.: M-Audio Fast Track'...<br>
CoreAudio: Releasing Device 'M-Audio, Inc.: M-Audio Fast Track'...<br>
CoreAudio: Device is down<br>
<br>
MIDI: Shut down: Closing all acquired MIDI devices...<br>
<br>
Closing log file...<br>
<br>
<br>
<br>
<br>
<br>
<br>```

<br>

[/details]

</bug></.></.></.>

OK a quick glance at the log file reveal that something is up with the use of the variable “self”

Error Message: ./Duplex/Applications/VolPanDel.lua:264: attempt to index local 'self' (a nil value)  

So I looked for the line in the application - this is what it looks like (of course, you already know about this, but if someone else is reading too…)

  
function VolPanDel:update_faders()  
 local faders = {  
 [1] = "pan",  
 [2] = "vol",  
 [3] = "del"  
 }  
  
 oprint(self)  
  
 for index, value_type in pairs(faders) do  
 local fader_name = "_"..value_type.."f" --e.g. "_panf"  
 local c = self[fader_name]  
 --print("updating "..value_type)  
 c.value = self.get_value(value_type) or 0 --c.value  
 c:force_update()  
 end  
end  
  

There’s some lua terms being mixed together here, let me try and clarify.

“self” is basically lua’s way of telling that you’re addressing the class itself - think about the class as a great big table of values (because, in lua that is what a class is)

When you create the table holding the values, you are using the prefix “local” to avoid having to use the class.
This is good for several reasons: most often local variables (in this case, a table) both lead to faster code execution,
and you don’t have to add each and every variable you use in the application to the class itself. You are already doing this right in several other places.

(1) The error is thrown since you are iterating through a local variable, but the value is already made available to you through the iterator

  
local faders = {"pan","vol","del"}  
for k,v in ipairs(faders) do  
 print(k,v)  
end  
  

This will output

  
1 pan  
2 vol  
3 del  
  

(note that I don’t assign an index to the entries in the table?
This is not needed, as lua tables cannot contain gaps, they are always numbered consecutively, 1,2,3,4…)

(2) A few lines later, I can see that you’re calling self.get_value, I can tell you this will fail too, but it’s easy to fix. Just add a colon like this: self:get_value
Again, this is because lua is a little different when you’re writing for classes and not just plain functions.

(3) No need for the “do” statement in build_app - it might not be obvious, but build_app is automatically being invoked by the class you are extending, Application

A good practice would to only add the variables that need to be present throughout the time the application is running - in your case, it could be “last_update_at”
You can define those class variables in the __init method, this is the special method being called once the class is initialized -

Hope this helps :slight_smile:

Thanks for the swift reply. It’s excellent to get this kind of support for a program! I don’t think it gets mentioned enough so just getting that out. Now, for the issues:

I feel that I’ve got the main idea about classes, but since all this lua-renoise-tool-business as a whole IS my first dive into oo-programming, its very possible I’ve got some misunderstandings on the subject. Hope I’ll get the hang of it. But, yes, I still don’t get where the error comes from. I feel it’s something obvious but I just can’t see it.

On the ‘self’ and classes, wouldn’t that be that ‘self’ actually references to an object instance of that class? If not, maybe that’s something I’ve misunderstood… (BTW I’m under the impression that Lua is probably not the ‘golden standard’, when it comes to oo, classes and stuff like that. But I’m really fond of Lua’s flexibility. I’ve gathered the whole classes-thing is just an ‘Lua implementation’ on the subject, and it does not exist natively in Lua?)

Okay. I feel the answer is here. Somewhere. I’ll just have to bend my mind a little. (Well for starters, yep, I knew about the no-gaps, ‘auto-indexed’ tables. I’m not entirely sure why I chose to declare the table the way I did… I’m sure there was some reason. Or then it was just some weird illogical idea. But I think the main thing I don’t get in your reply here is: what is this local variable I’m iterating through, that is provided by the iterator? If I’ll get that, I think I’ll crack this nut.

For some background on the application: I’ve (well, think I’ve) stored pointers to the Duplex UISlider -components in the class(or the object instance of it) at creation time. These pointers (I think…) reside at my_volpandelobject._panf, my_volpandelobject._delf, my_volpandelobject_volf. (Substitute “my_volpandelobject” with whatever Duplex adresses it when creating the application) These are the pointers I’m trying to issue a ‘force_update()’ through. As I look at my code, I don’t see exactly why I’ve chosen to go over them by iteration. I think I could’ve simply used something like:

  
function VolPanDel:update_faders()  
  
 self._panf.value = self:get_value("pan") or 0  
 self._panf:force_update()  
  
 self._volf.value = self:get_value("vol") or 0  
 self._volf:force_update()  
  
 self._delf.value = self:get_value("del") or 0  
 self._delf:force_update()  
  
end  
  

This is SO much less obfuscated and tells much better what I’m actually trying to do with the function. 1)read current note’s pan/vol/del value from the note column into the UISlider’s ‘value’-field. 2)Update the UISlider according to the value. Now whether this is the right way to do it, I’m not sure. I don’t know. But this is what I’m trying to do with the function. Maybe this is where I’m doing something unexpected…?

I don’t get what exactly is going wrong with the (admittedly obfuscated) iteration method, though. As I see it, I’m just trying to do this:

  
self._delf:force_update()  
  

But I’m doing it like this:

  
local pointer="_delf"  
self[pointer]:force_update()  
  

Is this not the same thing? And I’m really baffled at why the “self” is nil.

Yep… that’s a miss for me. If I’ve understood correctly, that could also work with: self.get_value(self, value_type), no? Or that self:get_value(value_type) is actually analoguous to self.get_value(self, value_type). Again, not sure, but this is how I think it goes…?

Ah, yes, those. Those are there PURELY for the sake of auto-indetation and indentation based code folding in Vim. Wrapping the long, tedious block into do-end chunk makes it auto-indent nicely. Actually, I’ve used it when defining classes too. I know that class functions (since they are by nature global ones) can be declared anywhere in the code, but it’s nice to keep them organized under the class declaration. So I’ve done something like this:

  
class "MyMegaClass"  
do  
 function MyMegaClass:__init()  
 ...blah  
 end  
 function MyMegaClass:do_something()  
 ...blargh  
 end  
 ...etc  
end  
  

which indents AND most importantly FOLDS in Vim nicely. I gather since the functions are global it’s not a big deal to wrap them in a do-end chunk.

Ah, you mean in the class (or object instance). Yes. I’ll check what’s going on with that, don’t exactly remember everything I added in there. But I think pointers to the UISlider-components fall into this category? Or is there some other method of accessing them? I’m not very educated in the matters of Duplex, I’m afraid…

Always! But I still don’t understand the error message properly… :mellow:/>/>/> Hope the bug gets sorted out. Any luck crashing?

Absolutely, yes - on reading my reply, I can see I was being unclear.
“self” is lua’s oo way of referencing to a class property/method from “within”, other languages have the similar notion of “this”.
To access a variable from the “outside” (a static property), you would write VolPanDelay.my_property_name (this is how the default options, mappings etc. are defined in most of my applications)

Yes, the lua language is not oo as such, but we are fortunate enough to have a lua runtime which has the basics covered thanks to the compiled-in luabind module :slight_smile:

Tell me about it. Sometimes, I work with several languages in a day. Can make your head spin

The pointer will become nil only if you are calling the method statically - as in, from the “outside”…
I guess theoretically, they are the same, but the first example is just so much easier to read.

Indeed. It’s a matter of taste which one you prefer, the only exception being when you need to address the superclass (the class you are extending).

For example, this is how the Application is started from the similarly named method in your script:

Application.start_app(self)  

Without the “self”, the Application would be called statically, and our VolPanDelay properties and methods would not be carried over.

If you are doing things “neatly”, you want to define your properties (class variables) in the __init method. But lua will allow you to define them at any point,
and not complain if you decide to define “self.my_class_variable” at a later point - it’s just a matter of preference really.

Sure, it’s a lot to chew on when moving into application-writing territory but the Application class is designed to be fairly simple, and allow you to focus on the logic.
Most of the complexity in Duplex deals with external communication with OSC, MIDI devices. The framework tries to hide that part, as it quickly can get messy

But do check out the sample luabind code provided on the Rasterbar website, and (if you haven’t already done so), the very basic Metronome application sample.

Hello,

First, sorry for the quality of my English. Sorry for my incompetence in programming. Thank to the developers of Renoise and duplex these programs are excellent.
I post in this topic cause i think that my question is related to UiSlider values update.
I have a BCR-2000 and I tried to change sequencer.lua for use with, i have change a bit the behavior of the application.
This works quite well with two BCR-2000 in chain, it makes a 16-step sequencer.
changes:
-Line-level displays the edited line not the played line.
When a step is pressed, the edited line goes to this position, allowing for example to change the note with a keyboard in rec mode.
But this change create bad behavior when changing page, it automatically returns to the page that contains the edit step.
-The buttons are added to navigate through the lines or change the note of the step.
But a button increase the value and the other decrease it. And the values are not updated on sliders when they are changed in Renoise, so not very good.
-The note transpose buttons can go to value 120 note off, 121 clear note.
-I tried to create a line of slider as the line of steps to change the notes.
-I change that “bring focus to track” work when i hold keys, before this change it send to the track one and made it impossible to hold step buttons.
The biggest problem of all this is that I am not programmer and I’m not sure of what i did.
What i would like to improve but I do not understand at all:
-Update values of sliders
-Turn in a direction to increase their value, and the other way to decrease.

I have looked at the forums comparing with other applications. But i can’t understand how to do. This makes it all this change less interesting.

If someone can explain to me how to do that it would be great.

Thank to all of you, i hope to contribute a little bit the different file that i use are joined, if someone want to play with.

Sorry,
I just forget to mention that
the modifications made in the stepsequencer app are preceded and followed by —???
I create functions to update the new sliders but they are useless, i left them empty to avoid errors.
And another version to avoid errors when turning the Encoders4 to modify the notes

I have briefly looked into your application, and from what I can understand you’ve added a bunch of new mappings which control the editing line, the current note etc.

But, having created those methods in the application (increase edit position by one line, increase by 16 lines, etc.) then you assign such mappings to a fader/dial?
It would seem to me that such a type of mapping (increase by 1 or 16) would be best suited for being controlled by a UIButton type mapping instead of a UISlider?

Nevertheless, it would be quite simple to work with UISliders. As you have already worked a bit with them, you know how to create them, assign a method handler etc.

So, to answer your questions:

  1. In order to update the value of a slider you simply call “set_value” with the value you wish to set. By default, a UISlider has a range between 0-1, and setting the value to anything higher will simply leave the slider set to the maximum possible value. Values below zero are not supported. Increase the “ceiling” if you need to work with a larger range (but often, it is a better approach to scale the value afterwards, as a range of zero to one is very easy to work with). There is an additional argument, “skip_event”, which will allow you to not update the physical/on-screen slider after having assigned a new value.

  2. By default, a UISlider will adjust it’s value whenever it is being changed by the user (on the hardware, or via the on-screen control). So, this is really not something you need to do yourself. However, if you mean that you wish to detect which direction the slider is being moved (up or down), then you have no choice but to keep a local copy of the last value and compare it with the most recent value (a “hackish” way to achieve this would be to use the internal property “_cached_value” from the UISlider class, as this should in fact represent the very value we are looking for).

Feel free to ask more Duplex related questions, and I’ll happily attempt to answer :slight_smile:

I waited for my answer, because I was hoping to achieve what I wanted.
This is not the case, but I managed to see the slider in the right position when the application starts using this:

----  
function StepSequencer2_33:_build_select_grid_note()  
  
 if self.mappings.select_grid_note.group_name then  
  
 local orientation = self:_get_orientation()  
  
 for track_idx=1,self._track_count do  
 for line_idx=1,self._line_count do  
  
 local x,y = track_idx,line_idx  
  
 if not (orientation==VERTICAL) then  
 x,y = y,x  
 end  
  
  
 local note = renoise.song().selected_pattern.tracks[track_idx]:line(  
 line_idx).note_columns[1]  
  
 local newval = note.note_value  
 local position = newval/121   
  
  
 local c = UISlider(self.display)  
 c.group_name = self.mappings.select_grid_note.group_name  
 c.tooltip = self.mappings.select_grid_note.description  
 c:set_pos(self.mappings.select_grid_note.index or 1)  
  
 c.toggleable = false  
 c.flipped = true  
 c.value = position  
 c:set_orientation(self.mappings.select_grid_note.orientation)  
 c.x_pos = x  
 c.y_pos = y  
 c.active = false  
  
 c.on_change = function(obj)   
  
 if (not self.active) then   
 return false  
 end  
  
 local note = renoise.song().selected_pattern.tracks[track_idx]:line(  
 line_idx).note_columns[1]  
  
  
 local newval = note.note_value  
  
 if (newval >= 0 and newval <= 121) then   
  
 local noteval = self._select_grid_note.value*121  
 note.note_value = noteval   
 end  
  
 local msg = string.format(  
 "StepSequencer2_33: position changed to %X",note.note_value)---position)  
 renoise.app():show_status(msg)  
  
 end  
 self:_add_component(c)  
 self._select_grid_note = c  
  
 end  
end  
end  
end  
---  

I can change correctly Uislider position while I turn left down right note it increases.
But if I quickly turn the knob on the BCR2000 Renoise slowdown.
with this:

function StepSequencer2_33:_build_select_note()  
  
 if self.mappings.select_note.group_name then  
  
  
 local c = UISlider(self.display)  
 c.group_name = self.mappings.select_note.group_name  
 c.tooltip = self.mappings.select_note.description  
 c:set_pos(self.mappings.select_note.index or 1)  
  
 c.toggleable = false  
 c.flipped = true  
 c.value = 0  
  
 c:set_orientation(self.mappings.select_note.orientation)  
 c.on_change = function(obj)   
 local positionactuel = self._select_note.value  
 if (not self.active) then   
 return false  
 end  
  
  
 local positionactuel = self._select_note.value  
  
  
 local note = renoise.song().selected_note_column  
  
local newval = note.note_value  
  
 if (newval >= 0 and newval <= 121) then   
  
 local noteval = self._select_note.value*121  
 note.note_value = noteval   
 end  
  
 local msg = string.format(  
 "StepSequencer2_33: position changed to %X",note.note_value)---position)  
 renoise.app():show_status(msg)  
  
  
 end  
 self:_add_component(c)  
 self._select_note = c  
  
 end  
end  
----  

But I can’t make the Slider changes its value if I change the note from Renoise.

Thank you for your explanation, it helps me to better understand what I do. And I realize that I have made a number of things without understanding it very well.
The final goal was to make an application that looks like an hardware sequencer a bit like this http://www.doepfer.de/maq.htm
with a line to change the notes in Renoise, another for Velocity…
a mix between the stepsequencer and NOW apps, but the goal seems far away.

The realtime tracking of notes changes is done automatically via line notifiers, but you need to look into the _update_grid() method to see if your dials are being assigned a new value
(and don’t forget to supply the second boolean argument to the dials - “skip_event” - or they will behave as if you manually turned them, creating a feedback loop)

N.O.W. is a beast with thousands of lines of code, so no wonder if you’re feeling a bit overwhelmed! The StepSeq is much more simple, and being able to control it with dials instead of buttons is definitely something that we should look into. As it was originally written by daxton for the Launchpad, so far it has been for grid controllers only