seq~ read and write

Oct 18, 2011 at 5:20pm

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

#59407
Oct 19, 2011 at 11:25am

anyone?

#213761
Oct 19, 2011 at 12:33pm

Make sure that the filename has a .txt extension.

#213762
Oct 19, 2011 at 4:31pm

i knew it had to be something simple and obvious.

thanks for that i’ll give it a try.

#213763
Oct 19, 2011 at 4:42pm

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…

#213764
Oct 19, 2011 at 5:25pm

As I understand it, seq~ is a sequencer for control data, not audio..

#213765
Oct 19, 2011 at 5:44pm

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… :~

#213766
Oct 19, 2011 at 6:05pm

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.

#213767
Oct 19, 2011 at 6:24pm

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

– Pasted Max Patch, click to expand. –

i guess the midi flush is the problem?

#213768
Oct 19, 2011 at 7:57pm

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.”

#213769
Oct 19, 2011 at 8:51pm

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.

#213770
Oct 19, 2011 at 11:44pm

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.

#213771
Oct 20, 2011 at 7:10am

i wasnt using the = in the messages, just in that post.

great i’ll give those a go. many thanks for your help. :)

#213772
Oct 20, 2011 at 11:43am

the folder object is great. does that work with buffer~?

#213773
Oct 20, 2011 at 12:09pm

Sure. The filenames of umenu are sent out on the middle outlet and can be used for anything you like.

#213774

You must be logged in to reply to this topic.