Re: [PD] Sysex out problems (linux only)

2009-07-19 Thread Alex
You could try making it so that you don't send sysex messages on every
change.. just poll for changes at a certain rate.. and only sent the
most recent change at that rate?

-Alex

2009/7/17 András Murányi muran...@gmail.com:
 2009/7/8 Alex x37v.a...@gmail.com

 I think that pd's midi out doesn't take whole sysex messages though,
 you simply send a stream of bytes.  This is how it has been working
 for me.  I created an abstraction which takes a list of bytes and
 makes it into a sysex message (stream of bytes) [adds the sysex start
 and start and then outputs bytes one by one] and it works quite well
 for me.

 If it's your list2sysex abstraction then I have already witnessed and
 tried it...! So far with not more success than using a comma-separated list.


 Btw, the sysex loopback code [using the software through] that you
 sent initially does work for me.. I get the whole message.

 Hmm! Now I think I will have to try with some reliable midi-out hardware
 as the the Audigy is rumoured to eat up sysex and my MOTU is going crazy,
 not to mention that it does jack-midi only and the a2jmidid bridge is not so
 very good with other than simple and slow tunes.

 Now that i'm trying with a Midisport everything is OK.
 Another thing was that i was a bit lost in Yamaha's midi spec for the mu100
 but i've found it out.  ;)

 However now i see that pd's performace is becoming really waving as i'm
 tring to pump out more midi data.
 My old-new questions would be:
 - Provided that a knob is directly driving a sysex pattern which spits out
 way more data than necessary, who do i best slow down my data, staying
 realtime? I guess i shall drop some of it somehow, or i shall kinda resample
 the datastream. Could you Sirs recommend an economic way to do this?
 - My machine is a moderate powerhouse (Opteron 148 @2200, 4G), my kernel is
 rt and audio in pd is off however performance is waving, and my simple
 sequencer is becoming unstable. What are the crucial points of keeping the
 patch 'fast', where do you think i generally lose the most cpu?

 Thanks,

 Andras


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



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


Re: [PD] Sysex out problems (linux only)

2009-07-18 Thread András Murányi

 2009/7/8 Alex x37v.a...@gmail.com

 I think that pd's midi out doesn't take whole sysex messages though,
 you simply send a stream of bytes.  This is how it has been working
 for me.  I created an abstraction which takes a list of bytes and
 makes it into a sysex message (stream of bytes) [adds the sysex start
 and start and then outputs bytes one by one] and it works quite well
 for me.


 If it's your list2sysex abstraction then I have already witnessed and tried
 it...! So far with not more success than using a comma-separated list.


 Btw, the sysex loopback code [using the software through] that you
 sent initially does work for me.. I get the whole message.


 Hmm! Now I think I will have to try with some reliable midi-out hardware as
 the the Audigy is rumoured to eat up sysex and my MOTU is going crazy, not
 to mention that it does jack-midi only and the a2jmidid bridge is not so
 very good with other than simple and slow tunes.


Now that i'm trying with a Midisport everything is OK.
Another thing was that i was a bit lost in Yamaha's midi spec for the mu100
but i've found it out.  ;)

However now i see that pd's performace is becoming really waving as i'm
tring to pump out more midi data.
My old-new questions would be:
- Provided that a knob is directly driving a sysex pattern which spits out
way more data than necessary, who do i best slow down my data, staying
realtime? I guess i shall drop some of it somehow, or i shall kinda resample
the datastream. Could you Sirs recommend an economic way to do this?
- My machine is a moderate powerhouse (Opteron 148 @2200, 4G), my kernel is
rt and audio in pd is off however performance is waving, and my simple
sequencer is becoming unstable. What are the crucial points of keeping the
patch 'fast', where do you think i generally lose the most cpu?

Thanks,

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


Re: [PD] Sysex out problems (linux only)

2009-07-08 Thread András Murányi
2009/7/8 Martin Peach martin.pe...@sympatico.ca

 András Murányi wrote:

 Dear Sirs,

 I just have never been successful with sysex in Pd and I'm asking for your
 kind advice.
 Attached is an example for a long sysex message which goes out on
 [midiout] (linux only, afaik).
 The problems I have:
 - sysex gets fragmented (also when nothing is sent out meanwhile by other
 objects). It is always properly terminated with '247' but the content is
 often truncated. Is this a bug/feature...? What is your best recommendation
 knowing that my patch is full of sysex outs (+envelopes on some of them!)


 in the patch you posted, the message you send to [midiout] is
 [240,67,16,73,8,$2,19,$1,247(
 , which Pd takes as 9 separate messages because of the comma in between
 each item.
 Probably [240 67 16 73 8 $2 19 $1 247( would work better.


Dear Martin,

that is how it goes afaik, sysex is kind of a sequence, which is comma
separated
as discussed here: http://puredata.hurleur.com/sujet-417-sysex

I just cannot prove it as i have never seen sysex out working :o)

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


Re: [PD] Sysex out problems (linux only)

2009-07-08 Thread Martin Peach

András Murányi wrote:
2009/7/8 Martin Peach martin.pe...@sympatico.ca 
mailto:martin.pe...@sympatico.ca


András Murányi wrote:

Dear Sirs,

I just have never been successful with sysex in Pd and I'm
asking for your kind advice.
Attached is an example for a long sysex message which goes out
on [midiout] (linux only, afaik).
The problems I have:
- sysex gets fragmented (also when nothing is sent out meanwhile
by other objects). It is always properly terminated with '247'
but the content is often truncated. Is this a bug/feature...?
What is your best recommendation knowing that my patch is full
of sysex outs (+envelopes on some of them!)


in the patch you posted, the message you send to [midiout] is
[240,67,16,73,8,$2,19,$1,247(
, which Pd takes as 9 separate messages because of the comma in
between each item.
Probably [240 67 16 73 8 $2 19 $1 247( would work better.


Dear Martin,

that is how it goes afaik, sysex is kind of a sequence, which is comma 
separated


Yes and no: sysex is a sequence that starts with the value 240 (hex F0) 
followed by a number of bytes, each less than 128, and ends with 247 
(hex F7). There are no commas in it unless the message contains commas. 
(If you really want to send commas you would need to specify the ASCII 
code for a comma, 44.)
As far as Pd goes, separating items in a message box makes them into 
separate messages, so it's no surprise they get sent out separately.


Martin

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


Re: [PD] Sysex out problems (linux only)

2009-07-08 Thread Alex
I think that pd's midi out doesn't take whole sysex messages though,
you simply send a stream of bytes.  This is how it has been working
for me.  I created an abstraction which takes a list of bytes and
makes it into a sysex message (stream of bytes) [adds the sysex start
and start and then outputs bytes one by one] and it works quite well
for me.

I've attached it just as an example.

Btw, the sysex loopback code [using the software through] that you
sent initially does work for me.. I get the whole message.

-Alex

2009/7/8 Martin Peach martin.pe...@sympatico.ca:
 András Murányi wrote:

 2009/7/8 Martin Peach martin.pe...@sympatico.ca
 mailto:martin.pe...@sympatico.ca

    András Murányi wrote:

        Dear Sirs,

        I just have never been successful with sysex in Pd and I'm
        asking for your kind advice.
        Attached is an example for a long sysex message which goes out
        on [midiout] (linux only, afaik).
        The problems I have:
        - sysex gets fragmented (also when nothing is sent out meanwhile
        by other objects). It is always properly terminated with '247'
        but the content is often truncated. Is this a bug/feature...?
        What is your best recommendation knowing that my patch is full
        of sysex outs (+envelopes on some of them!)


    in the patch you posted, the message you send to [midiout] is
    [240,67,16,73,8,$2,19,$1,247(
    , which Pd takes as 9 separate messages because of the comma in
    between each item.
    Probably [240 67 16 73 8 $2 19 $1 247( would work better.


 Dear Martin,

 that is how it goes afaik, sysex is kind of a sequence, which is comma
 separated

 Yes and no: sysex is a sequence that starts with the value 240 (hex F0)
 followed by a number of bytes, each less than 128, and ends with 247 (hex
 F7). There are no commas in it unless the message contains commas. (If you
 really want to send commas you would need to specify the ASCII code for a
 comma, 44.)
 As far as Pd goes, separating items in a message box makes them into
 separate messages, so it's no surprise they get sent out separately.

 Martin

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


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


[PD] Sysex out problems (linux only)

2009-07-07 Thread András Murányi
Dear Sirs,

I just have never been successful with sysex in Pd and I'm asking for your
kind advice.
Attached is an example for a long sysex message which goes out on [midiout]
(linux only, afaik).
The problems I have:
- sysex gets fragmented (also when nothing is sent out meanwhile by other
objects). It is always properly terminated with '247' but the content is
often truncated. Is this a bug/feature...? What is your best recommendation
knowing that my patch is full of sysex outs (+envelopes on some of them!)
- sysex just magically does not work on the target machine ;o) I have no
clue why except for this thing with being truncated but it *never* works
even if the message seems to go out intact. Even more interesting that the
machine shows me that it is recieving sysex! Tried with the mpu-401 of an
Audigy and with a MOTU 828 mkII through Jack and a2jmidid (jack-alsa midi
bridge). Sysex is

Thanks a Lot!

-- 
Muranyi Andras
#N canvas 311 74 791 688 10;
#X obj 123 177 midiout;
#X obj 162 143 nbx 2 14 0 16 0 0 empty empty device 0 -6 0 10 -262144
-1 -1 0 256;
#X floatatom 123 35 0 0 127 0 - - -;
#N canvas 401 346 945 646 (subpatch) 0;
#X obj 0 56 outlet;
#X obj 0 -24 inlet;
#X obj 1 1 mknob 16 0 0 127 0 0 empty empty Rev 1 21 1 8 -261682 -1
-1 3126 1;
#X obj 0 32 int;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 0 0;
#X coords 0 1 100 -1 18 26 1 0 0;
#X restore 123 6 graph;
#X obj 123 55 pack 0 0;
#X msg 123 99 240 \, 67 \, 16 \, 73 \, 8 \, \$2 \, 19 \, \$1 \, 247
;
#X floatatom 168 35 0 0 127 0 - - -;
#N canvas 405 346 945 646 (subpatch) 0;
#X obj 0 56 outlet;
#X obj 0 -24 inlet;
#X obj 1 1 mknob 16 0 0 16 0 0 empty empty Chn 1 21 1 8 -228856 -1
-1 0 1;
#X obj 0 32 int;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 0 0;
#X coords 0 1 100 -1 18 26 1 0 0;
#X restore 168 6 graph;
#X obj 124 220 sysexin;
#X obj 314 217 notein;
#X obj 314 280 print NOTE;
#X obj 124 281 print SYSE;
#X text 329 249 Play your favourite sequencer along;
#X text 94 197 SW or HW LOOPBACK;
#X text 348 98 Yamaha MU100 Reverb Send sysex - never mind \; o);
#X connect 1 0 0 1;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 0 0;
#X connect 6 0 4 1;
#X connect 7 0 6 0;
#X connect 8 0 11 0;
#X connect 9 0 10 0;
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Sysex out problems (linux only)

2009-07-07 Thread Alex
I haven't actually tested sysex out limits, but sysex in is limited to
something like 24 byte messages..

here is a thread where i talk about it:
http://lists.puredata.info/pipermail/pd-list/2009-01/067372.html

It is hard coded into the source. You can modify the source to change
the hard coded limit.. i have a diff on that thread which shows how i
did it.

It would be nice if this limit was either totally removed or
dynamically growable.. as it would be really nice to be able to write
real sysex editors in PD.

I have been creating my own physical devices with sysex and I use pd
to edit the sysex data but i have to make my sysex packets short
because of PD's limitations.

-Alex

2009/7/7 András Murányi muran...@gmail.com:
 Dear Sirs,

 I just have never been successful with sysex in Pd and I'm asking for your
 kind advice.
 Attached is an example for a long sysex message which goes out on [midiout]
 (linux only, afaik).
 The problems I have:
 - sysex gets fragmented (also when nothing is sent out meanwhile by other
 objects). It is always properly terminated with '247' but the content is
 often truncated. Is this a bug/feature...? What is your best recommendation
 knowing that my patch is full of sysex outs (+envelopes on some of them!)
 - sysex just magically does not work on the target machine ;o) I have no
 clue why except for this thing with being truncated but it *never* works
 even if the message seems to go out intact. Even more interesting that the
 machine shows me that it is recieving sysex! Tried with the mpu-401 of an
 Audigy and with a MOTU 828 mkII through Jack and a2jmidid (jack-alsa midi
 bridge). Sysex is

 Thanks a Lot!

 --
 Muranyi Andras

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



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


Re: [PD] Sysex out problems (linux only)

2009-07-07 Thread András Murányi
2009/7/8 Alex x37v.a...@gmail.com

  - sysex gets fragmented (also when nothing is sent out meanwhile by other
  objects). It is always properly terminated with '247' but the content is
  often truncated. Is this a bug/feature...? What is your best
 recommendation
  knowing that my patch is full of sysex outs (+envelopes on some of them!)
  - sysex just magically does not work on the target machine ;o) I have no
  clue why except for this thing with being truncated but it *never* works
  even if the message seems to go out intact. Even more interesting that
 the
  machine shows me that it is recieving sysex! Tried with the mpu-401 of an
  Audigy and with a MOTU 828 mkII through Jack and a2jmidid (jack-alsa midi
  bridge).



I haven't actually tested sysex out limits, but sysex in is limited to
 something like 24 byte messages..

 here is a thread where i talk about it:
 http://lists.puredata.info/pipermail/pd-list/2009-01/067372.html

 It is hard coded into the source. You can modify the source to change
 the hard coded limit.. i have a diff on that thread which shows how i
 did it.


Thanks Alex, it's an important thing to know.
My sysex is shorter than 24B it's just broken.
What we shall see repeating is 240 67 16 73 8 16 19 (knobvalue) 247

Instead I'm having this grinded mess coming back on physical loopback:

print: 240
print: 67
print: 16
print: 247
print: 240
print: 67
print: 247
print: 240
print: 67
print: 16
print: 247
print: 240
print: 67
print: 16
print: 73
print: 247
print: 240
print: 67
print: 16
print: 73
print: 8
print: 247
print: 240
print: 67
print: 16
print: 73
print: 247
print: 240
print: 67
print: 16
print: 247
print: 240
print: 67
print: 16
print: 247
print: 240
print: 67
print: 16
print: 73
print: 8
print: 247
print: 240
print: 67
print: 16
print: 247
print: 240
print: 67
print: 16
print: 73
print: 247
print: 240
print: 67
print: 16
print: 73
print: 247
print: 240
print: 67
print: 16
print: 73
print: 247

This makes me think I'm trying to send too much data in too short
intervals...? Is there a handy way to limit the density of my output? (i
think its not not [drip] as it has to stay realtime)
I'm not very experienced, sorry if this traces back to something very
obvious!

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


Re: [PD] Sysex out problems (linux only)

2009-07-07 Thread Alex
It looks like you may experiencing another thing that i've complained
about... pd's alsa midi connects to all MIDI inputs and outputs that
it can.. this includes alsa's MIDI through.. so everything that you
send out gets echoed back into the input.. SUPER annoying.

run aconnect [or easier, though not great, aconnectgui] and see if
that is the case for you.. disconnect pd from the alsa through port.

-Alex

2009/7/7 András Murányi muran...@gmail.com:

 2009/7/8 Alex x37v.a...@gmail.com

  - sysex gets fragmented (also when nothing is sent out meanwhile by
  other
  objects). It is always properly terminated with '247' but the content is
  often truncated. Is this a bug/feature...? What is your best
  recommendation
  knowing that my patch is full of sysex outs (+envelopes on some of
  them!)
  - sysex just magically does not work on the target machine ;o) I have no
  clue why except for this thing with being truncated but it *never* works
  even if the message seems to go out intact. Even more interesting that
  the
  machine shows me that it is recieving sysex! Tried with the mpu-401 of
  an
  Audigy and with a MOTU 828 mkII through Jack and a2jmidid (jack-alsa
  midi
  bridge).



 I haven't actually tested sysex out limits, but sysex in is limited to
 something like 24 byte messages..

 here is a thread where i talk about it:
 http://lists.puredata.info/pipermail/pd-list/2009-01/067372.html

 It is hard coded into the source. You can modify the source to change
 the hard coded limit.. i have a diff on that thread which shows how i
 did it.

 Thanks Alex, it's an important thing to know.
 My sysex is shorter than 24B it's just broken.
 What we shall see repeating is 240 67 16 73 8 16 19 (knobvalue) 247

 Instead I'm having this grinded mess coming back on physical loopback:

 print: 240
 print: 67
 print: 16
 print: 247
 print: 240
 print: 67
 print: 247
 print: 240
 print: 67
 print: 16
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 8
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 247
 print: 240
 print: 67
 print: 16
 print: 247
 print: 240
 print: 67
 print: 16
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 8
 print: 247
 print: 240
 print: 67
 print: 16
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 247
 print: 240
 print: 67
 print: 16
 print: 73
 print: 247

 This makes me think I'm trying to send too much data in too short
 intervals...? Is there a handy way to limit the density of my output? (i
 think its not not [drip] as it has to stay realtime)
 I'm not very experienced, sorry if this traces back to something very
 obvious!

 --
 Muranyi Andras

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



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


Re: [PD] Sysex out problems (linux only)

2009-07-07 Thread András Murányi
2009/7/8 Alex x37v.a...@gmail.com

 It looks like you may experiencing another thing that i've complained
 about... pd's alsa midi connects to all MIDI inputs and outputs that
 it can.. this includes alsa's MIDI through.. so everything that you
 send out gets echoed back into the input.. SUPER annoying.

 run aconnect [or easier, though not great, aconnectgui] and see if
 that is the case for you.. disconnect pd from the alsa through port.


I've checked and it's ok. Right now have the output looped back with a cable
but it only comes back once.


  This makes me think I'm trying to send too much data in too short
  intervals...? Is there a handy way to limit the density of my output? (i
  think its not not [drip] as it has to stay realtime)


What about dropping some data before making up / sending out the sysex? My
best guess was storing into [float] and firing it with [metro] or [pulse] at
a constant, decent rate.

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