[SOLVED]video still remains after disconnecting [ofelia d] script
I've modified some abstractions created by @60hz for prototyping fast with ofelia (BTW, thanks a million for your abstractions they're great! And of course a million thanks to @cuinjune for creating Ofelia!). Things seem to work OK, but there's this happening. I have the following patch (I've changed the names from [gl.draw] to [ofelia.draw] for this and other abstractions)
[ofelia.draw]
|
[ofelia.cube]
and I see a white cube in the Ofelia window. Then I make the following connections:
[ofelia.draw]
|
[ofelia.movie]
|
[ofelia.cube]
and I get a video playing in the same cube. Till now everything is fine. But if I go back to the first patch, I don't get a white cube anymore but a still from the video file from [ofelia.movie]. Here are the scripts of the abstractions (almost identical to @60hz abstractions):
[ofelia.draw] (I'm returning ofColor because I want to have all abstractions output pointers and not bangs, maybe there's a better solution for this):
ofelia d draw$0;
local c = ofCanvas(this);
local args = c:getArgs();
local depth = true;
local screenwidth;
local screenheigh;
local widthHeigh;
;
function M.new();
if args[2] == nil then depth = true;
else;
M.depth(args[2]);
end;
if ofWindow.exists then;
screenwidth = ofGetWidth();
screenheight = ofGetHeight();
end;
end;
;
function M.screensize(list);
screenwidth, screenheight = list[1], list[2];
end;
;
function M.depth(string);
if string == "3d" then;
depth = true;
else;
depth = false;
end;
end;
function M.bang();
ofSetDepthTest(depth);
ofTranslate(screenwidth*0.5, screenheight*0.5);
return ofColor(255, 255, 255);
end;
[ofelia.movie]:
ofelia d -c17 videoplayer-$0;
local canvas = ofCanvas(this);
local args = canvas:getArgs();
local videoplayer = ofVideoPlayer();
local filename, start, loop = args[1], args[2], args[3];
local loaded = 0;
;
function M.new();
ofWindow.addListener("setup", this);
if args[1] == nil then print("No file found");
else M.open(filename);
end;
if args[2] == 1 then M.play();
end;
if args[3] == nil then loop = 0;
end;
end;
;
function M.free();
ofWindow.removeListener("setup", this);
end;
;
function M.setup();
M.open(filename);
end;
;
function M.open(string);
if ofWindow.exists then;
videoplayer:close();
videoplayer:load(string);
if (videoplayer:isLoaded()) then;
print("loaded " .. string);
videoplayer:update();
end;
end;
end;
function M.url(string);
if ofWindow.exists then;
videoplayer:close();
videoplayer:load(string);
if (videoplayer:isLoaded()) then;
print("loaded " .. string);
videoplayer:update();
end;
end;
end;
function M.play() videoplayer:play() end;
function M.stop() videoplayer:stop() end;
function M.pause() videoplayer:setPaused(true) end;
function M.speed(float) videoplayer:setSpeed(float) end;
function M.frame(float) videoplayer:setFrame(float) end;
function M.volume(float) videoplayer:setVolume(float) end;
function M.loop(float);
if float == 0 then videoplayer:setLoopState(OF_LOOP_NONE);
elseif float == 1 then videoplayer:setLoopState(OF_LOOP_NORMAL);
elseif float == 2 then videoplayer:setLoopState(OF_LOOP_PALINDROME);
end;
end;
function M.get()
return ofTable (videoplayer, videoplayer:isLoaded(), videoplayer:isPlaying(), videoplayer:getCurrentFrame(), videoplayer:getTotalNumFrames(), videoplayer:getWidth(), videoplayer:getHeight());
end;
;
function M.pointer(p);
videoplayer:update();
videoplayer:bind();
return videoplayer;
end;
function M.bang();
videoplayer:update();
videoplayer:bind();
return videoplayer;
end;
Inside [ofelia.movie] there's this patch:
[ofelia d movie_script] <- this is the ofelia object that loads the script above
|
[t a a]
| |
| [outlet]
|
[ofelia d videoplayer_unbind;] <- this is one object
[function M.pointer(p); ]
[p:unbind; ]
[end; ]
and this is [ofelia.cube]:
ofelia d $0-box;
local c = ofCanvas(this);
local args = c:getArgs();
local width, height, depth, resw, resh, resd, drawmode, strokeweight = args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8];
local position, orientation, scale = ofVec3f(0, 0, 0), ofVec3f(0, 0, 0), ofVec3f(1, 1, 1);
;
function M.new();
ofWindow.addListener("setup", this);
if args[1] == nil then width = 100 end;
if args[2] == nil then height = 100 end;
if args[3] == nil then depth = 100 end;
if args[4] == nil then resw = 5 end;
if args[5] == nil then resh = 5 end;
if args[6] == nil then resd = 5 end;
if args[7] == nil then drawmode = "fill" end;
if args[8] == nil then strokeweight = 1 end;
M.setup();
end;
;
function M.free();
ofWindow.removeListener("setup", this)
end;
;
function M.setup();
box$0 = ofBoxPrimitive();
end;
;
function M.resw(float) resw = float end;
function M.resh(float) resh = float end;
function M.resd(float) resd = float end;
function M.width(float) width = float end;
function M.height(float) height = float end;
function M.depth(float) depth = float end;
function M.draw(string) drawmode = string end;
function M.stroke(float) strokeweight = float end;
function M.position(list) position = ofVec3f(list[1], list[2], list[3]) end;
function M.orientation(list) orientation = ofVec3f(list[1], list[2], list[3]) end;
function M.scale(list) scale = ofVec3f(list[1], list[2], list[3]) end;
;
function M.pointer(p);
ofSetLineWidth(strokeweight);
box$0:setPosition (position:vec3());
box$0:setOrientation (orientation:vec3());
box$0:setScale (scale:vec3());
box$0:set(width, height, depth, math.abs(resw), math.abs(resh), math.abs(resd));
if drawmode == "fill" then box$0:drawFaces() end;
if drawmode == "point" then box$0:drawVertices() end;
if drawmode == "line" then box$0:drawWireframe() end;
return p;
end;
function M.bang();
ofSetLineWidth(strokeweight);
box$0:setPosition (position:vec3());
box$0:setOrientation (orientation:vec3());
box$0:setScale (scale:vec3());
box$0:set(width, height, depth, math.abs(resw), math.abs(resh), math.abs(resd));
if drawmode == "fill" then box$0:drawFaces() end;
if drawmode == "point" then box$0:drawVertices() end;
if drawmode == "line" then box$0:drawWireframe() end;
return anything;
end;
This is a bit too much information but I think it's necessary if anyone can help. There's probably stuff I'm ignorant of. @cuinjune any hints?
play random file from folder
Hi David,
I downloaded the externals you mentioned.
Opening the tracklist button i get:
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
opening cart5 i get:
invert
... couldn't create
count 1
... couldn't create
l2s
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
l2s
... couldn't create
initbang
... couldn't create
l $1
... couldn't create
print_long
... couldn't create
counter
... couldn't create
Sorry that I have little experience and can't understand what to do in these cases.
It looks like Î should have some extra patches. For example initbang is not recognized; same for print_long.
The tracklist opens the directory but recognizes no .wav files (i have replaced the spaces with underscores).
I also send my patch in attachment. It is quite messy, but working for files named m1, m2, v1, v2, etc. the idea is simple, all my .wav files have 10 seconds lenght, and there will be a superimposition of two .wav files at the same time, when block A is at 5 seconds, block B enters, and when block A finishes it goes to folder A to get another file.
But if you help me on the files you sent I can adapt your code to my patch, I think I could work it out.
Thanks in advance
Nando
blocks.pd
The miniwoog
Hello! Trying to get this working and installed PD-Extended using the Windows installer here. However, I'm still missing a lot of objects needed to run the patch. @whale-av suggested using the help browser to get the right library- does anyone know what library/-ies I need to get these objects?
expr, expr~, fexpr~ version 0.4 under GNU General Public License
list-extend
... couldn't create
list-minmax
... couldn't create
l
... couldn't create
pink~
... couldn't create
pmenu v0.31 by tof
getdir
... couldn't create
splitfilename .
... couldn't create
splitfilename /
... couldn't create
splitfilename .
... couldn't create
splitfilename /
... couldn't create
getdir
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
list-drip
... couldn't create
demux
... couldn't create
midiparse
... couldn't create
list-extend
... couldn't create
list-dripslow
... couldn't create
l
... couldn't create
l
... couldn't create
once
... couldn't create
demux
... couldn't create
demux 1 2 3 4
... couldn't create
list-extend
... couldn't create
list-delete
... couldn't create
list-find
... couldn't create
demux
... couldn't create
l
... couldn't create
l
... couldn't create
list-nth
... couldn't create
l
... couldn't create
mux 1 2
... couldn't create
demux
... couldn't create
list-sort
... couldn't create
mux 1 2
... couldn't create
midiin: windows: not supported
tanh~
... couldn't create
l2s -
... couldn't create
time
... couldn't create
date
... couldn't create
getdir
... couldn't create
z~ 64
... couldn't create
z~ 64
... couldn't create
MouseState
... couldn't create
l2s
... couldn't create
list-idx
... couldn't create
list-delete 0 1
... couldn't create
deny 0
... couldn't create
demux
... couldn't create
list-idx
... couldn't create
list-delete 0 1
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux 0 1 2
... couldn't create
demux
... couldn't create
demux
... couldn't create
list-drip
... couldn't create
colorpanel
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
demux
... couldn't create
pmenu: 'default' is not an available option.
signal outlet connect to nonsignal inlet (ignored)
signal outlet connect to nonsignal inlet (ignored)
signal outlet connect to nonsignal inlet (ignored)
pd-vanilla how to implement [gate]?
@ddw_music Pd is all about messages...... and so it is all about lists..... strings of data "grouped" together as a "thing".
A string...... but not... because the atoms are all separate and can be of different types.... symbols, floats, etc.
So then it becomes about manipulating those lists.
Sub-routines can be called..... and we call them abstractions..... and they can be given arguments at creation or passed arguments whilst running.
Abstractions can also be created or even built dynamically by sending messages to a patch or sub-patch.
Externals...... abstractions that run code..... have been made by some clever people.
Tagging the data as you suggest is one way of sorting.
You can also sort by position in a list...... by undeclared index.
The list-abs library of abstractions contains much of what you will need, although there are newer externals in recent Pd Vanilla that can achieve the same.
I uploaded it recently here if you need it....... https://forum.pdpatchrepo.info/topic/12125/how-should-i-use-list-drip-to-compare-another-list-drip-s-items/12
The real difference of data flow programming is that it is always "running".
So mistakes are seen straight away which is a huge advantage for us noobs.
David.
harmonizer
vdhs~ $0-pitshft
... couldn't create
vdhs~ $0-pitshft
... couldn't create
iemlib/lp4_butt~ 20000 5
... couldn't create
zexy/nop
... couldn't create
delwritec~ $0-pitshft $1
... couldn't create
zexy/demultiplex~
... couldn't create
rminus~ 1
... couldn't create
zexy/demultiplex~
... couldn't create
rminus~ 1
... couldn't create
pfff, never mind
Gem
Greetings,
I have been off pd since 0.47.1 and I only just updated OSX to High Sierra, which prompted an install of Pd 0.48.1.
In the previous version I had installed Gem via Deken, using the instructions found at:
http://puredatajapan.info/?p=2073
- Using deken, click Help menu – Find externals. Install “libdir” at first.
2.Install Gem via deken - add paths
etc.
However, trying the same now, after restarting Pd, it cant' find gem nor libdir
stuck...
However, if I do same without adding a start-up link, I can create, for e.g., a gemwin object but I get a whole bunch or errors:
... couldn't create
GLdefine GL_LINEAR
... couldn't create
GLdefine GL_EXP
... couldn't create
GLdefine GL_EXP2
... couldn't create
GLdefine GL_COLOR_BUFFER_BIT
... couldn't create
GLdefine GL_DEPTH_BUFFER_BIT
... couldn't create
GLdefine GL_STENCIL_BUFFER_BIT
... couldn't create
GEMglMatrixMode
etc....
I think I am missing something fundamental, but is it because there is no 64-bit but only 32-bit version of Gem fr OS X?
Any help would be greatly appreciated
S
Installing PureData 32 bits on 64 bits host for the life of a project
Hi everyone,
I am comming to you today because i want to make a project live !.
This project work with pureData and some external pd object :
fluid~ , freeverb~..
My objectiv is to install a 32 bits version of pureData to make external pd work.
I tried these solutions :
Multi arch ubuntu 64 bits host
- On a 64 bits ubuntu
- add i386 arch
- update , dist-upgrade..
Then when installing : $> apt-get install puredata:i386
This package is no more available :
These packet a replacing it :
puredata-utils puredata-utils:i386 puredata-extra:i386 puredata-core:i386
puredata-core puredata-dev puredata-doc puredata-extra puredata-gui
So i installed
$> apt-get install puredata-utils:i386 puredata-extra:i386 puredata-core:i386 puredata-gui
pureData is now installed. But when i run it i have this message :
ALSA lib conf.c:3357:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL hw:0
ALSA card scan error
Still i can use the debugger and hear sound..
When running my stido project using some object like :
udpReceive or udpSend...
i got this on the initialisation (you can see also all the pd objects used) :
import mrpeach/routeOSC
... couldn't create
import mrpeach/udpreceive
... couldn't create
import mrpeach/udpsend
... couldn't create
import mrpeach/packOSC
... couldn't create
import mrpeach/unpackOSC
... couldn't create
import flatspace/prepend
... couldn't create
import flatspace/prepend
... couldn't create
import moocow/sprinkler
... couldn't create
import cyclone/speedlim
... couldn't create
./libs/fluid~.pd_linux: libreadline.so.5: cannot open shared object file: No such file or directory
fluid~
... couldn't create
freeverb~
... couldn't create
beware! this is xeq 0.1, 3rd beta build... it may bite!
./
So its not working ^^
Solution 2 - Docker
I was thinking : maybe i can just make a puredata container with all the 32 bits libs, So i tried to find some puredata 32 bits image. But nothing.. And Docker is a little tricky with 32 bits container as he didn't provide any support yet.
Still its possible to run 32 bits linux on it .. i found some 32 bits images on the net, but no way how to create one..
If someone has a solution please..
I am working as a volunteer on this project because i believe on it. I have no time yet to update the pd engine for 64 bits..
This project is helping disabled people and your respons will help me so much to provide them a long term support for this software
If you wanna take a look at the project http://orguesensoriel.com
Thank you a lot,
Damien
Faster list-drip with [list store] (Pd 0.48)
After porting [list store]
to Purr Data, quickly skimming the code it appears that for each iteration [list-abs/list-drip]
has to walk a linked list requiring ten pointer dereferences, whereas the abstraction around [list store]
only needs to walk five. The only other difference is that [list store]
makes some calls to alloca
, but that should be in favor of the [list-abs/list-drip]
algo which doesn't require any alloca
calls. So I'm guessing the time spent allocating on the stack is insignificant.
It would be interesting to somehow compare to an object chain where the objects are traversed as an array instead of a linked list. (More like how signal objects are traversed.) I'm going to speculate that the time saved iterating array elements vs. chasing pointers would bring [list-abs/list-drip]
and the list-store approach closer together.
streamstretch~ abstraction not working
Tried using the streamstretch~ abstraction by William Brent (http://williambrent.conflations.com/pages/research.html) recently.
However, when I loading the patch from the associated help file in pd-extended, it won't work. I get the following error messages:
clone ./lib/streamstretch-buf-writer-abs 100 2415
... couldn't create
text define $0-streamstretch-chord-text
... couldn't create
text get $0-streamstretch-chord-text
... couldn't create
text tolist $0-streamstretch-chord-text
... couldn't create
text fromlist $0-streamstretch-chord-text
... couldn't create
clone ./lib/streamstretch-buf-writer-abs 100 1536
... couldn't create
Tried loading the patch in Pd Vanilla and I still get error messages:
clone ./lib/streamstretch-buf-writer-abs 100 2415
... couldn't create
clone ./lib/streamstretch-buf-writer-abs 100 1004
... couldn't create
I'm just wondering if anyone else gets the same kinds of error messages when they try to load this abstraction.
having problem using Pduino
I have downloaded Pduino 0.5 and have copied the arduino and arduino help patch into the folder where I am saving my puredata files.
but some how things are not working
clicking the device message is yeilding a set of errors
what do I do
I am pasting the message in the console window below:
zexy/unpack float float
... couldn't create
mapping/tolist
... couldn't create
mapping/tolist
... couldn't create
comport $1 57600
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
mapping/debytemask
... couldn't create
moocow/string2any 32 -1
... couldn't create
mapping/tolist
... couldn't create
mapping/tolist
... couldn't create
cyclone/prepend
... couldn't create
[arduino]: version_0.5
please suggest whr I am going wrong
I cannot list my port using the devices message