mozzmo VCO 1V/oct

378 views
Skip to first unread message

HOFFMAN Raphaël

unread,
Mar 24, 2015, 5:31:39 AM3/24/15
to mozzi...@googlegroups.com
Hello,

Here is a little sketch to use with "mozzmo", it plays correct notes on 5 octaves (with a vc keyboard or sequencer).

It include : 
5 wave forms : sine, tri, saw, square, noise.  
cv entry.
range setting : you can choose the referencial octave then you can cover all the octave (5v simultaneously).
 
I joined a file to this message with the arduino files.
Feel free to test it, suggest improvements or post code's improvements.

Raphaël


vco.rar

Jean-Luc Deladrière

unread,
Mar 25, 2015, 3:17:18 AM3/25/15
to mozzi...@googlegroups.com
Hi Raphaël,
I've copied all the code into one but It gives almost no sound

I needed to update return (int)sig<<6; for HIFI mode

btw I think you can only do this with the same length table (2048 or 8192)


void chooseWave()
{
  waveNumber = map(mozziAnalogRead(pot2),0,1023, 5, 0);
  switch (waveNumber)
  {
    case 0:
      mainVCO.setTable(SIN2048_DATA);
      break;
     case 1:
      mainVCO.setTable(TRIANGLE2048_DATA);
      break;
    case 2:
      mainVCO.setTable(SAW2048_DATA);
      break;
    case 3:
      mainVCO.setTable(SMOOTHSQUARE8192_DATA);
      break;
    case 4:
      //noise.setTable(WHITENOISE8192_DATA);
      break;
  }
  
}


so you can't mix both 
I read this somewhere but can't find it (anyone to confirm ?)

Also changing wave with the pot are not easy

why don't you just do :

void updateControl()
{
chooseOctave();
chooseWave();
controlPitch();
}


Cheers,
Jean-Luc

HOFFMAN Raphaël

unread,
Mar 25, 2015, 2:14:23 PM3/25/15
to mozzi...@googlegroups.com
Oh sorry, I believe I make a saving error (i ahd two VCO sketches opened) just befor compress and upload it.
I update my code and repost it really sorry.

Raphaël

HOFFMAN Raphaël

unread,
Mar 26, 2015, 1:27:05 PM3/26/15
to mozzi...@googlegroups.com
Here is a sketch that work for me, differents lenght oscilllator are not mixed and it include comment that explain how ot works.
 

Le mardi 24 mars 2015 10:31:39 UTC+1, HOFFMAN Raphaël a écrit :
vco.rar
Reply all
Reply to author
Forward
0 new messages