I was
thinking that storing a list of midi events is useless since
[poly] can handle the whole process, but I might be confused,
sorry for that...
Maybe attached patch is what you are looking for.
PS: I've replaced [zl rev] with
[swap]
| |
[pack]
because I don't know where [zl rev] come from, it's not part of
pd-vanilla.
less external in patching, less problem in porting
Anyway the particular method you are trying to do could be
achieved with the help of [textfile]
Le 12/11/2014 03:20, JC Pedroza a écrit :
I understand what poly does, what I don't
understand is how it helps to solve this problem.
Sorry for any confusion.
----------------------------------------
Date: Wed, 12 Nov 2014 02:15:54 +0100
From: colet.patrice@free.fr
To: nemesis4go10@hotmail.com; pd-list@iem.at
Subject: Re: [PD] How to add/remove MIDI notes from a list
using MIDI in and note on/off?
I don't understand why not doing this:
[notein]
| |
[poly]
It seems to be the same thing.
from [poly] help file:
"The [poly] object takes a stream of pitch/velocity pairs and
outputs
triples containing voice number, pitch and velocity.
You can pack the output and use the route object to route
messages
among a bank of voices depending on the first outlet.
[poly] can be configured to do voice stealing or not (the
default.)"
Le 12/11/2014 00:13, JC Pedroza a écrit :
Right now I'm handling MIDI note
on/off like this:<br><br><div
id="inlineImage0" style="display:
inline-block"><script
type="jsv#1086_"></script> <span
contenteditable="true"> </span> <div
style="display: inline-block" unselectable="on"
contenteditable="false" class="inlineImage" initheight="257"
initwidth="377"><img src="cid:inlineImage0"
height="257" width="377"></div> <span
contenteditable="true"> </span><script
type="jsv/1086_"></script></div><br>(also
including this file as
attachment)<div><br></div><div>The
idea for now is that left outlet (note on) adds the MIDI
note to the list, and right outlet (note off) deletes that
note from the list. <span style="font-size:
12pt;">That's where I'm stuck at the
moment. </span><span style="font-size:
12pt;"> Can [poly] help me implement that
logic? </span></div><div><br></div><div>I'm
using [list-extend] to add the notes to a list, but I can't
figure out how to remove the note from the list once the key
is released (note off). I think I need to use a combination
of [list-find] and [list-delete], but I can't make make it
work.</div><div><br></div><div><br></div><div>----------------------------------------<br>>
Date: Tue, 11 Nov 2014 23:23:22 +0100<br>>
From: colet.patrice@free.fr<br>> To:
pd-list@lists.iem.at<br>> Subject: Re: [PD] How
to add/remove MIDI notes from a list using MIDI in and note
on/off?<br>><br>>
hi,<br>> what about using [poly]
instead?<br>><br>><br>>
Le 11/11/2014 13:53, JC Pedroza a écrit :<br>>
> I need to populate a list with the MIDI notes that
are being pressed, and remove the note from the list when
the key is released.<br>>
><br>> > One idea is to use
[notein], and if the velocity is> 0 then add the note
to the list, and if the velocity == 0 then remove the note
from the list. But I have no idea of how to implement
this.<br>> ><br>> >
I think I need [list-extend], [list-find], and
[list-delete], but I just can't figure out an
implementation.<br>> ><br>>
> How can I do this?<br>> >
_______________________________________________<br>>
> Pd-list@lists.iem.at mailing list<br>>
> UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list<br>><br>><br>>
_______________________________________________<br>>
Pd-list@lists.iem.at mailing list<br>>
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list<br></div>
_______________________________________________
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