BUG Community

Welcome! Log In

aturley's Blog

libpd: Embedding Graphical Programming

Pure Data (also known as pd) is a graphical programming language. Programs are called "patches", and consist of lots of boxes connected to each other by lines. Here's a picture of a pd patch that counts from 0 to 100 over and over again.

created on: 04/19/11

I was going to try to explain this whole patch, and talk about objects and messages and connections, but I realized I would be duplicating the efforts of others. If you want to know what's going on, take a look at the Interface section. Also, check out this video where a guy builds a sequencer. Since pd is graphical, sometimes it's easier to get an idea of what's going on by watching someone assemble a patch and listening to them talk about what they're doing.

 

Some Background

If you read through those links and you're still with me, good work. And if you're confused, don't worry too much. It takes a little bit of time to wrap your head around what's going on in pd. The import thing to remember is that messages are passed from one object's outlet to another object's inlet.

Early on, pd (or rather, pd's creator's earlier language that ended up becoming Max) was used primarily for processing MIDI messages. The emphasis was on receiving an external event (a MIDI message), doing something with it, and possibly sending other events. These days pd is strongly associated with things like audio synthesis, but one of its strengths is still the ability to graphically describe procedures for handling message events. There are built-in objects for receiving and sending MIDI events, but there are also two objects, "send" and receive", that provide a general mechanism for passing message around within pd. Here's a patch that uses send and receive to transmit a numeric value.

created on: 04/20/11

In this case "num" acts as a global channel that can be used to transmit messages. The messages are broadcast in a point-to-multipoint manner, so multiple receives can receive a message from the same send. And multiple send objects can send messages along the same channel.

libpd

For a while, the standard way of interacting with a pd patch from another program was to create network connections using objects like netsend and netreceive. This made it difficult to do things like develop a game audio engine in pd and distribute it, because anyone wishing to use it had to have pd installed, and the application had to make sure that pd started up and loaded the patch (or patches) correctly.

A smart guy named Peter Brinkman came along and built libpd. libpd is a C library (with wrappers for a few other languages, including Java) that lets programmers embed pd in another program. Patches can be loaded and unload, and the parent program can communicate with patches by sending and receiving messages. The client program runs libpd inside a loop, passing it an that represent the audio input to the patch, and receiving an array that represent the audio output. This is usually done inside an audio loop, where the byte buffers represent incoming and outgoing audio. These audio processing callback occur at known intervals, so libpd can use this information to keep track of timed events like sending periodic messages from a "metro" (metronome) object. Messages sent to libpd are processed during the audio processing call.

The send/receive mechanism can be used to control applications from pd patches. For example, on the BUG I might create a convention that says that the BUG will send messages to "from_bug", and will listen for messages that are sent to "to_bug". I could then create a message vocabulary, where the patch could send a message like "accelerometer getSample" that would request a sample from the accelerometer, and it would receive a message like "accelerometer sample X Y Z" where X, Y, and Z are accelerometer values.

To this end, I've written a few wrapper bundles for the BUG that attempt to encapsulate libpd and expose BUG functionality to patches. The bundles are libpd, PureDataWrapper, and BugPureDataServices. The description of PureDataWrapper explains how to load a patch into libpd via HTTP. These libraries are very rough around the edges and provide only a bare-bones set of functionality, but I've been able to run the following patch, which reads data from the accelerometer and uses it to change the brightness of one of the LEDs.

created on: 04/20/11

Post Comments

Add Your Comment!

Log in to leave a comment or Create an account

daran, wie w��tend gemacht , dass Tony ? " Beide Jungen schrie vor Lachen. "Ma ist eine Karte ", sagte Brent Michael Kors handbags outlet mit viel Zustimmung . "Man kann immer auf michael kors bag sie z?hlen , um die rightthing tun, und Michael Kors Black Friday Sie
kam aus Virginia. Sie sagt Virginians Michael Kors clearance sale setquite ein Gesch?ft durch solche Dinge . " wholesales michael kors bags online " Sie k?nnen 'em haben . Geben Sie Michael Kors Black Friday Sale mir ein gutes Pferd zu reiten und ein Michael Kors crossbody bag paar gute Lecker zu trinken und eine
michael kors crossbody bag />sollte klug Genug zu mischen und anzupassen Waden michael kors bags wholesale Kost��me und vermeiden , sterben Gleichen Kost��me Alltag Michael Kors outlet , INDEM SIE Eine Notiz von dm,

You made some good points .I did a little research on the topic and found that most people agree with your blog. Thanks.
buy lortab online

I enjoy a couple of from the articles which have been written, and particularly the comments posted! Definitely I will be Visiting again! buy valium roche Online

Hello, an amazing article dude. Thanks But Were issues in your rss . Dont know why Unable to subscribe to it. Could there be others having similar RSS trouble? Anybody nobody can assist please reply. Thnx!
buy codeine online

Wonderful site and I wanted to post a note to let you know, ""Good job""! I’m glad I found this blog. Brilliant and wonderful job ! Your blog site has presented me most of the strategies which I like. Thanks for sharing this.

"Na ja , ich gebe es auf. Aber tut mir leid, sie hat uns nicht fragen, zum Abendessen . Ich schw?re, ich Christian Louboutin Shoes will nicht gehen homeand h?ren Ma nehmen ��ber Michael Kors Outlet Handbags uns ausgetrieben . Es ist nicht so, das true religion outlet war das erste Mal. "
Kurs Online zugreifen Christian Louboutin Outlet Store gegeben . Nach der Anmeldung sollten SIE in [linlei] der Lage seins , ?h H?hle Lehrplan und Christian Louboutin Outlet Aufgabe- downloaden , Sowie in der Lage seins true religion brand jeans , mit Anderen Online - Studenten DURCH
Moncler Outlet />Hardware , Durch Druck Mann Fortgeschrittene Lehrmethoden , Nike Free Ausbildung und Simulationen switch Schulungsmaterialien lerne

new balance outlet online

h¨¹bsch, und ich wei? verdammt gut, sie haben kein Whisky,

Michael Kors Outlet Handbags

Roggen Vaters ber¨¹hren bekam . " " Ashley Wilkes sagte,

michael kors

dass sie eine Menge von Landschaft und Musik. Ashley
Unter

gucci bags

sterben Masse Kosten senken Kann unterlassen . Und VOR Allem

Michael Kors Outlet Store

Nicht KOPIEREN your TV -Star sofort nach der Show, ?h

Michael Kors Outlet

Nicht bezeichnet einen Nachahmer zu unterlassen . Kurz ges?gt, ?hm

kate spade

Eine
theslightest macht flattern und kreischen . "" Nun, man

prada outlet

kann nicht ihre Schuld . Sie haben zu schie?en Cade

Louis Vuitton Store

im Bein . "" Nun , ich wurde lickered oder

chanel outlet online

ich h?tte es nicht getan ", sagte Stuart .
gesch?lt

Louis Vuitton Outlet

, bis wir sie aus. Alles, was sie werden wissen,

 

 

 

deal could be the huge backpack with kate spade outlet little lunch bag and medium pencil case set You barbour outlet store can also have different kinds of finish on either side coach bags of paper for different effects
EMT training can supply you Louis Vuitton Outlet using the capabilities you are going to should aid preserve Kate Spade Bags life, your mindset also as comprehending are just as critical michael kors outlet because your understanding also as coachingWrite for a revenue sharing coach factory store sitesThis is a kind of new concept that a lot katespade.com of sites have taken into consideration This signifies that you kate spade new york do not have to spend a lot of money in chanel bags order to experience this sort of achievement for as long Michael Kors as you use your originality and utilise your resources to Louis Vuitton Sunglasses the best of its potentials the expert's job will be barbour online into

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

Máy tập cơ bụng ad rocket

Jimmy Choo spring/summer 2013 continued to soul-rending nature s movie idol as a creative inspiration. Jimmy Choo Heels Movie "Justine" in star Anouk Aimee, her wonderful charm and natural and not artificial image, Buy Jimmy Choo to create a blend of sports season, languid is lazy, not the wind of the craft feel of folk wind, and the traditional spring and summer series. Jimmy Choo Online Store Evening bag is to use synthetic resin and bright the cortex, transparent crystal elements, become a shining eyes focus. Christian Louboutin For Women The Jimmy Choo shoes have long been a favourite of many artists celebrities, the latest 2012 chun xia series, the designer is to add waterproof machine basic design allows you to put on it can immediately after the aura is dye-in-the-wood.

Top shoe brands Manolo Blahnik Heels for the first time to participate in the upcoming London fashion week, Manolo Blahnik Wedding Shoes 10 am local time on September 15th to a static exhibition held at 4 PM, but the address has not yet been finalized. Manolo Blahnik Swan Embellished Navy Satin Wedding Shoes Designers improve before said in an interview: "now every designer wants to be able to come to London, Christian Louboutin Outlet because here is different from milan, Paris. Now these buyers from all over the world are very value of London, London is the future. Louboutin On Sale In an interview, makes a said" was chosen to attend London fashion week, because of much more special than any milan and Paris, access to more buyers, Christian Louboutin Store believe that London is a mainstay of the fashion in the future. "

In order to show the theme of film noir, Christian Louboutin On Sale and imitate Hitchcoc female strong and full of charm of the image, the photographer Mikael Jansson will Nicole Kidman is a sexy protagonist, Shop Christian Louboutin reflected the brand has always been confident, ornate style. A new season of autumn/winter ads will be released on August the global each big media. Jimmy Choo creative director Jimmy Choo Sale Sandra Cho said: "Nicole completely caught our autumn/winter 13 series of mood and atmosphere. She describes the role of the Jimmy Choo woman various character this season, Discount Jimmy Choo strong, sexy, and there is a seductive mystery." "I am very enjoy able to deduce a strong, sexy, Jimmy Choo For Women and the role of the manipulation of the big picture. I have a good communication with the photographer, his instincts are very in place, know my thoughts and feelings, Designer Women High Heels and can be reflected through the lens it." Nicole Kidman says.

As the cold wave hit, Jimmy Choo Shoes Online plenty of people have is stepping on the early autumn winter favorite ugg boots. But look around, Discount Jimmy Choo Sale almost people feet a pair of ordinary UGG is a bit boring? Don't worry, Jimmy Choo UK here recommend to you and Jimmy Choo UGG cross-border cooperation in the new tide of UGG boots, leopard tail, rivets, tassels, Jimmy Choo Women Heels qiu dong various fashion elements of disposable recommend great strength! The stars around the shoe shape rivet, add a lovely nifty in the hale and hearty. Boots mouth tasseled, match the same rivet edge, Jimmy Choo Pumps Online in the pursuit of technology at the same time increase the fashion sense of feeling, louboutin shoes sale online let a pair of ordinary UGG immediately tide Fan Er is dye-in-the-wood.

"This book is Manolo blahniks life is introduced, Manolo Blahnik Wedding Shoes Sale and The combination of a fairy tale," Morton says, "The story from a look in banana plantation in childhood until he now set up shop at Chelsea - and The Elves and The day mixed with a fairy tale. Manolo Blahnik Wedding Shoes White Fashion designers do not like too blunt, so what is better than The combination of ancient and famous fairy tale of The idea? Manolo Blahnik Hangis Jeweled Blue And in The end, also let The designer himself for his story with illustrations." Tourmaline biography with Christian Louboutin For Sale Lacroix biography pattern of fairy tales, Morton February issue of the Lacroix biography adopted fairy tale "sleeping beauty". Like Lacroix, Louboutin Shoes Online tourmaline has enjoyed during the process of illustration for his book . Jimmy Choo Pumps

Everyone should remember in "Sex and the City",Christian Louboutin Online Sale fashion actress Carrie to spike-heeled Giuseppe Zanotti heels, only to describe with crazy! Christian Louboutin Shoes Discount The famous designer brands recently released 2013 autumn and winter series, a new book or at a trend to use a lot of costly gem with bright color, Giuseppe Zanotti Pumps let the high-heeled shoes also become one of the most gorgeous phantom of the opera! Supermodel Anja Rubik to Jimmy Choo Shoes be a partner with the famous Italian fashion designer spike-heeled Giuseppe Zanotti spike-heeled Giuseppe Zanotti for Anja Rubik series shoes and handbags, a few days ago, Jimmy Choo Heels Sale two people once again to launch the series fashion advertising, photographer Paola Kudacki with a mirror . jimmy choo shop

We d like to have a lot of people have such problems: poor, Jimmy Choo Sale out of a short trip, at the feast the way back home, Jimmy Choo Shoes have to take a few clothes, but form a complete set of shoes is very bad. Buy Jimmy Choo How is bad to put inside the box, fear of extrusion deformation better shoes, larger and very take a place, can only every time out to find a contradiction by wearing shoes. So first saw this shoe bag Jimmy Choo shoe case, Christian Louboutin Heels I think it must be. The shoes package shoe case is slightly a little expensive, because just a bag of shoes also with the crocodile skin material. Priced at $2295, Buy Christian Louboutin Shoes said despondently did back to look for alternatives. Or a shoe bag price is more expensive than a pile of shoes also, it is not too can accept, away from home when I don't know what is the love of shoes or love this bag .
louboutin uk

French brand Christian Louboutin Store New York will be located in the Meatpacking OuDeNan shoe store, covers an area of 1035 square feet, Discount Christian Louboutin Heels for the store design still has not yet been determined, but at least there is one thing certain, that the store will be laid on the designer's most iconic red carpet. Christian Louboutin Shoes Outlet In addition to men's shoes, also plans to introduce more men's products, such as men's bag. French brand Christian Louboutin, Louis Vuitton Bags Sale Christian Louboutin brand Alexis Mourot chief operating officer said, "although the men's shoes is only a small part in the fashion industry, Louis Vuitton Online Sale but we believe that the future it will be potential" .

Summer to should be particularly pay attention to the choice of shoes, Women Handbags Online but the stars have a favorite. Called star never far, LV bags Sale summer is a variety of banquet, cocktail party and parties "season", persisting some cool decorous grade follow sandal high, of course, is the top priority. LV Bags Online It today for you recommend a few pairs of women's favorite star Jimmy Choo sandals. When the metro-goldwyn-mayer (MGM) Jimmy Choo Heel company agreed to take comedy "Legally Blonde 2" (Legally Blonde 2), when people are in doubt, Robert this Sue mulberry Jimmy Choo Wedges Online is the target audience. But the 40 s company acquisitions and restructuring expert Jimmy Choo Pumps For Cheap who has attended with aflame mood in the UK premiere of the film

» All comments
» Comments RSS

Powered by Community Engine

Top