I have found all of the unique Norns sequencers I have tried to be inventive and endlessly inspiring. I was wondering if there was any way that the midi generated by those sequencers could be recorded to a file in the Dust folder (for example), similar to the way that audio can be recorded to Tape? It would be incredibly useful to me if, after stumbling across a set of sequencer settings that I liked, I could press a button and record that midi in the same way I can currently record the audio to Tape, without having to hook up a DAW or other device first to do so. Could this be done within Norns using virtual midi cables, perhaps, sending the output from a script directly to a file?
Any thoughts that you have would be appreciated - thanks in advance!
it could be done, but of course needs some engineering.
specifically, i think it could be done as a mod entirely in lua, without needing external processes or virtual midi devices.
here’s one way it could be structured, the mod would inject stuff into various system functions:
patch audio.tape_record_open to optionally begin recording MIDI events as well. could stream to a file, or just write events and delta-times to a table in RAM, saving it on ..._record_close. (maybe just have a output_xyz.midi for each output_xyz.wav. wav/midi selection could be exposed as a mod option or something. )
patch MIDI input handlers. there is a single function that is called for all devices on all scripts. the mod would add a routine here that saves [event data, time delta] to the output table/file.
Ha! Gerrit is a great guy, and I love all his stuff (although some of it, like the RK008, is too rich for my blood ).
I’m glad people think this idea is worth exploring! Unfortunately for me, the technical implementation ideas everyone has mentioned are way beyond my current capabilities (the most programming I have done with Norns to date is add the Midigrid line of code to enable Launchpad connectivity in several scripts). Nevertheless, I’m happy to help bring this to life any way I can, whether it be just beta testing or trying to write some aspects of the code if you point me in the right direction. The possibility of saving my Norns sequencer noodlings as midi files for future development is very exciting.
it can record midi with quanitzation and play it back as a mini midi loop (see “recording midi” below). this is useful for getting ideas from a midi keyboard recorded into norns quickly (in case you don’t have a daw) and also i find it useful for composition and using midi in a non-midi script.
I wonder if one of the virtual midi ports could be utilized as an always-on recording device. Then there would be an option to grab the last chunk of time or start capturing to a file via a menu option or line of code, similar to tape. Although building it into tape like suggested above might be just as simple.
I was intending to add MIDI file recording to the script I’m working on at the moment. I’ll probably still attempt it myself, but having builtin real-time recording of MIDI data from any script would be great!
Any recorder should also be able to record other types of MIDI data - CCs (most importantly), program-change, pitch-bend and maybe even NRPNs and sysex.
I found a couple of Lua libraries for MIDI file creation. I’m having network issues at the moment, so can’t find links, but a quick search should turn them up. I think one needed to be installed via Lua Rocks (which isn’t installed by default on Norns), but the other (simpler) library could be downloaded directly.