Spontaneous Tempo Changes via OSC

Discuss using the OSC interface to control SL

Moderator: jesse

Post Reply
prasadbrg
Posts: 2
Joined: Thu Mar 26, 2009 4:54 am

Spontaneous Tempo Changes via OSC

Post by prasadbrg »

Hello everyone,
This is my first post on this forum. My compliments and thanks to Jesse and everyone who's contributed towards SL!
The musical tradition I come from demands spontaneous, arbitrary tempo changes to the rhythm. At least for now, all I need is a single pre-recorded loop to be running, and respond instantly to tempo changes (so syncing/recording etc. are not relevant). Thanks to Python, I have a means of instantly (i.e, in live performances, realtime) computing the required BPM and sending it via OSC to applications, such as JackBeat. I'd like to do the same with SL. I'm using SL v 1.6.13, compiled on 2.4 GHz Celeron laptop, 1 GB ram, running Xubuntu 9.04.
Firstly, I've noticed that the SL GUI behaves erratically, with regard to tempo. If I load a .wav file, change the stretch/rate parameter with the mouse, typically (initially, at least) there is a corresponding change in tempo. But then I can change the parameter any much I want, and there's no change in tempo - as if the tempo got 'stuck' at some value. After a few minutes, the tempo decides to wake up suddenly align to whatever the current parameter value is! This appears to be a bug to me, please do correct me if I'm wrong.
Secondly, I haven't been able to get a pre-recorded .wav file to change tempo, upon changing the BPM. I've tried various settings of 'Sync To' and the other checkboxes, but to no effect. It's still not clear to me how SL can understand how many 'beats" there are in a recorded .wav file, so I think I might be missing something here. I'd really appreciate it if someone could throw some light on this, and help me use BPM to set the tempo of a loaded loop.
Thirdly, I've been successful in sending OSC messages to SL, changing the 'rate' parameter in realtime. Using OSC, I don't see any of the erratic behavior I see with a mouse and the GUI (see above). Now, if I could send the 'stretch' parameter value through OSC, then that would be a working solution to my requirements. But then, the OSC documentation page describes only the 'rate' parameter change, and not stretch. I did try

Code: Select all

/sl/#/set stretch (value)
in place of

Code: Select all

/sl/#/set rate (value)
, but to no effect. I hope OSC stretch control has been implemented! If it is, I'd appreciate it if someone could show me how to use it.
Any help would be appreciated! Thanks in advance.
Cheers,

Guru
jesse
Posts: 554
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Spontaneous Tempo Changes via OSC

Post by jesse »

Everything that is done in the SL GUI is done via OSC, so fear not. Sorry about not updating the OSC documentation.... but as a rule every control and command name that you see in the MIDI Bindings command/control dropdown in the preferences is available in OSC with that name. In stretch's case, the control is 'stretch_ratio'.

The tempo "guessing" logic works by using the length of the loop cycle and the current settings of 8th/cycle. If Auto-eighths is turned on an additional heuristic is used to try to pick the 8ths/cycle automatically based on fitting multiples of a 4-beat base within a sane tempo range. In the case of audio loaded from file, it assumes the entire loaded loop is a single cycle, so it will use the current 8th/cycle setting and the loop length to calculate the tempo. If auto-8ths is on, it will apply the above logic to guess 8ths/cycle, and thus the tempo. If it isn't working for you loops you might need to manually set 8th's cycle.

To have it automatically adjust the stretch parameter relative to the initial guess it made about the loop's tempo, turn on 't.stretch' (tempo_stretch control), then when the tempo is changed it will automatically stretch the loop appropriately. This should work as long as the 8ths/cycle is set correctly.... however if you load several loops on different loop instances and their 8ths/cycle isn't the same, you might run into issues.
prasadbrg
Posts: 2
Joined: Thu Mar 26, 2009 4:54 am

Re: Spontaneous Tempo Changes via OSC

Post by prasadbrg »

Thanks, Jesse, for the prompt reply!
There seem to be 2 separate issues with SL on my system.
The milder problem: 'stretch_ratio' doesn't seem to work; as in, I can send the message '/sl/0/set rate 1.37' and the GUI is instantly updated. '/sl/0/set stretch_ratio 1.37', however, does not result in any change.

The *much* more serious issue: tempo changes are still infrequent, and quite erratic. Works sometimes, maybe a few times, then stop changing, as if the tempo is stuck at some value. To my dismay, I found out that my earlier observation that OSC solves the problem was a fluke :oops: - it worked that time, and perhaps the first few times each time I load a wav file into a loop, then stops working. Either from the GUI or from OSC. The parameter changes in the GUI, but the loop tempo audibly remains the same.

Could it be that SL has already 'buffered' the sounds at a particular tempo? Has anyone reported a similar issue from non-Ubuntu systems? Or is it to do with my (rather ancient) hardware?! I'm just speculating here, but I'd really like to get to the bottom of this. SL seems to be the ideal tool for my performances, and yet in practice I haven't been able to get it to work. I'd appreciate any pointers in this regard...
Thanks in advance!
Cheers,

Guru
jesse
Posts: 554
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Spontaneous Tempo Changes via OSC

Post by jesse »

Could you post or email me a saved session from your SL setup that you believe should be working, but isn't. That way I can make sure everything looks as it should when I try to reproduce it (so far everything works as expected for me here).
Post Reply