Translations for our friends around the world.

Author Topic: Don's hauptwerk midi project (arduino)  (Read 4029 times)

0 Members and 1 Guest are viewing this topic.

Offline Don_prince

  • Member.
  • *
  • Posts: 445
  • A J
Don's hauptwerk midi project (arduino)
« on: September 20, 2016, 12:55:25 AM »
So as some of you have been aware I fidle around with a viritual pipe organ simulator called Hauptwerk. Somewhere on this forum earlyer I made a post about this amazing piece of software and if you dont know it yet, I recommend you take a look at it: (link follows later)

As many of you know an organ does have this weird keyboard you operate with your feet, the pedals. That is what my setup is lacking because as of now I was only playing with an m-audio keystation 88 pro. So I bought an organ pedal with its switches from marktplaats.nl (the dutch version of craigslist) and bought a seccondhand radioshack keyboard for less than 10 bucks. What do you know? a 10 buck keyboard has touchsensitivity and that is operated with 2 switches (the time between the two is the sensitivity). It does not operate on one and I could not program that out of the atmega eprom that was in there.

Soo the seccond attempt someone in my town helped me get a adruino mega 2560 and with a solid and easy plan I made my code and started soldering away.
This is the schematic for the attempt with port 22 till 53 used for the 32 note (keys) pedal.
https://www.dropbox.com/s/pq29lxwhku9p73t/i1%5Ecimgpsh_orig.png?dl=0

So I got everything wired up and made up the attached code,

What do you know? it does do more than I want it to. Atleast it works but it starts whooping from low note to high aswell... So I need to fix that and then Ill upload the seccond version of the code here.

If anyone of you want to start a similair project this is very usefull knowledge that such a thing can be done so easy. Not only in the music industry can this be usefull but also in the flightsim and other sim industry as you can have analog and digital inputs and outputs for your software.

Anyway I will keep you updated...
funny
0
informative
0
Thanks
0
No reactions
No reactions
No reactions

Offline Don_prince

  • Member.
  • *
  • Posts: 445
  • A J
Re: Don's hauptwerk midi project (arduino)
« Reply #1 on: October 16, 2016, 12:35:54 AM »
So with thanks for erik from the pcorgan.com forum (dutch), I figured out the last bit of the code and the pedal has been working for 2 weeks now. Its awsome, especialy since I put a lot of hours into it. The code as it is now is as follows:

void setup()  {
  Serial.begin(31250);
 
  for (int i = firstPin; i < firstpin + 32; i++){
      pinMode(i, INPUT_PULLUP);
  }
}

void loop()  {
  vol = analogRead(A5);
  vol = map(vol, 0, 1023, 0, 127);
 
  for (int i = 0; i < 32; i++) {
   int input = digitalRead(i+firstPin);
   if (inputPins != input){
      if (input == LOW) {
         noteOn(0x90, i + firstNote, vol);
      }
      else {
         noteOn(0x80, i + firstNote, 0x00);
         noteOn(0x80, i + firstNote, 0x00);
      }
      inputPins = input;
   }
  }

  delay(50);
}

void noteOn(byte cmd, byte data1, byte data2) {
   Serial.write(cmd);
   Serial.write(data1);
   Serial.write(data2);
   delay(10);
}
funny
0
informative
0
Thanks
0
No reactions
No reactions
No reactions

Offline Red2112

  • Sr. Member
  • ****
  • Posts: 327
  • Life Support
Re: Don's hauptwerk midi project (arduino)
« Reply #2 on: October 16, 2016, 01:38:09 AM »

That´s neat Don! Yes Arduino boards are used alot in flight sim set-ups. Maybe we can come up with something for a Steel Beast home built. I did speak about it over at the SB forum but like I was speaking chinese to them LOL.

I also have a M-Audio Axiom 49. Not to happy with it, key´s stick if you don´t use it for a while. Now that I know it has the sticky key syndrome (known issue), I press all the key´s before I use it.  I use a soft called AutohTheory with it...

http://www.pluginboutique.com/products/1387

What DAW do you use Don?
funny
0
informative
0
Thanks
0
No reactions
No reactions
No reactions

Offline Don_prince

  • Member.
  • *
  • Posts: 445
  • A J
Re: Don's hauptwerk midi project (arduino)
« Reply #3 on: October 16, 2016, 01:48:46 AM »
Reaper nowadays mostly. Because its cheap and light on my cpu... The way Hauptwerk works with a .wav for every single pipe that needs to be coded and decoded and mixed Im pushing my cpus to their limits... every bit used by the daw will limit the amount of stops I can use on the organ...
funny
0
informative
0
Thanks
0
No reactions
No reactions
No reactions

Tags:
     

    SEED - Project PICA PICA - Real-time Raytracing Experiment

    Started by Asid

    Replies: 0
    Views: 2174
    Last post March 20, 2018, 10:47:11 AM
    by Asid