Kyma Forum
  Kyma Support
  Recording pitches for random access

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Recording pitches for random access
Phi Curtis
Member
posted 09 August 2006 02:45         Edit/Delete Message   Reply w/Quote
Hi,

I have an idea of what I want to do, but need some ideas for getting there.

I would like to record incoming notes from audio input going through a pitch follower into a table and then be able to randomly access those pitches within the frequency field of whatever module I want (the way that I could use an expression that reads into an array with a random index). So I suppose I could record into a memory writer, but what then? A TriggeredTableRead I think would allow me to access the notes only in order, not randomly. Maybe a Waveshaper with noise as an input? But how to read one value at a time?

Thanks for your ideas...

Phil

IP: Logged

SSC
Administrator
posted 09 August 2006 08:06         Edit/Delete Message   Reply w/Quote
One thought on separating the notes: a threshold trigger for amplitude and possibly a measure of how much the frequency has changed. You could experiment with feeding the frequency estimate into an Equals and comparing it to itself delayed by 1 ms; the Equals module has a tolerance parameter so you could try singing into the microphone and watching the output of the Equals on the Oscilloscope as you adjust tolerance until it detects changes in "note".

IP: Logged

SSC
Administrator
posted 09 August 2006 08:19         Edit/Delete Message   Reply w/Quote
The best way to capture the output of the FrequencyTracker might be a shift register idea. For example, look at one of the shift registers at: http://www.symbolicsound.com/cgi-bin/bin/view/Share/Sounds#Control_and_Modulation

But you would want a simpler one without any nonlinear or linear feedback. You would capture the output of a FrequencyTracker with the first sample and hold, then when you captured the next "note", the first value would be shifted into the next cell, and so on.

IP: Logged

Phi Curtis
Member
posted 10 August 2006 22:11         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
You would capture the output of a FrequencyTracker with the first sample and hold, then when you captured the next "note", the first value would be shifted into the next cell, and so on.

Hi SSC,

Thanks - I think I understand what you mean. You're suggesting that I save the values into a series of global controllers that cycle through all the values, (the values move left to right as new values come in), constructed via a script, as in the Embrace the Artifact sounds?

Phil

IP: Logged

pete
Member
posted 11 August 2006 08:36         Edit/Delete Message   Reply w/Quote

RamWriteandread.kym

 
Hi Phi

Another way of storing and retrieving a quantity of 24 bit values in random order is by using the step writer in Pete's DSP modules. The attached sound shows how it could work, but it is frighteningly big. Don't worry most of this is there just to display what's happening inside and for the user interface. Really you would probably only need one step writer and a wave shaper, and maybe an up down counter if you wanted to store them in sequence. This example show's how you could randomly store and retrieve only 100 values but the real limit is about 4 million values on one chip (if that's enough).

Hope it helps

Pete.

[This message has been edited by pete (edited 11 August 2006).]

IP: Logged

SSC
Administrator
posted 12 August 2006 11:19         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Phi Curtis:
Hi SSC,

Thanks - I think I understand what you mean. You're suggesting that I save the values into a series of global controllers that cycle through all the values, (the values move left to right as new values come in), constructed via a script, as in the Embrace the Artifact sounds?

Phil


Yes. The idea is that you can use sampleAndHold "cells" as memory. Once you have filled the cells, you would stop the "shifting" and randomly access the captured hot values using a random index into an array of those values.

IP: Logged

Phi Curtis
Member
posted 12 August 2006 19:58         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by pete:
Another way of storing and retrieving a quantity of 24 bit values in random order is by using the step writer in Pete's DSP modules.

Hi Pete,

Thanks! I had a feeling when I wrote the question that one of your modules probably held the answer. I'll take a look and let you know how it works out (maybe post something on the Tweaky)

Phil


IP: Logged

Phi Curtis
Member
posted 12 August 2006 20:01         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
Once you have filled the cells, you would stop the "shifting" and randomly access the captured hot values using a random index into an array of those values.

Or maybe just keep the cells cycling - one of the applications I was thinking of was accompanying a melodic soloist with some of their most recently played notes - but then being able to stop the cycling and hang out on a harmony would be good, as well as dynamically changing the number of pitches that are being selected between.

IP: Logged

Phi Curtis
Member
posted 16 August 2006 20:42         Edit/Delete Message   Reply w/Quote

TrackedPitchToStepwriter.kym

 
Hi,

I thought you might be interested to see how I'm coming with this idea. I used Pete's example (Thanks Pete!) combined with SSC's tracking suggestion. I'm using my idea of being able to vary the number of cells that I'm recording into (via the !Mod fader)

There are a couple issues I'd like to ask about:

I quite like the current behavior in terms of the effect of the !Tolerance fader, but it's a little hard to get a handle on. The setting seems to influence what octave the pitch is tracked in, and the places where pitch changes are detected is a little unpreditable. What might be some other ideas for determining when new notes should be detected (and stored into the Stepwriter)?

Secondly, I'd like to be able to generate the !Addr# global controllers via a script (so that I can vary the number that are generated before compiling by changing one number in the script do: function). I can't seem to get the syntax right in terms of getting the sounds feeding into each other - I've included an attempt, but it hasn't gotten far. I need the chain of three sounds replicated with each pass through the do: loop.

Thanks for your ideas.

Phil

[This message has been edited by Phi Curtis (edited 16 August 2006).]

IP: Logged

pete
Member
posted 21 August 2006 08:31         Edit/Delete Message   Reply w/Quote
Hi Phil

I can't answer all your questions but the pitch detector can only handle sampled sounds with a single note and not the three part chords in the sound you are trying to decode here. I thought that your original idea was to juggle the order such that they came out in a random order but not so random that any cell would be repeated more that once i.e each cell is played once and only once but in a random order. John Cowan did an algorythm that did just this, though he used it for a different task. See Link
http://www.symbolicsound.com/cgi-bin/forumdisplay.cgi?action=displayprivate&number=3&topic=000111

This technic may help out with other problems as well.

Hope it helps Pete

BTW the sample you used was made by a single voice being put through two delays but there is a technic that can almost cancel out those delays giving the original raw signal ( if you use the complete un edited version that is). If you wish I'll send you the modules.

IP: Logged

pete
Member
posted 21 August 2006 09:22         Edit/Delete Message   Reply w/Quote

reorder3.kym

 
oops

The pete adjusted version of the sound in the original post is not working

Here's a working one Attached

IP: Logged

Phi Curtis
Member
posted 21 August 2006 13:36         Edit/Delete Message   Reply w/Quote
Hi Pete,

You're right, that was a poor choice of sample to attempt to track - I chose it because the direction of the melodic line made it easier to hear how the randomly chosen pitches were following the descent of the line. A better choice from the Kyma library might be "c min melody."

I am beginning to realize that the problems in detecting new notes does have more to do with adjusting the FrequencyTracker parameters (and of course using proper source material...) than it does with problems with the equality method SSC suggested (and the really tiny adjustments of the tolerance parameter that make a big difference there).

What complicates matters is that I want to use this with live input from improvisors, and the FrequencyTracker parameters aren't adjustable on the fly. But luckily I have a high tolerance for misinterpreted tracking - that could be interesting in its own right.

quote:
Originally posted by pete:
I thought that your original idea was to juggle the order such that they came out in a random order but not so random that any cell would be repeated more that once i.e each cell is played once and only once but in a random order.

I hadn't actually gotten that far yet, but that is an interesting idea - I'll check it out. I do get a lot of double triggers with the equality method, so I also want to figure out a way of filtering those out before they get into the cells.

Other ideas I have started to look at are tracking durations as well, and also calculating the melodic or intervals that are being played, with the purpose of then altering the intervals or durations on playback - but then if a lot of extraneous tracking-error related notes are there to begin with, it will get very abstracted from the input very quickly.

quote:
Originally posted by pete:

BTW the sample you used was made by a single voice being put through two delays but there is a technic that can almost cancel out those delays giving the original raw signal ( if you use the complete un edited version that is). If you wish I'll send you the modules.

I'd love to see it, although I probably won't understand it :-)

Thanks,
Phil


IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c