MIDI META MESSAGES AND SEQ

Dan Laüt's icon

How does one write a meta message, (0xFFh…) to a seq-readable file?

I want to insert the time signature (e.g. 255 88 4 4 2 24 8) to D-time 0 of an existing seq-playable .txt file.

I insert 0 255 88 4 4 2 24 8 at the top of the file and save it.

When I reload it into seq, no data after the time signature.

Moreover, it confuddles  the seq which has to be re-instanced to get functional again.

For instance:

0 144 60 100;
500 128 60 100;

plays a quarter note C4, but

0  255 88 4 4 2 24 8;
0 144 60 100;
500 238 60 100;

dies after the first line.

Source Audio's icon

seq can read, play and write standard midi file - a binary .mid file

and retain meta data.

once you export it as text file it can not contain metadata

Dan Laüt's icon

I feared as much. But how to insert the meta in the midi?

Source Audio's icon

If you want to insert hex code yourself, then there is

fileout.js or something named like that, I don't remember exactly.

one can read bytes in and insert meta data in between.

There are some meta data editors arround as well.

I am out of house, but I'll post some more infos tomorrow.

Source Audio's icon

Back here, I think better for your text based seq files would be to use sysex

which seq does accept and play to form metadata that you need.

You can create own sysex strings for whatever you need , like time signature, tempo or other infos.

If you need it only at sequence beginning print and parse sysex

using console.

If you need sysex anywhere in the file,

then one can extract sysex using filein, text etc

..................

But if you want to insert meta data into midi files,

then there is mxj based fileout which you allready know.

I prefer js based one:

autowatch = 1; inlets = 1; outlets = 1; var f;

function createFile(fileName) {f = new File(fileName, "write", []); outlet(0, 1);}

function closeFile() {f.eof = f.position; f.close(); outlet(0, 0); }

function insert() {var intArray = arrayfromargs(messagename, arguments);

f.writeint32(intArray.slice(1));}

👽!t W∆s ∆lienz!👽's icon

At first glance, I read this as 'how to insert the meta into the mind':

But how to insert the meta in the midi?

SourceAudio is a veritable Max MetaMind 🙌

Dan Laüt's icon

Pure poetry. Thanks SA.

I also found this

It does not directly apply to the issue at hand, but it appears a very decent midi editor at first glance.

Roman Thilenius's icon
what about [text]?