Help?! Implementing Pd into a hardware device
@whale-av yeah, being a portable effects processor for instruments, it needs to be very small and self-contained (in the sense that no peripherals should be sticking out like keyboards or audio interfaces) which is why I was wondering about implementing adc and dac with physical inputs and outputs into the actual thing instead of using peripherals.
@bmd the Axoloti core looks like pretty much exactly what I was going for with hardware! Although missing an extra input and output. That said, I plan on dealing with two mono signals so perhaps I could use the single stereo input and then separate left and right into input 1 and input 2... Having a quick look at this though http://www.axoloti.com/axoloti-patcher/ suggests that it isn't as versatile as Puredata with not many objects available but maybe I'm wrong again. Definitely going to research more into this. It also sounds like it has an easier solution to my problem of not knowing how to physically implement my patch onto some hardware. Thanks for showing me that.
Seeing as Raspberry Pi/Arduino/Puredata has a lot more support around it, plus the fact I wouldn't have to learn a whole new programming software for Axoloti, do you think I'd be able to make something very similar to the Axoloti Core using a Rasperry Pi? Or is this just overcomplicating things to the point where I might as well just learn how to use Axoloti? I'm struggling to find any appropiate ADC for the Raspberry Pi, but I'm sure there's got to be something high quality around, I mean, I find it hard to believe nobody has made a Raspberry Pi with at least 16 bit 44,1kHz audio input and output.
Also, @whale-av made me think... If I'm not having any peripherals sticking out of my signal processor, a touchscreen might be a reasonable idea for this to simplify things and not take up space. It looks a lot more difficult to do this on Axoloti than Raspberry Pi who have their own touchscreens conveniently available, or the Odroid @alexandros mentioned which has a HDMI port. A touchscreen might not be totally necessary but now I've considered it I kinda want it.
Newbie perspective on the "Random without repetitions" exercise
@jancsika After spending much time with this question, I think I finally figured out what is happening. The good news is that indeed there are absolutely no problems at all with your algorithm, and it is probably the best way to generate such sequences of non-repeating integer numbers.
At first sight, your algorithm seems to take as input random integers ranging between
2 (i.e. 3 values) and output random integers ranging between
3 (i.e. 4 values) for each cycle, which seems to be problematic due to upsampling (I explained what this means above). But actually the algorithm is always choosing among 3 options only, given that each value cannot be the same as the previous one. For instance, if the very first random integer selected is
0, there are three possible values for the next integer (
3), which is exactly what the range PRGN is providing. So the key is to realize that 3 random values are being mapped into 4 non-repeating random values, and this can be done without causing any unwanted patterns.
Therefore, there is no problem using
MOD N+1 for a random input ranging from
N, because the amount of information does not change with that. But when we use
MOD N+2 or larger, we actually do observe patterns that shouldn't be there if the output was truly random. For instance, certain sequences of two consecutive numbers never appear: e.g. taking
N = 3 (i.e. input between
MOD 5, one will never see a
0 followed by a
4, since there is no input such that the expression
((input + 1) + 0) MOD 5 = 4 would be true.
Anyway, I hope this clear something up a bit. And now I finally can sleep at night
Pd crashes when pd~ starts on RPi 3 (how to see these errors?)
Okay, I got it working when starting up from Terminal. But I still don't know what's going on.
When I open the patch (with a pd~) from Terminal with "-nogui -nrt" it works.
When I open it from Terminal with "-nogui -nrt -nosleep" I get an 'audio I/O stuck' error.
When the patch runs from startup with "-nogui -nrt" OR "-nogui -nrt -nosleep" it doesn't work. Again it stops when opening the pd~ subpatch.
The funny thing is that when I don't have a pd~ object, but just osc~ the patch WON'T open when using '-nosleep' from Terminal somehow.
But it DOES work if I'm using "-nosleep" when the patch runs from start-up.
Can anyone shine some light on the start-up flags? A link to more in-depth information than what the Pd-site says or so? And does anybody know why Pd reacts different when a patch opens from start-up compared to when opening from Terminal?
Playing back a sequence of text in Pure Data.
That does seem to be the most simple method, yes.
I just searched some more and discovered the
qlist object, a text-based sequencer, which I'm reading up on as I type, apparently the programming language Lisp should be usable as way to generate and process externally created lists. Maybe that's what I'm looking for, but as of now, I have no idea if it's usable to me, as I'm quite inexperienced with programming languages and I have no idea how transparent they are compared to each-other.
What would be the best possible outcome is if I had some small program that a text-writer could open up without having to know the ins and outs to write the text, generate the textfile with time-marks and send it to me for processing.
Have you got any suggestions as to how one would do that? It's a much more time-consuming process if there is not such a program already made for use as it would require the creation of such a patch in a programming language I'm not familiar with.
Playing back a sequence of text in Pure Data.
Hello. I've got a very specific and possibly convoluted request.
I have some ideas of trying to compose with live 'recordings' of text and having that data control the parameters of a patch in PD.
I assume I would need the following two things:
- A program which allows me to log and record text being written in a word processor, each keystroke marked in with a specific time.
- Suggestions as to how I would go about playing back this sequence in Pure Data.
In these times of mass surveillance I can only imagine that there must exist some program that does what I specified in the first point. I know of programs that log and visualise the activity of the computer mouse and mousepad and programs that log every computer activity, primarily used to 'optimise' the efficiency of company employees.
As far as the second point goes, I imagine some sort of external that would allow this text sequence being played back stroke by stroke into a symbol box, which would allow me to give each character of the keyboard a specific action, which it would then trigger.
While writing this I realise that it would quite possibly be easier to have the patch and relevant text-recording programs running and having the data being sent to PD in realtime as this would render the time-marks for the individual keystrokes unnecessary. But the whole point is to have a person write a piece of text with the text-logger running in the background and then transferring that string of data to me to process and play back.
Edit: I am running Pure Data extended on OSX Mavericks.
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:
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).
------------------ 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```
settable send~ object?
@LiamG I saw somewhere (I have stumbled upon it twice..... maybe on this forum.....but where?) that a canvas can be given a "dirty" tag so as to suppress messages to the terminal. The problem here is that the terminal is doing the complaining because it sees a receive with no matching send. It's probably not possible even to create a "dummy" before terminal throws the error...... so I think that hiding the terminal is probably the only solution.
Maybe alexandros is suggesting [matrix~ 10 10 1 100] ........... you need to put the arguments or it will not create. It gives you a "soft" switching matrix (although you can also set levels within the messages that you give it), and if you set up send objects (in advance........ I know, not "truly" dynamic) for the outlets then you have a (sort of) dynamic sender. I use it for my in-ear monitoring system with up to 64-in 64-out mixing......flawless.
Give it as many inputs/outputs as you need, and it jumps all of the [s~] [r~] [throw~] [catch~] hurdles....... with no clicks!
Midi to hz, and hz to midi formulas
well, to contribute to the vile institution of equal temperament then:
in the first equation the input has 69 subtracted from it. This is in order to get the semitones difference between the input note and 69, which is the a above middle c, (the standard is that this note has a frequency of 440). Then this is divided by 12 in order to get the number of octaves that the input is different from a440 (linearly). 2 is then raised to this power.
The reason for this is that if 2 were raised to the 1st power, 1 octave would be traversed upward. similarly, if 2 were raised to the -1 power the octave would be traversed down, because 2^-1 = 0.5, which is a frequency of the octave below.
And because the midi note 69 was the reference point, what is being determined is the ratio of the frequency difference between the input and a440. Therefore, once we know the frequency ratio between the input note and midi note number 69, it is multiplied by 440 in order to get the result
the next formula is this one in inverse:
The input frequency is divided by 440 to get the frequency ratio between the input and 440. Then log2 is taken of it, which is the power that 2 needs to be raised by in order to get the ratio. So this will be the number of octaves difference between the 2 notes.
The number is multiplied by 12 to convert to 1/2 steps, and then 69 is added to get back up to the note a above middle c because 440 was the reference point in the beginning
@dangrondang out of curiosity, do you have any references for the accepted value of pi being wrong? for all of the talk about the sanctity of mathematics this other value does not seem to agree with mathematical principles relating to series convergence formulas for pi. A simple one of these formulas is the Leibniz one. There is a proof of it on the page also
Regarding your putrid opinion on equal temperament, I would also be curious how you would modulate freely between keys on a keyboard instrument. Are you advocating for well-temperament? a system of pythagorean tuning with movable root? The reason equal temperament exists is mainly to create a system where all keys sound the same. Much of music by the mid-1800s e.g. Beethoven was already freely modulating to far away keys and that does NOT sound very good in pythagorean or even simple well temperament (although certain keyboards in the day had many "versions" of notes and scales)
edit: didn't realize this was such an old topic! oh well, perhaps useful still
Loading patches on the fly
How does one change an object on the fly? E.g. I have effect1_patch~ as an object, but I want to change it to effect2_patch~ , effect99_patch~, or any arbitrary patch in order to switch between my library of effects during performance (without hard coding each effect into the main program).
So I am making a live performance setup.
The pipeline I have set up now within my main PD program is: read mic/midi --> effects --> looper --> mixer --> out
The problem is I have a lot of different effects patches already and plan to have many more. The ideal would be that my effects program takes a midi input and dynamically loads a corresponding patch. I know how to handle the midi input, but is there an easy way to do dynamic loading of patches i.e. changing the patch a PD object refers to on the fly?
Thanks for your help!!
"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)