trying to build first sequencer with multislider

    May 28 2009 | 1:26 am
    I am brand new to max/msp/jitter. i am trying to build my first sampler/sequencer. i have only used max/msp for three weeks now, so forgive me for my amateur capabilities, but you have to learn somewhere , right? can i use the multislider object to make a sequencer with audio? I know it is possible to do so with midi. here's what i want to do:example , i grab a wave file from my desktop that when you play it, a voice says "1, 2 >, 3, 4 , 5 ,6 , 7 ,8 ,9 ,10, 11, 12, 13,14, 15 , 16" andi want to get that >audio into a multislider , and set the bars to 16, so if i move the first bar >up, the "1" will have a high pitch, then i move the second bar down, >and the "2" voice will have a deep, low pitch, and etc., all the way to >sixteen. do you think it's possible? please be simple with your explanation, if possible, as the program can be overwhelming at first, and i have a limited knowledge of the capabilities and inner workings of max. Thanks for your time to read and observe this question!

    • May 28 2009 | 2:09 am
      You can't get audio into a multi-slider, but you can use it to control audio.
      Look into using snapshot~ to turn the output position of a groove object into a float (use the right-most output). If you scale the output of this to the number of sliders you want, you can use the fetch message of multi-slider to get the value of each slider as the sample plays.
      If you want to have each word in the sample play at the same speed but with different pitch, you need to look into the gizmo~ object.
      Make sure to read through all the help files of any object you come across, they are very very helpful!
      Objects you might want to look at:
      groove~ snapshot~ gizmo~ scale counter metro
      I could have posted a patch to do what you need, but I think its better if you figure it out, you'll learn a lot and its very satisfying when things come together!
    • May 28 2009 | 8:13 am
      I'm not too sure about what you are asking for, but this was my best guess:
      For the future, post your patches (using copy compressed from the edit menu) for people to help with. Just asking for something without any kind of patch based illustration generally won't get a response.
    • May 28 2009 | 5:16 pm
      thanks for your help timlloyd!im afriad i don't understand the message you sent me confortable in clouds, but i do appreciate your response, and in the future, i will make sure to post a patcher.
      tim, i will fool around with what you mentioned. i wiil get back to you within the week if i can't find a solution. i've never made anything before, so this will be a challenge for me. but i will try it alone without your help first. if all else fails, could you help me out? i have spent the last three weeks studying the tutorials. i have a very limited knowledge of how max works, but if i study a patcher long enough, i get it. yrs/m
    • May 28 2009 | 9:06 pm
      Ok, so i have a groove object setup. then, out of the bottom output, i connected a snapshot~ object, then connected a floating number box.after that, i added a "scale 0 1 0 16", then a +1, then a number box. good so far. the last number box counts to 16, exactly in syn with the wav file. perfect. now i am lost. i don't know what to do next.i read about gizmo, but it is over my head at the moment. i'm supposed to make some kind of connection to the multislider, but i'm not sure how to. i could not find any information on the fetch message, or how to use. i do feel as if i am the right path. can you help me with the next step Tim? thanks, Michael
    • May 28 2009 | 9:10 pm
      confortable in clouds, how do i get the patcher that you wrote up in my max/msp?
    • May 28 2009 | 9:15 pm
      nevermind confortable in clouds, i've figured out how to do it.
    • May 28 2009 | 9:46 pm
      ok, after experimenting a bit, i think i got the fetch message connected correctly to the multi slider. when i don'1 use it and connect my number box to the multi slider, i get one bar. with the flectch message attached, i now get 16 bars. now i just have to find a way so i can manipulate the wav sample's pitch in the multislider, without changing the tempo. just to refresh, i have a wav file of me counting 1 to 16 in perfect time. i would like to be able to manipulate the pitch of each "number" through a multislider. am i on the right path Tim?
    • May 29 2009 | 1:36 am
      Yeah, you're on the right track, but there are a few things you need to know/remember.
      You don't need the number boxes going into the loop min/max inputs of groove~, with loop mode on it will loop the whole buffer regardless of the length.
      If you connect a number box directly to the input of multislider it will set every slider to that number, which is why it looks like just one slider.
      Also you need to know about using $1 in message boxes. It can be used in lots of situations to be replaced by an incoming number, which is then sent out along with the rest of the message.
      For example the [loop $1] message with a toggle is the same as having a [loop 0] and a [loop 1].
      Its really helpful to look at the reference files as well as the help files to learn what kind of input an object understands.
      You can also click on an object's input to bring up a list of all the messages or types of input that it uses.
      Heres a patch that I think is more or less what you need, but don't forget to try to adapt it to do exactly what you want. Also there are a few things in there that you may want to fix but I'll leave that for you to work out.
    • May 29 2009 | 4:49 am
      tim, fantastic patch and great comments. that's a really fun one to play around with. nice work!
    • May 29 2009 | 6:31 am
      thank you very much for taking the time to help me. i will analyze the patcher to see how you made it. It would have taken me a few weeks to make that patch. i will start experimenting with very simple patches, then try to experiment with more complex ideas.
    • May 29 2009 | 6:52 am
      pepperclouds wrote on Fri, 29 May 2009 01:31thank you very much for taking the time to help me. i will analyze the patcher to see how you made it. It would have taken me a few weeks to make that patch. i will start experimenting with very simple patches, then try to experiment with more complex ideas.
      It's a great one to explore closely, especially with the ample comments. Remember right-to-left ordering when tracking down all those cords, if this comes into play. To definitively set your order of operations, use [trigger].
      Starting with simple and gradually growing outward is the way to go. Try to save little snippets of modules which do simple things, then re-use as needed. Get familiar with your most-used objects and what they do, check the Inspectors for all the goodies you can set, and click the left inlet to see what messages/attributes are available. With persistence and experimentation, soon you'll be able to make patches like that in a few hours rather than a few weeks!
    • May 29 2009 | 7:31 am
      max/msp.jitter is a beautiful program. i figure, if i am going to make music that is based around sound, i should have complete control over it. max allows this freedom. commercial software is often frustrating. there are interesting and appropriate things you can do with it, but if you have specific musical ideas, the commercial software could lead to dead ends. this forum is amazing. it's a great community of musicians communicating ideas and exoerimenting. so far i have studied the tutorails for three weeks. i read aand practiced about half of it, and i can understand the basic concepts if i study the patchers, but actually applying the ideas of the tutorials to a patcher can be very difficult at first. regardless, there is progress every day. approaching music with max is an exciting idea though, and it keeps me focused and inspired to learn the contents. i'm having trouble learning how to wire objects together, and some of the complex math equations are over my head. but i'm sure the repetition of reading the tutorials and practicing patches will pay off. i have countless musical ideas. it's a matter of learning how to translate them. how long did it take you folks to get some of the basics down?
    • May 29 2009 | 12:16 pm
      Definitely keep the right-left priority in mind, it can cause some really confusing problems if you aren't aware of it!
      In case you don't notice straight away, heres three things to try and improve in the patch. Firstly, you don't need 3 inputs for selector~ because the non-gizmo signal isn't being processed in any way. It should already work properly with [selector~ 2] but keep tinkering, there is almost always a more efficient way to arrange things.
      Secondly when using the gizmo~ version you will notice that values of 0 and 1 result in no transposition, and even though the scale range is from -8 to 8, scale is outputting:
      -8, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3 ,4 ,5 ,6 ,8,
      missing -7 and 7. -8 to 8 is actually 17 values, so you may want to try resetting the number of sliders in the multi-slider when listening to gizmo~. An easy way of doing this is to open the inspector and drag the "number of sliders" text on top of the multi-slider, which gives you a size $1 message. Its a really useful way of learning what attribute messages an object has.
      Or you could try keeping the multi-slider at 16 and using sel and message boxes directly after the gizmo~ scale to make the transposition range more sensible. It might take you longer to figure out, but it is possible, and there is always the option of just changing the high output range of the scale object.
      Lastly, try making the whole patch stereo.
      Don't worry about things taking a while to sink in at first, the longer you use the program, the more you learn, and hence the easier it gets to learn more.
    • May 29 2009 | 12:23 pm
      pepperclouds wrote on Fri, 29 May 2009 02:31i have countless musical ideas. it's a matter of learning how to translate them. how long did it take you folks to get some of the basics down?
      tough question. I feel like I know what I'm doing for most things, certainly not all, and the things I think I know have a lot more to them than I'm aware of. Every day, especially on the forum, something new comes along, often using the simplest of logic or objects, but in a way I hadn't thought of. and I smack my head (there's a permanent bruise there I think.)
      also there's literally no end to how efficiently you can patch, regardless of the complexity. if you're not well-organized (as I'm not, admittedly) there's a lot of repetition of actions. sometimes this leads to new understandings, but sometimes it's a waste since you don't learn anything new. keep good backups and files with snippets you can re-use, and know how to find them quickly. and Save As... especially if you're trying something at the edge~ of your understanding, hehe.
      Max is fantastic for music, but can do pretty much anything you want, since it's all about numbers. If you keep that in mind, there may be a whole lot more it can do for you, since pretty much anything can be represented as numbers and mashed at will in interesting or surprising ways. It's also a great environment to learn about programming logic in general, and more accessible in many ways than coding, for a lot of people.
      The upgrade to Max 5 took what seemed to me to be a somewhat niche program that was powerful, but kind of quirky (without a lot of the niceties of modern programs) and really put it into the game alongside the big contenders (Flash, for example). With the hundreds of improvements riding on top of the already extraordinarily powerful and flexible core (that IMO is a lot more intuitive and efficient to work with than Flash etc), I think Max 5 will steadily gain ground and will find tons of new users who have hit limits with other software. And as a "Swiss Army Knife" for big projects, holding other software together or performing various specialty tasks as you go, it's quite often just the thing you need... or the only thing you need.
      soon you'll open up other apps and think about how you could create their functions in Max. The more you know about it, the more likely you are to think, "hey, that could be done with toggle, preset, counter, and table..." ... that's one of my favorite parts of learning Max.
    • May 29 2009 | 12:39 pm
      I definitely agree about looking at other apps and thinking "I could do that!" It really fun, for example you can make Logic-esq automation really easily using the function object, and if you feel up to it, Emmanuel Jourdan's ej.function.js can be used to make it more flexible and intuitive than lots of DAWs in my opinion.
      I just downloaded his ejies and zsa.descriptors and they are really really good for taking things up a step in functionality. Thanks EJ!
    • May 29 2009 | 2:00 pm
      timlloyd wrote on Fri, 29 May 2009 07:39I definitely agree about looking at other apps and thinking "I could do that!" It really fun, for example you can make Logic-esq automation really easily using the function object, and if you feel up to it, Emmanuel Jourdan's ej.function.js can be used to make it more flexible and intuitive than lots of DAWs in my opinion.
      I just downloaded his ejies and zsa.descriptors and they are really really good for taking things up a step in functionality. Thanks EJ!
      There's so many of these examples, it's amazing. If you fiddle with transparency, ignoreclick, and layering of UI objects (all of which are attributes and can therefore be set on-the-fly), most of them can actually be "stacks". you'd have a main interface which does a set of things, then be able to switch to other, parallel layers which are the same in design, but create another instance that you can control individually.
      It's similar to the bpatcher idea, which is even easier to stack as it's all one object, but this way allows for some items to be stacked (like multisliders or functions) while some things aren't, and some you can see "down the stack" to the data underneath and some you can't. Add [pattrstorage] to all those layers and you jump another order of magnitude regarding what's possible.
      If you're mainly into audio, really understand waveform~ and extend it. So many musically-useful additions are possible--grid, snapping, selection tools, scrubbing--very soon it's *much better* than any commercial waveform UI, and can be controlled via automation, generative processes, or pattr. plus you can have them in a stack too, or expand/shrink them with a "patching_rect $1 $2 $3 $4" message, just like you can with any object. Using this you can create a multitrack set of waveform~ objects, and be able to control how tall or wide they are with zoom sliders, just like you see in most DAWs. How much faster is that than what the DAW programmers had to do to make theirs? It really blows the mind.
      Again, it's all just numbers or messages coming into the waveform~ (or whatever object) to tell it what to do, so if you have other means of creating those numbers than a direct mouse action, you've just created an "instance of yourself" as a performer/experimenter: you're live-interacting at the same time another process is going. all of a sudden new possibilities and combinations emerge... you start extending the patch to take advantage of these... play with it again... extend again.
      For straightforward automation recording and playback, like in Logic or others, look into [mtr]. (BTW it claims to top out at 32 tracks, but I've used 47 for recording a controller, anyone have an answer about the maximum?). seq~ does it in a different way--less simultaneous numbers, but total playback speed control and multiple stored sequences. these are really amazing for certain parameter controls.
      Get the Max Toolbox too, it's very helpful. (note that actions with the toolbox can't be undone.) Certain repetitive connections are a snap once you get how it works, plus it has distribute objects X / Y and the ability to send messages to all selected objects. the Inspector can also do a lot with multiple objects selected, Hide Foreground can be used to select all patch cords at once, every modifier key does something useful... the skill curve is neverending.
    • Jun 02 2009 | 3:54 am
      Thanks Tim for your help on the multislider. i have made a lot of progress studying the patcher you made me. the max concept is starting to clock together for me. i was trying to hook up a flanger tonight just as an experiment, but i/m not exactly sure how to. in the tuturial , they hook the top of it into an adc~ . i am using groove~, so would i hook up it up to the bottom of groove? would i have to make 4 ~objects like in the tutorial and assign it to the EZdac? Don't judge me on the presentation of this patcher. it's my first time making a patcher. i've added a drunk object to mess around with the start and end points of the sample.
    • Jun 02 2009 | 5:29 am
      I'm not too sure how much this will help, but here's an attempt at explaining the flanging tutorial patch, as it's tricky to look through and see what is connected to what.
      It might help keep things tidy if you enable snap to grid while patching, I find it helpful. Also one general patching tip I would say would be to try and keep things in line in terms of signal/message chain. It tends to get really confusing if you have lots of outlets connected to inlets placed above them if that makes sense.
      In terms of the flange tutorial patch, you would connect the audio signal outlet of groove~ in place of the adc~. The only reason it has 4 [*~] is because it has independent flange speeds for the left and right channels, so the mix control has to control left/right dry and left/right wet at the same time.
      You could just copy the tutorial patch and encapsulate it as a stereo flanger you can re-use more easily.
    • Jun 04 2009 | 2:44 am
      making some progress on this patcher and learning much along the way. my latest problem deals with the samples tempo.i can slow down and speed up the tempo of my sample, but when i do so , the pitch changes. example: turn up the sig number from the groove object from 1 to 2. the sample increases the tempo, but so does the pitch. how can i adjust the tample manually, without touching the pitch? i think the transport object may be a solution, but i can't get it to work properly. am i on the right track?
    • Jun 04 2009 | 3:15 am
      Unfortunately its not particularly easy to adjust speed independent of pitch and have it sound good. One way would be to just buy the elasticx~ external for about $20 which works exactly like the groove~ object but with separate speed and pitch inlets. I think it uses the same/very similar time stretching algorithm to ableton and kontakt.
      Other than that you would have to build either a granular time stretcher or phase vocoder using fft.
      Although, you could try using gizmo~ to counteract the pitch change caused by an increase in speed.
      For example, if you change sig~ to a value of 2. the speed is doubled, and the pitch goes up an octave. So you could scale the outlet of the number box used to control sig~ and use it to simultaneously send gizmo~ a value which brings the pitch down an octave.
      I'm not sure how that would sound, but have a go! My guess is that it will work for non-extreme time changes, and then will begin to sound strange, but I'll try it as well.
      I've just realized that the change in speed isn't going to scale nicely to the change in pitch. Might need an [expr]
    • Jun 04 2009 | 3:30 am
      yep, just tried it, sounds terrible with negative values in sig~
      it works "ok" at [sig~ 2.] but the scaling isn't correct so there are slight pitch changes inbetween 1. and 2.
      It also causes a really odd phasing even with sig~ at 1. and no gizmo~ transposition.
      Not the best idea after all!
    • Jun 04 2009 | 4:30 am
      timlloyd wrote on Wed, 03 June 2009 22:30yep, just tried it, sounds terrible with negative values in sig~
      it works "ok" at [sig~ 2.] but the scaling isn't correct so there are slight pitch changes inbetween 1. and 2.
      It also causes a really odd phasing even with sig~ at 1. and no gizmo~ transposition.
      I use this a lot, it's probably not the "best" around (that elascicx~ sounds interesting) but it works well for around a fifth up or down. (this stuff is tricky to be sure...) I clamp the transposition to gizmo~ at 0.01 or so, no negative numbers as I don't think it's supposed to work like that. When you change rates quickly it'll take a moment to "catch up", depending on the fft~ size it's using. Also it's (one?) signal vector behind the original, so that might be the phasing you're talking about, not sure.
      To get the right transposition, use the float going into the sig~ and take the reciprocal: float --> !/ 1. --> gizmo~ transposition amount. (also definitely have a way to unlock these from each other so they're independent!)
      It'll sound a little off even at 1. since there's the processing going on anyway, and it's somewhat destructive to the wave. One experiment which is nice is to have multiple gizmo~ objects which use different fft~ sizes, plus a way to test the difference if gizmo~ is bypassed. Small sizes are better for percussive sounds, larger ones (all powers of 2) are better for sustained sounds. Of course, "better" here means higher "fidelity" of a sort, which might not be what you want.
      Try a sound at a super-low speed and a high transposition, and vice-versa, and whatever else you can think of. It's amazing what you can get with independent control over each... quick sounds at sig~ 0.001 will give you a thousand times longer to mangle the sound as it plays back, so messing with the pitch can really open up the possibilities with such stretched-out samples. I've made some truly amazing and bizarre sounds from something as quick and simple as a snare hit this way, like screeching ghost violins, robots slowly dying in space, etc... yeah, the kind of stuff I'm into sometimes.
    • Jun 04 2009 | 5:07 am
      would it be worth it to buy the elasticx~? So what do you do, pay for it, download it, and then you can use it in max? do i have to do any rigging to get it inside of max? i'll try to find it online. is building a granular time stretcher difficult to build? for now, i will look up the elasticx object and try seejaw james suggestion. thanks, mike
    • Jun 04 2009 | 6:17 am
      ok, i bought elasticx~ . it's perfect for what i want to do. thanks for the lead. I am dissapointed that I had to spend more money on this program. Couldn't max have included this object in their program? is it really that difficult? anyways, for anybody having the problem that i have had regarding tempo, elasticx does the trick. i just want to know, does it bother you that i ask so many questions? that's how i learn the fastest, by asking questions.i am slowly merging on the path to doing exactly what i set out to do with this program.
    • Jun 04 2009 | 8:25 am
      If I understand things correctly, you're mainly paying for the licence for the algorithm that elastix~ uses to achieve its wonderfulness. I just replaced all the granular time stretchers in a patch with elastix~ and it sounds great - definitely worth the fairly small fee IMO.