big update

This commit is contained in:
2024-01-08 01:58:04 +01:00
parent 886d8eed62
commit b6231fde39
17 changed files with 224 additions and 225 deletions

View File

@ -1,9 +1,9 @@
# Audio sample library
The [Boot()](boot.md) method adds a mechanism to load audio samples automatically. The samples are lazily loaded in memory. You can load a vast library of samples without using too much memory. The mechanism is written by Scott Carver and can be found [here](https://gist.github.com/scztt/73a2ae402d9765294ae8f72979d1720e). It was originally named **SAMP**. I renamed it to **Bank** since it makes more sense to me.
The [Boot()](boot.md) method adds a mechanism to load audio samples automatically. The samples are lazily loaded in memory. You can load a vast library of samples without using too much memory. The mechanism is written by Scott Carver and can be found [here](https://gist.github.com/scztt/73a2ae402d9765294ae8f72979d1720e). It was originally named **SAMP**. I renamed it to **Bank** not to break out too much with the naming conventions.
##### Using the library
### Browsing the sample bank
If your audio sample bank path is set right, you will have access to your bank
using **Bank**:
@ -18,9 +18,9 @@ Note that you can also be more picky about the samples you want to load:
Bank('a/*')['clap'].play; // Play the first sample with 'clap' in its name
```
##### Using samples in patterns
### Using samples in patterns
This is great. I have also added a mechanism to automatically feed a sample to the default sampler when using patterns. That way, you don't have to type the `Bank` part all the time and can stay focused on your improvisation:
I have added a mechanism to automatically feed a sample to the default sampler when using patterns. That way, you don't have to type the `Bank` part all the time and can stay focused on your improvisation:
```supercollider
[
@ -36,3 +36,7 @@ Note that there is no optional argument here. You need `sp` and `nb` for it to
work. You can use these arguments when using the abbreviated syntax for `Pbind`
but not for regular `Pbind`. In that case, you will need to use the good old
`buf: Bank('a/*')[0]` syntax.
Be careful. If you forgot one of the two arguments, it is likely that the last
selected sample will play instead. This is probably easy to fix but it is what
it is.