Paradigms useful for teaching Pd
@jancsika said:
Actually the solution purposefully avoids that approach. Look inside
[list-drip]
: it was purpose-written to do an end-run around the performance problems that come from copying data downstream to be processed later.
I thought [list store] and a "get" message avoided the need to split the list.
The approach of incrementally building the sub-messages does indeed work in this case, but again only because the message payloads are "Pd sized" payloads. Add some configuration state for a "table" key that takes a 128 element payload are you might start to see problems (depending on when and how this configuration state gets set.)
So: One Pd weakness is that there is no mechanism to initialize a [list] object with no contents but n pre-allocated slots. If you could send a message, say, "alloc 20" to a [list prepend], then you would have a concatenator that could absorb 20 items before incurring the cost of allocating more slots. Currently there is no way to avoid that cost, even for short lists.
Concatenation is really useful. It would be better to support it well, rather than trying to find weird ways to avoid it.
At least when I look at OP's problem, I see global receiver names followed by messages.
That's a good insight.
hjh
Fresh Pd 0.50.2 install comes with broken libs and deken installs broken libs
@seb-harmonik.ar said:
@ddw_music said:
One way that this could be improved:
- Per patch file, keep a list of which locations have provided externals or abstractions.
- If it's the first time this subdirectory provided an object to this patch file, print a message in the console (help the user not overlook the dependency).
I don't think this is a good idea. It would clog up the console...
My two quoted suggestions here go together: If the patch object has a list internally of its dependencies, then it's possible to report a dependency only the first time it's accessed in a given patch file. If I open a new patch and create a [gate] and later a [play~], I would want to see a message about cyclone only once per patch file, not per cyclone object. Obviously the latter would be clutter but my suggestion as worded was intended to avoid excessive clutter: "If it's the first time this subdirectory provided an object to this patch file..."
- If there is a binary library in the access path, load it automatically. Do not make the user distinguish between lib and path.
I realized later that there's a flaw to this logic: you don't know which objects a library binary provides without loading the binary -- so in practice, object search might need to load all binaries Of course that would not be ok. It may be a solvable problem, if there's some way for a binary to make an object manifest known without fully initializing.
^^ This explains why search is non-recursive, so I'll have to drop my earlier comment about that.
- Have a menu option to print a list of dependencies. (If the list of external subdirectories is saved in the patch, this is easy.)
maybe there could be some kind of helper object or something in
[pdcontrol]
or[declare]
that gets a list of all of the library or external dependencies of a patch when the user needs them. (or maybe some external would be better).
Sure, that would work. There's not a substantive difference between those approaches.
FWIW SuperCollider's "greedy" approach to loading extensions isn't totally ideal either -- because method dispatch is resolved at runtime, there's no way to know by scanning code whether a method call will hit an extension, or which one. I've been bitten by this more times than I can count. That's one reason why I switched my Pd teaching over to use [declare].
The -lib vs -path thing, though... sheesh, it's like "let's deliberately annoy users and drive them away" -- and that pull request is hilarious -- "hmm, but what if you want to declare a library that is called -path
?" Really? This kind of bizarre hypothetical is why they would question an honest attempt to make life easier for users? "Oh, let's push this idea into limbo because of something that nobody with an ounce of common sense would ever do"
hjh
Shared references to stateful objects?
So, to sum up the strategies presented so far:
- Global storage -- Pro: Super-easy for numbers (with [value]), fairly easy for other entities with [text] as storage. Con: Potential for name collision, but that can be avoided.
- Trigger the sequencer/counter/whatever and save the value in a global location.
- The caller reads from the global location.
- Changing [send] target -- Pro: Caller directly specifies the return point. Con: A bit "magical."
- Caller sends the request with a [receive] name tag.
- The pseudo-function updates a [send] with the name, and passes the data there.
- Abstraction, globally-stored index -- Pro: Call and return are all in the same place. Con: Global storage name is hidden in the abstraction -- be careful of collision. Also, in the provided example, redundant memory usage (three copies of the [text], all with the same contents).
- Abstraction increments a counter, which is shared across all instances.
- Gets from [text] at that index and returns directly.
It seems to me that any or all of these could be useful in different cases -- the globally-stored index might be perfect in one case, while a name-switching [send] might be better in another. (Tbh I don't see this as "clunky" at all -- if you have widely spatially disparate references to the same source of data, as may easily be the case in a large and complex program, a simulated function call might be the cleanest way to represent it. Also, it seems to me that in all of the "shared storage" approaches, there is some risk of name collision, but this risk essentially doesn't exist with the send/receive approach, because the caller is completely in control of the location where the data will be returned. Oh, and I'm seeing a bit late that this is one of the options jameslo suggested.)
As you've probably gathered, I'm much more comfortable with text languages. (With apologies in advance... tbh I think in most cases, you can go farther, faster, with text languages. With the exception of slider --> number box, pretty much the only thing I can think of that Pd can do better than SC is [block~], which SC simply doesn't have. Especially when complexity scales up, I find text to be more concise and less troublesome. E.g., if the synthesis code is structured correctly, I can create 3, or 10, or 100 parallel oscillators just by changing one number in the code, and without saving extra files to use as [clone] abstractions. I would love to see some counterexamples here! What am I missing? Being proven wrong means that I learned something.)
WRT to Pd, after about a year of use in a couple of courses, I feel like I'm starting to get a bit better at it. For me, the most important point of this thread is to learn dataflow vocabulary for the text-programming concept of function calls. This discussion has been really valuable for me.
hjh
Smooth frequency transition
Hi guys, thank you for all suggestions.
Just a ramp with [line~] doensn't make the job because it produces glissando acting only on the next frequency.
In the F09.declickit example suggested by lacuna about the changing of the center of frequency by adding two cosine, occurs a very smooth transition, very pleasent to hear, involving both previous and next frequency.
But this patch change the center of frequency of a given frequency, I need that smooth transitions to change from/to any frequencies. Any suggestions? Thank you.
Camomile : An audio plugin that loads Pure Data patches
@starchild Thank you! I'm pleased these projects are useful to you.
Yes, of course, anybody can contribute by creating issues, merge requests, or writing documentation on the GitHub repositories. You should have a look at this document. In general, I just try to avoid to do things that will complicate the maintenance of the projects because I've already difficulties to find time to work on them. So, it's often better to start a discussion on a subject before starting to develop, this way we could avoid conflicts, see if contributing directly to a project is suitable or if creating a side project would be more appropriate, etc.
BTW, I keep the affiliation with the CICM because I started these projects there and it was great, now I'm working at Ircam for 2 years, so perhaps I will put a double affiliation .
GEM error
I know this has been asked a few hundred thousand times- i know because i've been reading everything i can find. But most of the documentation and posts are apparently outdated, or don't seem to work for me.
I had been learning pure data for a few weeks about a year ago using pd extended, but noticed that the libs haden't been updated for a long time, so when i got back into it yesterday i decided to start with the nonextended version.
At first i didn't realize that Gem isn't a standard library, so downloaded it, installed, eventually found that someone suggested to go to edit/preferences/startup, make a new entry and just type "gem" and add it. I did that, restarted. The log window still shows a lot of error messages, it looks like PD is searching for two files:
gem.dll
Gem.m_i386
There are a lot of lines that indicated tried and failed for both, but eventually i see "succeeded" for gem.dll, but not for Gem.m_i386.
Anyway i 'put' an object called gemwin and two messages, create and destroy and link them both to gemwin after creating a new project, then switch to run mode ctrl-e and click on create. Nothing happens. It should make a black, empty gem window, but it doesn't.
In the log window, there are no entries added after clicking on create/destroy, i don't know what i'm doing wrong, can someone suggest what to do?
I've been reading for hours, a lot of pages suggest where to look, but have dead links, or the suggestion didn't help, any ideas?
I pasted below the full startup log (the full log using the "all" option).
Thanks:)
Rob T
------------------ done with main ----------------------
input channels = 2, output channels = 2
Default font: DejaVu Sans Mono
tried ./Gem.m_i386 and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem.m_i386 and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem.m_i386 and failed
tried C:/Program Files (x86)/pd/extra/Gem.m_i386 and failed
tried ./Gem.dll and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem.dll and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem.dll and failed
tried C:/Program Files (x86)/pd/extra/Gem.dll and failed
tried ./Gem/Gem.m_i386 and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem/Gem.m_i386 and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem/Gem.m_i386 and failed
tried C:/Program Files (x86)/pd/extra/Gem/Gem.m_i386 and failed
tried ./Gem/Gem.dll and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem/Gem.dll and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem/Gem.dll and failed
tried C:/Program Files (x86)/pd/extra/Gem/Gem.dll and succeeded
GEM: Graphics Environment for Multimedia
GEM: ver: 0.93.3
GEM: compiled: Nov 10 2011
GEM: maintained by IOhannes m zmoelnig
GEM: Authors : Mark Danks (original version)
GEM: Chris Clepper
GEM: Cyrille Henry
GEM: IOhannes m zmoelnig
GEM: with help by Guenter Geiger, Daniel Heckenberg, James Tittle, Hans-Christoph Steiner, et al.
GEM: found a bug? miss a feature? please report it:
GEM: homepage http://gem.iem.at/
GEM: bug-tracker http://sourceforge.net/projects/pd-gem/
GEM: mailing-list http://lists.puredata.info/listinfo/gem-dev/
GEM: compiled for SIMD architecture: SSE2 MMX
GEM: using SSE2 optimization
The Pd window filtered 40 lines
The Pd window filtered 41 lines```
NVidia puredyne vs vista
Hey
Once again I'm back on vista. My brief journey to puredyne goes something like this.
from puredyne
partitioned new hard drive with 4 partitions 1-swap , 2 ext4 200Gib, 1 NTFS 200GB . Copied Vista to NTFS partition with gparted(started to do this with dd but with new Gibabits stuff I was skeered but hey a platter is a platter and a cluster is a cluster right). Actually there was a 5th partition in there which was the vista restoration partition but I eventually deleted it for obvious reasons.
Removed old drive ,
took machine to ethernet connection with internet,
booted to vista ,
installed Norton virus scanner - only 1 virus, 2 tracking cookies, and one gain trickler after over a year with no virus scanner, Thats pretty good and shows you can be selective about what you download and where you visit on the web and not get any viruses.
Was trying to get windows movie maker to work with mov codec which it doesnt.
Installed auto updates for the first and only time. this took about 3 hours and still needed to install service pack 1, 2. Aborted trying to update win movie maker
****Problem 1***** MS movie maker does not work with GEM mov video output codec.
Installed latest Nvidia drivers for vista.
Woohooo OpenGl hardware acceleration GEM works so much better in vista now.
*****Problem 2********ASIO for all does not allow 2 applications to run with audio and midi at the same time. If I wanted to run Widi and play my guitar so puredata can receive midi input from guitar ASIO will not allow it but ASIO for all is the only way I can get latency down so this would be feasible.
Got frustrated.
Installed fresh copy of puredyne onto 2nd ext4 partition.
ran puredata audio latency good with fresh install. gem video bad.
used synaptics to install nvidia drivers. v185 I think.
ran GEm error no opengl config.
downloaded gdeb , flash player, google chrome, nvidia drivers from nvidia site.
installed gdeb from terminal, flash and chrome from gdeb.
rebooted to log in as root and iunstalled nvidia drivers.
woohoo hardware acceleration for opengl
******problem 3************
gem works great but audio glitches with puredata window visible.
when only gem window is visible i can unaudioglitchily move the mouse around to control same parameters that would normaly be controled with sliders in pd window.
Seems like before i upgraded nvidia video drivers hw:do o whatever it is, was listed in JackD as realtek HD Audio, now it is listed as NVIDIA HD Audio.
So Gem works great but not when Pd window is open and I think my audio drivers were replaced with Nvidia.
I would really like to get back to my patch and stop wasting time on these operating systems and hardware configurations I thought in the last 15 years all this hardware acelleration and autodetection would be figured out but no all we got is rc.0, rc.01, rc.02, rc, etc...... instead of just rc.d.
Ok I'm getting an error when I exit puredyne that says pid file not found is jackd running. anyone know what that means?
Also does anyone have a keymap for gem keyboard for linux, windows and mac so I don't have to record them.
Any suggestions about what to do about my ASIO problems in windows?
Any suggestions about my audio driver in Linux?
Any suggestions about my GEM mov video / windows incompatibilities?
I can import the mov video and audio to SF Acid 3.0 and output a 2Gb avi then import it into windows movie maker but this is crazy to do for a 7 minute 12fps 320x240 video.
Ahhhhhhhhh!
Any suggestions are welcome!
PS I believe someone could rewrite puredata's audio and video interface in assembly language to control their hardware before figuring out how to get these operating systems to do it.
PureData Bootcamp- Cardiff UK, Sept 09
Please excuse the cross posting:
PureData Bootcamp
Tuesday 1 September - Saturday 5 September
The Royal Welsh College of Music and Drama is proud to offer an intensive 5 day PureData workshop. PureData is a free and open source real-time graphical programming environment used by artists to create a range of visual arts, theatre, dance, audio, installation, performance and media art works.
This intensive boot-camp is designed for artists working in different media to explore the capabilities of PureData to create interactive environments, real-time sound design, physical modeling, manipulation of live visuals and interface authoring.
The course will culminate in a performance/ installation/ concert of the work realised during the week.
Participants are welcome to bring their own laptops, but full resources are provided.
To apply for this course, please download the registration form here or contact the Events Team to receive a registration form via email or post
Cost: £200 + VAT
***Early Bird Offer***
£100 + VAT
Only Until August 1st
How to Book
Complete the booking form and return, enclosing a cheque or credit card payment details, to: Events Team, Royal Welsh College of Music & Drama, Castle Grounds, Cathays Park, Cardiff CF10 3ER
For a hard copy of the booking form contact the Events Team on 029 2039 1391 or email: shortcourses@rwcmd.ac.uk
Although there is no application deadline, places are limited so early booking is recommended
Additional Information
If you have a disability please provide sufficient information at the time of booking so we can consider any special arrangements necessary
The restaurant at the College will be open at lunchtime for the purchase of hot and cold meals
Accommodation can be arranged through the College at Severn Point, the privately owned RWCMD Halls of Residence, at a cost of £20 per night. Severn Point offers indiviudal en-suite rooms which are arranged in flats of 6 bedrooms around a communal living and kitchen space. The Halls are aproximately 12 minutes walk from the College.
To book a place in the Halls of Residence please fill out the booking form and return to the Events Team 3 weeks before the start of your course.
If you require more information about any aspect of the accommodation please contact the Events Team on 029 20391 391.
Further Queries
If you have any queries about any aspect of this summer school please contact the Events Team on 029 20391 391
Terms and Conditions
This course is suitable for individuals aged 16 + only. All information is correct at the time of writing; however, should there be any changes to general information, course content or tutors, students will be informed prior to the start of the Summer School
For further information, contact: Events Team on 029 2039 1391
Changing length of beats/steps/something......?
The reason why it's not working until you open [wrap~]'s help window is because audio needs to be turned on. The help patch does this automatically with:
[loadbang]
|
[; pd dsp 1(
So I'll try to explain how this patch works. It's based on using a master [phasor~] object for everything to sync to. I used beats per minute because Hz is the same thing as cycles per second. By dividing bpm by 60, you get beats (cycles) per second. It's just easier math (to me) than using ms, and it's more musically intuitive anyway.
The signal for the [phasor~] is multiplied by the beat division, scaling its range. So if you want the beat divided into four subdivisions (16th notes), it will be scaled up from 0-1 to 0-4. [wrap~] takes a signal and wraps it around so that it falls within a range of 0-1, so 2.3 will become .3, etc. It essentially just gives you the fractional part of a number. Sending the scaled up [phasor~] output to this results in a ramp that is synced to the subdivision. This is then subtracted by .5 to scale the range from -.5 to .5, just so there are some zero-crossings.
[zerox~] is used to detect the zero-crossings. It doesn't seem to have a helpfile, and I'm not sure what the difference between the to outputs are. I just know they very briefly spit out a 1 when crossing zero. [edge~] detects sudden jumps in a signal and outputs a bang, which is used to drive the counter.
It's just occured to me that [zerox~] detects zero-crossings going up and down, and I designed the patch with the idea that it should only detect signals crossing downward. So it's actually going twice as fast as it should! Dividing the bpm by 120 instead of 60 should remedy that.
Hope that helps.
Time-counter, Flip - flop, comparitor...?
Hey there.
I'm trying to biuld a patch which run realtime count-ups (in msec) between zero crossings.
I haven't sound the right modules necessary to do the tasks below.
I'd appreciate anyone's advice.
So, I need a counter that generates a streaming signal of upcounting time.
it needs to be resettable, and just keep counting upward. having some maximum time-argument or stop-out would help prevent stacks from overflowing.
the trick is, this needs to run at signal speed (default 44.1khz), and be able to stream out fractions of a millisecond,
thus, I can't use a metronome, because the metronome seems to only go down to 1 millisecond.
(unless I'm mistaken).
I need to reset these counters eveery time the signal crosses above and below zero, so I need some kind of comparitor signal unit, which outputs a bang only and exactly when the cross to one side is made.
I want to use this with a flip flop of sorts, which simply changes input status every time it recieves the bang.
I'd really appreciate it if anyone could:
...direct me to existing modules or applications/combinations that could do this kind of thing.
...refer me to existing abstractions that people have cooked up for this kind of thing.
cheers,
G...