scaling uniwaveform
is there away of scaling the uniwaveform to the length of the audio track that is placed inside it? insted of the waveform filling up the uniwaveform box regardless how long the track is? so if i play a 3 minute track the size of the wave form will be shorter than a 5 minute track? or is there some way of getting the same result?
-
- Site Admin
- Posts:1093
- Joined:Mon Jun 07, 2004 9:17 pm
The uiwaveform object by itself will not do this scaling. However, you can force it to scale the width of its display as you wish using attributes "patching_rect" and/or "presentation_rect".
Send a message to uiwaveform to change the "patching_rect" and/or "presentation_rect" attributes according to the file length. For instance, if your file is 3 minutes you could send the message "patching_rect 10 10 60 20" to place the waveform at location {X, Y} = {10, 10} with width 60 and height 20. If your file is 5 minutes you could then send the message "patching_rect 10 10 100 20" to place the waveform at location {X, Y} = {10, 10} with width 100 and height 20.
Send a message to uiwaveform to change the "patching_rect" and/or "presentation_rect" attributes according to the file length. For instance, if your file is 3 minutes you could send the message "patching_rect 10 10 60 20" to place the waveform at location {X, Y} = {10, 10} with width 60 and height 20. If your file is 5 minutes you could then send the message "patching_rect 10 10 100 20" to place the waveform at location {X, Y} = {10, 10} with width 100 and height 20.
ok cool thanks. but u would have to force it every time u wanted to rescale it? (manually editing the scale?)
so u couldnt do this on the fly when loading up different length tracks you would have to force the scale between each track to gain the results otherwise the scale would remain same from the previous patching_rect/presentation_rect?
so u couldnt do this on the fly when loading up different length tracks you would have to force the scale between each track to gain the results otherwise the scale would remain same from the previous patching_rect/presentation_rect?
-
- Site Admin
- Posts:1093
- Joined:Mon Jun 07, 2004 9:17 pm
some help please?
can i use this value coming for the mptcfs~ to automatically scale it (through doing a equation to fit my scaling needs) or does this require physical input each into my application? and when u say query do u literally mean find out the value or is this some kind of function i can do?
many thanks
can i use this value coming for the mptcfs~ to automatically scale it (through doing a equation to fit my scaling needs) or does this require physical input each into my application? and when u say query do u literally mean find out the value or is this some kind of function i can do?
many thanks
-
- Site Admin
- Posts:1093
- Joined:Mon Jun 07, 2004 9:17 pm
Use the "message" object to create the message that will then be passed to the uiwaveform object. To modify the width parameter only, use the $1 notation. So create a new "message" object, and type this into it: "patching_rect 10 10 $1 20", or similar. With that, whatever input you put into the message object will cause a message to be output, with the width parameter reflecting the input value. This is extensively covered in the Max/MSP help files for "message" object, and in tutorials. You need to do some homework It's not really that hard, but does requires some study!
Re: querying: Yes- you pass a message to mptcfs_sa~ "query msec_duration" which will cause the length of the audio file in milliseconds to be output from the rightmost outlet of mptcfs_sa~. You would then scale this value appropriately, and use it as the input to the message object described above, which will then feed the uiwaveform object and cause its width to be modified according to file length.
This should all be very easy to anyone who has done some Max/MSP patching. But if you're very new to patching, then I guess it's like learning a whole new language. But in time you'll find it very easy!
Re: querying: Yes- you pass a message to mptcfs_sa~ "query msec_duration" which will cause the length of the audio file in milliseconds to be output from the rightmost outlet of mptcfs_sa~. You would then scale this value appropriately, and use it as the input to the message object described above, which will then feed the uiwaveform object and cause its width to be modified according to file length.
This should all be very easy to anyone who has done some Max/MSP patching. But if you're very new to patching, then I guess it's like learning a whole new language. But in time you'll find it very easy!
thanks for that last post on here dlpinkstah really helpful stuff yeh im a bit of a noob just starting out i did lots of homework on all the help files but i can just work a bit better when its explain out to me, i could like see how other were using the function but i didnt quite know how to apply it to my work. =]
another question about scaling!! is it possible to get the quite parts of an audio track to be very short in hight and the louder parts of audio to be taller? like over the top sort of thing, super skinny to extra tall? does that make sense? more defined not like hazy/chunky?
cheers
another question about scaling!! is it possible to get the quite parts of an audio track to be very short in hight and the louder parts of audio to be taller? like over the top sort of thing, super skinny to extra tall? does that make sense? more defined not like hazy/chunky?
cheers
For those reading this out of curiosity from other sites, this M4L Pinky device just got much better! The browser thingy in Ms Pinky is completely mappable and works like clip launching with no quantizing. So if you were into that cue point kind of mashing all you need to do is cut each track where you want it to begin and load them into the Folder the patch uses to read files, map your buttons to the tracks or "cues" and mash it up! and of course scratch.