tabread midi notes.
Hi Everyone
Maybe I am doing something wrong, but I would like to creat a number fo tabread objects to play midu notes.
However I can't seem to name my tabread object anything other than 'tabread notes' in order to play the notes.Snapshot.pd
I already have a few tabread notes objects so I am trying to create unique tabread objects so I can control which notes are read etc.
Is it possible to name tabread anything other than 'notes' in order to have it read midi notes?
Jb
Digital to audio processing issues
@Joseph-Mikkelson No, changing the samplerate will not help, except that matching it to the soundcard reduces the load on the cpu......but there are more important issues...... see below.....
I should have expanded on latency.
Using a live input [adc~] and doing some Pd processing effects and then sending that to speakers [dac~] latency is not so much of a problem. Often it involves delays anyway (echo, reverb, etc.) and our ears are used to that.
Latency for playback of an audio track, or generated audio, is no problem...... it is heard when it arrives at the speakers and that is all.
Problems arise when the input goes straight to the output....... as with a monitor mixer built in Pd for example..... with live acoustic instruments...... where the musician hears their own instrument acoustically and the same sound delayed in the monitor. Essentially a chorus effect is produced, caused by the latency, and that will make it harder for a violinist for example to pitch correctly.
Chorus in a reverb effect really upsets violinists..... anything much over 5ms.
Of course a massive latency...... 100ms+..... will cause timing problems even for a guitarist, and even if they are the rare musician that didn't have such issues in the first place.
I have met classical and jazz musicians that have learnt to dissociate what they play from what they hear...... for example playing through a delay, but in sync with everyone else...... so playing say 1 second before everyone else....... but......
SAMPLE RATE
You should match your samplerate to your soundcard, or you will have re-sampling artefacts....... usually a low level high pitched whine when your patch is not producing any sound.
It is slightly more complicated than that.
If you play an audio file that was recorded at 44.1KHz while the Pd samplerate is set to 48KHz it will play back at the wrong speed....... Pd will not resample it and so the pitch will be wrong.
It's a PITA.
So the Pd samplerate must be set to match all the audio files that you use in Pd.
To avoid the artefacts you then need to set your soundcard to match Pd.
Other programs will adjust..... so that is not a problem.
External cards can make that change through their control panel, and internal cards should have the option somewhere.
In windows it is here in the speaker control panel..... https://forum.pdpatchrepo.info/topic/12094/newbie-clipping-on-pure-data-portable-with-mmio/4
and I am pretty sure that windows always sets the on-board soundcard to 48KHz "out of the box".
David.
Problem bypassing a filter in pd-extended
Hi!
I'm starting to learn Pd Extended and I trying to make a filter able to highpass, lowpass, both things or neither of them, but I'm having problems making a toggle to bypass the filters:
While in the highpass filter everything works fine (I can move the slider to the frequency I want, I can turn it off and I can turn it on again keeping the frequency I chose before), when I try to do the same on the lowpass filter, everytime I turn the toggle off (as a bypass), I stop hearing the sound.
Here is my configuration and my patch:
Thank you in advice!
i/o-errors in pd
I come from here: https://forum.pdpatchrepo.info/topic/9461/record-audio-of-any-length-into-array/8
Then, searching more about sound clicks and interruptions I've found this thread so I will continue here.
I'm dealing with the exact same problem as you, especially when resizing tables, which is crucial for dealing with samples and loops in realtime audio processing applications like you said. As far as I know, Pure data was designed in a way that array modifications and object calculations are done in the same thread the audio is flowing, so it's impossible to separate them and audio will be always interrupted. So, after looking for pure data distributions and externals, I've found something that maybe solve part of this problem, the sndfiler external, which is included in the last pd-l2ork distribution:
https://github.com/pd-l2ork/pd/tree/master/externals/tb/sndfiler
FEATURES:
- threaded reading of multichannel soundfiles into arrays
- threaded resize of arrays
I've installed the latest pd-l2ork distribution in windows and the sndfiler isn't installed by default, but it appears in the source code, so I will have to try building it from the source code if nobody has the built external. It also needs libsndfile and libvorbisfile and threadlib external in pd, a little bit complicated but may solve the problem.
For the GUI updating problem, you may solve it by separating the main GUI and the sound processing in differents patches. I've been doing this separation since I started using pd and never run into dsp problems.
Filtering out one of two instruments (that are both playing the same note)
Hi everyone,
I've run into an interesting problem with a iPhone rhythm game project I'm working on:
Basically the game has a scrolling score of music that you can play with your instrument at the same time. My patch detects pitches in real-time and then marks notes on the screen as correct or not.
The problem is that there is a built-in guide synth that plays each note as it scrolls (this is toggleable however). Right now I'm having the problem of the built-in guide synth scoring notes correctly without the user providing any input.
Obviously this issue goes away once the user wears headphones, but when you are playing audio on the phone's speaker at anywhere above 50% volume notes will get triggered automatically no matter what. I have tried several techniques (noise gate, some filters, minpower settings on helmholtz~ and sigmund~) that reduce the problem but not eliminate it.
That being said, I'm not hoping to completely eliminate this problem 100% (because it's most likely not possible), but I was wondering if anyone had any suggestions for kinds of techniques that could differentiate a real-life instrument from this built-in synth playing on the iPhone speaker, where both instruments are playing the same note?
Thank you
PD-PROCESSING with OSC problems
Hi guys! i am trying to connect Pure Data and Processing by OSC. Yesterday when i did the conection between the two programs it was succesfull. But today, i get this problem:
i am working with the port 11112, If i open pd first ,and then run the processing sketch i get this message of processing:
"ERROR @ UdpServer.start() IOException, couldnt create new DatagramSocket @ port 11112 java.net.BindException: Address already in use: Cannot bind"
If i open processing first and then pure data, processing listening the port 11112 without any problem,but the error in pure data that i get is:
" dumpOSC 11112
... couldn't create",
if, for example i write dumpOSC 11111 (and processing stills in 11112), the dumpOSC object
is created normally.
I think is a UDP problem but i cant find the solution anywhere, Please, does anybody know what the problem is? THANKS!!
i/o-errors in pd
@EsGeh You should not be having these problems. At all. Except "resizing a table".
Even that should not cause a problem if it is hidden in a sub-patch and you are not reading from it as you resize.
I can run a 64ch in 64ch out mixer controlled by osc messaging from 64 tablets in Pd, at 3ms latency without a glitch (Extended on Windows7)
Are you running Pd at the same samplerate as your soundcard?
Are you trying for too small a buffer to improve latency?
Have you given Pd root priority (chmod 4755)?
Could you post some more detail..... os, soundcard, Pd version?
Chapter 2.5 ........ https://puredata.info/docs/manuals/pd/x2.htm/?searchterm=i/o error
explains what Pd gets up to, and why it is best to hide unused gui's, and there is more help on that site.
You can run more than one instance of Pd and communicate between them through ports, and that will sprout 2 instances of wish, which spreads the gui load as well. Whether your OS will run them all in the same processor I don't know. Recent OS's should automatically spread them about.
I have had problems trying to control a gui through more than 2 levels of gop.
If you wish to post a problem patch then we can see if it works well on our systems, which might narrow it down.
David.
Tabwrite~/array has problems working as a long timebase oscilloscope?
Hi all,
I needed to have some more long-running visualisation of waveforms in PD, so as there is no vanilla [scope~]
object, I thought I'd use [tabwrite~]
with [array]
, as commonly recommended - however, I have stumbled upon a somewhat strange behavior, which I'm not sure whether it's a bug. This is on Ubuntu 18.04, vanilla Puredata from Ubuntu repos (0.48.1-3)
So, basically I made a patch, which is mostly reused help of [tabwrite~]
:
The patch itself is here: test-array-scopevis-metro.pd
So, basically, I want to view signals as if on a scope with timebase of 1 second. My PD/Media/Audio Settings tells me: Sample rate: 44100, Block size: 64, Delay (msec): 25
So, all I have in addition to what was there in the [tabwrite~]
help, is a few objects to set the array98
array size to 44100 when the patch is loaded - so there is enough memory to record 1 second of signal. And then I've added a metro, so it bangs the tabwrite~
each second (each 1000 msec) - the idea being that I bang the tabwrite~
, it records 44100 samples in a second and shows them, then after that second I bang again, it records 44100 samples in a second and shows them anew and so on - pretty much like an oscilloscope at a timebase of 1 sec would do.
However, the actual response is shown in this video:
That is, when I start the metro at 1000 msec, it keeps banging for at least 10 times, without the array ever refreshing the waveform display?! Then, when I stop the metro, the waveform is displayed ?! At that point, I draw whatever in the array graph so as to "reset" this display, change the metro to 1001 msec - and start the metro again. This time the display does update as expected - but only after an initial delay of some 2 seconds (or three bangs) - I would have otherwise expected a delay of 1 second (two bangs).
Does anyone knows why this happens, and how to get a more reliable behavior for this kind of case? My guess is, for a [metro 1000]
, PD actually does not have enough time to fill the entire array with all 44100 samples, and thus it never updates the graph - apparently 1 millisecond extra is enough for PD to realize that the array has been filled, and so it updates the graph, but then why does it take 2 sec (at 3rd bang) to update, and not only 1 second (at 2nd bang)?
How to queue events in PD-vanilla ?
@weightless , thanks for your input. True I am still a bit confused about data structure and access in PD. Like the link between tables and arrays.
Unfortunately the experience I was talking about is for the moment such a mess that I don't want to risk anyone's sanity by posting it. I will try to take some time to extract a minimal example.
In one case I have a [tabread] flow fed into a chain of logical gates (a kind of classifier, data is coming from a live spectral analysis of the mic signal ). Depending on the value, the chain can be short or long before completion. I had problem's with data messing in the pipe, mostly because the order is not conserved (e.g. first value needing a bigger chain ends up getting out later than second value with a shorter chain) . I have resolved the problem by adding a [metro 5] as a feeding rate, however it is quite inefficient because 5ms is a very conservative time estimate for any single chain. Ideally I would like to build a data bucket after the [tabread], which will release values when a completion bang is received, the tricky part is that the bucket has to remain open for receiving new values.
I hope that this all makes some sense.
Cheers.
(improved clarity edits)
Netsend issues (Stopped)
@mrsstaceyseigle Hello. I see you were having problems updating Pd from a "software controller" where you wanted to query the controller.
It is possible that you have constructed a loop that creates a sort of message feedback, and the software controller or Pd has shut it down.
Please post (upload) your patch and tell us more about the controller (what it is....., is it actually hardware and if so is it on your local network?).
[netsend] does not have a history of causing problems......
Pd is stable....... it runs or it doesn't..... and when you build a patch you know straight away about any problems as you work. That makes problem solving easier than programs where you have to code and then "run"......... usually.
David.