DigiChain - web app for making sample chains

DigiChain is a web app made to make the creation of sample chains as easy as possible for use on the Digitakt (and any other sampler that can slice-up samples).

Create drum kits for the OP-1 Field / OP-Z.

Automatic creation of .ot slice data files when exporting as 44.1k 16/24 bit.

Embeds cue markers for M8 slicer.

https://digichain.brianbar.net/

Please make sure you are running the latest browser version available.

  • Chrome / Edge 113.x.x (or other mainline Chromium based browser)
  • Safari 16.3 / WebKit-7616.1.11.3
  • Brave requires the shield to be down for the DigiChain url (Iā€™m looking into this issue)

Other browsers have no verified support, and I have no plans (or spare time) to test, verify, and fix things for those browsers.

If you have an issue or feature request, please do log it on the github repo, as I might miss it in this thread. Issues Ā· brian3kb/digichain Ā· GitHub Thanks!

OT Exports

OP-1 Field Kits


v1.4.12

  • Added Double selected action to add a copy of a sample to the end of itself for the selected samples.
  • Prev / Next buttons on the edit panel to navigate between samples without needing to close the edit panel and re-select from the list.
  • Cleaned up selected actions list, added overflow so list can scroll on mobile and flex to the width of the panel.
  • Shift + Ctrl/Cmd click stretch longest/shortest selected action to set the stretch length in samples instead of seconds.
  • Shift + Click on Trim Right button in editor, or selected actions, to also trim silence from the start (left) of the sample.
  • Changed the behavior of the grid size buttons, clicking will now set the grid size and keep the selection, to also change the selection is now the shift+click action; This is inverted from other versions, but has been a requested change by several users.
  • Shift + L will toggle the lists visibility, useful for simple chaining/conversion if loading a large number of files that can cause the browser dom rendering to slow.
  • Hide ā€˜Create .OTā€™ button on sample panel if target SR is not 44100.
  • Added common configuration for Digitakt II.

v1.4.11
  • Fixes bug where saving slice data from imported slice file did not apply slice markers consistently.
  • Bug fix where parsing wav file headers containing multiple fmt chunks, where the first fmt chunk does not contain the samples format data.

v1.4.10
  • .xrns file contents parsing (useful for getting the samples out of a Renoise project file).
  • Parse the Renoise song data from within project files and extract slice markers.
  • When slicing from OP-1 Field tape.json, prevent the ot slice loop point CSS class being applied.
  • Drag-out single file from list (Chrome).
  • Option in settings to reverse all even samples in an exported chain (back-to-back mode).
  • Snap to zero-crossing toggle option on selections on edit panel.
  • Visual zero-crossing indicator on edit panel selection start and end points.
  • Surface tempo detection method to the edit panel to detect from the currently selected section of the waveform.
  • Fixed regression on .ot file generation not correctly setting the quantize value default to ā€˜directā€™ instead of ā€˜pattern lengthā€™.
  • Fixed bug when setting slice-grid options from the audio settings panel.
  • Added keyboard shortcuts info pop-up (Shift + ? / Shift + K).

v1.4.9
  • Store list in indexedDb for optional restoring of the last session on next load.
  • Map the Ctrl key to the Cmd key for macOS keyboard shortcuts.
  • Automatically ignore empty or nonsense cue markers (e.g. zero length or start/end greater than file length, end greater than start).
  • Improve handling of joining chains with other chains/files and slice types.
  • Normalize the slice-type to the common format when processing internally.
  • Show the number of slices if the file has any on the slice-grid icon instead of OT/DC/OP text.
  • Improved the speed of conversion between spaced/none-spaced chains from the slice panel.
  • Allow users to change audio context when files are loaded without emptying list; An advisory message to confirm the action is shown, as the sample rates of all files in the list are internally resampled to the new context.
  • Decoupled the working audio sample rate from the export audio sample rate. This allows users to work at 44.1kHz, but export to 48kHz for example without destructively resampling the list source buffers.
  • Audio context options are now an audio config panel, allowing arbitrary sample rates, and choice of bit depth and channel combinations.
  • A list of common configurations by hardware name are available in the audio config panel.
  • Audio config panel has slice grid options inputs so last used values are remembered. These values are also updated as part of the common configs list options.
  • ā€˜Retain session data between browser refreshes?ā€™ setting on settings panel.
  • Gain adjustment on the edit panel (Thanks to eljeff).
  • Option in settings panel to download single files when Shift+Clicked to prevent accidental downloads being triggered.
  • Added rough stretch to selected actions list, this attempts to retain pitch while doubling the duration of the sample.
  • Importing of Polyend Tracker (OG) .pti instrument files (mono only).
  • Toggle slice looping from the slice panel (useful for .ot exports).
  • Toggle file looping point from the slice panel (useful for .ot exports).
  • Correctly calculate the tempo and bar values on .ot exports.
  • Create .ot button on slice panel to create a .ot metadata file independently of downloading of the audio file.

v1.4.8
  • New serialize selected action, any selected samples that are stereo files, will have their stereo channels serialized to mono, by Left/Right, Side/Mid, or Left/Right/Side/Mid.
  • Dual mono exports setting error.
  • Prevent find crossing point on edit panel.
  • Issue with auto-naming of duplicate files/same file imported multiple times.
  • Trim-right on sample that had slices removed threw unhandled error.
  • Merge/Blend panel mono/pan controls not consistently updating UI when clicked.
  • Fixed rendering bugs with Firefox 118.x when page zoom higher than 100%.
  • Removed arcs in svg for better representation of the waveform graphics.
  • Ctrl + Click on the ā€˜add samplesā€™ icon will add a blank sample (8 samples in length) to the list to use for padding chains.

Full Change Log


More info -> DigiChain v1.3.0 ā€“ brianbar.net


https://www.microsoft.com/store/productId/9NJQM7GM9KV8


If you want to take a look at how things are progressing, you can use the development branch https://digichain-latest.brianbar.net/ - this may be broken at any point, but will be more frequently updated as I work on the project.

147 Likes

Also, while this is a web app, it all runs locally - the samples donā€™t leave your computer as all processing is done in the browser in JavaScript.

10 Likes

This is so great - thank you.
I donā€™t have a digitakt, but there is a similar functionality on the m8 and this is great for that.
It looks so clean and very easy to understand.

Thank you!

2 Likes

thank you.

1 Like

This looks amazing. Fantastic work! And a massive shoutout for sharing with your peers!

2 Likes

this is amazing. thanks a million Brian :partying_face::space_invader:

2 Likes

thanks brian, this is great!

2 Likes

Great! Thank you!

1 Like

As a massive fan of OctaChainer, itā€™s cool to see this is a web app as it means I donā€™t need a program installed to make slice chains, and I could theoretically use it on my phone/tablet.

1 Like

At the moment, this is focused on the Digitakt, so all output is to 48k/16bit mono. no longer the case.

If you load up a stereo file, it will by default use the left channel, with the option per sample to change that between left, right or summed. edit: Stereo samples are now supported as stereo exports when the session is set to a stereo out option.

And while it does work on Android, the waveform view isnā€™t rendered correctly, and the up/down sample list position buttons are weird, and the UI needs some changes to scale better at lower screen sizes (all of which Iā€™m taking a look at this evening after work, as I want to be able to use it on my Samsung phone). These issues are resolved.

I did take a peek at the OctaChainer .ot file struct on that projects github source, it looks straightforward enough to port to JavaScript. I do also have an OT, so once Iā€™m happy with the DT features I may add some OT specific stuff here too, but as there is already OctaChainer for that use-case, I figured focusing on DT stuff is more useful. - edit: Creation of .ot meta files can be toggled in the menu for 44.1khz 16/24bit audio exports.

10 Likes

And surprisingly, it works as it does on the desktop on my iPad, the only issue I see on iOS, is the sample length sort isnā€™t accurate, which I will fix later issues resolved.

10 Likes

Awesome work!
I truly believe weā€™re still just scratching the surface with web tech.
I had been working on a now abandoned Song mode/arranger for digis that ran from a web app, but Iā€™m no web programmer so didnt get far.
Did you write this in js or compile to wasm via something like rust?

2 Likes

Thanks! This is all vanilla JavaScript with HTML/CSS for the UI and HTML Canvas for the waveform view.

I had downloaded all the MD sound-packs from the Elektron shop on Sunday, and was having a hard time converting those files to .wav to load onto my Digitakt, so I had a dig into how to convert those files, found some C++ on GitHub where someone else had already figured out how to parse the binary, I re-wrote that in JavaScript and then learned some stuff about the web audio APIā€™s (Iā€™ve only ever done audio programming with CSound before).

Then it was a case of, ā€œwouldnā€™t it be neat to join these samples into a chain for the DT slice grid?ā€, and so it grew from there.

Iā€™ve been working on it most of Sunday, then every evening this week after work.

I made a MIDI spreader last month (https://brian3kb.github.io/midi-spreader/) using web-midi to spread notes over multiple channels, I plan to add some form of MIDI support to this once the existing bugs and audio processing bits I have in mind are done.

11 Likes

Is this so you can use Digitakt as an 8 voice poly synth? (that is if all 8 tracks have the same Sound assigned)

Yep - I was too cheap to buy an RK-003 cable, so I made that instead lol

2 Likes

haha, me too. But I previously used a Mosaic script on iPad, so I was actually too lazy and cheap :rofl:

1 Like

can you quickly explain the midi spreader? sorry my mind is a bit blown.

1 Like

Sure - before you open it, make sure you have your MIDI devices powered on and connected.

Choose the channel to receive MIDI from (all devices in the input list will have their input on this channel go out to the selected output channels to the chosen output device only).

Click the boxes to choose the channels to send out MIDI on (you canā€™t choose the input channel for obvious reasons!).

Choose the output device in the MIDI output list, this is the only device that will receive the spread notes.

When you play notes, the input device will highlight, and the output channels will highlight to show things are working:

4 Likes

Thanks so much, really appreciate the information and the access to the utilities. As per the conditions of use, are you step recording the note spread into the dt sequencer?

Itā€™s just forwarding notes from one channel to the others, it doesnā€™t know about the device receiving the MIDI (other than its ID and name).

Live recording works great on my Syntakt/Digitakt to record MIDI at the same time on multiple tracks, Iā€™m not sure how that works in step-record mode tbh (and my Elektron gear isnā€™t to hand at the moment to test it out).

1 Like