What's the easiest way to cut various symbols to a fixed length?
With or without externals.
I need to cut names to fit a LCD display.
Thank you
Ingo
my solutions, they are in the acre library and needs zexy.
mfg winfried
Am Dienstag, 12. November 2019, 17:56:57 CET schrieb Ingo:
What's the easiest way to cut various symbols to a fixed length?
With or without externals.
I need to cut names to fit a LCD display.
Thank you
Ingo
how about [list fromsymbol], [list split] and [list tosymbol]?
On Tue, Nov 12, 2019, 18:15 Winfried Ritsch ritsch@iem.at wrote:
my solutions, they are in the acre library and needs zexy.
mfg winfried
Am Dienstag, 12. November 2019, 17:56:57 CET schrieb Ingo:
What's the easiest way to cut various symbols to a fixed length?
With or without externals.
I need to cut names to fit a LCD display.
Thank you
Ingo
-- Ritsch, Winfried, Ao.Univ.Prof. Dipl.-Ing. Institut 17 Elektronische Musik und Akustik Inffeldgasse 10/III, 8010 Graz, Austria E-Mail: ritsch@iem.at - http://iem.at/~ritsch - mobil ++436642439369_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Am Dienstag, 12. November 2019, 18:39:49 CET schrieb tim vets:
how about [list fromsymbol], [list split] and [list tosymbol]?
of course, more modern.
mfg winfried
On Tue, Nov 12, 2019, 18:15 Winfried Ritsch ritsch@iem.at wrote:
my solutions, they are in the acre library and needs zexy.
mfg winfried
Am Dienstag, 12. November 2019, 17:56:57 CET schrieb Ingo:
What's the easiest way to cut various symbols to a fixed length?
With or without externals.
I need to cut names to fit a LCD display.
Thank you
Ingo
-- Ritsch, Winfried, Ao.Univ.Prof. Dipl.-Ing. Institut 17 Elektronische Musik und Akustik Inffeldgasse 10/III, 8010 Graz, Austria E-Mail: ritsch@iem.at - http://iem.at/~ritsch - mobil ++436642439369_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
First of all thank you, Winfried and Tim!
I ended up picking Tim's version with [list fromsymbol], [list split] and [list tosymbol] because it needs less objects. Works perfectly!
However, I had to add a [iemlib/mergefilename _] to eliminate blank spaces in some names. In order to change the names to work with [mergefilename] and [ list fromsymbol] I had to convert a few times with [s2l] and [l2s]. The underscores are converted to spaces again right before going to the LCD display.
Ingo
-----Original Message----- From: Pd-list [mailto:pd-list-bounces@lists.iem.at] On Behalf Of Winfried Ritsch Sent: Wednesday, November 13, 2019 9:01 AM To: pd-list@lists.iem.at Subject: Re: [PD] What's the easiest way to cut various symbols to a fixed length?
Am Dienstag, 12. November 2019, 18:39:49 CET schrieb tim vets:
how about [list fromsymbol], [list split] and [list tosymbol]?
of course, more modern.
mfg winfried
On Tue, Nov 12, 2019, 18:15 Winfried Ritsch ritsch@iem.at wrote:
my solutions, they are in the acre library and needs zexy.
mfg winfried
Am Dienstag, 12. November 2019, 17:56:57 CET schrieb Ingo:
What's the easiest way to cut various symbols to a fixed length?
With or without externals.
I need to cut names to fit a LCD display.
Thank you
Ingo
-- Ritsch, Winfried, Ao.Univ.Prof. Dipl.-Ing. Institut 17 Elektronische Musik und Akustik Inffeldgasse 10/III, 8010 Graz, Austria E-Mail: ritsch@iem.at - http://iem.at/~ritsch - mobil
++436642439369______________________________________________ _
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
-- Ritsch, Winfried, Ao.Univ.Prof. Dipl.-Ing. Institut 17 Elektronische Musik und Akustik, 8010 Graz, Inffeldgasse 10/ III E-Mail ritsch@iem.at, Homepage http://iem.at/ritsch, Mobil ++43 664 2439369
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Ingo wrote:
First of all thank you, Winfried and Tim!
I ended up picking Tim's version with [list fromsymbol], [list split] and [list tosymbol] because it needs less objects. Works perfectly!
However, I had to add a [iemlib/mergefilename _] to eliminate blank spaces in some names. In order to change the names to work with [mergefilename] and [ list fromsymbol] I had to convert a few times with [s2l] and [l2s]. The underscores are converted to spaces again right before going to the LCD display.
it can all be done with vanilla objects, just needs a little patching.
here's an abstraction of mine that i use a lot, which takes care of all the stuff you need. helpfile is included
best
oliver
Thanks, Dan and Oliver!
I have no problem using externals. I have finished up the code already and it's working - so topic done!
Ingo
I have vanilla implementations of s2l and l2s, if needed: https://github.com/danomatika/rc-patches File paths with spaces work fine as long as you merge them into a single symbol. I simply use l2s for this.
Ingo wrote:
First of all thank you, Winfried and Tim!
I ended up picking Tim's version with [list fromsymbol], [list split] and [list tosymbol] because it needs less objects. Works perfectly!
However, I had to add a [iemlib/mergefilename _] to eliminate blank spaces in some names. In order to change the names to work with [mergefilename] and [ list fromsymbol] I had to convert a few times with [s2l] and [l2s]. The underscores are converted to spaces again right before going to the LCD display.
it can all be done with vanilla objects, just needs a little patching.
here's an abstraction of mine that i use a lot, which takes care of all the stuff you need. helpfile is included
best
oliver
On 13.11.19 09:36, Ingo wrote:
First of all thank you, Winfried and Tim!
I ended up picking Tim's version with [list fromsymbol], [list split] and [list tosymbol] because it needs less objects. Works perfectly!
i'm late to the party, but my 4-object solution would be:
| [t b s] | | | [list fromsymbol] | +---+ |/ [repack 10] (zexy) | [list tosymbol] |
However, I had to add a [iemlib/mergefilename _] to eliminate blank spaces in some names. In order to change the names to work with [mergefilename] and [ list fromsymbol] I had to convert a few times with [s2l] and [l2s]. The underscores are converted to spaces again right before going to the LCD display.
what are you trying to achieve? remove leading whitespace from lines? or soemthing else?
fgmasdr IOhannes
This looks like a nice and compact way. I'll have to compare this to my other solution.
I'm reading out the connected MIDI interfaces upon connection by monitoring the /dev/ folder with [hcs/folder_list] every couple seconds. Whenever a new midi device gets connected I use a [shell] with [aconnect -i( to read out the names and IDs and send them with the midi input number of Pd to an lcd display while connecting it to the Pd MIDI inputs. So whenever I connect a midi device I know where it comes in.
In the next step I will make every of the 4 MIDI Ins in Pd that I'm using assignable to a specific midi controller in order to have them always the same each time I start up or change a MIDI controller. Some controllers need different handling than others.
Unfortunately every manufacturer uses different ways for naming - with or without spaces and/or extra infos. So I'm reading the first two elements of the name. Then I cut off the first character ' and split the name before the second ' which is where the name ends and additional descriptions may start. Since I have currently 11 characters available for displaying I need to extract the full name (possibly with spaces in between) as one symbol and cut it off before it wraps around to the next dislay line.
Ingo
-----Original Message----- From: Pd-list [mailto:pd-list-bounces@lists.iem.at] On Behalf Of IOhannes m zmoelnig Sent: Wednesday, November 13, 2019 11:35 AM To: pd-list@lists.iem.at Subject: Re: [PD] What's the easiest way to cut various symbols to a fixed length?
On 13.11.19 09:36, Ingo wrote:
First of all thank you, Winfried and Tim!
I ended up picking Tim's version with [list fromsymbol], [list split] and [list tosymbol] because it needs less objects. Works perfectly!
i'm late to the party, but my 4-object solution would be:
| [t b s] | | | [list fromsymbol] | +---+ |/ [repack 10] (zexy) | [list tosymbol] |
However, I had to add a [iemlib/mergefilename _] to eliminate blank spaces in some names. In order to change the names to work with [mergefilename] and [ list fromsymbol] I had to convert a few times with [s2l] and [l2s]. The underscores are converted to spaces again right before going to the LCD display.
what are you trying to achieve? remove leading whitespace from lines? or soemthing else?
fgmasdr IOhannes
On 13.11.19 12:12, Ingo wrote:
Whenever a new midi device gets connected I use a [shell] with [aconnect -i(
btw, there's this "aconnect" external i wrote some 15 years ago. it would allow you to do the same without having to spawn a new process with [shell].
iirc it was included with Pd-extended (but my mind might be misty), but hasn't made it to deken (yet). i've revived the project yesterday [1]. you can get a snapshot (from last night) from [2]
fgamsdrt IOhannes
[1] https://git.iem.at/pd/aconnect/ [2] https://git.iem.at/pd/aconnect/-/jobs/8428/artifacts/download
Cool! If I would have know this I could have saved a few days of work!
Thanks, IOhannes! I'll check it out right away.
Ingo
-----Original Message----- From: Pd-list [mailto:pd-list-bounces@lists.iem.at] On Behalf Of IOhannes m zmoelnig Sent: Thursday, November 14, 2019 2:27 PM To: pd-list@lists.iem.at Subject: Re: [PD] What's the easiest way to cut various symbols to a fixed length?
On 13.11.19 12:12, Ingo wrote:
Whenever a new midi device gets connected I use a [shell] with [aconnect -i(
btw, there's this "aconnect" external i wrote some 15 years ago. it would allow you to do the same without having to spawn a new process with [shell].
iirc it was included with Pd-extended (but my mind might be misty), but hasn't made it to deken (yet). i've revived the project yesterday [1]. you can get a snapshot (from last night) from [2]
fgamsdrt IOhannes
[1] https://git.iem.at/pd/aconnect/ [2] https://git.iem.at/pd/aconnect/-/jobs/8428/artifacts/download
The [aconnect] object doesn't create. Do I need to compile first?
Cool! If I would have know this I could have saved a few days of work!
Thanks, IOhannes! I'll check it out right away.
Ingo
-----Original Message----- From: Pd-list [mailto:pd-list-bounces@lists.iem.at] On Behalf Of IOhannes m zmoelnig Sent: Thursday, November 14, 2019 2:27 PM To: pd-list@lists.iem.at Subject: Re: [PD] What's the easiest way to cut various symbols to a fixed length?
On 13.11.19 12:12, Ingo wrote:
Whenever a new midi device gets connected I use a [shell] with [aconnect -i(
btw, there's this "aconnect" external i wrote some 15 years ago. it would allow you to do the same without having to spawn a new process with [shell].
iirc it was included with Pd-extended (but my mind might be misty), but hasn't made it to deken (yet). i've revived the project yesterday [1]. you can get a snapshot (from last night) from [2]
fgamsdrt IOhannes
[1] https://git.iem.at/pd/aconnect/ [2] https://git.iem.at/pd/aconnect/-/jobs/8428/artifacts/download
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
OK! I'm on Debian 32Bit.
-----Original Message----- From: Pd-list [mailto:pd-list-bounces@lists.iem.at] On Behalf Of IOhannes m zmoelnig Sent: Thursday, November 14, 2019 5:47 PM To: pd-list@lists.iem.at Subject: Re: [PD] What's the easiest way to cut various symbols to a fixed length?
On 14.11.19 16:18, Ingo wrote:
The [aconnect] object doesn't create. Do I need to compile first?
depends. the binaries are for amd64. if you use anything else, you will need to compile yourself.
for building you will need the alsa headers (libasound2-dev).
gmasdr IOhannes
Am 14. November 2019 17:53:14 MEZ schrieb Ingo ingo@miamiwave.com:
OK! I'm on Debian 32Bit.
x86, arm or mipsel?
but anyhow: you'll have to compile yourself.
mfg.hft.fsl IOhannes
x86
but I don't have the time for a few days, though ...
-----Original Message----- From: IOhannes m zmölnig [mailto:zmoelnig@iem.at] Sent: Thursday, November 14, 2019 8:07 PM To: pd-list@lists.iem.at; Ingo Subject: Re: [PD] What's the easiest way to cut various symbols to a fixed length?
Am 14. November 2019 17:53:14 MEZ schrieb Ingo ingo@miamiwave.com:
OK! I'm on Debian 32Bit.
x86, arm or mipsel?
but anyhow: you'll have to compile yourself.
mfg.hft.fsl IOhannes
On Tue, 2019-11-12 at 18:39 +0100, tim vets wrote:
how about [list fromsymbol], [list split] and [list tosymbol]?
This works as long as your characters are strictly ASCII. You get "interesting" results when cutting in the middle of an multi-byte unicode character. When the left-hand part of [list split] contains multi-byte unicode characters, the displayed string is shorter than what you intended.
Roman