little help: emulating a physical spring, ex. bend-wheel
First to @weightless and @ingox : thank you, for the great work on this.
Very cool! And I very much appreciate how promptly you solved the problem.
Am very sorry to say on the other hand, I did not state the problem as accurately and succinctly as I should have.
To the problem, as stated, the solution is perfect.
The problem, stated more directly (not doing the abstracting in the writing of the use-case (common pd-forum user-problem?)):
"I want to be able to add a slider to Mobmuplat (MMP) and have it self-center like a bend-wheel/tremolo-bar, and then send its resultant value over LAN as an OSC signal to my laptop with pd on it. And MMP is vanilla-only. (So no iem-guts.)"
Note: the wonderful, iOS app, "Syntien" (an OSC-gui design tool) has a property on its slider like this, "return to center". (Only handheld-app I have ever bought).
(I'll double check the above...) Yes. The above scenario is correct.
Seems such a control, would prove useful to not only me, but a wider audience. (Maybe?)
p.s. I approached the above problem by placing aerially-speaking "drag" on the slider, so incrementally it subtracted from the slider value then sent it back into the slider. The result was stack-overflows.
Any ideas on this front would be great.
Thanks, again, for the effort put into the solution of the original use-case.
Please, accept my apologies for not having been more forthcoming to begin with.
Sincerely,
Scott
Sysex program dump with random zeros
Okay ;that's what I suspected you were doing. It is possible to use the MTP serial directly with linux and the mtpav driver, though this requires a machine with true hardware parallel port access (USB adapters won't cut it) and is limited to MIDI output only as the driver is a hack that was never finished. I used to run mine that way with a second USB MIDI interface connected to one or more of the MTP's unused routed MIDI outputs (there is, BTW still no way to connect the MTP USB version directly to a Linux system as it doesn't use a standard USB MIDI driver)
As far as the kernel is concerned, I've only ever used lowlatency or RT kernels for MIDI stuff. I don't know how a generic kernel would affect this problem but it's probably best avoided as they are not specifically built for multimedia.
Now read closely as this is where it becomes stupidly complicated.
First, make sure that the problem is internal to Pd. Your interfaces are probably not the issue (since Pd is only seeing the UM-1 driver I don't think the MTP even figures in here). However, the chosen MIDI API can get in the way, specifically in the case of the unfinished JACK MIDI. JACK MIDI presently can only pass SYSEX as short realtime messages. SYSEX data dumps will disappear if sent into the current JACK MIDI system. ALSA works OK. OSS probably too, but I have not tried it.
If that stuff is ruled out and you are still getting problems, it probably has to do with a set of longstanding bugs/oversights in the Pd MIDI stack that can affect the input, output, or both.
On the output side there is a sysex transmission bug which affects all versions of Pd Vanilla before 0.48. The patch that fixed Vanilla had already been applied to L20rk/PurrData for some time (years, I think). The output bug did not completely disable SYSEX output. What it did was to miss-format SYSEX in a way that can't be understood by most modern midi applications, including the standard USB MIDI driver software (SYSEX output from Pd is ignored and the driver/interface will not transmit anything). You would not notice this bug with a computer connected directly to an MTP because the MAC and Linux MTP drivers are programmed to pass raw unformatted MIDI.
If this is the problem and you have to use a pre-0.48 version of Vanilla it can be patched. See:
https://sourceforge.net/p/pure-data/bugs/1272/
On the MIDI input side of Pd we have 2 common problems. One is the (annoyingly unfinished but nevertheless implemented) input to output timestamping buffer that's supposed to provide sample-accurate MIDI at the output (if it was finished). This can be minimized with the proper startup flags (for a MIDI-only instance of Pd, -rt -noaudio -audiobuf 1 -sleepgrain 0.5 works for me) or completely defeated with a source code tweak to the s_midi.c file. This may not be the source of your particular problem as it usually only affects the time it takes to pass messages from input to output, but is worth mentioning as it can be very annoying regardless.
With SYSEX dumps it is more likely that the problem lies with the MIDI queue size. This is very common and I experienced it myself when trying to dump memory from a Korg Electribe Ea-1.. The current version of Pd limits the queue to a size of 512 (even worse it used to be 20) and any input larger than that will get truncated w/no error warning. There is not yet any way to change this with startup flags or user settings. This can only be "fixed" by a different tweak to s_midi.c and recompiling the app.
The attached text files are derived from the Pd-list and will show the specific mods that need to be made to s_midi.c.
Sound problems of Patches that moved from Windows 10 to Raspbian
Hello,
I've been making guitar effects with Puredata and Raspberry Pi.
Previously I did not care much about this problem, but at the last moment I got a terrible problem so I would like to consult with you.
I created Puredata Patches on Windows 10, copy Patches to Raspbian and use it.
In most cases there is no problem,
but depending on the Patches the sound reproducibility will be different.
Please help if there is a solution,thank you.
Windows_And_Raspbian.mp4
test.pd
*I uploaded same files in Google Drive and Dropbox.
1)There is a problem with the reproducibility of the sound, especially the problem is remarkable with the decay sound.
2)The problem is reproduced even if Windows 10 and Raspbian use the same USB Audio interface(Behringer UCG102)
3)Even if I use a different USB Audio interface (Zoom U - 22) in Raspbian, the problem is reproduced.
MobMuPlat: can't save my files anymore
hi!
i have a big problem here and maybe someone knows how to fix it or can give me a tip:
i’m using the mobmuplat-editor and the app itself since a while now and up until yesterday everything worked quite well.
i’m designing an interface for a simple app on ipad. so, i’m using the mobmuplat-editor on my macbook in connection with pure data (works fine) and transfer the files to the
mobmuplat document folder on ipad to run them via the mobmuplat app (also works fine).
my problem: suddenly the mobmuplat-editor on my laptop does not save my .mmp files anymore. i can open a file but as soon as i add new elements (especially „label-objects“ for text) and try to save, the editor „freezes“ - it won’t save the changes i made and after 1-2 minutes i have to force-quit the program and the changes are lost.
it’s really strange because the patch itself is not very large or complicated, just some buttons/toggles in different colours, some sliders, some labels (the ones i already have are working fine).
i already tried to change the file directories, i tried to delete/reinstall the whole mobmuplat package, restarted the computer, even tried it on another macbook - but always the same problem.. as soon as i add label-objects and try to save afterwards, it loads and loads and then i have to force-quit the program. even if i make a complete new file and add some buttons or other objects.. when i add a label-object, i can’t save anymore..
does anyone know, what’s the problem? any suggestions what i can try? i’m really thankful for all
your help,
p
Reduce latency when tabplay~ right after tabwrite~
Hi, I'm pretty new to pd, and there is the thing:
I'm trying to create some dynamic looper that loops a recording over and over and having some trouble with latency/delay between tabwrite~ and tabplay~.
- I prepare the table in advance with dynamic resizing and naming so it will be ready to record when i tell it to.
- I have in the background some sort of metronome patch (for tempo) that bangs to the track patch when to start the recording (the "track" patch is ready in advance and waits to a bang to start the record), metronome still plays.
- The metronome bangs in the right time to the track patch
- I am recording with tabwrite~ the number of samples that is pre-calculated in step 1. (I am recording the beats from the metronome to hear it play back without delay)
- the tabwrite~ ends the recording when the number of samples are all full and bangs right away to tabplay~.
here is the problem. when it plays the recording it can be noticed that there is a delay between the record playback and the metronome patch that ticks. this delay stays with the same margin over the loop.
I want to know how you handle this issue? or what can be the issue?
what cam to my mind is few options:
- start playing tabplay~ before (with offset of the latency) tabwrite~ finishes (is it even possible?)
- hang (make some delay) the metronome patch with the latency offset (seems like not right thing to do)
- I read about something with buffers that must be divided by 64 samples to be precise, do you have any information about it?
I can provide my patchs but they are a little bit messy because I use them in IOS application.
thanks so much!
Font issue with new linux distros
@NoDSP It all works fine on Windows. OSX I have not heard of problems since Pd addressed them in 2011. Ubuntu, some problems after 16.04 (and sometimes before... but X-window). Generally a lot of Linux font problems on Google.
Sorry I am not helping with your particular problem.
You could try a.... sudo apt-get install --reinstall x-ttcidfont-conf ttf-dejavu....... if not done so already.
I am having trouble understanding why it should be a tcl issue when it works fine on other Linux distros.
Tk 8.4 was a problem..... but it's very old now......
But Pd will need a re-write (again) just for newer Linux. I don't know what other problems that will throw up for system compatibility. There was a long debate about it last time.
David.
Streaming audio file player? Timeline editor? Syncing multiple tracks?
@johnwbyrd I have never looked at the source code, but I run a live performance with Pd....... 30 input channels, 8 out..... with live mixing and using [readsf~] for up to 15 minute backing tracks, and I have never had Pd hang even momentarily.
I use extended for that although I doubt the [readsf~] implementation is different.
However, I use windows7....... and is it possible that Pd and the OS treat disk access slightly differently on other systems? I doubt that.
[readsf~] requires an "open" and a "start"...... so it is not forward looking as it might be in an audio editor. However if you program the "open" in advance.... or even at load, then the start is instantaneous (in ram) and you can emulate an instant player.
If Pd is stumbling during playback..... look elsewhere for the problem....... not in [readsf~]......
A multi-GHz processor with rapid disc access should not have problems with audio or Pd...... they use a paltry fraction of the resources available.
Yes..... Pd prioritises audio..... like all programs that use audio.... over video, screen drawing...... everything. So if your patch is struggling in any way you could see the Pd gui stumble.
Check thoroughly your audio and latency settings.... any mismatch with the capabilities of the soundcard could cause what you are seeing.
More here about setting up your computer for audio......... https://forum.pdpatchrepo.info/topic/10125/audio-and-video-why-do-i-have-problems ..... with a link to a good read for problem solving!
You often just need to tell your OS to do as instructed......"and I mean it!"........... Otherwise it prefers to go and peruse it's Facebook page for likes!
Maybe, otherwise, use FL studio or something similar.
Programs written specifically for audio application will have been written in assembly language and be more appropriate for your purposes.
Communication with Pd is usually facilitated through at least midi or OSC messaging.
David.
Compiling Pd-extended on Windows
Hello,
I created a new thread as the older post [Problem compiling on windows] (http://forum.pdpatchrepo.info/topic/967/problem-compiling-external-on-windows/16) seems to have ended and my problem has a different nature.
Moreover. I have not been able to find an answer on the puredata sites (puredata.info or puredata.org).
My problem:
My end goal is to play with the 'grid' external in pd-extended/externals/unauthorized/grid but since I do not get this one working and I have never compiled an external before I started with the simpler tutorials in Pd/doc/6.externs.
My steps and error are as follows:
**1. **Adap path in 'makefile' in Pd/doc/6.externs to 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC'
(this path contains a /lib folder with .lib and .obj files on my machine)
**2. **Start ( Admin) Visual C++ 2008 64-bit command prompt
**3. **Locate directory Pd/doc/6.externs
**4. ** run 'nmake pd_nt' command
**5. ** gives error in locating the libc.lib file
(LINK: fatal error LNK1181: cannot open input file 'C:...\VC\lib\libc.lib'
When I remove this instruction from the makefile, I does not find the kernel32.lib file also.
When I finally remove the former instruction, I get an error creating the library obj1,lib and object obj1,exp as I have 6 unresolved external symbols ex. obj1.ob : error LNK2019: unresolved external symbol __imp_post referenced in function obj1_float
Could someone help me solve these issues and help me succeed in making this external work?
Then, any additional explanation in getting grid to work afterwards?
Any additional info regarding Pd's treatment of externals/libraries etc is appreciated as well.. I just can't get a grip on it,
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 A
.
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 A-array
.
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).
Pd crashes at startup (after working fine for days)
Hey,
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 signature:
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