[PD] How to add/remove MIDI notes from a list using MIDI in and note on/off?

JC Pedroza nemesis4go10 at hotmail.com
Thu Nov 13 01:04:17 CET 2014


You are not wasting anyone's time. On the contrary, and I really appreciate your time and help.

This fix broke the patch further! Now it doesn't work at all. It adds each note to the list twice. When working with one note at a time it doesn't remove the note at all (pressing and releasing one note keeps populating the list without removing the note on release). And when working with multiple notes pressed at a time it doesn't always remove all the notes from the list on release.

You are facing the exact same bugs and issues I found while trying to build a solution. 

----------------------------------------
> Date: Wed, 12 Nov 2014 19:36:39 +0100
> From: colet.patrice at free.fr
> To: nemesis4go10 at hotmail.com; pd-list at iem.at
> Subject: Re: [PD] How to add/remove MIDI notes from a list using MIDI in and note on/off?
>
>
> Hope I'm not wasting your time by trying to resolve this question, it's
> just a fun to give a try by using only vanilla objects.
>
> I've made a big mistake in patching, and corrected it by reversing the
> [list-find] inlets, sorry for that.
> Correction and improvements are attached.
>
>
> Le 12/11/2014 12:19, JC Pedroza a écrit :
>> You are right, I forgot to include the details! I'm very sorry.
>>
>> I need this for a sequencer/synth that queries the list for a random note, at random times, in a given time range. That random note is then used to set the frequency of a synth (from an array of synths). It's a bunch of randomness.
>>
>> At the start I was just writing the values into the list, but eventually wanted something more dynamic.
>>
>> The idea is for the input to be any MIDI input. DAW, sequencer, external MIDI keyboard, whatever. Anything that inputs MIDI note messages. By "notes being pressed" I just mean MIDI note-on. The rate of notes pressed is the more the better just for having the option to go crazy, but a rate of a "very fast human" should be more than enough.
>>
>> You can find the sequencer/synth in question here: http://github.com/JCPedroza/puredata/tree/master/synths/Cloud1 . Cloud1 is the main patch, and synthcell is a synthesizer abstraction. You can find my solution to the list of MIDI note-on in subpatch path: [pd Cloud1] / [pd freq_list] / [pd list-MIDInoteon] .
>>
>> ----------------------------------------
>>> Date: Wed, 12 Nov 2014 11:38:52 +0100
>>> From: lorenzofsutton at gmail.com
>>> To: pd-list at lists.iem.at
>>> Subject: Re: [PD] How to add/remove MIDI notes from a list using MIDI in and note on/off?
>>>
>>>
>>> On 11/11/2014 13:53, JC Pedroza wrote:
>>>> 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.
>>> Just a side comment as various people already responded.
>>>
>>> In theese cases it would help to describe your use case with as much
>>> detail as possible, unless the question is really trivial.
>>> If you explain _why_ you want to store/remove incoming midi notes in a
>>> list it helps because maybe there is a different/similar approach to
>>> ahieve the same result... Otherwise people (like e.g. patrice) have to
>>> guess what the scenario is and without detailed background it's really
>>> difficult.
>>>
>>> - Where are the midi notes being pressed? An external midi keyboard?
>>> - What is the list of (pressed) midi notes used for?
>>> - What's your expected rate of notes pressed e.g. per second (one, tens,
>>> houndreds, millions??)
>>>
>>> etc. etc.
>>>
>>> :-)
>>> Lorenzo.
>>>> 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.
>>>>
>>>> I think I need [list-extend], [list-find], and [list-delete], but I just can't figure out an implementation.
>>>>
>>>> How can I do this?
>>>> _______________________________________________
>>>> Pd-list at lists.iem.at mailing list
>>>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>>>
>>> _______________________________________________
>>> Pd-list at lists.iem.at mailing list
>>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
 		 	   		  


More information about the Pd-list mailing list