This forum is for Tips and Tricks. Please do not post any questions in this forum. It is only for information.
57 postsPage 3 of 3
1, 2, 3
Is it possible through JS or macro to insert Program Change events into tracks somehow?

5,1 MacPro 3.46ghzx12 128gb ram, OSX 10.14, S1, LogicPro, Cubase10, DP9, Reaper, VEP7, VSL, too many plugins to list
User avatar
by Lawrence on Sat Jun 08, 2019 4:39 am
Yes, look at those functions I posted. That works for any selected Instrument Track assigned to an External Instrument.

Code: Select all
setProgram (bank [integer], program [integer])
P.S. Look in my signature below, there's an External Instruments package download link there. It runs from the main Studio One menu.
User avatar
by roblof on Sat Jun 08, 2019 5:22 am
Is it possible to control other hardware like controllers and audio interfaces this way? Given there already is some way to talk to a device through midi or other means.

Can you subscribe to events?

Studio One Pro v5, Notion 6, Nuendo 11, BitWig v3, Reaper v4, Ableton Live 8 Suite, iMac late 2015, Behringer Wing/x32-BigBoy/x32-rack all with Dante/aes67 and s16/sd16 stageboxes, Flow8, Waves x-wsg with SoundGrid server, Behringer X-Touch, X-Touch ONE, M-Air mr18, X-Air xr18, DP48, Hub4 and p16 monitor systems, TurboSound iQ-speakers, Motör 61, BCR-2000, FirePod 10, Apogee Ensemble, Alesis HD24, NI Komplete 12 Ultimate Collectors, Halion 6, True Temperament Frets on basses and guitars, Katana-100, DT-50, JSX, JCM800, Korg Kronos, Roland vk-7, Behringer Deepmind 12, Behringer Neutron
User avatar
by Lawrence on Sat Jun 08, 2019 5:39 am
I'm sure it is as some External Devices like MCU and simiar have JS code files behind them. Actually doing it is another different conversation. :(

It's probably not a good idea to be too ambitious with scripts. It's better to fill smaller personal gaps, not jump into the deep end trying to do some really complex things.
User avatar
by roblof on Sat Jun 08, 2019 6:28 am
I’m too old to stay in the shallow end of the pool 8-)

I was thinking of controlling things like 3’rd party preamp gain, as already possible with presonus hardware integration.

Lawrence wroteI'm sure it is as some External Devices like MCU and simiar have JS code files behind them. Actually doing it is another different conversation. :(

It's probably not a good idea to be too ambitious with scripts. It's better to fill smaller personal gaps, not jump into the deep end trying to do some really complex things.

Studio One Pro v5, Notion 6, Nuendo 11, BitWig v3, Reaper v4, Ableton Live 8 Suite, iMac late 2015, Behringer Wing/x32-BigBoy/x32-rack all with Dante/aes67 and s16/sd16 stageboxes, Flow8, Waves x-wsg with SoundGrid server, Behringer X-Touch, X-Touch ONE, M-Air mr18, X-Air xr18, DP48, Hub4 and p16 monitor systems, TurboSound iQ-speakers, Motör 61, BCR-2000, FirePod 10, Apogee Ensemble, Alesis HD24, NI Komplete 12 Ultimate Collectors, Halion 6, True Temperament Frets on basses and guitars, Katana-100, DT-50, JSX, JCM800, Korg Kronos, Roland vk-7, Behringer Deepmind 12, Behringer Neutron
User avatar
by Lawrence on Sat Jun 08, 2019 6:32 am
I hear you. :) That end of the pool is probably pretty deep and also most likely unreachable without an API doc outlining those things.

Nothing wrong with thinking big but you also have to be realistic. That's not gonna happen without a hardware controller API from them and maybe also documentation from the specific hardware manufacturer.

Study any JS files you find in the \Studio One 4\devices folder, maybe that will give some pointers.

You might wanna also brew a BIG pot of coffee. :mrgreen:
User avatar
by Dewdman42 on Sun Jun 09, 2019 1:18 pm
Lawrence wroteYes, look at those functions I posted. That works for any selected Instrument Track assigned to an External Instrument.

Code: Select all
setProgram (bank [integer], program [integer])
P.S. Look in my signature below, there's an External Instruments package download link there. It runs from the main Studio One menu.


What does that external instrument package do and how do i go about installing it to check it out?

So regarding the program change, thanks for pointing that out. Any way to save ProgramChanges to another track other then the currently selected one?

Well a more important question is, can we create noteOn/NoteOff Events on tracks using JS somehow?

Is there any way to see PC messages by patch "name" rather then number in S1?

5,1 MacPro 3.46ghzx12 128gb ram, OSX 10.14, S1, LogicPro, Cubase10, DP9, Reaper, VEP7, VSL, too many plugins to list
User avatar
by Lawrence on Mon Jun 10, 2019 5:46 am
Put the package file in the application \scripts folder and restart Studio One. It will list from the Studio One menu as External Instruments. Use the Instruments menu > Edit Instruments to go into the directory where the Cubase patch scripts are and copy anything you want to use to the root directory and it will list in it. There's about 200 Cubase patch script files that install with it. Some of them may be badly formatted as I didn't test them all.

I also added a new function to functions.js... loadCubasePatchFile() … which reads those files and pushes the relevant data into an array, in case someone wants to do something different.
User avatar
by Dewdman42 on Mon Jun 10, 2019 10:40 am
Thanks will check that out.

Is that a "no its not possible" on the question about adding noteOn/noteOff events to a track with JS?

5,1 MacPro 3.46ghzx12 128gb ram, OSX 10.14, S1, LogicPro, Cubase10, DP9, Reaper, VEP7, VSL, too many plugins to list
User avatar
by Lawrence on Mon Jun 10, 2019 3:10 pm
Sure, it's possible. I don't know how since I never actually tried it, but it's possible as "Events" like MIDI notes in code are just objects, so sure, there's certainly a way to create any MIDI object like that from scratch if you know how.

Not sure Studio One uses on/off events directly, but a note event would trigger both.
User avatar
by Dewdman42 on Mon Jun 10, 2019 4:02 pm
Any idea how we might be able to figure that out?

5,1 MacPro 3.46ghzx12 128gb ram, OSX 10.14, S1, LogicPro, Cubase10, DP9, Reaper, VEP7, VSL, too many plugins to list
User avatar
by Lawrence on Mon Jun 10, 2019 4:09 pm
Nope, sorry.
User avatar
by Dewdman42 on Wed Jun 12, 2019 3:22 pm
bummer.

Riddle me this. Do you think there is a way with JS to detect program change events on the program change lane to determine their value and maybe display the "current" program on the macrobar somehow by name? In other words you have your external instrument package for specifying a PC by name, which can insert those onto the program change lane...but I'd like to be able to view the names somehow of what is on the track. Any idea if we know how to accomplish that now? As near as I can see, the program change lane will a line/curve with nodes, but the only way to see the value is to hover the mouse over the nodes...and the value is most likely shown as a number if I recall. Plus I discovered the other day its based on a scale up to 100, rather then 128, so has to be converted somewhere?

5,1 MacPro 3.46ghzx12 128gb ram, OSX 10.14, S1, LogicPro, Cubase10, DP9, Reaper, VEP7, VSL, too many plugins to list
User avatar
by johnnythunder on Mon Sep 07, 2020 8:54 am
Lawrence wrotehttps://github.com/ExpressMix/studioone_functions


This thread has been amazing :reading: . I'm a new comer to studio one (5), but this topic of reverse engineering and creating custom scripts/macros honestly sounds fascinating. I'm a Sr. Software Engineer by trade and do a lot of JS programming. Is there any way I could get some more tips on this? Or even just that studioone_functions.js file I could review? I'd greatly appreciate it and be willing to share any use scripts!
User avatar
by jacquesmk2 on Fri Mar 12, 2021 8:16 pm
User avatar
by Dewdman42 on Sat Mar 13, 2021 1:13 pm
Thank you for sharing that.

5,1 MacPro 3.46ghzx12 128gb ram, OSX 10.14, S1, LogicPro, Cubase10, DP9, Reaper, VEP7, VSL, too many plugins to list
User avatar
by notSTEVE on Sun Jul 17, 2022 3:56 pm
Mikayy wrote
Lawrence wroteSounds like a plan. :thumbup:

Anyway, I already had a basic Hello World script so I uploaded it: https://github.com/StudioOneScripts/Hello-World

Take care my friend.


Hi Lawrence, thanks for uploading the example! Unfortunately, I don't see any change after putting the zipped file ("Hello-World-master.package") in the script folder. I assume I should see a button "Hello world" somewhere in the Track menu, but there is nothing. Should the script still work?

Thanks!

Be sure to zip up the individual files, not a folder containing the files.

57 postsPage 3 of 3
1, 2, 3

Who is online

Users browsing this forum: No registered users and 28 guests