Online Sequencer Make music online
  • Sequences
  • Members
  • Chat
  • Forum
  • Wiki

Existing user? Sign In Create account
Login at Online Sequencer Forums

Online Sequencer Forums › Online Sequencer › Online Sequencer Discussion
« Previous 1 … 36 37 38 39 40 … 79 Next »

Console Marker Commands

Thread tools
Console Marker Commands
emekat Offline
Member
108 Posts:
 
#1
06-10-2021, 05:09 PM
I was wondering if anyone knew console commands to get and set the markers. I can see a bunch of marker functions in the drop down but I don't know what they all do, nor what the settings mean.


I remixed the remix.  Now it's back to normal. ~Mitch Hedberg
Reply
LucentTear Online
Somebody Who Does A Bit Of Everything
869 Posts:
 
#2
06-10-2021, 05:27 PM
https://sites.google.com/view/lucentguid...th-markers
https://sites.google.com/view/lucentguid...nd-panning


Reply
Liam Offline
Code Monkey
246 Posts:
 
#3
06-10-2021, 05:34 PM
Be careful messing around with the markers in the console. They're stored in a complicated data structure, to reduce CPU use when playing the song.

Changing marker values, or toggling blending in the console is ok. Changing marker instrument, setting, or time via the console will break things.

There's not even an easy way of listing all the markers in the song, because of that data structure. So what I do is use the selection instead. I select the markers I want to mess with, then iterate over selection.markers instead:
for (const m in selection.markers) console.log(m);

The only marker function that you could reasonably use from the console is this one:
addMarker(time, setting, instrument, value, blend)

If people have ideas for other console commands, they're easy enough to add. I should probably add something like selectNotesIf for markers.


https://tiusic.com

https://www.youtube.com/playlist?list=PL...v872SZVXzI
Reply
emekat Offline
Member
108 Posts:
 
#4
06-10-2021, 05:38 PM
Thanks, but that doesn't show me console commands. By drop down I meant typing 'marker' into the console and seeing all the functions there.


I remixed the remix.  Now it's back to normal. ~Mitch Hedberg
Reply
LucentTear Online
Somebody Who Does A Bit Of Everything
869 Posts:
 
#5
06-10-2021, 05:40 PM
I couldn't tell if I should have mentioned song.getAllMarkersAtTime(t) since the OP was asking some really basic questions over what items markers accomplish. You can easily get markers via the UI which I have explained in the first link I sent. It should also explain everything under the marker menu dropdown if I'm interpreting correctly.


Reply
emekat Offline
Member
108 Posts:
 
#6
06-10-2021, 05:43 PM
(06-10-2021, 05:34 PM)Liam Wrote: Be careful messing around with the markers in the console. They're stored in a complicated data structure, to reduce CPU use when playing the song.

Changing marker values, or toggling blending in the console is ok. Changing marker instrument, setting, or time via the console will break things.

There's not even an easy way of listing all the markers in the song, because of that data structure. So what I do is use the selection instead. I select the markers I want to mess with, then iterate over selection.markers instead:
for (const m in selection.markers) console.log(m);

The only marker function that you could reasonably use from the console is this one:
addMarker(time, setting, instrument, value, blend)

If people have ideas for other console commands, they're easy enough to add. I should probably add something like selectNotesIf for markers.

Sorry my above reply was to Lucent.

Ok, I think add marker could work. What I really want to do is just enter precise numbers for the settings. So if the marker was set inst volume at .52 I could change it to .5 etc

This would not have been an issue if you had not deprecated the text files. Tounge


I remixed the remix.  Now it's back to normal. ~Mitch Hedberg
Reply
emekat Offline
Member
108 Posts:
 
#7
06-10-2021, 05:46 PM
(06-10-2021, 05:34 PM)Liam Wrote: Be careful messing around with the markers in the console. They're stored in a complicated data structure, to reduce CPU use when playing the song.

Changing marker values, or toggling blending in the console is ok. Changing marker instrument, setting, or time via the console will break things.

I feared as much, that's why I was asking.

Quote:addMarker(time, setting, instrument, value, blend)

So for time, how is that calculated? Real time or bar/count? Then setting would be 1 for volume, 2 for pan, 3-5 for eq etc?, instrument and value are straight forward, and blend is true/false?


I remixed the remix.  Now it's back to normal. ~Mitch Hedberg
Reply
Liam Offline
Code Monkey
246 Posts:
 
#8
06-10-2021, 05:47 PM
Select the marker you want to change, then in the console type this:

for (const m of selection.markers) { m.value = 1.5; }

Change 1.5 to whatever you want.


https://tiusic.com

https://www.youtube.com/playlist?list=PL...v872SZVXzI
Reply
LucentTear Online
Somebody Who Does A Bit Of Everything
869 Posts:
 
#9
06-10-2021, 05:49 PM (This post was last modified: 06-10-2021, 05:51 PM by LucentTear.)
(06-10-2021, 05:43 PM)emekat Wrote:
(06-10-2021, 05:34 PM)Liam Wrote: Be careful messing around with the markers in the console. They're stored in a complicated data structure, to reduce CPU use when playing the song.

Changing marker values, or toggling blending in the console is ok. Changing marker instrument, setting, or time via the console will break things.

There's not even an easy way of listing all the markers in the song, because of that data structure. So what I do is use the selection instead. I select the markers I want to mess with, then iterate over selection.markers instead:
for (const m in selection.markers) console.log(m);

The only marker function that you could reasonably use from the console is this one:
addMarker(time, setting, instrument, value, blend)

If people have ideas for other console commands, they're easy enough to add. I should probably add something like selectNotesIf for markers.

Sorry my above reply was to Lucent.

Ok, I think add marker could work.  What I really want to do is just enter precise numbers for the settings.  So if the marker was set inst volume at .52 I could change it to .5 etc

This would not have been an issue if you had not deprecated the text files. Tounge

song.getAllMarkersAtTime(t) should be your best friend then. t is the timestamp which you can obtain by left-clicking the measure bar of whichever marker group you want to view. You want to change "value" for the specific marker you want to change.

Some parameters on OS have obvious values. Volume typically goes from 0 to 2, while Detune goes from -1200 to 1200. Using console, you can make these values more precise as well as extending them past regular UI values.


Reply
emekat Offline
Member
108 Posts:
 
#10
06-10-2021, 06:42 PM
(06-10-2021, 05:47 PM)Liam Wrote: Select the marker you want to change, then in the console type this:

for (const m of selection.markers) { m.value = 1.5; }

Change 1.5 to whatever you want.

This did the trick!

At first I couldn't figure out which setting I was changing ... then I realized that each marker only has ONE setting, duh. Tounge

I've fixed my mix! Thank you Liam so much!!!

And thanks too Lucent. +/-1200 on pitch makes sense (cents Tounge) it's an octave either way. I'll keep that in mind when I start pitching.

So if anyone else wants to do this:

1 ~ Select your marker. Right click it, open the panel. If there are more than 1 marker, make sure only the ONE that you are editing is box ticked.

2 ~ Open console.

3 ~ Enter this:

for (const m of selection.markers) { m.value = x; }

Substitute the new value for 'x'

4 ~ Reselect the marker from the marker bar to refresh the panel and watch the slider move to confirm.

YAY!!


I remixed the remix.  Now it's back to normal. ~Mitch Hedberg
Reply



Users browsing this thread:   1 Guest(s)


  •  Return to Top
  •  Contact Us
  •   Home
  •  Lite mode
© Rush Crafted with ❤ by iAndrew
Powered By MyBB, © 2002-2025 MyBB Group.
Linear Mode
Threaded Mode
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend