Help with building a sequencer to control switches
I am trying to make a 32 step sequencer turn a switch off and on depending on buttons ticked within its step cycle. At present I have configured it so that a ticked button turns a switch on and off for the duration of a 1/16th note when the tempo is set to 120, however, this is done through manual calculations. I would like this feature to make more sense musically. Does anyone have any advice? I am using the phasor~ object, though I am not entirely sure what it is doing - I just know it works the way it is.
Also, I am trying to make it so that consecutively ticked buttons leave the switch open , however, it just opens and closes really fast in the current configuration.
Never really got into using [phasor~] for sequencing, but the reason you use it is because it's an audio process (therefore signal accurate timeing). [phasor~] is outputting a sawtooth wave from 0 to 1.
First, you should figure out how to convert BPM into Hertz!
I glossed over your sequencer and it's a little complex, but you might be able to use [change]. It filters out repetitions of a number, so you can use it for your gate problem.
I will definitely look into the [change] object - I do have some questions about that though if you could help me. Filtering out repetitions of a number will definitely stop the switch going on and off very quickly when consecutive boxes are ticked, however, once the switch opens there will then be no way of closing it again - as all prior repetitions/bangs will be filtered out.
This might help you:
That patch does look very useful as a reference point, and is exactly what I am trying to achieve.
Could you tell me, could the system of [unpack] [route] [join] you have used be applied to the sequencer I have developed using a [set] [gate] combination? I notice you have used a matrix instead. Is this because the matrix offers features which you could not achieve through other device combinations?
Also, how would you work out the duration of a single ticked box? Would you just divide the number of tickable boxes by the current tempo? So 15/300 = 20? I am not sure how that translates musically, in terms of note length.
Sorry for all the questions, I am relatively new to MAX. I will do some independent experimentation.
Original discussed patch V
I just adapted a sequencer building block I use to do what you want. I use matrix as you can adapt as many rows and columns as you want easily. For example, if I want to use it as a drum machine I can have row one as the kick, row 2 as the snare etc. With your method you have patch cords everywhere from your toggles and adding new rows or columns would involve patching extra objects etc instead of just making a simple change to a number. Also your object count is going to be rather high with your method.
To be honest your patch is quite hard to work out as its a bit cluttered and doesn't seem to work for me, sorry I don't have the time to unpick it. Maybe the art of max is to get something working and then work out how you can simplify it.
Musically, I'd just adjust the metro interval by ear personally, but look at the @interval attribute of metro and you have options for different time values which might suit you. Also, look at the help file for [transport] which might suit you even more!
That is helpful. The one issue I have noticed if I was to transfer that mechanism into my patch is that the matrix is outputting a stream of 0 and 1 depedning on which colum the pointer reads, whereas my patch just outputs a bang every time a button is ticked and nothing when one is unticked. It seems that the [join] [route] you have is reliant on the specific matrix output. I will go ahead and try a combination of things.