Patches item #3160982, was opened at 2011-01-18 09:16
Message generated for change (Comment added) made by millerpuckette
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3160982&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
>Status: Pending
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: IOhannes m zmlnig (zmoelnig)
Assigned to: Miller Puckette (millerpuckette)
Summary: [bugfix] allow to type UTF8 characters in symbolatoms
Initial Comment:
since Pd-0.43 patches can handle UTF-8 characters. great!
unfortunately, it doesn't seem to work when typing in symbolboxes.
example:
i switch to a russian(DOS) keyboard layout
i create a message box and type the keys 'asd' which correctly shows up as 'ыфв'
i create a symbolgatom and type the keys 'asd' which incorrectly show up as 'DK2'
note: sending a [symbol ыфв( to the symbolgatom, will correctly display it.
it seems like the keyboard input sanitation code for the symbolbox perverts my input.
----------------------------------------------------------------------
>Comment By: Miller Puckette (millerpuckette)
Date: 2011-02-01 20:45
Message:
applied to 0.43 test
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2011-01-19 03:04
Message:
thanks.
i added your amendments to the attached patch
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-01-19 02:51
Message:
... of course that was meant to be:
- char utf8[4];
+ char utf8[UTF8_MAXBYTES];
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-01-19 02:51
Message:
argh... beat me to it! :-)
anyhoo, you might want to also:
+ #include "s_utf8.h"
...
- char utf8[4];
- char utf8[UTF8_MAXBYTES];
so that things don't break if we need the full UCS-4 range someday.
Sorry; I would have attached a patch (now that I've managed to acquire a
rudimentary working knowledge of git :-), but I don't seem to be able to
(looks like an instance of
http://sourceforge.net/apps/trac/sourceforge/ticket/16001)
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2011-01-19 02:11
Message:
mukau, i'm IOhannes not hans :-)
i'm working on pd-vanilla:
http://pure-data.git.sourceforge.net/git/gitweb.cgi?p=pure-data/pure-data;a…
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2011-01-19 02:09
Message:
anyhow, i have a fix for the problem.
instead of writing the wchar into a char, the wchar is first decoded to
utf8 using u8_wc_toutf8() and only then written into the symbol-buffer of
the atom.
this seems to work fine.
the attached patch modifies g_text.c and applies to f5cabb ("took out
debug msg")
----------------------------------------------------------------------
Comment By: Bryan Jurish (mukau)
Date: 2011-01-19 02:08
Message:
ok; trying to look into this now; have you any idea what sources you built
from? I'm currently using most recent snapshot from
http://pure-data.git.sourceforge.net/git/gitweb.cgi?p=pure-data/pd-extended…
; ... svn doesn't appear to have the utf-8 patches applied anywhere yet...
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2011-01-19 02:01
Message:
@mukau: no, LC_* are not changed at all (btw, they are set to de_AT.UTF-8
here)
the kbd layout changes only effect the key->character mapping, way before
tk is involved.
also note, that tk can handle all quite well, as can most parts of Pd
(confirm: i can type cyrillic characters in objects, msgboxes and
comments)
it's only gatom's that do some additional magic to filter out unwanted
characters, and then write the received wchar into a char without checking.
----------------------------------------------------------------------
Comment By: Bryan Jurish (mukau)
Date: 2011-01-18 12:45
Message:
What exactly does "changing the keyboard layout" entail? Does it e.g.
change your locale (LC_ALL, LC_CTYPE, etc.)? That might annoy Tk's unicode
handling...
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2011-01-18 09:31
Message:
one more thing:
in the original report i said that typing 'asd' should result in 'ыфв'
which is wrong.
it should rseult in ''фыв'
('a'='ф', 's'='ы', 'd'='в')
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2011-01-18 09:30
Message:
btw, in normal (de) kbd-layout, when i type (and releae) 'a', pd-gui
sends:
.x99e9708 key 1 97 0;
.x99e9708 key 0 97 0;
whereas when i switch to russian, pd-gui sends (again key 'a'):
.x99e9708 key 1 1092 0;
.x99e9708 key 0 a 0;
"1092" is the unicode number for "ф" (which is what should show up, when
i press 'a')
i don't know why the keyup sends 'a' instead.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3160982&group_…
Patches item #3160342, was opened at 2011-01-17 15:01
Message generated for change (Comment added) made by millerpuckette
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3160342&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: bugfix
>Status: Pending
>Resolution: Accepted
Priority: 8
Private: No
Submitted By: Hans-Christoph Steiner (eighthave)
Assigned to: Miller Puckette (millerpuckette)
Summary: remove CPU assumptions from build system
Initial Comment:
Currently in the configure.ac, for Mac OS X and Windows, there are some CPU-assumptions in the CFLAGS. This patch removes them so that Pd will be more likely to build on all platforms. This patch directly fixes building on Mac OS X/PowerPC, which currently does not build.
----------------------------------------------------------------------
>Comment By: Miller Puckette (millerpuckette)
Date: 2011-02-01 20:39
Message:
applied to 0.43 test
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3160342&group_…
Hi All
What I’m trying to do is to be able to dynamically create instances of
Pd, so I can have separate signal paths for each patch (i.e. not
static). I'm actually working with libpd, but it's still pd under the
hood. The reason being that I want to make an audio plugin for Logic,
and hopefully other formats, so people can create their instruments
and effects in Pd.
At the moment, since everything is static in Pd, my audio unit works
fine when there’s only one instance, but sounds dreadful or crashes
when there’s another one running – this is because its running the
same instance of Pd, but calling libpd_process_float() for both
patches twice in one block.
I’ve tried a couple of ways now to make libpd instanceable:
1. Make it into a dylib, then dynamically load it for each instance.
This doesn’t work because when you load the lib a second time, the OS
sees that it’s the same lib and reuses the one in memory (even if I
copy the lib to a new location with a new name!!)
2. Hacking the Pd source. I’ve had a little bit of success with this,
but I don’t really know what I’m doing, and was hoping there would be
someone out there who could point me in the right direction. I’ve been
trying to copy and clear the dsp_chain after loading each patch, and
then swapping them back before each individual render. What I've got
at present sometimes works for simple patches, but usually crashes
pretty quickly.
Anyone have any ideas? Am I doomed?
cheers
Marek
--
w: www.mazbox.com
t: +44 (0) 7866 141 047