Seq file type
Hi all, I have a question.
In the [seq] obj, if you want to write a file, you get 5 options to save your file as Midi, Sysex, Text, XML or JS, but this can't be done programmatically using a path with the name of the file and the right extension you want, unless you specify this in the [save as] dialog box

(that appears only with a empty write command). That means that also if you write [write ~/some path/test.syx], the created file is always named test.syx.mid.... is there another way to do that? In the attached files, some examples... Thanks!

(here the file will be created on a folder named "MID_Files" on the desktop)
And pay attention: in the reference of [seq], there's a info about the write message, that explains that the write message can be followed by a symbol (the path with the name of the file) and a int (format)... but this int is only regarding the midi format (0 or 1), but not the File Format name (mid, syx, txt, xml or js)....
write ~/Desktop/xxx.txt writes it as text.
write ~/Desktop/xxx.mid as midi file
try with other types...
No, it doesn't work!!!!!!!!!!!!! Read my post please.
The result is xxxx.txt.mid and xxxx.mid.mid, always mid files.
With or without dot.
I’ll try again, was not working for me, and this was my first attempt, otherwise I’ll not send this message in this forum. Thanks.
Mind you - seq file is not really supporting real SYX files.
It can work only with standard midi file format and midi in text ascii format.
All that extensions xml, js etc mean nothing, in principle it is same txt file format,
with different extension.
If you save .syx file using write dialog IT IS A FAKE, no trace of SYX format, which is plain HEX
that's why it probably appends .mid to it ...
seq is even not present as external, it is included in max binary executable.
with .syx it cant work.
but why does he get "xxx.mid.mid" from "save xxx.mid"?
I have not seen such behaviour with write whatever.mid and write whatever.txt
See here: .mid an .txt are ok. The other 3 not.

And what is strange, the xml file should be like a normal text file, but it's named with extension .mid (....), same for the js format.... for the mid I know only that It can be midi format 1 or 0, that has nothing to do with the file format... last thing: mid and syx can be the same, it's not a real problem....but the others not.
To repeat :
Max seq object can write only standard midi or text file.
All that extensions mean nothing, js xml txt is all the same.
Same for mid syx and that is bad because real SYX file has no header
only plain sysex messages.
Your problem is that seq objects recognises ONLY .txt or .mid
as valid extensions when file path is sent as write message.
Because that is only file format it really can write.
Here :

extract from max 818 binary ...
Ok, the solution seem to be only one: write only as mid or txt file, change the extensions outside, read any format (but they are only two).... right?
But there’s something that is strange...why in the save window you have all options and if you select one of them, everything is writed how it should be? Why is the programmatical writing different? For a normal user there should not be differences, and the file composition (if with header or not) is indifferent?....it’a a seq bug?
I am afraid that is it.If you want midi format use xxx.mid
text format xxx.txt
Later you can rename extension if needed.
There is another problem I noticed some time ago,
if you try to set file type for dropfile
using only midi won't do ... one needs to add both text and midi file types
to be able to drop any text based midi files.
But than a whole lot of files pass through even rtf applescript webloc etc
I am telling this because it also affects autopopulate umenu.
So trying to use it to pick files from a mixed directory is shit.
One needs to post process files by extension to get them out of way.
Or keep using only .midi midi files
You will find no trace of option to send full path to write file in seq file.
Not in help file and not in reference.
So it is either leftover from the past, and could be disabled any time in the future.
You would be astounded how many leftovers from the past Max versions are still included in the code,
even from max 3 time...
the seq object assumes that you have turned "show extension" off in your OS, haha.
It's strange because it's not only this.... and the final files can be text or decoded files see this examples....

this is the method one, using the normal write method and saving different files from

this is the method two, hiding or showing the file extension

With hided extensions...

Showed extensions.
Seems more a seq~ bug.
Last thing: if you watch the maxwindow, in the normal saving method, only 3 kind of savings will be show, in the programmatical method only one... Midi type is always never considered.
