You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hola Peter, felicitaciones por tu gran trabajo, sin duda la mejor biblioteca de github.
Este post debido a que me he encontrado con un par de inconvenientes, no se si sea mi poco conocimiento en esto.
Cuando uso esp8266 no puedo usar potenciometros ya que no me registra lecturas, el esp8266 esta bien ya que hice pruebas con el ejemplo de arduino de analogread y serialprint por lo que parece ser que algo en mi codigo esta mal. Por otra parte el esp8266 no se anuncia automaticamente en rtpMIDI, como lo hace el esp32, a que se debe este problema. Mi codigo es el siguiente.
Cuando uso botones trabaja excelente, el problema esta en el uso de la parte analogic no la registra, el boceto como tal no incluye declaracion de potenciometros.
Gracias por tu ayuda.
#include<MIDI.h>
#include<ESP8266WiFi.h>
#include<WiFiClient.h>
#include<WiFiUdp.h>
#defineSerialMon Serial
#defineAPPLEMIDI_DEBUG SerialMon
#include<AppleMIDI.h>
#include<Control_Surface.h>
#include<MIDI_Interfaces/Wrappers/FortySevenEffects.hpp>
#include<ESP8266mDNS.h>char ssid[] = "HOME"; // your network SSID (name)char pass[] = "1234567890"; // your network password (use for WPA, or use as key for WEP)// ----------------------------- MIDI Interface ----------------------------- //// First create the AppleMIDI instanceunsignedlong t0 = millis();
int8_t isConnected = 0;
APPLEMIDI_CREATE_DEFAULTSESSION_INSTANCE();
// Then wrap it in a Control Surface-compatible MIDI interface
FortySevenEffectsMIDI_Interface<decltype(MIDI) &> AppleMIDI_interface = MIDI;
// ------------------------------ MIDI Elements ----------------------------- //////class filtro : public MIDI_Pipe {// public:// filtro(Cable from, Cable to =
NoteButton notebutton = {
7, // Push button on pin 7
{note(C, 4), CHANNEL_1}, // Note C4 on MIDI channel 1
};
HardwareSerialMIDI_Interface midiser = {Serial};
MIDI_PipeFactory<2> pipes;
voidsetup() {
DBG_SETUP(115200);
DBG("Booting");
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
DBG("Establishing connection to WiFi..");
}
DBG("Connected to network");
DBG(F("OK, now make sure you an rtpMIDI session that is Enabled"));
DBG(F("Add device named Arduino with Host"), WiFi.localIP(), "Port", AppleMIDI.getPort(), "(Name", AppleMIDI.getName(), ")");
DBG(F("Select and then press the Connect button"));
DBG(F("Then open a MIDI listener and monitor incoming notes"));
DBG(F("Listen to incoming MIDI commands"));
MIDI.begin();
AppleMIDI.setHandleConnected([](const APPLEMIDI_NAMESPACE::ssrc_t & ssrc, constchar* name) {
isConnected++;
DBG(F("Connected to session"), ssrc, name);
});
AppleMIDI.setHandleDisconnected([](const APPLEMIDI_NAMESPACE::ssrc_t & ssrc) {
isConnected--;
DBG(F("Disconnected"), ssrc);
});
// Set up some AppleMIDI callback handles// AppleMIDI.setHandleConnected(onAppleMidiConnected);// AppleMIDI.setHandleDisconnected(onAppleMidiDisconnected);// Initialize Control Surface (also calls MIDI.begin())
AppleMIDI_interface >> pipes >> midiser; // all incoming midi from USB is sent to serial
AppleMIDI_interface << pipes << midiser;
Control_Surface.begin();
}
// ---------------------------------- Loop ---------------------------------- //voidloop() {
// Update all MIDI elements and handle incoming MIDI
Control_Surface.loop();
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hola Peter, felicitaciones por tu gran trabajo, sin duda la mejor biblioteca de github.
Este post debido a que me he encontrado con un par de inconvenientes, no se si sea mi poco conocimiento en esto.
Cuando uso esp8266 no puedo usar potenciometros ya que no me registra lecturas, el esp8266 esta bien ya que hice pruebas con el ejemplo de arduino de analogread y serialprint por lo que parece ser que algo en mi codigo esta mal. Por otra parte el esp8266 no se anuncia automaticamente en rtpMIDI, como lo hace el esp32, a que se debe este problema. Mi codigo es el siguiente.
Cuando uso botones trabaja excelente, el problema esta en el uso de la parte analogic no la registra, el boceto como tal no incluye declaracion de potenciometros.
Gracias por tu ayuda.
Beta Was this translation helpful? Give feedback.
All reactions