First time here? Check out the FAQ!
x

Amplitude Tracking...

0 votes
309 views
Hi,

I'm using some of the tracking prototypes on a percussive instrument to trigger a MIDIOutputEvent.  What would I need for the Amplitude field of the MIDIOutputEvent?  How could I track the 'velocity' of the incoming audio signal to catch only the peak value, rather than the continuous amplitude envelope?

I'm sending the MIDI event data to an external hardware synth that's looking for a single velocity value per triggered note.

 

Thanks!!!
asked Mar 30, 2015 in Using Kyma by jackrosete (290 points)
reopened Mar 30, 2015 by jackrosete

2 Answers

+1 vote

It really depends on the sample you want to track but here's what I would try in this case:

Use the BiDiFollower prototype after the Sample to track the amplitude envelope, the individual Attack and Release control will be handy. Then insert a Difference prototype, I think by default this will add a 1 samp delay and will subtract the delayed input from the input. The output of the Difference prototype is your velocity. Now you could use a threshold prototype to filter out only the attack of each hit. Depending on your sample this can be difficult, sometimes you will trigger twice or soft attacks will not get triggered. You have to see what fits. Use the output of the threshold and multiply it with the output of the Difference using a Product. This way only the velocity values which exceed the threshold will pass. Paste that into your desired velocity parameter field.

Not in front of Kyma now but I this should work or at least give you a starting point...

ps. You will get an overall 1 sample delay for your velocity values but I think that's ok :)

answered Mar 30, 2015 by kymaguy (Virtuoso) (10,580 points)
Thanks for the ideas, lots of food for thought!
+1 vote

Here's an example of generating a MIDIOutputEvent gate and velocity by tracking the amplitude envelope of an audio signal.  In the same file there's also an example of triggering a Kyma Sound and assigning its amplitude based on the amplitude envelope of the audio signal.

The example generates a gate when the slope of the amplitude envelope is negative (when the percussive input is in the decay portion).  A RunningMax tracks the maximum value of the amplitude envelope and uses that as the amplitude (or velocity in the case of the MIDIOutputEvent).  For the Kyma Sound, the maximum amplitude goes through a TriggeredSampleAndHold.  But this is not needed for the MIDIOutputEvent as it automatically holds the value it had at the time of the Gate.

If you get some good results, please share them in the Community Library! smiley

answered Mar 31, 2015 by ssc (Savant) (116,410 points)
Thanks SSC, looking forward to trying out the sound!
Great Sound! Works like a charme!
...