2022-09-16 04:31:45 -03:00
# Samplebrain
2022-09-04 07:50:37 -03:00
2022-09-12 07:44:00 -03:00
A custom sample mashing app designed by Aphex Twin.
2022-09-04 07:50:37 -03:00
2022-09-16 05:29:12 -03:00
Samplebrain chops samples up into a 'brain' of interconnected small
sections called blocks which are connected into a network by
similarity. It processes a target sample, chopping it up into blocks
2022-09-24 17:51:20 -03:00
in the same way, and tries to match each block with one in its brain
2022-09-16 05:29:12 -03:00
to play in realtime.
2022-09-07 07:03:23 -03:00
2022-09-17 05:26:06 -03:00
This allows you to interpret a sound with a different one. As we
worked on it (during 2015 and 2016) we gradually added more and more
2022-09-16 05:29:12 -03:00
tweakable parameters until it became slightly out of control.
2022-09-26 01:07:30 -03:00
2022-09-16 04:33:50 -03:00

2022-09-26 01:07:30 -03:00
2022-09-07 07:03:23 -03:00
Quick start:
2022-09-27 04:32:16 -03:00
1. Load a bunch of short wav files into the brain
2022-09-07 07:03:23 -03:00
2. Click (re)generate brain
2022-09-27 04:32:16 -03:00
3. Load a short loop sample into the target
2022-09-26 01:07:30 -03:00
4. Click (re)generate blocks
2022-09-07 07:03:23 -03:00
5. Press play
2022-09-16 04:39:28 -03:00
6. Tweak brain
2022-09-07 07:03:23 -03:00
2022-09-16 04:39:28 -03:00
The default block size (3000) is really high to prevent CPU glitches -
2022-09-27 04:32:16 -03:00
500 to 1000 is a better range. Larger wav files like whole tracks can
be used, but take a long time to process, after which they can be
saved as "brain" files and instantly reloaded.
2022-09-26 01:07:30 -03:00
2022-09-28 05:24:52 -03:00
_Historical note_: Samplebrain is an example of a sound synthesis method
called "concatenative sound synthesis" (CSS). Canadian composer John Oswald
used this method in his work [plunderphonics ](http://www.plunderphonics.com )
starting in the 1980s. While Oswald worked manually assembling his works,
automated approaches were developed and explored by several in the early 2000s,
e.g.: Zils and Pachet in 2001 -- who call it "Musical Mosaicing" --
Schwarz in his 2004 PhD thesis [Data-Driven Concatenative Sound Synthesis ](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiHlruIgrf6AhWhXfEDHaQFBsAQFnoECAkQAQ&url=http%3A%2F%2Frecherche.ircam.fr%2Fanasyn%2Fschwarz%2Fthesis%2Freport.pdf&usg=AOvVaw1TMAkjeJhNq3anf9f_CaR5 ),
and multimedia artist Sven König in his 2006 project [sCrAmBlEd?HaCkZ! ](https://www.youtube.com/watch?v=eRlhKaxcKpA ).
For an overview of early work in this area, see D. Schwarz, "Concatenative sound synthesis: The early years", J. New Music Research, vol. 35, no. 1, 2006. [https://doi.org/10.1080/09298210600696857 ](https://doi.org/10.1080/09298210600696857 )
2022-09-26 01:07:30 -03:00
# [Demo brain session](https://static.thentrythis.org/samplebrain/demo.samplebrain)
2022-09-16 04:41:07 -03:00
2022-09-17 05:29:04 -03:00
Load this file using "load session" not "load brain" (sessions contain
2022-09-27 04:32:16 -03:00
both the target and brain samples). The original samples used to
create the demo session [can be found here for
testing](https://static.thentrythis.org/samplebrain/samples/).
2022-09-26 01:07:30 -03:00
2022-09-17 05:27:33 -03:00
# [Manual](docs/manual.md)
Full description of all the parameters and a bit of the thinking
behind it.
2022-09-26 01:07:30 -03:00
2022-09-27 04:35:44 -03:00
# Download
2022-09-16 04:31:45 -03:00
2022-09-27 04:32:16 -03:00
As this is experimental non-commercial software (only originally
written to run on a couple of computers!) you will have to bear with
us as we gradually stabilise things based on your feedback. There
might currently be problems running it on 64bit Windows.
* **Windows**: [samplebrain_0.18.1_win.zip ](https://static.thentrythis.org/samplebrain/samplebrain_0.18.1_win.zip )
* **Mac (intel/m1)**: [samplebrain_0.18.1_macintel.zip ](https://static.thentrythis.org/samplebrain/samplebrain_0.18.1_macintel.app.zip )
2022-09-26 06:46:24 -03:00
Thank you to [Nik Gaffney ](http://fo.am ) for help with the Apple builds
2022-09-22 09:53:09 -03:00
Mac note: As this software is not on the apple store, to run the
binary you need to tell your mac it's ok: Go to System Preferences >
Security & Privacy > General. At the bottom of the window, select
"Allow apps to be downloaded from Anywhere".
2022-09-26 01:07:30 -03:00
2022-09-17 09:56:39 -03:00
**Linux install (Ubuntu)**
2022-09-26 01:07:30 -03:00
2022-09-16 04:31:45 -03:00
$ sudo add-apt-repository ppa:thentrythis/samplebrain
$ sudo apt update
$ sudo apt install samplebrain
If you'd like the right font, optionally:
$ sudo apt install ttf-mscorefonts-installer
2022-09-04 07:50:37 -03:00
2022-09-27 04:32:16 -03:00
# Old/broken/spurious binaries
* **Windows* *: [samplebrain_0.18_win.zip ](https://static.thentrythis.org/samplebrain/samplebrain_0.18_win.zip )
* **Mac (intel)**: [samplebrain_0.18_macintel.zip ](https://static.thentrythis.org/samplebrain/samplebrain_0.18_macintel.zip )
* **Mac (m1)**: [samplebrain_0.18_m1_v2.dmg ](https://static.thentrythis.org/samplebrain/samplebrain_0.18_m1_v2.dmg )
2022-09-26 01:07:30 -03:00
# Building from source
## Linux (Ubuntu)
2022-09-16 04:31:45 -03:00
Install libraries for the sample engine (use brew on mac, MinGW on win):
2022-09-26 01:07:30 -03:00
2022-09-04 07:50:37 -03:00
$ sudo apt install libsndfile1-dev portaudio19-dev liblo-dev libfftw3-dev
2022-09-26 13:20:56 -03:00
Install dependencies for the interface:
2022-09-26 01:07:30 -03:00
2022-09-04 07:50:37 -03:00
$ sudo apt install build-essential qtcreator qt5-default
2022-09-16 04:42:28 -03:00
Build & run it:
2022-09-04 07:50:37 -03:00
2022-09-26 01:07:30 -03:00
$ mkdir build
$ cd build
$ qmake ..
$ make
$ sudo make install
$ samplebrain
## Mac
Install libraries for sample engine:
2022-09-26 13:15:58 -03:00
$ brew install fftw portaudio liblo libsndfile
2022-09-26 01:07:30 -03:00
2022-09-26 13:20:56 -03:00
Install dependencies for the interface:
2022-09-26 01:07:30 -03:00
$ brew install qt
$ brew link qt
Build & run it:
$ mkdir build
$ cd build
$ qmake ..
2022-09-04 07:50:37 -03:00
$ make
2022-09-27 04:35:44 -03:00
`samplebrain.app` should then be in the app folder for you to run.
2022-09-16 04:31:45 -03:00
2022-09-17 09:58:27 -03:00
# Mac build additions
2022-09-16 04:31:45 -03:00
To make a mac app bundle:
2022-09-26 01:07:30 -03:00
2022-09-26 13:20:56 -03:00
Run `macdeployqt` which copies all dependencies inside the app.
2022-09-26 01:07:30 -03:00
$ cd build
$ macdeployqt
2022-09-26 13:20:56 -03:00
If the icon is not visible, you might need to copy desktop/samplebrain.icns (the icon) to the Resources directory in the app bundle.
2022-09-26 01:07:30 -03:00
$ cp ../desktop/samplebrain.icns samplebrain.app/Contents/Resources
2022-09-26 13:20:56 -03:00
Then edit Info.plist to add samplebrain.icns to CFBundleIconFile. Key `CFBundleIconFile` should match:
2022-09-26 01:07:30 -03:00
< key > CFBundleIconFile< / key >
< string > samplebrain.icns< / string >
2022-09-26 13:20:56 -03:00
You might also need to resign the app bundle after making any changes
2022-09-26 13:15:58 -03:00
$ codesign --force --deep --sign - samplebrain.app
2022-09-04 07:50:37 -03:00
## What's here
2022-09-07 07:18:06 -03:00
1. brain:
* samplebrain engine code
2. app:
* code to build the Qt GUI app
2022-09-07 07:03:23 -03:00
3. gui:
* qt designer project files
2022-09-16 04:31:45 -03:00
4. desktop:
2022-09-18 04:46:37 -03:00
* various icon files etc
2022-09-07 07:03:23 -03:00
4. cooking:
2022-09-18 04:46:37 -03:00
* some sketches and ideas
2022-09-04 07:50:37 -03:00
* proof of concept written in python
2022-09-26 01:07:30 -03:00
* brief initial (abandoned) attempt at clojure version
2022-09-18 04:46:37 -03:00
MFCC algo courtesy of the Aquila library by Zbigniew Siciarz MIT/X11
licence 2007-2014 (see brain/src/aquila/LICENCE)
2022-09-26 01:07:30 -03:00
2022-09-16 05:34:00 -03:00
This program is free software licenced under GNU General Public
2022-09-22 09:53:09 -03:00
License version 2 (see LICENCE).
Written by [Dave Griffiths at Then Try This ](http://thentrythis.org ).
2022-09-18 04:44:43 -03:00