String Conversion/Open Bug #738
-
|
Following on from the discussion here - #732 (reply in thread) This actually appears to be a problem on conversion or reading of the string, rather than a gzip file. Here's a panel that opens a .9kf file 2 different ways. The first uses the juce gzip function, the second unzips using gzip via an OS command. The first method loads it into a memoryBlock and does the conversion there and then extracts the last 25 characters of the json string (this is before it is decoded from json - it's a raw string) It also outputs the full hex of the memoryBlock to the console. The hex is the complete file - if you take it, encode it as ASCII then the full file is created, but when we try to read the data as a string, the last characters are dropped. The 2nd method opens the unzipped file as a String. Both fail to import the last few characters of the file. There are 2 9kf files included, plus 2 unzipped files (they are json files, just without the extension). The second method will create these files as part of the process. I've included the actual 25 characters in the panel, copied from an external program. H9000 Gzip Bug_1_0_2025-11-05_15-36.zip Any help would be great. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 14 replies
-
|
This does seem to open and display the entire file (that has been unzipped), but only in text mode. I can't work out how to read the gzipped file in binary mode (ie "rb" as the second arguement of the first line) into a memoryBlock, and I'm not sure how to use io.open from the file browser.
|
Beta Was this translation helpful? Give feedback.
-
|
You were right - there was a bug. When parsing the decompressed file any I implemented a Binary Safe function that ignores \0 So, in your code you would do something like: if inputBlock:getSize() > 0 then
if inputBlock:getRange(0,4):toHexString(1):upper() == testHeader:toHexString(1):upper() then
console("Step 1: Decompressing outer gzip file...")
+ str=MemoryBlock()
- str = inputBlock:decompressGzip()
+ str:decompressGZip()
end --if
end --if
- console (str)
+ console (str:toBinaryString())decompressGzip() now returns a MemoryBlock not a JUCE String # Please test this binary debug build and if it is working I will submit a PR to Damien for the new release! Output from this panel: Decompression successful! Data size: 6949 bytes
{"dsp_mode":0,"functions":[{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0}],"master_gain":{"bypass":{"subscription":null,"values":[0]},"in_gain":{"subscription":null,"values":[0.0]},"mute":{"subscription":null,"values":[0]},"out_gain":{"subscription":null,"values":[0.0]},"tails":{"subscription":null,"values":[0]},"wet_dry_mix":{"subscription":null,"values":[100.0]}},"metadata":{"crc32":-1674915244,"effect type":{"Delay":0.8999999761581421,"Distortion":1.0,"Modulation":1.0,"Reverb":0.6000000238418579},"fxchain_id":0,"instrument type":{"Bass":1.0,"Brass":1.0,"Guitar":0.8999999761581421,"Keyboard":1.0,"Vocal":1.0},"is_factory":false,"name":"Drum Glitch Tension","product type":{"Emulation":1.0,"H8000":1.0,"H9":1.0,"H9000":1.0,"Space":1.0},"program_names":"Dynamic Send, UltraTap, Dream Chamber","software":"2.0.5[2] (ade503dd6)","version":2},"routing":{"locations":[0,5,-1,8],"routes":[[[0,[0]],[1,[1]]],[[0,[0]],[1,[1]],[8,[2]],[9,[3]]],[[0,[0,8]],[1,[1,9]]],[[0,[0]],[1,[1]]]]},"slots":[{"preset":"H4sIAAAAAAAEA5RSwU6FMBC8+xWmZyAtIDw4GuPNg/HdjCFLaaBKKbZFJS/8uy1J0RNiT9uZ2c3u7F7QrZTahLJ+jTAqbyIcoHvF3j1wwsRBD7JhHrLfRx+v5LlTTHceCknsMqBvqxb4gMoLqucRtHaRnmpNFR8Nl5YZpr4P0Af0E7PsM35ZAsSHLW1fHK1yMRl2rLCczL8qG+D9wZ4NE6OshPXoWCufzFSNmivBv/5MIBi7Sa0zYAzQN28zjiyzPpIWmJCMeEVJ9jQNozDvCbpZG2YXyrVXJW6fghlowIBreFSyVSAqqmgSozIkpyxPi1OK82DjeIPKLIuLJM9+wAGEtQjdzTbg9PqJDQ2yk2l6nsftvmIL/DoTt4NlufoGAAD//wMANS4h+6kCAAA=","preset_metadata":null,"program_metadata":{"crc32":-1867498407,"dsp_mode":0,"factory":false,"favorite":false,"id":6629376,"inputs":2,"inputs / outputs":{"2/4":1.0},"is_exportable":true,"name":"Dynamic Send","outputs":4,"rating":0}},{"preset":"H4sIAAAAAAAEA4xVXY+iSBR931+x4bl3AgXaTSf7QDeKmKZY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NeLkC/jTC3mWMuoH4TDtxB44OY3x+1wg4KPOxTuUeOGQHfXH7FixnkTjHMm/DnP2ktHfDNO4ghO3wC+fYK/spd+VHrRHBuyCwSO8XETmWW3opnBvZBI+wE1EwB3jAnDtQjEni+WWlvO5hVARt2Fupil46YMw00qUnolQn0zq6UYd7BPnpv79vMygV+/M5+8C5ptSy2i+Pf8Gj9/j0l3hEvL3/8BwAA//8DAMRbsSMABwAA","preset_metadata":{"is_factory":true,"name":"ULTRATAP","preset_id":6226177,"product type":{"H9":1},"program_crc32":-2061872137,"program_id":6226176,"program_name":"UltraTap"},"program_metadata":{"crc32":-2061872137,"dsp_mode":0,"factory":true,"favorite":false,"id":6226176,"info":"UltraTap is a versatile multi-tap delay-line effect capable of a myriad of sounds from rhythmic delays, to wacky comb filtering, to huge pad-like volume swells, to unique reverbs, and everything in between. \n\n \nMix - [MIX] : wet/dry mixer, 100% is all wet signal. \n \nLength - [LENGTH] : Total time over which the taps are spaced in, up to 4 secs of tap time. \n \n#ofTaps - [TAPS] : The number of taps, from 1 to 64. \n \nPredelay - [PREDLY] : The amount of time before the taps start, up to 1 sec. \n \nSpread - [SPREAD] : The rhythmic spacing of the taps. More negative values will group taps towards the beginning, for a �slowing-down� feeling. More positive values will group more taps towards the end for a �speeding-up� delay sound. A zero value will result in constant spacing. \n \nTaper - [TAPER] : Controls the fade of the taps. More negative values will increasingly give a fade-up over the taps, and more positive values will give a fade-down over the taps. A zero value will result in equal gain across all taps. \n \nTone - [TONE] : A tone control. Negative values will make darker sounding taps, while positive values will make brighter sounding taps. \n \nSlurm - [SLURM] : Juicy tap slurring/smearing and modulation. \n \nChop - [CHOP] : A pre-tap-machine �chopping� tremolo OR auto-volume processor. The tremolo has several LFO waveform choices: off [OFF], triangle [TRIANG], sawtooth [SAW], ramp [RAMP], square [SQUARE], or sample/hold [SMPHLD]. The auto-volume processor will either do volume swells [SWELL (0-9 input sensitivity control)], or a gating effect, called Trigger, that chops off the end of sounds [TRIG (0-9 input sensitivity control)]. There is also a setting for expression pedal control of the pre-tap-machine volume [EXPDL]. \n \nSpeed, Rise, or Release - [SPEED], [RISE], [RELEAS] : This knob acts as a multi-function parameter control for the [CHOP] knob. For the LFO waveforms, [SPEED] will change the LFO speed. For [SWELL], [RISE] will adjust the swell rise time, and for [TRIGGR], [RELEAS] sets the amount of time after triggering before the gate kicks in and chokes off the sound. \n \n\n","inputs":2,"inputs / outputs":{"2/2":1.0},"is_exportable":false,"name":"UltraTap","outputs":2,"product type":{"H9":1.0},"rating":0,"runs_at_96k":false,"six_character_abbreviation":"UltraT","weight":4}},{},{"preset":"H4sIAAAAAAAEA5RSy27DIBC89ysqzrFlsI0f1/YvqsrChjhUYCOM06ZR/r1ACs6pSTnBzM7uzi5nQMTYjYRPoD2D/qTIsrjbsvbLoLkyfLbMtAqxA0ciVmbZt+z9sgN8irK/g1MfLlfDHks8r+ZfmQ3h4sGeDZNq7uRM77cCncdPZjqqT53kX3d7L6EzakWU7/fJ3H+kGWhrC1pEnGBA8rTK/CkqXOcVxJ5GgYb5ryAPSACKAECfcxScspi1zJzssNW1JTxyDCr/FDEAFrXjReSTMsWNO3XWIFzCvNoBSZkyh1gEpqWVSGYIJYa4gSg9j5rIbtBDjkCbNLgqMcobGxYoTkGLamTzWacBnIi0GwCvmhH5/HIgsmca2NFJTcxmCvqe5aLIFFzAqy1lJxqhwhnRdNhmjALSbb27mIV/syCrfXK9+fei2wjsI27/tvtltstNg12hY1xe0vh3XF1y5ePmHH95+gEAAP//AwAnF1mFcwMAAA==","preset_metadata":{"program_crc32":-967562390,"program_id":2821376,"program_name":"Dream Chamber"},"program_metadata":{"crc32":-967562390,"dsp_mode":0,"effect type":{"Delay":0.90,"Reverb":0.60},"factory":true,"favorite":false,"id":2821376,"info":"Chamber effect (delays between diffusion and verb). Stereo in, stereo out.","inputs":2,"inputs / outputs":{"2/2":1.0},"instrument type":{"Guitar":0.90},"is_exportable":true,"name":"Dream Chamber","outputs":2,"product type":{"H8000":1.0},"rating":7,"runs_at_96k":true,"weight":1}}]}
3880 bytes (compressed original)
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Decompression successful! Data size: 6136 bytes
{"dsp_mode":0,"functions":[{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0},{"subscription":null,"value":0.0}],"master_gain":{"bypass":{"subscription":null,"values":[0]},"in_gain":{"subscription":null,"values":[0.0]},"mute":{"subscription":null,"values":[0]},"out_gain":{"subscription":null,"values":[0.0]},"tails":{"subscription":null,"values":[0]},"wet_dry_mix":{"subscription":null,"values":[100.0]}},"metadata":{"crc32":-412343991,"effect type":{"Delay":0.8999999761581421,"Distortion":1.0,"Modulation":1.0,"Reverb":1.0},"fxchain_id":0,"instrument type":{"Bass":1.0,"Brass":1.0,"Guitar":0.8999999761581421,"Keyboard":1.0,"Vocal":1.0},"is_factory":false,"name":"Big Drum Room","product type":{"Emulation":1.0,"H8000":1.0,"H9":0.8999999761581421,"H9000":1.0,"Space":1.0},"program_names":"Dynamic Send, Shimmer, Dream Chamber","software":"2.0.5[2] (ade503dd6)","version":2},"routing":{"locations":[0,5,4,-1],"routes":[[[0,[0]],[1,[1]]],[[0,[0]],[1,[1]],[8,[2]],[9,[3]]],[[0,[0,8]],[1,[1,9]]]]},"slots":[{"preset":"H4sIAAAAAAAEA5RSy06FMBDd+xWmayAtIK+lMe5cGO/OGDKUBqqUYltUcsO/296k6ApxVjPnnJnM64xupdQmlM1rhFGVRgV2RkqcJ2mRJQG6V+zd0wVOIxygB9kyD9nw0ftxdGPDU6+Y7j0WktilwNDVHfARVWfULBNo7Tw9N5oqPhkuLTPOwxCgDxhmZtln/LIGiI9b2r44usjFbNixwnI2/6psgA8HezZMTLIWdknHWvlkpm7VUgv+9WcCwdhNajcDxgB982vGkWUuRtISE5IRr6jInqZlFJY9Qb9ow+xBufaqxN1TMAMtGHANT0p2CkRNFU1iVIWkyPK0LFKcBxvHW1RlWVwmefYDjiDsitDdYh1Or5/Y2CI7maanZdoeLLbArzdxN1jXq28AAAD//wMAoflsYLgCAAA=","preset_metadata":null,"program_metadata":{"crc32":-1867498407,"dsp_mode":0,"factory":false,"favorite":false,"id":6629376,"inputs":2,"inputs / outputs":{"2/4":1.0},"is_exportable":true,"name":"Dynamic Send","outputs":4,"rating":0}},{"preset":"H4sIAAAAAAAEA5RUW2+jRhR+76+oeI4qGMBd/Ob4gnE9g2ITg6kqa7iEDB4uMhBgVvnvPUPaJKuVutu38bl8l3OO+apQnl0yykpl/lWJxpo2jXw1XdTEN1a3rIJM2XF+p7xQ3qWQ/VP96/VOYeV7238X/zaVF12b/hxw1bX/C7mljP+k5jYt6upSVMmPpWjSY5+2l+Q2Xgo2/FC7pqrSKXQVaUsT2lLZwprLE43b6jYq8/bWpXdKSQtgV45bB+P1QblT6lvaAA9LlPlMm+mG+buMVUkXt7+2Yz1J3VrKXANoiGc3WlziW6wjZa5/QbMv5kyffWQ+YD4F/+V8ZkWR3hQJxLsMNvjGDXLScfcc2clLXHCV2tpTVGza8OjMHE4q6mttGDhsv9w9xzapnLwacL5Q9/micYpdf0YZc/P14Hq4w8uencv7nG6sKtIPT7Ge1MlbT7/Pzz3OcY+Fg0j+OBLPQe7qLDHM2N4ApzVG/qYBfKh9RHiVCcDUyOpqYu8KnNlb7fbwbe1ydz2jjQl9iCyNgYhFj1ePuutlAourQUBTaA/PKfjBR6MHHzzd3o9hQAT1rS7Q73lov/PKfBXaROLp7tEwSC7xFgh7C0G8tUZYz6hvDIFOeFRi6X3yDbHxuxjiTWQfxol7OXE3/2APgDn1Rf4hn/LeAnzLmWotDeRMsbnPHcndE/BDxFmQPB5B30u0Dd/mBO8kePhOS6SfVMwtEfqmkPuacMv761m/SlwdfmuuB3MVsYpFZpL8wQDcXmoL0KkLNxbMaAG1i85drUcs1ogI8C7WOrw1MvYstkH3yRKJvRmTT/WAOYBeRGBesF9Dzk3eRbzd8Rid1ABpdbqEXSwNDWZrwI5grg+m661hz86kIy5OIgzknt/v0Dk+auRwmu6wjwvrmvgEsPgV/LEzstp9cULgV6X+ge+LzNyX39yuoEHNoXaUO8VwU+BfhTs0ycoRrtSHhpdEs9oIHaCuLs7+IMJjzxJb6xMGej1H3oYa67z7mGnI45LUETKYyxzhlOof8J/+/EWU36bX11/+BgAA//8DACfgIChqBQAA","preset_metadata":{"is_factory":true,"name":"SHIMMER","preset_id":6163457,"product type":{"H9":1},"program_crc32":382685636,"program_id":6163456,"program_name":"Shimmer"},"program_metadata":{"crc32":382685636,"dsp_mode":0,"effect type":{"Reverb":1.0},"factory":true,"favorite":false,"id":6163456,"info":"We don�t have proof, but we�re pretty sure this is what the guitars sound like in heaven. Set the [A-PCH] and [B-PCH] to just above and below 1200c, turn the [DELAY] all the way down, and everything else all the way up. Oh, and remember to walk toward the light. \n\n \nMix - [MIX] : wet/dry mixer, 100% is all wet signal \n \nDecay - [DECAY] : arbitrary 0-100 decay (less decay will also take away reverb attack) \n \nSize - [SIZE] : size of the reverb \n \nDelay - [DELAY] : post reverb and pre pitch-shift delay time in milliseconds or note-based in tempo mode \n \nLow Band Decay - [LO-DCY] : amount of post reverb and pitch-shifter low band signal (this is in the feedback path) \n \nHigh Band Decay - [HI-DCY] : amount of post reverb and pitch-shifter high band signal (this is in the feedback path) \n \nPitch Shift A - [PICH-A] : Pitch-shifter A pitch in cents (500c=P4th, 700c=P5th, 1200c=1 Octave, 1900=1 Octave+P5, 2400=2 Octaves) \n \nPitch Shift B - [PICH-B] : Pitch-shifter B pitch in cents (500c=P4th, 700c=P5th, 1200c=1 Octave, 1900=1 Octave+P5, 2400=2 Octaves) \n \nPitch Decay - [PITCH] : The PITCH-DECAY knob controls the amount of pitch shifting in the reverb tail. It increases from 0 to 100. Beyond 100 are two FREEZE modes. PITCH FREEZE locks out the pitch shifters, but feeds the reverb, allowing you to freeze the Shimmer pitch climb at opportune times. PITCH+VERB FREEZE freezes everything (pitch and reverb) for dry soloing on top of the frozen reverb. \n \nMid Band Decay - [MIDDCY] : amount of post reverb and pitch-shifter mid band signal (this is in the feedback path) \n \n\n","inputs":2,"inputs / outputs":{"2/2":1.0},"is_exportable":false,"name":"Shimmer","outputs":2,"product type":{"H9":0.90,"Space":1.0},"rating":0,"runs_at_96k":false,"six_character_abbreviation":"Shimmr","weight":4}},{"preset":"H4sIAAAAAAAEA5RSy27DIBC89ysqzrFlsI0f1/YvqsrChjhUYCOM06ZR/r1ACs6pSTnBzM7uzi5nQMTYjYRPoD2D/qTIsrjbsvbLoLkyfLbMtAqxA0ciVmbZt+z9sgN8irK/g1MfLlfDHks8r+ZfmQ3h4sGeDZNq7uRM77cCncdPZjqqT53kX3d7L6EzakWU7/fJ3H+kGWhrC1pEnGBA8rTK/CkqXOcVxJ5GgYb5ryAPSACKAECfcxScspi1zJzssNW1JTxyDCr/FDEAFrXjReSTMsWNO3XWIFzCvNoBSZkyh1gEpqWVSGYIJYa4gSg9j5rIbtBDjkCbNLgqMcobGxYoTkGLamTzWacBnIi0GwCvmhH5/HIgsmca2NFJTcxmCvqe5aLIFFzAqy1lJxqhwhnRdNhmjALSbb27mIV/syCrfXK9+fei2wjsI27/tvtltstNg12hY1xe0vh3XF1y5ePmHH95+gEAAP//AwAnF1mFcwMAAA==","preset_metadata":{"program_crc32":-967562390,"program_id":2821376,"program_name":"Dream Chamber"},"program_metadata":{"crc32":-967562390,"dsp_mode":0,"effect type":{"Delay":0.90,"Reverb":0.60},"factory":true,"favorite":false,"id":2821376,"info":"Chamber effect (delays between diffusion and verb). Stereo in, stereo out.","inputs":2,"inputs / outputs":{"2/2":1.0},"instrument type":{"Guitar":0.90},"is_exportable":true,"name":"Dream Chamber","outputs":2,"product type":{"H8000":1.0},"rating":7,"runs_at_96k":true,"weight":1}},{}]}
3292 bytes (compressed original)
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
|
Beta Was this translation helpful? Give feedback.
-
|
Ah, you need the redistributable VC runtime. |
Beta Was this translation helpful? Give feedback.
-
|
This was the fix: |
Beta Was this translation helpful? Give feedback.
-
|
Here is a Windows Installer that will include installation of VCRUNTIME140.dll https://github.com/dnaldoog/CtrlrX/releases/tag/5.6.34_GZIPMB_Nov06 TEST PANEL: test GZIP truncation Eventide_2_0.zip To parse the decompressed string containing potential null characters using decompressGZIP you can now choose from several functions all exactly the same just depending which name makes more sense for you: In the example panel I used |
Beta Was this translation helpful? Give feedback.
-
|
Here is a small panel saves/loads JSON Gzipped.
|
Beta Was this translation helpful? Give feedback.
-
|
That’s great! The name stuck! Is it each of the unchecked rows that need to be enabled/disabled without dimming them? what enables/disables them if so? The checkbox field? |
Beta Was this translation helpful? Give feedback.






Here is a Windows Installer that will include installation of VCRUNTIME140.dll
https://github.com/dnaldoog/CtrlrX/releases/tag/5.6.34_GZIPMB_Nov06
TEST PANEL: test GZIP truncation Eventide_2_0.zip
To parse the decompressed string containing potential null characters using decompressGZIP you can now choose from several functions all exactly the same just depending which name makes more sense for you: