Pages: [1]   Go Down
Author Topic: controlling a KORG monotron with an arduino (need help with analogue outputs.)  (Read 1723 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I am trying to get my arduino to interface a korg monotron (a small analogue synth that uses a ribbon softpot thing to create tones). The monotron uses a soft pot with 3 pins to control the key tones played. What I want to do is use an arduino to bypass the original softpot and control the monotron directly..
I have considered using a optocoupler to control the monotron, but from what I understand they are only very useful for digital control?
I am relatively a beginner with this sort of thing, but I am picking up stuff along the way. I just need to know what component I should use to interface these two devices. Sort of like an analogue optocoupler with 3 pins or something?...
Yeah… I'm learning, kinda././. smiley-razz




this im working with - testing with home made optocoupler with LED and Photoresistor... which really sucks.


thanks guys!  smiley-cool smiley-kitty smiley-fat smiley-roll smiley-roll-sweat smiley-mad smiley-grin smiley-mr-green
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

would one of these work?
i just found out about them..


http://littlebirdelectronics.com/products/digital-potentiometer-10k
Logged

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may find this helpful:
  Korg Monotron Synth Schematic.

From which it does indeed appear that the ribbon controller is a 10k potentiometer.

Happy circuit bending.
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12406
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Fortunately it looks like the Monotron is only sensing whether there's pressure on the sensor, not the amount of pressure.

The Vcc seems to be a nice handy 5V and this is placed across the softpot.  So all you need to do is synthesize a wiper voltage - using a LPF'd analog output might be enough - 5k and 10uF might be a start.
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thankyou for your advice. i wouldn't not of considered a LPF, nor did i know what one was!

i found this site very helpful in understanding: http://arduino-info.wikispaces.com/Analog-Output
i will let you know how my project goes.

thanks again, helpful community!





Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi again!

using a LPF worked out great for controlling the synth. now i am having problems with code.. basically what i want to do is have 10 analogue inputs from photoresistors which are bombarded with lasers. as each beam is broken i would like the program to change the resistance value to the monotron... effectively creating a laser keyboard.

I wrote this bit of code that responds well, but to only one input.

see video:
http://youtu.be/7-0HNpl-2oY

Code:
int analogInPin = A2;
 int analogOutPin = 9;
  // put your setup code here, to run once:
int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)

void setup() {

}

void loop() {
   // read the analog in value:
  sensorValue = analogRead(analogInPin);           
  if (sensorValue < 450){
  analogWrite(analogOutPin, 400); 
}
else{
  analogWrite(analogOutPin, 0);
}
}

and when i tried to add another input nothing seems to respond.
this was the code i ended up with:

Code:
int analogInPin1 = A2;
 int analogInPin2 = A3;
 int analogOutPin = 9;
  // put your setup code here, to run once:
int sensor1Value = 0;        // value read from the pot
int sensor2Value = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)

void setup() {

}

void loop() {
   // read the analog in value:
  sensor1Value = analogRead(analogInPin1);           
  if (sensor1Value < 150){
  analogWrite(analogOutPin, 400); 
}
{
   // read the analog in value:
  sensor2Value = analogRead(analogInPin2);           
  if (sensor2Value < 150){
  analogWrite(analogOutPin, 500); 
}
else{
  analogWrite(analogOutPin, 0);
}
}
}

what would be the best way to structure my code so that it could listen to these multiple inputs and only have one output?


thanks in advance.
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12406
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
using a LPF worked out great for controlling the synth. now i am having problems with code.. basically what i want to do is have 10 analogue inputs from photoresistors which are bombarded with lasers. as each beam is broken i would like the program to change the resistance value to the monotron... effectively creating a laser keyboard.
Glad you've got that working!

[ BTW The indentation/nesting is hard to follow in that last snippet ]

So to keep things easier to follow, how about read all the inputs, then decide what to do, then finally do it - much less scope for confusion than doing each in turn and let one overwrite the output of a previous one.  Since you have many inputs use an array to store the input values?
Logged

[ I won't respond to messages, use the forum please ]

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

  Since you have many inputs use an array to store the input values?
Although, as it is a monophonic synth, only a single output value can be sent.

But yes, the code needs to work out what to do if multiple beams are broken simultaneously. The code as structured at the moment results in 'highest note wins' which is fairly reasonable.
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 22
Posts: 1675
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
    I have converted a 5 dollar keyboard to drive an Arduino synth engine. In the very first tests using the monophonic tone library my code played each active key very breifly in rapid succession - it made for some interesting effects which you may want to have a go at in your own application.

Duane B

rcarduino.blogspot.com
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the help guys!
this is where it ended up:

http://youtu.be/msNLcZiJeQA
Logged

Pages: [1]   Go Up
Jump to: