Skip to content

PitchBend problem #49

@nishiratavo

Description

@nishiratavo

Hi,
I'm trying to use sendPitchBend to send a float number, but I got a error with that function. It says that "Toto" is not a member of "midi::DefaultSettings". I have searched the library and couldn't find that variable anywhere. Is it a problem with my code or a bug in the library ?

My code

#include <MIDI.h>
#include <Wire.h>
#include <SparkFun_MMA8452Q.h>


float ym;
float n;

MIDI_CREATE_DEFAULT_INSTANCE();

MMA8452Q accel;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(57600);
  accel.init(SCALE_8G, ODR_200);
  MIDI.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
    for(n = 0; n<30;n++)
    {
    accel.read();
    ym = ym + accel.cy;
    }
    ym = ym/n;
    if(MIDI.read())
    {
    MIDI.sendPitchBend(ym,1);
    }
} 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions