Symbols explicit
@porres said:
@ddw_music I hear a lot about what SC can do that Pd can't, but that was not the discussion...
Sure, I was hijacking a bit.
I don't care for live coding, for instance. I never needed scripting in Pd as well. Having said that, I'd love to be challenged in offering a "pd solution" to some of its things.
It's not that Pd can't necessarily -- it's rather that the weight is heavier: anArray.do { |item| ... some operations... }
vs
A concrete weakness of patching is when you have a stateful object that needs to be accessed in multiple places. In a text language, this object lives in a variable, and you can use the variable anywhere in its scope. The best I can figure out for Pd is:
It's "ok" but with a bit more effort. And this effort is kind of the point -- if enough things are just a little bit more difficult, then the "it's not worth it" threshold is lower. Like, I've got a function in SC that takes an array of intervals, a root scale degree and a top-note scale degree, and it does a recursive tree search to find the most consonant (relative to the root) arrangement of those intervals coming down from the top note. In SC I get recursion and scale-degree mapping for free, making it a lot more approachable to implement (where in Pd, I'd have to implement my own recursion stack and at least search for an external for scale degrees).
You know, I stole a lot from SuperCollider into ELSE, I'm interested.
I saw that -- [resonant~] vs Ringz.ar is what tipped me off.
In Pd, loading a big audio file can glitch the audio so you need a workflow where everything is laid out in advance and that's just what you're working with
This can be solved with an external, and [else/sfload] can load big files without choking Pd by having a multi-thread mechanism.
Feature request for sfload: provide file statistics (sample rate, number of frames etc.) upon completion. If the file read is asynchronous, currently you have no way to know when it's done and no way to get access to these properties.
More serious for Pd, though, is that adding signal processors causes the entire graph to be re-sorted, and this can glitch. So if I add a poly instrument with 15 copies of a big synth, I wouldn't trust doing that on the fly.
let me try, I wanna have a better idea of what you mean
Maybe in a different thread... more than I can write up just at the moment.
Did you really run that test though?
and well, not sure if I know what you mean, because if it's what I think, it this seems like a pretty basic lesson for Pd. It's on the control examples...
Of course I haven't... sure, I could be wrong. But it does come up from time to time on the forum, without referring to the control examples.
hjh
Symbols explicit
@porres Couple of things SuperCollider can do that Pd cannot:
-
Dynamically add DSP glitch-free -- this is central to my musical practice, actually, the idea that I can load up an instrument at any time and already-running audio will continue without a break. In Pd, loading a big audio file can glitch the audio so you need a workflow where everything is laid out in advance and that's just what you're working with. Understood that one of the benefits on the Pd side is a tighter timing model, but that comes at a cost of less flexible improvise-ability.
-
In SC, I implemented a live-coding dialect and I can safely say, the kinds of string manipulation that this requires are beyond the practical limits of Pd. You can convert a symbol to a list of ASCII bytes but the state-machine iteration over the source string IMO exceeds the threshold of what's practical to do in graphical patching (and that's not even mentioning regex matching, which I use extensively). It's not impossible but it would be so complex in patching that anyone who wanted to do it would be advised to just write the parser in Lua and embed into the patch. Don't even try; Pd does not have the string tools.
That second point is related to the fact that graphical patching is not at all well adapted to traditional comp-sci types of tasks. If it were better than coding, computer scientists would have adopted it. But it's (sorry) objectively clumsier at if-then-else and looping. Like, if you put a hundred Pd users in a room and asked them to make a for loop with an index, a majority wouldn't be able to (not really their fault, because nobody really teaches how to write a for loop) and of those who could, you'd get all unique solutions with varying degrees of efficiency. That's just a basic for loop. In SC, there's ".do" -- there are things I'll try to do in SC because basics like this (or recursion, or early-exit from a loop) are more straightforward; I would never, ever attempt some of those in Pd (and it's hard to express the depth of that feeling -- incidentally I did implement a classical priority heap algorithm in Pd, and that was ok because it's just a while
, but I could have done it faster in SC -- except I wouldn't have to because SC already has a PriorityQueue ).
I also think many media artists don't need all the CS stuff, and that's fine, Pd is an easier way in.
hjh
tutorials for app dev using Xcode & Pd out of date
If you are set on using just the native iOS UI tools this solution probably won't work, But I maintain a cordova plugin for libpd, you can find it here: https://github.com/robertesler/cordova-pd. There are instructions on how to use it on the README page. With cordova you can use HTML5/Javascript for your UI and interface with a Pd patch. Cordova will allow you to create an iOS platform which generates an Xcode project.
Otherwise, the examples on the pd-for-ios still 'should' work. I haven't tested all of them for at least a year, but that is also worth a shot if you really need to use native iOS UI tools.
Good luck!
Simple Glitch Effect
Hey everyone !
I'm proud to share to you a really simple abstraction i made today named "glitch~.pd", wich I created to reproduce typical sounds of breakcore/IDM artists like Autechre, Squarepusher, Venetian Snares, etc..
The idea of this abstraction came from youtube channel "Sound Simulator", who did this excellent videos about how to make glitches with PureData
It's only a begining, do not hesitate giving your feedback / advice about it !
https://github.com/izeKake/glitch-/tree/main
Screenshot of glitch_help.pd :
Open Call: Crafting Perfection with the Fibonacci Sequence
Is Perfection Important?
Exploring the Sound through the Fibonacci Sequence
Application deadline: Nov. 18, 2023, 12am
Submission Email: lyd15150099208@gmail.com
Website:https://www.yadong.uk/process-2-1/event-one-jn7aa
Music and Data Convergence: A Call for Creators
The intersection of music and data offers a realm of boundless possibilities. Both fields rely on precise symbols to convey information, creating a parallel between musical notes and data records. Just as performers and listeners immerse themselves in the musical experience, data enthusiasts observe and record the ever-evolving world of information. In this context, stages and instruments become the equivalent of facts and observations, bridging the gap between music and data.
While music and data aren't identical systems, music can be seen as a unique way to represent data. It's not just about recording and playing notes; it's about reimagining music from a data perspective. Our goal is to unlock infinite possibilities, sparking creativity at the intersection of data and music.
Open Call: Crafting Perfection with the Fibonacci Sequence
The Fibonacci sequence, a mesmerizing pattern found in nature and the arts, offers an exciting creative opportunity. Starting with 0 and 1, each number in the sequence is the sum of the two preceding numbers (1+1=2, 1+2=3, 2+3=5, and so on). This sequence often leads to the golden ratio (approximately 1.618), a cornerstone in creating aesthetically pleasing designs in art and architecture.
I invite artists, musicians, and visionaries of all levels to explore the potential of this sequence in crafting perfect sound art. Use the data series that represents perfection to create works of sonic wonder.
If this piques your interest, please share your artwork or ideas with us via email. We'd love to hear about your creative process and vision.
Selected works have the chance to be featured in our upcoming online exhibition.
Join us in the exploration of data and sound, as we redefine the boundaries of creativity at the nexus of music and information.
PD audio project on RPi: playback keeps glitching/freezing
@60hz Thank you! By subpatches, do you mean abstractions? This will help? I thought the only benefit was to make things less cluttered.
@fishcrystals Thanks for the suggestions! I don't really have time for reinstalling patchbox but it looks awesome: I'm going to use it going forward. I've had a lot of audio issues with the regular raspian.
I tried booting to the text console but it negated the startup script I had in place using Autostart- I know there are alternatives to make the patch run on boot but I am under the gun here! Also, switching to text console meant I lost the ability to use VNC viewer, and I only have a teeny little screen to plug directly into the pi which makes things difficult to read.
@whale-av Thanks for all these resources! I added dwc_otg.speed=1 to boot/cmdline.txt... And maybe it worked? The glitch isn't consistent, although it is still happening. I have noticed that the buttons connected to the arduino nano may have become more jittery: is it possible this is a result of dwc_otg.speed=1 ?
The bang in the screenshot is actually because I took a screenshot of a screen recording that was paused. However, I have subsequently seen them stick when the glitch happens- it's as though the patch freezes for a period of time, and during that time the audio also gets stuck in that frozen way.
I've removed a bunch of those bangs since but it's still freezing intermittently.
I may have "intensively investigated" the patch but I'm still a noob, so could easily be missing something!
PD audio project on RPi: playback keeps glitching/freezing
@Dizzy-Dizzy If it is hardware/os related then first you could try editing boot/cmdline.txt..... adding
dwc_otg.speed=1
which will limit USB to usb1.1 which should be enough for your soundcard (if it is 1.1 compatible) and should help reduce processor interrupts. It will slow everything connected via usb to the rpi.
You could also look at this...... https://baheyeldin.com/linux/how-fix-audio-skips-and-stuttering-raspberry-pi.html although I cannot be sure that it is relevant.
You would need to change "2708" for your sound card, and maybe add enable_lim=1 as in the second (actually older) thread linked below.
It seems strange however that USB and dma problems would still be occurring so long after this....... https://forums.raspberrypi.com/viewtopic.php?t=12097&sid=85de7813bf992de7630f59d96905a0e0&start=425 ..... I would expect them to be fixed by now.
But it doesn't sound to me like a glitch in the sense that the RPI is unable to process the audio.
It might be something in your patch causing it..... and it sounds like a command is forcing a re-read of a wav file numerous times between 3 and 4 seconds.
You have bangs on almost all the controls.
Are any of them sticking on while the "glitch" occurs?
It is unusual I think to capture a bang in a screenshot...... and we can see one of them "on" in your post.
You could put a [print] at places in your patch to see whether you have a stream of messages between 3 and 4 seconds where you expected only one message.
But you say you have intensively investigated the patch so I am probably wrong and I cannot see in your patch what it could be.
Running it on another computer would be the quickest way to eliminate the patch as the source of the problem..... or not.....
David.
PD audio project on RPi: playback keeps glitching/freezing
This sound clip demonstrates the glitch, just after 0:03, for about one second
PD audio project on RPi: playback keeps glitching/freezing
Hello, I feel like I've been blowing the forum up recently, sorry if I'm coming across as needy
This seems like it would be discussed a lot online but I cannot find relevant advice on it despite some intensive searching.
I'm running a Pure Data audio patch on a RPi, with an external USB soundcard. The patch samples from an external microphone and plays back the sounds in a sequence to a beat. When this 'beat sequence' playback happens, it is routed and recorded as another discrete sound file. Recording and playback are triggered by buttons connected via an Arduino Nano and the pduino object.
As I've been working towards my deadline to finish the device and ship it, the patch has become more prone to a specific audio glitch where it freezes mid sound, kind of like a skipping CD. I've experienced this before on other projects but never this frequently! I would assume I am demanding more than I should of the RPi, but I don't feel like it's a particularly processing-heavy project.
Are there ways I can avoid this glitching/skipping/freezing, either by making changes within the patch or by somehow optimizing the way my RPi is set up and running? It's only required to run this patch, so I'm wondering if purging a load of unneeded software that came with the OS might help.
Here's the patch in case that is a useful reference (I have a few abstractions I've put in there):
Any advice gratefully received - I'm worried this won't be up to a usable standard if it keeps glitching out during use!
windows going blank
Hey everyone, got a question on a piece of code I've got.
I'm working on a vocoded theremin, and I'm trying to get it running in a gallery. It will run fine for a bit, but then two windows will go blank -- namely, the one with the main vocoder and theremin bits of code, also incidentally the ones that have movement on them in sliders showing volume and theremin input levels. The vocoder one will sometimes glitch with the volume sliders kinda showing up, but will mostly be blank.
When I restart the program it works fine for a bit, but then it goes blank again a while later (unsure on exact timing).
The theremin uses an ultrasonic distance sensor through arduino. The mic is running from a blue snowball mic. Computer is off wifi, recent and updated mac desktop.
It seems like this is a glitch in Pure Data itself, but I'm not sure. Does anyone know why this happens and how to stop it? Or maybe what to do when it happens besides restarting the whole program? Really want to get this working smoothly.
Thanks,
-Joseph