LMMS and Arduino

Share and discuss your LMMS music projects here, and see what people think!
Hello everyone,
I have a little project: a laser harp! I was able to interface Arduino as midi device , but when I tell him to play a note ( from 0 to 127 ) does not play a SINGLE note but all the notes of the octaves above . For example , tell it to play in the third octave "DO" but it plays all "DO" of the octaves above ... How can I reduce the number of playable octaves ?? I want to play a SINGLE DO of a SINGLE OCTAVE pls help me :'( I am desperate !
not sue i understand, but octave selection is done with the green base-note-sector:
Image

I dont know if your midi devise works with lmms, sorry
posting your source code? so we can examine your programming :DD
(psychic, just read about Arduino rubbing shoulders with music production a few hours ago, whew)
terrible coder here -------------------------------------------------------------------------------------------------------->
This is the code...If I use Max 7 Arduino plays a SINGLE NOTE but not with LMMS...



int velocity=100;
int noteON = 144;//144 = 10010000 in binary, note on command
int noteOFF = 128;//128 = 10000000 in binary, note off command
int note=50;

int fotoDO;
int fotoRE;
int fotoMI;
int fotoFA;
int fotoSOL;
int fotoLA;
int fotoSI;
int fotoDO8;

int pinbuzz=11;
int pinbuzz2=2;
int DO= 48 ;
int RE= 50 ;
int MI= 52 ;
int FA= 53;
int SOL= 55;
int LA= 57;
int SI= 59;
int DO8= 60 ;

void setup() {
Serial.begin(9600);
pinMode(11,INPUT);
pinMode(10,INPUT);
pinMode(9,INPUT);
pinMode(8,INPUT);
pinMode(7,INPUT);
pinMode(6,INPUT);
pinMode(5,INPUT);
pinMode(4,INPUT);
pinMode(pinbuzz,OUTPUT);
pinMode(pinbuzz2,OUTPUT);
}

void loop () {
fotoDO=analogRead(A0);
fotoRE=analogRead(A1);
fotoMI=analogRead(A2);
fotoFA=analogRead(A3);
fotoSOL=analogRead(A4);
fotoLA=analogRead(A5);
fotoSI=analogRead(A6);
fotoDO8=analogRead(A7);
Serial.println(fotoSOL);

if (fotoDO<50) {
MIDImessage(noteON, DO, velocity);
delay(200);

}
else MIDImessage(noteOFF, DO, velocity);

if (fotoRE<40) {
MIDImessage(noteON, RE, velocity);
delay(200);
}
else MIDImessage(noteOFF, RE, velocity);


if (fotoMI<50) {
MIDImessage(noteON, MI, velocity);
delay(200);
}
else MIDImessage(noteOFF, MI, velocity);

if (fotoFA<50) {
MIDImessage(noteON, FA, velocity);
delay(200);
}
else MIDImessage(noteOFF, FA, velocity);

if (fotoSOL<50) {
MIDImessage(noteON, SOL, velocity);
delay(200);
}
else MIDImessage(noteOFF, SOL, velocity);

if (fotoLA<50) {
MIDImessage(noteON, LA, velocity);
delay(200);
}
else MIDImessage(noteOFF, LA, velocity);

if (fotoSI<200) {
MIDImessage(noteON, SI, velocity);
delay(200);
}
else MIDImessage(noteOFF, SI ,velocity);

if (fotoDO8<150) {
MIDImessage(noteON, DO8, velocity);
delay(200);
}
else MIDImessage(noteOFF, DO8, velocity);

}
void MIDImessage(int command, int MIDInote, int MIDIvelocity) {
Serial.write(command);//send note on or note off command
Serial.write(MIDInote);//send pitch data
Serial.write(MIDIvelocity);//send velocity data
}
mrfriendson wrote:posting your source code? so we can examine your programming :DD
(psychic, just read about Arduino rubbing shoulders with music production a few hours ago, whew)
terrible coder here -------------------------------------------------------------------------------------------------------->
I have posted the code... thanks for help... :(
musikbear wrote:not sue i understand, but octave selection is done with the green base-note-sector:
Image

I dont know if your midi devise works with lmms, sorry
Arduino works good with LMMS but the problem is that it plays the note of all the octaves at the same time . I want that it plays a single note of a single octave and I know that every note MIDI is a number from 0 to 127 so , if in the programm i tell Arduino that it must play the note 50, it don t must play the same note of the previous octaves, I'm going crazy!
this laser harp of yours has really, really great potential. but i think it's just the software-side that can't keep up :/
not long enough maybe the devs can patch something up to make it compatible. for now you can just keep playing with it
and share your experimentation from time to time :')
mrfriendson wrote:this laser harp of yours has really, really great potential. but i think it's just the software-side that can't keep up :/
not long enough maybe the devs can patch something up to make it compatible. for now you can just keep playing with it
and share your experimentation from time to time :')
I understand, before I had solved the problem ( it playing very very verygood, believe me ) but then when I restarted the computer that does not have more Played well and I found on the main note of the interruptions (namely the notes in the octaves above) . If I solved again i don t restart never my pc . I promise !! :x :x :x :x :x :x If I work out I will write a guide on how to make laser harp on this site>> domenicogaldiero.altervista.org I am italian sorry guys!
It's cool man. Your little project is kinda technology demonstration of what LMMS can really do. Maybe you'll work it out that it's gonna run even if you shutdown your machine :DD. Feel free to keep everyone posted about it ;)
If I understand, you say you are sending a MIDI note 50 and what is played is 50 and 62 and 74 and 86 etc. Is that it ?

Just a possibly stupid thought (I'm fairly new to LMMS). You haven't said what instrument you are using in LMMS to generate the sound but most of them will have in the FUNC section a "Stacking" tool. If you somehow have this switched on with the "chord" set to Octave then that's exactly what it will do. E.g. you send C4 and it plays C4 and C5 and C6 etc.

There's certainly nothing in your code that can possibly be generating extra notes in other octaves so that's all I can think of.

Steve