asked Oct 02 '15 at 13:43 by bufobufo (111)

edited Oct 02 '15 at 14:31

Within a controller script, I want the MIDI channel for a NoteInput to be configurable by the user. So I create a preference setting like:

var midiChannelSetting = host.getPreferences().getNumberSetting(...)

Now the only way I see to read the actual value of the setting is asynchronous via midiChannelSetting.addValueObserver(..), so I won't know the value until init() has already finished. But Bitwig won't allow creating NoteInputs after init() has finished.

So what's the right way to know the setting within init()? Is there some way to suspend init() until my setting's oberserver has been invoked by Bitwig?

That's acutally a conceptual problem which is hard or impossible to workaround. The settings fire asynchronously whenever they are ready. I had a similar issue with IP connections and it is on my wishlist to have improvements in that area: https://github.com/teotigraphix/Framework4Bitwig/issues/43

link

answered Oct 05 '15 at 15:11 by moss (103)

Thank you for your answer, Moss! Let's hope we see some improvements here soon. Being able to configure MIDI channels or IPs via script settings should really be made possible.

  — (Oct 07 '15 at 10:24) bufobufo

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×68
×16
×9
×4
×1

Asked: Oct 02 '15 at 13:43

Seen: 787 times

Last updated: Oct 07 '15 at 10:24