[PD] notein midi bangs

2015-02-06 Thread jwind

hi list;
quite dull i am... and didn't find anything on the list.
trying to get my midi-in-device (mpc 1000) working for triggering simple
bangs with [notein].
my current problem is:
- when i hit the sample pad it fires off too many bangs within a very 
short period of

time and it makes it unusable to trigger a single starting-operation
(e.g. play a video once from the beginning when the pad is hit)

any idea how i can solve this?
mute receiving bangs for apprx. 50 ms or any human time?

[notein]
|   \\
[select 36 . . . ]
|
[bang(- this bangs apprx 4 times within 200 ms

??
thanks
j ,.




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] notein midi bangs

2015-02-06 Thread Claude Heiland-Allen

On 06/02/15 19:24, jwind wrote:

hi list;
quite dull i am... and didn't find anything on the list.


a search keyword could be debounce:

http://lists.puredata.info/pipermail/pd-list/2010-11/084230.html

points indirectly to:

http://sourceforge.net/p/pure-data/svn/17190/tree/trunk/externals/mapping/debounce.pd


Claude


trying to get my midi-in-device (mpc 1000) working for triggering simple
bangs with [notein].
my current problem is:
- when i hit the sample pad it fires off too many bangs within a very
short period of
time and it makes it unusable to trigger a single starting-operation
(e.g. play a video once from the beginning when the pad is hit)

any idea how i can solve this?
mute receiving bangs for apprx. 50 ms or any human time?

[notein]
|   \\
[select 36 . . . ]
|
[bang(- this bangs apprx 4 times within 200 ms

??
thanks
j ,.


--
http://mathr.co.uk


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] notein midi bangs

2015-02-06 Thread Dan Wilcox
[notein] returns both the note on event and the note off event (aka vel = 0), 
so that explains half of your events. If you only want to catch only note on 
events, you should use [stripnote]:

[notein]
|  \
[stripnote]
|
[select 36]
|
[bang — now only bangs on a note on event

This probably solves half your problem ...


Dan Wilcox
@danomatika
danomatika.com http://danomatika.com/
robotcowboy.com http://robotcowboy.com/
 On Feb 6, 2015, at 8:30 PM, pd-list-requ...@lists.iem.at wrote:
 
 From: jwind w...@mikrokiko.de mailto:w...@mikrokiko.de
 To: pd-list@lists.iem.at mailto:pd-list@lists.iem.at
 Date: February 6, 2015 at 8:24:43 PM GMT+1
 Subject: [PD] notein midi bangs
 
 
 hi list;
 quite dull i am... and didn't find anything on the list.
 trying to get my midi-in-device (mpc 1000) working for triggering simple
 bangs with [notein].
 my current problem is:
 - when i hit the sample pad it fires off too many bangs within a very short 
 period of
 time and it makes it unusable to trigger a single starting-operation
 (e.g. play a video once from the beginning when the pad is hit)
 
 any idea how i can solve this?
 mute receiving bangs for apprx. 50 ms or any human time?
 
 [notein]
 |   \\
 [select 36 . . . ]
 |
 [bang(- this bangs apprx 4 times within 200 ms
 
 ??
 thanks
 j ,.

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread Brian Fay
Wow, that's unexpected! :(

Are other audio-related things working fine?

-Brian

On Fri, Feb 6, 2015 at 3:40 PM, katja katjavet...@gmail.com wrote:

 Hello,

 I got that new Raspberry Pi model 2b. It is indeed much faster than b
 or b+ in practice, but alarmingly, I can't get useful sound from Pd.
 Continuous dropouts, no matter if built-in output or USB sound card
 (iMic) is used. I've built puredata 0.46-2 from Raspbian jessie
 source, for sure it has real time prio (can verify when starting Pd
 with option -verbose). No clue what is going on here, so far.

 Katja

 On Thu, Feb 5, 2015 at 3:54 AM, Simon Wise simonzw...@gmail.com wrote:
  On 05/02/15 12:51, Simon Wise wrote:
 
  (I haven't checked out the newest Pi at all yet, it apparently has a
 very
  much
  more powerful processor so is quite a different beast)
 
 
  Ok ... so it is a very similar chip with Quad-core ARMv7 replacing the
  single core ARMv6, with the rest of the chip apparently left unchanged
 ...
  so same USB and same graphics, more CPU for audio and a desktop, still
 less
  than half the price of an Udoo.
 
  Not much docs up yet at all, but there are images for a few systems ...
 kind
  of typical.
 
  And the move to ARMv7 takes it closer to current hardware, so for example
  there isn't the same need to build raspbian as a half-way house between 2
  debian builds ... for now they say they are keeping the same user-space
 in
  both raspbian builds and seem to have compatibility high on their agenda.
 
  Has anyone here actually got one yet?
 
  Simon
 
 
  ___
  Pd-list@lists.iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list

 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread katja
Hello,

I got that new Raspberry Pi model 2b. It is indeed much faster than b
or b+ in practice, but alarmingly, I can't get useful sound from Pd.
Continuous dropouts, no matter if built-in output or USB sound card
(iMic) is used. I've built puredata 0.46-2 from Raspbian jessie
source, for sure it has real time prio (can verify when starting Pd
with option -verbose). No clue what is going on here, so far.

Katja

On Thu, Feb 5, 2015 at 3:54 AM, Simon Wise simonzw...@gmail.com wrote:
 On 05/02/15 12:51, Simon Wise wrote:

 (I haven't checked out the newest Pi at all yet, it apparently has a very
 much
 more powerful processor so is quite a different beast)


 Ok ... so it is a very similar chip with Quad-core ARMv7 replacing the
 single core ARMv6, with the rest of the chip apparently left unchanged ...
 so same USB and same graphics, more CPU for audio and a desktop, still less
 than half the price of an Udoo.

 Not much docs up yet at all, but there are images for a few systems ... kind
 of typical.

 And the move to ARMv7 takes it closer to current hardware, so for example
 there isn't the same need to build raspbian as a half-way house between 2
 debian builds ... for now they say they are keeping the same user-space in
 both raspbian builds and seem to have compatibility high on their agenda.

 Has anyone here actually got one yet?

 Simon


 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] notein midi bangs

2015-02-06 Thread Pierre Desprats

Hi,

you could try stripnote object, to remove the note-off (in PD, it's 
juste a note-in message with velocity to 0)


you could try the change object - it outputs the input only if it has 
change


if you still have too many bangs, you could try speedlim object to limit 
the data flow.


like that :

[notein]
||
|[change]
||
[stripnote]
||
[sel 36]
|
[speedlim 200]

Le 06/02/15 14:24, jwind a écrit :

hi list;
quite dull i am... and didn't find anything on the list.
trying to get my midi-in-device (mpc 1000) working for triggering simple
bangs with [notein].
my current problem is:
- when i hit the sample pad it fires off too many bangs within a very 
short period of

time and it makes it unusable to trigger a single starting-operation
(e.g. play a video once from the beginning when the pad is hit)

any idea how i can solve this?
mute receiving bangs for apprx. 50 ms or any human time?

[notein]
|   \\
[select 36 . . . ]
|
[bang(- this bangs apprx 4 times within 200 ms

??
thanks
j ,.




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list



--
--
Pierre Doux.
*Tel* : 438-885- (Montreal)

*KARELLE*
karelle.bandcamp.com http://karelle.bandcamp.com/
soundcloud.com/karelle http://soundcloud.com/karelle
facebook.com/karellemusic https://www.facebook.com/karellemusic
--hellokare...@gmail.com--


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] gem fullscreen in mac osx10.9, using 1 monitor

2015-02-06 Thread palmieri, ricardo
hi guys!

i have this issue: when i try to use my main monitor to be filled by my gem
window (pd-extended 0.42/0.43, mac osx 10.9, macmini i7), finder doesnt
hide the menubar.

using the tags menubar (tried -1 and 0 option), and fullscreen but i have
no success.

i could use this feature in mac osx 10.8 and earlier, but not in 10.9

my solution now is to use this menueclipse from xybernic to keep the
menubar as a black stripe

someone have this same issue?
any sugestion?

thanks a lot!

palm
-- 

mobileCLARO#+5511-9-60175161
[vjpalm.com http://vjpalm.blogspot.com/]
[myspace.com/livenoisetupi]
[facebook.com/vjpalm]
[skype-me:palmieriricardo]
[twitt-me: @ricardopalmieri]
[linux user # 392484]
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread katja
Aplay can play a .wav file without trouble, so it is not a general
problem with the audio hardware or drivers on Pi 2b.

I installed command htop to see CPU load per core. It's interesting,
the load switches from one core to another, and sometimes they all
seem to be almost idle even with a heavy Pd patch running.

Katja



On Fri, Feb 6, 2015 at 9:46 PM, Brian Fay ovaltinevor...@gmail.com wrote:
 Wow, that's unexpected! :(

 Are other audio-related things working fine?

 -Brian

 On Fri, Feb 6, 2015 at 3:40 PM, katja katjavet...@gmail.com wrote:

 Hello,

 I got that new Raspberry Pi model 2b. It is indeed much faster than b
 or b+ in practice, but alarmingly, I can't get useful sound from Pd.
 Continuous dropouts, no matter if built-in output or USB sound card
 (iMic) is used. I've built puredata 0.46-2 from Raspbian jessie
 source, for sure it has real time prio (can verify when starting Pd
 with option -verbose). No clue what is going on here, so far.

 Katja

 On Thu, Feb 5, 2015 at 3:54 AM, Simon Wise simonzw...@gmail.com wrote:
  On 05/02/15 12:51, Simon Wise wrote:
 
  (I haven't checked out the newest Pi at all yet, it apparently has a
  very
  much
  more powerful processor so is quite a different beast)
 
 
  Ok ... so it is a very similar chip with Quad-core ARMv7 replacing the
  single core ARMv6, with the rest of the chip apparently left unchanged
  ...
  so same USB and same graphics, more CPU for audio and a desktop, still
  less
  than half the price of an Udoo.
 
  Not much docs up yet at all, but there are images for a few systems ...
  kind
  of typical.
 
  And the move to ARMv7 takes it closer to current hardware, so for
  example
  there isn't the same need to build raspbian as a half-way house between
  2
  debian builds ... for now they say they are keeping the same user-space
  in
  both raspbian builds and seem to have compatibility high on their
  agenda.
 
  Has anyone here actually got one yet?
 
  Simon
 
 
  ___
  Pd-list@lists.iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list

 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread Miller Puckette
Also try running pd -nosleep, which sometimes persuades kernels to
schedule the process differently :)

M

On Fri, Feb 06, 2015 at 11:30:03PM +0100, katja wrote:
 Claude, thanks for the hint. My /boot/config.txt shows no special
 settings, so I guess the CPU is at a fixed frequency. It says that
 '700 MHz is the default' (while model 2B should be at 900 MHz). Seems
 I downloaded the 'newest' Raspbian too early (the day after model 2B's
 release)... Will try again.
 
 Katja
 
 On Fri, Feb 6, 2015 at 10:50 PM, Claude Heiland-Allen
 cla...@mathr.co.uk wrote:
  I've not got any version of the rpi, but maybe it's scaling down the clock
  frequency of unused cores, which then takes some time to spin up to full
  speed when a task is moved by the kernel?
 
  I also had issues on amd64 desktop and core2duo laptop with pd -rt not being
  taken into account by the kernel ondemand cpu speed governor, or some other
  issue perhaps, whereby the cpu speed would stay at ~800MHz even though it
  really needed to be higher to reduce xruns etc..  pd -nrt would scale up the
  cpu speed correctly.
 
 
  On my quad-core amd64 desktop I run this before realtime work (or nrt
  benchmarking) to set all cores to maximum speed (with the 'performance'
  governor):
 
  for c in 0 1 2 3 ; do sudo cpufreq-set -c $c -g performance ; done
 
  Then when I want to reduce fan noise / heat etc and I'm not doing much
  intensive, I reset to the default 'ondemand' governor:
 
  for c in 0 1 2 3 ; do sudo cpufreq-set -c $c -g ondemand ; done
 
 
  Might also be worth looking into setting scheduler cpu core affinity for pd,
  jackd, pd-gui, ...  but I don't know how to do that.
 
 
  Claude
 
  On 06/02/15 21:38, katja wrote:
 
  Aplay can play a .wav file without trouble, so it is not a general
  problem with the audio hardware or drivers on Pi 2b.
 
  I installed command htop to see CPU load per core. It's interesting,
  the load switches from one core to another, and sometimes they all
  seem to be almost idle even with a heavy Pd patch running.
 
 
  --
  http://mathr.co.uk
 
 
 
  ___
  Pd-list@lists.iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list
 
 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread Claude Heiland-Allen
I've not got any version of the rpi, but maybe it's scaling down the 
clock frequency of unused cores, which then takes some time to spin up 
to full speed when a task is moved by the kernel?


I also had issues on amd64 desktop and core2duo laptop with pd -rt not 
being taken into account by the kernel ondemand cpu speed governor, or 
some other issue perhaps, whereby the cpu speed would stay at ~800MHz 
even though it really needed to be higher to reduce xruns etc..  pd -nrt 
would scale up the cpu speed correctly.



On my quad-core amd64 desktop I run this before realtime work (or nrt 
benchmarking) to set all cores to maximum speed (with the 'performance' 
governor):


for c in 0 1 2 3 ; do sudo cpufreq-set -c $c -g performance ; done

Then when I want to reduce fan noise / heat etc and I'm not doing much 
intensive, I reset to the default 'ondemand' governor:


for c in 0 1 2 3 ; do sudo cpufreq-set -c $c -g ondemand ; done


Might also be worth looking into setting scheduler cpu core affinity for 
pd, jackd, pd-gui, ...  but I don't know how to do that.



Claude

On 06/02/15 21:38, katja wrote:

Aplay can play a .wav file without trouble, so it is not a general
problem with the audio hardware or drivers on Pi 2b.

I installed command htop to see CPU load per core. It's interesting,
the load switches from one core to another, and sometimes they all
seem to be almost idle even with a heavy Pd patch running.


--
http://mathr.co.uk


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread katja
Claude, thanks for the hint. My /boot/config.txt shows no special
settings, so I guess the CPU is at a fixed frequency. It says that
'700 MHz is the default' (while model 2B should be at 900 MHz). Seems
I downloaded the 'newest' Raspbian too early (the day after model 2B's
release)... Will try again.

Katja

On Fri, Feb 6, 2015 at 10:50 PM, Claude Heiland-Allen
cla...@mathr.co.uk wrote:
 I've not got any version of the rpi, but maybe it's scaling down the clock
 frequency of unused cores, which then takes some time to spin up to full
 speed when a task is moved by the kernel?

 I also had issues on amd64 desktop and core2duo laptop with pd -rt not being
 taken into account by the kernel ondemand cpu speed governor, or some other
 issue perhaps, whereby the cpu speed would stay at ~800MHz even though it
 really needed to be higher to reduce xruns etc..  pd -nrt would scale up the
 cpu speed correctly.


 On my quad-core amd64 desktop I run this before realtime work (or nrt
 benchmarking) to set all cores to maximum speed (with the 'performance'
 governor):

 for c in 0 1 2 3 ; do sudo cpufreq-set -c $c -g performance ; done

 Then when I want to reduce fan noise / heat etc and I'm not doing much
 intensive, I reset to the default 'ondemand' governor:

 for c in 0 1 2 3 ; do sudo cpufreq-set -c $c -g ondemand ; done


 Might also be worth looking into setting scheduler cpu core affinity for pd,
 jackd, pd-gui, ...  but I don't know how to do that.


 Claude

 On 06/02/15 21:38, katja wrote:

 Aplay can play a .wav file without trouble, so it is not a general
 problem with the audio hardware or drivers on Pi 2b.

 I installed command htop to see CPU load per core. It's interesting,
 the load switches from one core to another, and sometimes they all
 seem to be almost idle even with a heavy Pd patch running.


 --
 http://mathr.co.uk



 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] clear delwrite~?

2015-02-06 Thread Seb Shader via Pd-list
Oh I forgot to include the abstractions for the help files for these but it's 
pretty self-explanatory. The makefile should be edited with the correct paths 
to compile. The original tabread4c~ (hermite interpolation) was from nusmuk by 
Cyrille Henry___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] new raspberries

2015-02-06 Thread Simon Wise

On 07/02/15 12:22, Simon Wise wrote:


Try one of the other images ... the new ones are there because they run on
ARMv7, and if they have puredata in their repositories then it will be built for
ARMv7 also.

Maybe you will need to build pd yourself, but in any case downloading one of the
binaries, built for the old raspberries, is asking for trouble.


sorry ... from previous mail you said you built it yourself, so that isn't the 
problem.



Simon

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] cpusets

2015-02-06 Thread Simon Wise

On 07/02/15 16:08, Simon Wise wrote:

if it is the changing of cores that is causing the problems, perhaps try setting
the pd process to a particular core ...

taskset is the program to set a process to use only a particular core, see its
manpage.


you can also get more specific and reserve one of the cores exclusively for the 
main pd process using cpusets


https://raw.githubusercontent.com/torvalds/linux/master/Documentation/cgroups/cpusets.txt

or:   man cpuset

this mechanism can also allocate memory and such, the manpage gives a lot of 
detail, it does not seem difficult to use in a basic way, and could be very 
useful in the Udoo with its 4 big and 4 little cores, say reserving one for the 
main pd process, and one of the little cores for a simple interface that you 
want to be as low latency as possible ... say responding to specific GPIO events.




simon

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] multicore

2015-02-06 Thread Simon Wise
if it is the changing of cores that is causing the problems, perhaps try setting 
the pd process to a particular core ...


taskset   is the program to set a process to use only a particular core, see its 
manpage.



simon

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] cpusets

2015-02-06 Thread Simon Wise

On 07/02/15 16:54, Simon Wise wrote:

On 07/02/15 16:08, Simon Wise wrote:

if it is the changing of cores that is causing the problems, perhaps try setting
the pd process to a particular core ...

taskset is the program to set a process to use only a particular core, see its
manpage.


you can also get more specific and reserve one of the cores exclusively for the
main pd process using cpusets

https://raw.githubusercontent.com/torvalds/linux/master/Documentation/cgroups/cpusets.txt


or: man cpuset

this mechanism can also allocate memory and such, the manpage gives a lot of
detail, it does not seem difficult to use in a basic way, and could be very
useful in the Udoo with its 4 big and 4 little cores, say reserving one for the
main pd process, and one of the little cores for a simple interface that you
want to be as low latency as possible ... say responding to specific GPIO 
events.


the big advantage for this would be that when the core is swapped the cache is 
invalidated ... this may well be quite significant when doing certain audio 
tasks, but I am not sure in detail.



Simon

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] clear delwrite~?

2015-02-06 Thread katja
For exactly that reason I used [cyclone/poke~] to make a
sound-on-sound looper, see
http://forum.pdpatchrepo.info/topic/4571/sound-on-sound-looper-with-clear-option.
By the way [cyclone/poke~] was buggy in 64 bit. That is recently fixed
by Fred Jan but you have to compile from SVN source to get the fixed
version.

Katja

On Fri, Feb 6, 2015 at 8:23 AM, Roman Haefeli reduz...@gmail.com wrote:
 On Thu, 2015-02-05 at 21:44 -0500, Jaime E Oliver wrote:

 Is there a way to clear a delwrite~, there is nothing in the help file but 
 perhaps there is a hidden method?

 Oh, yes... I'd want that, too. Thinking more about it, one could build a
 [delwrite~]/[delread~] emulation based on a table, which would let you
 send a 'const 0' as way to clear the current buffer.

 Roman



 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread Simon Wise

On 06/02/15 22:20, Alexandros Drymonitis wrote:

I want to launch Pd when my raspberry pi boots, so in /etc/rc.local I wrote
the following, just before 'exit 0'

usr/local/bin/pd -nogui -open ~/pd_patches/load_test.pd

The patch that's supposed to open turns the DSP on on load and outputs a
sine tone at 440 Hz. But when I power up the pi, I hear nothing out of the
headphones (I tested the patch and it works if I launch Pd from the
terminal).

If I type 'top' in the terminal, I see that there's pd taking some small
CPU, but after I exit top, if I type 'killall pd', I get this:
pd(2097): Operation not permitted
pd: no process found

Is this 2097 Pd's pid?

What am I doing wrong?


rc.local runs as root ... to launch pd use:

sudo -u pi -i pd -nogui -noaudio -nomidi /share/master.pd 

or similar, here pi is the user, the  means pd runs in the background.

I usually keep a script at /share/initialise then call it as user pi, it makes 
it a lot easier to keep different projects ans swap between them.



Simon


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread IOhannes m zmölnig
On 02/06/2015 01:58 PM, Alexandros Drymonitis wrote:
 On Fri, Feb 6, 2015 at 1:46 PM, Simon Wise simonzw...@gmail.com wrote:
 
 rc.local runs as root ... to launch pd use:

 sudo -u pi -i pd -nogui -noaudio -nomidi /share/master.pd 

 I don't get the /share/master.pd what is it supposed to do in this command?

it's the patch that gets loaded.

 

 or similar, here pi is the user, the  means pd runs in the background.

 I usually keep a script at /share/initialise then call it as user pi, it
 makes it a lot easier to keep different projects ans swap between them.

 there's no /share/initialise file or directory... should I create it? And

afaict, simon gave you a description of his setup.
the FHS does not mandate (or mention) a /share/initialize file (nor
directory), i assume that this is simon's invention.

what he bsaically tells you is:
- use a separate script to actually start Pd with all the parameters and
patches. (probably you can even make that script be owned by your
ordinary user, so you can minimize the need to become root).
- call this script from within rc.local
- when calling the script (from rc.local), use a mechanism (sudo) to run
the script as your ordinary user (rather than root).

separating the tasks of running as ordinary user and starting Pd
makes it easier to get both things right (and not break one thing while
fixing the other)

running pd as an ordinary user minimizes the chances that it will bork
your system (remember that Pd was not written with security in mind)


gfmsar
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread Simon Wise

On 07/02/15 02:12, Antoine Villeret wrote:

hi,

in my case, I put my scripts in /etc/init.d and then make them run on boot
with update-rc.d or insserv
if I need to run them when plugin a USB device, I wrote a udev rules
and if I need networking, I put my script in /etc/networking/if-up.d
running a pd patch at startup that relies on network implies to check the
network state inside Pd
running the patch through if-up.d and stoping it with if-down is more
robust to my eyes


that is a good way to do it .. and with a few scripts running as root then one 
can automate loading all the required files for a project


but for me I find splitting the project files from the base is very important, 
especially with varying machines that need different base systems (e.g. I need a 
different OS for my B+ which is incompatible with my B models with audio cards) 
and with several similar projects sharing a set of machines, or being swapped 
into machines owned by other people on different continents. I would rather that 
no project adds files outside the media folder /srv/ (which contains all 
machine-specific data such as vids for a particular projector and the cues for 
that projector) and the /share/ folder (which contains all the project specific 
scripts, patches etc that are common to all machines in the project).


I try to make the project scripts robust, and to make it possible for the 
artists I work with to do as much of the adjusting and maintenance as possible.


Antoine, re your audio-video sync question from November ... this code got me 
close enough for what I needed, by loading the video paused then triggering 
start via dbus is reasonably consistent, and a fixed short delay kept the audio 
and video pretty close .. but I am now looking at a couple of modified 
omxplayers, one that renders to texture and I will look at the omxplayer-sync 
one also, I would prefer to use the clocking of the audio as the master, and get 
the videos to stay in sync with that, and need the texture control as well in 
future.


The omxplayer code is quite big, but I am starting to get a handle on it.


Simon

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread Alexandros Drymonitis
On Fri, Feb 6, 2015 at 1:46 PM, Simon Wise simonzw...@gmail.com wrote:

 rc.local runs as root ... to launch pd use:

 sudo -u pi -i pd -nogui -noaudio -nomidi /share/master.pd 

I don't get the /share/master.pd what is it supposed to do in this command?


 or similar, here pi is the user, the  means pd runs in the background.

 I usually keep a script at /share/initialise then call it as user pi, it
 makes it a lot easier to keep different projects ans swap between them.

there's no /share/initialise file or directory... should I create it? And
then should I put my script there and call it from rc.local? For example
'sudo -u pi -i sh /share/initialise/launch_pd.sh' is any good (supposing I
write a script called launch_pd.sh which launches Pd and open the desired
patch...)?

I put 'sudo -u pi -i /usr/local/bin/pd -nogui -open
~/pd_patches/load_test.pd' in rc.local but again it didn't work...



 Simon


 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/
 listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread Claude Heiland-Allen

On 06/02/15 12:58, Alexandros Drymonitis wrote:

I put 'sudo -u pi -i /usr/local/bin/pd -nogui -open
~/pd_patches/load_test.pd' in rc.local but again it didn't work...


~/ gets expanded by the shell to the contents of ${HOME} before the sudo 
command is even executed, so it's going to be root's home, usually /root 
- (as recommended by others) launch pd from a script, and specify the 
full path to the script in your /etc/rc.local sudo command (avoid using 
~/ or ${HOME}).



Claude
--
http://mathr.co.uk


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread Simon Wise

On 06/02/15 23:58, Alexandros Drymonitis wrote:


I put 'sudo -u pi -i /usr/local/bin/pd -nogui -open
~/pd_patches/load_test.pd' in rc.local but again it didn't work...


~ means home folder ... but that file is in the home folder of pi, not of
root (which is running this command) ... use:

sudo -u pi -i /usr/local/bin/pd -nogui -open /home/pi/pd_patches/load_test.pd

in any case using explict full paths is a good idea in root scripts like 
rc.local.

Iohannes answered the rest, I was a too terse! yes, to make it easy to work with 
several projects and Pis I keep all the project specific stuff in a folder I 
call /share/ ... then it is easy to swap between projects.


simon

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is /etc/rc.local the script that runs on boot?

2015-02-06 Thread Antoine Villeret
hi,

in my case, I put my scripts in /etc/init.d and then make them run on boot
with update-rc.d or insserv
if I need to run them when plugin a USB device, I wrote a udev rules
and if I need networking, I put my script in /etc/networking/if-up.d
running a pd patch at startup that relies on network implies to check the
network state inside Pd
running the patch through if-up.d and stoping it with if-down is more
robust to my eyes

+
a

--
do it yourself
http://antoine.villeret.free.fr

2015-02-06 16:00 GMT+01:00 Simon Wise simonzw...@gmail.com:

 On 06/02/15 23:58, Alexandros Drymonitis wrote:

  I put 'sudo -u pi -i /usr/local/bin/pd -nogui -open
 ~/pd_patches/load_test.pd' in rc.local but again it didn't work...


 ~ means home folder ... but that file is in the home folder of pi, not of
 root (which is running this command) ... use:

 sudo -u pi -i /usr/local/bin/pd -nogui -open /home/pi/pd_patches/load_test.
 pd

 in any case using explict full paths is a good idea in root scripts like
 rc.local.

 Iohannes answered the rest, I was a too terse! yes, to make it easy to
 work with several projects and Pis I keep all the project specific stuff in
 a folder I call /share/ ... then it is easy to swap between projects.


 simon

 ___
 Pd-list@lists.iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/
 listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list