Midi Velocity Shuffler

Post your groups/layouts here

Moderators: davidv, seb@plogue

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Midi Velocity Shuffler

Postby jersmi » Fri Jun 03, 2011 5:17 pm

This functions like the Note Shuffler only for velocity.
Probably should be a feature request because of dsp usage with poly/number of voices. (If there's a better way, let me know!)

Edit: this produces some buggy artifacts: stray notes, notes not closing, dropped notes. Is the Polyphonic Adapter the culprit?
Attachments
Velocity Shuffler.bgrp
(20.39 KiB) Downloaded 313 times

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Sun Jun 05, 2011 4:24 pm

Trying to suss out any strangeness with the polyphonic adapter. This pic shows the method I'm using for random velocity per voice. Specifically regarding the Note Extractor gate/trigger to the Random oscillator and the Sample and Hold -- is this a reasonable way to get the poly adapter to always generate new random values for each voice? Here I'm fuzzy -- would it make any difference to use Note Extractor trigger to sample and hold a Noise signal for random value?
Attachments
Screen shot 2011-06-05 at 2.21.12 PM.jpg
Screen shot 2011-06-05 at 2.21.12 PM.jpg (33.14 KiB) Viewed 8797 times

boonier
Posts: 986
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Midi Velocity Shuffler

Postby boonier » Sun Jun 05, 2011 6:12 pm

Hi

I don't generally use the Random oscillator, for some reason it just feels a bit imprecise tho that is based on absolutely no fact. I just like the Noise S/H combo. (I actually created a sdk plugin that generates random values on trigger if you fancy it?)

Stray notes, notes not closing, dropped notes sounds like something outside of the group. THe poly adapter is a dark-art it seems as I've tried (unsuccessfully so far) to replicate in the sdk for a plugin I'm working on. But generally incoming velocity (and whatever is happening inside the group) doesn't affect how the poly adapter dispatches voices in my experience.

hope this helps?!

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Sun Jun 05, 2011 8:50 pm

how the poly adapter dispatches voices

this gets to my question, i think. how does the poly adapter determine order of events if multiple notes come in at the same time?

Here's my midi test layout (same layout used for the Quartz Composer visualizer). I can't see anything suspicious, could be wrong, of course. My problems seem to revolve around getting the poly adapter to behave (yes, the dark art of the poly adapter :) )

And yes, I'd love to have a look at your random number generator plugin!
Attachments
MidiTester3.bidule
(107.01 KiB) Downloaded 293 times

boonier
Posts: 986
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Midi Velocity Shuffler

Postby boonier » Mon Jun 06, 2011 5:57 am

how does the poly adapter determine order of events if multiple notes come in at the same time?


This is a Seb question for sure. I dont have time to look at your attached layout right this second :/

Here's that plugin:
TrigRand.zip
(50.03 KiB) Downloaded 335 times


actually there's 2. RandTrig outputs integers and RandTrigF outputs a float between -1 and 1

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: Midi Velocity Shuffler

Postby seb@plogue » Mon Jun 06, 2011 9:16 am

how does the poly adapter determine order of events if multiple notes come in at the same time?


Even if they arrive at the same time, they are still in some order and that order should normally be kept inside Bidule.
That shouldn't affect the Polyphonic Adapter unless you get in a situation where the multiple notes coming in at
the same time + any currently opened voices > number of voices set in the Polyphonic Adapter.

Do you have the Note Extractor set up to not use gliding on the note and amplitude? Otherwise you could have the creator creating extra notes.

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Mon Jun 06, 2011 10:26 am

Awesome, boonier, thanks.

Seb, I had Note Extractor glide set to default 1 ms. I'll set it to 0 and see what happens.

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Mon Jun 06, 2011 6:23 pm

seb@plogue wrote:Even if they arrive at the same time, they are still in some order and that order should normally be kept inside Bidule.

How does the poly adapter know what order if say 120 voices arrive at once from the Step Sequencer?

Say I want a poly group with a midi delay on output, with a different delay per voice. Here input, as you say, would be in some order (what?), then it seems like I could use the 120 triggers for 120 separate delay times? Are the triggers for each voice simultaneous or one per sample? Once again, what order?

seb@plogue wrote:That shouldn't affect the Polyphonic Adapter unless you get in a situation where the multiple notes coming in at
the same time + any currently opened voices > number of voices set in the Polyphonic Adapter.

With generative stuff I can be in this situation, sure, ie, more notes than voices. I can limit, sure, but limits make me sad.

The real issue is how it appears that when I get the poly adapter involved, things get unstable.

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: Midi Velocity Shuffler

Postby seb@plogue » Tue Jun 07, 2011 9:01 am

How does the poly adapter know what order if say 120 voices arrive at once from the Step Sequencer?


Assuming there are 120 MIDI events on the same sample inside the buffer there is still an order but that order would most
likely depend on the implementation of the sender. The core step sequencer code is really ancient code but IIRC
the order would be ascending channel and note number and unless there was a missed case, Bidule will
keep the original order for events with the same sample index when sorting :

Chn 0 Note 12
Chn 0 Note 23
Chn 1 Note 8
Chn 2 Note 43
Chn 3 Note 1

Are the triggers for each voice simultaneous or one per sample? Once again, what order?


Events are dispatched to voices in the order they come in then voices are processed sequentially at buffer size.

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Tue Jun 07, 2011 11:57 am

Okay, that's straightforward and helpful. Thanks again.

boonier
Posts: 986
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Midi Velocity Shuffler

Postby boonier » Tue Jun 07, 2011 12:25 pm

As I understood it Jersmi, you were stating that if for example a bunch of the same notes arrived at the same time then you get dropped notes. This can happen in algorithmic patterns for sure. As I understand the poly adapter, notes are dispatched with a key (in this case the note number) and the adapter uses this to manage the duration of the voice, so when voice A receives a note off, only then will it release that key back to the pool.

Could this be why you experience the 'dropped' notes? As it receives a note on and note off for the same key in the same buffer? I feel that sometimes poly adapter needs a round robin number instead of midi note to attach as a key, so that events are carried out regardless, this would allow for 2 of the same notes to sound at the same time.

...or am I totally off the mark?

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Tue Jun 07, 2011 1:07 pm

On the mark, boonier. I get dropped notes and notes that don't close (until the next note on + note off for open note).
I'm trying to find a way to understand and work with the adapter, but I don't quite get yet why it messes up what I send it. I'm not quite sure what to ask. I wonder if there's something related about the activity gate and how it operates, how it waits for everything to finish.

The "round robin" method makes good sense.

Here's imagining a scenario, just speculating, I'm sure it'd take a different route in practice:
Say I send for example, 12 notes to the poly adapter, all at the same time, all note# C3. Can I get this to work as different voices? Maybe by sending different note #'s then transposing each voice, I guess. Then have those notes diverge in pitch microtonally (LFO or whatever). Then note off's come at different times. Then more of the same note(s), overlapping note on/off's in various ways. I feel like this would break the poly adapter, though I should try it.

boonier
Posts: 986
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Midi Velocity Shuffler

Postby boonier » Tue Jun 07, 2011 5:10 pm

jersmi wrote:Can I get this to work as different voices? Maybe by sending different note #'s then transposing each voice, I guess. Then have those notes diverge in pitch microtonally (LFO or whatever). Then note off's come at different times. Then more of the same note(s), overlapping note on/off's in various ways. I feel like this would break the poly adapter, though I should try it.


Seems like a bit of ball-ache for something that should be simple....unless you have a trick up your sleeve? I'd like to see what you mean as I'm not sure I fully follow maybe.

I guess there is nothing intrinsically wrong with the current model; its pretty solid for most uses. Sometimes you want a little more functionality - to break out of the 'midi' paradigm and get a bit more programmatic and efficient. Hence my hullabaloo with making a new note creator/extractor in the sdk. I just makes sense to me to use the benefits of poly adapter for generating lots of instances of one group and distributing a number of parameters to them. I guess the parallel in programming world is a function with a load of arguments and calling that function. The other audio languages( Chuck, supercollider , PD, Max) use this concept well

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: Midi Velocity Shuffler

Postby jersmi » Tue Jun 07, 2011 8:12 pm

boonier wrote:just makes sense to me to use the benefits of poly adapter for generating lots of instances of one group and distributing a number of parameters to them. I guess the parallel in programming world is a function with a load of arguments and calling that function. The other audio languages( Chuck, supercollider , PD, Max) use this concept well

This is where my head's at. The poly adapter's probably not broken, I just want to turn it into a more basic multi-purpose tool, I guess.

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: Midi Velocity Shuffler

Postby seb@plogue » Wed Jun 08, 2011 9:05 am

Doing another version of a "polyphonic" adapter would require the end user to manage UIDs for "voices", I'm not sure how that would work.


Return to “Bidule Layouts”

Who is online

Users browsing this forum: No registered users and 1 guest