Latest News: Bitwig updates Bitwig Studio to v5.1
api v1 vs v2
-
tor.helge.skei tor.helge.skei https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=152647
- KVRian
- Topic Starter
- 527 posts since 30 May, 2007
hi!
i just received my newest controller, an akai apc40 mk2, and i need to make a tailor-made script for it for some upcoming live shows.. i haven't coded scripts for a long time, not since just after bitwig v1 (i think).. how much has changed in the api since then? is it still based on adding observers for everything you want to know about? what is the markInterested() methods for? anything (else) that has changed that i need to keep in mind?
i just received my newest controller, an akai apc40 mk2, and i need to make a tailor-made script for it for some upcoming live shows.. i haven't coded scripts for a long time, not since just after bitwig v1 (i think).. how much has changed in the api since then? is it still based on adding observers for everything you want to know about? what is the markInterested() methods for? anything (else) that has changed that i need to keep in mind?
-
tor.helge.skei tor.helge.skei https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=152647
- KVRian
- Topic Starter
- 527 posts since 30 May, 2007
update...
ok, i tried jo just jump into it, and use my older scripts as a starting point..
i made this little script:
and put it in /home/skei/Bitwig Studio/Controller Scripts
(this path is selected in Settings/Locations/My Controller Scripts)
started bitwig, opened the Controller Script Console, and saw that "hello world!" were printed.. so i assumed the script was being found and loaded by bitwig..
then i went on to select the script, but, nope.. no script in the dropdown menu..
argh..
what now?
ok, i tried jo just jump into it, and use my older scripts as a starting point..
i made this little script:
Code: Select all
loadAPI(1);
println("hello world!");
host.defineController("Skei","APC40mk2","1.0","91e2eae2-5f56-49c8-9c72-780341ffc751");
host.defineMidiPorts(1,1);
host.getMidiInPort(0).setMidiCallback(onMidi);
host.getMidiInPort(0).setSysexCallback(onSysex);
function init() {
println("init");
}
function exit() {
println("exit");
}
function flush() {
println("flush");
}
function onMidi(status, data1, data2) {
printMidi(status,data1,data2);
}
function onSysex(data) {
printSysex(data);
}
(this path is selected in Settings/Locations/My Controller Scripts)
started bitwig, opened the Controller Script Console, and saw that "hello world!" were printed.. so i assumed the script was being found and loaded by bitwig..
then i went on to select the script, but, nope.. no script in the dropdown menu..
argh..
what now?
-
tor.helge.skei tor.helge.skei https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=152647
- KVRian
- Topic Starter
- 527 posts since 30 May, 2007
last update for now.. something is fishy.. some caching issues, perhaps? btw: this is/was in linux..
i made a new directory called "skei" in "/opt/bitwig-studio/resources/controllers", and let it be empty.. the original script is in "/home/skei/Bitwig Studio/Controller Scripts/Skei"
now, the script suddenly appeared in the menu, and i can select it, and it seems to work.. i deleted the directory i just made, and things still work..
i made a new directory called "skei" in "/opt/bitwig-studio/resources/controllers", and let it be empty.. the original script is in "/home/skei/Bitwig Studio/Controller Scripts/Skei"
now, the script suddenly appeared in the menu, and i can select it, and it seems to work.. i deleted the directory i just made, and things still work..
-
tor.helge.skei tor.helge.skei https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=152647
- KVRian
- Topic Starter
- 527 posts since 30 May, 2007
ok, i'll figure it out myself, then.. :-/
-
- KVRist
- 421 posts since 11 Dec, 2002 from Los Angeles
This forum seriously sucks in terms of helping fellow developers.