Waveform
Hey, this is my first post...
At the moment I'm playing with the waveform object and in particular I'd like to be able to midi control it with 2 knobs so that one controls the position of the loop and the other controls the width. At the moment I'm using a scale object so that my values aren't just scaled from 0-127 however I could do with a way of being able to automatically detect how long the sample was and change the scale accordingly
also, even though at the moment my idea is working ish, it's rather flawed in that the slice is minute when I move it (so I need some way of keeping the loop area the same when they're moving together)...and when I change the width of the sample it doesn't start from where the slice is..it moves from where the nob was.
I'm sure all of this is really easy to fix but I'm very new to this software and am finding it a little daunting
cheers, tom
jylsynder wrote on Mon, 19 October 2009 06:59
however I could do with a way of being able to automatically detect how long the sample was and change the scale accordingly
also, even though at the moment my idea is working ish, it's rather flawed in that the slice is minute when I move it (so I need some way of keeping the loop area the same when they're moving together)...and when I change the width of the sample it doesn't start from where the slice is..it moves from where the nob was.
info~ (buffer~ name) will give you the file length in msec.
You can keep the loop area the same (selectable) width by adding a msec length to the value coming from the knob, so the raw # is loop start, the larger value is loop length.
Regarding "moving from where the knob was", this is pretty much the way it is, unless they are motorized knobs and you can update values back to them. Though there are some trickeries to have the knob not send values until it passes through the zone it was in previously, maybe wait on that part.
Just a thought, but in that sense wouldnt have a knob to control the number of loop start and loop length work better? in this way i could move the slice to where I want then grow and shrink the slice accordingly...it might fix the problem of resetting midi controls?
ill try it anyhoo thank you very much!
jylsynder wrote on Mon, 19 October 2009 09:03Just a thought, but in that sense wouldnt have a knob to control the number of loop start and loop length work better? in this way i could move the slice to where I want then grow and shrink the slice accordingly...it might fix the problem of resetting midi controls?
anything you want you can generally do pretty easily once you get a feel for the program. tons you can do with just arithmetic objects.
Two knobs would be better, and it would also be nice to have a third one that moves the loop selection forward and backward, but keeps the selection length that you have. Since everything is looping you probably want to have pretty good control over the rhythm, so this can let you "loop-scrub" anywhere you want but keep the rhythm steady.
Lots of things you can do with "grid" messages to waveform~, especially if you know the clip's BPM beforehand. (tempo-sensing is trickier but you can search on that, there are some options.) Subdivide or multiply a bpm-based time length by some common integers or fractions, then use that for your grid sizes. works great, especially across multiple waveforms~.
I think I've just about cracked it...(unfortunately I'm currently away from my midi controller). I've set up 1 nob that should control the start and the end based upon the length of the sample so I can move the loop, but I'm not sure how to set up a nob to control the wifth of the loop?
Try the patch below which scales two midi range integers to the start and end points of a [buffer~]-ed audio file.
lh
I've input all that coding into my a new patcher, but I'm not sure how to turn it from code into the actual patch?
sorry, I'm a complete newbie!
sorry ignore that, didn't see the notification on how to do if at the top, doh!
that's essentially exactly what I was hoping to do, just with those sliders controlled by 2 midi knobs