# A tiny script, for your hipster lounge

**URL:** <https://in-thread.sonic-pi.net/t/a-tiny-script-for-your-hipster-lounge/4448>\
**Category:** Show your work\
**Tags:** performance\
**Created:** [October 2, 2020, 9:36pm UTC](https://in-thread.sonic-pi.net/t/a-tiny-script-for-your-hipster-lounge/4448 "2020-10-02T21:36:31Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [October 3, 2020, 7:17pm UTC](https://in-thread.sonic-pi.net/t/a-tiny-script-for-your-hipster-lounge/4448/10 "2020-10-03T19:17:23Z")

</div>

> [@jrm](#):
>
> In section _Passing values into the Future_ of [Sonic Pi - Tutorial](https://sonic-pi.net/tutorial.html#section-10-2) there is an example where a value is get from store using sync. This is a shortcut for `cue` + `get` .

Just to be clear, `sync` is _not_ a shortcut for `cue` + `get`. This thread might help shed some more light:

> [@Help with understanding cues/syncs](https://in-thread.sonic-pi.net/t/help-with-understanding-cues-syncs/4421):
>
> Hi, new to Sonic Pi and very keen to use it. I’ve been through the tutorials and got very excited about using cues and syncs for controlling many arps and voices…but…clearly something I don’t understand about the model. Without a solid mechanism for doing this I can’t build what I need. If anyone could point me in the right direction I’d be very grateful. In the simplified code (at the end of this post) I have one live loop that cycles between two chords and plays the current one, and another…

In particular this section:

> [@Help with understanding cues/syncs](https://in-thread.sonic-pi.net/t/help-with-understanding-cues-syncs/4421/4):
>
> - `get` - this simply retrieves the latest value at the current time (or no value if none is found). This does _not_ block the current thread in any way and is assumed to take 0 time.
> - `set` - this puts a value at the current time into the Time State. It does _not_ block the current thread and is assumed to take 0 time.
> - `sync` this retrieves the _next_ value from the current time and if no value is already there and waiting it will block the current thread. The amount of time this takes depends on when the next value is available. You can therefore treat `sync` like a special kind of `sleep` where you don’t specify the time explicitly - rather it’s just the time of the next matching event

---

_[View the full topic](https://in-thread.sonic-pi.net/t/a-tiny-script-for-your-hipster-lounge/4448)._
