getting the sent symbol of a number atom
Is it possible to get the name of the sent or recieve symbol names specified in the properties of a number atom? This would allow me to easily retrieve the index of a number2 object to pipe into the tabwrite object.
If I understand you correctly, then what you need to do is create a small abstraction with a number atom in the Graph On Parent area (see here if you haven't done this before). Then connect this to the object [array set array-name $1] $1 is a variable that you can assign when you create the abstraction. So when you create the object [my-abstraction 1], it will write to the 1st place of the array.
Note that if you don't have [array get], you can do the same with [tabwrite], but you'll have to use [pack f $1] between the number and the [tabwrite]
Please help: Random sampling gets more complicated
@whale-av Thank you, I tried and read everything but unfortunately this algorithm is probably more complicated that I needed...I am not able to update it...However I made new version, that suits my project even better and I hope it will be easier since I am a beginner and need to manage finishing this project in only 3 days ...Yet I still cant figure out some (probably basic) problems.
New project description:
I have 4 folders, that have each different number of sounds in each folder.
1st step: I want to make the main "random" pick that will "randomly" chose 1 of the folders.
2st step: from this chosen folder it will "randomly" play all sounds that are in this folder...
3rd step: the process go back to 1st point, but will now choose from 2 remaining folders.
4st step: when all the folder were played, than the process starts again.
Unfortunately I am still stuck in these obstacles that I have been trying to solve all day:
how to make the generator only use numbers once?
--- For example instead of: 1,1,2,5,4 to make him generate 1,3,5,2,4 - where all the numbers are used once and not repeatedly?
after this, how than make the generator stop and not continue in the process of "random" generation?
after this, how than make the algorithm go back and generate new folder?
This is one of the "folders" with for now only 5 sounds...I want to connect this "folder" to remaining 3 after solving problems 1 and 2.
Snímek obrazovky 2016-06-15 v 20.52.05.png
If you could recommend me anything I would be really glad!
I tried everything I could find on the internet but with no success.
AUDIO (and video)....... why do I have problems?
As this is a forum for problem solving I thought I would post this link to some very basic understanding of why your computer might not want to do what you are telling it to do, exactly when you want it done............
Audio problems are usually the direct result. Modern computers are actually capable of doing a great deal........ but what if they have been told not to bother..........?
Most of it will apply to any OS....... but for others than windows you will have to do some "translation" of the technical terms and the pictures.....
..... It is a free pdf download......... and excellent bedtime reading!
Video problems are often due to audio timing issues. The audio thread is given priority, and the video sometimes has to wait. If the audio is struggling then the video (and even the screen drawing.... gui, mouse etc.) might have to wait quite a while.......... and if the gui decides that it has waited long enough...... and finally moves the mouse pointer to where it should be...... and interrupts the audio thread...... watch out for your ears!......
MIDI Controller experiences/suggestions
@whale-av any experience using touchOSC on a hosted/ad-hoc network?
I can get touchOSC and my laptop to communicate whilst they are both on the same wi-fi(internet) network..
The problem is want to use a hosted network(wlan) as for live performance you can't
depend on the internet.
So I have manually configured a hosted network on my laptop and my tablet can connect to it with no problem. TouchOSC can find TouchOSC Bridge etc.. The issue is my laptop is not receiving packets from my tablet.... I have tried with both Pure Data and Renoise..
The issue is not with touchOSC because when I try sending packets when my tablet and laptop are on the same wi-fi network it works fine..
So the problem is with the hosted network....
I have tried automatically configuring an ip, manually configuring one...to no avail
I am not sure if this matters, however, when use a normal internet connection, a default gateway is configured...with the wlan hosted network, none...I have also tried to manually configure that as well, I had no success with the one attempt....
I am sure there is some setting that I am unaware of that needs fixing..
Edit : Typing specs as we speak
Windows 8 64 bit
Intel(R) Core(TM) i7-4500 CPU @ 1.80 GHZ 2.40GHZ
3.89 usable RAM out of 4.0
The tablet is an ASUS ZENPAD(Android) ...ill write the specs later
If anyone else has any ideas/suggestions/experience I am all ears...thxx
B.16.long-varispeed.pd can we make it loop without pops?
Yeah I have tried to reset the phase of the phasor by sending a bang to the message 0.01. I've also tried changing that to 0.0, but I still get the click as the loop wraps. The problem is that I am monitoring the accumulated onset, since that is the only way to tell where in the array index I currently am at (that I know so far). The problem with this approach is, it isn't sample accurate. In fact, the accumulated onset is triggered every 100ms from the snapshot~ metro object. I could try to make the metro faster, but I still don't think that will work. Maybe I have to convert all of the Non-signal Logic into Signal Logic, in order to get sample accurate wrapping. But if anyone can help me figure out how to do that I would greatly appreciate it, as I'm not a pure data expert. I've also read the B15.tabread4~ onset.pd and it doesn't really help with the problem I'm trying to solve. I don't fully understand how onset is working with phasor~ signal input in B16, and how to use that to sample accurately loop the file. I think this functionality though would be super useful to PD users if we can come up with a solution. Thanks!
Referencing argument array names in PD subpatches / abstractions?
Consider the following trivial patch (testing on Pd 0.45.4 on Ubuntu 14.04):
In it, I have a
[pd mysubpatch A]. As far as I remember, the
A is now an argument of/to the subpatch, in particular it is the first argument - and references to
$1 inside the subpatch should expand to
So, I've decided to place an array inside the subpatch, and call it
$1-array, similar to how in abstractions, arrays are/can be called
$0-array - except there the
$0 doesn't expand to any arguments, but instead expands to a random number (Dollar signs in objects and messages | PURE DATA forum~). My expectation is that the
$1 in my case would expand to the first argument,
A, and thus the array name at instantiation time of the object
[pd mysubpatch A] would expand to
The idea is thus to be able to put multiple subpatches in a patch, and control their internal arrays' names by supplying unique arguments. So, I try to copy/duplicate the
[pd mysubpatch A] into a
[pd mysubpatch B], expecting its array would ultimately be called
B-array. So far so good, because I can do this without any problems.
Now consider a slightly more complicated case where I also have a
tabwrite~ in the subpatch:
Now that I have
[tabwrite~ $1-array] referencing the
$1-array in the subpatch, as soon as I turn on DSP/audio, I get a ton of
warning: $1-array: multiply defined messages. As I don't get this message when I have only the
$1-array in the subpatch, I'm assuming it is not the logic in naming the arrays
$1-array via subpatch arguments that is the problem, but instead it is the reference in the
[tabwrite~ $1-array] which is causing the warning message.
Note that exactly the same happens, if I save the subpatch as an abstraction
mysubpatch.pd, and use it as two objects
[pd mysubpatch.pd A] and
[pd mysubpatch.pd B]:
But then, in this case, how would I reference such a subpatch/abstraction array, named through an argument, from inside the subpatch/abstraction itself? Note that I need fixed, explicit, known names of arrays, so a workaround like
$0-$1-array wouldn't work for me, since the
$0 would expand to a random number, which I in principle do not know from the outside (and I'm not sure
$0 even applies to subpatches).
udpsend and receive
@toddak If you have installed extended then it will be a path problem...... or an argument problem....... for some objects Pd needs to be told where they are, and some objects will not create without their "arguments". [dumpOSC] needs its port number, and if the number is already in use it will not create anyway!..... (you would get path problems with vanilla as well, but the following would not solve the problem because the objects would not be there at all!).........
Put [import mrpeach] in your patch first for the [packOSC] object....... or put........
[dumpOSC 1234] normally works, but you could try..........
[oscx/dumpOSC 1234]......... don't forget the port number..... 1234 or whatever....
Pd crashes at startup (after working fine for days)
Since today I have strange crashes on Windows 7 64bit.
Either pd.exe or pd.com crashes when executed.
I had Pd-extended 0.43.4 installed and it worked for days without problem. Today I've tried to load a .pd which I worked on at another computer (same version): pd.com crashed. I've tried to start Pd normal: pd.exe crashed.
I tried an uninstall and re-install, it's installing without problems, but doesn't create shortcuts.
I've tried running it as administrator, rebooted computer.
What's wrong here?!
"Problem details" by Windows:
Problem Event Name: APPCRASH
Application Name: pd.exe
Application Version: 0.43.0.0
Application Timestamp: 5100f299
Fault Module Name: pd.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 5100f298
Exception Code: c0000005
Exception Offset: 0005300a
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1031
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
My Synth is not sounding... why?? Thank you!
I put the print function just so I could see if my abstract was receiving the information. It does send the information but still don't sound anything!
Pure Data / Raspberry Pi / Realtime Audio / Permissions
I want my Raspberry Pi 2 to automatically start up the Jack server with realtime scheduling, and subsequently start Pure Data with realtime scheduling, load a patch &c. without any user intervention from a login shell.
As a performance artist working primarily with psychodrama (the technology is definitely NOT the important part here), fiddling around at a terminal right before or during a performance is kind of... psychically inconvenient. I need a box that I can plug in, give the audio output to the sound guy, and be ready to go.
I use Raspbian with a Linux kernel compiled with realtime goodness. I have hand-compiled Jack2 and Pure Data with realtime support in order to take advantage of this. Running a process with realtime priority requires the proper PAM directives set in /etc/security/limits.conf and related places, but that is beyond the scope of this little write-up.
Also somewhat relevant: I use a M-Audio MobilePre USB soundcard (sounds pretty awful by today's standards, but it's an extremely USEFUL box and sounds good enough for the work I do). For full-duplex sound, this requires the RasPi's USB to be set to single speed. In this configuration, I can get just under 2.9ms latency with good CPU overhead for Pure Data to run a few of my 64-voice wavetable and delay line granulators. Yeah!
Purely by happenstance, I had given the jackd command in my startup script the option “-s” which allows the server to ignore overruns and so on. So things seemed to be working as expected, but I noticed a lot more glitches than when I manually started up Jack and Pd from the terminal without the “-s” option. Upon removing it from my startup script, everything failed! WAH.
So I started piping STDERR and STDOUT to text files so I could read what either Jack or Pd were complaining about. As it turns out, Jack was unable to start with realtime priority due to a permissions problem. (I assume this is one of the things the “-s” options allows jackd to ignore, and thus start up with non-realtime priority. Problem is that Pure Data can’t connect to a non-realtime Jack server when its “-rt” option specified.)
Now, I had already been through the whole rigamarole of setting proper memory and priority limits for the “audio” group, to which the user “pi” belongs. So I thought, okay, I have to execute these commands as “pi”, and while simulating a login shell because the security limits in question are only set during login.
So I did this:
su -l pi -c "/usr/local/bin/jackd -R -dalsa -dhw:1,0 -p128 -n3 -r44100 -S >> /home/pi/jackd.log 2>&1 &"
This says “login as user ‘pi’ and then run the jackd command with these options, piping the outputs to this log file and run it in the background”. Well, I still got all the same errors about not being able to set realtime priority. WHYYYYYYYYY?
I hunted and hunted and hunted on a Very Popular Search Engine til I decided to try searching “security limits not loaded with su -l” and found this.
(Makes me think of that Talking Heads lyric, “Isn’t it weird / Looks too obscure to me”.)
So by uncommenting the line
# session required pam_limits.so in
/etc/pam.d/su everything started working as expected.
I now know a LOT MORE about PAM and how important it is to keep in mind when and in what order scripts and other little subsystems are executed; but also that sometimes the problem is EXTREMELY OBSCURE and is to be found in some seemingly far-flung config file.
I hope this helps anybody out there working with Pure Data and the RasPi. The second generation board really packs quite a punch and can run several hundred audio grains (run by vline~ and enveloped by vline~ and cos~) simultaneously without a problem. And I'm pretty sure this is just using ONE of the 4 cores!
I'm by no means an expert Linux sysadmin, so if you have any other suggestions or corrections, please let me know! I wouldn't have been able to get this far without all the generous and helpful writeups everybody else has contributed, both within the RasPi and Pure Data communities. If you have any questions about anything I glossed over here, I'll do my best to answer them.