seq~ read and write
i am trying out writing sequencers into seq~ with the aim to be able to store them as patch of the patch then load them later. writing them doesnt seem to be a problem using the write message, i get a dialogue asking me to name and save in a location, but when i try and read message and navigate to where i saved the text file they are greyed out and dont give me the option to load them.
what am i doing wrong?
thanks
ned
anyone?
Make sure that the filename has a .txt extension.
i knew it had to be something simple and obvious.
thanks for that i'll give it a try.
well i gave it a try and writing was successful and reading was too, however it seems that once i loaded the txt file it wouldn't play out. i tried inserting a message to show me the info as it was playing but there was no sound...
As I understand it, seq~ is a sequencer for control data, not audio..
understood, what i should have said was that once i read the txt file, it seemed to have loaded and was playing, but didnt seem to be sending out the data, going to a midi out, that was going into a synth in ableton... hence my confusion over why i couldn't 'hear' the data as it were... :~
Ok, can you see the recorded data in the text file?
If so, connect 'print' to seq~ output to check what's actually sent out.
i tired that and the print window showed it was reading, but in between each event i got a warning saying "object = midi flush message = does not understand list" i'm pasting the patch to see if it makes htings easier, its maxforlive by the way
i guess the midi flush is the problem?
The problem is that you are recording a stream of raw midi bytes without converting into lists.
Quote from the reference page:
"Note: seq~ can be used to sequence MIDI data if the MIDI input stream is converted into lists of MIDI events. This conversion is necessary to avoid outputting a corrupted MIDI stream which would occur if only the raw int messages of a MIDI stream were sequenced individually and the seq~ object were not doing a simple forward linear playback."
good call. i decided to copy the example in that midi subpatch and use that rather than try to rebuild it.
so now i can indeed read and write sequences to text files. great :)
my next question is how can i have those text files as part of the patch, with the aim to record sequences live or recall 'recorded' sequencers in real time? i thought a message 'read = name of text file' would do it, but that doesnt seem to work. do i have to save the text file in a certain place?
would storing them in a coll be better?
thanks for your help.
The message 'read filename' (without '=') should work provided the file is stored in the search path of Max.
You may also look at the [folder] object which allows to fill a menu with the names of files in a folder.
i wasnt using the = in the messages, just in that post.
great i'll give those a go. many thanks for your help. :)
the folder object is great. does that work with buffer~?
Sure. The filenames of umenu are sent out on the middle outlet and can be used for anything you like.