If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
polyphonic randomisation
8 posts
• Page 1 of 1
polyphonic randomisation
I'm still working on my 'Virtual Pipe Organ' generator; coming on well and I promise to put something up as soon as it's presentable
However there's one element I desperately want to add and the method is eluding me.
I'm after a high-speed random generator to apply polyphonically, such that if you are playing, say, a four-note chord, then the pitch (& amplitude) of each of the four notes will be modulated by an independent random stream.
Only a microscopic shift, you understand, to mimic the turbulence that occurs naturally in the wind supply, but it 'unlocks' each note to make it truly independent. (Actually real organ pipes have a genuine tendancy to 'snap' in and out of phase-lock with each other, but that one's for a future enhancement once I've cracked this bit!)
Worth noting that exactly the same thing applies to a quartet of human players - violins, trumpets or whatever - physically impossible for humans to blow as steadily as a fixed digital oscillator (thank goodness) so free-phase vibratos and randomisations are most important for creating naturalness.
I've found several methods of generating a random stream, but not a polyphonic version.
Can anyone point me in the right direction?
However there's one element I desperately want to add and the method is eluding me.
I'm after a high-speed random generator to apply polyphonically, such that if you are playing, say, a four-note chord, then the pitch (& amplitude) of each of the four notes will be modulated by an independent random stream.
Only a microscopic shift, you understand, to mimic the turbulence that occurs naturally in the wind supply, but it 'unlocks' each note to make it truly independent. (Actually real organ pipes have a genuine tendancy to 'snap' in and out of phase-lock with each other, but that one's for a future enhancement once I've cracked this bit!)
Worth noting that exactly the same thing applies to a quartet of human players - violins, trumpets or whatever - physically impossible for humans to blow as steadily as a fixed digital oscillator (thank goodness) so free-phase vibratos and randomisations are most important for creating naturalness.
I've found several methods of generating a random stream, but not a polyphonic version.
Can anyone point me in the right direction?
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: polyphonic randomisation
Write this code into an assembler and it will output a random stream for every voice, between 0 and 1. Or whatever number you set in the brackets.
- Code: Select all
streamout out;
float rand[1]=rand(0,1);
movaps xmm0,rand;
movaps out,xmm0;
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: polyphonic randomisation
Well, Adams method will give you a (different) random number for each voice. If you want to have uncorrelated streams of random numbers for each voice, you can use that number as a seed for a (pseudo) random number generator. I have attached a fairly efficient such white noise generator.
- Attachments
-
- whitenoise.fsm
- (855 Bytes) Downloaded 934 times
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: polyphonic randomisation
Many thanks Martin (and Adam), definitely heading in the right direction. With suitable attenuation this addition brings the voices to life.
I wish I knew more about assembler! (I'll re-phrase that .. I wish I knew anything about assembler ) Arduino Man, me.
I get the feeling that I could do with exactly this process but acting much more slowly, so that it produces a 'run-around' the central note frequencies rather than a rapid noise modulation. Would some kind of rate control be easy to implement?
Most grateful for your help. My basic design is finally working pretty well but these subtle modulations are clearly raising the bar.
I wish I knew more about assembler! (I'll re-phrase that .. I wish I knew anything about assembler ) Arduino Man, me.
I get the feeling that I could do with exactly this process but acting much more slowly, so that it produces a 'run-around' the central note frequencies rather than a rapid noise modulation. Would some kind of rate control be easy to implement?
Most grateful for your help. My basic design is finally working pretty well but these subtle modulations are clearly raising the bar.
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: polyphonic randomisation
You could "hop" the processing, i.e. do the iteration only every n samples. Alternatively you could lowpass it. Depends on what exactly you want to use it for.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: polyphonic randomisation
Given that I know nerrthing about assembly, I've empirically arrived at this, which I assume creates a hop 32.
It certainly seems to do the trick for what I want - have I got things in the right order?
I already have a built in octave-by-octave scaling system, so it's relatively easy to set the correct proportions of modulation, these things are always very pitch dependant.
I promise to do some serious studying
Hugh
It certainly seems to do the trick for what I want - have I got things in the right order?
I already have a built in octave-by-octave scaling system, so it's relatively easy to set the correct proportions of modulation, these things are always very pitch dependant.
I promise to do some serious studying
Hugh
- Attachments
-
- noise_by_martinvicanek_plus_hop.fsm
- (763 Bytes) Downloaded 922 times
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: polyphonic randomisation
You are progressing fast, almost there! Try the attached.
- Attachments
-
- noise_by_martinvicanek_plus_hop.fsm
- (794 Bytes) Downloaded 924 times
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: polyphonic randomisation
Excellent, works well. I'm so grateful.
I've found that following it with a 'slew limiter' component, plus some attenuation, perfects the job.
So there's my Teach Yourself Assembler Lesson 1 assignment right there ..
Add the lines of code required to incorporate a variable envelope follower and a variable attenuator
I've found that following it with a 'slew limiter' component, plus some attenuation, perfects the job.
So there's my Teach Yourself Assembler Lesson 1 assignment right there ..
Add the lines of code required to incorporate a variable envelope follower and a variable attenuator
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 59 guests