From 0d3a96e82cde4103203a84ead537e45d4d79d944 Mon Sep 17 00:00:00 2001 From: Clxud Date: Fri, 3 Mar 2023 16:56:01 +0000 Subject: [PATCH] finally finished with the docs --- docs/hdi/queue.md | 121 +++++++++++++++++++++++++++++++++++++++++++ docs/installation.md | 4 +- 2 files changed, 124 insertions(+), 1 deletion(-) diff --git a/docs/hdi/queue.md b/docs/hdi/queue.md index 91b8fe1..fb0f0fc 100644 --- a/docs/hdi/queue.md +++ b/docs/hdi/queue.md @@ -109,5 +109,126 @@ If you have a queue loop mode set, this behavior will be overridden since the qu ::: +## Removing a track from the queue + + +To remove a track from the queue, we must use `Queue.remove()` + +```py + +Queue.remove() + +``` + +After you have initialized your function, we need to include the `item` parameter, which is a `Track`: + +```py + +Queue.remove(item=) + +``` + +:::{important} + +Your `Track` object must be in the queue if you want to remove it. Make sure you follow [](queue.md#getting-a-track-from-the-queue) before running this function. + +::: + +After running this function, your track should be removed from the queue. + + +## Shuffling the queue + +To shuffle the queue, we must use `Queue.shuffle()` + +```py + +Queue.shuffle() + +``` + +After running this function, your queue should be in a different order than it was originally. + +:::{tip} + +This function works best if theres atleast **3** tracks in the queue. The more tracks, the more variation the shuffle has. + +::: + + +## Looping the queue + +To loop the queue, we must use `Queue.set_loop_mode()` + +```py + +Queue.set_loop_mode(...) + +``` + +After you have initialized your function, we need to include the `mode` parameter, which is a `LoopMode` enum: + +```py + +Queue.set_loop_mode(mode=LoopMode.) + +``` + +The two types of `LoopMode` enums are `LoopMode.QUEUE` and `LoopMode.TRACK`. `QUEUE` loops the entire queue and `TRACK` loops the current track. + +After running the function, your queue will now loop using the mode you specify. + +### Resetting the loop mode + +To reset the loop mode, we must use `Queue.disable_loop()` + +```py + +Queue.disable_loop() + +``` + +:::{important} + +You must have a loop mode set before using this function. It will **not work** if you do not a loop mode set + +::: + +After running the function, your queue should return to its normal functionality. + +## Jumping to a track in the queue + +To jump to a track in the queue, we must use `Queue.jump()` + + +```py + +Queue.jump(...) + +``` + +After you have initialized your function, we need to include the `item` parameter, which is a `Track`: + +```py + +Queue.jump(item=) + +``` + +:::{important} + +Your `Track` object must be in the queue if you want to remove it. Make sure you follow [](queue.md#getting-a-track-from-the-queue) before running this function. + +::: + +After running this function, any items before the specified item will be removed, effectively "jumping" to the specified item in the queue. The next item obtained using `Queue.get()` will be your specified track. + + + + + + + + diff --git a/docs/installation.md b/docs/installation.md index 9ad1987..024a6ee 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -25,6 +25,8 @@ If you need more than just a quick example, get our drop-in [advanced cog](https to take advantage of all of Pomice's features. You are free to use this as a base to add on to for any music features you want to implement within your application. -If you want to use anything outside the provided examples, refer to the [API Reference](api/index.md) section. +If you want to jump into the library and learn how to do everything you need, refer to the [How Do I?](hdi/index.md) section. + +If you want a deeper look into how the library works beyond the [How Do I?](hdi/index.md) guide, refer to the [API Reference](api/index.md) section.