Pyata: using puredata inside python
Hello, thank you for having created this tool!
I did some tests with because I for bute to develop the musical idea with pure data, I have some problem for are working I don't really know python code to generate the dynamic patch, after I made some test with clock.py but the problem the links there are with the modules does not blink it remains frozen, then is that I would like to know how I could learn the basics of python to adjust this , because I have a few books and I've been on quite a forum but there is nothing for type of work so as you creates the system you have any solution? or some code base that have can change for proper operation.
After I saw the video on Pyata on youtube and the truck that I is not understand these how pure control data via python directly? as I go through the terminal of ubuntu studio 12.10; $ cd workspace, cd pyata, cd src, $ python clock.py perform pure Server data at the same time but the time if I want to change the data I require suddenly from passed by Gedit and I would just win time has type code in real time and that it interacts on pure data directly, because I've seen it on video and I did not understand because it is not explained how I can exploit it.
Thanks if you voyer is message and if you can kindly help me Darius
PD sending to two devices?
generally no, but AFAIK, the ASIO drivers will load an instance of itself per application. This will work provided each instance is controlling a different piece of audio hardware (which it looks like you have setup). I think windows will see JACK as one application and PD as another...
I haven't used JACK on windows in a while - but see if when you start JACK that an ASIO control panel shows up for it in the system tray. Then see if you get a separate control panel for ASIO drivers controlling the onboard soundcard(?)
So, pd will have for input JACKASIO and for output ASIOv2 - again, provided you get 2 different ASIO control panels, that should work... but then it just comes down to how low you can get the latency down (since your essentially making an effects box)
"audio i/o stuck"
For each program that is using the ASIO drivers, an ASIO control panel will pop up in the system tray (you might need to adjust your system tray preferences). Each panel controls an instance of the ASIO drivers for that program. You can open that panel and set the inputs and outputs you want to use for that instance.
I said in the above post that ASIO can connect to one program at a time....but that isn't the full explanation. Each ASIO instance can connect 1 program to the same hardware inputs and outputs at a time.
So if you had a soundcard that had 4 outputs, you can setup 2 programs to use the ASIO drivers, one instance goes to output1 and output2, and the other instance can go to output3 and output4.
Getting your sound program running through ASIO (that's by default connected to all inputs and outputs) and getting sound from the browser (Firefox? Chrome? IE?)
is tricky. The browser doesn't use ASIO, it's using the default windows sound driver to access the soundcard. Try loading the browser first then load PD with ASIO or vica versa.
I've only been able to get a consistent working setup by having multiple (2 or more) soundcards. Windows controls one (browser sound, programs that don't use ASIO) and ASIO drivers control the other (PD, tracktor, cubase, FLstudio, etc). Route the sound output from both cards into an external mixer, and the mixer controls the main speakers (or monitors)
LP blending into a BP blending into a HP + filter graph
Hmmmm...I built one like this once...I think.
I don't recall exactly what I did but I think this would work (better):
First things first, decide what controls it. If it's MIDI you're looking at 0-127 control values, better off with Audio control. You can make a 128 point table that uses the curve you like, then read it from [tabread4~] with a MIDI CC or a [line~] for (much) higher resolution.
Anyhoo, it sounds like you'll want to take advantage of [moses] to separate the the control values into different ranges. Here's a thought:
0-24: controls LPF
24-48: controls LPF & BPF & and a crossfade curve between them
48-72: controls BPF
72-96: controls BPF & HPF and a crossfade curve between them
96-127: controls HPF
And now someone will say "but the phase distortion..." Yeah, I'm not phased.
When we say morphing there are much more complex ways of accomplishing this effect than crossfading - but crossfading is simple.
For visualizing it - well, you know what it does so it's an unnecessary burden on your CPU, but if you don't care about latency you can explore data structures - it'd be difficult to construct. Other alternatives are silly, like using noise and an FFT plot - but you'd be able to do that by hacking apart the resynthesis sample I think, again only if you are using it for production.
Please share, I could use a well thought out filter of this type - it's common in the old Traktor, right?
Basics of using pduino with pure data
I am totally new to both arduino and pure data, so please be patient
I have pduino installed and can now create the [arduino] object in Pure Data.
Now, what do I do with this in Pure Data?
Basically, I understand the bits and pieces, but am missing an overall guide to help me understand how they all come together. Is there a book or comprehensive online source that can take me step-by-step through using the [arduino] object in pure data?
Examples I have found on the web so far seem very sparse and cryptic.
Let's say I wanted to use an optical sensor via arduino to control a parameter in Pd via pduino?
Do I use the [arduino] object to spit a value into a [number] object and use that as the input value for another object?
Thanks to all in advance for responding
0.41.4 doesn't load all of its extensions?
i'm having several problems with the externals i'm trying to use.
First of all, I'm trying to add an external to print "hello world" on the screen. I copied the source from the "my first external tutorial" and everything compiled correctly. I added the ~.pd_linux and the ~.o on the /usr/lib/pd-extended/extra/helloworld directory.
In file->path... I put the /usr/lib/pd-extended/extra/helloworld. And in Startup... added external. My files are named external.pd_linux and external.o.
Once I have changed the path and startup settings the startup text box started showng the following messages:
[import] $Revision: 1.2 $ [import] is still in development, the interface could change! compiled against Pd version 0.42.5 tried but couldn't sync A/D/A libdir: can't load library Gem: can't load library cyclone: can't load library zexy: can't load library creb: can't load library cxc: can't load library iemlib: can't load library list-abs: can't load library mapping: can't load library markex: can't load library maxlib: can't load library memento: can't load library mjlib: can't load library motex: can't load library oscx: can't load library pddp: can't load library pdogg: can't load library pixeltango: can't load library pmpd: can't load library rradical: can't load library sigpack: can't load library smlib: can't load library toxy: can't load library unauthorized: can't load library pan: can't load library hcs: can't load library jmmmp: can't load library ext13: can't load library ggee: can't load library flib: can't load library ekext: can't load library flatspace: can't load library pdp: can't load library pidip: can't load library load_object: Symbol "external_setup" not found external: can't load library
Does anyone know what I did wrong?
A last question. Once I got the library installed correctly, could I simply cal the method "helloworld_setup", on an pd object to print my message?
Thanks for helping!
Make endless endless (MPD24)
I have an IDEA :D, need help in programming it
first you will need to have for each knob this, sending from program to pure data current value of knob, and storing that value, lets say 63. Now when you turn knob to one side, pure data receive FIRST number,(let say 5), then it waits for SECOND number, if its larger then (5) then PURE DATA SEND TO PROGRAM +1(it will be 64 then) if its smaller then (5) it sends -1 (62). THIRD number will be automatically be compared to SECOND, so it wont have to wait for FOURTH number to know does it have to send +1 or -1. So only on FIRST, received number pure data wont send anything, I think we can live with that.
WHEN IT REACH THE 0 then it will continuously send -1 for any 0 received, and for each 127 it will be +1
I hope that you understand this, and will be glad if someone make this I dont have a clue how to do it
Workshop: Xth Sense - Biophysical generation and control of music
April 6, 7, 8 2011
Xth Sense – biophysical generation and control of music
2.Hinterhaus Etage 2
12059 Berlin Neukölln
The workshop offers an hands-on experience and both theoretical and practical training in gestural control of music and bodily musical performance, deploying the brand-new biosensing technology Xth Sense.
Developed by the workshop teacher Marco Donnarumma within a research project at The University of Edinburgh, Xth Sense is a framework for the application of muscle sounds to the biophysical generation and control of music. It consists of a low cost, DIY biosensing wearable device and an Open Source based software for capture, analysis and audio processing of biological sounds of the body (Pure Data-based).
Muscle sounds are captured in real time and used both as sonic source material and control values for sound effects, enabling the performer to control music simply with his body and kinetic energy. Forget your mice, MIDI controllers, you will not even need to look at your laptop anymore.
The Xth Sense biosensor was designed to be easily implemented by anyone, no previous experience in
electronics is required.
The applications of the Xth Sense technology are manifold: from complex gestural control of samples and audio synthesis, through biophysical generation of music and sounds, to kinetic control of real time digital processing of traditional musical instruments, and more.
Firstly, participants will be introduced to the Xth Sense Technology by its author and led through the assembling of their own biosensing wearable hardware using the materials provided.
Next, they will become proficient with the Xth Sense software framework: all the features of the framework will be unleashed through practical exercises.
Theoretical background on the state of art of gestural control of music and new musical instruments will be developed by means of an audiovisual review and participatory critical analysis of relevant projects selected by the instructor.
Eventually, participants will combine hardware and software to implement a solo or group performance to be presented during the closing event. At the end of the workshop, participants will be free to keep the Xth Sense biosensors they built and the related software for their own use.
~ Perspective participants
The workshop is open to anyone passionate about sound and music. Musical background and education does not matter as long as you are ready to challenge your usual perspective on musical performance. Composers, producers, sound designers, musicians, field recordists are all welcome to join our team for an innovative and highly creative experience. No previous experience in electronics or programming is required, however participants should be familiar with digital music creation.
Participation is limited to 10 candidates.
Preregistration is required and can be done by sending an email to email@example.com
Requirements and further info
Participants need to provide their own headphones, soundcards and laptops with Pd-extended already installed.
Musicians interested in augmenting their favourite musical instrument by means of body gestures are encouraged to bring their instrument along. More information about the Xth Sense and a video of a live performance can be viewed on-line at
6-7-8 April, 11.00-19.00 daily (6 hours sessions + 1 hour break)
EUR 90 including materials (EUR 15).
DJ/VJ scratching system
First my story: (you can skip down to END OF STORY if you want)
Ever since I saw Mike Relm go to town with a DVDJ, I've wanted a system where I could scratch and cue video. However, I haven't wanted to spend the $2500 for a DVDJ. As I was researching, I found a number of different systems. I am not a DJ by trade, so to get a system like Traktor or Serrato with their video modules plus turntables plus hardware plus a DJ mixer, soon everything gets really expensive. But in looking around, I found the Ms.Pinky system and after a little bit, I found a USB turntable on Woot for $60. So I bought it. It was marketed as a DJ turntable, but I knew that it wasn't really serious since it had a belt drive, but it came with a slip-pad and the USB connection meant that I wouldn't need a preamp. And so I spend the $100 on the Ms.Pinky vinyl plus software license (now only $80). This worked decently, but I had a lot of trouble really getting it totally on point. The relative mode worked well, but sometimes would skip if I scratched too vigorously. The absolute mode I couldn't get to work at all. After reading a little more, I came to the conclusion that my signal from vinyl to computer just wasn't strong enough, so I would need maybe a new needle or maybe a different turntable and I didn't really want to spend the money experimenting. I think that the Ms. Pinky system is probably a very good system with the right equipment, but I don't do this professionally, so I don't want to spend the loot on a system.
Earlier, before I bought Ms.Pinky (about two years ago), I had also looked around for a cheap MIDI USB DJ controller and not found one. Well, about a month ago, I saw the ION Discover DJ controller was on sale at Bed, Bath & Beyond for $50. They sold out before I could get one, but Vann's was selling it for $70, so I decided that that was good enough and bought one. I had planned to try to use it with Ms. Pinky since you can hook up MIDI controllers to it. But it turns out that you can hook up MIDI controllers to every control except the turntable, so that was a no go. If I had Max/MSP/Jitter, I could have changed that, but that's also way expensive. So, how should I scratch? My controller came with DJ'ing software and there's also some freeware, like Mixxx, but none of this has video support. So I look around and find Pure Data and GEM.
And I see lots of questions about scratching, how to do it. And there are even some tutorials and small patches out there, but as I look at them, none of them are quite what I'm looking for. The YouTube tutorial is really problematic because it's no good at all for scratching a song. It can create a scratching sound for a small sample, but it's taking the turntable's speed and using that as the position in the sample. If you did that with a longer song, it wouldn't even sound like a scratch. And then there are some which do work right, but none of them keep track of where you are in the playback. So, whenever you start scratching, you're starting from the beginning of the song or the middle.
So, I looked at all this and I said, "Hey, I can do this. I've got my spring break coming up. Looking at how easy PD looks and how much other good (if imperfect) work other people have done, I bet that I could build a good system for audio and video scratching within a week." And, I have.
END OF STORY
So that's what I'm presenting to you, my free audio and video scratching system in Pure Data (Pd-extended, really). I use the name DJ Lease Def, so it's the Lease Def DJ system. It's not quite perfect because it loads its samples into tables using soundfiler which means that it has a huge delay when you load a new file during which the whole thing goes silent. I am unhappy about this, but unsure how to fix it. Otherwise, it's pretty nifty. Anyway, rather than be one big patch, it relies on a system of patches which work with each other. Each of the different parts will come in several versions and you can choose which one you want to use and load up the different parts and they should work together correctly. Right now, for most of the parts there's only one version, but I'll be adding others later.
There's a more detailed instruction manual in the .zip file, but the summary is that you load:
the engine (only one version right now): loads the files, does the actual signal processing and playback
one control patch (three versions to choose from currently, two GUI versions and a MIDI version specific to the Ion Discover DJ): is used to do most of the controlling of the engine other than loading files such as scratching, fading, adjusting volume, etc.
zero or one cueing patch (one version, optional): manages the controls for jumping around to different points in songs
zero or one net patch (one version: video playback): does some sort of add-on. Will probably most commonly be used for video. The net patches have to run in a separate instance of Pd-extended and they listen for signals from the engine via local UDP packets. This is set-up this way because when the audio and video tried to run in the same instance, I would get periodic little pops, clicks, and other unsmoothnesses. The audio part renders 1000 times per second for maximum fidelity, but the video part only renders like 30 or 60 times per second. Pure Data is not quite smooth enough to handle this in a clever real-time multithreading manner to ensure that they both always get their time slices. But you put them in separate processes, it all works fine.
So, anyway, it's real scratching beginning exactly where you were in playing the song and when you stop scratching it picks up just where you left off, you can set and jump to cue points, and it does video which will follow right along with both the scratching and cuing. So I'm pretty proud of it. The downsides are that you have to separate the audio and video files, that the audio has to be uncompressed aiff or wav (and that loading a new file pauses everything for like 10 seconds), that for really smooth video when you're scratching or playing backwards you have to encode it with a codec with no inter-frame encoding such as MJPEG, which results in bigger video files (but the playback scratches perfectly as a result).
So anyway, check it out, let me know what you think. If you have any questions or feedback please share. If anyone wants to build control patches for other MIDI hardware, please do and share them with me. I'd be glad to include them in the download. The different patches communicate using send and receive with a standard set of symbols. I've included documentation about what the expected symbols and values are. Also, if anyone wants me to write patches for some piece of hardware that you have, if you can give me one, I'll be glad to do it.
Keith Irwin (DJ Lease Def)
I upgraded to Ubuntu 10.10 a couple of months ago and had some issues I need help in finding the best way to resolve.
I was using Pd 0.41-4extended and upgraded to Pd 0.42.5-extended when I upgraded Ubuntu
I noticed that the Pd .deb installed a '/usr/lib/pd-extended' directory instead of the old '/usr/lib/pd'
of course the Ubuntu upgrade wiped the '/' partition (I have '/' and '/home' on separate partitions) but everything was left intact on my '/home' partition so all my patches and work files were left untouched in '/home/user/pd-externals' dir
I made sure to backup of my old '/usr/lib/pd/' directory with all my externals and docs
but now when I launch Pd it throws errors saying it can't find my libraries:
cyclone: can't load library
zexy: can't load library
creb: can't load library
cxc: can't load library
list-abs: can't load library
mapping: can't load library
markex: can't load library
maxlib: can't load library
memento: can't load library
mjlib: can't load library
motex: can't load library
oscx: can't load library
pddp: can't load library
pdogg: can't load library
pixeltango: can't load library
pmpd: can't load library
rradical: can't load library
sigpack: can't load library
smlib: can't load library
toxy: can't load library
iemlib: can't load library
unauthorized: can't load library
pan: can't load library
hcs: can't load library
jmmmp: can't load library
ext13: can't load library
ggee: can't load library
flib: can't load library
ekext: can't load library
flatspace: can't load library
so my question is:
what is the best way to migrate all my old libraries, externals and docs?
has anyone else encountered this problem?
and if so, what is the easiest way to deal with this *other* than going in and copying everything over to '/usr/lib'pd-externals/docs/' and '/usr/lib'pd-externals/extras/' dirs?
is it as easy as just changing the paths to a new location?
thanks in advance,