Skip to content

Conversation

justcfx2u
Copy link

Add inverse of OSC /time.

This feature allows number of beats to be get/set.

  • /time (set absolute transport position in beats; feature already exists)
  • /beats/current (get absolute transport position in beats; this feature)

@git-moss
Copy link
Owner

Sorry, for the late reply, I somehow missed your pull request. Is there an actual difference between playPosition () and this.transport.playStartPosition () ?

@justcfx2u
Copy link
Author

There is! I am writing an external companion sequencer for BitWig using DrivenByMoss.

resources/doc/control-surface/api/com/bitwig/extension/controller/api/Transport.html#playPosition() returns a BeatTimeValue() which extends DoubleValue. Therefore, playPosition() is a VERY accurate position of the song in total number of beats. This is useful through tempo changes, time signature changes, etc. and is updated in real time as the transport plays.

playStartPosition() reports a static value which does not change during playback.
"/time/str" calls getPositionText which calls getFormatted which coerces it to a string.

Therefore, this feature (GETS absolute position in beats, automatically updated as a subscription) combined with /time (SETS absolute position in beats), this feature allows both setting and getting the absolute position in beats which is makes following and navigating BitWig's transport into my external sequencer speak the same language (double values) while not specifically caring about the tempo, tempo changes (which would make time calculation far more complicated), or measures at all.

@git-moss
Copy link
Owner

Ah, sorry, I ment: playPosition () and getPosition () which is already there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants