Ardcore quantizer - how to customise note settings??

Discussion and Support for our Atmospheric Modification Devices.

Moderators: Kent, loss1234

Post Reply
User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Ardcore quantizer - how to customise note settings??

Post by dashwood » Wed Nov 12, 2014 8:08 pm

So I have and love the Ardcore (sorry,but why doesn't *everyone* with a euro system have one???..seriously,I don't get it), could anyone explain in VERY basic,layman terms how I would go about setting a custom note series in the AC02 quantizer sketch.

I've searched but couldn't find a straight,basic answer. Please bear in mind I don't have a clue about coding in arduino..and just don't have the time to learn anytime soon..

Many thanks fellas.. :tu:

User avatar
eclectics
Wiggling with Experience
Posts: 368
Joined: Sat Oct 05, 2013 10:32 am
Location: Melbourne

Post by eclectics » Fri Nov 14, 2014 8:57 am

AC02 just quantises to chromatic intervals; you want a way of selecting a subset of those.
I included a quantiser function in my multifunction sketch https://github.com/eclectics/ardcore/bl ... nction.ino

It allows you to select how many octaves and what sort of scale to use-- and its easy to add different scales. Each scale is represented as a 12 digit binary number which has a 1 if you want that note in the scale (using the keyboard as a reference, starting from c)
101011010101 is c major, 1s are white keys, 0s are black keys --not in the scale)

the multifunction sketch is hard to use without the expander-- im happy to pop the quantiser into a stand alone sketch if you're interested.

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Fri Nov 14, 2014 12:47 pm

Hey eclectics - thanks for the response,

Yep the AC02 is by default chromatic but I assumed there would be some way it could be tweaked within the Arduino code to select a scale..I guess that some of those numbers in the code tell it to make a certain level of CV into a 'G', for example..so therefore one could input different numbers to make it into a 'Gb'..no?..But as I said I don't have a clue about what's involved and perhaps (judging by responses so far!) this is more convoluted than I imagine..

Anyway,your sketch sounds perfect..and that scale selection process makes total sense.

I don't have an expander,so if you would be kind enough to put it into a stand alone sketch that would be massively appreciated...

Big thanks mate :tu:

User avatar
eclectics
Wiggling with Experience
Posts: 368
Joined: Sat Oct 05, 2013 10:32 am
Location: Melbourne

Post by eclectics » Fri Nov 14, 2014 8:29 pm

You could just get rid of some of the values in AC02-- there's 60 values corresponding to the 5 octaves that the ardcores 0-5v out can handle. Each 12 values is an octave so you can just remove the ones you don't want; then tell the sketch how many total there are. But this is somewhat error prone and inflexible.

I've added e22_quantiser to the above repository; here https://github.com/eclectics/ardcore/bl ... ntiser.ino
  • A0 is the selected scale from those you supply in the sketch.
    A1 is the octave range (from 1 to 5)
    A2 is the cv input -- probably set this fully CW so no attenuation; you can attenuate it, it will work like the range, but not in octave increments.
    And the DAC is your quantised cv output.
    D0 will flash when it changes.
It's got a bunch of comments inside the file on how to set up another scale.

Give it a go, let me know if there's any issues. Happy to explain any points if you want to tweak it.

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Fri Nov 14, 2014 9:22 pm

Ah thanks so much for that eclectics...will test it out right now and let you know how I get on :hyper:

super-appreciated :party: :sb: :tu:

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Fri Nov 14, 2014 11:11 pm

Hey Eclectics,

So had a little play and programmed in a couple of scales !!..very cool sketch and the note assigning is really well implemented..Great work and big thanks again for your effort... :yay:

However, I did find the tuning to be a little off on some notes...Is there any simple way to tighten it up on specific steps?

User avatar
eclectics
Wiggling with Experience
Posts: 368
Joined: Sat Oct 05, 2013 10:32 am
Location: Melbourne

Post by eclectics » Sat Nov 15, 2014 12:13 am

ah yes, the musical part ;-)

The dac gives us 0 to 255 for voltage out, which is 0-5v, and should map onto 60 notes, so it's a little more than 4 per interval

The notes array has the values I'm using for the quantisation-- I just rounded the values, and looking at it now, there's 61 values not 60. Oops.

You can see the values I'm using in the sketch here
byte notes[]={0,4,9,13,17,21,26,30,34,38,43,47,51,55,60,64,68,72,77,81,85,89,94,98,102,106,111,115,119,123,128,132,136,140,145,149,153,157,162,166,170,174,179,183,187,191,196,200,204,208,213,217,221,225,230,234,238,242,247,251,255};

if you do a slowly increasing ramp and use the chromatic scale you can identify which intervals need adjusting-- first 12 values are lowest octave, next 12 are next, and so on.
If you get it working better, please post your adjusted notes array and I'll fix it in the repository.

You can just adjust the relevant values up or down as necessary then recompile and reload the sketch.

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Sat Nov 15, 2014 1:26 pm

great!..will do some tweaking at some point over the weekend and let you know how I get on, thanks again..

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Sun Nov 16, 2014 7:41 pm

Hey Eclectics - Ok,so I've done some tweaking to the scaling and it's sounding heaps better tuning wise.

Just been programming in some arpeggios whilst feeding from a noise ring and it sounds great...love it !

I noticed your major scale setting was incorrect in the sketch,so I've corrected that too. Revised sketch attached.

Thanks mate :)

D
You do not have the required permissions to view the files attached to this post.

User avatar
eclectics
Wiggling with Experience
Posts: 368
Joined: Sat Oct 05, 2013 10:32 am
Location: Melbourne

Post by eclectics » Mon Nov 17, 2014 3:22 am

Thanks for that!
I've committed the changes to the repo.

Are you finding any values that are on the edge and bounce between notes? If so I can implement the dejitter function.

A3 isn't used by the sketch, so if you have any ideas let me know. I was thinking it could be used to set the base octave; then that could be changed via a control voltage, or just using the offset.

The ardcore us such fun... :love:

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Mon Nov 17, 2014 6:16 pm

No worries !

Yeah,it was doing that jittery thing a bit,not a huge amount just occasionally ..I didn't realise there was a de-jitter function..but if there is..yep,I think implementing it would be a good idea !

I don't have any better ideas for A3 off the top of my head,but If I do I'll def let you know.

One thing I did want to do - and this is more my musical OCD than anything else - We've still got a few more values to play with at the end after tuning (it now stops at 244 or something),so would it be possible to stick one more note on the end so we can get that final root octave in?...I'd sleep so much better.. :eek: :tu:

User avatar
eclectics
Wiggling with Experience
Posts: 368
Joined: Sat Oct 05, 2013 10:32 am
Location: Melbourne

Post by eclectics » Wed Nov 19, 2014 7:56 am

here's the sketch with a deJitter function. Just rename txt to ino to give it a go.

At the moment, you can always extend the set of notes, but the extra values would be ignored. I'm using A1 to read between 1 and 5 octaves for the range; if I increase it to 6 octaves there will only be a couple of notes in the last one. If we changed A1 to be the number of notes (irrespective of octaves) it would work

The important lines are these

Code: Select all

    numnotes=scalenotes*range;
...
    readnote=deJitter(analogRead(A2),readnote);
....
     note=map(readnote,0,1023,0,numnotes-1);
Scalenotes is just the number of notes in each octave.

So we're mapping the value in A2 to the set of scale notes determined by the octave range; so 5 octave pentatonic maps the value to between 0 and 24, whereas a 5 octave major scale maps it between 0 and 39, and the chromatic between 0 and 59. A 2 octave chromatic scale maps the same range of values to between 0 and 23-- so it's not really quantising any more, but quantising and mapping.

If we say there's 6 octaves, then the higher values will be mapped to notes that don't exist, because we only get a few notes in the last octave.

We can always check; if the value is too large, just return the highest note we can. Or we can change A1 from selecting number of octaves to selecting number of notes. What would be better?
You do not have the required permissions to view the files attached to this post.

User avatar
Ambriant
Common Wiggler
Posts: 67
Joined: Wed Dec 04, 2013 6:31 pm
Location: San Francisco

Thanks

Post by Ambriant » Fri Nov 21, 2014 7:09 pm

I've been wanting more than simply chromatic from the ardcore quantizer. Looks like my wish has been granted.

I tested the script against my simpleseq hex module and it was very fun and much easier to dial in a usable pitch. I'll run it along side a beatstep to see what accuracy I can get from it. Anyhow, maj/min modes are a great bonus!

Thanks for the hard work.

User avatar
dashwood
Common Wiggler
Posts: 156
Joined: Thu Aug 04, 2011 6:57 pm

Post by dashwood » Sat Nov 22, 2014 9:40 pm

eclectics wrote:here's the sketch with a deJitter function. Just rename txt to ino to give it a go.

At the moment, you can always extend the set of notes, but the extra values would be ignored. I'm using A1 to read between 1 and 5 octaves for the range; if I increase it to 6 octaves there will only be a couple of notes in the last one. If we changed A1 to be the number of notes (irrespective of octaves) it would work

The important lines are these

Code: Select all

    numnotes=scalenotes*range;
...
    readnote=deJitter(analogRead(A2),readnote);
....
     note=map(readnote,0,1023,0,numnotes-1);
Scalenotes is just the number of notes in each octave.

So we're mapping the value in A2 to the set of scale notes determined by the octave range; so 5 octave pentatonic maps the value to between 0 and 24, whereas a 5 octave major scale maps it between 0 and 39, and the chromatic between 0 and 59. A 2 octave chromatic scale maps the same range of values to between 0 and 23-- so it's not really quantising any more, but quantising and mapping.

If we say there's 6 octaves, then the higher values will be mapped to notes that don't exist, because we only get a few notes in the last octave.

We can always check; if the value is too large, just return the highest note we can. Or we can change A1 from selecting number of octaves to selecting number of notes. What would be better?

Hey Eclectics..apologies for delay..been super-busy..and ill !! :zombie:

Was reading your previous post last night with the sketch open..and I don't completely understand to be honest..but also,it sounds like a lot of faff to add one extra note..so,with all that in mind..albeit quite vaguely...I reckon I can learn to live with it ending on the 7th!..and please ignore my unreasonable demands.. :mad: :mrgreen:

Have downloaded the de-jittered version..thanks for that mate..sounds great so far.

..I've attached a slightly revised version which includes some basic arpeggio settings I added if you want to stick those in your main sketch..

Thanks again..and keep fighting the good fight !!
You do not have the required permissions to view the files attached to this post.

User avatar
djthopa
Super Deluxe Wiggler
Posts: 1721
Joined: Thu Mar 22, 2012 5:48 pm
Location: Somewhere between a nappy and a wire

Hi! Hope you can help cant work e11_multifunction

Post by djthopa » Thu Feb 07, 2019 1:29 pm

meant to be a pm :ripbanana:

Post Reply

Return to “SNAZZY FX”