Created
October 16, 2019 08:51
-
-
Save sonnm/a6378d2a4776edb5b1ede1dd3f1a29bb to your computer and use it in GitHub Desktop.
Convert GE200 preset file to GE 150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST["submit"])) { | |
$content = file_get_contents($_FILES["file"]["tmp_name"]); | |
$array = unpack("C*", $content); | |
//print_r($array); | |
$effectModule = []; | |
//FX/COMP 541 - 548 | |
$effectModule['FX/COMP']['TYPE'] = $array[541] - 1; | |
$effectModule['FX/COMP']['SWITCH'] = $array[542]; | |
$effectModule['FX/COMP']['Data']['ATTACK'] = $array[543]; | |
$effectModule['FX/COMP']['Data']['THRES'] = $array[544]; | |
$effectModule['FX/COMP']['Data']['RATIO'] = $array[545]; | |
$effectModule['FX/COMP']['Data']['LEVEL'] = $array[546]; | |
//DS/OD 549 - 556 | |
$effectModule['DS/OD']['TYPE'] = $array[549] - 1; | |
$effectModule['DS/OD']['SWITCH'] = $array[542]; | |
$effectModule['DS/OD']['Data']['VOLUME'] = $array[551]; | |
$effectModule['DS/OD']['Data']['TONE'] = $array[552]; | |
$effectModule['DS/OD']['Data']['GAIN'] = $array[553]; | |
//AMP 557 - 564 | |
$effectModule['AMP']['TYPE'] = $array[557] - 1; | |
$effectModule['AMP']['SWITCH'] = $array[558]; | |
$effectModule['AMP']['Data']['GAIN'] = $array[559]; | |
$effectModule['AMP']['Data']['BASS'] = $array[560]; | |
$effectModule['AMP']['Data']['MID'] = $array[561]; | |
$effectModule['AMP']['Data']['TREBLE'] = $array[562]; | |
$effectModule['AMP']['Data']['PRES'] = $array[563]; | |
$effectModule['AMP']['Data']['MST'] = $array[564]; | |
//CAB 565 - 572 | |
$effectModule['CAB']['TYPE'] = $array[565] - 1; | |
$effectModule['CAB']['SWITCH'] = $array[566]; | |
$effectModule['CAB']['Data']['TUBE'] = $array[559]; | |
$effectModule['CAB']['Data']['MIC'] = $array[567]; | |
$effectModule['CAB']['Data']['CENTER'] = $array[568]; | |
$effectModule['CAB']['Data']['DISTANCE'] = $array[569]; | |
//NS GATE 573 - 580 | |
$effectModule['NS GATE']['TYPE'] = $array[573] - 1; | |
$effectModule['NS GATE']['SWITCH'] = $array[574]; | |
$effectModule['NS GATE']['Data']['ATTACK'] = $array[575]; | |
$effectModule['NS GATE']['Data']['RELEASE'] = $array[576]; | |
$effectModule['NS GATE']['Data']['THRES'] = $array[577]; | |
//DELAY 597 | |
$effectModule['DELAY']['TYPE'] = $array[597] - 1; | |
$effectModule['DELAY']['SWITCH'] = $array[598]; | |
$effectModule['DELAY']['Data']['LEVEL'] = $array[599]; | |
$effectModule['DELAY']['Data']['SUB-D'] = $array[604]; | |
$effectModule['DELAY']['Data']['TIME'] = @array_shift(unpack('S*', $content[862] . $content[863])); | |
$effectModule['DELAY']['Data']['FEEDBACK'] = $array[600]; | |
//REVERB 605 | |
$effectModule['REVERB']['TYPE'] = $array[605] - 1; | |
$effectModule['REVERB']['SWITCH'] = $array[606]; | |
$effectModule['REVERB']['Data']['PRE DELAY'] = $array[607]; | |
$effectModule['REVERB']['Data']['LEVEL'] = $array[608]; | |
$effectModule['REVERB']['Data']['DECAY'] = $array[609]; | |
$effectModule['REVERB']['Data']['TONE'] = $array[610]; | |
//EQ 581 | |
$effectModule['EQ']['TYPE'] = $array[581] - 1; | |
$effectModule['EQ']['SWITCH'] = $array[582]; | |
if ($effectModule['EQ']['TYPE'] == 1) { | |
$effectModule['EQ']['Data']['80Hz'] = 16 + ($array[583] - 12); | |
$effectModule['EQ']['Data']['240Hz'] = 16 + ($array[584] - 12); | |
$effectModule['EQ']['Data']['750Hz'] = 16 + ($array[585] - 12); | |
$effectModule['EQ']['Data']['2.2KHz'] = 16 + ($array[586] - 12); | |
$effectModule['EQ']['Data']['6.6KHz'] = 16 + ($array[587] - 12); | |
} elseif ($effectModule['EQ']['TYPE'] == 2) { | |
$effectModule['EQ']['Data']['100Hz'] = 16 + ($array[583] - 12); | |
$effectModule['EQ']['Data']['200Hz'] = 16 + ($array[584] - 12); | |
$effectModule['EQ']['Data']['400Hz'] = 16 + ($array[585] - 12); | |
$effectModule['EQ']['Data']['800Hz'] = 16 + ($array[586] - 12); | |
$effectModule['EQ']['Data']['1.6KHz'] = 16 + ($array[587] - 12); | |
$effectModule['EQ']['Data']['3.2KHz'] = 16 + ($array[588] - 12); | |
} | |
//MOD 589 - 596 | |
$effectModule['MOD']['TYPE'] = $array[589] - 1; | |
$effectModule['MOD']['SWITCH'] = $array[590]; | |
$effectModule['MOD']['Data']['LEVEL'] = $array[592]; | |
$effectModule['MOD']['Data']['DEPTH'] = $array[593]; | |
$effectModule['MOD']['Data']['RATE'] = $array[591]; | |
$presetName = ucwords(preg_replace('/[^A-Za-z0-9\-]/', '', (trim(substr($content, 524, 16))))); | |
$fileInfo = [ | |
'app' => 'GE150 Edit', | |
'app_version' => 'V1.1.0', | |
'device' => 'MOOER GE150', | |
'preset_name' => $presetName, | |
'schema' => 'GE150 Preset', | |
'device_version' => 'V1.1.0', | |
]; | |
header('Content-disposition: attachment; filename=' . $presetName . '.mo'); | |
header('Content-Type: application/json'); | |
echo json_encode([ | |
'effectModule' => $effectModule, | |
'Exp' => [ | |
'VOL_MIN' => 0, | |
'FUN_SWITCH' => 0, | |
'VOL_MAX' => 100, | |
'PARA_CTRL' => 1, | |
'MODULE_CTRL' => 0, | |
'VOL_SWITCH' => 0, | |
], | |
'fileInfo' => $fileInfo, | |
]); | |
exit(); | |
} | |
?> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>GE200 TO GE150</title> | |
</head> | |
<body> | |
<form action="" method="post" enctype="multipart/form-data"> | |
<input type="file" name="file"> | |
<input type="submit" value="Submit" name="submit"> | |
</form> | |
</body> | |
</html> |
Hello. I also really want to do this conversion... But I don't understand
much about programming... Almost nothing actually. But in fact, if we
manage to create this feature, we will go down in history. Let's come
together and try...
Em seg., 9 de jan. de 2023 17:55, BetoWesker ***@***.***>
escreveu:
… ***@***.**** commented on this gist.
------------------------------
I want to know how to convert .mo files from ge200, ge250 to ge300. The
problem is I'm a newbie but I want to learn. Now the problem to transform
this code to my need I have to understand at least how to interpret the
hexadecimal code at least, isn't? But for these I will know what changes
will do this and that in the columns and in its corresponding binary code
for the Mooer Ge300 ... That would take me ages! and besides I don't have a
ge200 so how I can figure out a .mo code like that? :/ Does someone has
some technical documentation (yeah like real tech stuff) on how these
presets are organized in code, to understand them? Please? Even more than
10 years ago one guy made a converter for old Digitech RPs (reading the
hexadecimal values and binaries and just that) and you can even visualize
old gnx pedalboard patches. It was wild. My thinking is if nobody wants to
do it at least I want to at least try to do it... So anyway, can anyone
please share some insight please in those .mo code or some documentation?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/a6378d2a4776edb5b1ede1dd3f1a29bb#gistcomment-4431481>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOQC5FRUI7HVNS7OPVTOJFTWRR3NTBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4TQOBZHE3TOM5HORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
without at least some documentation about the .mo file code I doubt it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to know how to convert .mo files from ge200, ge250 to ge300. The problem is I'm a newbie but I want to learn. Now the problem to transform this code to my need I have to understand at least how to interpret the hexadecimal code at least, isn't? But for these I will know what changes will do this and that in the columns and in its corresponding binary code for the Mooer Ge300 ... That would take me ages! and besides I don't have a ge200 so how I can figure out a .mo code like that? :/ Does someone has some technical documentation (yeah like real tech stuff) on how these presets are organized in code, to understand them? Please? Even more than 10 years ago one guy made a converter for old Digitech RPs (reading the hexadecimal values and binaries and just that) and you can even visualize old gnx pedalboard patches. It was wild. My thinking is if nobody wants to do it at least I want to at least try to do it... So anyway, can anyone please share some insight please in those .mo code or some documentation?