-
whale-av
@Wabot03 Messing about years ago....... comedy.zip
Open simple.pd
The patch will move a white square on the Gem window for one fiducial.[unpack f f f f f ] does just what its name suggests ...... each float from a list of floats drops from a separate outlet.
So, trying hard to remember..... first there is a [route updateObject] which strips updateObject from the start of the incoming list and rejects messages that start with some other tag (which will come out of its rightmost outlet).
That is because the messages we are interested in start with updateObject (a symbol)
They are in the format .... updateObject a n x y z
So "a" is the session ID, but I didn't need it, so the leftmost outlet of unpack is not connected. Put a [print] on it if you want to know what it is."n" is the object number.... counted from the first fiducial to be in camera shot (starting 0 or 1 I don't remember).
You are going to need that "n".
x y z are xposition, yposition, and angle (rotation) and you might need to scale the values as I have done to suit your midi messages.So....
After [route updateObject] you will need first a [list split 1] to remove "a" and then feed its right outlet to [route 1 2 3 4 5 6 7 8]Each output from that [route] will give you x y z for each fiducial.
Then you need [unpack f f f ] to split out x y z from the remaining list.
David.[object_window] was an attempt (it's not connected in the patch) at smoothing the jittery incoming data and deciding whether to forget fiducials that had gone out of shot for a while. You might need that or something like it.
-
whale-av
@didipiman [list-replace] is a vanilla abstraction from the list-abs library, and contains other vanilla abstractions from the same library.
If you need the OSC messaging then I can upload stuff later, although the MrPeach library should get that going.
Here is what I have, and with [comport] installed it should work. There are bits you will not need. Open [dmx] and click "voir la console" .......... dmx.zip
David. -
whale-av
@didipiman This is a patch I made for vanilla for use at home with the Enttec Pro, but is missing some libraries on my system..... I might get some time to check what is missing later..... it definitely needs [comport] and anything else missing might be from "iem" or "list-abs" libraries.
Mine_dmx-home_vanilla.pd
David. -
whale-av
@didipiman What are the others? Maybe upload your patch to be checked?
David. -
whale-av
@didipiman [resample] as an abstraction........ resample.pd
[init] used to load parameters on [loadbang] and it will be possible to replace that with a [loadbang] of messages to initialise the patch as it is loaded.
David. -
whale-av
@Oscillcreate [pack] will hold the values it last received and output them again if you bang the left inlet.
But the error might come from the [1 $1( message box if you are not sending it a value that $1 requires.
So ....
Although the bang inlet could go directly to the left inlet of [pack] in the screenshot below.
David.
-
whale-av
@gentleclockdivider [sel 1] after [< 61] or [<= 60] probably.
David. -
whale-av
@LaoiseDavern I assume that you meant to type 48000.
A 300ms delay is much more than should be necessary, and 80ms should be sufficient with an onboard soundcard. 44100 should work properly.
What is your operating system?
Is the driver for the soundcard correct?
Any other information that you can give? Pd version etc.
David. -
whale-av
@Oscillcreate You can set a slider using the set message [set $1( in place of the direct feedback, but I am not sure that will do what you want as the counter is still running.
If you need more help then please upload the patch using the up arrow above the box you are typing into.To keep patches tidy you can use sub-patches to hide parts, or if you have a part that you are copying many times abstractions are great.... especially if you change something as you can change them all at once.
However it is a bit of a learning curve to start using abstractions effectively...... https://forum.pdpatchrepo.info/topic/9774/pure-data-noobYou can also use messages via [send] and [receive] instead of cords, and GUI's like the slider can have send and receive addresses assigned in their "properties" page.
David. -
whale-av
@jamcultur I have never seen documentation for this. I just noticed years ago that if the standard help files were not in a known path then they would not be found.... and that they were all named something-help.pd
A quick google search finds an old post......... https://forum.pdpatchrepo.info/topic/6874/creating-a-help-file
The forum search tool is not useful.
When searching the forum it is best to use a search engine....... "pdpatchrepo what I am looking for.."
David. -
whale-av
@jamcultur If your module is called e.g. module.... [module] ... module.pd.... then create the help file and name it .... module-help.pd
It needs to be found when you right-click [module] and select "help"...... so put it in the same folder as [module] or a folder set in the path preferences of Pd, or use [declare] in [module] so that it can be found.
David. -
whale-av
@FFW You might have more luck using the coords message rather than donecanvasdialog.... as coords doesn't need the useful hacks that are mentioned above.
I have added a size message to an old gop demo patch and it seems to work reliably with a sub-patch.
I haven't checked for an abstraction
gop_switch_coords.pd
David. -
whale-av
@KMETE RPI2 is 64-bit so you should be able to install the latest Pd...... but if there is no package for your OS then you will have to compile it...... which I understand is easy in Linux.
First on the list here for compilation...... https://puredata.info/downloads/pure-data ..... if there is not a good package further down the list.
David. -
whale-av
@KMETE You need 0.52 for [file] and as it is built into Pd it cannot be added to 0.51 unless you can find some external to do the job.
In the zip I posted above cart5.pd was built with extended, and there are externals from the hcs and ext13 libraries that you might find available for Linux Pd 64bit.
hcs/folder_list and ext13/strippath
Or maybe it's a good time for an upgrade?
David. -
whale-av
@KMETE For vanilla Pd you need to open cart5-vanilla.pd.
You can use [change] after [random] to avoid repeats, but need a mechanism to ask [random] for a new value when a repeat is rejected.
No time to look at your patch until this evening but someone will probably reply....
David. -
whale-av
@KMETE This...... random_shuffle_cart.zip ... should work. The vanilla [cart5-vanilla] needs at least Pd 0.52 I think for [file].
You can simplify it maybe, especially if you give your wav files names 0.wav, 1.wav etc., but it will give you some ideas.
David. -
whale-av
@atux Sorry, it's probably a [ctrlout] message needed, but I cannot be sure.......
This video probably helps .....
As it is xml and javascript based then if the Mixxx wizard doesn't help then it will be harder.
You might need to be sending relative position info...... there is some help in this forum for that but searching on the net "pdpatchrepo whatIAmLookingFor" is the easy way to find stuff on this forum.
David. -
whale-av
@atux You probably need to map a slider in Pd to the scratch control in Mixxx.
Mixxx will auto map if you install some DJ surface, but it seems that it can "learn" from received midi....
https://manual.mixxx.org/2.5/en/chapters/advanced_topics#advanced-controllerSo if you have a slider sending to [midiout] on a channel then probably "vinyl control" could learn the parameter.
David. -
whale-av
@willblackhurst Yes, it works for all objects in abstractions (not messages).
But the OP doesn't want to use them, and has had some very strange things happening in their patch
As @oid says, without the patch we cannot see what is going on.
David. -
whale-av
@rph-r Ok, I will not tell you to use an abstraction.
A sub-patch is simply a window within a patch, and it takes its arguments from the patch that it is in.
So if you create [mypatch 1 2 3 4] then inside the patch, and also inside the sub-patch, $1 $2 $3 and $4 will be assigned the values 1 2 3 and 4 as the patch is opened.
If you need to put objects that are identical, but behave differently depending on arguments, within sub-patches then you need to give the main patch arguments.
A sub-patch cannot have its own arguments as it is actually an integral part of the main patch.To achieve what you wish (I think I have understood) you will simply need to put your main patch within another patch (a container) and give your main patch the arguments.
If you then need to see and use guis that are in your main patch when you open the "container" patch then you can use the "graph on parent" from your main patch properties pop-up to show them in the container patch.
Or you can just open your main patch after opening the container patch.But abstractions definitely make life easier, especially if you want to modify the current sub-patches for any reason.
David.