Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Project Guidance / Re: Library for PC Joysticks on: October 21, 2013, 10:49:00 am
mmh, does that mean this cant be done?
I guess i would need a mega anyway, because of the 15 Pins a josystick has.
I would like the ouput an on/off signal at 12V for the Buttons and a -8V - 8V for movement of the joystick.
2  Using Arduino / Project Guidance / Library for PC Joysticks on: September 14, 2013, 10:09:56 am
Hello,

is there a way to connect an old PC Joystick (the one with 15 pins) to an arduino board?
Maybe someone wrote already a library for that.

I would like to read the data like direction, button press an so on and convert this information
into control voltages, used by a musical synthesizer.

greetings
3  International / Deutsch / arduino zum simulieren von PC Tastaturtasten on: December 05, 2012, 04:16:54 am
Hallo,

kann ich mit dem Arduino bestimmte Tasten wie 1,2,3,4 einer PC Tastatur simulieren.

Es geht darum ein kleines Interface für reaktionstests zu basteln, der Nutzer soll zu einem bestimmten Zeitpunkt eine bestimmte Taste drücken.

Würde ich den normal USB Port des arduino dafür nutzen können?


vielen Dank

rupi
4  Using Arduino / Audio / Re: quantizing midi notes on: January 12, 2012, 01:17:08 am
Well,
i ment i updated the above post with more comments, but here we go again:


i read a value from a potentiometer, put the value into an array " AnalogValue[stepnr] ", divide that by 8 and
put it into another array "note[stepnr]", which represents the note to be played(this one I want to quantize),
than i simply sent that note to the serial port, which is connected to midi, the noteOn function i posted below.


Code:
void playstep(int stepnr) {
  
  if (currentSwitchState[stepnr] == 1) {
    
//this reads a potentiometer and defines the pitch of the note to be played
    AnalogValue[stepnr] = analogRead(stepnr);
    note[stepnr] = AnalogValue[stepnr]/8 ;
//this is optional if the played note should be turned of on the next step
     holdState = digitalRead(holdPin);
    if (holdState == 1) {
         noteOn(0xB0, 0x7B, 0x00);  // all notes off    
    }  
//this plays the actuall note, first midi than analog
    noteOn(0x90, note[stepnr], 0x7F); // play note
    write_value(AnalogValue[stepnr] * 4);
//this blinks the LED when the current step is played    
    for (int i=0; i<=15; i++) {
      digitalWrite(LEDpins[i], i==stepnr);
    }
  }
}

Code:
void noteOn(byte cmd, byte data1, byte  data2) {
  Serial.print(cmd, BYTE);
  Serial.print(data1, BYTE);
  Serial.print(data2, BYTE);
}
5  Using Arduino / Audio / Re: quantizing midi notes on: January 11, 2012, 03:16:05 am
I did write some comments to the code, hope thats enough.
With quantizing the pitch I mean that the played note matches a note from the scale or a chord,
thats how I understand quantizing.

this is the wikipedia article on quantizing:
http://en.wikipedia.org/wiki/Quantization_%28music%29
6  Using Arduino / Audio / Re: quantizing midi notes on: January 10, 2012, 09:34:08 am
Hello,

this time i would like to quantize the note/pitch/frequency,
the sequencer runs to an external clock, so quantizing the time would not be neccesary., i think.

cheers
7  Using Arduino / Audio / quantizing midi notes on: January 10, 2012, 03:07:19 am
Hello,

is it possible to quantize the midi notes send by a arduino sequencer?
Right now I only take the analogvalue and send that to the midi device:

Code:
void playstep(int stepnr) {
  
  if (currentSwitchState[stepnr] == 1) {
    
//this reads a potentiometer and defines the pitch of the note to be played
    AnalogValue[stepnr] = analogRead(stepnr);
    note[stepnr] = AnalogValue[stepnr]/8 ;
//this is optional if the played note should be turned of on the next step
     holdState = digitalRead(holdPin);
    if (holdState == 1) {
         noteOn(0xB0, 0x7B, 0x00);  // all notes off    
    }  
//this plays the actuall note, first midi than analog
    noteOn(0x90, note[stepnr], 0x7F); // play note
    write_value(AnalogValue[stepnr] * 4);
//this blinks the LED when the current step is played    
    for (int i=0; i<=15; i++) {
      digitalWrite(LEDpins[i], i==stepnr);
    }
  }
}
8  Using Arduino / Audio / Re: midi in debugging on: January 09, 2012, 04:47:50 am
ok, i got a signal now and the sequencer runs according to the sequencer, but its far to fast, how can and have I to devide the incoming signal?

Code:
if(Serial.available() > 0) {
  data = Serial.read();
  if(data == midi_start) {
    play_flag = 1;
  }
  else if(data == midi_continue) {
    play_flag = 1;
  }
  else if(data == midi_stop) {
    play_flag = 0;
  }
  else if((data == midi_clock) && (play_flag == 1)) {
  //
//here are my steps...

EDIT:

when I only do every 4 ticks something the timing seems right:

Code:
if(counter < 5) {
  counter++;
  } else {
  counter = 0; 
  currentSwitchState[step] = digitalRead(switchPins[step]);
9  Using Arduino / Audio / midi in debugging on: January 07, 2012, 03:50:32 am
HEllo,
im creating a midi in circuit for my sequencer, the question ist
how can I check if my circuit is right and the code also.
I use this circuit adn the code below:
http://www.instructables.com/file/FUJ0J5BFPBKZZB1/

The arduino is a mega and the midi in ist connected to RX0.

Code:
byte midi_start = 0xfa;
byte midi_stop = 0xfc;
byte midi_clock = 0xf8;
byte midi_continue = 0xfb;
int play_flag = 0;
byte data;
//midi in end

void setup() {
  //  set the states of the I/O pins:
  for (int x = 0;x<16;x++) {
    pinMode(LEDpins[x], OUTPUT);
    pinMode(switchPins[x], INPUT);
  }
                   
  pinMode(timePin1, INPUT);
  pinMode(timePin2, INPUT);
  pinMode(playPin, INPUT);
   pinMode(holdPin, INPUT);
    pinMode(dualPin, INPUT);
    pinMode(midiin, INPUT);
  //  Set MIDI baud rate:
  Serial.begin(31250);
  Serial1.begin(31250);
  // turn all notes off
  noteOn(0xB00, 0x7B, 0x00);
  noteOn(0xB01, 0x7B, 0x00);
  noteOn(0xB02, 0x7B, 0x00);
  noteOn(0xB03, 0x7B, 0x00);
  noteOn(0xB04, 0x7B, 0x00);
  noteOn(0xB05, 0x7B, 0x00);
  noteOn(0xB06, 0x7B, 0x00);
  noteOn(0xB07, 0x7B, 0x00);
  blink(3);
  timer_start = millis();
  //------------------------------
  // Control Voltage Section start
  byte clr;
  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK,OUTPUT);
  pinMode(SLAVESELECT,OUTPUT);
  digitalWrite(SLAVESELECT,HIGH); //disable device
 
  SPCR = (1<<SPE)|(1<<MSTR);
  //SPCR = B01010000;
  clr=SPSR;
  clr=SPDR;
  delay(10);
  // Control Voltage Section end
  //------------------------------
  //---analog read timing
  sbi(ADCSRA,ADPS2) ;
  cbi(ADCSRA,ADPS1) ;
  sbi(ADCSRA,ADPS0) ;
  //-----------------------------
}

void loop() {

 
 
//Main sequence
 
//begin midi in here
if(Serial.available() > 0) {
  data = Serial.read();
  if(data == midi_start) {
    play_flag = 1;
  }
  else if(data == midi_continue) {
    play_flag = 1;
  }
  else if(data == midi_stop) {
    play_flag = 0;
  }
  else if((data == midi_clock) && (play_flag == 1)) {
  //
  currentSwitchState[step] = digitalRead(switchPins[step]);

     //mopdes are:
     // normal sequencer
     
     modeState = digitalRead(modePin);
     
     if (modeState == 0) {
   
       
        dualState = digitalRead(dualPin);
        if (dualState == 1) {
           currentSwitchState[step] = digitalRead(switchPins[step]);
           playstep1(step, 8, 0);
           if (step < 8) {
              step++;
           } else {
              step = 0;
           }
           currentSwitchState[step2] = digitalRead(switchPins[step2]);
           playstep2(step2, 15, 8);
            if (step2 < 15) {
              step2++;
           } else {
              step2 = 8;
           }
        } else {
           playstep(step);
           if (step < 15) {
              step++;
           } else {
              step = 0;
        }
        }
     } else {
       loopstep(step);
        if (step < 8) {
        step++;
      } else {
        step = 0;
      }
     }

    }
  //else { blink(1); }
   //
   
    }

   

}
10  International / Deutsch / Bastler im Raum Göttingen on: January 06, 2012, 11:18:32 am
Hallo,

gibs in Göttingen eine Arduino User Group oder ähnliches,
 habe ein Midi Projekt relativ weit gebracht, jetzt fehlt mir noch die Midi In Schaltung an
der ich auf dem Steckbrett verzweifele und eine Schaltung per Netz zu debuggen stell ich mir schwer vor.
Daher die Frage nach Leuten in Göttingen die ein wenig freie Zeit zu opfern hätten.

Dank und Gruß
11  Using Arduino / Audio / mcp4921 crashing arduino on: December 09, 2011, 12:19:41 am
Hello,

i created a CV output for my midi sequencer.
I get the wanted Voltage on Pin8 of the mcp4921.
I connected pin8 to the tip and the arduino GND to the ring.

When I now connect the mcp4921 to my synth the arduino crashes.

When I remove GND from the plug it works like it should be, is it 100% neccesary to
connect the GND and why does it crash?


thnx


EDIT:
i had to put a 220Ohm Resistor between ground and plug, than it works fine.
12  Using Arduino / Audio / Re: Analog CV output? on: November 11, 2011, 09:15:20 am
mmh, i dont really got your answer, i would like to send a CV, which is usually a current from 0-8V if i remeber correct to be sent instead
of this midi playnote: 

 noteOn(channel2[stepnr], note[stepnr], 0x7F);  //play note+

how would i line for CV out look?


Im not really into the whole IC/electrical stuff, do
you mean that when I connect a lowpasss filter i can adjust the voltage?
13  Using Arduino / Audio / Analog CV output? on: November 11, 2011, 04:44:06 am
Hello,

can I use the Arduino to output control voltage that is used in modular synthesizers?
I created a analog style Midi sequencer and would like to add CV output, i still have some PWM Ports free on my Arduinio Mega.


thnx a lot
14  Using Arduino / Audio / Re: converting standalone midi sequencer to midi in on: October 02, 2011, 03:08:36 am
Do I have to declare the Serial In port somewhere?
I only have the Serial.beginn().
15  Using Arduino / Audio / Re: control voltage sequencer on: September 30, 2011, 03:09:24 pm
nice,
do you need any extra equipment to generate CV with the arduino?
Pages: [1] 2 3 ... 6