NEWSFLASH
Sysex file transfer works!
/* one tool to rule theM 1. - | copy left | M1Addict 2023
*
* a KORG M1 -> Translator + Midi repeater
*
Midi CH | function
did that. and voila!
static uint16_t MIDI_BUFFER_LENGTH = sizeof(midi_buffer)/sizeof(midi_buffer);
Now everything works as i wanted it to :)
Thanks for the help!
ITS WORKING !!!
data array gets read into 128 byte buffers.
if the buffer size is bigger then the remaining data from the data array
the missing bytes are padded with 0x00. (overwriting the garbage that was there...
joepasquariello: Did it. Its ok. prints out the same numbers. so i revert it to non static declaration.
31520
128
the garbage after the last byte is also the same. as with fixed values for the array lengths.
Ok, so far. it almost works when i use a buffer size of 128.
Still having problems with the padding. and "random" values
following the last byte of the source array.
1B 58 05 00 00 00 00 00 1C 5A 05 00 00 00 00...
Just noticed that my midi buffer was 10 bytes short.
i fixed that and added some 0xff on the end and on the beginning of the array as markers.
Still memcp doesnt seem to work and doesnt overwrite the buffer.
...
ok, changing the size does help in that it doesnt reset the teensy anymore.
EDIT: joepasquariello, kd5rxt-mark : So you are totally right that is wrong.
i did miss that cause it made no difference in mey...
Thanks, i tried but still no output on the serial :(
void setup()
{
Serial.begin(115200); while (!Serial) {;} // wait for serial
if (CrashReport) {
Serial.print(CrashReport);
}
...
Hello!
Im playing around with copying data from a large u_int8 array into a small u_int8 buffer.
the large arrays size is 31520 bytes, the buffer is 256 bytes wide.
Seems that my code does something really bad....
Hehe :) That was my thinking too. And since writings of resistor values
often skip the Ohm i thought MatrixRat has fixed some timing issues by
changing some resistors from 100Mega Ohm to 65Mega Ohm :)
some...
what do you mean by "weeding out the 100Ms case, 65Ms"?
as i said, i dont listen i dont care what the M1 might want to tell me :)
at least for now.
diving in is what i do ;)
after the preset loading works i...
just measured how long a sysex preset transfer takes.
by running:
time amidi -p korg_M1:id -s sysex_preset_31520.syx
12 seconds and 38 milli seconds it is. for the 31520byte file.
now back to the...
MatrixRat:
I see. Blocking is no issue for me since i cant
control the synth whilst uploading presets anyway.
i dont care what the Synth may say since im not listening ;)
Some small number games...
MIDI over the default serial is 3125 bytes / second.
256bytes of sysex data fits 12 times into this one second capacity of MIDI serial. (or make it 10 times for safety)
So by...
jepp! ill remember that!
still i dont know what is going on.
but since im in no way qualified to continue to debug that
and meld (my tool of choice for diffs) does not like those
long strace lines im going to...
Oh, nice. How did you slow down the transfer from the teensy to the synth?
EDIT: was thinking about sending the SYSEX_DATA in 256 byte chunks with
some bunch of microseconds delay after every block.
i tried to compile with some extra verbosity....
nothing to see here.
/home/me/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -v -save-temps -c -O2 -g -Wall -ffunction-sections -fdata-sections...
Maybe we got different compiler/toolchain versions?
Arduino: 1.8.13
Linux: Ubuntu 22.04.1 LTS
arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release)
Did you copy the array into any...
Since this was easy to try out.
i removed all newlines .
Its the length of the line. that somehow produces this error.
same error without the escapes \.
see: attachment
hello again! *usbMIDI.sendSysEx Rate Limiting, any ideas?
I got time to try sending the fixed sysex data via usbMIDI.sendSysEx(31520, sysexfile_data).
After the first 256 bytes are received - errors apear and the...
Thanks!
Smarter every day :)
Also. regarding the "\" problem :)
They are legal for all the other small arrays i used here :)
Only the Big Arrays seem to somehow confuse the compile process
when putting an...
SORRY, The line above is rubbish and does not produce data suitable for usage in an array!
The bytes look nice but are all mixed up :) F0 42 becomes 42 F0 and so on :)
Havent noticed the mixed up bytes since i...
btw. this is how to make a sysex file into easy to fix array data(remove the last comma):
hexdump -v $SYSEX_FILE | awk '{print $2$3$4$5$6$7$8$9}' | fold -w 2 | sed 's/^/0x/g' | sed 's/$/\,/g'| tr -d '\n' | fold -w...
I tried putting a test array containing a SYSEX dump into my header file.
for trying out usbMIDI.sendSysEx(31520, sysexfile_data)
char sysexfile_data = {\
0x42,0xf0,0x19,0x30,0x00,0x4d,0x4d,0x00,0x73,0x69,\...
Hello!
I want to build a small tool to manage my Korg M1 with
a Teensy 4.0.
So far i got midi CC to SYSEX message translation working
for configuring the Presets.
Since i do have an audioshield with sdcard i...