pxcm/SampleBoot 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 Other 许可证,目前获得 39 个 Star、2 次 Fork。
仓库全名
pxcm/SampleBoot
README 摘要
A boot selector for the Akai MPC Sample sampleboot.com · Download · Theme editor online · Roadmap · Support on Ko-fi SampleBoot is a boot menu for the Akai MPC Sample. Custom OSes for the MPC Sample, such as Melodee, SampQOL OS and MPC Simple, start from an autorun folder on the SD card, and a card holds only one of them. To change OS you had to swap SD cards, or move autorun folders around on a computer, and your…
One card, every OS: a boot selector for the Akai MPC Sample. Pick the stock firmware, Melodee, SampQOL OS or any custom OS with the encoder at power-on.
SampleBoot is a boot menu for the Akai MPC Sample. Custom OSes for the MPC
Sample, such as Melodee,
SampQOL OS and
MPC Simple, start from an autorun
folder on the SD card, and a card holds only one of them. To change OS you had
to swap SD cards, or move autorun folders around on a computer, and your
projects ended up spread over several cards.
With SampleBoot, one SD card holds them all: the stock firmware, every custom
OS and as many versions of each as you like. When the MPC starts, turn the
encoder, push it, and the system you chose starts. Your projects and samples
stay on the same card.
It starts from the SD card. It does not change the stock firmware.
Without the card, or with its autorun folder renamed, the MPC starts as
stock.
The stock Akai app is always one of the choices.
Works with stock firmware 1.3.0.12 and 1.4.0.8, from the same card
(on 1.4, with Developer Mode on: see Firmware 1.4).
See Works with for the systems known to work.
SampleBoot includes no OS: you download each one from its own project.
Features
Boot menu
A splash screen at power-on, drawn line by line as on an old screen: dark,
light, your own image, or off.
A full-screen carousel: turn the encoder to browse, push it to start.
Every system shows its own image, or a title screen with its name.
Starts the system on screen by itself after 10 seconds (20 once you browse),
with beeps in the last 5 seconds that follow the Main Volume knob. The last
choice comes first next time.
Press POWER in the menu to switch the MPC off.
The pad and button lights left on by the previous app are switched off.
One card, many systems
Add an OS by copying its autorun folder into autorun/mods/. No tools, no
computer setup.
Keep several versions of the same OS and go back to an older one in a few
seconds.
Give each system a name and an image, or hide it without deleting it.
Safety
If a system does not start within 60 seconds, the stock app starts instead.
Every audio setting it touches is put back before the chosen system starts.
last-boot.log on the card tells what happened at the last boot, and
boot-history.log keeps the last 10 boots, each with its date.
Your look
Every colour on screen can be changed in sampleboot.conf.
The theme editor, a page that runs offline in your browser, previews every
screen exactly as the MPC draws it and writes the file for you.
Works with
SampleBoot runs each system’s own autorun folder, unchanged, so any OS that
starts from autorun should work. These are the ones known to work so far.
The firmware columns show the versions known to work. Not yet: the system
itself runs only on 1.3.0.12 for now (SampQOL and Am MOD change the stock app
of 1.3.0.12). –: not checked on that firmware yet.
Tested: on the author’s MPC Sample.
User report: a user confirmed it works.
Author: the system’s author added SampleBoot support and checked it.
Using another system with SampleBoot? Open an
issue with its name and version,
and it goes on the list.
Requirements
Akai MPC Sample with firmware 1.3.0.12, or 1.4.0.8 with Developer Mode on
An SD card, and a computer to copy files to it
The custom OSes you want, downloaded from their own projects
Optional: Python 3, for the helper script
Install
Back up your SD card first.
Download SampleBoot-1.0.5.zip from
Releases and unzip it.
Copy its autorun folder and its autorun.sh file to the top level of the
SD card. (Firmware 1.3.0.12 only needs the folder; 1.4 needs the file too.)
If the card already has an autorun folder from an OS, move that folder
aside first: it becomes one of your systems in the next step.
For each OS, copy the autorun folder from its release into
autorun/mods/ and rename it to the name you want in the menu. If the OS
also comes with a folder for the top level of the card (MPC Simple’s
MPC-Simple), copy that one to the top level, as its instructions say.
Put the card in the MPC and switch it on. On firmware 1.4, see
Firmware 1.4 first.
The card then looks like this:
autorun.sh starts SampleBoot on firmware 1.4
autorun/
autorun.sh autorun.json autorun.check SampleBoot's launcher, do not edit
sampleboot/ SampleBoot itself and its settings
mods/
Melodee 0.3.0/ Melodee's "autorun" folder, renamed
SampQOL 0.3.0/ SampQOL's "autorun" folder, renamed
To add, update or remove an OS later, copy, replace or delete its folder in
autorun/mods/. A folder whose name starts with _ is hidden from the menu.
Firmware 1.4
From firmware 1.4, the MPC no longer starts the card’s autorun folder by
itself. It starts only an autorun.sh at the top of the card, and only with
Developer Mode on:
On the MPC, hold SHIFT and press Pad 8 (MIDI Config). Under
Dev Enhancements (Beta), turn Developer Mode on. Note: the MPC
records permanently that Developer Mode was turned on.
Put the card in. The MPC asks whether to run the script on the card: choose
Yes, and SampleBoot’s menu appears.
If you then choose the stock firmware, the MPC may ask again later: choose
No. SampleBoot doesn’t start twice anyway.
The menu appears about half a minute later than on 1.3, because the stock app
starts first and asks. Systems that change the stock app of 1.3.0.12 (SampQOL,
Am MOD) don’t run on 1.4: see Works with. If the card has an
autorun.sh at the top from another launcher, replace it with SampleBoot’s.
SampleBoot 1.0.5 was tested on a real MPC Sample with 1.4.0.8 (many thanks to
fabiomorena): the stock firmware, Melodee 0.10.4 and Rhythmer OS 0.3.0 start
from the menu. Earlier, 1.4 support was tested in the
Virtual MPC Sample
emulator: many thanks to its author, orrpunk-art. SampleBoot 1.0.4 and earlier
can’t show the menu on a real MPC with 1.4.0.8, because its kernel has no
/dev/fb0 (#6): use 1.0.5 or
later. For Rhythmer OS, its autorun folder goes into autorun/mods/ as
usual and its Rhythmer folder at the card root; its own top-level
autorun.sh is not needed. If you try other systems on 1.4, please tell us
how it goes.
Updating SampleBoot
Copy the new release’s autorun folder and autorun.sh over the old ones. Your systems in
mods/ stay. Copying replaces sampleboot/sampleboot.conf too: if you changed
it, keep a copy and put it back.
Helper script (optional)
tools/add_mod.py (Python 3, nothing else needed) installs or updates
SampleBoot without touching your settings, and adds OSes straight from their
release zips, top-level folders included:
python3 tools/add_mod.py /Volumes/MPC ~/Downloads/Melodee-MPC-Sample-v0.3.0.zip
python3 tools/add_mod.py /Volumes/MPC some-os.zip --name "Some OS 1.0"
python3 tools/add_mod.py /Volumes/MPC # install or update SampleBoot only
Using it
Control
Action
Turn the encoder
Browse the systems
Push the encoder
Start the system on screen
No input for 10 s (20 s once you have browsed)
Start the system on screen
POWER
Ask whether to switch the MPC off: push the encoder or press POWER again to confirm, turn the encoder to go back
SampleBoot appears a few seconds after power-on: the stock app starts first,
then SampleBoot takes over the screen, as Melodee and SampQOL do. Its splash
screen comes first; turn or push the encoder to skip it.
The countdown beeps come from the speaker, or only from the headphones or line
out when something is plugged in. Their volume follows the Main Volume knob.
Names and images
Name: the folder name, or the first line of a text file sampleboot.txt
in the folder.
Image:sampleboot.png, sampleboot.jpg or sampleboot.bmp in the
folder, any size; 320×240 looks best. Keep the top and bottom 46 pixels free of
important details: the menu bars cover them. autorun/mods/_template/ holds
an example that marks those areas. SampQOL’s own splash screen is picked up
by itself. Without an image, a title screen with the name is shown.
Stock entry: the same files in autorun/sampleboot/.
Systems that need to run from autorun/
A few systems work out where the card is from their own folder, and get it
wrong from autorun/mods/: their file browser stays inside autorun/mods/,
or they don’t find their files. Put an empty file named sampleboot.inplace
in the system’s folder: SampleBoot then runs it from autorun/ itself, as if
it were alone on the card. Nothing on the card is moved.
MPCTRACKER and MPC 600 S need this file. If you make a system for the MPC Sample, see
the notes for OS authors.
Settings and colours
autorun/sampleboot/sampleboot.conf:
Setting
Default
TIMEOUT
10
Seconds without input before the system on screen starts (0 = wait forever)
TIMEOUT_BROWSE
20
The same, once the encoder has been turned
BEEP
100
Level of the countdown beeps, 1–100, scaled by Main Volume (0 = no beeps)
GRACE
60
Seconds a system gets to start before the stock app starts instead
BOOT_HISTORY
10
Boots whose logs are kept in boot-history.log, each with its date; 0 = none
ROOT_FILES
"mpcqol.conf"
Settings files an OS keeps at the card root and reads from the folder above its own; SampleBoot shows them in autorun/mods/ too (SampQOL’s 16 USB outputs need this). Not done for systems with sampleboot.inplace, which find them by themselves
SPLASH
"dark"
Splash screen: "dark", "light", "off", or a name of your own to show splash-<name>.png (320×240) from autorun/sampleboot/
SPLASH_TIME
2
Seconds the splash stays on screen; turning or pushing the encoder skips it
ROTATE
auto
Screen rotation on firmware 1.4: auto, 0, 90, 180 or 270. Not in the file: add the line only if the menu shows turned
The rest of the file sets every colour on screen, and the opacity of the bars,
as "#RRGGBB". sampleboot.original.conf, next to it, keeps the original values.
The MPC Sample’s panel shows 65,536 colours (16-bit RGB565), so each colour is
rounded to the nearest of them.
Theme editor
tools/theme-editor.html is a single page that works offline, in any browser,
and sends nothing anywhere:
previews every SampleBoot screen exactly as the MPC draws it, over test
images or an image of your own, and plays the splash screen;
has a colour picker and a short explanation for every setting, and
ready-made themes;
reads your current sampleboot.conf (paste it in) and writes the whole new file,
ready to copy or download.
Known behaviour
Small clicks with the volume up. The stock firmware itself clicks after
the start-up animation and when the SD card screen closes, with or without
SampleBoot. When SampleBoot’s menu appears, opening the audio for the
countdown beeps can click slightly. It is kept as small as possible but not
fully avoidable. With BEEP=0 SampleBoot leaves the audio alone and that
click is gone, together with the beeps.
Melodee’s on-device updater (release zip on the card, B3 INSTALL) refuses
to update while SampleBoot is installed, without changing anything. Replace
Melodee’s folder in autorun/mods/ instead.
Troubleshooting
Read autorun/sampleboot/last-boot.log on the card: it describes the last boot.
boot-history.log, next to it, has the boots before, oldest first.
If the MPC hangs, hold POWER until it switches off, remove the card and
rename its autorun folder to autorun-off. The MPC then starts as stock.
Firmware 1.4: if the MPC doesn’t ask to run the card’s script, check that
Developer Mode is on and that autorun.sh is at the top of the card, next to
the autorun folder.
Firmware 1.4: if the screen stays black but you hear the countdown beeps,
and last-boot.log says cannot open /dev/fb0, update to SampleBoot 1.0.5
or later.
Folder names may contain spaces. If an OS does not start from such a folder,
rename the folder without spaces and put the name in sampleboot.txt.
To report a problem, open an issue and attach
last-boot.log.
Build from source and technical notes
How SampleBoot works on the device, the files it uses and how to build it:
docs/TECHNICAL.md.
Credits and licence
SampleBoot is by Alessandro “Paxi” D’Esposito (pxcm),
under the MIT licence.
The control surface map, the display and audio details and the autorun
signature come from the research published by
sample-base (keremimo, the author
of Melodee) and the mpc-sample-plugins project. Thank you.
The “CustomOS” test images are made-up logos generated with Magnific.
SampleBoot logo by Alessandro “Paxi” D’Esposito.
SampleBoot is an independent project, not affiliated with or endorsed by
inMusic Brands or Akai Professional. Akai Professional, MPC and MPC Sample are
trademarks of inMusic Brands, Inc., used here only to say which device
SampleBoot is made for.
评论