[PD] ALSA MIDI problem

Dan Wilcox danomatika at gmail.com
Tue Jan 21 23:09:47 CET 2014


Oh woops. You want to call that in ~/.bash_login, not ~/bash_profile.

On Jan 21, 2014, at 3:17 PM, Dan Wilcox <danomatika at gmail.com> wrote:

> Here's a portion of a startup script I use:
> 
> ------------------------
> 
> echo "rc_starts_pd: strating pd"
> pd -rt -nogui -alsa -audiodev 4 -audiobuf 10 -alsamidi $PATCH &
> 
> # renice pd for much higher priority
> renice -10 $(pidof pd)
> 
> # wait for pd to initialize
> KA=$(aconnect -i -o | grep "Pure Data")
> while [ "$KA" = "" ]
> do
> 	sleep 1
> 	echo "rc_starts_pd: pd alsamidi not ready"
> 	KA=$(aconnect -i -o | grep "Pure Data")
> done
> echo "rc_starts_pd: pd alsmidi is ready"
> 
> # connect the UA-25 midi to Pure Data
> echo "rc_starts_pd: alsa midi connect 'UA-25' <-> 'Pure Data'"
> aconnect 'UA-25' 'Pure Data'
> aconnect 'Pure Data':1 'UA-25':0
> 
> # connect the VIEWCON dongle midi to Pure Data
> echo "rc_starts_pd: alsa midi connect 'VIEWCON..' <-> 'Pure Data'"
> aconnect 'VIEWCON..' 'Pure Data'
> aconnect 'Pure Data':1 'VIEWCON..':0
> 
> ----------------------
> 
> It starts Pd, then waits until the PD midi device is registered with ALSA before trying to connect two Midi devices: UA-25 & VIEWCON..
> 
> You could run the script from you ~/.bash_profile which would call it as soon as the user is logged in. I use this:
> 
> ---------------------
> 
> # do nothing if this is a ssh session
> if [ "$SSH_CLIENT" != "" ] ; then
>     exit
> fi
> 
> rc_starts_pd
> 
> ---------------------
> 
> It's important to ignore ssh sessions since, if you're like me, and you want to login to your (wearable) computer via SSH to check something, you don't want to launch a new instance of pd.
> 
> On Jan 21, 2014, at 1:37 PM, pd-list-request at iem.at wrote:
> 
>> From: Jack <jack at rybn.org>
>> Subject: Re: [PD] ALSA MIDI problem
>> Date: January 21, 2014 at 8:20:27 AM EST
>> To: "pd-list at iem.at" <pd-list at iem.at>
>> 
>> 
>> Ok, I find a solution :
>> 
>> $ aconnect -i
>> client 0: 'System' [type=noyau]
>>    0 'Timer           '
>>    1 'Announce        '
>> client 14: 'Midi Through' [type=noyau]
>>    0 'Midi Through Port-0'
>> client 20: 'USB Uno MIDI Interface' [type=noyau]
>>    0 'USB Uno MIDI Interface MIDI 1'
>> client 128: 'Pure Data' [type=utilisateur]
>>    1 'Pure Data Midi-Out 1'
>> 
>> $ aconnect -o
>> client 14: 'Midi Through' [type=noyau]
>>    0 'Midi Through Port-0'
>> client 20: 'USB Uno MIDI Interface' [type=noyau]
>>    0 'USB Uno MIDI Interface MIDI 1'
>> client 128: 'Pure Data' [type=utilisateur]
>>    0 'Pure Data Midi-In 1'
>> 
>> then :
>> $ aconnect 128:1 20:0
>> 
>> Now, how can i keep this configuration each time i reboot my laptop ?
>> ++
>> 
>> Jack
> 
> --------
> Dan Wilcox
> @danomatika
> danomatika.com
> robotcowboy.com
> 
> 
> 
> 
> 

--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140121/c1638573/attachment-0001.htm>


More information about the Pd-list mailing list