Latest News: Bitwig updates Bitwig Studio to v5.1
A Couple Scripting Questions
- KVRist
- Topic Starter
- 351 posts since 31 Mar, 2015 from Pittsburgh, PA, USA
So at the risk of spamming this board with all my questions, I'll just keep them all here. I will also post the solutions I figure out on this first post for future reference.
1.
Issue: Ability to scroll to the Device selected in the Mixer. I can register an observer that reports the position of the Device selected in the deviceBank through the script, but when I select a new device in the mixer (with my mouse), the position observer doesn't change. The position observer DOES however change when I issue a deviceBank.scrollUp() or down. bug?
2.
Issue: Ability to tell if a Note spans multiple Steps in Clip Observers: say my steps are set at 16th notes, but I've got an 8th note playing in there somewhere, is there a way to tell that the the two TRUE 16th steps reported back by the StepDataObserver are the same note?
Solution: There is currently no way to do this in the API.
1.
Issue: Ability to scroll to the Device selected in the Mixer. I can register an observer that reports the position of the Device selected in the deviceBank through the script, but when I select a new device in the mixer (with my mouse), the position observer doesn't change. The position observer DOES however change when I issue a deviceBank.scrollUp() or down. bug?
2.
Issue: Ability to tell if a Note spans multiple Steps in Clip Observers: say my steps are set at 16th notes, but I've got an 8th note playing in there somewhere, is there a way to tell that the the two TRUE 16th steps reported back by the StepDataObserver are the same note?
Solution: There is currently no way to do this in the API.
Last edited by dplduffy on Wed Nov 25, 2015 1:27 am, edited 1 time in total.
- KVRAF
- 4140 posts since 13 May, 2004
Regarding 1): All types of banks (Track, device, etc.) are independent of the currently selected track/device. To monitor these you need to use the Cursor* classes. To find an example how to correlate those 2 look at the Framework4Bitwig abstractions:
https://github.com/teotigraphix/Framework4Bitwig
Furthermore, if you notice bugs or have API wishes first check the issue tracker at the same project:
https://github.com/teotigraphix/Framework4Bitwig/issues
Also feel free to add bugs/wishes there. Those issues are also monitored by Bitwig.
https://github.com/teotigraphix/Framework4Bitwig
Furthermore, if you notice bugs or have API wishes first check the issue tracker at the same project:
https://github.com/teotigraphix/Framework4Bitwig/issues
Also feel free to add bugs/wishes there. Those issues are also monitored by Bitwig.
- KVRist
- Topic Starter
- 351 posts since 31 Mar, 2015 from Pittsburgh, PA, USA
this is what makes the device observersKreczek wrote:Code for your device position observer ?
Code: Select all
cursorTrack = host.createArrangerCursorTrack(0,0);
deviceBank1 = cursorTrack.createDeviceBank(1);
deviceBank2 = cursorTrack.createDeviceBank(1);
device1 = deviceBank1.getDevice(0);
device2 = deviceBank2.getDevice(0);
deviceBank1.addCanScrollUpObserver(getDeviceBank1CanScrollUp);
deviceBank1.addCanScrollDownObserver(getDeviceBank1CanScrollDown);
deviceBank1.addScrollPositionObserver(getScrollPositionObserver, 0);
deviceBank1.addDeviceCountObserver(getDeviceBank1Count);
device1.addSelectedPageObserver(0, getSelectedParamPage);
device1.addPageNamesObserver(getDevice1ParamPageNames);
device1.addNameObserver(32, 'Unknown Device', getDevice1Name);
device1.addNextParameterPageEnabledObserver(getIsNextDevice1ParamPage);
device2.addNextParameterPageEnabledObserver(getIsNextDevice2ParamPage);
device1.addPreviousParameterPageEnabledObserver(getIsPrevDevice1ParamPage);
device2.addPreviousParameterPageEnabledObserver(getIsPrevDevice2ParamPage);
and this is called in flush(), so its updated every time I do something.
Code: Select all
devicePage.updateOutputState = function()
{
clear();
device2.setParameterPage(selectedParamPage+1);
deviceBank2.scrollTo(deviceBank1PositionObserver);
this.updateRGBLEDs();
this.update11segLEDs();
this.updateIndicators();
this.deviceChangePopup();
}
- KVRist
- Topic Starter
- 351 posts since 31 Mar, 2015 from Pittsburgh, PA, USA
Awesome, I didn't know that Github was monitored by Bitwig. I'll be sure to keep an eye on that, so I don't flood the forum or their support email with questions and issues.moss wrote:Regarding 1): All types of banks (Track, device, etc.) are independent of the currently selected track/device. To monitor these you need to use the Cursor* classes. To find an example how to correlate those 2 look at the Framework4Bitwig abstractions:
https://github.com/teotigraphix/Framework4Bitwig
Furthermore, if you notice bugs or have API wishes first check the issue tracker at the same project:
https://github.com/teotigraphix/Framework4Bitwig/issues
Also feel free to add bugs/wishes there. Those issues are also monitored by Bitwig.
And yeah, I think my issue is that I don't have a cursorDevice. I actually had no idea thats what the cursor* classes were for (I was a bit confused about that), so that should help fix a bunch of issues in my code. Thanks!