Phatline Posted October 11, 2016 Report Share Posted October 11, 2016 hi my idea is: put a *.syx on the SD-Card put the SD-Card in a STM34F4 core var a. Core recognizes a *.syx and send it out on Port 32 (Midi A) var b. I activate something in the program (with a Dip switch for example) and now it loads up for what: in use with generic Midicontrollers (BCR2000) to transfair a CC-Layout that is fitting to the Midibox programm for which project: http://wiki.midibox.org/doku.php?id=msq-cc-bcr what i have up to now... char filepathL[8]; //Number of Pathsymbols tm/bcr.sys >>> 8 max! MUTEX_SDCARD_TAKE; statusDir = FILE_DirExists("syx"); MUTEX_SDCARD_GIVE; if(statusDir != 1) {MUTEX_LCD_TAKE; MIOS32_LCD_DeviceSet(0); MIOS32_LCD_Clear(); MIOS32_LCD_PrintFormattedString ("%s %d", "no bcr.syx", statusDir); MUTEX_LCD_GIVE;} if(statusDir == 1) { sprintf(filepathL, "tm/bcr.syx"); FILE_ReadOpen (&midifile_fi, filepathL); //normally i then start by reading the content and transfair it into variables..... but happens if i have Sysexfile instead? how to tunnel this to midiport? FILE_ReadBuffer((u8 *)file_typeBank, 4); //"MQ01" = 4 Positons FILE_ReadBuffer((u8 *)CC_SEQ, 32); //Container for static not touchable Variables FILE_ReadBuffer((u8 *)CC_Morph, 128); //Container for morphable Variables FILE_ReadBuffer((u8 *)Velo_Morph, 256); //Here we have 8x32=256, FILE_ReadBuffer((u8 *)CC_Store, 256); //Here we have 8x32=256, FILE_ReadBuffer((u8 *)MSQ_Store, 65536); //Motion-Sequence-Data 8x32*256=65536 FILE_ReadClose (&midifile_fi); MUTEX_SDCARD_GIVE Quote Link to comment Share on other sites More sharing options...
Phatline Posted October 13, 2016 Author Report Share Posted October 13, 2016 (edited) it was really simple: insert in a the function which is scanned every 2 seconds, which checks the SD Card: MUTEX_SDCARD_TAKE; //SD-Card is now only for the following LINES reserved: statusSD = FILE_CheckSDCard(); MUTEX_SDCARD_GIVE; if (statusSD == 1) {// YES CARD! MUTEX_SDCARD_TAKE; FILE_SendSyxDump( "/bcr1.syx", 32, 45); //Send(filepath, midiport, paket rate) MUTEX_SDCARD_GIVE; } or more readable without MUTEXes: statusSD = FILE_CheckSDCard(); //check if card is connected if (statusSD == 1) { //YES CARD is connecdte! FILE_SendSyxDump( "/bcr1.syx", 32, 45);} //Send(filepath, midiport, paket rate) Edited October 13, 2016 by Phatline 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.