MMPonBoardEditorTemplate.mmp for creation of MobMuPlat files directly on the handheld (android only)
MMPonBoardEditorTemplate.mmp for creation of MobMuPlat files directly on the handheld (android only)
MMPonBoardEditorTemplate
by svanya
INFO: make copies of this template to use as the starting point for your created .mmp files.
This template is designed to expedite the creation of simple(!) MobMuPlat files on-the-go with only the use of the handheld (i.e. does not require the Java editor).
There are three sections to this document:
the templates (in this commented section)
the mmp header just below this section
the "ENTRIES SECTION"
and
the mmp footer (which closes the .json file).
To use the template:
Open this file in a handheld text-editor (you may need to rename it, ex. adding ".txt" (no quotes) to the end of its file name to associate it to the text-editor and NOT MobMuPlat).
Copy one of the sections from this Templates Section (not including its label and the label colon and paste it into the Entries Section below and for each template you have added more than 1, add a comma after each template except the last one.
The arrangment on the screen can then be edited (in that same text editor) by amending the "frame" section of each Entry according to the following format:
"frame":[left,top,width,height]
(on the JAVA editor the screen is scaled 320px wide by 480px high)
and
Re-open the .mmp file inside MobMuPlat (renaming it back to .mmp as necessary).
Enjoy! And Good Luck! Just post any comments or help you may need here and I will try and get to them as soon as I am able.
Ciao for Now. Peace,
svanya
for those interested here is the code:
/*
MMPonBoardEditorTemplate.mmp for creation of MobMuPlat files directly on the handheld (android only)
MMPonBoardEditorTemplate
by svanya
INFO: make copies of this template to use as the starting point for your created .mmp files.
This template is designed to expedite the creation of simple(!) MobMuPlat files on-the-go with only the use of the handheld (i.e. does not require the Java editor).
There are three sections to this document:
the templates (in this commented section)
the mmp header just below this section
the "ENTRIES SECTION"
and
the mmp footer (which closes the .json file).
To use the template:
Open this file in a handheld text-editor (you may need to rename it, ex. adding ".txt" (no quotes) to the end of its file name to associate it to the text-editor and NOT MobMuPlat).
Copy one of the sections from this Templates Section (not including its label and the label colon and paste it into the Entries Section below and for each template you have added more than 1, add a comma after each template except the last one.
The arrangment on the screen can then be edited (in that same text editor) by amending the "frame" section of each Entry according to the following format:
"frame":[left,top,width,height]
(on the JAVA editor the screen is scaled 320px wide by 480px high)
and
Re-open the .mmp file inside MobMuPlat (renaming it back to .mmp as necessary).
TEMPLATES:
MMPLabel:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/label/0","textSize":16,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Bold","textFontFamily":"Default","text":"label","textFont":"","class":"MMPLabel","frame":[150.0,10.0,100.0,40.0]}
MMPButton:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/button/0","color":[1.0,1.0,1.0,1.0],"class":"MMPButton","frame":[10.0,70.0,100.0,40.0]}
MMPToggle:
{"highlightColor":[1.0,0.0,0.0,1.0],"borderThickness":4,"address":"/toggle/0","color":[1.0,1.0,1.0,1.0],"class":"MMPToggle","frame":[10.0,130.0,100.0,40.0]}
vSlider:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/vSlider/0","color":[1.0,1.0,1.0,1.0],"range":2,"class":"MMPSlider","isHorizontal":false,"frame":[10.0,190.0,100.0,40.0]}
hSlider:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/hSlider/0","color":[1.0,1.0,1.0,1.0],"range":2,"class":"MMPSlider","isHorizontal":true,"frame":[10.0,250.0,100.0,40.0]}
MMPKnob:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/knob/0","color":[1.0,1.0,1.0,1.0],"indicatorColor":[1.0,1.0,1.0,1.0],"range":2,"class":"MMPKnob","frame":[10.0,300.0,100.0,100.0]}
MMPXYSlider:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/xyslider/0","color":[1.0,1.0,1.0,1.0],"class":"MMPXYSlider","frame":[10.0,420.0,100.0,40.0]}
MMPGrid:
{"mode":0,"highlightColor":[1.0,0.0,0.0,1.0],"borderThickness":3,"address":"/grid/0","color":[1.0,1.0,1.0,1.0],"dim":[4,3],"class":"MMPGrid","cellPadding":2,"frame":[150.0,70.0,100.0,40.0]}
MMPMultiSlider:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/multislider/0","color":[1.0,1.0,1.0,1.0],"range":8,"outputMode":0,"class":"MMPMultiSlider","frame":[150.0,130.0,100.0,40.0]}
MMPLCD:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/lcd/0","color":[1.0,1.0,1.0,1.0],"class":"MMPLCD","frame":[150.0,190.0,100.0,40.0]}
MMPMultiTouch:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/multitouch/0","color":[1.0,1.0,1.0,1.0],"class":"MMPMultiTouch","frame":[150.0,250.0,100.0,40.0]}
MMPTable:
{"mode":0,"highlightColor":[1.0,0.0,0.0,1.0],"address":"/table/0","color":[1.0,1.0,1.0,1.0],"selectionColor":[1.0,1.0,1.0,0.5019608],"displayRangeLo":-1.0,"displayRangeHi":1.0,"class":"MMPTable","displayMode":0,"frame":[150.0,310.0,100.0,40.0]}
MMPPanel:
{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/panel/0","color":[1.0,1.0,1.0,1.0],"passTouches":false,"class":"MMPPanel","frame":[150.0,370.0,100.0,40.0]}
THE ACTUAL MMP FILE FOLLOWS THIS
*/
{"pdFile":"osc_controller_mmp.pd","backgroundColor":[0.0,0.0,0.0,1.0],"pageCount":1,"port":54321,"isPageScrollShortEnd":false,"startPageIndex":0,"canvasType":"widePhone","gui":[
/*
ENTRIES SECTION: entries go below here and above the comment below
*/
/*
END: ENTRIES SECTION
The mmp footer is below.
*/
],"isOrientationLandscape":false,"version":1.64}
Time Stretching Patches - any recommendations?
@whale-av http://forum.pdpatchrepo.info/topic/9909/time-stretching-patches-any-recommendations/12
Nice to hear from you again, David. Yes, I was referring to bowed contrabass, as in the example .wav I posted above: http://forum.pdpatchrepo.info/topic/9909/time-stretching-patches-any-recommendations/9
I understand now what @Johnny-Mauser was saying. As in testbass.wav, most of the samples in this library seem to have irregularities, but I can try to isolate a part that doesn't in a DAW.
@seed I didn't see your reply when posting. I'll try out your suggestions soon.
Jumping to frame - avi
Hard to say, I think AVI can contain one of several codecs. With video that is time-compressed, you can't just jump to any frame: The video is made up of P-frames and I-frames, the I's are what you would think of as a frame; a picture representing what you see on the screen while the video is playing. P-frames represent the difference between frame n(i-frame) and frame n+1(p-frame). So, if you try and go to a P-frame with most video players, they will jump to the closest Iframe and resume playback from there. REALLY bad explanation, right?
Jumping to frame - avi
Hi there... another newb question!
I've got a patch going where I can store cue points in an array. These cue points simply refer to frame numbers and right now are just going straight into the right input of pix_film.
Now I'm jumping between 3 points (say 10, 60, and 100) while the video (avi) is being rendered, but not playing... so it's just displaing still frames.
The weird thing is that the frame that appears when I hit the button for frame #60 changes depending on whether I jump to it from frame #10, or frame #100!
So depending on what pix_film received last, frame #60 could display one of two different things!
I'm missing something right??
cheers
J
HELP: "shot" & translate pixels
I'd like to build something that works as the follower example...
Let's take a gemwin 9*9 pixels. So, 9 columns of pixels. In this gemwin we see the webcam or a video. Every column of pixels changes frame by frame (because video or webcam go on).
At frame_0, our gemwin is <000000000>, at frame_1 <111111111>, etc.
This is our gemwin frame by frame:
frame 0 <000000000>
frame 1 <111111111>
frame 2 <222222222>
...
But!..let's start again:
frame 0 <000000000>
I want to take a "snapshot" only of the central axis ("0"). When frame_1 arrives, I want to translate my shot of "0" towards left by one pixel...
frame 1 <111011111>
Now I want to repeat this action: I take a snapshot of the central axis (now "1"). And when frame_2 arrives, I want to translate both shot of "0" and shot of "1" towards left by one pixel...
frame 2 <220122222>
So, this is our gemwin frame by frame after this "shot&translate" process:
frame 0 <000000000>
frame 1 <111011111>
frame 2 <220122222>
frame 3 <301233333>
frame 4 <012344444>
frame 5 <123455555>
frame 6 <234566666>
frame 7 <345677777>
frame 8 <456788888>
frame 9 <567899999>
etc.
Ok...how can I do something like that? Which objects could I use?
Thanks
Video Codec Anyone?
I'd love to see an answer to that too. If you don't get a solid answer, it may be that there hasn't been an empirical test done yet, so if you started one, that'd be a great thing. Meaning, take your video, encode it many, many different ways, and compare the results.
One thing that makes a difference is what you're using the video for - specifically, whether you do a lot of rapid frame-accurate seeks, switching between forward and reverse, etc; or if you're playing long clips straight, perhaps switching between clips occasionally or blending them, etc. Most codecs use temporal compression, so most frames are stored as differences from previous frames. The more sophisticated the codecs get, the more sophisticated this temporal compression is, which gets you higher levels of visual quality at smaller file size. The tradeoff is that if you want to jump to a specific frame, you often have to first jump to a keyframe near where you want to go, and then seek forward, accumulating the frame differencing until you get to the target frame. So for an application involving random access, the keyframe setting may have more of an effect than the actual codec.
Other factors include stuff like your hard drive. Say you have some nice high-res video. If you compress it a lot, each frame doesn't have too much data in it, but it takes a lot of processing power to decode; so if the rest of your patch has a high cpu load, that can slow it down. You can use less compression, so less computation, but if your hard drive is not that fast, at some point it can't get the data off the disk fast enough to display it either.
So there's a lot of variables, which is why maybe an empirical test suite would be a good thing.
btw what do you mean about free stuff online? Do you mean free codecs, like ogg vorbis/theora, or free encoding software, like ffmpeg and mencoder?
Incorrect number of frames in loaded movie
Hello all,
I'm a real Pd newbie and am currently using a patch created by someone else.
The patch loads .mov videos using the GEM object "pix movie". I've noticed that for some videos the reported number of frames is different than what I see if I open the same video using the Quicktime viewer. Here is what else I know:
-
The videos made using iMovie load in Pd with the same number of frames as what I see in Quicktime, but the videos made on a Windows machine have consistently fewer frames.
-
The longer the movie, the greater the discrepancy in the number of frames. This suggests a frame rate issue but all videos were made with the same frame rate.
In short, how does Pd calculate the number of frames when video is loaded?
Thanks!
Framenumber to timecode conversion
Hello,
please excuse my stupidity both in programming and generally in understanding PD. i've been trying to figure a way to convert a frame number (received with OSC) to a timecode but the code i tried to adapt from a matlab script by Malcolm A. MacIver that i found here http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=1116&objectType=File
involves some for...loop and i dont know how to do the same in PD... can anyone explain, please?
i guess the field part of the smpte timcode (and other bits of information) are usually not needed, for most people HH:MM:SS:FF Information will be ok... maybe with an adjustable framerate between 30 (ntsc) and 25 (pal)
greetings,
till
function smpte = dec2smpte(init, framecount, field)
% convert the smpte time from the total elapsed frames and field as an integer
% to the new smpte time
first_field=init(9);
weight=[1080000 108000 18000 1800 300 30 10 1];
ns=[];
remain=framecount;
for i=1:8
ns(i)=floor(remain/weight(i));
remain=remain- (ns(i)*weight(i));
end
if strcmp(first_field,':')
second_field='.';
else
second_field=':';
end
if field==1
field_flag=first_field;
else
field_flag=second_field;
end
smpte=[ ...
num2str(ns(1)) num2str(ns(2)) ':' ...
num2str(ns(3)) num2str(ns(4)) ':' ...
num2str(ns(5)) num2str(ns(6)) field_flag ...
num2str(ns(7)) num2str(ns(8))];
different approach here
function itc (int "framecount", float "rate", bool "ms")
{
rate=default(rate,25)
ms = default(ms, false)
drop = (rate==29.97)? true : false
rate2 = (drop==true)? 30 : rate
hours=floor((framecount/rate)/3600)%60
mins=floor((framecount/rate)/60.0)%60
secs=floor(framecount/rate)%60
milli=floor(1000*framecount/rate)%6000%1000
fmilli=framecount/rate - floor(framecount/rate)
#frames=floor(fmilli*rate2)
frames=framecount%int(rate)
dframes = (drop==false)? frames : (secs==0)&&(mins%10!=0)? floor(fmilli*rate2) + 2 : frames
return (ms==false)? (string(hours,"%02.0f")+":"+string(mins,"%02.0f")+":"+string(secs,"%02.0f")+":"+string(frames,"%02.0f")) :
\ (string(hours,"%02.0f")+":"+string(mins,"%02.0f")+":"+string(secs,"%02.0f")+":"+string(milli,"%03.0f"))
}
Install gridflow on linux
I've tried to install under root session but it still doesn't work!...
the full output for 'make install' is (sorry this is very very very long!!!):
ruby -w base/source_filter.rb base/grid.h base/grid.h.fcs
ruby -w base/source_filter.rb base/grid.c base/grid.c.fcs
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
g++ -fPIC -g -O2 -I/Applications/Pd.app/Contents/Resources/include -I/sw/include -I/usr/local/include -I/include -xc++ -fno-operator-names -fno-omit-frame-point er -I/usr/X11R6/include -I /usr/local/lib/ruby/1.8/i686-linux -mcpu=pentium -mar ch=pentium -Wall -Wno-unused -O3 -funroll-loops -fno-omit-frame-pointer -g -fPIC -I. -I/home/bastien/Desktop/gridflow-0.8.0 -I -I. -c base/grid.c.fcs -o base/grid.o
ruby -w base/source_filter.rb base/main.c base/main.c.fcs
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
g++ -fPIC -g -O2 -I/Applications/Pd.app/Contents/Resources/include -I/sw/include -I/usr/local/include -I/include -xc++ -fno-operator-names -fno-omit-frame-point er -I/usr/X11R6/include -I /usr/local/lib/ruby/1.8/i686-linux -mcpu=pentium -mar ch=pentium -Wall -Wno-unused -O3 -funroll-loops -fno-omit-frame-pointer -g -fPIC -I. -I/home/bastien/Desktop/gridflow-0.8.0 -I -I. -c base/main.c.fcs -o base/main.o
ruby -w base/source_filter.rb base/number.c base/number.c.fcs
g++ -fPIC -g -O2 -I/Applications/Pd.app/Contents/Resources/include -I/sw/include -I/usr/local/include -I/include -xc++ -fno-operator-names -fno-omit-frame-point er -I/usr/X11R6/include -I /usr/local/lib/ruby/1.8/i686-linux -mcpu=pentium -mar ch=pentium -Wall -Wno-unused -O3 -funroll-loops -fno-omit-frame-pointer -g -fPIC -I. -I/home/bastien/Desktop/gridflow-0.8.0 -I -I. -DPASS1
-c base/num ber.c.fcs -o base/number.1.o
base/number.c.fcs: In static member function `static bool Op<T>::is_neutral(T, L eftRight)':
base/number.c.fcs:47: attention : « return » manquant dans une fonction devant r etourner une valeur
base/number.c.fcs: In static member function `static bool Op<T>::is_absorbent(T, LeftRight)':
base/number.c.fcs:48: attention : « return » manquant dans une fonction devant r etourner une valeur
base/number.c.fcs: In static member function `static bool Ymulshr8<T>::is_neutra l(T, LeftRight) [with T = uint8]':
base/number.c.fcs:266: instantiated from here
base/number.c.fcs:200: attention : comparaison est toujours fausse en raison d'u ne gamme limitée de type de données
g++ -fPIC -g -O2 -I/Applications/Pd.app/Contents/Resources/include -I/sw/include -I/usr/local/include -I/include -xc++ -fno-operator-names -fno-omit-frame-point er -I/usr/X11R6/include -I /usr/local/lib/ruby/1.8/i686-linux -mcpu=pentium -mar ch=pentium -Wall -Wno-unused -O3 -funroll-loops -fno-omit-frame-pointer -g -fPIC -I. -I/home/bastien/Desktop/gridflow-0.8.0 -I -I. -DPASS2 -c base/num ber.c.fcs -o base/number.2.o
base/number.c.fcs: In static member function `static bool Op<T>::is_neutral(T, L eftRight)':
base/number.c.fcs:47: attention : « return » manquant dans une fonction devant r etourner une valeur
base/number.c.fcs: In static member function `static bool Op<T>::is_absorbent(T, LeftRight)':
base/number.c.fcs:48: attention : « return » manquant dans une fonction devant r etourner une valeur
g++ -fPIC -g -O2 -I/Applications/Pd.app/Contents/Resources/include -I/sw/include -I/usr/local/include -I/include -xc++ -fno-operator-names -fno-omit-frame-point er -I/usr/X11R6/include -I /usr/local/lib/ruby/1.8/i686-linux -mcpu=pentium -mar ch=pentium -Wall -Wno-unused -O3 -funroll-loops -fno-omit-frame-pointer -g -fPIC -I. -I/home/bastien/Desktop/gridflow-0.8.0 -I -I. -DPASS3 -c base/num ber.c.fcs -o base/number.3.o
base/number.c.fcs: In static member function `static bool Op<T>::is_neutral(T, L eftRight)':
base/number.c.fcs:47: attention : « return » manquant dans une fonction devant r etourner une valeur
base/number.c.fcs: In static member function `static bool Op<T>::is_absorbent(T, LeftRight)':
base/number.c.fcs:48: attention : « return » manquant dans une fonction devant r etourner une valeur
ruby -w base/source_filter.rb base/bitpacking.c base/bitpacking.c.fcs
g++ -fPIC -g -O2 -I/Applications/Pd.app/Contents/Resources/include -I/sw/include -I/usr/local/include -I/include -xc++ -fno-operator-names -fno-omit-frame-point er -I/usr/X11R6/include -I /usr/local/lib/ruby/1.8/i686-linux -mcpu=pentium -mar ch=pentium -Wall -Wno-unused -O3 -funroll-loops -fno-omit-frame-pointer -g -fPIC -I. -I/home/bastien/Desktop/gridflow-0.8.0 -I -I. -c base/bitpacking. c.fcs -o base/bitpacking.o
ruby -w base/source_filter.rb base/flow_objects.c base/flow_objects.c.fcs
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
base/source_filter.rb:38: warning: regexp has invalid interval
bas