# 5 Moons – m5 hack
Version 0.2 b.e.t.a.
## ! Very Important ! Please read…
If you have been using a previous version of this “m5 hack” patch, installing this update by copying the `pd` folder in this project to the root of your SDCard at `/pd` will overwrite your existing recordings (since the m5 hack patch stores recordings at `/pd/songs`). Make sure to back up your recordings before installing the new version. (e.g. simply rename the existing `/pd` folder on the SD Card something else, e.g. `/pd-previous` before installing this update. )
> Please note that this is a very early experimental release, and you might even be the first person to try it after me. Please take care of your stuff accordingly – protect your ears & equipment, and back up any files on your 5 Moons sdcard that you wouldn’t want to lose. Nevertheless, I’m starting to play with it more than build on it, so I thought it was a good time to share.
This is a hacked re-build of the PD patch that comes with the 5 Moons. My aspiration for this patch is to get more reliable looping and recording out of the 5 Moons. It still records and reads to/from the sdcard, but it plays back with continuous looping to make all the tracks line up more predictably.
The second thing is that looping is always enabled, and the loop lengths for all tracks are quantized to the length of Track 1. That is, all tracks will loop at one or more full loops of track 1. If a track is shorter than a full multiple of T1 lengths, then it will play silence and loop at the next T1 start point.
The operational similarities and differences are spelled out below. Mostly it has to do with how recording works. Please read all the way through so that you know what to expect. I still have to work out some techniques to eliminate some clicks and glitches, especially at the start of recordings.
Note that this patch stores your “Songs” (wav files) in a different `songs` folder : it’s located at `/sdcard/pd/songs`. But I definitely recommend backing up any existing songs and work e.g. your entire 5 Moons sdcard, before experimenting with this patch.
Make sure to hit the ‘power-off’ button before disconnecting power to the 5 Moons. I’ve experienced weird instances where audio files have been lost – I think the system needs to properly unmount the sdcard.
## Installing
The original 5 Moons patch is in the folder `/pd` on the 5 Moons sdcard. The installation process simply replaces that patch with this hacked re-build. The following installation procedure should work:
* Mount the 5 Moons in Disk mode.
* Highly recommended: Make a backup of the existing `/songs` and `/pd` folders to another disk.
* Rename the current `/pd` folder on the 5 Moons to something else, to make it easy to restore, e.g. `/pd-previous`.
* Copy the `pd` folder from this repository and all of its contents to root of the sdcard so there is now a new `/pd` folder there.
* Note: The m5 hack patch reads/writes recordings from `/pd/songs`.
* Restart the 5 Moons.
## Controls
### Buttons, sliders, and knobs that should work as usual
There are no major differences to how these functions work between this version of the 5 Moons patch, and the original one:
* Power Switch
* Output Volume
* Monitor On/Off
* Input VU Meter On/Off
* Track Volume
* Start/Stop
* Prev/Next Song
* New Song
### Buttons that work differently in this patch (depending on the start/stop/recording/bouncing state)
The following controls work differently
* Bounce Down
* Record Enable 1-5 (Track buttons)
### Buttons that don’t currently do anything in this version
* Playback Loop On/Off (looping is always enabled)
## How to use the new recording functions
### When 5 Moons playback is *stopped*
Track Record Enable Buttons
* Press-and-hold a track button for ~1 sec to record-enable it. The light will turn purple. It will not start recording yet – it is armed. Recording will start when either: 1. An input signal above a certain threshold comes in on the input channel; Or: 2. You press the Start/Stop button.
* The track LED turns red when recording starts.
* Note that once a track is armed, any audio previously in the track will be erased, even if recording is cancelled.
Bounce Button
* Press the bounce button to arm Bounce recording. The lights on all tracks will turn blue. Bounce recording will start when either: 1. An input signal above a certain threshold comes in on the input channel; Or: 2. You press the Start/Stop button.
* The track LEDs turn red when recording starts.
* Note that a new song is created as soon as Bounce is ‘armed’, so if you cancel it, you will have an empty song in the new folder that was created.
### When 5 Moons is *playing*
If 5 Moons is playing a song, and no tracks are recording, here is how the track/bounce buttons work:
* Press a track button to arm the track. The LED will turn yellow. It will automatically start recording at the beginning of the next loop of Track 1.
* The LED will turn red when recording starts.
* Note that once a track is armed, any audio previously in the track will be erased, even if recording is cancelled.
Bounce Button
* Press the bounce button to arm Bounce recording. The lights on all tracks will turn yellow. Bounce recording starts at the beginning of the next loop of Track 1.
* The track LEDs turn red when recording starts.
* Note that a new song is created as soon as Bounce is ‘armed’, so if you cancel it, you will have an empty song in the new folder that was created.
### While a *track is being recorded*
* If a track is being recorded (red LED), press the track button to stop recording immediately while continuing playback of other tracks. Or, press the Start/Stop button to stop all tracks playing/recording immediately.
* The track will start playing in a loop the next time Track 1 loops around. The loop-length of the newly recorded track will be a multiple of T1 loop-lengths. (Silence will be played for the remaining loop-time of the track if the new recording is not an exact multiple of T1 loop-lengths.)
### While 5 Moons is *bouncing*
* If Bounce recording is active (red LEDs), pressing the Bounce button again will stop-arm the bounce recording. The LEDs will turn orange, and bouncing will stop at the beginning of the next loop point of Track 1. Or, if you press Start/Stop, all tracks will stop playing/bouncing immediately.
* After bouncing stops, 5 Moons will switch to the new Song, and start playing the new recording on Track 1. (Make sure the Track 1 volume slider is up to hear it).
