Go Down

Topic: openpipe with fluxamasynth (Read 2 times) previous topic - next topic

Trazman001

#10
Feb 12, 2013, 12:06 am Last Edit: Feb 12, 2013, 12:20 am by Trazman001 Reason: 1
Code: [Select]
[code   uint8_t raw[4];
} t_midiMsg;
]

should I delete this to?

the question really is, should I add any thing?

Code: [Select]
Serial.write(midiMsg.raw, sizeof(midiMsg));
every part where this was I deleted it and it still didn't work.

johncc



should I delete this to?

the question really is, should I add any thing?



I don't think that will matter.  Also, the instrument=0 will not matter because it is not being used anywhere either.

Sorry, I don't know anything about the shield or Midi.

And, what is your thinking about the "VS1053 reset line"?

Cheers,
John

Trazman001

#12
Feb 14, 2013, 09:47 pm Last Edit: Feb 14, 2013, 09:52 pm by Trazman001 Reason: 1
grumpy mike

If you would please show me the right code to use. ;)

this code was ment for the spark fun music instrument code.

Grumpy_Mike

These functions will work:-
Code: [Select]
void noteOn(byte channel, byte note, byte attack_velocity) {
  talkMIDI( (0x90 | channel), note, attack_velocity);
}

//Send a MIDI note-off message. Like releasing a piano key
void noteOff(byte channel, byte note, byte release_velocity) {
  talkMIDI( (0x80 | channel), note, release_velocity);
}

void soundsOff(byte channel){
  talkMIDI( (MIDI_COMMAND_SOUNDS_OFF | channel), 120, 0);
}


These functions will not work:-
Code: [Select]
int MIDI_sounds_off(void){
   t_midiMsg midiMsg;
   midiMsg.msg.command = MIDI_COMMAND_SOUNDS_OFF;
   midiMsg.msg.channel = MIDI_DEFAULT_CHANNEL;
   midiMsg.msg.data2 = 120;
   midiMsg.msg.data3 = 0; /* Velocity */
   
   Serial.write(midiMsg.raw, sizeof(midiMsg));
}

int note_on(int note, int vel){
    t_midiMsg midiMsg;
   
    midiMsg.msg.command = MIDI_COMMAND_NOTE_ON;
    midiMsg.msg.channel = MIDI_DEFAULT_CHANNEL;
    midiMsg.msg.data2 = note;
    midiMsg.msg.data3 = vel; /* Velocity */
   
    Serial.write(midiMsg.raw, sizeof(midiMsg));
}

int note_off(int note, int vel){
    t_midiMsg midiMsg;
   
    midiMsg.msg.command = MIDI_COMMAND_NOTE_OFF;
    midiMsg.msg.channel = MIDI_DEFAULT_CHANNEL;
    midiMsg.msg.data2 = note;
    midiMsg.msg.data3 = vel; /* Velocity */
   
    Serial.write(midiMsg.raw, sizeof(midiMsg));
}

Replace calls to the latter with the former with the appropriate calling parameters.

Trazman001

#14
Feb 17, 2013, 12:06 am Last Edit: Feb 17, 2013, 12:31 am by Trazman001 Reason: 1
will some of these work??
Code: [Select]
void noteOn(byte channel, byte pitch, byte velocity);
 void noteOff(byte channel, byte pitch);
 void programChange (byte bank, byte channel, byte value);
 void pitchBend(byte channel, int value);
 void pitchBendRange(byte channel, byte value);
 void midiReset();
 void setChannelVolume(byte channel, byte level);
 void allNotesOff(byte channel);
 void setMasterVolume(byte level);
 void setReverb(byte channel, byte program, byte level, byte delayFeedback);
 void setChorus(byte channel, byte program, byte level, byte feedback, byte chorusDelay);


Please please pretty please. tell me what to enter.

Go Up